commit 9fdbc3642ac6ee056eee698021e08b29c5ea12b7 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:53:14 2019 -0400 Package init diff --git a/bugfix-initscripts-add-udev-wait-dependency-for-network.patch b/bugfix-initscripts-add-udev-wait-dependency-for-network.patch new file mode 100755 index 0000000..f53efdd --- /dev/null +++ b/bugfix-initscripts-add-udev-wait-dependency-for-network.patch @@ -0,0 +1,34 @@ +From 6f77c3059cb9aceea5ed9fc6f434577214716476 Mon Sep 17 00:00:00 2001 +From: Hui Wang +Date: Wed, 19 Oct 2016 19:50:29 +0800 +Subject: [PATCH] initscripts: add udev-wait dependency for network + +We changed systemd so that ethernet interface can be renamed successfully +even though the name has be taken, but rename operations will take some +seconds. Systemd start service concurrent, while systemd-udevd is renaming +ethernet interfaces, network service start to configure them, once ip was +set, the rename operation will fail with the error 'Device or resource busy' +So network service should start after ethernet rename finished, that means +all uevents are be done. + +udev-wait.service will be added to customize packages, such as config-os-XX. +--- + rc.d/init.d/network | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network +index 2b8c191..91a8043 100755 +--- a/etc/rc.d/init.d/network ++++ b/etc/rc.d/init.d/network +@@ -8,7 +8,7 @@ + # + ### BEGIN INIT INFO + # Provides: $network +-# Should-Start: iptables ip6tables NetworkManager-wait-online NetworkManager $network-pre ++# Should-Start: iptables ip6tables NetworkManager-wait-online NetworkManager udev-wait $network-pre + # Short-Description: Bring up/down networking + # Description: Bring up/down networking + ### END INIT INFO +-- +1.8.3.1 + diff --git a/bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch b/bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch new file mode 100755 index 0000000..5039a94 --- /dev/null +++ b/bugfix-initscripts-set-PERSISTENT_DHCLIENT-default-to-yes.patch @@ -0,0 +1,32 @@ +From 2f5a4318ac00a12d2c8c5ecae391917166af6933 Mon Sep 17 00:00:00 2001 +From: Chunmei Xu +Date: Wed, 18 Jul 2018 04:21:01 -0400 +Subject: [PATCH] initscripts: set PERSISTENT_DHCLIENT default to yes for + dhclient args + +Signed-off-by: Chunmei Xu +--- + network-scripts/ifup-eth | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/network-scripts/ifup-eth b/network-scripts/ifup-eth +index 3da5c16..93e8348 100755 +--- a/network-scripts/ifup-eth ++++ b/network-scripts/ifup-eth +@@ -195,10 +195,10 @@ if [ -n "${BRIDGE}" ] && [ -x /usr/sbin/brctl ]; then + fi + + if [ -n "${DYNCONFIG}" ] && [ -x /sbin/dhclient ]; then +- if is_true "${PERSISTENT_DHCLIENT}"; then +- ONESHOT=""; ++ if is_false "${PERSISTENT_DHCLIENT}"; then ++ ONESHOT="-1"; + else +- ONESHOT="-1"; ++ ONESHOT=""; + fi; + generate_config_file_name + generate_lease_file_name +-- +1.8.3.1 + 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 new file mode 100755 index 0000000..327d0c4 --- /dev/null +++ b/bugfix-maintain-permissions-set-umask-in-case-resolvconf-doesnt-exist.patch @@ -0,0 +1,28 @@ +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-mod-network-function-when-NM-unmanage-devices.patch b/bugfix-mod-network-function-when-NM-unmanage-devices.patch new file mode 100755 index 0000000..48cf8a0 --- /dev/null +++ b/bugfix-mod-network-function-when-NM-unmanage-devices.patch @@ -0,0 +1,29 @@ +From 482d36652a2f14ae7c2216e019d747a28c521d52 Mon Sep 17 00:00:00 2001 +From: Lijie Yu +Date: Wed, 7 Mar 2018 16:56:50 +0800 +Subject: [PATCH] initscripts: mod network-function for network when NM + unmanaged devices + +[Changelog]:mod network-function for network when NM unmanaged devices +[Author]:yulijie +--- + network-scripts/network-functions | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/network-scripts/network-functions b/network-scripts/network-functions +index 8deda57..00d5bdc 100644 +--- a/network-scripts/network-functions ++++ b/network-scripts/network-functions +@@ -179,7 +179,9 @@ source_config () + nm_con_load "$CONFIG" + if ! is_false $NM_CONTROLLED; then + UUID=$(get_uuid_by_config $CONFIG) +- [ -n "$UUID" ] && _use_nm=true ++ managed_strings=`nmcli dev show $DEVICE | grep STATE | grep unmanaged` ++ [ -z "$managed_strings" ] && is_device_managed=true ++ [ -n "$UUID" ] && [ "$is_device_managed"x = "true"x ] && _use_nm=true + fi + fi + } +-- +1.8.3.1 diff --git a/bugfix-network-need-chkconfig-on.patch b/bugfix-network-need-chkconfig-on.patch new file mode 100644 index 0000000..c2f515c --- /dev/null +++ b/bugfix-network-need-chkconfig-on.patch @@ -0,0 +1,25 @@ +From 62acdd3b572ab6d97ddc1457ba6e21187bde0e70 Mon Sep 17 00:00:00 2001 +From: Li Shang +Date: Tue, 9 Apr 2019 09:03:38 -0400 +Subject: [PATCH] network need start + +--- + etc/rc.d/init.d/network | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network +index ade227e..3805f65 100755 +--- a/etc/rc.d/init.d/network ++++ b/etc/rc.d/init.d/network +@@ -2,7 +2,7 @@ + # + # network Bring up/down networking + # +-# chkconfig: - 10 90 ++# chkconfig: 2345 10 90 + # description: Activates/Deactivates all network interfaces configured to \ + # start at boot time. + # +-- +1.8.3.1 + diff --git a/bugfix-restart-network-warning.patch b/bugfix-restart-network-warning.patch new file mode 100644 index 0000000..3f43f5e --- /dev/null +++ b/bugfix-restart-network-warning.patch @@ -0,0 +1,37 @@ +From a2cb13d3de5219f9ff0341f5c58fe50830a9de81 Mon Sep 17 00:00:00 2001 +From: zhouxudong +Date: Sun, 15 Sep 2019 18:39:20 +0800 +Subject: [PATCH] fix + +--- + etc/rc.d/init.d/network | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/etc/rc.d/init.d/network b/etc/rc.d/init.d/network +index 58fbc4c..4de4a9c 100755 +--- a/etc/rc.d/init.d/network ++++ b/etc/rc.d/init.d/network +@@ -227,6 +227,7 @@ stop) + remaining="$remaining $i" + done + ++ bondlist=`cat /proc/net/bonding/* 2> /dev/null | grep "Slave Inter" | awk '{print $3}'` + for i in $vpninterfaces $xdslinterfaces $bridgeinterfaces $vlaninterfaces $remaining; do + unset DEVICE TYPE + (. ./ifcfg-$i +@@ -236,8 +237,10 @@ stop) + action $"Shutting down interface $i: " ./ifdown $i boot + [ $? -ne 0 ] && rc=1 + else +- action $"Shutting down non-UP interface $i: " ./ifdown $i boot +- logger $"Running ifdown on non-UP interface $i" ++ if ! echo "$bondlist" | grep -qw $DEVICE ; then ++ action $"Shutting down non-UP interface $i: " ./ifdown $i boot ++ logger $"Running ifdown on non-UP interface $i" ++ fi + fi + ) + done +-- +2.19.1 + diff --git a/ifup-ifdown-print-DEPRECATION_WARNING_ISSUED-waring.patch b/ifup-ifdown-print-DEPRECATION_WARNING_ISSUED-waring.patch new file mode 100644 index 0000000..ce6cd38 --- /dev/null +++ b/ifup-ifdown-print-DEPRECATION_WARNING_ISSUED-waring.patch @@ -0,0 +1,80 @@ +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 new file mode 100644 index 0000000..ef8eca0 --- /dev/null +++ b/ifup-post-fix-incorrect-condition-for-RESOLV_MODS.patch @@ -0,0 +1,32 @@ +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 new file mode 100644 index 0000000..b5c08f5 Binary files /dev/null and b/initscripts-10.01.tar.gz differ diff --git a/initscripts.spec b/initscripts.spec new file mode 100644 index 0000000..f7482f5 --- /dev/null +++ b/initscripts.spec @@ -0,0 +1,3898 @@ +#This spec file comes from the the official Community.https://github.com/fedora-sysv/initscripts/blob/master/initscripts.spec +# === GLOBAL MACROS =========================================================== + +# According to Fedora Package Guidelines, it is advised that packages that can +# process untrusted input are build with position-idenpendent code (PIC). +# +# Koji should override the compilation flags and add the -fPIC or -fPIE flags by +# default. This is here just in case this wouldn't happen for some reason. +# For more info: https://fedoraproject.org/wiki/Packaging:Guidelines#PIE +%global _hardened_build 1 + +%global shared_requirements \ +Requires: bash \ +Requires: filesystem >= 3 \ +Requires: coreutils \ +Requires: gawk \ + +# ============================================================================= + +Name: initscripts +Summary: Basic support for legacy System V init scripts +Version: 10.01 +Release: 3 + +License: GPLv2 + +URL: https://github.com/fedora-sysv/initscripts +Source: https://github.com/fedora-sysv/initscripts/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz + +%shared_requirements + +Requires: findutils +Requires: grep +Requires: procps-ng +Requires: setup +Requires: systemd +Requires: util-linux + +Requires(pre): shadow-utils +Requires(post): coreutils + +BuildRequires: filesystem >= 3 +BuildRequires: gcc +BuildRequires: git +BuildRequires: gettext +BuildRequires: glib2-devel +BuildRequires: pkgconfig +BuildRequires: popt-devel +BuildRequires: setup + +%{?systemd_requires} +BuildRequires: systemd + +Provides: /sbin/service + +Obsoletes: %{name} < 9.82-2 + +# === PATCHES ================================================================= + +# NOTE: 'autosetup' macro (below) uses 'git' for applying the patches: +# ->> All the patches should be provided in 'git format-patch' format. +# ->> Auxiliary repository will be created during 'fedpkg prep', you +# can see all the applied patches there via 'git log'. + +# Upstream patches -- official upstream patches released by upstream since the +# ---------------- last rebase that are necessary for any reason: +#Patch000: example000.patch + + +# Downstream patches -- these should be always included when doing rebase: +# ------------------ +#Patch100: example100.patch + + +# 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} +#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 + +%description +This package provides basic support for legacy System V init scripts, and some +other legacy tools & utilities. + +# === SUBPACKAGES ============================================================= + +%package -n network-scripts +Summary: Legacy scripts for manipulating of network devices +Requires: %{name}%{?_isa} = %{version}-%{release} + +%shared_requirements + +Requires: bc +Requires: dbus +Requires: gawk +Requires: grep +Requires: hostname +Requires: iproute +Requires: ipcalc +Requires: kmod +Requires: procps-ng +Requires: sed +Requires: systemd + +Requires(post): chkconfig +Requires(preun): chkconfig + +Requires(post): %{_sbindir}/update-alternatives +Requires(postun): %{_sbindir}/update-alternatives + +Obsoletes: %{name} < 9.82-2 + +%description -n network-scripts +This package contains the legacy scripts for activating & deactivating of most +network interfaces. It also provides a legacy version of 'network' service. + +The 'network' service is enabled by default after installation of this package, +and if the network-scripts are installed alongside NetworkManager, then the +ifup/ifdown commands from network-scripts take precedence over the ones provided +by NetworkManager. + +If user has both network-scripts & NetworkManager installed, and wishes to +use ifup/ifdown from NetworkManager primarily, then they has to run command: + $ update-alternatives --config ifup + +Please note that running the command above will also disable the 'network' +service. + +# --------------- + +%package -n netconsole-service +Summary: Service for initializing of network console logging +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%shared_requirements + +Requires: glibc-common +Requires: iproute +Requires: iputils +Requires: kmod +Requires: sed +Requires: util-linux + +Obsoletes: %{name} < 9.82-2 + +%description -n netconsole-service +This packages provides a 'netconsole' service for loading of netconsole kernel +module with the configured parameters. The netconsole kernel module itself then +allows logging of kernel messages over the network. + +# --------------- + +%package -n readonly-root +Summary: Service for configuring read-only root support +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%shared_requirements + +Requires: cpio +Requires: findutils +Requires: hostname +Requires: iproute +Requires: ipcalc +Requires: util-linux + +Obsoletes: %{name} < 9.82-2 + +%description -n readonly-root +This package provides script & configuration file for setting up read-only root +support. Additional configuration is required after installation. + +# === BUILD INSTRUCTIONS ====================================================== + +%prep +%autosetup -S git + +# --------------- + +%build +%make_build + +# --------------- + +%install +%make_install + +# This installs the NLS language files: +%find_lang %{name} + +%ifnarch s390 s390x + rm -f %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifup-ctc +%endif + +# Additional ways to access documentation: +install -m 0755 -d %{buildroot}%{_docdir}/network-scripts + +ln -s %{_docdir}/%{name}/sysconfig.txt %{buildroot}%{_docdir}/network-scripts/ +ln -sr %{_mandir}/man8/ifup.8 %{buildroot}%{_mandir}/man8/ifdown.8 + +# We are now using alternatives approach to better co-exist with NetworkManager: +touch %{buildroot}%{_sbindir}/ifup +touch %{buildroot}%{_sbindir}/ifdown + +# ============================================================================= + +%post +%systemd_post import-state.service loadmodules.service + +%preun +%systemd_preun import-state.service loadmodules.service + +%postun +%systemd_postun import-state.service loadmodules.service + +# --------------- + +%post -n network-scripts +chkconfig --add network > /dev/null 2>&1 || : + +[ -L %{_sbindir}/ifup ] || rm -f %{_sbindir}/ifup +[ -L %{_sbindir}/ifdown ] || rm -f %{_sbindir}/ifdown + +%{_sbindir}/update-alternatives --install %{_sbindir}/ifup ifup %{_sysconfdir}/sysconfig/network-scripts/ifup 90 \ + --slave %{_sbindir}/ifdown ifdown %{_sysconfdir}/sysconfig/network-scripts/ifdown \ + --initscript network + +%preun -n network-scripts +if [ $1 -eq 0 ]; then + chkconfig --del network > /dev/null 2>&1 || : + %{_sbindir}/update-alternatives --remove ifup %{_sysconfdir}/sysconfig/network-scripts/ifup +fi + +# --------------- + +%post -n netconsole-service +%systemd_post netconsole.service + +%preun -n netconsole-service +%systemd_preun netconsole.service + +%postun -n netconsole-service +%systemd_postun netconsole.service + +# --------------- + +%post -n readonly-root +%systemd_post readonly-root.service + +%preun -n readonly-root +%systemd_preun readonly-root.service + +%postun -n readonly-root +%systemd_postun readonly-root.service + +# === PACKAGING INSTRUCTIONS ================================================== + +%files -f %{name}.lang +%license COPYING +%doc doc/sysconfig.txt + +# NOTE: /etc/profile.d/ is owned by setup package. +# /etc/sysconfig/ is owned by filesystem package. +%dir %{_sysconfdir}/rc.d +%dir %{_sysconfdir}/rc.d/init.d +%dir %{_sysconfdir}/rc.d/rc[0-6].d +%dir %{_sysconfdir}/sysconfig/console +%dir %{_sysconfdir}/sysconfig/modules +%dir %{_libexecdir}/%{name} +%dir %{_libexecdir}/%{name}/legacy-actions + +# --------------- + +%ghost %config(noreplace, missingok) %verify(not md5 size mtime) %{_sysconfdir}/rc.d/rc.local + +%{_sysconfdir}/rc.d/init.d/functions + +# RC symlinks: +%{_sysconfdir}/rc[0-6].d + +# --------------- + +%{_bindir}/* +%{_sbindir}/consoletype +%{_sbindir}/genhostid +%{_sbindir}/service + +%{_libexecdir}/import-state +%{_libexecdir}/loadmodules + +%{_prefix}/lib/systemd/system/import-state.service +%{_prefix}/lib/systemd/system/loadmodules.service +%{_prefix}/lib/udev/rename_device + +%{_udevrulesdir}/* + +%{_mandir}/man1/* +%{_mandir}/man8/service.* + +# ============================================================================= + +%files -n network-scripts +%doc doc/examples/ +%dir %{_sysconfdir}/sysconfig/network-scripts + +%{_sysconfdir}/rc.d/init.d/network +%{_sysconfdir}/sysconfig/network-scripts/* + +%config(noreplace) %{_sysconfdir}/sysconfig/network-scripts/ifcfg-lo + +%ghost %{_sbindir}/ifup +%ghost %{_sbindir}/ifdown +%attr(4755,root,root) %{_sbindir}/usernetctl + +%{_mandir}/man8/ifup.* +%{_mandir}/man8/ifdown.* +%{_mandir}/man8/usernetctl.* +%{_docdir}/network-scripts/* + +# --------------- + +%files -n netconsole-service +%config(noreplace) %{_sysconfdir}/sysconfig/netconsole + +%{_libexecdir}/netconsole +%{_prefix}/lib/systemd/system/netconsole.service + +# --------------- + +%files -n readonly-root +%dir %{_sharedstatedir}/stateless +%dir %{_sharedstatedir}/stateless/state +%dir %{_sharedstatedir}/stateless/writable + +%config(noreplace) %{_sysconfdir}/rwtab +%config(noreplace) %{_sysconfdir}/statetab +%config(noreplace) %{_sysconfdir}/sysconfig/readonly-root + +%{_libexecdir}/readonly-root +%{_prefix}/lib/systemd/system/readonly-root.service + +# ============================================================================= + +%changelog +* Mon Sep 23 2019 jiangchuangang - 10.01-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:Synchronize a bugfix patch + +* Tue Sep 10 2019 openEuler Buildteam - 10.01-2 +- Type:NA +- ID:NA +- SUG:NA +- DESC:Add some notes + +* Mon Aug 26 2019 shenyangyang - 10.01-1.h11 +- Type:NA +- ID:NA +- SUG:NA +- DESC:change some info in change log + +* Tue Aug 20 2019 fangxiuning - 10.01-1.h10 +- Type:NA +- ID:NA +- SUG:NA +- DESC:Rewrite Spec File + +* Mon Aug 12 2019 yefei - 10.01-1.h9 +- Type: NA +- ID: NA +- SUG: NA +- DESC: Eliminate sensitive information + +* Sat Jul 27 2019 sunyang - 10.01-1.h8 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: ifup ifdown print DEPRECATION_WARNING_ISSUED waring info after source_config + +* Tue Jul 2 2019 Shijie Luo - 10.01-1.h7 +- Type:enhancement +- ID:NA +- SUG:restart +- DESC: fix patches which include employee id + +* Tue May 14 2019 liuzhiqiang - 10.01-1.h6 +- Type:bugfix +- ID:NA +- SUG:restart +- DESC: set PERSISTENT_DHCLIENT not to apply for ipv6 and keep same with last version + +* Tue Apr 9 2019 shangli - 10.01-1.h5 +- Type:bugfix +- ID:NA +- SUG:restart +- DESC:network.service need chkconfig on + +* Thu Apr 4 2019 luochunsheng - 10.01-1.h4 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC:remove sensitive information + +* Wed Mar 27 2019 lunankun - 10.01-1.h3 +- Type:bugfix +- ID:NA +- SUG:restart +- DESC:backport a patch + +* Wed Mar 13 2019 lunankun - 10.01-1.h2 +- Type:bugfix +- ID:NA +- SUG:restart +- DESC:fix incorrect condition for RESOLV_MODS + apply PERSISTENT_DHCLIENT to IPv6 dhclient daemon + +* Wed Jan 23 2019 wangxiao - 10.01-1.h1 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:sync patch + +* Mon Aug 06 2018 David Kaspar [Dee'Kej] - 10.01-1 +- network/ifup/ifdown: deprecations warnings redirected to stderr +- ifup-eth: use 'bc' instead of 'expr' when computing $forward_delay +- network/ifup/ifdown: deprecation warnings for 'network-scripts' added +- network: parsing of /proc/mounts returned + +* Thu Jun 21 2018 David Kaspar [Dee'Kej] - 10.00-1 +- Move the /etc/rwtab.d & /etc/statetab.d folders to 'filesystem' +- specfile: fix failing build because of incorrect use of %{_isa} + +* Thu Jun 14 2018 David Kaspar [Dee'Kej] - 9.83-1 +- network-scripts: Add previously dropped error checking +- network-scripts: Replace brctl with ip-link +- Makefile: new release-commit rule added +- src/rename_device.c: GCC warnings about unused return value suppressed +- src/usernetctl.c: GCC warnings about unused return value suppressed +- Makefile: allow sub-makefiles to run in parallel +- specfile: netconsole service moved to /usr/libexec +- specfile: services from /usr/lib/systemd moved to /usr/libexec +- specfile: summary & description updated +- specfile: no longer needed conflicts dropped +- specfile: requirements cleanup +- specfile: obsoletes on previous version of initscripts package added +- specfile: network-scripts subpackage created +- specfile: readonly-root subpackage created +- specfile: netconsole-service subpackage created +- README.md: Travis CI build icon added +- .travis.yml: check the 'make install' proceeds as well +- .travis.yml: initial commit +- README.md: bug reporting described +- README.dm: future of initscripts described +- README.md: description added +- README.md: references to old git branches added +- README.md: initial commit +- network-scripts: setting of firewall ZONE fixed +- ifdown-post: artifact whitespace removed from the DBus call +- l10n: drop .tx directory +- l10n: add zanata.xml + +* Mon Jun 04 2018 David Kaspar [Dee'Kej] - 9.82-1 +- Makefile: make the creation of symlinks relative to path again +- specfile: trailing file of netreport removed + +* Thu May 31 2018 David Kaspar [Dee'Kej] - 9.81-1 +- src/consoletype.c: deprecation warning added +- src/genhostid.c: deprecation warning added +- src/genhostid.c: fixed to not override /etc/hostid if it already exists +- src/usleep.c: GCC warnings fixed +- nis-domainname.service removed +- fedora-* services renamed to more general names +- specfile: missing fedora-domainname.service returned in systemd macros +- COPYING updated to latest GNU version (GPLv2+) +- network-scripts: control 'network' service with alternatives as well +- netreport functionality dropped +- networks moved into 'setup' package +- lang.{sh,csh} moved into setup package +- lang.{sh,csh} cleanup before moving to 'setup' package +- src/sushell moved into 'policycoreutils' package +- src/shvar.* removed +- po/xgettext_sh removed +- sys-unconfig removed +- Outdated files from doc/ folder removed +- make archive: ChangeLog generating removed +- network-scripts: ifup & ifdown -- use alternatives system +- adjtime moved into 'util-linux' package +- specfile: simplified & updated to new repository layout +- .gitignore files updated to new repository layout +- Makefile simplified & updated to new repository layout +- po/Makefile simplified & updated to new repository layout +- src/Makefile simplified & updated to new repository layout +- Repository scheme updated to new layout +- fedora-readonly: command substitution warning fixed (null-byte input) + +* Fri May 25 2018 David Kaspar [Dee'Kej] - 9.80-1 +- sysconfig/readonly-root: Clarify the usage of readonly-root +- use proper shebang where appropriate +- specfile: remove the systemctl call in the %postun phase +- network-functions: use tr to upper case strings rather than awk +- network-functions: add error messages for bonding installation +- ifdown-eth: no longer needed 'pidof -x dhclient' condition removed +- netconsole: LSB header added +- po/xgettext_sh*: converted to use to python3 +- network.service: 'reload' removed +- ifup-tunnel: Support 'external' tunnels +- spec: add gcc to BuildRequires +- init.d/functions: fix sourcing for ksh + +* Tue Jan 02 2018 David Kaspar [Dee'Kej] - 9.79-1 +- ifdown-post: fix logical error in commit 5d61564 +- network: add knob to optionally keep interfaces up during shutdown +- network-functions: use POSIX forwarding instead of bash-ism + +* Wed Nov 08 2017 David Kaspar [Dee'Kej] - 9.78-1 +- specfile: drop dependancy on /etc/system-release +- ifup-post: always update nameserver & search entries in /etc/resolv.conf +- network-scripts: forward DBus calls to /dev/null +- Spelling fixes +- Tell git to ignore *.o +- Use grep -E instead of deprecated egrep +- Avoid some unnecessary stat calls +- systemd/system: symlinks for fedora-* services removed +- network-scripts: firewall-cmd replaced with DBus calls +- 'debugmode' subpackage dropped completely +- sysconfig/init* files dropped +- sysctl.conf.s390 dropped +- usleep: change the error message to print the full replacement commandline + +* Tue Aug 15 2017 David Kaspar [Dee'Kej] - 9.77-1 +- specfile: Fix failing build for s390* architecture +- Drop no longer supported SPARC architecture + +* Mon Aug 07 2017 David Kaspar [Dee'Kej] - 9.76-1 +- Makefile: return make archive for testing purposes +- Revert "Makefile: replace /var/run with /run" + +* Mon Aug 07 2017 David Kaspar [Dee'Kej] - 9.75-1 +- Makefile: $ROOT variable is now empty by default +- Makefile: Fix additional error in commit b119d37d1 +- ifup-eth: wait for STP to complete setup on bridge if $DELAY is not set +- init.d/functions: is_true() & is_false() extended by ON/OFF support +- init.d/functions: convert2sec() function added + +* Fri Aug 04 2017 David Kaspar [Dee'Kej] - 9.74-1 +- Makefile: fix whitespace error in commit b119d37d1 + +* Thu Aug 03 2017 David Kaspar [Dee'Kej] - 9.73-1 +- Makefile: replace /var/run with /run +- Replace /var/run with /run everywhere +- Update references to sysctl.conf +- Drop sysctl.d/00-system.conf +- Drop 256term.{sh,csh} +- ARPUPDATE introduced + +* Thu May 25 2017 David Kaspar [Dee'Kej] - 9.72-1 +- rename_device.c: rewrite of isCfg() function +- Add *.old to list of ignored files +- Replace usleep(1) calls with sleep(1) calls + +* Wed May 24 2017 David Kaspar [Dee'Kej] - 9.71-1 +- usleep: print deprecation warning from now on +- sysconfig.txt: mention previously introduced NO_DHCP_HOSTNAME option +- DHCP_FQDN and DHCP_SEND_HOSTNAME introduced +- re-add missing $HOSTNAME initialization +- ifup: add support for VLAN_EGRESS_PRIORITY_MAP +- specfile: mark 'rwtab' and 'statetab' as config files +- killproc/status: add missing '-b ' option +- ifdown-eth: we need to flush global scope as well +- ifup-eth: remove quote marks +- po: download latest translations from zanata +- rwtab: add /var/lib/systemd/timers +- Update initscripts.pot +- Port headers in xgettext_sh.py to 2017 + +* Fri Feb 24 2017 Lukáš Nykrýn - 9.70-1 +- move source to github + +* Tue Aug 30 2016 David Kaspar [Dee'Kej] - 9.69-1 +- fedora-import-state should no longer try to create folder with empty name (#1370259) + +* Tue Aug 9 2016 David Kaspar [Dee'Kej] - 9.68-1 +- fedora-import-state: skip modifying of existing folders (#1347436) +- functions: systemctl show now returns an error when unit does not exist + +* Tue Jul 19 2016 Lukáš Nykrýn - 9.67-1 +- import-state: restore also sensitivity part of SELinux context +- network: run after network-pre.target +- ifup-eth: fix setting preferred_lft and valid_lft +- ifup: don't call nmcli on any lo device +- source_config: tell NetworkManger to load ifcfg file even for NM_CONTROLLED=no +- ipv6: wait for all global IPv6 addresses to leave the "tentative" state +- rwtab: /var/lib/nfs needs to copy the files +- functions: improve killing loops +- ifup: set valid_lft and preferred_lft to forever for static ip +- service: use systemd mangle for given service + +* Mon Apr 25 2016 Lukáš Nykrýn - 9.66-1 +- remove autorelabel stuff +- autorelabel: turn quota off before relabeling +- network: Treat other tunnel interfaces, fixes ifdown stage +- autorelabel: call dracut-initramfs-restore before forced reboot +- sysconfig.txt: document PPPOE_EXTRA and PPPD_EXTRA +- ifdown-eth: fix comparison + +* Mon Dec 07 2015 Lukáš Nykrýn - 9.65-1 +- init.d/functions: end with 0 +- fedora-loadmodules: we don't have readahead anymore +- network-scripts: DEVICE and HWADRR could be quoted by apostrophe +- ifup-wireless: fix calling of phy_wireless_device +- ifdown: clean ipv4 localhost addresses +- ifup-eth: some bridge options are applied later +- service: improve status and stop function for daemon with intscripts +- init.d/functions: reload systemd if it can't see an initscript + +* Thu Aug 06 2015 Lukáš Nykrýn - 9.64-1 +- network-functions: fix wireless detection +- fedora-readonly: use --make-slave with --bind mounts +- import-state: don't run restorecon when it does not exist +- network: modem type interfaces should explicitly start after and stop before common interfaces +- ifup-post: should be interpreted in bash + +* Mon May 18 2015 Lukáš Nykrýn - 9.63-1 +- remove ipcalc, it has its own package now +- network: tell NM to reload its configuration during start +- bonding: warn if the ifup for slave device failed +- sysctl.conf: drop SHMALL and SHMMAX, they have sane default values in kernel +- ifup: don't call NM for loopback +- clarify daemon() usage message +- rename_device: allow non-channel nics for s390x machines +- ifup: add missing quotes + +* Thu Apr 09 2015 Lukáš Nykrýn - 9.62-1 +- network-functions: fix change_resolv_conf after grep update +- ifup-aliases: don't return with error when arping fails +- init.d/functions: rc.debug option to debug initscripts +- ifup-aliases: inherit ARPCHECK from parent device +- network: report that we can't shut down network for root on netfs +- ifdown-eth: use scope host for lo + +* Thu Jan 22 2015 Lukáš Nykrýn - 9.61-1 +- specfile cleanup +- ifup-ipv6: set accept_ra to 2 when IPV6FORWARDING=yes and IPV6_AUTOCONF=yes +- ifup-post: check resolve.conf also with DNS2 +- ifup-aliases: do not fail when only ipv6 addr is specified +- fedora-import-state.service: run a little bit later +- fedora-readonly: Updates for systemd random-seed handling +- network-functions: is_available_wait should wait even in the case that is_available returns 2 +- ifdown-post: remove resolv.conf only in specific cases +- network-functions: fix check in install_bonding_driver + +* Tue Dec 16 2014 Lukáš Nykrýn - 9.60-1 +- improve check for bond master in install bonding driver +- network-functions: reeplace iwconfig with iw +- ifup: fix typo +- ifdown-ipv6: reset addrgenmode to eui64 for device + +* Wed Nov 12 2014 Lukáš Nykrýn - 9.59-1 +- adjust LINKDELAY when STP is on + +* Thu Nov 06 2014 Lukáš Nykrýn - 9.58-1 +- ifup,vlan: fix typo +- doc: be consistent and use BOOTPROTO=none + +* Tue Oct 07 2014 Zbigniew Jędrzejewski-Szmek - 9.57 +- Remove /etc/inittab, /etc/crypttab, utmp, wtmp, btmp + +* Tue Oct 07 2014 Lukáš Nykrýn - 9.56-1 +- network_function: return immediately when device is pres +ent +- add configurable DEVTIMEOUT +- fedora-import-state: do not clobber / +- network-functions: grep->fgrep in bonding masters matchi +ng +- man: update sys-unconfig.8 +- rename_devices: comments need to have a blank before them +- add example ifcfg files +- network-functions: improve bonding_masters grep +- ifup: if we were unable to determine DEVICE always call nmcli up +- ifup-tunnel: call ifup-ipv6 in the end +- ifup: also set multicast_snooping after the bridge is up +- network-functions: ETHTOOL_DELAY introduction patch +- use pie and relro by default +- custom naming for VLAN devices +- vi.po: fix parentheses +- ifup-wireless: add support for wowlan +- ifup-wireless: add support for wowlan (second part) +- ifup-aliases: do not bring up ipv6 for range files +- sys-unconfig: use poweroff instead of halt +- ifup-aliases: improve duplicate address detection +- network-functions: handle BONDING_OPTS better +- network: tell nm to wake the slaves + +* Tue Jul 22 2014 Lukáš Nykrýn - 9.55-1 +- fix license handling +- ipcalc: -c allow netmask +- ipcalc: parse prefix more safely +- inittab: fix path and mention set-default +- don't require /sbin/sysctl +- init.d/functions: check parent dir of pid file for accessibility +- ifup-eth: some options for bridge can be applied after the bridge is up +- remove ppp from translation + +* Tue Apr 15 2014 Lukáš Nykrýn - 9.54-1 +- move ppp support to ppp package +- remove fedora-configure +- network: detect if / is on netfs +- is_nm_handling: fix RE +- bonding: match whole name of interface +- network: add support for team devices +- ifup-wireless: fix syntax error +- fedora-readonly: fix prefix detection + +* Wed Mar 26 2014 Lukáš Nykrýn - 9.53-1 +- bridging: add possibility to set prio and ageing +- ifup: add possibility to specify value for -w parameter of arping +- network: try to not compete with NM during boot +- fedora-domainname: DefaultDependencies=no +- service: add condrestart to allowed commands +- update ifup/ifdown NetworkManager interaction once more(#1036701, #1061810) +- network: modify ifup-wireless so it doesn't call exit +- set shmmax and shmall defaults to match rhel6 values (#1056547) +- update ifup/ifdown NetworkManager interaction (#1036701, #1061810) +- service: fix action matching +- remove ifup-ipx from spec +- Delete IPX support. +- remove dependency on sysvinit-tools + +* Tue Jan 14 2014 Lukáš Nykrýn - 9.52-1 +- require procps-ng + +* Tue Jan 14 2014 Lukáš Nykrýn 9.51-1 +- readonly-root: bind-mount only necessary subset of entries in rwtab +- readonly-root: Add /var/log/audit/audit.log to rwtab +- readonly-root: restore selinux context after bind mount +- rename_device: remove comments and trailing whitespaces +- service: suggest using systemctl if unknown action is used +- ifup-eth: fix typo in error message +- use iw instead of iwconfig and friends +- update functions who call nmcli +- ifdown: fix typo in nmcli call + +* Tue Sep 03 2013 Lukas Nykryn - 9.50-1 +- ipcalc: support RFC3021 (#997271) +- symlink /etc/sysctl.conf -> /etc/sysctl.d/ +- man: only action specified in LSB are redirected to systemd +- service: filter actions that are not supported by systemctl in service (#947823) +- install_bonding_driver: drop check for existing device (#991335) +- consider IPV6INIT undefined as YES +- don't care about network filesystems + +* Fri Jul 12 2013 Lukáš Nykrýn - 9.48-1 +- man: add systemd man pages to service.8 "see also" section +- add possibility to set domainname through /etc/sysconfig/network +- rename_device: don't wait for lock with lower permissions +- 256term.csh: remove quotes around variable (#979796) +- drop useless variables from /etc/sysconfig/init +- readonly-root: rpcidmapd restart is not needed anymore +- ifup-eth: print error only if arping is really called (#974603) +- readonly-root: Add /var/lib/samba to rwtab + +* Fri May 31 2013 Lukáš Nykrýn - 9.47-1 +- network-functions: to determine state of nscd check socket not lock (#960779) +- sysconfig.txt advised saslauthd -a instead of -v +- update translations from transifex +- drop translation for other initscripts +- tweak ifup/ifdown usage and man page (#961917) +- ctrl-alt-delete.target is provided by systemd package +- remove some defaults from arch specific sysctl.conf +- readonly-root: remount rpc_pipefs if readonly-root is used +- service: mention legacy actions and systemctl redirection in man page + +* Fri Apr 12 2013 Lukáš Nykrýn - 9.46-1 +- add /var/lib/NetworkManager +- add ipip6 tunneling support (#928232, raorn@raorn.name) +- bonding: set master up before slaves +- set net.ipv6.conf.SYSCTLDEVICE.autoconf in ifup-ipv6 +- ifdown: don't call nmcli on interface that is alread down +- remove some defaults from sysctl.conf (move to systemd) +- call flush addresses with scope global +- service: action should not be empty when calling legacy-actions (#947817) +- ifup-eth: ignore arping errors (#928379) +- replace tunctl with ip tuntap (#947875) +- reload sysctl settings for vlans on ifup +- try dhcpv6 after v4 failed (#846618) + +* Fri Mar 15 2013 Lukáš Nykrýn - 9.45-2 +- provides /sbin/service + +* Fri Mar 15 2013 Lukáš Nykrýn - 9.45-1 +- turn on symlink protections in sysctl (#922030) +- add systemd-random-seed.service to Before= in fedora-readonly.service (#888615) +- mention rule6 files in sysconfig.txt +- skip nmcli for wireless device (#863707) +- remove config-noreplace from /etc/inittab (#627474) +- remount-rootfs.service got renamed to systemd-remount-fs.service +- compile netreport and usernetctl with full RELRO and PIE (#853178) +- move stuff directly to /usr (#905492) +- Remove NETWORKING_IPV6 from sysconfig.txt (#918622) +- fix greps to correctly handle comments and quotation + +* Wed Feb 20 2013 Lukáš Nykrýn - 9.44-1 +- limit udev rule for network renaming (#907365, mschmidt@redhat.com) +- fix path for arpwatch, seems to be in /var/lib on Fedora 18 +- fix the path for lvm cache, there is no file /etc/lvm/.cache ( but there is one /etc/lvm/cache ) +- fix path for dhcpd, is /var/lib/dhcpd since 2005 ( see 31cdb58df77 on the dhcp package git ) +- fix the patch for apache modules in rwtab, that are now in /var/cache/httpd +- remove no longer used directory ( at least in Fedora ), hald is deprecated, + /var/tux cannot be found and xend seems to use a subdirectory of /var/lib/xen +- correct the path for puppet directory in /etc/rwtab, now use /var/lib/puppet by default +- allow passing -F from /.autorelabel to fixfiles when relabeling system (#904279) +- correctly detect Open vSwitch device types +- clear DEVICE and TYPE variables before every iteration (#902463) +- sets BONDING_OPTS before interface is brougth up +- check an IP address for existence in ifup-alias (#852005) +- sync FSF address with GPL 2 text. +- fix rpmlint's spaces vs tabs warning. +- fix bogus %changelog dates. +- build with $RPM_LD_FLAGS. +- use -sf, not -s. (#901827) +- add /usr/libexec/initscripts to file list (#894475) +- rename term256 to 256term (glob sort) (#849429) +- readd missing shebang. (#885821) +- migrate even further away from /etc/sysconfig/network for hostname, and /etc/sysconfig/i18n. + +* Fri Dec 7 2012 Bill Nottingham - 9.43-1 +- 60-net.rules: explicitly set the interface name (#870859) +- ifup-eth: set firewall zone before ifup-ipv6 for DHCPv6 (#802415) +- migrate to /etc/locale.conf, /etc/vconsole.conf (#881923) +- rename_device: fix bogus locking +- fix wireless device detection for kernel 3.6 (#875328) +- drop fedora-storage-init, fedora-wait-storage () + +* Wed Oct 31 2012 Bill Nottingham - 9.42-1 +- Halloween release! +- add a default /etc/sysctl.conf that describes how to change values, and where the defaults now live. (#760254) +- translation updates +- fedora-autorelabel: don't pass -F to fixfiles (#863662, ) +- fix calling of firewall-cmd in ifup-post/ifdown-post () + +* Fri Oct 5 2012 Bill Nottingham - 9.41-1 +- debugmode: MALLOC_CHECK_ is not thread safe. Don't enable it by default (#853175) +- Add support for 256 color terminals () +- ifdown-eth: be less strict about VLAN name (#505314, ) +- drop prefdm +- ifup-eth: allow duplicate address detection to be disabled () +- process rule6-* for sit devices (#840009, ) + +* Mon Aug 6 2012 Bill Nottingham - 9.40-1 +- drop support for booting non-systemd systems +- drop legacy commands: getkey, fstab-decode, testd + +* Fri Jun 29 2012 Bill Nottingham - 9.39-1 +- assorted documentation cleanups +- typo, spelling, licenese clean up () +- service: add support for legacy custom actions packaged in + /usr/libexec/initscripts/legacy-actions/