!7 fix obs build problem

Merge pull request !7 from solarhu/master
This commit is contained in:
openeuler-ci-bot 2020-03-14 18:07:57 +08:00 committed by Gitee
commit 44ec6bba37
3 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,20 @@
#/bin/bash
#Copyright (c) [2019] Huawei Technologies Co., Ltd.
#generic-release is licensed under the Mulan PSL v1.
#You can use this software according to the terms and conditions of the Mulan PSL v1.
#You may obtain a copy of Mulan PSL v1 at:
# http://license.coscl.org.cn/MulanPSL
#THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
#IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
#PURPOSE.
#See the Mulan PSL v1 for more details.
CPUNO=`cat /proc/cpuinfo|grep processor|wc -l`
export GOMP_CPU_AFFINITY=0-$[CPUNO - 1]
sysctl -w vm.min_free_kbytes=112640 &> /dev/null
sysctl -w vm.dirty_ratio=60 &> /dev/null
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
sysctl -w kernel.sched_autogroup_enabled=0 &> /dev/null
sysctl -p &> /dev/null

View File

@ -68,3 +68,4 @@ then
else
echo -e "To run a command as administrator(user \"root\"),use \"sudo <command>\"."
fi

View File

@ -5,7 +5,7 @@
%define dist_release_version 8
%define generic_version 1.0
%define generic_patch_level %{nil}
%define generic_release 24
%define generic_release 26
%define builtin_release_version 1.0
%define current_arch %{_arch}
@ -33,6 +33,15 @@ Requires: %{product_family}-repos
%description
%{product_family} release files
%package -n openEuler-performance
Requires: coreutils systemd setup
Summary:performance script
%description -n openEuler-performance
performance script
%prep
%setup -q -n generic-release-%{builtin_release_version}
@ -58,6 +67,7 @@ EOF
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/profile.d
cp -a system-info.sh $RPM_BUILD_ROOT/etc/profile.d/
cp -a performance.sh $RPM_BUILD_ROOT/etc/profile.d/
# write cpe to /etc/system/release-cpe
echo "cpe:/o:%{product_family}:%{product_family}:%{version}:ga:server" > $RPM_BUILD_ROOT/etc/system-release-cpe
@ -100,6 +110,8 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_prefix}/lib/systemd/system-preset/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(0644,root,root,0755)
/etc/system-release
@ -116,7 +128,15 @@ rm -rf $RPM_BUILD_ROOT
/var/lib/supportinfo
/usr/share/eula/eula.*
%files -n openEuler-performance
%defattr(0644,root,root,0755)
/etc/profile.d/performance.sh
%changelog
* Fri Mar 13 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.0-25
- add performance script,close transparent_hugepage,change vm.min_free_kbytes=112640,export GOMP_CPU_AFFINITY
- close autogroup
* Tue Mar 3 2020 openEuler Buildteam <buildteam@openeuler.org> - 1.0-24
- remove unnecessary swap file