uidgid:simplifytableformatbyproperlycommentinglines
This commit is contained in:
parent
1bbc9d92aa
commit
72476e07b5
@ -0,0 +1,61 @@
|
||||
From c2d8d46b12679490896a795111919d18c8faa089 Mon Sep 17 00:00:00 2001
|
||||
From: Luca BRUNO <luca.bruno@coreos.com>
|
||||
Date: Mon, 30 May 2022 09:41:18 +0000
|
||||
Subject: [PATCH] uidgid: simplify table format by properly commenting lines
|
||||
|
||||
This tweaks the `uidgid` table by commenting out some lines which
|
||||
do not actually hold any UID/GID.
|
||||
The goal is to have this data in a more structured format, in order
|
||||
to be more machine-friendly and easier to parse.
|
||||
---
|
||||
uidgid | 6 +++---
|
||||
uidgidlint | 8 ++++----
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/uidgid b/uidgid
|
||||
index 3396364..8381b88 100644
|
||||
--- a/uidgid
|
||||
+++ b/uidgid
|
||||
@@ -1,4 +1,4 @@
|
||||
-NAME UID GID HOME SHELL PACKAGES
|
||||
+#NAME UID GID HOME SHELL PACKAGES
|
||||
root 0 0 /root /bin/bash setup
|
||||
bin 1 1 /bin /sbin/nologin setup
|
||||
daemon 2 2 /sbin /sbin/nologin setup
|
||||
@@ -164,6 +164,6 @@ systemd-journal - 190 - - systemd
|
||||
#systemd-journal-gateway 191 191 / /sbin/nologin systemd #dynamic on new systems, removed Dec2014, can be freed if necessary later
|
||||
systemd-network 192 192 / /sbin/nologin systemd
|
||||
systemd-resolve 193 193 / /sbin/nologin systemd
|
||||
-gnats ? ? ? ? gnats, gnats-db
|
||||
-listar ? ? ? ? listar
|
||||
+#gnats ? ? ? ? gnats, gnats-db
|
||||
+#listar ? ? ? ? listar
|
||||
nobody 65534 65534 / /sbin/nologin setup
|
||||
diff --git a/uidgidlint b/uidgidlint
|
||||
index 9c88ab8..902f55e 100755
|
||||
--- a/uidgidlint
|
||||
+++ b/uidgidlint
|
||||
@@ -7,16 +7,16 @@ fi
|
||||
error=0
|
||||
# The format of the file is (currently)
|
||||
for infile in "$@" ; do
|
||||
- uidlist=`tail -n +2 "$infile" | awk '{print $2}' | grep -v '?' | grep -v -e - | sort -nu`
|
||||
- gidlist=`tail -n +2 "$infile" | awk '{print $3}' | grep -v '?' | grep -v -e - | sort -nu`
|
||||
+ 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 `tail -n +2 "$infile" | awk '{print $2}' | grep '^'"$uid"'$' | wc -l` -ne 1 ; then
|
||||
+ 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 `tail -n +2 "$infile" | awk '{print $3}' | grep '^'"$gid"'$' | wc -l` -ne 1 ; then
|
||||
+ if test `grep -v '^#' "$infile" | awk '{print $3}' | grep '^'"$gid"'$' | wc -l` -ne 1 ; then
|
||||
echo Duplicate GID: $gid
|
||||
error=1
|
||||
fi
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@ -1,13 +1,14 @@
|
||||
Summary: A set of system configuration and setup files
|
||||
Name: setup
|
||||
Version: 2.13.9.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: Public Domain
|
||||
Group: System Environment/Base
|
||||
URL: https://pagure.io/setup/
|
||||
Source0: http://releases.pagure.org/%{name}/%{name}-%{version}.tar.bz2
|
||||
Patch0: support-filesystems-xfs.patch
|
||||
Patch1: source-cshlocal-when-login.patch
|
||||
Patch2: backport-uidgid-simplify-table-format-by-properly-commenting.patch
|
||||
BuildArch: noarch
|
||||
BuildRequires: systemd
|
||||
BuildRequires: bash tcsh perl-interpreter
|
||||
@ -117,6 +118,9 @@ end
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
|
||||
%changelog
|
||||
* Mon Oct 24 2022 hongjinghao <hongjinghao@huawei.com> - 2.13.9.1-2
|
||||
- uidgid:simplify table format by properly commenting lines
|
||||
|
||||
* Tue Feb 8 2022 yangzhuangzhuang <yangzhuangzhuang1@h-partners.com> - 2.13.9.1-1
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user