!107 新增 openEuler-release-custom子包,适配QS服务器。

Merge pull request !107 from gitee_cmd/openEuler-20.03-LTS-SP3
This commit is contained in:
openeuler-ci-bot 2021-12-30 18:40:11 +00:00 committed by Gitee
commit 88285dd3c5

View File

@ -6,7 +6,7 @@
%define generic_version 20.03 %define generic_version 20.03
%define generic_patch_level LTS %define generic_patch_level LTS
%define generic_patch_level_extend SP3 %define generic_patch_level_extend SP3
%define generic_release 48 %define generic_release 49
%define builtin_release_version 1.0 %define builtin_release_version 1.0
%define current_arch %{_arch} %define current_arch %{_arch}
@ -35,7 +35,8 @@ Source7: dot-tcshrc
Source8: dot-cshrc Source8: dot-cshrc
BuildRequires: python BuildRequires: python
Requires: %{product_family}-repos Requires: %{product_family}-repos
Requires: %{product_family}-release-custom
Obsoletes: yum-utils yum-utils-help yum-utils-plugins Obsoletes: yum-utils yum-utils-help yum-utils-plugins
%description %description
@ -58,9 +59,36 @@ The rootfiles package contains basic required files that are placed
in the root user's account. These files are basically the same as 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. 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 %prep
%setup -q -n generic-release-%{builtin_release_version} %setup -q -n generic-release-%{builtin_release_version}
%posttrans -n %{product_family}-release-custom
# parameters for grub2
array="rd.shell=0 fpi_to_tail=off"
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
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 %build
echo OK echo OK
@ -169,7 +197,12 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace) /root/.tcshrc %config(noreplace) /root/.tcshrc
%config(noreplace) /root/.cshrc %config(noreplace) /root/.cshrc
%files -n %{product_family}-release-custom
%changelog %changelog
* Tue Dec 31 2021 chemingdao <chemingdao@huawei.com> - 1.0-49
- init openeuler custom
* Thu Dec 30 2021 gaochong <gaochong@uniontech.com> - 1.0-48 * Thu Dec 30 2021 gaochong <gaochong@uniontech.com> - 1.0-48
- require bc for caculating free memory - require bc for caculating free memory