> 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
@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" = '-' ]
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
@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" = '
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
@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
@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: ___
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: ___
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
@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
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: ___
@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
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
@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
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: ___
@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
@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
@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"
@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
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
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
21 matches
Mail list logo