Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911595 - sys-apps/systemd-254: rmdir: failed to remove '/var/tmp/portage/sys-apps/systemd-254/image/sbin': Directory not empty
Summary: sys-apps/systemd-254: rmdir: failed to remove '/var/tmp/portage/sys-apps/syst...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-02 12:24 UTC by Albert W. Hopkins
Modified: 2023-08-02 15:14 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.zip,78.80 KB, application/zip)
2023-08-02 12:26 UTC, Albert W. Hopkins
Details
emerge --info (emerge-info.txt,4.05 KB, text/plain)
2023-08-02 12:27 UTC, Albert W. Hopkins
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albert W. Hopkins 2023-08-02 12:24:43 UTC
I don't know why this fails on this particular system. On other systems it succeeds, but on this particular system:

```
Running custom install script '/bin/sh -c mkdir -p $DESTDIR//var/lib/systemd'
Running custom install script '/bin/sh -c touch $DESTDIR/usr'
rmdir: failed to remove '/var/tmp/portage/sys-apps/systemd-254/image/sbin': Directory not empty
 * ERROR: sys-apps/systemd-254::gentoo failed (install phase):
```

I have tried with MAKEOPTS=-j1 but that yielded the same result.

The contents of the `sbin` directory:

```
# ls -al sbin
total 0
drwxr-xr-x 2 jenkins jenkins  60 Aug  2 07:06 .
drwxr-xr-x 9 jenkins jenkins 180 Aug  2 07:06 ..
lrwxrwxrwx 1 jenkins jenkins  26 Aug  2 07:06 mount.ddi -> ../usr/bin/systemd-dissect
```

```
[ebuild     U  ] sys-apps/systemd-254:0/2::gentoo [253.7:0/2::gentoo] USE="openssl pam (split-usr) -acl -apparmor -audit -boot% -cgroup-hybrid -cryptsetup -curl -dns-over-tls -elfutils -fido2 -gcrypt -gnutls -homed -http -idn -importd -iptables -kmod -lz4 -lzma -pcre -pkcs11 -policykit -pwquality -qrcode -resolvconf -seccomp -secureboot (-selinux) -sysv-utils -test -tpm -vanilla -xkb -zstd (-gnuefi%)" ABI_X86="(64) -32 (-x32)" PYTHON_SINGLE_TARGET="python3_11%* -python3_10%" 13985 KiB
```
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-02 12:25:19 UTC
Please include the full build.log and emerge --info.
Comment 2 Albert W. Hopkins 2023-08-02 12:26:32 UTC
Created attachment 866844 [details]
build.log
Comment 3 Albert W. Hopkins 2023-08-02 12:27:15 UTC
Created attachment 866845 [details]
emerge --info
Comment 4 Albert W. Hopkins 2023-08-02 12:45:00 UTC
Also, I don't know why but this system uniquely had `FEATURES=nostrip`. So I took that configuration out, but it still yielded the same result.
Comment 5 Mike Gilbert gentoo-dev 2023-08-02 15:14:29 UTC
A warning for you in case you haven't seen the news item:

split-usr support will be removed in the next systemd release (255). You will need to migrate your systems to merged-usr if you want to continue using systemd.

https://www.gentoo.org/support/news-items/2022-12-01-systemd-usrmerge.html

https://wiki.gentoo.org/wiki/Merge-usr
Comment 6 Larry the Git Cow gentoo-dev 2023-08-02 15:14:53 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94efe7631fb9347fdaa11325ddecd432980213d9

commit 94efe7631fb9347fdaa11325ddecd432980213d9
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2023-08-02 15:08:20 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2023-08-02 15:14:51 +0000

    sys-apps/systemd: do not remove "${ED}/sbin" on split-usr
    
    systemd-254 installs a symlink "/sbin/mount.ddi" whenever libblkid is
    available. Gentoo always has libblkid via sys-apps/util-linux.
    
    Closes: https://bugs.gentoo.org/911595
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 sys-apps/systemd/systemd-254.ebuild | 4 ----
 1 file changed, 4 deletions(-)