From 38ea8074cb61468eb25f6d3240158769126166df Mon Sep 17 00:00:00 2001 From: zhangyao Date: Tue, 14 Jan 2025 11:42:13 +0800 Subject: [PATCH] Adjust commands sequence (cherry picked from commit ed2e69cee2e1d1271a012e9f1faa614893ad0668) --- Adjust-commands-sequence.patch | 30 ++++++++++++++++++++++++++++++ setup.spec | 9 ++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 Adjust-commands-sequence.patch diff --git a/Adjust-commands-sequence.patch b/Adjust-commands-sequence.patch new file mode 100644 index 0000000..9616866 --- /dev/null +++ b/Adjust-commands-sequence.patch @@ -0,0 +1,30 @@ +From 197d01359b386165ac61aa26c25f8ccc12410152 Mon Sep 17 00:00:00 2001 +From: wx913462 +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." + + HISTSIZE=1000 + if [ "$HISTCONTROL" = "ignorespace" ] ; then +-- +2.27.0 + diff --git a/setup.spec b/setup.spec index 5d8aeef..ec344b9 100644 --- a/setup.spec +++ b/setup.spec @@ -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: Adjust-commands-sequence.patch BuildArch: noarch BuildRequires: systemd BuildRequires: bash tcsh perl-interpreter @@ -117,6 +118,12 @@ end %{_tmpfilesdir}/%{name}.conf %changelog +* Tue Jan 14 2025 zhangyao - 2.13.9.1-2 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Adjust commands sequence + * Tue Nov 30 2021 wangjie - 2.13.9.1-1 - Type:enhancement - ID:NA -- Gitee