update to 2.14.3

This commit is contained in:
hongjinghao 2023-01-29 11:30:08 +08:00
parent 72476e07b5
commit a8044bed9b
4 changed files with 13 additions and 70 deletions

View File

@ -1,61 +0,0 @@
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

Binary file not shown.

BIN
setup-2.14.3.tar.bz2 Normal file

Binary file not shown.

View File

@ -1,14 +1,13 @@
Summary: A set of system configuration and setup files Summary: A set of system configuration and setup files
Name: setup Name: setup
Version: 2.13.9.1 Version: 2.14.3
Release: 2 Release: 1
License: Public Domain License: Public Domain
Group: System Environment/Base Group: System Environment/Base
URL: https://pagure.io/setup/ URL: https://pagure.io/setup/
Source0: http://releases.pagure.org/%{name}/%{name}-%{version}.tar.bz2 Source0: http://releases.pagure.org/%{name}/%{name}-%{version}.tar.bz2
Patch0: support-filesystems-xfs.patch Patch0: support-filesystems-xfs.patch
Patch1: source-cshlocal-when-login.patch Patch1: source-cshlocal-when-login.patch
Patch2: backport-uidgid-simplify-table-format-by-properly-commenting.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: systemd BuildRequires: systemd
BuildRequires: bash tcsh perl-interpreter BuildRequires: bash tcsh perl-interpreter
@ -40,13 +39,10 @@ mv %{buildroot}/etc/lang* %{buildroot}/etc/profile.d/
rm -f %{buildroot}/etc/uidgid rm -f %{buildroot}/etc/uidgid
rm -f %{buildroot}/etc/COPYING rm -f %{buildroot}/etc/COPYING
mkdir -p %{buildroot}/var/log mkdir -p %{buildroot}/var/log
touch %{buildroot}/var/log/lastlog
touch %{buildroot}/etc/environment touch %{buildroot}/etc/environment
chmod 0644 %{buildroot}/etc/environment chmod 0644 %{buildroot}/etc/environment
chmod 0400 %{buildroot}/etc/{shadow,gshadow} chmod 0400 %{buildroot}/etc/{shadow,gshadow}
chmod 0644 %{buildroot}/var/log/lastlog
touch %{buildroot}/etc/fstab touch %{buildroot}/etc/fstab
mkdir -p %{buildroot}/etc/profile.d
echo "#Add any required envvar overrides to this file, it is sourced from /etc/profile" >%{buildroot}/etc/profile.d/sh.local echo "#Add any required envvar overrides to this file, it is sourced from /etc/profile" >%{buildroot}/etc/profile.d/sh.local
echo "#Add any required envvar overrides to this file, is sourced from /etc/csh.login" >%{buildroot}/etc/profile.d/csh.local echo "#Add any required envvar overrides to this file, is sourced from /etc/csh.login" >%{buildroot}/etc/profile.d/csh.local
mkdir -p %{buildroot}/run/motd.d mkdir -p %{buildroot}/run/motd.d
@ -71,10 +67,16 @@ rm -rf %{buildroot}/etc/contrib
#handle it ( http://rpm.org/ticket/6 ) #handle it ( http://rpm.org/ticket/6 )
%post -p <lua> %post -p <lua>
for i, name in ipairs({"passwd", "shadow", "group", "gshadow"}) do for i, name in ipairs({"passwd", "shadow", "group", "gshadow"}) do
os.remove("/etc/"..name..".rpmnew") os.remove("/etc/"..name..".rpmnew")
end end
if posix.access("/usr/bin/newaliases", "x") then if posix.access("/usr/bin/newaliases", "x") then
os.execute("/usr/bin/newaliases >/dev/null") local pid = posix.fork()
if pid == 0 then
posix.redirect2null(1)
posix.exec("/usr/bin/newaliases")
elseif pid > 0 then
posix.wait(pid)
end
end end
%files %files
@ -113,11 +115,13 @@ end
%config(noreplace) /etc/profile.d/csh.local %config(noreplace) /etc/profile.d/csh.local
/etc/profile.d/lang.{sh,csh} /etc/profile.d/lang.{sh,csh}
%config(noreplace) %verify(not md5 size mtime) /etc/shells %config(noreplace) %verify(not md5 size mtime) /etc/shells
%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/fstab %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/fstab
%{_tmpfilesdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf
%changelog %changelog
* Sun Jan 29 2023 hongjinghao <hongjinghao@huawei.com> - 2.14.3-1
- update to 2.14.3
* Mon Oct 24 2022 hongjinghao <hongjinghao@huawei.com> - 2.13.9.1-2 * Mon Oct 24 2022 hongjinghao <hongjinghao@huawei.com> - 2.13.9.1-2
- uidgid:simplify table format by properly commenting lines - uidgid:simplify table format by properly commenting lines