Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-28 Thread Florian Festi
> There's also the missing case for the `root` user, as the default shell for > UID 0 is defined to be `/bin/sh` and homedir `/root`. Not sure if we need / want a special case for root here. In my head it is the responsibility of the distribution to create the root user (and all other default s

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-28 Thread Florian Festi
@ffesti commented on this pull request. > + +hasgroup() { + grep "^${1}:" "$ROOT"/etc/group >/dev/null +} + +user() { + local user="$1" + local uid="$2" + local desc="$3" + local group="$4" + local home="$5" + local shell="$6" + + [ "$desc" = '-' ]

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-26 Thread Neal Gompa
There's also the missing case for the `root` user, as the default shell for UID 0 is defined to be `/bin/sh`. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2573#issuecomment-1651811249 You are receiving this because you are subscribed t

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-26 Thread Neal Gompa
@Conan-Kudo commented on this pull request. > + +hasgroup() { + grep "^${1}:" "$ROOT"/etc/group >/dev/null +} + +user() { + local user="$1" + local uid="$2" + local desc="$3" + local group="$4" + local home="$5" + local shell="$6" + + [ "$desc" = '

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-26 Thread Florian Festi
Merged #2573 into master. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2573#event-9922341090 You are receiving this because you are subscribed to this thread. Message ID: ___ Rpm-maint maili

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-26 Thread Florian Festi
@ffesti pushed 1 commit. cd750adc7f7d4be4e1ac173631c07fdb2e5f9757 Replace systemd-sysusers by new sysusers.sh script -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2573/files/47a20f64e82eacdf91679a356de038208d487b86..cd750adc7f7d4be4e1ac173631c07fdb2e5f9757 You are r

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-26 Thread Michal Domonkos
@dmnks approved this pull request. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2573#pullrequestreview-1547356492 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-26 Thread Michal Domonkos
Other than the above, the PR looks sane, nice work! -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2573#issuecomment-1651444355 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-26 Thread Michal Domonkos
Now that the script has the `bash` shebang, shouldn't we make use of `local` and declare the function-local variables as such? Currently, they are all redefined on entry and not used outside of the functions, but if we change something in the script in the future and forget about it... -- Repl

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-26 Thread Florian Festi
@ffesti pushed 1 commit. 36cbc08980d643614e646eb39542aeacf1afdb5e Add --help and description -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2573/files/c69b996901e5d62f8d49d72b46dc651115c581a8..36cbc08980d643614e646eb39542aeacf1afdb5e You are receiving this because you

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-26 Thread Florian Festi
Ok, all shellcheck warnings gone and test suite is passing. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2573#issuecomment-1651159358 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-26 Thread Florian Festi
@ffesti pushed 1 commit. c69b996901e5d62f8d49d72b46dc651115c581a8 Replace eval with mapfile and xargs -- View it on GitHub: https://github.com/rpm-software-management/rpm/pull/2573/files/df7df2c046d6a26c2494b12bea89bb9b5d7916b3..c69b996901e5d62f8d49d72b46dc651115c581a8 You are receiving this be

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-25 Thread Florian Festi
OK, there is only one warning left caused by the `eval` line. Let me see if we can get rid of that, too. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2573#issuecomment-1651069702 You are receiving this because you are subscribed to thi

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-25 Thread Florian Festi
@ffesti pushed 6 commits. d99cfdbc10ed5b56eaac54704a3b91631086061d Add sysusers.sh script 05328c5d35b79f24016fd945e4b264badc16caf4 Replace getent with grep d020c8b082b29d02d9abd4e9fdd1176ed9e8c700 Implement --replace 16690d145b086e197c44d2c95c3b3d3c295d9527 Add test case for skipping user cre

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-25 Thread Michal Domonkos
FYI, the test-suite PR #2559 has been merged so you can rebase now. -- Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/2573#issuecomment-1650300905 You are receiving this because you are subscribed to this thread. Message ID: ___

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-25 Thread Florian Festi
@ffesti commented on this pull request. > @@ -0,0 +1,150 @@ +#!/bin/sh OK, there are just too many bash'isms to run this as a `/bin/sh` script. Changing the interpreter fixes most of that. Will push a patch for everything else soon. -- Reply to this email directly or view it on GitHub: http

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-25 Thread Florian Festi
@ffesti commented on this pull request. > +[ -e "$ROOT"/etc/passwd ] || touch "$ROOT"/etc/passwd +[ -e "$ROOT"/etc/shadow ] || touch "$ROOT"/etc/shadow +[ -e "$ROOT"/etc/group ] || touch "$ROOT"/etc/group While I agree `useradd` and `groupadd` just won't work. And we want rpm -q --root to just

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-25 Thread Zbigniew Jędrzejewski-Szmek
@keszybz commented on this pull request. > + if [ "-" = "$fn" ]; then + parse <&0 + else + [ -r "$fn" ] || continue + parse <"$fn" Indentation is strange, also in other places. > +[ -e "$ROOT"/etc/passwd ] || touch "$ROOT"/etc/passwd +[ -e "$ROOT"

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-18 Thread Florian Festi
@ffesti pushed 4 commits. 0dd67944506a2cf62db7df74d8ff0471128930f9 Add sysusers.sh script d173792ee2cddafa6ca729e02f41172970324989 Replace getent with grep 8424b3a0351181302163334064e6d8ed084277e9 Implement --replace 7b1600e2449421bbce1f1fdb76857c5d5d2d7dd9 Add test case for skipping user cre

Re: [Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-14 Thread Florian Festi
This branch is missing the patch for adding groupadd and useradd to the test suite but even with that `groupadd` fails due to not being able to access some security/SElinux stuff like `/proc/thread-self/attr/fscreate` and `/sys/fs/selinux/enforce`. Nothing we want to fix in a test suite that's g

[Rpm-maint] [rpm-software-management/rpm] Add sysusers.sh script to replace systemd-sysusers (PR #2573)

2023-07-14 Thread Florian Festi
for user and group generation. This is currently failing in the test suite but works fine when rebased onto #2559 Still needs --replace to be implemented You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/2573 -- Commit Summar