From b54d0eea7e0bea2febc6a7a4a8533471d52fbd2c Mon Sep 17 00:00:00 2001 From: gitee_cmd Date: Thu, 30 Dec 2021 12:45:42 +0000 Subject: [PATCH 1/3] update generic-release.spec. --- generic-release.spec | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/generic-release.spec b/generic-release.spec index 747bef2..b3e2ef0 100644 --- a/generic-release.spec +++ b/generic-release.spec @@ -35,7 +35,7 @@ Source7: dot-tcshrc Source8: dot-cshrc BuildRequires: python -Requires: %{product_family}-repos +Requires: %{product_family}-repos %{product_family}-release-custom Obsoletes: yum-utils yum-utils-help yum-utils-plugins %description @@ -58,9 +58,32 @@ The rootfiles package contains basic required files that are placed in the root user's account. These files are basically the same as those in /etc/skel, which are placed in regular users' home directories. +%package -n %{product_family}-release-custom +Requires: bash util-linux + %prep %setup -q -n generic-release-%{builtin_release_version} +%posttrans -n %{product_family}-release-custom + +%ifarch aarch64 + array="rd.shell=0 fpi_to_tail=off" +%else + array="rd.shell=0 fpi_to_tail=off"KAO +%endif + +if [ ! -z "`lscpu | grep "FT 2500"`" ]; then + cmdline=`grep GRUB_CMDLINE_LINUX= /etc/default/grub | awk -F\" '{print $2}'` + for var in ${array[@]} + do + echo ${cmdline} | grep -q -w "${var}" + if [ $? -ne 0 ]; then + cmdline+=" ${var}" + fi + done + sed -i "s#GRUB_CMDLINE_LINUX=.*#GRUB_CMDLINE_LINUX=\"${cmdline}\"#g" /etc/default/grub +fi + %build echo OK -- Gitee From 6920152cdcad9d3252ab07495d5e5f4a25f570c8 Mon Sep 17 00:00:00 2001 From: gitee_cmd Date: Thu, 30 Dec 2021 14:17:01 +0000 Subject: [PATCH 2/3] update generic-release.spec. --- generic-release.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generic-release.spec b/generic-release.spec index b3e2ef0..4728c5b 100644 --- a/generic-release.spec +++ b/generic-release.spec @@ -72,7 +72,10 @@ Requires: bash util-linux array="rd.shell=0 fpi_to_tail=off"KAO %endif -if [ ! -z "`lscpu | grep "FT 2500"`" ]; then +vendorid=`lscpu | grep "Vendor ID:" | awk '{print $3}'` +model=`lscpu | grep "Model:" | awk '{print $2}'` + +if [ "0x70" == "${vendorid}" -a "3" == "${model}" ]; then cmdline=`grep GRUB_CMDLINE_LINUX= /etc/default/grub | awk -F\" '{print $2}'` for var in ${array[@]} do -- Gitee From 320e1980924520bae3e18250a5eb6380da36527c Mon Sep 17 00:00:00 2001 From: gitee_cmd Date: Thu, 30 Dec 2021 16:18:40 +0000 Subject: [PATCH 3/3] update generic-release.spec. --- generic-release.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/generic-release.spec b/generic-release.spec index 4728c5b..31ff060 100644 --- a/generic-release.spec +++ b/generic-release.spec @@ -35,7 +35,8 @@ Source7: dot-tcshrc Source8: dot-cshrc BuildRequires: python -Requires: %{product_family}-repos %{product_family}-release-custom +Requires: %{product_family}-repos +Requires: %{product_family}-release-custom Obsoletes: yum-utils yum-utils-help yum-utils-plugins %description @@ -59,8 +60,13 @@ in the root user's account. These files are basically the same as those in /etc/skel, which are placed in regular users' home directories. %package -n %{product_family}-release-custom +Summary: openeuler-release-custom +BuildArch: noarch Requires: bash util-linux +%description -n %{product_family}-release-custom +openeuler-release-custom + %prep %setup -q -n generic-release-%{builtin_release_version} @@ -195,7 +201,12 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) /root/.tcshrc %config(noreplace) /root/.cshrc +%files -n %{product_family}-release-custom + %changelog +* Tue Dec 30 2021 chemingdao - 1.0-48 +- init openeuler custom + * Tue Dec 21 2021 gaochong - 1.0-47 - get memeroy info from /proc/meminfo instead of command free -- Gitee