Forum

Wed Feb 5 00:42:31 2025 UTC
Cards: The Package Manager
Re: cards upgrade fails with "download failed" for the past week SOLVED
Mon Feb 3 16:37:02 2025 UTC
Cards: The Package Manager
Re: cards upgrade fails with "download failed" for the past week SOLVED
Mon Feb 3 00:02:45 2025 UTC
Cards: The Package Manager
Re: cards upgrade fails with "download failed" for the past week
Sun Feb 2 05:04:23 2025 UTC
Cards: The Package Manager
cards upgrade fails with "download failed" for the past week SOLVED
Mon Jan 13 10:12:36 2025 UTC
General
Tuxfamily.org will sooner or later will be stop
Mon Dec 16 08:41:36 2024 UTC
General
General Chat - Hi how are you?
Wed Nov 27 11:18:31 2024 UTC
General
Re: all i386 owners will probably need urgently help!
Sun Nov 24 14:26:31 2024 UTC
General
all i386 owners will probably need urgently help!
Mon Nov 18 18:43:34 2024 UTC
General
Re: I keep finding myself here
Wed Nov 13 08:34:40 2024 UTC
General
I keep finding myself here

Mon Feb 10 20:18:46 2025 UTC

"mybld" command setup

Important

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.

Setup

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> https://github.com/NuTyX/packages-x86_64.git <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 user.name "James Bond"
git config --global user.email "james@nutyx.org"

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.

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 !!!
 

Where is what

That's now the big question.
Location of:
DEPOT /DEPOT
cli-extra collection DEPOT /DEPOT/cli-extra
nftables Pkgfile /mybld/rolling/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:
cards create 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
 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/nft....cards.tar.xz' failed.
cards 3.1.0 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 \
        --with-json
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:
make
the last command in Pkgfile is:
make DESTDIR=$PKG install
PKG variable need to be assign to /tmp/work/pkg:
PKG=/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 /mybld/rolling/cli-extra/nftables/
pkgmk -po

Help

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.