When packages are rebuilt in a merged buildroot and their contents migrate
from /usr/sbin to /usr/bin, we want to provide compat symlinks so that the old
names still work.
This scriptlet covers all packages that have files in /usr/sbin in F40. We
have just one scriptlet in filesystem because that's easier than having
separate scriptlets in each package.
When the package for which we created a symlink is removed, we remove the
symlink.
The list of filenames was initially created using 'dnf repoquery', but it
seems that this is unreliable. Additional files were generated using:
(ls -1 /usr/sbin/|sort -g|sed 's/.*/ "\0",/'; sed -n -e '/^ "acme/,/^ "zramctl"/p' <filesystem.spec)|sort|uniq|xsel
We need to also trigger on /sbin, because some packages have files in /sbin
(not just /usr/sbin). In particular, this affects glibc, which (still) has
/sbin/ldconfig.
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
/usr/sbin is now created via a scriptlet. In a pristine installation, we'll end
up with merged sbin. On upgrades, symlink creation will fail and the existing
/usr/sbin directory will remain.
The updated package means that if we build packages, they'll see merged sbin in
the filesystem. If additionally rpm defines %{_sbindir} as /usr/sbin, those
packages will get files in the merged location. A separate pull request will be
filed for rpm.
For building rpms, the change in rpm is more important, because what really
matters is the path specified in %files, so even if the buildroot has
merged-sbin, if %_sbindir says otherwise, package will use the unmerged path.
For installation on disk, the change here is more important, because even if
packages specify unmerged paths, if the directory on disk is a symlink, that
symlink will be followed, so the installation will end up with merged sbin.
We want to build packages in a chroot where /usr/sbin is a symlink to /usr/bin,
so that packages get files in the merged location. But on user systems,
especially when the transition is in progress, we will have packages with files
in /usr/sbin, so we accept that /usr/sbin in a separate directory.
Filesystem has a dependency on /bin/sh (#1306489)
Add /usr/share/X11/fonts/ to default filesystem (#2107447)
Remove obsolete and forbidden Group tag
Own zsh and fish completions directories (rhbz#1312594)
Improve directory creation to avoid 'Argument list too long' error
Many packages needs to put single *.service file or similar into those
directories, but otherwise does not need to depend on systemd. It would
leave those directories unowned. Avoid owning that directories by every
package.
When working in rootless container environment with user namespaces,
those directories are pre-populated by the container runtime as
bind-mounts from host.
Such bind-mounts though naturally inherit ownership/permissions from the
host's filesystem.rpm, and non-privileged "root" inside container can
not be allowed to touch files owned by host's UID=0. Those directories
are then shown as owned by 'nobody:nobody'.
When filesystem.rpm holds those /proc and /sys in payload, rpm tries to
re-chown the file to root:root on every package update transaction.
This operation can not succeed because 'root:root' inside container maps
to some large UID/GID on host -- and so the RPM transaction fails.
As a workaround (there's no better way currently), remove /proc and /sys
from the packaged payload, mark those directories %ghost and create them
by scriptlet.
Resolves: rhbz#1548403
Version: 3.14-4
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
The former is owned by ghostscript itself, and the latter is no longer
needed in Fedora. All packages depending on the conf.d/ folder will be
retired or dropped, starting with Fedora 28...
This came out of upstream rpm-ecosystem discussion:
http://lists.rpm.org/pipermail/rpm-maint/2017-October/006681.html
While I'm not aware of anyone starting the push to move the rpmdb
in Fedora yet, I do plan to change rpm-ostree soon to use
`/usr/lib/sysimage/rpm-ostree-base-db` or so for its "base" rpmdb,
as distinct from the final one.