Compare commits
11 Commits
ae6c051387
...
cda7d4b3be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cda7d4b3be | ||
|
|
8bc3ba5c85 | ||
|
|
81eeeabdc5 | ||
|
|
b84672d940 | ||
|
|
82cc1df725 | ||
|
|
d08314cd78 | ||
|
|
2fc387ac3e | ||
|
|
542c59c02a | ||
|
|
3fbaa0ae69 | ||
|
|
7edb8c6522 | ||
|
|
9461af449d |
30
Adjust-commands-sequence.patch
Normal file
30
Adjust-commands-sequence.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 197d01359b386165ac61aa26c25f8ccc12410152 Mon Sep 17 00:00:00 2001
|
||||||
|
From: wx913462 <wangchen137@h-partners.com>
|
||||||
|
Date: Mon, 25 Apr 2022 09:29:41 +0800
|
||||||
|
Subject: [PATCH] Adjust commands sequence
|
||||||
|
|
||||||
|
Prefer hostname and uname commands to avoid time consuming in
|
||||||
|
hostnamectl.
|
||||||
|
---
|
||||||
|
profile | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/profile b/profile
|
||||||
|
index 542add4..5a3ec3c 100644
|
||||||
|
--- a/profile
|
||||||
|
+++ b/profile
|
||||||
|
@@ -42,9 +42,9 @@ else
|
||||||
|
pathmunge /usr/sbin after
|
||||||
|
fi
|
||||||
|
|
||||||
|
-HOSTNAME=$(/usr/bin/hostnamectl --transient 2>/dev/null) || \
|
||||||
|
HOSTNAME=$(/usr/bin/hostname 2>/dev/null) || \
|
||||||
|
-HOSTNAME=$(/usr/bin/uname -n)
|
||||||
|
+HOSTNAME=$(/usr/bin/uname -n 2>/dev/null) || \
|
||||||
|
+HOSTNAME=$(/usr/bin/hostnamectl --transient 2>/dev/null) || echo "System commands: hostname uname and hostnamectl, which do not exist."
|
||||||
|
|
||||||
|
if [ -z "$HISTSIZE" ] ; then
|
||||||
|
HISTSIZE=1000
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
58
Delete-the-users-and-groups-declared-in-systemd.patch
Normal file
58
Delete-the-users-and-groups-declared-in-systemd.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
From 3221c8c3231de69b5e2db400f3b7bcaf6a918bb3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: hongjinghao <hongjinghao@huawei.com>
|
||||||
|
Date: Sat, 11 May 2024 14:55:47 +0800
|
||||||
|
Subject: [PATCH] Delete the users and groups declared in systemd.
|
||||||
|
These users/groups have already been declared in systemd basic.conf, if we also declare them here, systemd-sysusers will report warnings.
|
||||||
|
https://gitee.com/src-openeuler/setup/pulls/30/
|
||||||
|
|
||||||
|
---
|
||||||
|
sysusers.d/20-setup-groups.conf | 14 --------------
|
||||||
|
sysusers.d/20-setup-users.conf | 2 --
|
||||||
|
2 files changed, 16 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/sysusers.d/20-setup-groups.conf b/sysusers.d/20-setup-groups.conf
|
||||||
|
index d69ff91..867f107 100644
|
||||||
|
--- a/sysusers.d/20-setup-groups.conf
|
||||||
|
+++ b/sysusers.d/20-setup-groups.conf
|
||||||
|
@@ -1,24 +1,10 @@
|
||||||
|
-g root 0
|
||||||
|
g bin 1
|
||||||
|
g daemon 2
|
||||||
|
g sys 3
|
||||||
|
-g adm 4
|
||||||
|
-g tty 5
|
||||||
|
-g disk 6
|
||||||
|
-g lp 7
|
||||||
|
g mem 8
|
||||||
|
-g kmem 9
|
||||||
|
-g wheel 10
|
||||||
|
-g cdrom 11
|
||||||
|
g mail 12
|
||||||
|
g man 15
|
||||||
|
-g dialout 18
|
||||||
|
g floppy 19
|
||||||
|
g games 20
|
||||||
|
-g tape 33
|
||||||
|
-g video 39
|
||||||
|
g ftp 50
|
||||||
|
g lock 54
|
||||||
|
-g audio 63
|
||||||
|
-g users 100
|
||||||
|
-g nobody 65534
|
||||||
|
diff --git a/sysusers.d/20-setup-users.conf b/sysusers.d/20-setup-users.conf
|
||||||
|
index bea0ab3..7d197c4 100644
|
||||||
|
--- a/sysusers.d/20-setup-users.conf
|
||||||
|
+++ b/sysusers.d/20-setup-users.conf
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-u root 0:0 "Super User" /root /bin/bash
|
||||||
|
u bin 1:1 "bin" /bin -
|
||||||
|
u daemon 2:2 "daemon" /sbin -
|
||||||
|
u adm 3:4 "adm" /var/adm -
|
||||||
|
@@ -10,4 +9,3 @@ u mail 8:12 "mail" /var/spool/mail -
|
||||||
|
u operator 11:0 "operator" /root -
|
||||||
|
u games 12:100 "games" /usr/games -
|
||||||
|
u ftp 14:50 "FTP User" /var/ftp -
|
||||||
|
-u nobody 65534:65534 "Kernel Overflow User" - -
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
From 6a99b637893db19b8ec8279ee51ae9887ccb2a98 Mon Sep 17 00:00:00 2001
|
|
||||||
From: rpm-build <rpm-build>
|
|
||||||
Date: Thu, 8 Jun 2023 11:20:24 +0800
|
|
||||||
Subject: [PATCH] set TMOUT=300 and set default umask
|
|
||||||
|
|
||||||
---
|
|
||||||
bashrc | 2 ++
|
|
||||||
profile | 1 +
|
|
||||||
2 files changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/bashrc b/bashrc
|
|
||||||
index a4021d9..d7fec78 100644
|
|
||||||
--- a/bashrc
|
|
||||||
+++ b/bashrc
|
|
||||||
@@ -86,3 +86,5 @@ if [ -z "$BASHRCSOURCED" ]; then
|
|
||||||
|
|
||||||
fi
|
|
||||||
# vim:ts=4:sw=4
|
|
||||||
+
|
|
||||||
+umask 0077
|
|
||||||
diff --git a/profile b/profile
|
|
||||||
index 542add4..8f086af 100644
|
|
||||||
--- a/profile
|
|
||||||
+++ b/profile
|
|
||||||
@@ -80,3 +80,4 @@ then
|
|
||||||
. /etc/bashrc
|
|
||||||
fi
|
|
||||||
|
|
||||||
+export TMOUT=300
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
setup-2.14.5.tar.bz2
Normal file
BIN
setup-2.14.5.tar.bz2
Normal file
Binary file not shown.
38
setup.spec
38
setup.spec
@ -1,14 +1,14 @@
|
|||||||
Summary: A set of system configuration and setup files
|
Summary: A set of system configuration and setup files
|
||||||
Name: setup
|
Name: setup
|
||||||
Version: 2.14.3
|
Version: 2.14.5
|
||||||
Release: 2
|
Release: 3
|
||||||
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: Delete-the-users-and-groups-declared-in-systemd.patch
|
||||||
Patch2: set-TMOUT-300-and-set-default-umask.patch
|
Patch2: Adjust-commands-sequence.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
BuildRequires: bash tcsh perl-interpreter
|
BuildRequires: bash tcsh perl-interpreter
|
||||||
@ -23,6 +23,8 @@ setup files, such as passwd, group, and profile.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -p1
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
# https://gitee.com/src-openeuler/setup/pulls/30/
|
||||||
|
#./generate-sysusers-fragments.sh
|
||||||
./shadowconvert.sh
|
./shadowconvert.sh
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -36,6 +38,8 @@ rm -rf %{buildroot}
|
|||||||
mkdir -p %{buildroot}/etc/profile.d
|
mkdir -p %{buildroot}/etc/profile.d
|
||||||
mkdir -p %{buildroot}/etc/motd.d
|
mkdir -p %{buildroot}/etc/motd.d
|
||||||
cp -ar * %{buildroot}/etc
|
cp -ar * %{buildroot}/etc
|
||||||
|
mkdir -p %(dirname %{buildroot}%{_sysusersdir})
|
||||||
|
mv %{buildroot}/etc/sysusers.d %{buildroot}%{_sysusersdir}
|
||||||
mv %{buildroot}/etc/lang* %{buildroot}/etc/profile.d/
|
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
|
||||||
@ -60,10 +64,18 @@ chmod 0644 %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|||||||
rm -f %{buildroot}/etc/Makefile
|
rm -f %{buildroot}/etc/Makefile
|
||||||
rm -f %{buildroot}/etc/serviceslint
|
rm -f %{buildroot}/etc/serviceslint
|
||||||
rm -f %{buildroot}/etc/uidgidlint
|
rm -f %{buildroot}/etc/uidgidlint
|
||||||
|
rm -f %{buildroot}/etc/generate-sysusers-fragments.sh
|
||||||
rm -f %{buildroot}/etc/shadowconvert.sh
|
rm -f %{buildroot}/etc/shadowconvert.sh
|
||||||
rm -f %{buildroot}/etc/setup.spec
|
rm -f %{buildroot}/etc/setup.spec
|
||||||
rm -rf %{buildroot}/etc/contrib
|
rm -rf %{buildroot}/etc/contrib
|
||||||
|
|
||||||
|
# make setup a protected package
|
||||||
|
install -p -d -m 755 %{buildroot}/etc/dnf/protected.d/
|
||||||
|
touch %{name}.conf
|
||||||
|
echo setup > %{name}.conf
|
||||||
|
install -p -c -m 0644 %{name}.conf %{buildroot}/etc/dnf/protected.d/
|
||||||
|
rm -f %{name}.conf
|
||||||
|
|
||||||
#throw away useless and dangerous update stuff until rpm will be able to
|
#throw away useless and dangerous update stuff until rpm will be able to
|
||||||
#handle it ( http://rpm.org/ticket/6 )
|
#handle it ( http://rpm.org/ticket/6 )
|
||||||
%post -p <lua>
|
%post -p <lua>
|
||||||
@ -118,8 +130,26 @@ end
|
|||||||
%config(noreplace) %verify(not md5 size mtime) /etc/shells
|
%config(noreplace) %verify(not md5 size mtime) /etc/shells
|
||||||
%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
|
||||||
|
%{_sysusersdir}/20-setup-groups.conf
|
||||||
|
%{_sysusersdir}/20-setup-users.conf
|
||||||
|
/etc/dnf/protected.d/%{name}.conf
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 6 2025 hugel <gengqihu2@h-partners.com> - 2.14.5-3
|
||||||
|
- Adjust commands sequence
|
||||||
|
|
||||||
|
* Sat May 11 2024 hongjinghao <hongjinghao@huawei.com> - 2.14.5-2
|
||||||
|
- Delete the users and groups which is declared in systemd.
|
||||||
|
|
||||||
|
* Wed Jan 31 2024 hongjinghao <hongjinghao@huawei.com> - 2.14.5-1
|
||||||
|
- update to 2.14.5
|
||||||
|
|
||||||
|
* Tue Aug 29 2023 hongjinghao <hongjinghao@huawei.com> - 2.14.3-4
|
||||||
|
- Revert "set TMOUT=300"
|
||||||
|
|
||||||
|
* Fri Jun 9 2023 hongjinghao <hongjinghao@huawei.com> - 2.14.3-3
|
||||||
|
- Revert "set default umask"
|
||||||
|
|
||||||
* Thu Jun 8 2023 hongjinghao <hongjinghao@huawei.com> - 2.14.3-2
|
* Thu Jun 8 2023 hongjinghao <hongjinghao@huawei.com> - 2.14.3-2
|
||||||
- set TMOUT=300 and set default umask
|
- set TMOUT=300 and set default umask
|
||||||
|
|
||||||
|
|||||||
@ -1,13 +0,0 @@
|
|||||||
diff --git a/csh.login b/csh.login
|
|
||||||
index 51902e8..b6ef2e8 100644
|
|
||||||
--- a/csh.login
|
|
||||||
+++ b/csh.login
|
|
||||||
@@ -22,7 +22,7 @@ set history=1000
|
|
||||||
|
|
||||||
if ( -d /etc/profile.d ) then
|
|
||||||
set nonomatch
|
|
||||||
- foreach i ( /etc/profile.d/*.csh )
|
|
||||||
+ foreach i ( /etc/profile.d/*.csh /etc/profile.d/csh.local )
|
|
||||||
if ( -r "$i" ) then
|
|
||||||
if ($?prompt) then
|
|
||||||
source "$i"
|
|
||||||
Loading…
x
Reference in New Issue
Block a user