diff --git a/.gitignore b/.gitignore index 1cb58c5..7f32732 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,57 @@ /initscripts-9.52.tar.bz2 /initscripts-9.53.tar.bz2 /initscripts-9.54.tar.bz2 +/initscripts-9.55.tar.bz2 +/initscripts-9.56.1.tar.bz2 +/initscripts-9.58.tar.bz2 +/initscripts-9.59.tar.bz2 +/initscripts-9.60.tar.bz2 +/initscripts-9.61.tar.bz2 +/initscripts-9.62.tar.bz2 +/initscripts-9.63.tar.bz2 +/initscripts-9.64.tar.bz2 +/initscripts-9.65.tar.bz2 +/initscripts-9.66.tar.bz2 +/initscripts-9.67.tar.bz2 +/initscripts-9.68.tar.bz2 +/initscripts-9.69.tar.bz2 +/initscripts-9.70.tar.gz +/initscripts-9.71.tar.gz +/initscripts-9.72.tar.gz +/initscripts-9.74.tar.gz +/initscripts-9.75.tar.gz +/initscripts-9.76.tar.gz +/initscripts-9.77.tar.gz +/initscripts-9.78.tar.gz +/initscripts-9.79.tar.gz +/initscripts-9.80.tar.gz +/initscripts-9.81.tar.gz +/initscripts-9.82.tar.gz +/initscripts-9.83.tar.gz +/initscripts-10.00.tar.gz +/initscripts-10.01.tar.gz +/initscripts-10.02.tar.gz +/initscripts-10.03.tar.gz +/initscripts-10.04.tar.gz +/initscripts-10.05.tar.gz +/initscripts-10.06.tar.gz +/initscripts-10.07.tar.gz +/initscripts-10.08.tar.gz +/initscripts-10.09.tar.gz +/initscripts-10.10.tar.gz +/initscripts-10.11.tar.gz +/initscripts-10.12.tar.gz +/initscripts-10.13.tar.gz +/initscripts-10.14.tar.gz +/initscripts-10.15.tar.gz +/initscripts-10.16.tar.gz +/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/0001-remove-ppp-from-translation.patch b/0001-remove-ppp-from-translation.patch deleted file mode 100644 index b54c213..0000000 --- a/0001-remove-ppp-from-translation.patch +++ /dev/null @@ -1,500 +0,0 @@ -From e1f4ca4ebaab97166a315e0e54231ea8dbf7588c Mon Sep 17 00:00:00 2001 -From: Lukas Nykryn -Date: Thu, 24 Apr 2014 13:59:06 +0200 -Subject: [PATCH] remove ppp from translation - ---- - po/Makefile | 2 +- - po/initscripts.pot | 166 ++++++++++++++++++++--------------------------------- - 2 files changed, 62 insertions(+), 106 deletions(-) - -diff --git a/po/Makefile b/po/Makefile -index fb81b9a..a5658ec 100644 ---- a/po/Makefile -+++ b/po/Makefile -@@ -10,7 +10,7 @@ NLSPACKAGE = initscripts - CATALOGS = $(shell ls *.po) - FMTCATALOGS = $(patsubst %.po,%.mo,$(CATALOGS)) - --POTFILES = ../ppp/ip* $(shell ls ../sysconfig/network-scripts/* | grep -v ifcfg-) \ -+POTFILES = $(shell ls ../sysconfig/network-scripts/* | grep -v ifcfg-) \ - ../service ../sys-unconfig ../systemd/fedora-* ../rc.d/init.d/* - - all: $(NLSPACKAGE).pot $(FMTCATALOGS) -diff --git a/po/initscripts.pot b/po/initscripts.pot -index cd791f1..99d9cf8 100644 ---- a/po/initscripts.pot -+++ b/po/initscripts.pot -@@ -8,7 +8,7 @@ msgstr "" - "Content-Type: text/plain; charset=ISO-8859-1\n" - "Content-Transfer-Encoding: 8-bit\n" - --#: ../sysconfig/network-scripts/ifup-eth:231 -+#: ../sysconfig/network-scripts/ifup-eth:245 - msgid "Error, some other host already uses address ${ipaddr[$idx]}." - msgstr "" - -@@ -24,10 +24,6 @@ msgstr "" - msgid "Missing remote IPv4 address of tunnel, configuration is not valid" - msgstr "" - --#: ../service:78 --msgid "Redirecting to /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE}.service" --msgstr "" -- - #: ../rc.d/init.d/functions:410 - msgid "${base} status unknown due to insufficient privileges." - msgstr "" -@@ -40,7 +36,7 @@ msgstr "" - msgid "Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]" - msgstr "" - --#: ../ppp/ip-up.ipv6to4:123 ../sysconfig/network-scripts/ifup-ipv6:226 -+#: ../sysconfig/network-scripts/ifup-ipv6:226 - msgid "Warning: configured MTU '$IPV6TO4_MTU' for 6to4 exceeds maximum limit of '$tunnelmtu', ignored" - msgstr "" - -@@ -48,7 +44,7 @@ msgstr "" - msgid "Unsupported reason '$reason' for sending trigger to radvd" - msgstr "" - --#: ../sysconfig/network-scripts/ifup:103 ../sysconfig/network-scripts/ifup-eth:78 -+#: ../sysconfig/network-scripts/ifup:104 ../sysconfig/network-scripts/ifup-eth:85 - msgid "$alias device ${DEVICE} does not seem to be present, delaying initialization." - msgstr "" - -@@ -64,12 +60,8 @@ msgstr "" - msgid "*** when you leave the shell." - msgstr "" - --#: ../sysconfig/network-scripts/ifup-ppp:75 --msgid "ifup-ppp for ${DEVNAME} exiting" --msgstr "" -- --#: ../sysconfig/network-scripts/ifup-ppp:142 --msgid "pppd started for ${DEVNAME} on ${MODEMPORT} at ${LINESPEED}" -+#: ../sysconfig/network-scripts/ifup-eth:179 -+msgid "Determining IP information for ${DEVICE}..." - msgstr "" - - #: ../rc.d/init.d/functions:463 -@@ -88,12 +80,8 @@ msgstr "" - msgid "$base startup" - msgstr "" - --#: ../ppp/ip-down.ipv6to4:35 ../ppp/ip-up.ipv6to4:41 --msgid "Argument 1 is empty but should contain interface name - skip IPv6to4 initialization" --msgstr "" -- --#: ../ppp/ip-up.ipv6to4:189 ../sysconfig/network-scripts/ifup-ipv6:292 --msgid "radvd control enabled, but config is not complete" -+#: ../sysconfig/network-scripts/ifup-eth:43 -+msgid "Device ${DEVICE} has different MAC address than expected, ignoring." - msgstr "" - - #: ../sysconfig/network-scripts/network-functions-ipv6:383 -@@ -104,11 +92,11 @@ msgstr "" - msgid "Server address not specified in /etc/sysconfig/netconsole" - msgstr "" - --#: ../sysconfig/network-scripts/network-functions-ipv6:798 --msgid "Missing parameter 'IPv6 MTU' (arg 2)" -+#: ../rc.d/init.d/functions:419 -+msgid "${base} dead but subsys locked" - msgstr "" - --#: ../rc.d/init.d/network:67 -+#: ../rc.d/init.d/network:65 - msgid "Bringing up loopback interface: " - msgstr "" - -@@ -124,27 +112,35 @@ msgstr "" - msgid "Missing parameter 'selection' (arg 2)" - msgstr "" - --#: ../ppp/ip-up.ipv6to4:91 ../sysconfig/network-scripts/ifup-ipv6:211 -+#: ../sysconfig/network-scripts/ifup-ipv6:211 - msgid "IPv6to4 configuration needs an IPv4 address on related interface or otherwise specified" - msgstr "" - -+#: ../sysconfig/network-scripts/ifup-aliases:165 -+msgid "error in $FILE: invalid alias number" -+msgstr "" -+ - #: ../sysconfig/network-scripts/ifup-aliases:190 - msgid "error iN $FILE: didn't specify netmask or prefix" - msgstr "" - -+#: ../sysconfig/network-scripts/ifup-aliases:264 -+msgid "Error, some other host already uses address ${IPADDR}." -+msgstr "" -+ - #: ../sysconfig/network-scripts/ifdown-tunnel:36 ../sysconfig/network-scripts/ifup-tunnel:63 - msgid "Device '$DEVICE' isn't supported as a valid GRE device name." - msgstr "" - --#: ../sysconfig/network-scripts/ifup-eth:43 --msgid "Device ${DEVICE} has different MAC address than expected, ignoring." -+#: ../sysconfig/network-scripts/ifup-ipv6:292 -+msgid "radvd control enabled, but config is not complete" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-aliases:264 --msgid "Error, some other host already uses address ${IPADDR}." -+#: ../sysconfig/network-scripts/ifup-eth:279 -+msgid "Error adding default gateway for ${REALDEVICE}." - msgstr "" - --#: ../rc.d/init.d/network:271 -+#: ../rc.d/init.d/network:244 - msgid "Usage: $0 {start|stop|status|restart|reload|force-reload}" - msgstr "" - -@@ -156,7 +152,7 @@ msgstr "" - msgid "Initializing netconsole" - msgstr "" - --#: ../sysconfig/network-scripts/ifdown-eth:42 ../sysconfig/network-scripts/ifdown-eth:48 -+#: ../sysconfig/network-scripts/ifdown-eth:46 ../sysconfig/network-scripts/ifdown-eth:52 - msgid "Device ${DEVICE} has MAC address ${FOUNDMACADDR}, instead of configured address ${HWADDR}. Ignoring." - msgstr "" - -@@ -164,7 +160,7 @@ msgstr "" - msgid "FAILED" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-eth:286 -+#: ../sysconfig/network-scripts/ifup-eth:301 - msgid "Determining IPv6 information for ${DEVICE}..." - msgstr "" - -@@ -176,8 +172,8 @@ msgstr "" - msgid "$0: Usage: daemon [+/-nicelevel] {program}" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-aliases:165 --msgid "error in $FILE: invalid alias number" -+#: ../sysconfig/network-scripts/network-functions-ipv6:798 -+msgid "Missing parameter 'IPv6 MTU' (arg 2)" - msgstr "" - - #: ../sysconfig/network-scripts/network-functions-ipv6:159 -@@ -188,7 +184,7 @@ msgstr "" - msgid "Usage: ifup " - msgstr "" - --#: ../sysconfig/network-scripts/ifup:126 ../sysconfig/network-scripts/ifup:127 -+#: ../sysconfig/network-scripts/ifup:127 ../sysconfig/network-scripts/ifup:128 - msgid "ERROR: could not add vlan ${VID} as ${DEVICE} on dev ${PHYSDEV}" - msgstr "" - -@@ -196,11 +192,11 @@ msgstr "" - msgid "ERROR: ${DEVICE} did not come up!" - msgstr "" - --#: ../ppp/ip-up.ipv6to4:138 ../sysconfig/network-scripts/ifup-ipv6:240 -+#: ../sysconfig/network-scripts/ifup-ipv6:240 - msgid "Warning: interface 'tun6to4' does not support 'IPV6_DEFAULTGW', ignored" - msgstr "" - --#: ../rc.d/init.d/network:133 ../rc.d/init.d/network:140 -+#: ../rc.d/init.d/network:121 ../rc.d/init.d/network:128 - msgid "Bringing up interface $i: " - msgstr "" - -@@ -208,7 +204,7 @@ msgstr "" - msgid "Usage: $0 {start|stop|reload|restart|showsysctl}" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-eth:80 -+#: ../sysconfig/network-scripts/ifup-eth:87 - msgid "Device ${DEVICE} does not seem to be present, delaying initialization." - msgstr "" - -@@ -220,7 +216,7 @@ msgstr "" - msgid "Missing parameter 'device' (arg 1)" - msgstr "" - --#: ../rc.d/init.d/network:82 -+#: ../rc.d/init.d/network:70 - msgid "No 802.1Q VLAN support available in kernel." - msgstr "" - -@@ -256,7 +252,7 @@ msgstr "" - msgid "error in $FILE: IPADDR_START greater than IPADDR_END" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-eth:260 -+#: ../sysconfig/network-scripts/ifup-eth:275 - msgid "Error adding default gateway ${GATEWAY} for ${DEVICE}." - msgstr "" - -@@ -264,7 +260,7 @@ msgstr "" - msgid " OK " - msgstr "" - --#: ../sysconfig/network-scripts/network-functions:540 -+#: ../sysconfig/network-scripts/network-functions:545 - msgid "INFO " - msgstr "" - -@@ -276,7 +272,7 @@ msgstr "" - msgid "Users cannot control this device." - msgstr "" - --#: ../sysconfig/network-scripts/ifup:89 -+#: ../sysconfig/network-scripts/ifup:90 - msgid "PHYSDEV should be set for device ${DEVICE}" - msgstr "" - -@@ -284,7 +280,7 @@ msgstr "" - msgid "radvd not (properly) installed, triggering failed" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-eth:177 ../sysconfig/network-scripts/ifup-eth:290 -+#: ../sysconfig/network-scripts/ifup-eth:191 ../sysconfig/network-scripts/ifup-eth:305 - msgid " failed." - msgstr "" - -@@ -296,7 +292,7 @@ msgstr "" - msgid "*** Warning -- SELinux ${SELINUXTYPE} policy relabel is required. " - msgstr "" - --#: ../rc.d/init.d/network:258 -+#: ../rc.d/init.d/network:231 - msgid "Configured devices:" - msgstr "" - -@@ -332,23 +328,15 @@ msgstr "" - msgid "Invalid tunnel type $TYPE" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-ppp:48 --msgid "pppd does not exist or is not executable for ${DEVICE}" --msgstr "" -- - #: ../sysconfig/network-scripts/ifup:37 - msgid "$0: configuration for ${1} not found." - msgstr "" - --#: ../sysconfig/network-scripts/ifup-eth:165 --msgid "Determining IP information for ${DEVICE}..." --msgstr "" -- - #: ../systemd/fedora-autorelabel:19 - msgid "*** /etc/selinux/config indicates you want to manually fix labeling" - msgstr "" - --#: ../sysconfig/network-scripts/network-functions:537 -+#: ../sysconfig/network-scripts/network-functions:542 - msgid "WARN " - msgstr "" - -@@ -360,10 +348,6 @@ msgstr "" - msgid "netconsole: can't resolve MAC address of $SYSLOGADDR" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-ppp:46 --msgid "ifup-ppp for ${DEVICE} exiting" --msgstr "" -- - #: ../sysconfig/network-scripts/ifdown-routes:5 - msgid "usage: ifdown-routes []" - msgstr "" -@@ -372,7 +356,7 @@ msgstr "" - msgid "Bridge support not available: brctl not found" - msgstr "" - --#: ../rc.d/init.d/network:261 -+#: ../rc.d/init.d/network:234 - msgid "Currently active devices:" - msgstr "" - -@@ -388,7 +372,7 @@ msgstr "" - msgid "Missing parameter 'IPv4 address' (arg 1)" - msgstr "" - --#: ../rc.d/init.d/network:232 -+#: ../rc.d/init.d/network:213 - msgid "Shutting down interface $i: " - msgstr "" - -@@ -432,10 +416,6 @@ msgstr "" - msgid "Missing parameter 'global IPv4 address' (arg 2)" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-ppp:74 --msgid "/etc/sysconfig/network-scripts/chat-${DEVNAME} does not exist" --msgstr "" -- - #: ../rc.d/init.d/netconsole:114 - msgid "netconsole module not loaded" - msgstr "" -@@ -452,10 +432,6 @@ msgstr "" - msgid "6to4 configuration is not valid" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-ppp:82 --msgid "Setting up a new ${PEERCONF} config file" --msgstr "" -- - #: ../sysconfig/network-scripts/ifup-aliases:316 - msgid "error in $FILE: IPADDR_START and IPADDR_END don't agree" - msgstr "" -@@ -464,11 +440,7 @@ msgstr "" - msgid "$base $killlevel" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-ppp:59 --msgid "adsl-start does not exist or is not executable for ${DEVICE}" --msgstr "" -- --#: ../sysconfig/network-scripts/ifup-eth:167 -+#: ../sysconfig/network-scripts/ifup-eth:181 - msgid " failed; no link present. Check cable?" - msgstr "" - -@@ -480,14 +452,14 @@ msgstr "" - msgid "Device '$device' enabling didn't work" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-ppp:77 --msgid "/etc/sysconfig/network-scripts/chat-${DEVNAME} does not exist for ${DEVICE}" --msgstr "" -- - #: ../sysconfig/network-scripts/network-functions-ipv6:186 - msgid "Cannot add IPv6 address '$address' on dev '$device'" - msgstr "" - -+#: ../service:81 -+msgid "The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl." -+msgstr "" -+ - #: ../sysconfig/network-scripts/ifup-ippp:376 - msgid "Warning: link doesn't support IPv6 using encapsulation 'rawip'" - msgstr "" -@@ -508,35 +480,27 @@ msgstr "" - msgid "Disabling netconsole" - msgstr "" - --#: ../systemd/fedora-configure:19 --msgid "Resetting hostname ${HOSTNAME}: " --msgstr "" -- --#: ../rc.d/init.d/network:246 -+#: ../rc.d/init.d/network:219 - msgid "Shutting down loopback interface: " - msgstr "" - --#: ../sysconfig/network-scripts/ifup-eth:264 --msgid "Erorr adding default gateway for ${REALDEVICE}." --msgstr "" -- - #: ../systemd/fedora-autorelabel:28 - msgid "*** system size and speed of hard drives." - msgstr "" - --#: ../sysconfig/network-scripts/network-functions:531 --msgid "DEBUG " -+#: ../sysconfig/network-scripts/network-functions-ipv6:710 -+msgid "Unsupported selection '$selection' specified (arg 2)" - msgstr "" - - #: ../sysconfig/network-scripts/network-functions-ipv6:959 - msgid "No reason given for sending trigger to radvd" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-ipx:7 --msgid "usage: $0 " -+#: ../service:78 -+msgid "Redirecting to /bin/systemctl ${ACTION} ${OPTIONS} ${SERVICE}.service" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-eth:174 ../sysconfig/network-scripts/ifup-eth:288 -+#: ../sysconfig/network-scripts/ifup-eth:188 ../sysconfig/network-scripts/ifup-eth:303 - msgid " done." - msgstr "" - -@@ -560,10 +524,6 @@ msgstr "" - msgid "$STRING" - msgstr "" - --#: ../rc.d/init.d/functions:419 --msgid "${base} dead but subsys locked" --msgstr "" -- - #: ../sysconfig/network-scripts/ifup-aliases:175 - msgid "error in $FILE: already seen ipaddr $IPADDR in $ipseen" - msgstr "" -@@ -572,19 +532,19 @@ msgstr "" - msgid "Stopping $prog (via systemctl): " - msgstr "" - --#: ../sysconfig/network-scripts/ifup-eth:237 -+#: ../sysconfig/network-scripts/ifup-eth:252 - msgid "Error adding address ${ipaddr[$idx]} for ${DEVICE}." - msgstr "" - --#: ../sysconfig/network-scripts/network-functions-ipv6:710 --msgid "Unsupported selection '$selection' specified (arg 2)" -+#: ../sysconfig/network-scripts/network-functions:536 -+msgid "DEBUG " - msgstr "" - - #: ../sysconfig/network-scripts/network-functions-ipv6:1014 - msgid "Pidfile '$pidfile' is empty, cannot send trigger to radvd" - msgstr "" - --#: ../sysconfig/network-scripts/ifup-eth:201 -+#: ../sysconfig/network-scripts/ifup-eth:215 - msgid "Failed to bring up ${DEVICE}." - msgstr "" - -@@ -592,7 +552,7 @@ msgstr "" - msgid "Cannot enable IPv6 privacy method '$IPV6_PRIVACY', not supported by kernel" - msgstr "" - --#: ../rc.d/init.d/network:152 -+#: ../rc.d/init.d/network:140 - msgid "Legacy static-route support not available: /sbin/route not found" - msgstr "" - -@@ -612,7 +572,7 @@ msgstr "" - msgid "${base} (pid $pid) is running..." - msgstr "" - --#: ../sysconfig/network-scripts/ifup:96 -+#: ../sysconfig/network-scripts/ifup:97 - msgid "No 802.1Q VLAN support available in kernel for device ${DEVICE}" - msgstr "" - -@@ -620,11 +580,11 @@ msgstr "" - msgid "Given IPv6 default device '$device' doesn't exist or isn't up" - msgstr "" - --#: ../ppp/ip-up.ipv6to4:87 ../sysconfig/network-scripts/ifup-ipv6:198 -+#: ../sysconfig/network-scripts/ifup-ipv6:198 - msgid "Given IPv4 address '$ipv4addr' is not globally usable" - msgstr "" - --#: ../ppp/ip-up.ipv6to4:186 ../sysconfig/network-scripts/ifup-ipv6:289 -+#: ../sysconfig/network-scripts/ifup-ipv6:289 - msgid "Error occurred while calculating the IPv6to4 prefix" - msgstr "" - -@@ -632,11 +592,7 @@ msgstr "" - msgid "Restarting $prog (via systemctl): " - msgstr "" - --#: ../sysconfig/network-scripts/ifup-ppp:45 --msgid "pppd does not exist or is not executable" --msgstr "" -- --#: ../sysconfig/network-scripts/network-functions:534 -+#: ../sysconfig/network-scripts/network-functions:539 - msgid "ERROR " - msgstr "" - --- -1.9.0 - diff --git a/README.md b/README.md new file mode 100644 index 0000000..c4d7518 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Additional information + +Check upstream's [README.md](https://github.com/fedora-sysv/initscripts/blob/master/README.md) for more info. diff --git a/initscripts.spec b/initscripts.spec index a2ef80a..6dcbe5c 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -1,220 +1,849 @@ -Summary: The inittab file and the /etc/init.d scripts -Name: initscripts -Version: 9.54 -License: GPLv2 -Group: System Environment/Base -Release: 4%{?dist} -URL: http://fedorahosted.org/releases/i/n/initscripts/ -Source: http://fedorahosted.org/releases/i/n/initscripts/initscripts-%{version}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Obsoletes: initscripts-legacy <= 9.39 -Requires: /bin/awk, sed, coreutils -Requires: grep -Requires: module-init-tools -Requires: util-linux >= 2.16 -Requires: bash >= 3.0 -Requires: procps-ng >= 3.3.8-16 -Conflicts: systemd < 23-1 -Conflicts: systemd-units < 23-1 -Conflicts: lvm2 < 2.02.98-3 -Conflicts: dmraid < 1.0.0.rc16-18 -Requires: systemd -Requires: iproute, /sbin/arping, findutils -# Not strictly required, but nothing else requires it -Requires: /etc/system-release -Requires: udev >= 125-1 -Requires: cpio -Requires: hostname -Conflicts: ipsec-tools < 0.8.0-2 -Conflicts: NetworkManager < 0.9.9.0-37.git20140131.el7 -Conflicts: ppp < 2.4.6-4 -Requires(pre): /usr/sbin/groupadd -Requires(post): /sbin/chkconfig, coreutils -Requires(preun): /sbin/chkconfig -BuildRequires: glib2-devel popt-devel gettext pkgconfig -Provides: /sbin/service +# === 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.27 +Release: 1%{?dist} + +License: GPL-2.0-only + +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: chkconfig +Requires: initscripts-service +Requires: initscripts-rename-device + +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 +BuildRequires: make + +%{?systemd_requires} +BuildRequires: systemd + +Obsoletes: %{name} < 10.16-1 +Obsoletes: network-scripts < 10.25-1 + +# === 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: -Patch0: 0001-remove-ppp-from-translation.patch %description -The initscripts package contains the basic system scripts used to boot -your Red Hat or Fedora system, change runlevels, and shut the system down -cleanly. Initscripts also contains the scripts that activate and -deactivate most network interfaces. +This package provides basic support for legacy System V init scripts, and some +other legacy tools & utilities. -%package -n debugmode -Summary: Scripts for running in debugging mode -Requires: initscripts -Group: System Environment/Base +# === SUBPACKAGES ============================================================= -%description -n debugmode -The debugmode package contains some basic scripts that are used to run -the system in a debugging mode. +%package -n initscripts-rename-device +Summary: Udev helper utility that provides network interface naming -Currently, this consists of various memory checking code. +%shared_requirements + +%description -n initscripts-rename-device +Udev helper utility that provides network interface naming + +# --------------- + +%package -n initscripts-service +Summary: Support for service command +BuildArch: noarch + +%shared_requirements + +Requires: systemd + +Provides: /sbin/service + +%description -n initscripts-service +This package provides service command. + +# --------------- + +%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. + +Please note that readonly-root package is considered deprecated with limited support. +Please use systemd-volatile-root functionality instead, if possible. + +# === BUILD INSTRUCTIONS ====================================================== %prep -%setup -q -%autopatch -p1 +%autosetup -S git +# --------------- %build -make +%make_build PYTHON=%{__python3} + +# --------------- %install -rm -rf $RPM_BUILD_ROOT -make ROOT=$RPM_BUILD_ROOT SUPERUSER=`id -un` SUPERGROUP=`id -gn` mandir=%{_mandir} install +%make_install NO_NETWORK_SCRIPTS=true +# This installs the NLS language files: %find_lang %{name} -%ifnarch s390 s390x -rm -f \ - $RPM_BUILD_ROOT/etc/sysconfig/network-scripts/ifup-ctc \ -%else -rm -f \ - $RPM_BUILD_ROOT/etc/sysconfig/init.s390 +%if "%{_sbindir}" == "%{_bindir}" +# Some files get installed wrong, but if $(sbindir) is overriden, the build fails :( +mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/ %endif -touch $RPM_BUILD_ROOT/etc/crypttab -chmod 600 $RPM_BUILD_ROOT/etc/crypttab - -rm -f $RPM_BUILD_ROOT/etc/rc.d/rc.local $RPM_BUILD_ROOT/etc/rc.local -touch $RPM_BUILD_ROOT/etc/rc.d/rc.local -chmod 755 $RPM_BUILD_ROOT/etc/rc.d/rc.local - -%pre -/usr/sbin/groupadd -g 22 -r -f utmp +# ============================================================================= %post -touch /var/log/wtmp /var/run/utmp /var/log/btmp -chown root:utmp /var/log/wtmp /var/run/utmp /var/log/btmp -chmod 664 /var/log/wtmp /var/run/utmp -chmod 600 /var/log/btmp - -/usr/sbin/chkconfig --add network -/usr/sbin/chkconfig --add netconsole -if [ $1 -eq 1 ]; then - /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : -fi +%systemd_post import-state.service loadmodules.service %preun -if [ $1 = 0 ]; then - /usr/sbin/chkconfig --del network - /usr/sbin/chkconfig --del netconsole -fi - -%triggerun -- initscripts < 7.62 -/usr/sbin/chkconfig --del random -/usr/sbin/chkconfig --del rawdevices -exit 0 +%systemd_preun import-state.service loadmodules.service %postun -if [ $1 -ge 1 ]; then - /usr/bin/systemctl daemon-reload > /dev/null 2>&1 || : -fi +%systemd_postun import-state.service loadmodules.service -%clean -rm -rf $RPM_BUILD_ROOT +# --------------- + +%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 -%defattr(-,root,root) -%dir /etc/sysconfig/network-scripts -%config(noreplace) %verify(not md5 mtime size) /etc/adjtime -%config(noreplace) /etc/sysconfig/init -%config(noreplace) /etc/sysconfig/netconsole -%config(noreplace) /etc/sysconfig/readonly-root -/etc/sysconfig/network-scripts/ifdown -/usr/sbin/ifdown -/etc/sysconfig/network-scripts/ifdown-post -/etc/sysconfig/network-scripts/ifup -/usr/sbin/ifup -%dir /etc/sysconfig/console -%dir /etc/sysconfig/modules -/etc/sysconfig/network-scripts/network-functions -/etc/sysconfig/network-scripts/network-functions-ipv6 -/etc/sysconfig/network-scripts/init.ipv6-global -%config(noreplace) /etc/sysconfig/network-scripts/ifcfg-lo -/etc/sysconfig/network-scripts/ifup-post -/etc/sysconfig/network-scripts/ifup-routes -/etc/sysconfig/network-scripts/ifdown-routes -/etc/sysconfig/network-scripts/ifup-plip -/etc/sysconfig/network-scripts/ifup-plusb -/etc/sysconfig/network-scripts/ifup-bnep -/etc/sysconfig/network-scripts/ifdown-bnep -/etc/sysconfig/network-scripts/ifup-eth -/etc/sysconfig/network-scripts/ifdown-eth -/etc/sysconfig/network-scripts/ifup-ipv6 -/etc/sysconfig/network-scripts/ifdown-ipv6 -/etc/sysconfig/network-scripts/ifup-sit -/etc/sysconfig/network-scripts/ifdown-sit -/etc/sysconfig/network-scripts/ifup-tunnel -/etc/sysconfig/network-scripts/ifdown-tunnel -/etc/sysconfig/network-scripts/ifup-aliases -/etc/sysconfig/network-scripts/ifup-ippp -/etc/sysconfig/network-scripts/ifdown-ippp -/etc/sysconfig/network-scripts/ifup-wireless -/etc/sysconfig/network-scripts/ifup-isdn -/etc/sysconfig/network-scripts/ifdown-isdn -%ifarch s390 s390x -/etc/sysconfig/network-scripts/ifup-ctc -%endif -%config(noreplace) /etc/networks -/etc/rwtab -%dir /etc/rwtab.d -/etc/statetab -%dir /etc/statetab.d -/usr/lib/systemd/fedora-* -/usr/lib/systemd/system/* -/etc/inittab -%dir /etc/rc.d -%dir /etc/rc.d/rc[0-9].d -/etc/rc[0-9].d -%dir /etc/rc.d/init.d -/etc/rc.d/init.d/* -%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/rc.d/rc.local -%config(noreplace) /etc/sysctl.conf -/usr/lib/sysctl.d/00-system.conf -/etc/sysctl.d/99-sysctl.conf -%exclude /etc/profile.d/debug* -/etc/profile.d/* -/usr/sbin/sys-unconfig -/usr/bin/ipcalc -/usr/bin/usleep -%attr(4755,root,root) /usr/sbin/usernetctl -/usr/sbin/consoletype -/usr/sbin/genhostid -/usr/sbin/sushell -%attr(2755,root,root) /usr/sbin/netreport -/usr/lib/udev/rules.d/* -/usr/lib/udev/rename_device -/usr/sbin/service -%{_mandir}/man*/* -%dir %attr(775,root,root) /var/run/netreport -%dir /etc/NetworkManager -%dir /etc/NetworkManager/dispatcher.d -/etc/NetworkManager/dispatcher.d/00-netreport -%doc sysconfig.txt sysvinitfiles static-routes-ipv6 ipv6-tunnel.howto ipv6-6to4.howto changes.ipv6 COPYING -/var/lib/stateless -%ghost %attr(0600,root,utmp) /var/log/btmp -%ghost %attr(0664,root,utmp) /var/log/wtmp -%ghost %attr(0664,root,utmp) /var/run/utmp -%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/crypttab -%dir /usr/lib/tmpfiles.d -/usr/lib/tmpfiles.d/initscripts.conf -%dir /usr/libexec/initscripts -%dir /usr/libexec/initscripts/legacy-actions +%license COPYING +%doc doc/sysconfig.txt -%files -n debugmode -%defattr(-,root,root) -%config(noreplace) /etc/sysconfig/debug -/etc/profile.d/debug* +# 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 + +# --------------- + +%{_sysconfdir}/rc.d/init.d/functions + +# RC symlinks: +%{_sysconfdir}/rc[0-6].d + +%{_sysconfdir}/init.d + +# --------------- + +%{_bindir}/usleep +%{_sbindir}/consoletype +%{_sbindir}/genhostid + +%{_libexecdir}/import-state +%{_libexecdir}/loadmodules + +%{_prefix}/lib/systemd/system/import-state.service +%{_prefix}/lib/systemd/system/loadmodules.service + +%{_mandir}/man1/* + +# ============================================================================= + +%files -n initscripts-rename-device +%license COPYING + +%{_prefix}/lib/udev/rename_device + +%{_udevrulesdir}/* + +# --------------- + +%files -n initscripts-service +%license COPYING + +%dir %{_libexecdir}/%{name} +%dir %{_libexecdir}/%{name}/legacy-actions + +%{_sbindir}/service + +%{_mandir}/man8/service.* + +# --------------- + +%files -n netconsole-service +%license COPYING +%config(noreplace) %{_sysconfdir}/sysconfig/netconsole + +%{_libexecdir}/netconsole +%{_prefix}/lib/systemd/system/netconsole.service + +# --------------- + +%files -n readonly-root +%license COPYING + +%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 -* Sat Jun 07 2014 Fedora Release Engineering - 9.54-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild +* 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() -* Wed May 21 2014 Lukáš Nykrýn - 9.54-3 -- don't require sysctl, it is in procps anyway +* 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 +- Revert "releng: Enable Packit to handle Fedora updates" +- Revert "releng: Convert to rpmautospec" +- doc: update translations +- spec: remove changelog + +* Thu Mar 23 2023 Jan Macku - 10.18-1 +- Translated using Weblate (English (United Kingdom)) +- migrate to SPDX license +- ci(Mergify): configuration update +- Translated using Weblate (German) +- Translated using Weblate (English (United Kingdom)) +- doc: update badges +- ci(lint): Add Differential PyLint GitHub Action +- ci(lint): Add permission `security-events: write` +- ci: Update Differential ShellCheck to `@v4` +- doc: fix markdown warnings and update badge +- ci: Setup CodeQL to replace deprecated LGTM +- releng: Enable Packit to handle Fedora updates +- releng: Convert to rpmautospec +- build(deps): bump redhat-plumbers-in-action/differential-shellcheck + +* Wed Aug 24 2022 Jan Macku - 10.17-1 +- service: Exit when `/etc/init.d` is missing +- ci: Update workflows to run on main branch +- ci: remove differential-shellcheck configs +- doc: Use main branch in links +- dependabot: Monthly updates +- ci(Mergify): configuration update +- Translated using Weblate (Georgian) +- Translated using Weblate (Georgian) +- ci: Update `packit.yml` +- ci: Update Github workflows & add Dependabot +- Translated using Weblate (Estonian) +- Translated using Weblate (Georgian) +- Translated using Weblate (Georgian) +- Translated using Weblate (Czech) +- Drop unnecessary obsoletes + +* Wed Feb 23 2022 Adam Williamson - 10.16-2 +- Drop unnecessary obsoletes + +* Wed Feb 23 2022 Jan Macku - 10.16-1 +- spec: Move rename_device to subpackage `initscripts-rename-device` + +* Tue Feb 15 2022 Jan Macku - 10.15-1 +- spec: network-scripts needs to depend on dbus-tools for NetworkManager detection +- packit: Run copr builds on release as well +- ci: Update `.packit.yml` to run on `c8s` `c9s` and `rawhide` +- Translated using Weblate (Finnish) +- ci: Use Differential ShellCheck action +- ci(Mergify): configuration update + +* Mon Jan 24 2022 Jan Macku - 10.14-1 +- ifup-routes: Revert quotes +- ifup-routes: Use `ip replace` only on type `route` +- ci(Mergify): configuration update +- ci: remove testing branch from `shellcheck_test.yml` + +* Thu Jan 13 2022 Jan Macku - 10.13-1 +- ifup-routes: Log when using `ip $type replace` +- ifup-routes: Use `ip route repace` to avoid race +- Translated using Weblate (German) +- Add LGTM badges to README +- ci: set default merge method to rebase +- ci: disable comments under opened PR in order to fix CI +- network scripts: do not use c-style for-loop +- network scripts: replace "<<<" with pipe +- rc.d/functions: do not use "+=" to concatenate string +- ci: Use default github-token (#395) +- ci(Mergify): configuration update (#394) +- ci: Output shellcheck results using PR comments (#393) +- ci: Update path to csdiff repository (#391) +- spec: Fix issue with $NEXT_VERSION (#390) +- Translated using Weblate (Indonesian) +- Translated using Weblate (Spanish) +- Translated using Weblate (Czech) + +* Fri Sep 03 2021 Jan Macku - 10.12-1 +- spec: Update relation between initscripts and initscripts-service (#386) + +* Fri Aug 27 2021 Jan Macku - 10.11-1 +- specfile: Update obsoletes to allow upgrades (#385) + +* Thu Aug 26 2021 Jan Macku - 10.10-1 +- Translated using Weblate (Friulian) (#381) +- Translations update from Weblate (#378) +- added veth support +- ifup-eth: add a new PERSISTENT_DHCLIENT_IPV6 option for IPv6 dhclient daemon +- ifdown removes veth pair if both peers are down +- rename_device: also support dracut-style kernel cmdline configuration +- spec: Mark network-scripts as deprecated +- spec: Initscripts now requires chkconfig (#374) +- Translations update from Weblate (#371) +- spec: Move service script into subpackage +- ci: Onboard initscripts to Packit +- ci: Migrate from Travis to GH Actions + +* Mon Feb 15 2021 Jan Macku - 10.09-1 +- doc: Document ARPING_WAIT and ARPING_UPDATE_WAIT +- network scripts: Avoid infinite loop of arping + +* Thu Feb 4 2021 Jan Macku - 10.08-1 +- network: fix condition in set_link_up() +- spec: sync with Fedora + +* Fri Jan 22 2021 Jan Macku - 10.07-1 +- doc: Fix "Duplicated string found in the file." +- doc: Documents RES_OPTIONS option +- doc: Documents ifcfg option LINKSTATUS +- ci: use up to date keywords and fix some warnings +- network: fix set_link_up() +- network: add option to keep the link down +- Rework of shell ci +- Translations update from Weblate + +* Fri Nov 13 2020 Jan Macku - 10.06-1 +- service: catch unsupported action keywords +- makefile: Use rpmdev-bumpspec's legacy date option + +* Fri Nov 06 2020 Jan Macku - 10.05-1 +- service: Prevent variables from globbing +- init.d/functions: Make usage msgs more clear +- network-scripts: Use net_log() instead of logger +- Allow updating rfkill switch status while in readonly root mode +- Add info into specfile about readonly-root deprecation +- Allow updating mlocate.db while in readonly root mode +- rc.d/functions: replace grep's --quiet with -q +- Add warning to warn user when ETHTOOL_OPTS is set and ethtool binary is missing - Olav Vitters +- Fix spacing in Makefile +- Add optional 'dev' keyword + +* Tue Jul 14 2020 Jan Macku - 10.04-1 +- Maintain permisision to set umask +- rwtab: Add support for chrony +- Correct spelling, IP, … +- Fix spelling, for more info +- Fix spelling of SELinux +- Translations update from Weblate + +* Tue Mar 24 2020 Jan Macku - 10.03-1 +- Replace grep -EL with subshell since -L changed behaviour +- Wait for scope link addresses as well as for scope global addresses +- Remove deprecated option -m of pidof +- Use function is_true for testing true conditions +- Adding new travis job for testing shell-scripts +- Remove zanata conf +- pull latest translations +- Update of translations and remove files with no translations +- Fix service network stop cmd +- Change spacing of service file to folow spacing of project +- network-function: bridges are created by ifup-eth +- Initscripts no longer care about rc.local +- Repalace hardcoded tests for yes and no with testing functions +- ifup-eth: Fix bridge setting stp option +- Fix bug in service(8) +- ifup-eth: Check that device name is set +- Fix missing python3 during build phase +- rc.d/functions: fix escape sequence being output under systemd service units +- Add ip6gre tunnel option +- ifup/ifdown: print DEPRECATION_WARNING_ISSUED waring info after source_config + +* Fri Jun 28 2019 Jan Macku - 10.02-1 +- network: don't fail with IFDOWN_ON_SHUTDOWN +- rc.d/functions: remove support cgroups +- Create symlink (/etc/init.d) to /etc/rc.d/init.d +- Add option to wait until target is reachable +- ifup-eth: apply PERSISTENT_DHCLIENT to IPv6 dhclient daemon +- ifup-post: fix incorrect condition for RESOLV_MODS +- make tag: updated message +- make release-commit: do not create tag automatically + +* 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 @@ -247,7 +876,7 @@ rm -rf $RPM_BUILD_ROOT * 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 +- 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 @@ -276,7 +905,7 @@ rm -rf $RPM_BUILD_ROOT * 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 instad of -v +- 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) @@ -922,7 +1551,7 @@ rm -rf $RPM_BUILD_ROOT by booting) - serial: add a crude hack to wait for runlevels to finish (#437379) - serial: frob /etc/securetty when necessary (#437381) -- add a upstart-specific inittab +- add an upstart-specific inittab - translation updates: as, bn_IN, cs, de, es, fi, fr, gu, hi, it, ja, kn, ml, mr, nb, nl, pa, pl, pt_BR, ru, sk, sr, ta, te, zh_CN @@ -1413,7 +2042,7 @@ rm -rf $RPM_BUILD_ROOT - network-functions: don't error out if hotplug doesn't exist (#140008) - ifup: always return errors on trying to bring up nonexistent devices (#131461) - ifup: fix error message (#143674) -- rc.sysinit: add a autorelabel boot target (#154496) +- rc.sysinit: add an autorelabel boot target (#154496) - prefdm: if something else is specified as $DISPLAYMANAGER, try that (#147304) - remove support for the old firewall type - network: optimize some (#138557, ) @@ -1739,7 +2368,7 @@ rm -rf $RPM_BUILD_ROOT - readonly root fixes () * Tue May 25 2004 Karsten Hopp 7.56-1 -- special TYPE for qeth devices to differenciate them from ethX +- special TYPE for qeth devices to differentiate them from ethX * Mon May 24 2004 Bill Nottingham - fix pppd vs. ppp typo in conflicts (#123680) @@ -2263,7 +2892,7 @@ rm -rf $RPM_BUILD_ROOT * Sun Sep 2 2001 Than Ngo - add ISDN patches from pekkas@netcore.fi and pb@bieringer.de (bug #52491) -- fix handling of ISDN LSZ Compresssion +- fix handling of ISDN LSZ Compression * Thu Aug 30 2001 Than Ngo - po/de.po: fix typo bug, lo instead 1o diff --git a/rebase.sh b/rebase.sh new file mode 100755 index 0000000..0015558 --- /dev/null +++ b/rebase.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# We always do a rebase to new upstream's tarball for Fedora Rawhide. +# +# For non-Rawhide Fedora releases, we can sometimes backport specific patches, +# if the rebase is not possible. +# +# This scripts automates this process. + +# Since we are operating in a dist-git repository where we can't fix things with +# --force-push if something goes wrong, we need to be extra careful and exit +# immediately if something fails. +set -e + +curl https://raw.githubusercontent.com/fedora-sysv/initscripts/master/initscripts.spec -o initscripts.spec || exit 1 +spectool -g initscripts.spec + +# Make a local scratch build in mock first. If it fails, do not upload new tarball! +# srpm_file="$(basename $(fedpkg srpm | grep -i "wrote" | cut -d ':' -f 2))" +# arch="$(uname -p)" + +# mock -r "fedora-rawhide-${arch}" "${srpm_file}" || exit 2 + +# Scratch build passed, the build should pass in Koji as well. Let's proceed: +fedpkg new-sources "$(basename $(spectool -S -l initscripts.spec | gawk '{print $2;}'))" || exit 3 +git add initscripts.spec +git commit -m "$(grep Version initscripts.spec | gawk '{print $2;}')" + +git show diff --git a/sources b/sources index fa129ca..e24e8e9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cf63862785d224394053f081865eb853 initscripts-9.54.tar.bz2 +SHA512 (initscripts-10.27.tar.gz) = 951f88158eaf7409f7d65c9875c9ba2611e6a805c17112ddbb34167a1638d87d2433c3962d20e66564669f3424dd7be1265cbe03a1a7d6b1c5413ed43d80148d diff --git a/tests/Sanity-init-scripts-LSB/Makefile b/tests/Sanity-init-scripts-LSB/Makefile new file mode 100644 index 0000000..460c83f --- /dev/null +++ b/tests/Sanity-init-scripts-LSB/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /CoreOS/initscripts/Sanity/init-scripts-LSB +# Description: Init scripts should meet LSB specifications +# Author: Yulia Kopkova +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2009 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/CoreOS/initscripts/Sanity/init-scripts-LSB +export TESTVERSION=1.4 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Jan Scotka " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Init scripts should meet LSB specifications" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: initscripts" >> $(METADATA) + @echo "Requires: initscripts" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Releases: RedHatEnterpriseLinux6" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Sanity-init-scripts-LSB/PURPOSE b/tests/Sanity-init-scripts-LSB/PURPOSE new file mode 100644 index 0000000..7246d5e --- /dev/null +++ b/tests/Sanity-init-scripts-LSB/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /CoreOS/initscripts/Sanity/init-scripts-LSB +Description: Init scripts should meet LSB specifications +Author: Yulia Kopkova diff --git a/tests/Sanity-init-scripts-LSB/runtest.sh b/tests/Sanity-init-scripts-LSB/runtest.sh new file mode 100755 index 0000000..a2274d0 --- /dev/null +++ b/tests/Sanity-init-scripts-LSB/runtest.sh @@ -0,0 +1,228 @@ +#!/bin/bash +# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /CoreOS/initscripts/Sanity/init-scripts-LSB +# Description: Init scripts should meet LSB specifications +# Author: Jan Scotka , Yulia Kopkova +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2009 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include rhts environment +. /usr/bin/rhts-environment.sh +. /usr/share/rhts-library/rhtslib.sh + +PACKAGE="initscripts" + + +SRV_NETCONSOLE=netconsole +SRV_NETFS=netfs +TRG_REMOTEFS=remote-fs.target +SRV_NETWORK=network + +rlJournalStart + + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "useradd testuserqa" 0 "Add test user" + rlFileBackup /etc/sysconfig/netconsole + if rlIsRHEL '<7'; then #there is no syslog in rhel7 and highier + rlRun "sed -i -e 's,^# SYSLOGADDR=,SYSLOGADDR=redhat.com,' /etc/sysconfig/netconsole" 0 "Set remote syslog server address /etc/sysconfig/netconsole" + fi + rlPhaseEnd + + + rlPhaseStartTest "netconsole service LSB compliance test" +if ls /lib*/modules/*/kernel/drivers/net/netconsole.ko*; then + rlRun "ls /lib*/modules/*/kernel/drivers/net/netconsole.ko*" 0 + if rlIsRHEL '<7'; then + + SERVICE=$SRV_NETCONSOLE + rlServiceStop $SERVICE + rlLog ">>>>>>>>> service start" + rlRun "service $SERVICE start" 0 " Service must start without problem " + rlRun "service $SERVICE status" 0 " Then Status command " + rlRun "service $SERVICE start" 0 " Already started service " + rlRun "service $SERVICE status" 0 " Again status command " + + rlLog ">>>>>>>>> service restart" + rlRun "service $SERVICE restart" 0 " Restarting of service " + rlRun "service $SERVICE status" 0 " Status command " + + rlLog ">>>>>>>>> service stop" + rlRun "service $SERVICE stop" 0 " Stopping service " + rlRun "service $SERVICE status" 3 " Status of stopped service " + rlRun "service $SERVICE stop" 0 " Stopping service again " + rlRun "service $SERVICE status" 3 " Status of stopped service " + + rlLog ">>>>>>>>> insufficient rights" + rlRun "service $SERVICE start " 0 " Starting service for restarting under nonpriv user " + rlRun "su testuserqa -c 'service $SERVICE restart'" 1 "Insufficient rights, restarting resrvice under nonprivileged user must fail " + + rlLog ">>>>>>>>> operations" + rlServiceStop $SERVICE + rlRun "service $SERVICE start" 0 " Service have to implement start function " + rlRun "service $SERVICE restart" 0 " Service have to implement restart function " + rlRun "service $SERVICE status" 0 " Service have to implement status function " + rlRun "service $SERVICE condrestart" 0 " Service have to implement condrestart function " + rlRun "service $SERVICE reload" 0 " Service have to implement reload function " + rlRun "service $SERVICE force-reload" 0 " Service have to implement force-reload function " + + rlLog ">>>>>>>>> nonexist operations" + rlRun "service $SERVICE noexistop" 2 " Testing proper return code when nonexisting function " + + rlServiceRestore $SERVICE + fi # rhel 6 or less +else + rlLog ">>>> no netconsole kernel module appear here" + rlRun "ls /lib*/modules/*/kernel/drivers/net/netconsole.ko*" 1,2 +fi + rlLog "NIC should support polling, NETPOLL should be compliled in kernel and netconsole module should be loaded" + rlLog "`cat /usr/src/kernels/$(uname -r)/.config | grep -i poll`" + rlLog "netconsole module: `lsmod | grep -i netconsole && echo true || echo false`" + rlLog "`cat /var/log/messages | grep -i netconsole | tail -n 10`" + rlPhaseEnd + + # for RHEL6 and lower + if rlIsRHEL '<7'; then + rlPhaseStartTest "netfs service LSB compliance test" + + SERVICE=$SRV_NETFS + rlServiceStop $SERVICE + rlLog ">>>>>>>>> service start" + rlRun "service $SERVICE start" 0 " Service must start without problem " + rlRun "service $SERVICE status" 0 " Then Status command " + rlRun "service $SERVICE start" 0 " Already started service " + rlRun "service $SERVICE status" 0 " Again status command " + + rlLog ">>>>>>>>> service restart" + rlRun "service $SERVICE restart" 0 " Restarting of service " + rlRun "service $SERVICE status" 0 " Status command " + + rlLog ">>>>>>>>> service stop" + rlRun "service $SERVICE stop" 0 " Stopping service " + rlRun "service $SERVICE status" 3 " Status of stopped service " + rlRun "service $SERVICE stop" 0 " Stopping service again " + rlRun "service $SERVICE status" 3 " Status of stopped service " + + rlLog ">>>>>>>>> insufficient rights" + rlRun "service $SERVICE start " 0 " Starting service for restarting under nonpriv user " + rlRun "su testuserqa -c 'service $SERVICE restart'" 4 "Insufficient rights, restarting resrvice under nonprivileged user must fail " + + rlLog ">>>>>>>>> operations" + rlServiceStop $SERVICE + rlRun "service $SERVICE start" 0 " Service have to implement start function " + rlRun "service $SERVICE restart" 0 " Service have to implement restart function " + rlRun "service $SERVICE status" 0 " Service have to implement status function " + + rlLog ">>>>>>>>> nonexist operations" + rlRun "service $SERVICE noexistop" 2 " Testing proper return code when nonexisting function " + + rlServiceRestore $SERVICE + + rlPhaseEnd + else + rlPhaseStartTest "remote-fs target LSB compliance test" + + TARGET=$TRG_REMOTEFS + rlServiceStop $TARGET + rlLog ">>>>>>>>> target start" + rlRun "service $TARGET start" 0 " Target must start without problem " + rlRun "service $TARGET status" 0 " Then Status command " + rlRun "service $TARGET start" 0 " Already started target " + rlRun "service $TARGET status" 0 " Again status command " + + rlLog ">>>>>>>>> target restart" + rlRun "service $TARGET restart" 0 " Restarting target " + rlRun "service $TARGET status" 0 " Status command " + + rlLog ">>>>>>>>> target stop" + rlRun "service $TARGET stop" 0 " Stopping target " + rlRun "service $TARGET status" 3 " Status of stopped target " + rlRun "service $TARGET stop" 0 " Stopping target again " + rlRun "service $TARGET status" 3 " Status of stopped target " + + rlLog ">>>>>>>>> insufficient rights" + rlRun "service $TARGET start " 0 " Starting target for restarting under nonpriv user " + rlRun "su testuserqa -c 'service $TARGET restart'" 1 " Insufficient rights, restarting target under nonprivileged user must fail " # returns 1 instead of 4 because of polkit + + rlLog ">>>>>>>>> operations" + rlServiceStop $TARGET + rlRun "service $TARGET start" 0 " Target have to implement start function " + rlRun "service $TARGET restart" 0 " Target have to implement restart function " + rlRun "service $TARGET status" 0 " Target have to implement status function " + + rlLog ">>>>>>>>> nonexist operations" + rlRun "service $TARGET noexistop" 2 " Testing proper return code when nonexisting function " + + rlServiceRestore $TARGET + + rlPhaseEnd + fi + + +# rlPhaseStartTest "$SRV_NETWORK service LSB compliance test" +# +# SERVICE=$SRV_NETWORK +# rlServiceStop $SERVICE +# rlLog ">>>>>>>>> service start" +# rlRun "service $SERVICE start" 0 " Service must start without problem " +# rlRun "service $SERVICE status" 0 " Then Status command " +# rlRun "service $SERVICE start" 1,0 " Already started service " +# rlRun "service $SERVICE status" 0 " Again status command " + +# rlLog ">>>>>>>>> service restart" +# rlRun "service $SERVICE restart" 0 " Restarting of service " +# rlRun "service $SERVICE status" 0 " Status command " + +# rlLog ">>>>>>>>> service stop" +# rlRun "service $SERVICE stop" 0 " Stopping service " +# rlRun "service $SERVICE status" 0 " Status of stopped service " +# rlRun "service $SERVICE stop" 0 " Stopping service again " +# rlRun "service $SERVICE status" 0 " Status of stopped service " + +# rlLog ">>>>>>>>> insufficient rights" +# rlRun "service $SERVICE start " 0 " Starting service for restarting under nonpriv user " +# rlRun "su testuserqa -c 'service $SERVICE restart'" 4 "Insufficient rights, restarting resrvice under nonprivileged user must fail " + +# rlLog ">>>>>>>>> operations" +# rlServiceStop $SERVICE +# rlRun "service $SERVICE start" 0 " Service have to implement start function " +# rlRun "service $SERVICE restart" 0 " Service have to implement restart function " +# rlRun "service $SERVICE status" 0 " Service have to implement status function " +# rlRun "service $SERVICE reload" 0 " Service have to implement reload function " +# rlRun "service $SERVICE force-reload" 0 " Service have to implement force-reload function " + +# rlLog ">>>>>>>>> nonexist operations" +# rlRun "service $SERVICE noexistop" 2 " Testing proper return code when nonexisting function " + +# rlServiceRestore $SERVICE +# service $SERVICE start + rlPhaseEnd + + + rlPhaseStartCleanup + rlRun "userdel -fr testuserqa" 0 "Remove test user" + rlFileRestore + rlPhaseEnd + +rlJournalPrintText +rlJournalEnd diff --git a/tests/standard-inventory-qcow2 b/tests/standard-inventory-qcow2 new file mode 100755 index 0000000..a9e2c64 --- /dev/null +++ b/tests/standard-inventory-qcow2 @@ -0,0 +1,291 @@ +#!/usr/bin/env python + +import argparse +import errno +import json +import os +import shutil +import shlex +import signal +import socket +import subprocess +import sys +import tempfile +import time +import distutils.util + +IDENTITY = """ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEA1DrTSXQRF8isQQfPfK3U+eFC4zBrjur+Iy15kbHUYUeSHf5S +jXPYbHYqD1lHj4GJajC9okle9rykKFYZMmJKXLI6987wZ8vfucXo9/kwS6BDAJto +ZpZSj5sWCQ1PI0Ce8CbkazlTp5NIkjRfhXGP8mkNKMEhdNjaYceO49ilnNCIxhpb +eH5dH5hybmQQNmnzf+CGCCLBFmc4g3sFbWhI1ldyJzES5ZX3ahjJZYRUfnndoUM/ +TzdkHGqZhL1EeFAsv5iV65HuYbchch4vBAn8jDMmHh8G1ixUCL3uAlosfarZLLyo +3HrZ8U/llq7rXa93PXHyI/3NL/2YP3OMxE8baQIDAQABAoIBAQCxuOUwkKqzsQ9W +kdTWArfj3RhnKigYEX9qM+2m7TT9lbKtvUiiPc2R3k4QdmIvsXlCXLigyzJkCsqp +IJiPEbJV98bbuAan1Rlv92TFK36fBgC15G5D4kQXD/ce828/BSFT2C3WALamEPdn +v8Xx+Ixjokcrxrdeoy4VTcjB0q21J4C2wKP1wEPeMJnuTcySiWQBdAECCbeZ4Vsj +cmRdcvL6z8fedRPtDW7oec+IPkYoyXPktVt8WsQPYkwEVN4hZVBneJPCcuhikYkp +T3WGmPV0MxhUvCZ6hSG8D2mscZXRq3itXVlKJsUWfIHaAIgGomWrPuqC23rOYCdT +5oSZmTvFAoGBAPs1FbbxDDd1fx1hisfXHFasV/sycT6ggP/eUXpBYCqVdxPQvqcA +ktplm5j04dnaQJdHZ8TPlwtL+xlWhmhFhlCFPtVpU1HzIBkp6DkSmmu0gvA/i07Z +pzo5Z+HRZFzruTQx6NjDtvWwiXVLwmZn2oiLeM9xSqPu55OpITifEWNjAoGBANhH +XwV6IvnbUWojs7uiSGsXuJOdB1YCJ+UF6xu8CqdbimaVakemVO02+cgbE6jzpUpo +krbDKOle4fIbUYHPeyB0NMidpDxTAPCGmiJz7BCS1fCxkzRgC+TICjmk5zpaD2md +HCrtzIeHNVpTE26BAjOIbo4QqOHBXk/WPen1iC3DAoGBALsD3DSj46puCMJA2ebI +2EoWaDGUbgZny2GxiwrvHL7XIx1XbHg7zxhUSLBorrNW7nsxJ6m3ugUo/bjxV4LN +L59Gc27ByMvbqmvRbRcAKIJCkrB1Pirnkr2f+xx8nLEotGqNNYIawlzKnqr6SbGf +Y2wAGWKmPyEoPLMLWLYkhfdtAoGANsFa/Tf+wuMTqZuAVXCwhOxsfnKy+MNy9jiZ +XVwuFlDGqVIKpjkmJyhT9KVmRM/qePwgqMSgBvVOnszrxcGRmpXRBzlh6yPYiQyK +2U4f5dJG97j9W7U1TaaXcCCfqdZDMKnmB7hMn8NLbqK5uLBQrltMIgt1tjIOfofv +BNx0raECgYEApAvjwDJ75otKz/mvL3rUf/SNpieODBOLHFQqJmF+4hrSOniHC5jf +f5GS5IuYtBQ1gudBYlSs9fX6T39d2avPsZjfvvSbULXi3OlzWD8sbTtvQPuCaZGI +Df9PUWMYZ3HRwwdsYovSOkT53fG6guy+vElUEDkrpZYczROZ6GUcx70= +-----END RSA PRIVATE KEY----- +""" + +USER_DATA = """#cloud-config +users: + - default + - name: root + groups: sudo + shell: /bin/bash + ssh_authorized_keys: + - ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUOtNJdBEXyKxBB898rdT54ULjMGuO6v4jLXmRsdRhR5Id/lKNc9hsdioPWUePgYlqML2iSV72vKQoVhkyYkpcsjr3zvBny9+5xej3+TBLoEMAm2hmllKPmxYJDU8jQJ7wJuRrOVOnk0iSNF+FcY/yaQ0owSF02Nphx47j2KWc0IjGGlt4fl0fmHJuZBA2afN/4IYIIsEWZziDewVtaEjWV3InMRLllfdqGMllhFR+ed2hQz9PN2QcapmEvUR4UCy/mJXrke5htyFyHi8ECfyMMyYeHwbWLFQIve4CWix9qtksvKjcetnxT+WWrutdr3c9cfIj/c0v/Zg/c4zETxtp standard-test-qcow2 +ssh_pwauth: True +chpasswd: + list: | + root:foobar + expire: False +runcmd: + - mkfs.ext4 /dev/sdb + - mount /dev/sdb /usr/local + - sudo mount -o remount,rw /usr + - mkdir /expected /output +""" + +def main(argv): + parser = argparse.ArgumentParser(description="Inventory for a QCow2 test image") + parser.add_argument("--list", action="store_true", help="Verbose output") + parser.add_argument('--host', help="Get host variables") + parser.add_argument("subjects", nargs="*", default=shlex.split(os.environ.get("TEST_SUBJECTS", ""))) + opts = parser.parse_args() + + try: + if opts.host: + data = host(opts.host) + else: + data = list(opts.subjects) + sys.stdout.write(json.dumps(data, indent=4, separators=(',', ': '))) + except RuntimeError as ex: + sys.stderr.write("{0}: {1}\n".format(os.path.basename(sys.argv[0]), str(ex))) + return 1 + + return 0 + + +def list(subjects): + hosts = [] + variables = {} + for subject in subjects: + if subject.endswith((".qcow2", ".qcow2c")): + vars = host(subject) + if vars: + hosts.append(subject) + variables[subject] = vars + return {"localhost": {"hosts": hosts, "vars": {}}, "subjects": {"hosts": hosts, "vars": {}}, + "_meta": {"hostvars": variables}} + + +def start_qemu(image, cloudinit, log, disk_directory=None, disk_size=None, portrange=(2222, 5555)): + for port in xrange(*portrange): + sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + try: + sock.bind(("127.0.0.3", port)) + + if disk_size: + return subprocess.Popen(["/usr/bin/qemu-system-x86_64", "-m", "1024", image, + "-enable-kvm", "-snapshot", "-cdrom", cloudinit, + "-hdb", disk_directory, + "-net", "nic,model=virtio", "-net", + "user,hostfwd=tcp:127.0.0.3:{0}-:22".format(port), + "-device", "isa-serial,chardev=pts2", "-chardev", "file,id=pts2,path=" + log, + "-display", "none"], stdout=open(os.devnull, 'w')), port + else: + return subprocess.Popen(["/usr/bin/qemu-system-x86_64", "-m", "1024", image, + "-enable-kvm", "-snapshot", "-cdrom", cloudinit, + "-net", "nic,model=virtio", "-net", + "user,hostfwd=tcp:127.0.0.3:{0}-:22".format(port), + "-device", "isa-serial,chardev=pts2", "-chardev", "file,id=pts2,path=" + log, + "-display", "none"], stdout=open(os.devnull, 'w')), port + except IOError: + pass + finally: + sock.close() + else: + raise RuntimeError("unable to find free local port to map SSH to") + + +def host(image): + null = open(os.devnull, 'w') + + try: + tty = os.open("/dev/tty", os.O_WRONLY) + os.dup2(tty, 2) + except OSError: + tty = None + pass + + # A directory for temporary stuff + directory = tempfile.mkdtemp(prefix="inventory-cloud") + identity = os.path.join(directory, "identity") + with open(identity, 'w') as f: + f.write(IDENTITY) + os.chmod(identity, 0o600) + metadata = os.path.join(directory, "meta-data") + with open(metadata, 'w') as f: + f.write("") + userdata = os.path.join(directory, "user-data") + with open(userdata, 'w') as f: + f.write(USER_DATA) + + # Create additional disk + disk_size = None + disk_directory = None + try: + disk_size = os.environ.get("EXTEND_DISK_SIZE") + if disk_size: + sys.stderr.write("\nCreate additional cloud init disk DISK SIZE {}\n".format(disk_size)) + + disk_directory = "{}/atomic-host-disk2-{}".format(directory, disk_size) + subprocess.check_call(["qemu-img", "create", "-f", "qcow2", disk_directory, disk_size], stdout=null) + + except KeyError: + sys.stderr.write("\nCouldn't create additional cloud init disk DISK SIZE\n") + pass + + # Create our cloud init so we can log in + cloudinit = os.path.join(directory, "cloud-init.iso") + subprocess.check_call(["/usr/bin/genisoimage", "-input-charset", "utf-8", + "-volid", "cidata", "-joliet", "-rock", "-quiet", + "-output", cloudinit, userdata, metadata], stdout=null) + + # Determine if virtual machine should be kept available for diagnosis after completion + try: + diagnose = distutils.util.strtobool(os.getenv("TEST_DEBUG", "0")) + except ValueError: + diagnose = 0 + + sys.stderr.write("Launching virtual machine for {0}\n".format(image)) + + # And launch the actual VM + artifacts = os.environ.get("TEST_ARTIFACTS", os.path.join(os.getcwd(), "artifacts")) + try: + os.makedirs(artifacts) + except OSError as exc: + if exc.errno != errno.EEXIST or not os.path.isdir(artifacts): + raise + log = os.path.join(artifacts, "{0}.log".format(os.path.basename(image))) + + proc = None # for failure detection + cpe = None # for exception scoping + for tries in xrange(0, 5): + try: + proc, port = start_qemu(image, cloudinit, log, disk_directory=disk_directory, disk_size=disk_size) + break + except subprocess.CalledProcessError as cpe: + time.sleep(1) + continue + if proc is None: + raise RuntimeError("Could not launch VM for qcow2 image" + " '{0}':{1}".format(image, cpe.output)) + + # The variables + variables = {"ansible_ssh_port": "{0}".format(port), + "ansible_ssh_host": "127.0.0.3", + "ansible_ssh_user": "root", + "ansible_ssh_pass": "foobar", + "ansible_ssh_private_key_file": identity, + "ansible_ssh_common_args": "-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"} + + # Write out a handy inventory file, for our use and for debugging + args = " ".join(["{0}='{1}'".format(*item) for item in variables.items()]) + inventory = os.path.join(directory, "inventory") + with open(inventory, "w") as f: + f.write("[subjects]\nlocalhost {1}\n".format(image, args)) + + # Wait for ssh to come up + ping = ["/usr/bin/ansible", "--inventory", inventory, "localhost", "--module-name", "raw", "--args", "/bin/true"] + + for tries in xrange(0, 30): + try: + (pid, ret) = os.waitpid(proc.pid, os.WNOHANG) + if pid != 0: + raise RuntimeError("qemu failed to launch qcow2 image: {0}".format(image)) + subprocess.check_call(ping, stdout=null, stderr=null) + break + except subprocess.CalledProcessError: + time.sleep(3) + else: + # Kill the qemu process + try: + os.kill(proc.pid, signal.SIGTERM) + except OSError: + pass + raise RuntimeError("could not access launched qcow2 image: {0}".format(image)) + + # Process of our parent + ppid = os.getppid() + + child = os.fork() + if child: + return variables + + # Daemonize and watch the processes + os.chdir("/") + os.setsid() + os.umask(0) + + if tty is None: + tty = null.fileno() + + # Duplicate standard input to standard output and standard error. + os.dup2(null.fileno(), 0) + os.dup2(tty, 1) + os.dup2(tty, 2) + + # Now wait for the parent process to go away, then kill the VM + while True: + time.sleep(3) + try: + os.kill(ppid, 0) + os.kill(proc.pid, 0) + except OSError: + break # Either of the processes no longer exist + + if diagnose: + sys.stderr.write("\n") + sys.stderr.write("DIAGNOSE: ssh -p {0} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null " + "root@{1} # password: {2}\n".format(port, "127.0.0.3", "foobar")) + sys.stderr.write("DIAGNOSE: export ANSIBLE_INVENTORY={0}\n".format(inventory)) + sys.stderr.write("DIAGNOSE: kill {0} # when finished\n".format(os.getpid())) + + def _signal_handler(*args): + sys.stderr.write("\nDIAGNOSE ending...\n") + + signal.signal(signal.SIGTERM, _signal_handler) + signal.pause() + + # Kill the qemu process + try: + os.kill(proc.pid, signal.SIGTERM) + except OSError: + pass + + shutil.rmtree(directory) + sys.exit(0) + + +if __name__ == '__main__': + sys.exit(main(sys.argv)) diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..2e7b831 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +--- +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + - container + - atomic + tests: + - Sanity-init-scripts-LSB + required_packages: + - initscripts