diff --git a/Adjust-commands-sequence.patch b/Adjust-commands-sequence.patch new file mode 100644 index 0000000000000000000000000000000000000000..deaa061360ac7449cdd112c9dc205169f2cc36c2 --- /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." + + if [ -z "$HISTSIZE" ] ; then + HISTSIZE=1000 +-- +2.27.0 + diff --git a/setup.spec b/setup.spec index ff91019206194637840496295d0605f752eb11de..b33387ed46802031591de6ff8723e3e8ab2fddea 100644 --- a/setup.spec +++ b/setup.spec @@ -1,13 +1,14 @@ Summary: A set of system configuration and setup files Name: setup Version: 2.14.6 -Release: 1 +Release: 2 License: Public Domain Group: System Environment/Base URL: https://pagure.io/setup/ Source0: http://releases.pagure.org/%{name}/%{name}-%{name}-%{version}.tar.gz Patch0: support-filesystems-xfs.patch Patch1: Delete-the-users-and-groups-declared-in-systemd.patch +Patch2: Adjust-commands-sequence.patch BuildArch: noarch BuildRequires: systemd BuildRequires: bash tcsh perl-interpreter @@ -134,6 +135,9 @@ end /etc/dnf/protected.d/%{name}.conf %changelog +* Thu Feb 6 2025 hugel - 2.14.6-2 +- Adjust commands sequence + * Mon Aug 26 2024 dillon chen - 2.14.6-1 - update to 2.14.6