Commit graph

269 commits

Author SHA1 Message Date
Lukas Javorsky
f2d2aec193 Revert "Removed uidgid pair 27:27 for MySQL/MariaDB"
This reverts commit df5ba729d6.

Reason: The MariaDB and MySQL sysusers.d files has to use soft static allocation in order to correctly handle the MariaDB PAM v2 plugin which utilizes setuid-to-root binary "/usr/lib64/mariadb/plugin/auth_pam_tool_dir/auth_pam_tool".

Related: RHEL-119790 RHEL-119789
2025-10-30 07:53:37 +00:00
Fedora Release Engineering
d7927e7975 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 18:11:02 +00:00
Martin Osvald
94f4f1acd8 protocols: update to latest IANA
Resolves: rhbz#2366217
2025-05-14 17:44:20 +02:00
Mattias Ellert
1b24ffc033 Reserve 194:194 for xrootd (xrootd-server)
https://pagure.io/packaging-committee/issue/1444
2025-05-12 12:03:16 +02:00
Daan De Meyer
e342621812 Insist that the root and nobody groups have the expected GIDs
This mirrors the same change from 49bb7fe5f88fc35b8529d7d8dfcd4c151a9aaf1a
and 4ced52595f3e0367a0f2823be8b7acf6d7b7c2be in systemd. Instead of potentially
allocating random GIDs for the root and nobody groups, let's insist that these
have the expected GIDs.
2025-03-20 12:08:48 +01:00
Daan De Meyer
955d69eeb7 Add root and nobody groups
These were added to systemd's basic.conf in
4ced52595f3e0367a0f2823be8b7acf6d7b7c2be,
49bb7fe5f88fc35b8529d7d8dfcd4c151a9aaf1a and
9361a712f85860ead532dba1468dbd3deef00e34. Let's add them to the setup
package as well to ensure we match with systemd's expected user/group
layout.
2025-03-20 11:55:12 +01:00
Zbigniew Jędrzejewski-Szmek
b760dd5ee7 uidgidlint: make the script shellcheck-clean
[skip changelog]
2025-03-15 16:00:50 +01:00
Zbigniew Jędrzejewski-Szmek
cab8b065bd Fix uidgidlint invocation in %check
The test failed:
  + cd etc
  + bash /builddir/build/SOURCES/uidgidlint ./uidgid
  grep: ./uidgid: No such file or directory
  grep: ./uidgid: No such file or directory
but because pipefail wasn't set, the script iterated over empty input
and didn't actually test anything.

Set -o eu,pipefail to catch similar errors in the future and fix the
invocation so that the test passes.

[skip changelog]
2025-03-15 16:00:46 +01:00
Zbigniew Jędrzejewski-Szmek
8b6d293ac9 Restore uidgidlint that was dropped by mistake
This is a partial revert of 7ced36d60b
and a follow-up. I was in the middle of reworking the commit and
pushed the not-ready version to the upstream repo by mistake.

The passwd and group files that are now generated are dropped.

[skip changelog]
2025-03-15 16:00:38 +01:00
Zbigniew Jędrzejewski-Szmek
a7c198fb39 uidgid: drop various unused users and groups
I was trying to figure out what is the actual number of static allocations that
we use. I checked various names that didn't seem familiar, and indeed, many of
those packages have been long retired. For some names, I couldn't find any
reliable references, which means that most likely they stopped being used
sometime before the git era.
2025-03-15 06:38:45 +00:00
Zbigniew Jędrzejewski-Szmek
d7e5faeee1 uidgid: adjust comments
"can be freed" is strange, because apart from the comment, the ID is not
reserved in any way.
2025-03-15 06:38:45 +00:00
Zbigniew Jędrzejewski-Szmek
7ced36d60b Create passwd,group files from sysusers
This inverts the order of operations: previously, the passwd and group
files were the original source of information, and shadow and gpasswd
were created using sed, and sysusers fragments were generated using a
shell script.

There are a few problems with the previous approach:
- We had two sysusers files, one for groups and one for users. This
  split makes things more complicated. By default sysusers will create
  a group with the same name and number, if a user is defined without
  an explicit group override. This is what we want to do, to make the
  config shorter and easier to read.
- The rpm sysusers generator created two sets of 'Provides:group(…)'
  attributes.

In the new approach, we use the sysusers file as the "source of truth",
and run systemd-sysusers to generate passwd, group, shadow, and gshadow
files.

This has the following advantages:
- No code to maintain here.
- The config is easier to read.
- Toes a lint of the data. If a uid conflict was present, we'd
  get a warning.
- With the support for sysusers in rpm, when we install this package on
  a system, because of the Provides, rpm will create the users and groups
  using systemd-sysusers anyway. So by doing the same during the build,
  we match what rpm would do anyway, so we get a file that is closer to
  what will actually appear in the system.
