Page 1 of 1
native pkgbuild system not installing
Posted: Thu Jan 09, 2025 3:54 pm
by libertas
Hi,
I've build a recipe for kc https://github.com/levaidaniel/kc using the native pkgbuild system.
The software builds fine, but the single binary compiled is not installed.
The pkb_build() of the recipe:
Code: Select all
pkg_build() {
cd /tmp/kc*
make -f Makefile.linux READLINE=y BUNDLED_BCRYPT=y && make -f Makefile.linux install && pkg_build_slackdesc
When I compile manually,
Code: Select all
make -f Makefile.linux READLINE=y BUNDLED_BCRYPT=y
returns exit code 0 and
install the binary to
But not from the pkg_build() function of the recipe.
The last lines of the output of the recipe:
Code: Select all
gcc -m64 kc.o malloc_check.o cmd_c.o cmd_cdel.o cmd_clear.o cmd_clipboard.o cmd_clist.o cmd_cnew.o cmd_copy.o cmd_cedit.o cmd_del.o cmd_edit.o cmd_export.o cmd_getnum.o cmd_help.o cmd_import.o cmd_info.o cmd_list.o cmd_new.o cmd_near.o cmd_passwd.o cmd_quit.o cmd_search.o cmd_searchre.o cmd_status.o cmd_swap.o cmd_version.o cmd_write.o commands.o commands_init.o ssha.o bcrypt/bcrypt_pbkdf.o bcrypt/blf.o bcrypt/explicit_bzero.o bcrypt/sha2.o -o kc `pkg-config --libs libcrypto` `pkg-config --libs libbsd` `pkg-config --libs libxml-2.0` -lreadline
install -D -s -o root -m 755 kc /usr/local/bin/kc
install -D -o root -m 644 kc.1 /usr/local/man/man1/kc.1
mkdir: created directory '/install'
packaging kc-2.5.3-x86_64-1
done
# ls -l /usr/local/bin/kc
ls: cannot access '/usr/local/bin/kc': No such file or directory
What is wrong and how to correct it?
Re: native pkgbuild system not installing
Posted: Thu Jan 09, 2025 8:02 pm
by step
The pkgbuild system build a package file in the ./output
directory. Then you install the package with command installpkg output/PKGNAME-PKGVER-PKGARCH-PKGBUILD.txz
where the PKG... things correspond to the values set inside your recipe. After the package is installed, you can ls COMMAND
successfully, assuming the recipe build and installed the package inside the pkgbuild environment. Many times that translates into make && make install
within the pkg_build()
function. Tip: after running ./build-pkg.sh
successfully, click the .txz
file icon in the ./output
directory to open the archive, and verify that the files you expect to be there really are.
Re: native pkgbuild system not installing
Posted: Thu Jan 09, 2025 8:13 pm
by step
I almost forgot to add that your recipe looks well done. Sorry I can't test it right now.
I can add just a few observations about some things that I do differently:
- Don't set BUNDLE and FORCEDL, I mean delete the n
and leave the rest.
- Fewer lines for the SLACKDESC variable. I *think* 10 is the maximum allowed, and no more than 80 characters per line.
- Add version and short description (in brackets) to the first line of SLACKDESC, e.g., kc: kc 2.5.3 (console password manager)
Re: native pkgbuild system not installing
Posted: Fri Jan 10, 2025 12:50 pm
by libertas
Thanks @step for your help.
Now, that I've installed the package in my system, how can I share it to other FatDog users?
Re: native pkgbuild system not installing
Posted: Fri Jan 10, 2025 1:45 pm
by step
@libertas, if the package size is within the forum's storage limits, you could attach it to this thread; or put it somewhere in the cloud and publish the link in this forum otherwise. The Fatdog64 repo used to have a section for contributions, https://distro.ibiblio.org/fatdog/contrib/, but it hasn't been activated for the 900 series. So we use this forum for announcing and, where possible, sharing contributions. Some best practices for posting packages to the forum:
- One package, one thread. This helps keeping support questions and answers in one place.
- Announce the package in the first post of the thread. If you announce a further package update somewhere in the middle of the thread, add the update links also to the first post.
If you want to get fancy with package making, and manage your own externally-accessible server in the cloud, you could even create your own repository, which users can add to their Gslapt package manager's configuration.