diff --git a/bugfix-maintain-permissions-set-umask-in-case-resolvconf-doesnt-exist.patch b/bugfix-maintain-permissions-set-umask-in-case-resolvconf-doesnt-exist.patch deleted file mode 100644 index 327d0c4b0c2fb667eb2cae37333f9ee9d586d684..0000000000000000000000000000000000000000 --- a/bugfix-maintain-permissions-set-umask-in-case-resolvconf-doesnt-exist.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: wangxiao -Subject: [PATCH] initscripts: maintain permissions set umask in case resolvconf doesn't exist -reason: maintain permissions set umask in case resolvconf doesn't exist -diff --git a/network-scripts/network-functions b/network-scripts/network-functions -index 7f5dfb0..8deda57 100644 ---- a/network-scripts/network-functions -+++ b/network-scripts/network-functions -@@ -619,6 +619,11 @@ - # Invoke this when /etc/resolv.conf has changed: - change_resolv_conf () - { -+ # maintain permissions -+ # but set umask in case it doesn't exist! -+ oldumask=$(umask) -+ umask 022 -+ - s=$(/bin/grep '^[\ \ ]*option' /etc/resolv.conf 2>/dev/null) - if [ $# -gt 1 ]; then - if [ "x$s" != "x" ]; then -@@ -654,6 +659,8 @@ - /usr/bin/logger -p local7.notice -t "NET" -i "$0 : updated /etc/resolv.conf" - [ -e /run/nscd/socket ] && /usr/sbin/nscd -i hosts # invalidate cache - fi -+ -+ umask $oldumask - return $r - } - diff --git a/bugfix-network-check-val-of-the-grep.patch b/bugfix-network-check-val-of-the-grep.patch deleted file mode 100644 index 65dcd393f7c2e31eed1c11ca4114a5bf49aa8c05..0000000000000000000000000000000000000000 --- a/bugfix-network-check-val-of-the-grep.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8db1d31e6715dce9d34dbcaaa85b38646b2ec3d1 Mon Sep 17 00:00:00 2001 -From: rpm-build -Date: Thu, 5 Mar 2020 09:48:44 +0800 -Subject: [PATCH] initscripts:adapt to the grep command - -Signed-off-by: zhanglu ---- - etc/rc.d/init.d/network | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network -index f69948e..9a0c3f3 100755 ---- a/etc/rc.d/init.d/network -+++ b/etc/rc.d/init.d/network -@@ -132,7 +132,7 @@ start) - continue - fi - -- if LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then -+ if ! LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i > /dev/null ; then - # this loads the module, to preserve ordering - is_available $i - continue -@@ -149,7 +149,7 @@ start) - - # Bring up xDSL and VPN interfaces - for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces $vpninterfaces ; do -- if ! LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then -+ if LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then - if [ "$godamon" != "1" ] ; then - action $"Bringing up interface $i: " ./ifup $i boot - [ $? -ne 0 ] && rc=1 --- -1.8.3.1 - diff --git a/ifup-ifdown-print-DEPRECATION_WARNING_ISSUED-waring.patch b/ifup-ifdown-print-DEPRECATION_WARNING_ISSUED-waring.patch deleted file mode 100644 index ce6cd38826c7141f0c8ebbe3edee8db2140436e1..0000000000000000000000000000000000000000 --- a/ifup-ifdown-print-DEPRECATION_WARNING_ISSUED-waring.patch +++ /dev/null @@ -1,80 +0,0 @@ -From d6af590090a2a8ffd45e273bdbd46a3fefc8debb Mon Sep 17 00:00:00 2001 -From: Zhiqiang Liu -Date: Mon, 22 Jul 2019 13:38:55 +0800 -Subject: [PATCH] ifup/ifdown: print DEPRECATION_WARNING_ISSUED waring info - after source_config - -In ifup/ifdown scripts, move deprecation waring info after -source_config, so users can config DEPRECATION_WARNING_ISSUED in -ifcfg-** file to decide whether show deprecation waring info when -calling ifup/ifdown. - -Signed-off-by: Zhiqiang Liu ---- - network-scripts/ifdown | 12 ++++++------ - network-scripts/ifup | 12 ++++++------ - 2 files changed, 12 insertions(+), 12 deletions(-) - -diff --git a/network-scripts/ifdown b/network-scripts/ifdown -index aa8fce7..ec05891 100755 ---- a/network-scripts/ifdown -+++ b/network-scripts/ifdown -@@ -16,12 +16,6 @@ CONFIG=$1 - exit 1 - } - --if ! is_true ${DEPRECATION_WARNING_ISSUED}; then -- net_log $"You are using 'ifdown' script provided by 'network-scripts', which are now deprecated." warning ifdown >&2 -- net_log $"'network-scripts' will be removed from distribution in near future." warning ifdown >&2 -- net_log $"It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well." warning ifdown >&2 --fi -- - need_config "${CONFIG}" - - [ -f "$CONFIG" ] || { -@@ -42,6 +36,12 @@ fi - - source_config - -+if ! is_true ${DEPRECATION_WARNING_ISSUED}; then -+ net_log $"You are using 'ifdown' script provided by 'network-scripts', which are now deprecated." warning ifdown >&2 -+ net_log $"'network-scripts' will be removed from distribution in near future." warning ifdown >&2 -+ net_log $"It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well." warning ifdown >&2 -+fi -+ - if [ -n "$IN_HOTPLUG" ] && [ "${HOTPLUG}" = "no" -o "${HOTPLUG}" = "NO" ] - then - exit 0 -diff --git a/network-scripts/ifup b/network-scripts/ifup -index 435c317..397dd93 100755 ---- a/network-scripts/ifup -+++ b/network-scripts/ifup -@@ -31,12 +31,6 @@ CONFIG=${1} - exit 1 - } - --if ! is_true ${DEPRECATION_WARNING_ISSUED}; then -- net_log $"You are using 'ifup' script provided by 'network-scripts', which are now deprecated." warning ifup >&2 -- net_log $"'network-scripts' will be removed from distribution in near future." warning ifup >&2 -- net_log $"It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well." warning ifup >&2 --fi -- - need_config "${CONFIG}" - - [ -f "${CONFIG}" ] || { -@@ -58,6 +52,12 @@ fi - - source_config - -+if ! is_true ${DEPRECATION_WARNING_ISSUED}; then -+ net_log $"You are using 'ifup' script provided by 'network-scripts', which are now deprecated." warning ifup >&2 -+ net_log $"'network-scripts' will be removed from distribution in near future." warning ifup >&2 -+ net_log $"It is advised to switch to 'NetworkManager' instead - it provides 'ifup/ifdown' scripts as well." warning ifup >&2 -+fi -+ - if [ "foo$2" = "fooboot" ] && [ "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ] - then - exit 0 --- -2.6.1.windows.1 - diff --git a/ifup-post-fix-incorrect-condition-for-RESOLV_MODS.patch b/ifup-post-fix-incorrect-condition-for-RESOLV_MODS.patch deleted file mode 100644 index ef8eca0c4243d1a33b5ac439d18091a3344adf69..0000000000000000000000000000000000000000 --- a/ifup-post-fix-incorrect-condition-for-RESOLV_MODS.patch +++ /dev/null @@ -1,32 +0,0 @@ -From bf6a9d7d1f708077bfaad8ea109ad8b4eeb69556 Mon Sep 17 00:00:00 2001 -From: "David Kaspar [Dee'Kej]" -Date: Mon, 20 Aug 2018 14:31:56 +0200 -Subject: [PATCH 3/4] ifup-post: fix incorrect condition for RESOLV_MODS - - This was causing the /etc/resolv.conf file to be always updated when - RESOLV_MODS was not set... - - Before the commit 5d6156454bf8f6dab4a5fdd7e1bf6 we were not updating - the /etc/resolv.conf file if the RESOLV_MODS was empty. - - See https://bugzilla.redhat.com/show_bug.cgi?id=1610411 for more info. ---- - network-scripts/ifup-post | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/network-scripts/ifup-post b/network-scripts/ifup-post -index 5a89cbf3..4cb986f8 100755 ---- a/network-scripts/ifup-post -+++ b/network-scripts/ifup-post -@@ -28,7 +28,7 @@ if ! is_true "$NOROUTESET"; then - fi - - --if ! is_false "${PEERDNS}" || ! is_false "${RESOLV_MODS}"; then -+if ! is_false "${PEERDNS}" || is_true "${RESOLV_MODS}"; then - # Obtain the DNS entries when using PPP if necessary: - [ -n "${MS_DNS1}" ] && DNS1="${MS_DNS1}" - [ -n "${MS_DNS2}" ] && DNS2="${MS_DNS2}" --- -2.19.1 - diff --git a/initscripts-10.01.tar.gz b/initscripts-10.01.tar.gz deleted file mode 100644 index b5c08f52553ae0cf67dda373cb53883dc51afd85..0000000000000000000000000000000000000000 Binary files a/initscripts-10.01.tar.gz and /dev/null differ diff --git a/initscripts-10.04.tar.gz b/initscripts-10.04.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..45b662cb0527bfc2111065628f75bcb6b72da68c Binary files /dev/null and b/initscripts-10.04.tar.gz differ diff --git a/initscripts.spec b/initscripts.spec index 43a3df49ce16b533afada85bc24bd6baee2560c6..6d867a49615edd94fd9e2b6ad081bd7870313f5f 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -19,8 +19,8 @@ Requires: gawk \ Name: initscripts Summary: Basic support for legacy System V init scripts -Version: 10.01 -Release: 6 +Version: 10.04 +Release: 1 License: GPLv2 @@ -74,27 +74,21 @@ Obsoletes: %{name} < 9.82-2 # Downstream patches for RHEL -- patches that we keep only in RHEL for various # --------------------------- reasons, but are not enabled in Fedora: -%if %{defined rhel} || %{defined centos} +%if %{defined rhel} || %{defined centos} || %{defined openEuler} #Patch200: example200.patch %endif # Patches to be removed -- deprecated functionality which shall be removed at # --------------------- some point in the future: -Patch6000: ifup-ifdown-print-DEPRECATION_WARNING_ISSUED-waring.patch -Patch6001: ifup-post-fix-incorrect-condition-for-RESOLV_MODS.patch -Patch6002: run-ifdown-on-all-interfaces.patch - - -Patch9000: bugfix-maintain-permissions-set-umask-in-case-resolvconf-doesnt-exist.patch -Patch9001: bugfix-initscripts-add-udev-wait-dependency-for-network.patch -Patch9002: bugfix-mod-network-function-when-NM-unmanage-devices.patch -Patch9003: bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch -Patch9004: bugfix-network-need-chkconfig-on.patch -Patch9005: bugfix-restart-network-warning.patch -Patch9006: new-network-fork-to-start-dhcp.patch -Patch9007: exec-udevadm-settle-when-network-start.patch -Patch9008: bugfix-network-check-val-of-the-grep.patch +Patch0: run-ifdown-on-all-interfaces.patch +Patch1: bugfix-initscripts-add-udev-wait-dependency-for-network.patch +Patch2: bugfix-mod-network-function-when-NM-unmanage-devices.patch +Patch3: bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch +Patch4: bugfix-network-need-chkconfig-on.patch +Patch5: bugfix-restart-network-warning.patch +Patch6: new-network-fork-to-start-dhcp.patch +Patch7: exec-udevadm-settle-when-network-start.patch %description This package provides basic support for legacy System V init scripts, and some @@ -296,6 +290,7 @@ fi # RC symlinks: %{_sysconfdir}/rc[0-6].d +%{_sysconfdir}/init.d # --------------- @@ -361,6 +356,12 @@ fi # ============================================================================= %changelog +* Wed Aug 19 2020 gaihuiying - 10.04-1 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:update to 10.04 + * Thu Mar 5 2020 openEuler Buildteam - 10.01-6 - Type:bugfix - ID:NA diff --git a/new-network-fork-to-start-dhcp.patch b/new-network-fork-to-start-dhcp.patch index 15192f2900c252636eb69a8b571e2d04e33a57e7..13fbd80c129e5a49d4c9a5bcac0d498a9b521dc8 100644 --- a/new-network-fork-to-start-dhcp.patch +++ b/new-network-fork-to-start-dhcp.patch @@ -11,7 +11,7 @@ Signed-off-by: rpm-build 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network -index 97e6ed1..5f95ee0 100755 +index 31bbe20..994425d 100755 --- a/etc/rc.d/init.d/network +++ b/etc/rc.d/init.d/network @@ -49,6 +49,8 @@ interfaces=$(ls ifcfg-* | \ @@ -19,40 +19,38 @@ index 97e6ed1..5f95ee0 100755 rc=0 +godamon=0 -+ ++ net_log $"You are using 'network' service provided by 'network-scripts', which are now deprecated." warning network >&2 net_log $"'network-scripts' will be removed from distribution in near future." warning network >&2 net_log $"It is advised to switch to 'NetworkManager' instead for network management." warning network >&2 -@@ -131,17 +133,41 @@ start) +@@ -129,18 +131,39 @@ start) is_available $i continue fi - action $"Bringing up interface $i: " ./ifup $i boot - [ $? -ne 0 ] && rc=1 -+ if [ "$godamon" != "1" ] ; then -+ action $"Bringing up interface $i: " ./ifup $i boot -+ [ $? -ne 0 ] && rc=1 -+ else -+ action $"Bringing up interface $i: " ./ifup $i boot & -+ fi -+ -+ ++ if [ "$godamon" != "1" ] ; then ++ action $"Bringing up interface $i: " ./ifup $i boot ++ [ $? -ne 0 ] && rc=1 ++ else ++ action $"Bringing up interface $i: " ./ifup $i boot & ++ fi done # Bring up xDSL and VPN interfaces for i in $vlaninterfaces $bridgeinterfaces $xdslinterfaces $vpninterfaces ; do - if ! LANG=C grep -EL "^ONBOOT=['\"]?[Nn][Oo]['\"]?" ifcfg-$i >/dev/null 2>&1 ; then + if ( . ./ifcfg-"$i" ; ! is_false "$ONBOOT" ) ; then - action $"Bringing up interface $i: " ./ifup $i boot - [ $? -ne 0 ] && rc=1 -- fi -+ if [ "$godamon" != "1" ] ; then -+ action $"Bringing up interface $i: " ./ifup $i boot -+ [ $? -ne 0 ] && rc=1 -+ else -+ action $"Bringing up interface $i: " ./ifup $i boot & -+ fi -+ fi ++ if [ "$godamon" != "1" ] ; then ++ action $"Bringing up interface $i: " ./ifup $i boot ++ [ $? -ne 0 ] && rc=1 ++ else ++ action $"Bringing up interface $i: " ./ifup $i boot & ++ fi + fi done +- + # Waiting until all background process done + if [ "$godamon" = "1" ] ; then + for pid in $(jobs -p) @@ -67,9 +65,8 @@ index 97e6ed1..5f95ee0 100755 + rc=0 + done + fi - # Add non interface-specific static-routes. if [ -f /etc/sysconfig/static-routes ]; then + if [ -x /sbin/route ]; then -- 2.19.1 -