You are not logged in.
Hello,
I'm creating a meta-package for installing a set of tools. The PKGBUILD content is the following:
pkgname=infosec-tools
pkgver=1.0.0
pkgrel=1
pkgdesc="InfoSec tools"
arch=('any')
license=("custom")
depends=('blackarch-cracker' 'blackarch-crypto')
where "blackarch-cracker" and "blackarch-crypto" are two groups coming from BlackArch repository (added in my pacman.conf file and working correctly).
What I note is that, when I build the package by "makepkg -f -sr --sign", it installs all the tools coming from those two groups and, when it finishes to install, I get the following error:
==> Missing dependencies:
-> blackarch-cracker
-> blackarch-crypto
-> blackarch-crypto
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.
I get this error also if I install all the tools related to these two groups and then run "makepkg -f -sr --sign".
So, my doubt is: is not possible to use pkg groups in "depends" on PKGBUILD?
Edit: I tried to do some test also with other groups, like "plasma" and I get the same error. Is there a way to install pkg group instead of listing all the tools in "depends"?
Last edited by D3vil0p3r (2023-01-04 17:48:46)
Offline
No, you have to list the packages. But you make a PKGBUILD once, why is this an issue?
printf 'depends=( ' >> PKGBUILD
printf "'%s' " $(pacman -Sgq blackarch-cracker blackarch-crypto) >> PKGBUILD
printf ')\n' >> PKGBUILD
Last edited by Trilby (2023-01-01 23:23:57)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
No, you have to list the packages. But you make a PKGBUILD once, why is this an issue?
printf 'depends=( ' >> PKGBUILD printf "'%s' " $(pacman -Sgq blackarch-cracker blackarch-crypto) >> PKGBUILD printf ')\n' >> PKGBUILD
It is a very smart and easy solution for listing directly the packages.
My only concern is: at this point, it is not possible to install automatically new packages that will belong to the pkg group. I should manually add the new packages belonging to the pkg groups.
Offline
What you want looks like it may be possible with meta-packages , but not with package groups .
Check https://wiki.archlinux.org/title/Meta_p … kage_group for details
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Thank you guys, the post can be marked as Solved.
Last edited by D3vil0p3r (2023-01-04 10:09:10)
Offline
Then go ahead and do it. Edit your first post and prepend [SOLVED] to the thread's title.
Inofficial first vice president of the Rust Evangelism Strike Force
Offline
Thank you, I just report here the final solution that starts from the proposal of @Trilby but delete duplicated packages from the output:
sed -i '/depends=/d' PKGBUILD
sed -i '/^$/d' PKGBUILD #Delete all empty lines
printf '\n' >> PKGBUILD #Avoid that the new "depends" string is placed on an existing row
printf 'depends=( ' >> PKGBUILD
printf "'%s' " $(pacman -Sgq blackarch-networking blackarch-defensive | awk '!seen[$0]++')
printf ')\n' >> PKGBUILD
In this way, we prevent to have packages reported in "depends=" more than one time if one package belongs to more than one group.
Thank you again!
Last edited by D3vil0p3r (2023-01-04 17:48:21)
Offline
That looks good. Note that `sort -u` should be a simpler approach than `awk "!seen[$0]++"`, though they accomplish the same goal. Though that is an excellent `uniq` implementation in awk (side note, `uniq` is the *nix tool that one might first think to use, but it requires input to be in sorted order, so `sort -u` is the way to go as it is equivalent to `sort | uniq`).
Last edited by Trilby (2023-01-04 21:10:56)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline