Build ipfire 3.x

Hi !

Long time there was a wiki page how to build ipfire 3.x but it seems that it has gone…
Is there a new howto available ?
I would like to be peraped when some day its the official release :slight_smile: and have my packages compiled

Ciao Gerd

1 Like

Hi Gerd,

does any of the links listed below IPFire 3.x here www.ipfire.org - Development help you? :slight_smile:

Kind Regards,
Rico

Hmm… im not sure because there is listed how to build a package… not to build the system…
And before building package i should have the system :slight_smile:

Ciao Gerd

The buildsystem of IPFire-3.x is pakfire:
https://git.ipfire.org/?p=pakfire.git;a=summary

IPFire-3.x will build every used software as seperate package.
pakfire will resolve dependencies and unpack/install it before it build the package from source.

There is no installer and image finished yet (expect some manuall installed testing builds.)

1 Like

Hi !

But is there a Howto for handling pakfire ?

Ciao Gerd

Yes on the development page that Rico has already linked in the second post: www.ipfire.org - Pakfire (for IPFire 3.x)

Hi!

Sorry if im that stupid (ok at least i was able to build ipfire 2.x and some packages) but im talking about a page like this Howto
the link you provided still leaves me back unknown…
in build ipfire from scratch it sound that you need ipfire 3.x to build ipfire 3.x … i would apreciate a kind of a step by step howto at least to build ipfire 3.x (even if there are not testbuilds available)

Ciao Gerd

There is no existing step by step as IPFire-3.x is still in teh process of being developed.

However, what I can do for you is show you how to build the IPFire-3.x version of pakfire and then use it to build individual packages. Currently there is still a bug in pakfire that means for some package build it fails due to a file descriptor error. That is being worked on but some packages will build okay, so you can test it out.

You can then also look at the files that describe the build to understand the structure of the .nm file which is the build description file in IPFire-3.x Some of the pages in the wiki cover some of this info on the file structure but it is not a step by step how to. You will still need to read them through and then look at example .nm files to see.

First step is clone the pakfire git repo to your build machine.

git clone git://git.ipfire.org/pakfire.git

Then move into the pakfire directory and run the following commands. You may need to install additional packages on your build machine but you will see what is missing if the build sequence fails.

My machine was already configured for building some linux packages such as bacula so I didn’t need many additional packages but for me the additional ones were:-
For the autogen.sh step I needed intltool and for the configure stage I had to add
asciidoc, python-py-cpuinfo, python-pykerberos, python-systemd, python-tornado and libsolv but for you the additional required packages might have some differences depending what you already have or don’t have installed. Also depending on your distro the apckage names might be different. The distro I am using is Arch Linux.

The build is based on an unprivileged user with sudo used where you need to be root.

./autogen.sh

./configure     --prefix=/usr \
               --sysconfdir=/etc \
               --enable-debug
                
make -j$(nproc)

(make check)

sudo make install

You can miss out the make check as currently most of the checks fail but the focus is on fixing the bugs in pakfire first before looking at fixing the checks for during the build, hence that step is in brackets.

After the make install step you should have the pakfire binary built and installed on your build system.

You can confirm this by running the following command
sudo pakfire-builder --help and you should get the pakfire-builder help screen.

If that worked then you can move on to trying to build an IPFire-3.x package.

Clone the IPFire=3.x git repo to your build machine.

git clone git://git.ipfire.org/ipfire-3.x.git

Then move into the ipfire-3.x directory and you can then do a test build by running the following command.

sudo pakfire-builder build beep/beep.nm

Even with the current bugs in pakfire the beep package has always built successfully for me. It is also a smallish program so build quite quickly.

The above will let you get a feel for how the IPFire-3.x build process will work as things move forward, and by reading up on the .nm file structure you can see how a package should be defined.
The relevant wiki page for that definition is
https://www.ipfire.org/docs/devel/pakfire/guidelines

It will not enable you to build a complete IPFire-3.x as not all of it is created yet. For that you will need to wait a bit more.

1 Like

Hi !

Thanks…
Is there a list with packages (e.g. for Ubuntu) which needs do be installed for compilation ?
configure runs through, but after make it takes 1 sec to

src/libpakfire/cgroup.c: In function ‘pakfire_cgroup_setup_devices’:
src/libpakfire/cgroup.c:219:9: error: implicit declaration of function ‘LIBBPF_OPTS’; did you mean ‘LIBBPF_API’? [-Werror=implicit-function-declaration]
  219 |         LIBBPF_OPTS(bpf_prog_load_opts, opts,
      |         ^~~~~~~~~~~

I think there is maybe a package missing

Ciao Gerd

No. We are not at that sort of stage yet. You will need to look through any errors you get and figure out what packages are missing.

That message you got looks like you need libbpf to be installed.

I checked on my Arch Linux install and that package is installed.

On Ubuntu you will also likely need to also install libbpf-dev

Hi,
Sir, I have followed your guideline on debian 12. Pakfire compiled successfully, now in the ipfire-3.x, i have tried to compile beep/beep.nm, it was giving downloading issue. I changed the URL in the nm file and then all list of packages downloaded for ipfire-3.x. It compiled successfully, similar step i tried for kernel/kernel.nm,
But i am confused here, i dont know how to generate a image file like iso/img to make a running copy of the IPFire-3.x. I spent some to understand compilation method for IPFire-2.x (never faced any issue for compilation process).
Another thing which i want to share that i have seem some files related to IPFire under /var/tmp/random_name/ with linux directory structure but boot directory was empty.
Any hint to make a .iso/.img file to run it in the VM etc. Please guide

Pakfire in IPFire-3.x is mostly in place but there are still bugs that need to be resolved on it.

There is not much point in doing this. If I remember correctly you would have a system that would boot but it would not work as a firewall/router yet.

The network system is not yet coded and I am not sure about the firewall system either.

There is a lot of work still being done with the pakfire build system for IPFire-3.x as you can see if you look at the IPFire-3.x pakfire git repo

https://git.ipfire.org/?p=pakfire.git;a=shortlog;h=refs/heads/master

This needs to be finished and tested out to be working smoothly and correctly before we can move on to the next stage.

1 Like