- Since we now have a file generated by systemd-sysusers in the payload,
  we can see how things will actually look on the installed system.
  This allowed me to notice a bug in systemd packaging.
2025-03-14 17:57:55 +01:00
Zbigniew Jędrzejewski-Szmek
c9bb85dabb uidgid: make rtkit user dynamic
Also https://src.fedoraproject.org/rpms/rtkit/pull-request/5.
2025-03-14 15:07:52 +01:00
Martin Osvald
df5ba729d6 Removed uidgid pair 27:27 for MySQL/MariaDB 2025-03-10 11:12:42 +01:00
Zbigniew Jędrzejewski-Szmek
827730533e profile: do not add /usr/sbin to the path
On systems with merged-sbin, /usr/sbin is a symlink to /usr/bin
(https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin).

As reported in the Fedora Python channel,
python3 -c 'import sys; print(sys.executable)'
now returns /usr/sbin/python3 rather than /usr/bin/python3.
We don't want the symlinked directories in the $PATH at all.
2025-03-05 13:49:10 +01:00
Björn Esser
3ee2a7088b
Drop pre-allocation of users and groups, during %%post
This is handled by rpm during %%pre now.

See: https://pagure.io/fesco/issue/3318

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2025-02-10 11:37:33 +01:00
Miroslav Lichvar
69d504812b Add clock group for systemd 2025-01-22 14:58:39 +01:00
Fedora Release Engineering
03d0796999 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-19 10:28:46 +00:00
Björn Esser
690241b0e3
Ensure pre-allocated users, groups, and tmpfiles are created in %%post
Some packages within the same transaction (e.g. during system-upgrades) may
rely on having the pre-allocated system users and/or system groups provided
by the setup package already to be present when the dependee package gets
installed;  waiting for the %%transfiletriggerin to run `systemd-sysusers`
will be too late in such cases.

The above statement also applies for the temporary files from this package
to be created by running `systemd-tmpfiles`.

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2024-12-27 22:01:48 +01:00
Björn Esser
8f8f05bf0a Cleanup spec file and drop old sources
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2024-12-27 20:54:21 +00:00
Panu Matilainen
ec9da3703f Fix deprecation warnings on install/update
Use rpm.spawn() if available (in rpm >= 4.20) but fall back to
posix.fork() and friends if not to preserve upgrade path from
older versions.
2024-12-27 20:52:51 +00:00
Zbigniew Jędrzejewski-Szmek
d96f3846c1 Move yum/dnf protection removal config file under /usr
https://github.com/uapi-group/specifications/issues/76

Actually, add a new file under /usr, but keep the old file in /etc
because it's still needed for dnf. The new file in the new location
is useful because it means that we get the correct behaviour even when
/etc is emptied (on systems with new dnf version).

dnf5 reads the new location:
https://github.com/rpm-software-management/dnf5/issues/1107
https://github.com/rpm-software-management/dnf5/pull/1110
2024-09-24 16:39:03 +02:00
Fedora Release Engineering
ec5f3d4c9b Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-20 05:19:18 +00:00
David Bold
4eaba20dd7 Fix "upstream" URL 2024-06-07 08:55:45 +00:00
Zbigniew Jędrzejewski-Szmek
8d61c2e6f8 groups: add 'kvm'
It is also used by systemd for basic udev rules. I somehow missed it in
the previous addition.
2024-05-30 12:53:41 +02:00
Zbigniew Jędrzejewski-Szmek
8e709df8cd Whitespace and typo fix
I kept it out of the conversion commit to allow the converted results to
be trivially identical.
2024-05-27 14:32:47 +02:00
Zbigniew Jędrzejewski-Szmek
36eef7070f Merge upstream into downstream
This implements https://pagure.io/setup/issue/51.

The "upstream" is only used to build the package in our dist-git, so we can reduce the
total amount of work by moving files downstream and maintaining them there.

The package after the rebuild is identical, except for intentional changes
(removal of Group, updating of Url, bumping of the Version):

