Sat Dec 26 10:27:51 2020 UTC
"mybld" command setup
All the commands are enter via your account. It means no need to use the root account.
Tools (packages to install)
It is assumed that your NuTyX is free from any development package. So we start by installing the utilities:
get rsync git
Get the GIT project
We start by cloning the GIT project containing all the NuTyX recipes:
git clone -b <branch> git://github.com/NuTyX/packages-x86_64.git <branch>The variable <branch> can take testing or rolling as value.
Go to the root of the projetThe GIT project is cloned. We need to go to the root of it.
From now on all the followings commands are launched from the actual folder.
Setup my name and emailThis step is necessary if you want to share your new packages, indeed, the mybld -n command uses this information when creating your new package.
git config --global user.name "James Bond" git config --global user.email "email@example.com"
Implementation of working directories
The mybld command uses a set of folders for its operation, they must therefore be created using the command:
Choose the collection you want to work on. Depending on the collection chosen, you will need to retrieve the collections specified in the right column.
Retrieving binaries collections
Depending the choose collection, launch the command:
mybld -s name_of_collectionto retrieve the collection(s) needed.
For example, to use the gui collection, run the command:
for i in base cli gui; do mybld -s $i;done
If you want to recover the entire collection, run the same command but without arguments:
Using the command
(Re)Compile a package
mybld name_of_packageCompilation begins immediately.
Increment the version and recompile a package
mybld -i name_of_the_packageAfter confirmation, the compilation start immediatly.
Advanced modeLet's say we have a critical package that doen't want to build properly. In that case, the best way is then to use the -p option for pause.
Entering into the chroot
mybld -p nftables
You are now in chroot. Type exit when finish. Good luck !!!
A new command is bornDepending of the collection the package you want to build, you get a new command named <collection_name>.
In this example nftables package belong to cli-extra collection so we can now type:
usage: cli-extra [option] options: -a, --all will build all the ports of the 'cli-extra' collection in the right order -l, --list will list all the ports of the 'cli-extra' collection in the right order -ru, --remove-url remove the URL part in /etc/cards.conf file for the 'cli-extra' collection -cp, --check-ports check if new ports are available -cb, --check-binaries check if binaries are uptodate -d, --dry check if binaries are different then the ports but dont build anything -s, --sync synchronise binaries from rsync server location -c, --config printout the configuration -h, --help print help and exit -v, --version print version and exit -u, --usage print the recommended way of using the 'cli-extra' script
Where is whatThat's now the big question.
Go on with compilationSo let's give a try to compile nftables now. Just type:
cli-extra nftablesCompilation with start just like normal.
If an error occur now, it will just return to the prompt:
checking for LIBMNL... yes checking for LIBNFTNL... no configure: error: Package requirements (libnftnl >= 1.1.8) were not met: No package 'libnftnl' found Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBNFTNL_CFLAGS and LIBNFTNL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. =======> ERROR: Building '/DEPOT/cli-extra/nftables/nftables1608914972x86_64.cards.tar.xz' failed. cards 2.4.124 create: could not parse Pkgfile: While running 'build()'
Fix the issueWe can now fix the issue by adjusting the deps:
cards install libnftnl libnftnl.develWe go to the working directory and we give another try :
cd /tmp/work/src/nftables-0.9.7 ./configure --prefix=/usr \ --sysconfdir=/etc/nftables \ --mandir=/usr/share/man \ --with-jsonLooks beter.
nft configuration: cli support: readline enable debugging symbols: yes use mini-gmp: no enable man page: yes libxtables support: no json output support: yes enable Python: yes (with /usr/bin/python)We can now continue the rest of the pkgfile commands:
makethe last command in Pkgfile is:
make DESTDIR=$PKG installPKG variable need to be assign to /tmp/work/pkg:
PKG=/tmp/work/pkgtime to finish:
make DESTDIR=$PKG install install -Dm644 ../nftables.conf "$PKG/etc/nftables/nftables.conf"
Packing upwhen Pkgfile is complete, we can go back to the Pkgfile directory and use the command pkgmk -po to finish the job:
cd /DEPOT/cli-extra/nftables/ pkgmk -po
The mybld command allows all kinds of options.
Remember to consult mybld's man page to obtain more information about other possible options: