Project

General

Profile

Bug #2638

[systemd] remove from base-devel group

Megver83 - 5 months ago - . Updated about 2 months ago.

Status:
confirmed
Priority:
bug
Assignee:
% Done:

0%


Description

Our systemd version from [libre] is in the base-devel group, however, Arch's doesn't

This is a problem since users without systemd who wish to install the base-devel group will have to pass the --ignore flag in pacman

It's also problematic for librechroots, as base-devel packages are mandatory for them, then if I want to build a pkg that conflicts systemd I just cannot do it (In my specific case I use a little hack to install all base-devel pkgs except for systemd)

The solution is as simple as removing the 'groups' variable in the PKGBUILD

History

#1

Updated by bill-auger 5 months ago

'systemd' is already pulled in by 'base' via
'systemd-sysvcompat' and 'systemd-udev'; and 'base' is intended
to be mandatory for every system - that would explain why it
is not in arch 'base-devel' - no package in arch would need an
explicit dependency on 'systemd', because it is mandatory

im not certain exactly why, but i assume that 'systemd' is
required by parabola's 'base-devel', because some other tool
in 'base-devel' would fail without it, but does not have the
explicit dependency - so it could be that simply removing
'systemd' from 'base-devel' would cause problems for nonsystemd
systems anyway

[nonsystemd] has a 'systemd' provider - that is supposed to
eliminate any such conflicts - if something would be broken
with the dummy 'systemd' provider, i guess there would need to
be a new 'nonsystemd/base-devel' meta-package, which omits
whatever packages that need the real 'systemd'

#2

Updated by Megver83 5 months ago

bill-auger wrote:

'systemd' is already pulled in by 'base' via
'systemd-sysvcompat' and 'systemd-udev'; and 'base' is intended
to be mandatory for every system - that would explain why it
is not in arch 'base-devel' - no package in arch would need an
explicit dependency on 'systemd', because it is mandatory

there are thousands of packages in Arch that depend in systemd, just run pacman -Sii systemd

im not certain exactly why, but i assume that 'systemd' is
required by parabola's 'base-devel', because some other tool
in 'base-devel' would fail without it, but does not have the
explicit dependency - so it could be that simply removing
'systemd' from 'base-devel' would cause problems for nonsystemd
systems anyway

that's nonsense, how would it cause problems in non-systemd systems? I build all elogind-dependant packages in chroots with [nonsystemd] enabled which don't install systemd and none of the base-devel tools fail, I don't know why assuming that systemd is needed in such case

[nonsystemd] has a 'systemd' provider - that is supposed to
eliminate any such conflicts - if something would be broken
with the dummy 'systemd' provider, i guess there would need to
be a new 'nonsystemd/base-devel' meta-package, which omits
whatever packages that need the real 'systemd'

that's not necessary

#3

Updated by bill-auger 4 months ago

i think i was just trying to find out why it systemd in
base-devel at all, if it is not in arch base-devel - then who put
it there, and why? - maybe it was added in unnecessarily,
cargo-cult style; but presumably there was a specific reason why
- i can not imagine what that would be; but it may e a
good idea to find out, in case that removing it breaks something

the depends array in PKGBUILDs do not need to specify anything
in base-devel; because base-devel is assumed to be installed
before running makepkg - likewise, there should be no need
for systemd to be in any PKGBUILD, because it is required by
'base', and 'base' is not only assumed to be installed, it is
considered to be mandatory for every system - we correct for
that with nonsystemd/base, so that makes two reasons why systemd
should not be required by base-devel - but it is assumed, indeed
required, to be installed in every arch system; so it is possible
that something will be broken by removing it, because that
"something" may actually depend on it, but would not have an
explicit dependency specified on it

im not sure if there is any easy way to find out either - we may
need to just remove it and keep an eye out for any build tools that
break for strange reasons

#4

Updated by Megver83 3 months ago

