From 8cb09557bf2a4fa952b31d448192b86c1e2e4b8b Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 20 Aug 2018 13:47:38 +0000 Subject: [PATCH 01/12] - merged UUID support for cryptsetup script and misc bonding script fix --- misc_fixes.patch | 46 ++++++++++++++++++++++++++++++++++++++-------- rc-scripts.spec | 2 +- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/misc_fixes.patch b/misc_fixes.patch index 2f76edf..21c5c1a 100644 --- a/misc_fixes.patch +++ b/misc_fixes.patch @@ -1,7 +1,36 @@ -diff -ur rc-scripts-0.5.1.orig/rc.d/init.d/network rc-scripts-0.5.1/rc.d/init.d/network ---- rc-scripts-0.5.1.orig/rc.d/init.d/network 2018-07-11 21:54:22.000000000 +0000 -+++ rc-scripts-0.5.1/rc.d/init.d/network 2018-07-22 23:26:49.256418466 +0000 -@@ -168,7 +168,7 @@ +diff --git a/lib/ifdown-bond b/lib/ifdown-bond +index 1d81ecb..80a2cf2 100755 +--- a/lib/ifdown-bond ++++ b/lib/ifdown-bond +@@ -38,7 +38,7 @@ setup_ip_param + LC_ALL=C ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush" + + # release slave devices +-for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves); do ++for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves 2>/dev/null); do + echo "-${SLAVE_DEV}" > /sys/class/net/${DEVICE}/bonding/slaves + done + +diff --git a/rc.d/init.d/cryptsetup b/rc.d/init.d/cryptsetup +index 0e7f272..e2ff60e 100755 +--- a/rc.d/init.d/cryptsetup ++++ b/rc.d/init.d/cryptsetup +@@ -95,6 +95,10 @@ init_crypto() { + continue + fi + ++ if echo "$src" | grep -q -E "^UUID=" ; then ++ src="/dev/disk/by-uuid/${src##UUID=}" ++ fi ++ + if [ ! -b "$src" ]; then + nls "$src: No such device" + ret=1 +diff --git a/rc.d/init.d/network b/rc.d/init.d/network +index 5e8cd20..b44e291 100755 +--- a/rc.d/init.d/network ++++ b/rc.d/init.d/network +@@ -168,7 +168,7 @@ find_boot_interfaces() { DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null [ "${DEVICE:+set}" != "set" ] && continue [ ${USERS:-no} != no ] && continue @@ -10,10 +39,11 @@ diff -ur rc-scripts-0.5.1.orig/rc.d/init.d/network rc-scripts-0.5.1/rc.d/init.d/ done ` -diff -ur rc-scripts-0.5.1.orig/sysconfig/system rc-scripts-0.5.1/sysconfig/system ---- rc-scripts-0.5.1.orig/sysconfig/system 2018-07-11 21:54:22.000000000 +0000 -+++ rc-scripts-0.5.1/sysconfig/system 2018-07-22 23:26:23.805419983 +0000 -@@ -13,7 +13,6 @@ +diff --git a/sysconfig/system b/sysconfig/system +index a196f21..a4f125d 100644 +--- a/sysconfig/system ++++ b/sysconfig/system +@@ -13,7 +13,6 @@ FASTRC=no CONSOLE_LOGLEVEL=1 # On errors (when system is starting) run sulogin instead of shell ? diff --git a/rc-scripts.spec b/rc-scripts.spec index cdf9140..932e60f 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -8,7 +8,7 @@ Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts Version: 0.5.1 -Release: 2 +Release: 3 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz -- 2.45.1 From b900baf13421f952a7a9a8f1f12d0446a544bb95 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 9 Sep 2019 22:48:17 +0000 Subject: [PATCH 02/12] - fix network scripts regex for newer iproute2, fixes removal of local ip rules --- misc_fixes.patch | 22 ++++++++++++++++++++++ rc-scripts.spec | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/misc_fixes.patch b/misc_fixes.patch index 21c5c1a..8debdaf 100644 --- a/misc_fixes.patch +++ b/misc_fixes.patch @@ -51,3 +51,25 @@ index a196f21..a4f125d 100644 RUN_SULOGIN_ON_ERR=yes # Default run nice level for all services if $SERVICE_RUN_NICE_LEVEL is not +diff --git a/lib/functions.network b/lib/functions.network +index d151b04..862d42b 100644 +--- a/lib/functions.network ++++ b/lib/functions.network +@@ -484,7 +484,7 @@ setup_ip_rules () + /sbin/ip rule add $args $prio + done + elif is_no "$1"; then +- LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local|253|254|255) \$" -e " map-to " | while read prio from src args; do ++ LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local|253|254|255)[[:space:]]*\$" -e " map-to " | while read prio from src args; do + [ "$src" = "all" ] && /sbin/ip rule delete $args || /sbin/ip rule delete $from $src $args + done + fi +@@ -503,7 +503,7 @@ setup_ip_rules () + /sbin/ip -6 rule add $args $prio + done + elif is_no "$1"; then +- LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local|253|254|255) \$" -e " map-to " | while read prio from src args; do ++ LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local|253|254|255)[[:space:]]*\$" -e " map-to " | while read prio from src args; do + [ "$src" = "all" ] && /sbin/ip -6 rule delete $args || /sbin/ip -6 rule delete $from $src $args + done + fi diff --git a/rc-scripts.spec b/rc-scripts.spec index 932e60f..168cb5a 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -8,7 +8,7 @@ Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts Version: 0.5.1 -Release: 3 +Release: 4 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz -- 2.45.1 From 2d9086531d2da24ec82e520645bcd25bc3b30347 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 30 Mar 2020 20:51:21 +0200 Subject: [PATCH 03/12] - updated to 0.5.2 --- misc_fixes.patch | 75 ------------------------------------------------ rc-scripts.spec | 10 +++---- 2 files changed, 4 insertions(+), 81 deletions(-) delete mode 100644 misc_fixes.patch diff --git a/misc_fixes.patch b/misc_fixes.patch deleted file mode 100644 index 8debdaf..0000000 --- a/misc_fixes.patch +++ /dev/null @@ -1,75 +0,0 @@ -diff --git a/lib/ifdown-bond b/lib/ifdown-bond -index 1d81ecb..80a2cf2 100755 ---- a/lib/ifdown-bond -+++ b/lib/ifdown-bond -@@ -38,7 +38,7 @@ setup_ip_param - LC_ALL=C ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush" - - # release slave devices --for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves); do -+for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves 2>/dev/null); do - echo "-${SLAVE_DEV}" > /sys/class/net/${DEVICE}/bonding/slaves - done - -diff --git a/rc.d/init.d/cryptsetup b/rc.d/init.d/cryptsetup -index 0e7f272..e2ff60e 100755 ---- a/rc.d/init.d/cryptsetup -+++ b/rc.d/init.d/cryptsetup -@@ -95,6 +95,10 @@ init_crypto() { - continue - fi - -+ if echo "$src" | grep -q -E "^UUID=" ; then -+ src="/dev/disk/by-uuid/${src##UUID=}" -+ fi -+ - if [ ! -b "$src" ]; then - nls "$src: No such device" - ret=1 -diff --git a/rc.d/init.d/network b/rc.d/init.d/network -index 5e8cd20..b44e291 100755 ---- a/rc.d/init.d/network -+++ b/rc.d/init.d/network -@@ -168,7 +168,7 @@ find_boot_interfaces() { - DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null - [ "${DEVICE:+set}" != "set" ] && continue - [ ${USERS:-no} != no ] && continue -- is_yes [ ${ONBOOT:-no} && echo "${i##*/ifcfg-}" -+ is_yes ${ONBOOT:-no} && echo "${i##*/ifcfg-}" - done - ` - -diff --git a/sysconfig/system b/sysconfig/system -index a196f21..a4f125d 100644 ---- a/sysconfig/system -+++ b/sysconfig/system -@@ -13,7 +13,6 @@ FASTRC=no - CONSOLE_LOGLEVEL=1 - - # On errors (when system is starting) run sulogin instead of shell ? --# This option disables debuginitrd=sh in geninitrd as well. - RUN_SULOGIN_ON_ERR=yes - - # Default run nice level for all services if $SERVICE_RUN_NICE_LEVEL is not -diff --git a/lib/functions.network b/lib/functions.network -index d151b04..862d42b 100644 ---- a/lib/functions.network -+++ b/lib/functions.network -@@ -484,7 +484,7 @@ setup_ip_rules () - /sbin/ip rule add $args $prio - done - elif is_no "$1"; then -- LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local|253|254|255) \$" -e " map-to " | while read prio from src args; do -+ LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local|253|254|255)[[:space:]]*\$" -e " map-to " | while read prio from src args; do - [ "$src" = "all" ] && /sbin/ip rule delete $args || /sbin/ip rule delete $from $src $args - done - fi -@@ -503,7 +503,7 @@ setup_ip_rules () - /sbin/ip -6 rule add $args $prio - done - elif is_no "$1"; then -- LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local|253|254|255) \$" -e " map-to " | while read prio from src args; do -+ LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local|253|254|255)[[:space:]]*\$" -e " map-to " | while read prio from src args; do - [ "$src" = "all" ] && /sbin/ip -6 rule delete $args || /sbin/ip -6 rule delete $from $src $args - done - fi diff --git a/rc-scripts.spec b/rc-scripts.spec index 168cb5a..723efc0 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -7,14 +7,13 @@ Summary(fr.UTF-8): inittab et scripts /etc/rc.d Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts -Version: 0.5.1 -Release: 4 +Version: 0.5.2 +Release: 1 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz -# Source0-md5: 052d832421951936b6b1e9da4e0513aa -Patch0: misc_fixes.patch -URL: http://svn.pld-linux.org/trac/svn/wiki/packages/rc-scripts +# Source0-md5: bc6f66a2511cf866e852d40349d7b609 +URL: https://git.tld-linux.org/?p=rc-scripts.git BuildRequires: autoconf BuildRequires: automake BuildRequires: gettext-tools @@ -102,7 +101,6 @@ programcıklar içerir. %prep %setup -q -%patch0 -p1 # hack, currently this results in errno@@GLIBC_PRIVATE symbol in ppp-watch: #GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic" -- 2.45.1 From ce0c7bc3ddca313632dc16b2a6553d11cfab4e38 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Fri, 8 May 2020 21:34:46 +0200 Subject: [PATCH 04/12] - fix color reset on terminals with more than 16 colors --- color-fix.patch | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ rc-scripts.spec | 4 +++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 color-fix.patch diff --git a/color-fix.patch b/color-fix.patch new file mode 100644 index 0000000..3af2643 --- /dev/null +++ b/color-fix.patch @@ -0,0 +1,63 @@ +From 5d89b49a413e24dae01d41cdb0d50b919ad4830e Mon Sep 17 00:00:00 2001 +From: Marcin Krol +Date: Fri, 8 May 2020 21:18:49 +0200 +Subject: [PATCH] - drop setting color to white as default, use color reset + instead + +--- + lib/functions | 7 +++---- + sysconfig/init-colors | 2 +- + 2 files changed, 4 insertions(+), 5 deletions(-) + +diff --git a/lib/functions b/lib/functions +index fb41ffa..8f08dc6 100644 +--- a/lib/functions ++++ b/lib/functions +@@ -39,7 +39,6 @@ BLUE=4 + MAGENTA=5 + CYAN=6 + WHITE=7 +-NORMAL=15 + # Bold definition (second parameter to termput setaf) + BOLD=1 + NOBOLD=0 +@@ -53,7 +52,7 @@ CTLD="$GREEN" # "TLD Linux" color + CI="$RED" # Capital I color (press I to enter interactive startup) + CRESMAN="$GREEN" # "Resource Manager" color + CHARS="" # Characters displayed on the beginning of show line +-CCHARS="$NORMAL" # Color of these characters (look at /etc/sysconfig/init-colors.gentoo example) ++CCHARS="$WHITE" # Color of these characters (look at /etc/sysconfig/init-colors.gentoo example) + + # Source configuration if available - may override default values + [ -r /etc/sysconfig/init-colors ] && . /etc/sysconfig/init-colors +@@ -283,7 +282,7 @@ termput() { + is_yes "$COLOR_INIT" && echo -ne "\033[${ISBOLD};3${2}m" + ;; + op) +- termput setaf $NORMAL ++ echo -ne "\033[0m" + ;; + esac + else +@@ -296,7 +295,7 @@ termput() { + is_yes "$COLOR_INIT" && tput setaf "$2" + ;; + op) +- termput setaf $NORMAL ++ tput sgr0 + ;; + esac + fi +diff --git a/sysconfig/init-colors b/sysconfig/init-colors +index 1632fdb..8798b96 100644 +--- a/sysconfig/init-colors ++++ b/sysconfig/init-colors +@@ -9,4 +9,4 @@ CTLD="$GREEN" # "TLD Linux" color + CI="$RED" # Capital I color (press I to enter interactive startup) + CRESMAN="$GREEN" # "Resource Manager" color + CHARS="" # Characters displayed on the beginning of show line +-CCHARS="$NORMAL" # Color of these characters (look at /usr/share/doc/rc-scripts-*/init-colors.gentoo.gz example) ++CCHARS="$WHITE" # Color of these characters (look at /usr/share/doc/rc-scripts-*/init-colors.gentoo.gz example) +-- +2.25.1 + diff --git a/rc-scripts.spec b/rc-scripts.spec index 723efc0..08d0bb8 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -8,11 +8,12 @@ Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts Version: 0.5.2 -Release: 1 +Release: 2 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz # Source0-md5: bc6f66a2511cf866e852d40349d7b609 +Patch0: color-fix.patch URL: https://git.tld-linux.org/?p=rc-scripts.git BuildRequires: autoconf BuildRequires: automake @@ -101,6 +102,7 @@ programcıklar içerir. %prep %setup -q +%patch0 -p1 # hack, currently this results in errno@@GLIBC_PRIVATE symbol in ppp-watch: #GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic" -- 2.45.1 From 0cc7268f323aec67210aff146f595f374174890e Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sun, 9 May 2021 19:26:34 +0200 Subject: [PATCH 05/12] - release 3 --- rc-scripts.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc-scripts.spec b/rc-scripts.spec index 08d0bb8..0f52b08 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -8,7 +8,7 @@ Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts Version: 0.5.2 -Release: 2 +Release: 3 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz -- 2.45.1 From 06a986cd4804f9a0a4c4fec45c173a408df4574f Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sun, 9 May 2021 21:27:46 +0200 Subject: [PATCH 06/12] - follow rename of virtual dep to virtual-init-daemon --- rc-scripts.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rc-scripts.spec b/rc-scripts.spec index 0f52b08..c179d7a 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -8,7 +8,7 @@ Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts Version: 0.5.2 -Release: 3 +Release: 4 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz @@ -36,7 +36,7 @@ Requires: SysVinit-tools >= 2.88-1 Requires: blockdev Requires: coreutils Requires: ethtool -Requires: virtual(init-daemon) +Requires: virtual-init-daemon Requires: filesystem >= 4.0-1 Requires: findutils Requires: fsck -- 2.45.1 From adc6fa950b053c0211a6cff3e4bed09e70ccfde5 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Wed, 1 Mar 2023 02:03:04 +0100 Subject: [PATCH 07/12] - fix cryptsetup startup with LUKS2 volumes --- cryptsetup-locks.patch | 39 +++++++++++++++++++++++++++++++++++++++ rc-scripts.spec | 4 +++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 cryptsetup-locks.patch diff --git a/cryptsetup-locks.patch b/cryptsetup-locks.patch new file mode 100644 index 0000000..028ba32 --- /dev/null +++ b/cryptsetup-locks.patch @@ -0,0 +1,39 @@ +From: Marcin Krol +Date: Wed, 1 Mar 2023 00:57:42 +0000 (+0100) +Subject: - disable lock checks (happens on LUKS2 and fails during system boot) +X-Git-Url: https://git.tld-linux.org/?p=rc-scripts.git;a=commitdiff_plain;h=6066bc28dc8b40335ea2a4554691900fa6813c8a + +- disable lock checks (happens on LUKS2 and fails during system boot) +--- + +diff --git a/rc.d/init.d/cryptsetup b/rc.d/init.d/cryptsetup +index 263a39c..d5ac2c3 100755 +--- a/rc.d/init.d/cryptsetup ++++ b/rc.d/init.d/cryptsetup +@@ -105,7 +105,7 @@ init_crypto() { + continue + fi + +- if /sbin/cryptsetup isLuks "$src" 2>/dev/null; then ++ if /sbin/cryptsetup --disable-locks isLuks "$src" 2>/dev/null; then + if key_is_random "$key"; then + nls "%s: LUKS requires non-random key, skipping" "$dst" + ret=1 +@@ -114,7 +114,7 @@ init_crypto() { + if [ -n "$params" ]; then + nls "%s: options are invalid for LUKS partitions, ignoring them" "$dst" + fi +- /sbin/cryptsetup ${key:+-d $key} luksOpen "$src" "$dst" <&1 ++ /sbin/cryptsetup --disable-locks ${key:+-d $key} luksOpen "$src" "$dst" <&1 + fi + rc=$? + if [ $rc -ne 0 ]; then +@@ -144,7 +144,7 @@ halt_crypto() { + [ -z "$dst" -o "${dst#\#}" != "$dst" ] && continue + if [ -b "/dev/mapper/$dst" ]; then + if LC_ALL=C /sbin/dmsetup info "$dst" | grep -q '^Open count: *0$'; then +- /sbin/cryptsetup remove "$dst" ++ /sbin/cryptsetup --disable-locks remove "$dst" + else + fnval=1 + fi diff --git a/rc-scripts.spec b/rc-scripts.spec index c179d7a..359020c 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -8,12 +8,13 @@ Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts Version: 0.5.2 -Release: 4 +Release: 5 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz # Source0-md5: bc6f66a2511cf866e852d40349d7b609 Patch0: color-fix.patch +Patch1: cryptsetup-locks.patch URL: https://git.tld-linux.org/?p=rc-scripts.git BuildRequires: autoconf BuildRequires: automake @@ -103,6 +104,7 @@ programcıklar içerir. %prep %setup -q %patch0 -p1 +%patch1 -p1 # hack, currently this results in errno@@GLIBC_PRIVATE symbol in ppp-watch: #GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic" -- 2.45.1 From ee39364a9795863d9a2ee5bc1b1a159e0eec7304 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 10 Jul 2023 11:43:11 +0200 Subject: [PATCH 08/12] - release 6 --- rc-scripts.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc-scripts.spec b/rc-scripts.spec index 359020c..ab0a425 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -8,7 +8,7 @@ Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts Version: 0.5.2 -Release: 5 +Release: 6 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz -- 2.45.1 From 3c758567c738aa33a731284cd96ad8e5a44cd11a Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sun, 28 Apr 2024 20:07:17 +0200 Subject: [PATCH 09/12] - tc is now in separate package --- rc-scripts.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rc-scripts.spec b/rc-scripts.spec index ab0a425..7b23974 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -8,7 +8,7 @@ Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts Version: 0.5.2 -Release: 6 +Release: 7 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz @@ -45,6 +45,7 @@ Requires: gettext Requires: grep Requires: hostname Requires: iproute2 +Requires: iproute2-tc Requires: iputils-arping Requires: mingetty Requires: mktemp -- 2.45.1 From 8bc586796b8fe15df64d427b03a9fd0e0972d4e4 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 16 May 2024 01:24:38 +0200 Subject: [PATCH 10/12] - updated to 0.5.3 --- color-fix.patch | 63 ------------------------------------------ cryptsetup-locks.patch | 39 -------------------------- rc-scripts.spec | 8 ++---- 3 files changed, 2 insertions(+), 108 deletions(-) delete mode 100644 color-fix.patch delete mode 100644 cryptsetup-locks.patch diff --git a/color-fix.patch b/color-fix.patch deleted file mode 100644 index 3af2643..0000000 --- a/color-fix.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 5d89b49a413e24dae01d41cdb0d50b919ad4830e Mon Sep 17 00:00:00 2001 -From: Marcin Krol -Date: Fri, 8 May 2020 21:18:49 +0200 -Subject: [PATCH] - drop setting color to white as default, use color reset - instead - ---- - lib/functions | 7 +++---- - sysconfig/init-colors | 2 +- - 2 files changed, 4 insertions(+), 5 deletions(-) - -diff --git a/lib/functions b/lib/functions -index fb41ffa..8f08dc6 100644 ---- a/lib/functions -+++ b/lib/functions -@@ -39,7 +39,6 @@ BLUE=4 - MAGENTA=5 - CYAN=6 - WHITE=7 --NORMAL=15 - # Bold definition (second parameter to termput setaf) - BOLD=1 - NOBOLD=0 -@@ -53,7 +52,7 @@ CTLD="$GREEN" # "TLD Linux" color - CI="$RED" # Capital I color (press I to enter interactive startup) - CRESMAN="$GREEN" # "Resource Manager" color - CHARS="" # Characters displayed on the beginning of show line --CCHARS="$NORMAL" # Color of these characters (look at /etc/sysconfig/init-colors.gentoo example) -+CCHARS="$WHITE" # Color of these characters (look at /etc/sysconfig/init-colors.gentoo example) - - # Source configuration if available - may override default values - [ -r /etc/sysconfig/init-colors ] && . /etc/sysconfig/init-colors -@@ -283,7 +282,7 @@ termput() { - is_yes "$COLOR_INIT" && echo -ne "\033[${ISBOLD};3${2}m" - ;; - op) -- termput setaf $NORMAL -+ echo -ne "\033[0m" - ;; - esac - else -@@ -296,7 +295,7 @@ termput() { - is_yes "$COLOR_INIT" && tput setaf "$2" - ;; - op) -- termput setaf $NORMAL -+ tput sgr0 - ;; - esac - fi -diff --git a/sysconfig/init-colors b/sysconfig/init-colors -index 1632fdb..8798b96 100644 ---- a/sysconfig/init-colors -+++ b/sysconfig/init-colors -@@ -9,4 +9,4 @@ CTLD="$GREEN" # "TLD Linux" color - CI="$RED" # Capital I color (press I to enter interactive startup) - CRESMAN="$GREEN" # "Resource Manager" color - CHARS="" # Characters displayed on the beginning of show line --CCHARS="$NORMAL" # Color of these characters (look at /usr/share/doc/rc-scripts-*/init-colors.gentoo.gz example) -+CCHARS="$WHITE" # Color of these characters (look at /usr/share/doc/rc-scripts-*/init-colors.gentoo.gz example) --- -2.25.1 - diff --git a/cryptsetup-locks.patch b/cryptsetup-locks.patch deleted file mode 100644 index 028ba32..0000000 --- a/cryptsetup-locks.patch +++ /dev/null @@ -1,39 +0,0 @@ -From: Marcin Krol -Date: Wed, 1 Mar 2023 00:57:42 +0000 (+0100) -Subject: - disable lock checks (happens on LUKS2 and fails during system boot) -X-Git-Url: https://git.tld-linux.org/?p=rc-scripts.git;a=commitdiff_plain;h=6066bc28dc8b40335ea2a4554691900fa6813c8a - -- disable lock checks (happens on LUKS2 and fails during system boot) ---- - -diff --git a/rc.d/init.d/cryptsetup b/rc.d/init.d/cryptsetup -index 263a39c..d5ac2c3 100755 ---- a/rc.d/init.d/cryptsetup -+++ b/rc.d/init.d/cryptsetup -@@ -105,7 +105,7 @@ init_crypto() { - continue - fi - -- if /sbin/cryptsetup isLuks "$src" 2>/dev/null; then -+ if /sbin/cryptsetup --disable-locks isLuks "$src" 2>/dev/null; then - if key_is_random "$key"; then - nls "%s: LUKS requires non-random key, skipping" "$dst" - ret=1 -@@ -114,7 +114,7 @@ init_crypto() { - if [ -n "$params" ]; then - nls "%s: options are invalid for LUKS partitions, ignoring them" "$dst" - fi -- /sbin/cryptsetup ${key:+-d $key} luksOpen "$src" "$dst" <&1 -+ /sbin/cryptsetup --disable-locks ${key:+-d $key} luksOpen "$src" "$dst" <&1 - fi - rc=$? - if [ $rc -ne 0 ]; then -@@ -144,7 +144,7 @@ halt_crypto() { - [ -z "$dst" -o "${dst#\#}" != "$dst" ] && continue - if [ -b "/dev/mapper/$dst" ]; then - if LC_ALL=C /sbin/dmsetup info "$dst" | grep -q '^Open count: *0$'; then -- /sbin/cryptsetup remove "$dst" -+ /sbin/cryptsetup --disable-locks remove "$dst" - else - fnval=1 - fi diff --git a/rc-scripts.spec b/rc-scripts.spec index 7b23974..e694cc1 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -7,14 +7,12 @@ Summary(fr.UTF-8): inittab et scripts /etc/rc.d Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts -Version: 0.5.2 -Release: 7 +Version: 0.5.3 +Release: 1 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz # Source0-md5: bc6f66a2511cf866e852d40349d7b609 -Patch0: color-fix.patch -Patch1: cryptsetup-locks.patch URL: https://git.tld-linux.org/?p=rc-scripts.git BuildRequires: autoconf BuildRequires: automake @@ -104,8 +102,6 @@ programcıklar içerir. %prep %setup -q -%patch0 -p1 -%patch1 -p1 # hack, currently this results in errno@@GLIBC_PRIVATE symbol in ppp-watch: #GLIB_LIBS="-Wl,-static `$PKG_CONFIG --libs --static glib-2.0` -Wl,-Bdynamic" -- 2.45.1 From f90c6f44c466cc8518959a51bf901218a2bd32fb Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 16 May 2024 01:25:26 +0200 Subject: [PATCH 11/12] - md5 --- rc-scripts.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc-scripts.spec b/rc-scripts.spec index e694cc1..cd029fc 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -12,7 +12,7 @@ Release: 1 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz -# Source0-md5: bc6f66a2511cf866e852d40349d7b609 +# Source0-md5: 4d4edbbda63e5229573eda3b6c507e35 URL: https://git.tld-linux.org/?p=rc-scripts.git BuildRequires: autoconf BuildRequires: automake -- 2.45.1 From 475d0cfb2df898fe2d6613cf2f89a42ec9c6e197 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Wed, 22 May 2024 01:59:30 +0200 Subject: [PATCH 12/12] - updated to 0.5.4, partial merge of .spec changes from PLD --- rc-scripts.spec | 92 +++++++++++++++++++++++++++++++++++++------------ 1 file changed, 70 insertions(+), 22 deletions(-) diff --git a/rc-scripts.spec b/rc-scripts.spec index cd029fc..ffc8cfb 100644 --- a/rc-scripts.spec +++ b/rc-scripts.spec @@ -7,12 +7,12 @@ Summary(fr.UTF-8): inittab et scripts /etc/rc.d Summary(pl.UTF-8): inittab i skrypty startowe z katalogu /etc/rc.d Summary(tr.UTF-8): inittab ve /etc/rc.d dosyaları Name: rc-scripts -Version: 0.5.3 +Version: 0.5.4 Release: 1 License: GPL v2 Group: Base Source0: %{name}-%{version}.tar.gz -# Source0-md5: 4d4edbbda63e5229573eda3b6c507e35 +# Source0-md5: 67e8af74740cc3589257faf026f1ac23 URL: https://git.tld-linux.org/?p=rc-scripts.git BuildRequires: autoconf BuildRequires: automake @@ -23,35 +23,39 @@ BuildRequires: glib2-devel BuildRequires: libcap-devel >= 1:2.17 BuildRequires: linux-libc-headers >= 7:2.6.27 BuildRequires: pkgconfig +BuildRequires: pcre-devel +%{?with_static:BuildRequires: pcre-static} BuildRequires: popt-devel BuildRequires: rpm >= 4.4.9-56 Requires(post): fileutils Requires: /bin/awk Requires: /bin/basename Requires: /bin/gettext +Requires: /bin/ipcalc Requires: /bin/nice Requires: /bin/ps Requires: SysVinit-tools >= 2.88-1 Requires: blockdev Requires: coreutils Requires: ethtool +Requires: run-parts = %{version}-%{release} Requires: virtual-init-daemon -Requires: filesystem >= 4.0-1 +Requires: filesystem >= 4.1-19 Requires: findutils Requires: fsck Requires: gettext Requires: grep Requires: hostname +Requires: ipcalc >= 1.0.1-2 Requires: iproute2 Requires: iproute2-tc Requires: iputils-arping -Requires: mingetty +Requires: libutempter >= 1.1.6-2 Requires: mktemp Requires: mount >= 2.12 Requires: procps >= 1:3.2.6-1.1 Requires: psmisc >= 22.5-2 -Requires: libutempter >= 1.1.6-2 -Requires: util-linux +Requires: util-linux >= 2.22.1 Requires: virtual(module-tools) Suggests: libcgroup Obsoletes: initscripts @@ -59,13 +63,15 @@ Obsoletes: vserver-rc-scripts Conflicts: LPRng < 3.8.0-2 Conflicts: dev < 2.9.0-22 Conflicts: iputils-arping < 2:s20070202-1 +# character classes support required +Conflicts: mawk < 1.3.4-0.20090727 Conflicts: openssh-server < 2:3.6.1p2-6 Conflicts: psacct < 6.3.5-10 Conflicts: tzdata < 2007b-1.1 Conflicts: udev-core < 1:135-2 -Conflicts: lvm2 < 2.02.83 Conflicts: SysVinit < 2.88-16 -Conflicts: upstart-SysVinit < 2.86-25 +Conflicts: lvm2 < 2.02.83 +Conflicts: upstart Conflicts: wpa_supplicant < 0.6.3 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) @@ -75,7 +81,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sbindir /sbin %description -This package contains the scripts use to boot a system, change run +This package contains the scripts used to boot a system, change run levels, and shut the system down cleanly. %description -l de.UTF-8 @@ -100,6 +106,22 @@ düzgün bir şekilde kapatmak için gereken dosyaları içerir. Ayrıca pek çok bilgisayar ağı arayüzlerini etkinleştiren ya da edilginleştiren programcıklar içerir. +%package -n run-parts +Summary: Run scripts or programs in a directory +Summary(pl.UTF-8): Uruchamianie skryptów lub programów z katalogu +Group: Base +Conflicts: rc-scripts < 0.5.4-1 + +%description -n run-parts +run-parts runs all the executable files named within specific +constraints, found in directory directory. Other files and directories +are silently ignored. + +%description -n run-parts -l pl.UTF-8 +Program run-parts pozwala na uruchamianie wszystkich plików zgodnych z +pewnymi ograniczeniami, obecnych w katalogu. Inne pliki i katalogi są +po cichu ignorowane. + %prep %setup -q @@ -120,12 +142,16 @@ sed -i -e 's#^GLIB_LIBS=.*#GLIB_LIBS="%{_prefix}/%{_lib}/libglib-2.0.a -lrt -lpt %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT/var/{run/netreport,log} \ - $RPM_BUILD_ROOT/etc/sysconfig/{interfaces/data,hwprofiles} + $RPM_BUILD_ROOT/etc/sysconfig/{interfaces/data,hwprofiles} \ + $RPM_BUILD_ROOT%{_sysconfdir}/{modules-load.d,sysctl.d} %{__make} install \ DESTDIR=$RPM_BUILD_ROOT \ %{!?with_static:ppp_watch_LDADD="$(pkg-config --libs glib-2.0)" ppp_watch_DEPENDENCIES=} +# deprecated shell version +%{__rm} $RPM_BUILD_ROOT%{_bindir}/run-parts.sh + for i in 0 1 2 3 4 5 6; do install -d $RPM_BUILD_ROOT/etc/rc.d/rc$i.d done @@ -169,7 +195,7 @@ done # make /etc/init.d symlink relative ln -nfs rc.d/init.d $RPM_BUILD_ROOT/etc/init.d -# packaged into SysVinit and systemd-init (supported options differ) +# packaged into SysVinit %{__rm} $RPM_BUILD_ROOT%{_mandir}/man5/crypttab.5 %clean @@ -261,18 +287,15 @@ done %attr(755,root,root) /etc/profile.d/lang.*sh %attr(755,root,root) %{_bindir}/doexec -%attr(755,root,root) %{_bindir}/ipcalc %attr(755,root,root) %{_bindir}/resolvesymlink -%attr(755,root,root) %{_bindir}/run-parts -# deprecated shell version, packaged for quick fix if something broken. will be dropped soon -%attr(755,root,root) %{_bindir}/run-parts.sh %attr(755,root,root) %{_bindir}/usleep %attr(755,root,root) %{_sbindir}/consoletype %attr(755,root,root) %{_sbindir}/genhostid %attr(755,root,root) %{_sbindir}/getkey %attr(755,root,root) %{_sbindir}/hwprofile -%attr(755,root,root) %{_sbindir}/if* +%attr(755,root,root) %{_sbindir}/ifdown +%attr(755,root,root) %{_sbindir}/ifup %attr(755,root,root) %{_sbindir}/initlog %attr(755,root,root) %{_sbindir}/loglevel %attr(755,root,root) %{_sbindir}/minilogd @@ -282,7 +305,8 @@ done %attr(755,root,root) %{_sbindir}/setsysfont %attr(755,root,root) %{_sbindir}/setuidgid %attr(755,root,root) %{_sbindir}/start-stop-daemon -%attr(755,root,root) %{_sbindir}/tnl* +%attr(755,root,root) %{_sbindir}/tnldown +%attr(755,root,root) %{_sbindir}/tnlup %attr(4755,root,root) %{_sbindir}/usernetctl %attr(755,root,root) /lib/firmware/firmware-loader.sh @@ -314,7 +338,14 @@ done /lib/rc-scripts/functions %dir %{_sysconfdir}/ppp -%attr(754,root,root) %{_sysconfdir}/ppp/* +%attr(754,root,root) %{_sysconfdir}/ppp/auth-down +%attr(754,root,root) %{_sysconfdir}/ppp/auth-up +%attr(754,root,root) %{_sysconfdir}/ppp/ip-down +%attr(754,root,root) %{_sysconfdir}/ppp/ip-up +%attr(754,root,root) %{_sysconfdir}/ppp/ipv6-down +%attr(754,root,root) %{_sysconfdir}/ppp/ipv6-up +%attr(754,root,root) %{_sysconfdir}/ppp/ipx-down +%attr(754,root,root) %{_sysconfdir}/ppp/ipx-up %dir /etc/sysconfig/cpusets %dir /etc/sysconfig/hwprofiles %dir /etc/sysconfig/interfaces @@ -322,10 +353,10 @@ done %dir /etc/sysconfig/isapnp %dir /etc/sysconfig/interfaces/down.d -%dir /etc/sysconfig/interfaces/down.d/* -%dir /etc/sysconfig/interfaces/up.d -%dir /etc/sysconfig/interfaces/up.d/* +%dir /etc/sysconfig/interfaces/down.d/ppp %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/interfaces/down.d/ppp/logger +%dir /etc/sysconfig/interfaces/up.d +%dir /etc/sysconfig/interfaces/up.d/ppp %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/interfaces/up.d/ppp/logger %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/isapnp/isapnp-kernel.conf @@ -350,7 +381,19 @@ done %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/static-routes6 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/system -%{_mandir}/man?/* +%dir %{_sysconfdir}/modules-load.d +%dir %{_sysconfdir}/sysctl.d + +%{_mandir}/man1/consoletype.1* +%{_mandir}/man1/doexec.1* +%{_mandir}/man1/genhostid.1* +%{_mandir}/man1/getkey.1* +%{_mandir}/man1/initlog.1* +%{_mandir}/man1/netreport.1* +%{_mandir}/man1/usleep.1* +%{_mandir}/man8/ppp-watch.8* +%{_mandir}/man8/start-stop-daemon.8* +%{_mandir}/man8/usernetctl.8* %lang(de) %{_mandir}/de/man?/* %lang(es) %{_mandir}/es/man?/* %lang(fr) %{_mandir}/fr/man?/* @@ -361,3 +404,8 @@ done %dir %{localedir} %lang(de) %{localedir}/de %lang(pl) %{localedir}/pl + +%files -n run-parts +%defattr(644,root,root,755) +%attr(755,root,root) %{_bindir}/run-parts +%{_mandir}/man8/run-parts.8* -- 2.45.1