Wed Jul 3 22:46:38 2024 UTC
Wed Feb 28 14:42:19 2024 UTC
Cards: The Package Manager
Re: Extremely slow download speed
Sun Feb 25 23:31:04 2024 UTC
Cards: The Package Manager
Extremely slow download speed
Sat Feb 24 03:36:33 2024 UTC
Re: Shutdown issues
Sun Feb 18 19:09:11 2024 UTC
Re: Shutdown issues
Sun Feb 18 12:29:38 2024 UTC
Re: Wireguard Package Request
Sun Feb 18 11:03:40 2024 UTC
Re: Shutdown issues
Sat Feb 17 19:58:32 2024 UTC
Re: Shutdown issues
Sat Feb 17 11:02:14 2024 UTC
Re: Shutdown issues
Sat Feb 17 04:58:06 2024 UTC
Shutdown issues

Wed Feb 28 15:05:46 2024 UTC

"mybld" command setup


All the commands are enter via your account. It means no need to use the root account.

Once the GIT project is recovered, all manipulations MUST be done from the folder containing your GIT project.


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> <branch>
The variable <branch> can take testing or rolling as value.

Once the GIT project in place, we move to the root of it, indeed the command mybld uses information from the GIT (VERSION, USERNAME, EMAIL, etc).

Go to the root of the project

The GIT project is cloned. We need to go to the root of it.
cd <branch>
From now on all the followings commands are launched from the actual folder.

Setup my name and email

This 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 "James Bond"
git config --global ""

Implementation of working directories

The mybld command uses a set of folders for its operation, they must therefore be created using the command:

mybld -I

You can adjust the operating folders locations in the configuration file ~/.mybld via the variables ROOT, ROOTMOUNT and VERSION.

Available Collections

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.

Collections list.
base base
cli base cli
gui base cli gui
cli-extra base cli cli-extra
gui-extra base cli gui gui-extra

Retrieving binaries collections

Depending the choose collection, launch the command:

mybld -s name_of_collection
to 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

You can specify a custom address and version in the ~/.mybld configuration file via the URL and VERSION variables.

Configuration of cards

By default, the cards configuration specifies the collections available on the official NuTyX server. In order to be able to install, keep or remove future personal packages, you must specify in the file /etc/cards.conf source each collection independently.

In the configuration below, personal packages will be stored in folders: /home/tnut/www/x86_64/<branch_name>/<collection_name>

Official collections remain on the remote server.

The contents of /etc/cards.conf file after modifications:

# No global url should be defined
# We need to specify an url only
# for remote repositories collection
# Default global server URL 
# url
# My own repository (this repository) without specified url 
## For all the graphical applications and desktops
dir /var/lib/pkg/depot/gui-extra|
## For a minimal graphical interface
dir /var/lib/pkg/depot/gui|
## For all the console applications
dir /var/lib/pkg/depot/cli-extra|
## For a minimal console interface
dir /var/lib/pkg/depot/cli|
## Chroot system without reboot possibilities for a chroot
dir /var/lib/pkg/depot/base|
## Normaly you want to keep base and
base /var/lib/pkg/depot/base
## If you want to keep more collections remove comments below
# Adjust to your needs
# base /var/lib/pkg/depot/cli
# base /var/lib/pkg/depot/cli-extra
# base /var/lib/pkg/depot//gui
# base /var/lib/pkg/depot/gui-extra
# base /var/lib/pkg/depot/...

Using the command

(Re)Compile a package

mybld name_of_package
Compilation begins immediately.

Increment the version and recompile a package

mybld -i name_of_the_package
After confirmation, the compilation start immediatly.

Advanced mode

Let'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.

To illustrate the purpose of --pause option, I will try to compile nftables

Entering into the chroot

mybld -p nftables
You are now in chroot.
Type exit when finish.

 Good luck !!!

A new command is born

Depending 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:

cli-extra -h
usage: cli-extra [option]
  -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
  -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 what

That's now the big question.
Location of:
cli-extra collection DEPOT /DEPOT/cli-extra
nftables Pkgfile /DEPOT/cli-extra/nftables/Pkgfile
Sources files /sources
Compilation logs /LOGS
working directory /tmp/work/src and /tmp/work/pkg

Go on with compilation

So let's give a try to compile nftables now. Just type:
cli-extra nftables
Compilation 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
 to avoid the need to call pkg-config.
See the pkg-config man page for more details.
=======> ERROR: Building 
 '/DEPOT/cli-extra/nftables/' failed.
cards 2.4.124 create:
  could not parse Pkgfile: While running 'build()'

Fix the issue

We can now fix the issue by adjusting the deps:
cards install libnftnl libnftnl.devel
We 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 \
Looks 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:
the last command in Pkgfile is:
make DESTDIR=$PKG install
PKG variable need to be assign to /tmp/work/pkg:
time to finish:
make DESTDIR=$PKG install
install -Dm644 ../nftables.conf "$PKG/etc/nftables/nftables.conf"

Packing up

when 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.

mybld -h

Remember to consult mybld's man page to obtain more information about other possible options:

man mybld

Be the first to comment on this subject.