!345 [sync] PR-344: optimize some configurations

From: @openeuler-sync-bot 
Reviewed-by: @xujing99 
Signed-off-by: @xujing99
This commit is contained in:
openeuler-ci-bot 2022-11-24 07:44:04 +00:00 committed by Gitee
commit 0467e24d9b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 76 additions and 8 deletions

View File

@ -0,0 +1,24 @@
From a80954ddf69d90d3b02ab62fb025534862069dc3 Mon Sep 17 00:00:00 2001
From: licunlong <licunlong1@huawei.com>
Date: Wed, 24 Jun 2020 17:23:03 +0800
Subject: [PATCH] core-update-arg_default_rlimit-in-bump_rlimit
---
src/core/system.conf.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/system.conf.in b/src/core/system.conf.in
index a58f65a..4762669 100644
--- a/src/core/system.conf.in
+++ b/src/core/system.conf.in
@@ -61,7 +61,7 @@
#DefaultLimitNOFILE=1024:{{HIGH_RLIMIT_NOFILE}}
#DefaultLimitAS=
#DefaultLimitNPROC=
-#DefaultLimitMEMLOCK=
+DefaultLimitMEMLOCK=64M
#DefaultLimitLOCKS=
#DefaultLimitSIGPENDING=
#DefaultLimitMSGQUEUE=
--
2.23.0

View File

@ -0,0 +1,39 @@
From 22f8c4c2a22d9766d86b23429bd404a0864b0a9e Mon Sep 17 00:00:00 2001
From: linfeilong <linfeilong@huawei.com>
Date: Sat, 21 Oct 2017 14:48:18 +0800
Subject: [PATCH] set forwardtowall no to avoid emerg log shown on shell
---
man/journald.conf.xml | 2 +-
src/journal/journald.conf | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/journald.conf.xml b/man/journald.conf.xml
index 44fd0d2..8d38fe3 100644
--- a/man/journald.conf.xml
+++ b/man/journald.conf.xml
@@ -292,7 +292,7 @@
traditional syslog daemon, to the kernel log buffer (kmsg), to the system console, or sent as wall
messages to all logged-in users. These options take boolean arguments. If forwarding to syslog is
enabled but nothing reads messages from the socket, forwarding to syslog has no effect. By default,
- only forwarding to wall is enabled. These settings may be overridden at boot time with the kernel
+ these four configs are all disabled. These settings may be overridden at boot time with the kernel
command line options <literal>systemd.journald.forward_to_syslog</literal>,
<literal>systemd.journald.forward_to_kmsg</literal>,
<literal>systemd.journald.forward_to_console</literal>, and
diff --git a/src/journal/journald.conf b/src/journal/journald.conf
index 2f1c661..17dda27 100644
--- a/src/journal/journald.conf
+++ b/src/journal/journald.conf
@@ -32,7 +32,7 @@
#ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
-#ForwardToWall=yes
+ForwardToWall=no
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
--
2.19.1

View File

@ -1,3 +1,4 @@
%global vendor %{?_vendor:%{_vendor}}%{!?_vendor:openEuler}
%global __requires_exclude pkg-config
%global pkgdir %{_prefix}/lib/systemd
%global system_unit_dir %{pkgdir}/system
@ -20,7 +21,7 @@
Name: systemd
Url: https://www.freedesktop.org/wiki/Software/systemd
Version: 249
Release: 41
Release: 42
License: MIT and LGPLv2+ and GPLv2+
Summary: System and Service Manager
@ -37,10 +38,9 @@ Source11: 20-grubby.install
Source12: systemd-user
Source13: rc.local
Source100: udev-40-openEuler.rules
Source100: udev-40-generic.rules
Source101: udev-55-persistent-net-generator.rules
Source102: udev-56-net-sriov-names.rules
Source103: udev-61-openeuler-persistent-storage.rules
Source104: net-set-sriov-names
Source105: rule_generator.functions
Source106: write_net_rules
@ -448,6 +448,8 @@ Patch9032: Systemd-Add-sw64-architecture.patch
Patch9033: 0029-Add-support-for-the-LoongArch-architecture.patch
Patch9034: 0030-Add-LoongArch-dmi-virt-detection-and-testcase.patch
%endif
Patch9035: core-update-arg_default_rlimit-in-bump_rlimit.patch
Patch9036: set-forwardtowall-no-to-avoid-emerg-log-shown-on-she.patch
BuildRequires: gcc, gcc-c++
BuildRequires: libcap-devel, libmount-devel, pam-devel, libselinux-devel
@ -814,7 +816,7 @@ mkdir -p %{buildroot}%{_sysconfdir}/rc.d/
install -m 0644 %{SOURCE13} %{buildroot}%{_sysconfdir}/rc.d/rc.local
ln -s rc.d/rc.local %{buildroot}%{_sysconfdir}/rc.local
install -m 0644 %{SOURCE100} %{buildroot}/%{_udevrulesdir}/40-openEuler.rules
install -m 0644 %{SOURCE100} %{buildroot}/%{_udevrulesdir}/40-%{vendor}.rules
# remove rpath info
for file in $(find %{buildroot}/ -executable -type f -exec file {} ';' | grep "\<ELF\>" | awk -F ':' '{print $1}')
@ -1726,7 +1728,7 @@ fi
%dir /usr/lib/udev/rules.d
%{_udevrulesdir}/60-autosuspend.rules
%{_udevrulesdir}/40-openEuler.rules
%{_udevrulesdir}/40-%{vendor}.rules
%{_udevrulesdir}/40-elevator.rules
%{_udevrulesdir}/73-idrac.rules
%{_udevrulesdir}/60-block.rules
@ -1861,6 +1863,12 @@ fi
%{_libdir}/security/pam_systemd.so
%changelog
* Wed Nov 23 2022 yangmingtai <yangmingtai@huawei.com> -249-42
- 1.change /etc/systemd/journald.conf ForwardToWall to no
2.change DefaultLimitMEMLOCK to 64M
3.replace openEuler to vendor
4.delete useless file udev-61-openeuler-persistent-storage.rules
* Tue Nov 15 2022 huajingyun<huajingyun@loongson.cn> - 249-41
- Add loongarch64 architecture

View File

@ -1,3 +0,0 @@
# scsi compat links for ATA devices
KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d$tempnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}"
KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n"