I talked with ovruni and he told me systemd was added to base-devel because librechroot failed if systemd is not present in the chroot (that's for libre/libretools of course, nonsystemd/libretools goes flawlessly without it)

btw, idk if this is useful, but I found the commit that adds systemd to base-devel, but the commit msg doesn't give any clue of the specific reason why systemd is in base-devel

https://git.parabola.nu/abslibre.git/commit/libre/systemd/PKGBUILD?id=21f47999701f8fe095e5b81274c64bf80e01e541

It's from 3 years ago, I wonder if systemd still needs to be there.

bill-auger, afaik you use systemd and libre/libretools, right? could you test building a pkg in a systemd-less librechroot? What I do for this is editing the CHROOTPKG array in /usr/lib/libretools/chroot/chcleanup, change it from

CHROOTPKG=(base-devel)

to

CHROOTPKG=($(pacman -Sgq base-devel|grep -v systemd))

or if you prefer, put your output of `pacman -Sgq base-devel|grep -v systemd' in the array instead of the command

If systemd is, indeed, required by librechroot, then the correct fix would be adding systemd in CHROOTPKG instead of building it in the base-devel group, because having it there, besides struggling nonsystemd pkgs builds, is a problem for any non-systemd user that wants to install base-devel. Of course the solution for users is passing --ignore to pacman, but I think that by adding systemd in CHROOTPKG and removing it from base devel is a better solution

#5

Updated by bill-auger 3 months ago

  • Assignee set to Megver83

i was able to package a simple python CLI 'any' package: 'toot', on a systemd host, without the systemd packages in the x86_64 chroot - i will keep it this way for a while and see if any more complicated programs have a problem with it

#6

Updated by Megver83 3 months ago

awesome, let's see how you go this month, and if everything goes well, I'll remove systemd from base-devel

#7

Updated by bill-auger 3 months ago

actually they were still installed - the systemd packages are not being removed

#8

Updated by Megver83 3 months ago

bill-auger wrote:

actually they were still installed - the systemd packages are not being removed

Even if you do librechroot clean-pkgs? Then enable [nonsystemd] inside the chroot, it's due to p11-kit:

pacman -> curl -> ca-certificates-utils -> p11-kit -> systemd

that's the dependency tree that keeps systemd installed

#9

Updated by bill-auger 3 months ago

i dont think that trick is going to work - the chroot cleaner will not remove the systemd packages because there are other packages in libre/base that require systemd indirectly; so the chroot cleaner will not remove them

just for fun, i tried removing them manually - that exposed a long dependency chain which includes pacman - the build fails immediately because /etc/makepkg.conf does not exist in the chroot - maybe there is a work-around; but it could be more complicated that just that

TLDR: pacman->gpgme->gnupg->gnutls->p11-kit->systemd

# sudo pacman --print -R $(pacman -Qsq ^systemd) 
error: failed to prepare transaction (could not satisfy dependencies)
:: removing systemd-libs breaks dependency 'systemd-libs' required by dbus
:: removing systemd-libsystemd breaks dependency 'libsystemd.so=0-64' required by dbus
:: removing systemd-libs breaks dependency 'systemd-libs' required by device-mapper
:: removing systemd-libs breaks dependency 'systemd-libs' required by libusb
:: removing systemd breaks dependency 'systemd' required by p11-kit
:: removing systemd-libsystemd breaks dependency 'libsystemd.so=0-64' required by p11-kit
:: removing systemd-libs breaks dependency 'systemd-libs' required by util-linux

# sudo pacman --print -R $(pacman -Qsq ^systemd) dbus device-mapper libusb p11-kit util-linux
error: failed to prepare transaction (could not satisfy dependencies)
:: removing p11-kit breaks dependency 'p11-kit>=0.23.19' required by ca-certificates-utils
:: removing device-mapper breaks dependency 'device-mapper' required by cryptsetup
:: removing util-linux breaks dependency 'util-linux' required by fakeroot
:: removing p11-kit breaks dependency 'p11-kit' required by gnutls
:: removing libusb breaks dependency 'libusbx' required by libpcap
:: removing dbus breaks dependency 'dbus' required by libpcap

# sudo pacman --print -R $(pacman -Qsq ^systemd) dbus device-mapper libusb p11-kit util-linux ca-certificates-utils cryptsetup fakeroot gnutls libpcap
error: failed to prepare transaction (could not satisfy dependencies)
:: removing ca-certificates-utils breaks dependency 'ca-certificates-utils>=20181109-3' required by ca-certificates-mozilla
:: removing gnutls breaks dependency 'gnutls' required by gnupg
:: removing libpcap breaks dependency 'libpcap' required by iptables
:: removing gnutls breaks dependency 'gnutls' required by libmicrohttpd

# sudo pacman --print -R $(pacman -Qsq ^systemd) dbus device-mapper libusb p11-kit util-linux ca-certificates-utils cryptsetup fakeroot gnutls libpcap ca-certificates-mozilla gnupg iptables libmicrohttpd
error: failed to prepare transaction (could not satisfy dependencies)
:: removing ca-certificates-mozilla breaks dependency 'ca-certificates-mozilla' required by ca-certificates
:: removing libmicrohttpd breaks dependency 'libmicrohttpd' required by elfutils
:: removing gnupg breaks dependency 'gnupg>=2' required by gpgme

# sudo pacman --print -R $(pacman -Qsq ^systemd) dbus device-mapper libusb p11-kit util-linux ca-certificates-utils cryptsetup fakeroot gnutls libpcap ca-certificates-mozilla gnupg iptables libmicrohttpd ca-certificates elfutils gpgme
error: failed to prepare transaction (could not satisfy dependencies)
:: removing elfutils breaks dependency 'elfutils' required by binutils
:: removing ca-certificates breaks dependency 'ca-certificates' required by curl
:: removing gpgme breaks dependency 'gpgme' required by pacman

# sudo pacman --print -R $(pacman -Qsq ^systemd) dbus device-mapper libusb p11-kit util-linux ca-certificates-utils cryptsetup fakeroot gnutls libpcap ca-certificates-mozilla gnupg iptables libmicrohttpd ca-certificates elfutils gpgme binutils curl pacman
error: failed to prepare transaction (could not satisfy dependencies)
:: removing binutils breaks dependency 'binutils>=2.28' required by gcc
:: removing curl breaks dependency 'curl' required by libelf

# sudo pacman --print -R $(pacman -Qsq ^systemd) dbus device-mapper libusb p11-kit util-linux ca-certificates-utils cryptsetup fakeroot gnutls libpcap ca-certificates-mozilla gnupg iptables libmicrohttpd ca-certificates elfutils gpgme binutils curl pacman gcc libelf
Packages (32) binutils-2.34-2  ca-certificates-20181109-3  ca-certificates-mozilla-3.51-1
              ca-certificates-utils-20181109-3  cryptsetup-2.3.1-1  curl-7.69.1-1  dbus-1.12.16-5
              device-mapper-2.02.187-1  elfutils-0.178-2  fakeroot-1.24-2  gcc-9.3.0-1  gnupg-2.2.20-1
              gnutls-3.6.13-1  gpgme-1.13.1-3  iptables-1:1.8.4-1  libelf-0.178-2
              libmicrohttpd-0.9.70-1  libpcap-1.9.1-2  libusb-1.0.23-2  p11-kit-0.23.20-3
              pacman-5.2.1-4.parabola3  systemd-245.4-2.parabola1  systemd-common-245.4-2.parabola1
              systemd-libs-245.4-2.parabola1  systemd-libsystemd-245.4-2.parabola1
              systemd-libudev-245.4-2.parabola1  systemd-nss-myhostname-245.4-2.parabola1
              systemd-nss-mymachines-245.4-2.parabola1  systemd-nss-resolve-245.4-2.parabola1
              systemd-nss-systemd-245.4-2.parabola1  systemd-udev-245.4-2.parabola1
              util-linux-2.35.1-1
#10

Updated by bill-auger 3 months ago

yep p11-kit

#11

Updated by Megver83 3 months ago

any news on this? bill-auger?

#12

Updated by bill-auger 3 months ago

i have not thought any more abut this - the dumb solution would be just to make a new 'base-devel' meta-package in [nonsystemd] - i think that `pacman -S` would prefer the package over the 'base-devel' group - on the face of it though, there should not be any conflict - if [nonsystemd] is enabled, then the p11-kit dependency should be satisfied by nonsystemd/p11-kit, which does not require systemd

#13

Updated by Megver83 3 months ago

Sure, but the best would be to remove systemd from base-devel, and it case someone else reports an issue, then it should be added to CHROOTPKG in libretools. Could you rebuild it without the groups variable, please?

#14

Updated by bill-auger 2 months ago

  • Related to Bug #2770: [ffmpeg] cannot install on i686/openrc added
#15

Updated by bill-auger 2 months ago

it look like ffmpeg has a similar problem now with openrc - it wants systemd through p11-kit

# pacman -S ffmpeg
:: systemd and openrc are in conflict (systemd-tools). Remove openrc? [y/N] y
#16

Updated by bill-auger 2 months ago

  • Related to deleted (Bug #2770: [ffmpeg] cannot install on i686/openrc)
#17

Updated by lukeshu about 2 months ago

The reason it was in the base-devel group is that the Arch version was. But Arch removed it from base-devel in 243.78-1 https://git.archlinux.org/svntogit/packages.git/commit/?id=30853991d2940cfc6c169a306b76c62984ca22be

So it should be good to remove on our end.

Also available in: Atom PDF