$ rpmdiff -iT noarch/setup-2.14.5-2.fc41.noarch.rpm noarch/setup-2.15.0-1.fc41.noarch.rpm
S.5.....    GROUP
S.5.....    URL
removed     REQUIRES config(setup) = 2.14.5-2.fc41
added       REQUIRES config(setup) = 2.15.0-1.fc41
removed     PROVIDES config(setup) = 2.14.5-2.fc41
removed     PROVIDES setup = 2.14.5-2.fc41
added       PROVIDES config(setup) = 2.15.0-1.fc41
added       PROVIDES setup = 2.15.0-1.fc41
2024-05-27 14:32:47 +02:00
Martin Osvald
052f9a49b3 New version 2.14.6
- Remove uidgid pair 77:77 for arpwatch
- Define all hardware groups that systemd needs via sysusers
- Switch to rpmautospec
2024-05-27 11:06:00 +02:00
Martin Osvald
fd0e99a00d Convert to %autorelease and %autochangelog
[skip changelog]
2024-05-27 10:24:33 +02:00
Fedora Release Engineering
c6f58b338b Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-27 02:42:55 +00:00
Martin Osvald
a1176da687 New version 2.14.5
bashrc: switch PROMPT_COMMAND to be an array (rhbz#2097525)
profile: don't overwrite the HISTSIZE environment variable
hosts: use "example.org" as example domain (rhbz#2246220)
csh.login: source csh.local (RHEL-17226)
2023-11-29 12:11:33 +01:00
Martin Osvald
65bee927e9 New version 2.14.4
protocols: add mptcp (262)
setup.spec: make setup protected package (rhbz#2155547)
setup.spec: don't report rpm -Va error on /run/motd (rhbz#2160954)
services: replace hostmon with llmnr for port 5355 (rhbz#2216914)
2023-07-26 13:02:01 +02:00
Fedora Release Engineering
0a04718db1 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-22 01:28:52 +00:00
Than Ngo
ae588bafde migrated to SPDX license 2023-02-21 17:55:40 +01:00
Fedora Release Engineering
3f933a14ef Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-21 03:04:02 +00:00
Martin Osvald
9174b59bde New version 2.14.3
sysusers.d: add script and generate configuration fragment for users
Add fallback to hostname determination for csh.login (rhbz#2079768)
Remove ancient Conflicts
files: mark /run/motd as an ephemeral ghost entry
2022-11-28 09:53:19 +01:00
Martin Osvald
ff8169d809 New version 2.14.2
sysusers.d: add script and configuration fragments for groups
passwd: align 'nologin' shell path with systemd defaults
uidgid: assign GID 101 for 'ssh_keys' group
uidgid: assign UID/GID 114 for 'polkitd'
passwd: update GECOS field for 'root' user
services: remove commas from aliases for ircu-3
setup.spec: throw away newaliases output again
2022-09-08 17:02:27 +02:00
Fedora Release Engineering
f900e00843 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 08:26:22 +00:00
Martin Osvald
f7c903eb2f New version 2.14.1
bashrc sets hardcoded umask (#1902166)
bashrc: clean up unused references to VTE
uidgid: simplify table format and other format enhancements
uidgid: fix news and lock entries, move basic groups to systemd
2022-07-20 10:04:44 +02:00
Zbigniew Jędrzejewski-Szmek
e72e5cf604 Fix %post scriptlet to not require the shell
os.execute uses /bin/sh, which to a large extent defeats the purpose of having
the scriptlet in lua ;)

$ strace -qq -ff -eexecve rpm -E "%{lua:os.execute('true')}"
execve("/usr/bin/rpm", ["rpm", "-E", "%{lua:os.execute('true')}"], 0x7ffd180ce638 /* 60 vars */) = 0
[pid 849466] execve("/bin/sh", ["sh", "-c", "true"], 0x7fff73cfc9d8 /* 60 vars */) = 0

Let's use posix.exec(). rpm.execute() would be nice, but it does not
support suppressing of stderr.
2022-05-27 16:38:25 +02:00
Martin Osvald
2490b95b86 New version 2.13.10
Move /var/log/lastlog ownership to systemd (#1798685)
tcsh sets variable p to /usr/sbin from /etc/csh.login (#2019874)
'history -a' doesn't belong in /etc/bashrc (#1871744)
localhost.localdomain in wrong order /etc/hosts (#1724539)
2022-05-08 10:18:18 +02:00
Fedora Release Engineering
6b17808bf0 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-22 00:44:21 +00:00
Fedora Release Engineering
1c776817bc - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 17:25:27 +00:00
Pavel Zhukov
42331c85b1 Bugfix release 2.13.9.1 2021-07-16 11:28:14 +02:00
Pavel Zhukov
fe5ddc3789 New version 2.13.9 2021-07-15 10:17:40 +02:00
Pavel Zhukov
bdb73fd816 New version v2.13.8 2021-03-11 09:39:39 +01:00
Fedora Release Engineering
4a9828b9ca - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 20:15:46 +00:00
Robert Scheck
dbcb31be60 Update source URL to HTTPS 2021-01-18 01:55:49 +00:00
Tom Stellard
302fcaa071 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2021-01-08 21:24:20 +00:00
Fedora Release Engineering
5a7ff0dc1f - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-29 10:35:37 +00:00