Commit Graph

195 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
c6b64acaef Symlink /usr/sbin to /usr/bin if possible
/usr/local/sbin is also symlinked to /usr/local/bin if possible.

'return 0' is dropped because that causes issues with rpm:
https://github.com/rpm-software-management/rpm/issues/3029
2024-07-09 12:10:15 +02:00
Zbigniew Jędrzejewski-Szmek
8681f7a4f3 Symlink bin filenames to sbin for compatibility
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.
2024-06-19 11:02:42 +02:00
Zbigniew Jędrzejewski-Szmek
fd11b5b9be Merge /usr/sbin and /usr/bin
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.
2024-06-19 11:02:12 +02:00
Zbigniew Jędrzejewski-Szmek
e50217a268 Fix build with rpm-4.20 2024-06-19 10:56:10 +02:00
Zbigniew Jędrzejewski-Szmek
0eed9f616a Convert to %autorelease and %autochangelog
[skip changelog]
2024-06-19 10:55:55 +02:00
Orion Poplawski
5cbb39caaa Add /usr/share/modulefiles for environment modules 2024-04-10 19:16:02 -06:00
Fedora Release Engineering
63c7510dc1 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 11:33:52 +00:00
Fedora Release Engineering
7abdc06879 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 19:18:43 +00:00
Peter Robinson
02f4c34c92 Add /etc/keys for initrd/kernel related keys 2023-07-21 16:24:58 +01:00
Fedora Release Engineering
18c72e9ad1 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 19:41:36 +00:00
František Hrdina
84ef5a94d1 Adding fmf plan and gating.yaml 2023-05-03 12:45:47 +02:00
František Hrdina
184b7f5917 Test is already presented in fedora tests repo 2023-05-03 12:45:02 +02:00
Than Ngo
621cdd1fba migrated to SPDX license 2023-02-21 18:23:52 +01:00
Fedora Release Engineering
42708aab28 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 03:26:11 +00:00
Martin Osvald
50fad43210 Filesystem has a dependency on /bin/sh (rhbz#1306489)
Fix wrong usage of posix.exec() and replace it with rpm.execute():

https://bugzilla.redhat.com/show_bug.cgi?id=1306489#c20
2022-08-09 15:22:29 +02:00
Martin Osvald
47d37ac941 Several distinct fixes
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
2022-08-03 14:59:32 +02:00
Fedora Release Engineering
6e008c5d67 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 03:10:03 +00:00
Petr Menšík
7d4445fdaf Include systemd libraries for text file units
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.
2022-07-08 18:44:51 +02:00
Fedora Release Engineering
9da9faf49c - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 02:59:57 +00:00
Ondřej Vašík
287795dce0 Move /afs into main package, /proc and /sys now ghosted to make rootless container updatable 2021-09-22 11:44:27 +02:00
Fedora Release Engineering
565f46d224 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 22:57:39 +00:00
Pavel Zhukov
c5bdcc96b6 Do not add /afs into content subpackage 2021-07-07 11:50:34 +02:00
Fedora Release Engineering
6c02aa542b - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 05:32:03 +00:00
Pavel Raiskup
bceee1afe1 Make the /proc and /sys %ghost
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
2020-08-10 07:55:50 +02:00
Fedora Release Engineering
b42fd207a1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 17:26:38 +00:00
Fedora Release Engineering
599c7663a9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 18:29:06 +00:00
Ondřej Vašík
ac9076608a do not restore context of /proc (#1722766) 2020-01-27 14:43:28 +01:00
Ondřej Vašík
6c94d78747 add ownership for eBPF bytecode files directories (#1781646) 2019-12-18 15:23:15 +01:00
Fedora Release Engineering
339ac8220c - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 00:33:33 +00:00
Ondřej Vašík
1afd3978f1 add new -afs supbackage for /afs directory (#FPC888,#1720232) 2019-06-20 15:54:13 +02:00
Ondřej Vašík
81449f5597 drop ownership for /usr/lib/sse2 (#1702329) 2019-04-29 14:48:25 +02:00
Ondřej Vašík
67576980c3 drop ownership for /etc/xinet.d (#1691146)drop ownership for %{_libdir}/tls, %{_libdir}/sse2 (#1702329) 2019-04-29 14:35:50 +02:00
Ondřej Vašík
af80b8db13 drop legacy /var/gopher (#1667231) 2019-02-11 14:35:22 +01:00
Fedora Release Engineering
49d82782da - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 19:42:08 +00:00
Igor Gnatenko
3b1809e40d Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:02 +01:00
Fedora Release Engineering
1a81a2b1b4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 00:33:41 +00:00
Ondřej Vašík
d7f1e0d076 add ownership of /etc/rwtab.d and /etc/statetab.d 2018-06-21 15:35:35 +02:00
Adam Jackson
89870bc4b8 own /etc/X11/xinit/{,{xinitrc,xinput}.d} 2018-02-20 12:25:24 -05:00
Igor Gnatenko
f04d7bf69f
Remove %clean section
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>
2018-02-14 07:12:43 +01:00
Fedora Release Engineering
9b405ab4d3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 09:38:45 +00:00
Ondřej Vašík
9c0a2199f2 drop the ownership of ghostscript dirs (#1533992) 2018-01-13 18:28:55 +01:00
David Kaspar [Dee'Kej]
c7f8e6ee7b Remove /usr/share/ghostscript/ & /usr/share/ghostscript/conf.d/ folders
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...
2018-01-12 18:27:45 +01:00
Ondřej Vašík
a9d98a7b5e own /usr/share/locale and /usr/lib/modules, improve filesystem content file to include symlinks and rootdir 2017-12-14 18:11:53 +01:00
Ondrej Vasik
d9f4a11aa4 Merge #1 Add tests for filesystem package from upstream first project 2017-12-14 16:47:44 +00:00
Colin Walters
0028572766 Add /usr/lib/sysimage
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.
2017-12-12 09:41:33 -05:00
Ondřej Vašík
4c45982cd0 own /usr/share/bash-completion{,/completions,/helpers} (#1504616), create and own /usr/lib/debug/.dwz dir to prevent dangling symlink (#1508610) 2017-11-20 18:34:22 +01:00
Ondřej Vašík
db4074f618 improve the content file creation 2017-10-12 09:22:16 -04:00
Mike Gahagan
6a222dff5e Add tests for filesystem package from upstream first project 2017-10-05 14:15:10 -04:00
Ondřej Vašík
cfe0ceb227 create and own file with the content of filesystem package 2017-10-05 14:08:39 +02:00
Fedora Release Engineering
47cc2652a7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 20:34:38 +00:00