public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/setup] update_services: Restore uidgidlint that was dropped by mistake
@ 2026-06-22 15:56 
  0 siblings, 0 replies; only message in thread
From:  @ 2026-06-22 15:56 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/setup
            Branch : update_services
            Commit : 8b6d293ac93a43c145874633c28d7f66492f0d21
            Author : Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
            Date   : 2025-03-15T16:00:38+01:00
            Stats  : +27/-43 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/setup/c/8b6d293ac93a43c145874633c28d7f66492f0d21?branch=update_services

            Log:
            Restore uidgidlint that was dropped by mistake

This is a partial revert of 7ced36d60b67c9e74f7951123225200597e3d2fa
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]

---
diff --git a/group b/group
deleted file mode 100644
index 20b7056..0000000
--- a/group
+++ /dev/null
@@ -1,30 +0,0 @@
-root:x:0:
-bin:x:1:
-daemon:x:2:
-sys:x:3:
-adm:x:4:
-tty:x:5:
-disk:x:6:
-lp:x:7:
-mem:x:8:
-kmem:x:9:
-wheel:x:10:
-cdrom:x:11:
-mail:x:12:
-man:x:15:
-dialout:x:18:
-floppy:x:19:
-games:x:20:
-utmp:x:22:
-tape:x:33:
-kvm:x:36:
-video:x:39:
-ftp:x:50:
-lock:x:54:
-audio:x:63:
-users:x:100:
-clock:x:103:
-input:x:104:
-render:x:105:
-sgx:x:106:
-nobody:x:65534:

diff --git a/passwd b/passwd
deleted file mode 100644
index 14316c5..0000000
--- a/passwd
+++ /dev/null
@@ -1,13 +0,0 @@
-root:x:0:0:Super User:/root:/bin/bash
-bin:x:1:1:bin:/bin:/usr/sbin/nologin
-daemon:x:2:2:daemon:/sbin:/usr/sbin/nologin
-adm:x:3:4:adm:/var/adm:/usr/sbin/nologin
-lp:x:4:7:lp:/var/spool/lpd:/usr/sbin/nologin
-sync:x:5:0:sync:/sbin:/bin/sync
-shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
-halt:x:7:0:halt:/sbin:/sbin/halt
-mail:x:8:12:mail:/var/spool/mail:/usr/sbin/nologin
-operator:x:11:0:operator:/root:/usr/sbin/nologin
-games:x:12:100:games:/usr/games:/usr/sbin/nologin
-ftp:x:14:50:FTP User:/var/ftp:/usr/sbin/nologin
-nobody:x:65534:65534:Kernel Overflow User:/:/usr/sbin/nologin

diff --git a/setup.spec b/setup.spec
index 83e6d62..9d7688f 100644
--- a/setup.spec
+++ b/setup.spec
@@ -28,6 +28,7 @@ Source0022: lang.sh
 Source0031: COPYING
 Source0032: uidgid
 Source0033: setup.sysusers.conf
+Source0034: uidgidlint
 Source0035: serviceslint
 
 BuildArch: noarch
@@ -65,6 +66,7 @@ bash -n etc/bashrc
 bash -n etc/profile
 tcsh -f etc/csh.cshrc
 tcsh -f etc/csh.login
+(cd etc && bash %SOURCE34 ./uidgid)
 (cd etc && perl %SOURCE35 ./services)
 
 %install

diff --git a/uidgidlint b/uidgidlint
new file mode 100755
index 0000000..902f55e
--- /dev/null
+++ b/uidgidlint
@@ -0,0 +1,25 @@
+#!/bin/sh
+# We need a file to look at.
+if [ -z "$*" ] ; then
+	echo Usage: `basename $0` uidgid
+	exit 1
+fi
+error=0
+# The format of the file is (currently)
+for infile in "$@" ; do
+	uidlist=`grep -v '^#' "$infile" | awk '{print $2}' | grep -v -e - | sort -nu`
+	gidlist=`grep -v '^#' "$infile" | awk '{print $3}' | grep -v -e - | sort -nu`
+	for uid in $uidlist ; do
+		if test `grep -v '^#' "$infile" | awk '{print $2}' | grep '^'"$uid"'$' | wc -l` -ne 1 ; then
+			echo Duplicate UID: $uid
+			error=1
+		fi
+	done
+	for gid in $gidlist ; do
+		if test `grep -v '^#' "$infile" | awk '{print $3}' | grep '^'"$gid"'$' | wc -l` -ne 1 ; then
+			echo Duplicate GID: $gid
+			error=1
+		fi
+	done
+done
+exit $error

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-22 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-22 15:56 [rpms/setup] update_services: Restore uidgidlint that was dropped by mistake 

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox