diff --git a/.gitignore b/.gitignore index 7f32732..4446e74 100644 --- a/.gitignore +++ b/.gitignore @@ -56,10 +56,3 @@ /initscripts-10.17.tar.gz /initscripts-10.18.tar.gz /initscripts-10.19.tar.gz -/initscripts-10.20.tar.gz -/initscripts-10.21.tar.gz -/initscripts-10.23.tar.gz -/initscripts-10.24.tar.gz -/initscripts-10.25.tar.gz -/initscripts-10.26.tar.gz -/initscripts-10.27.tar.gz diff --git a/initscripts.spec b/initscripts.spec index 6dcbe5c..7df7a1c 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -18,7 +18,7 @@ Requires: gawk \ Name: initscripts Summary: Basic support for legacy System V init scripts -Version: 10.27 +Version: 10.19 Release: 1%{?dist} License: GPL-2.0-only @@ -55,7 +55,6 @@ BuildRequires: make BuildRequires: systemd Obsoletes: %{name} < 10.16-1 -Obsoletes: network-scripts < 10.25-1 # === PATCHES ================================================================= @@ -116,6 +115,57 @@ This package provides service command. # --------------- +%package -n network-scripts +Summary: Legacy scripts for manipulating of network devices +Requires: %{name}%{?_isa} = %{version}-%{release} + +%shared_requirements + +Requires: bc +Requires: dbus +Requires: dbus-tools +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 + +# This is legacy and deprecated, so nobody should depend on this! +# If ifcfg-style configuration is still desired, NetworkManager can do this. +# Thus, mark this as deprecated to ensure people know to not depend on it. +# Cf. https://docs.fedoraproject.org/en-US/packaging-guidelines/deprecating-packages/ +Provides: deprecated() + +%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} @@ -175,16 +225,25 @@ Please use systemd-volatile-root functionality instead, if possible. # --------------- %install -%make_install NO_NETWORK_SCRIPTS=true +%make_install # This installs the NLS language files: %find_lang %{name} -%if "%{_sbindir}" == "%{_bindir}" -# Some files get installed wrong, but if $(sbindir) is overriden, the build fails :( -mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/ +%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 @@ -198,6 +257,24 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/ # --------------- +%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 @@ -245,7 +322,7 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/ # --------------- -%{_bindir}/usleep +%{_bindir}/* %{_sbindir}/consoletype %{_sbindir}/genhostid @@ -260,7 +337,6 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/ # ============================================================================= %files -n initscripts-rename-device -%license COPYING %{_prefix}/lib/udev/rename_device @@ -269,7 +345,6 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/ # --------------- %files -n initscripts-service -%license COPYING %dir %{_libexecdir}/%{name} %dir %{_libexecdir}/%{name}/legacy-actions @@ -280,8 +355,27 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/ # --------------- +%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 -%license COPYING %config(noreplace) %{_sysconfdir}/sysconfig/netconsole %{_libexecdir}/netconsole @@ -290,8 +384,6 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/ # --------------- %files -n readonly-root -%license COPYING - %dir %{_sharedstatedir}/stateless %dir %{_sharedstatedir}/stateless/state %dir %{_sharedstatedir}/stateless/writable @@ -306,90 +398,6 @@ mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/ # ============================================================================= %changelog -* Thu Dec 11 2025 Jan Macku - 10.27-1 -- spec: add missing license files -- build(deps): bump actions/checkout from 5 to 6 -- build(deps): bump actions/upload-artifact from 4 to 5 -- build(deps): bump github/codeql-action from 3 to 4 -- ci: fix issues with missing base commit -- Translated using Weblate (Georgian) -- Translated using Weblate (Indonesian) -- Translated using Weblate (English (United Kingdom)) -- Translated using Weblate (Korean) -- Translated using Weblate (Turkish) -- man: add ifdown.8 -- build(deps): bump actions/checkout from 4 to 5 -- Translated using Weblate (Spanish) -- Translated using Weblate (Georgian) -- Translated using Weblate (Korean) -- Translated using Weblate (Portuguese (Brazil)) -- Translated using Weblate (Polish) -- Translated using Weblate (Greek) -- Translated using Weblate (Greek) -- Translated using Weblate (Spanish) -- Translated using Weblate (Georgian) -- Translated using Weblate (Greek) -- Translated using Weblate (Italian) -- Translated using Weblate (Chinese (Traditional) (zh_TW)) -- Translated using Weblate (Spanish) -- Translated using Weblate (Finnish) -- retry arping one more time in ifup-eth when sendto failed -- Translated using Weblate (French) -- ci: add dependency glib-2.0 -- network-functions: Fix a bug in is_nm_handling() - -* Tue Aug 27 2024 Jan Macku - 10.26-1 -- Translated using Weblate (Turkish) -- netconsole: var/lock -> run/lock -- netconsole: source sysconfig/network only if it exists -- netconsole: remove unused variables -- netconsole: remove trailing whitespaces -- Translated using Weblate (Turkish) - -* Tue Jun 25 2024 Jan Macku - 10.25-1 -- Revert "fix: return support for network-scripts for Fedora 40" - -* Wed May 29 2024 Jan Macku - 10.24-1 -- Fix build when %_bindir==%_sbindir - -* Tue Apr 16 2024 Jan Macku - 10.23-1 -- fix: return support for network-scripts for Fedora 40 - -* Wed Mar 06 2024 Jan Macku - 10.22-1 -- Translated using Weblate (Georgian) -- rename_device: free path after it is used -- rename_device: remove trailing whitespaces - -* Wed Feb 07 2024 Jan Macku - 10.21-1 -- fedora: don't build network-scripts rpm in f40+ (2/2) -- ci: trigger copr build on every push to main branch -- ifup-routes: print warning when ADDRESS0 entry is missing -- fedora: don't build network-scripts rpm in f40+ - -* Tue Jan 30 2024 Jan Macku - 10.20-1 -- Translated using Weblate (Georgian) -- Add -r to while read as per shellcheck -- Fix splitting spaces in paths from statetab files -- build(deps): bump actions/upload-artifact from 3 to 4 -- build(deps): bump github/codeql-action from 2 to 3 -- Translated using Weblate (Georgian) -- Translated using Weblate (Czech) -- Translated using Weblate (Punjabi) -- Translated using Weblate (Portuguese (Brazil)) -- build(deps): bump redhat-plumbers-in-action/differential-shellcheck -- build(deps): bump actions/checkout from 3 to 4 -- Translated using Weblate (Hungarian) -- Translated using Weblate (Finnish) -- Translated using Weblate (Georgian) -- Translated using Weblate (Chinese (Simplified) (zh_CN)) -- Translated using Weblate (English (United Kingdom)) -- Translated using Weblate (Korean) -- Translated using Weblate (Ukrainian) -- Translated using Weblate (Swedish) -- Translated using Weblate (Polish) -- Update translation files -- Translated using Weblate (Korean) - * Fri May 05 2023 Jan Macku - 10.19-1 - ci: update Packit configuration - spec: add missing changelog entry diff --git a/sources b/sources index e24e8e9..2c79373 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (initscripts-10.27.tar.gz) = 951f88158eaf7409f7d65c9875c9ba2611e6a805c17112ddbb34167a1638d87d2433c3962d20e66564669f3424dd7be1265cbe03a1a7d6b1c5413ed43d80148d +SHA512 (initscripts-10.19.tar.gz) = f6b22e589d79178c395c2ab9a071d9ac24d8ed039124dd5eea0f8111ab0bb9775829e661ee1a0fee9f8bbc8ba9540aca79139700815bc6c2aa6c848045f25f41