sysvinit: upgrade 3.04 -> 3.11
PATCH v2 1/1 sysvinit: upgrade 3.04 -> 3.11
From: Changqing Li <[email protected]>
Refresh patches:
crypt-lib.patch
install.patch
pidof-add-m-option.patch
realpath.patch
Drop patches since upstream already include these changes:
0001-hddown-include-libgen.h-for-basename-API.patch sysvinit_remove_linux_fs.patch
Refer:
https://github.com/slicer69/sysvinit/releases
Signed-off-by Changqing Li <[email protected]>
---
...wn-include-libgen.h-for-basename-API.patch | 38 --------------
.../sysvinit/sysvinit/crypt-lib.patch | 19 ++++---
.../sysvinit/sysvinit/install.patch | 50 ++++++-------------
.../sysvinit/pidof-add-m-option.patch | 30 +++++------
.../sysvinit/sysvinit/realpath.patch | 14 +++---
.../sysvinit/sysvinit_remove_linux_fs.patch | 17 -------
.../{sysvinit_3.04.bb => sysvinit_3.11.bb} | 4 +-
7 files changed, 52 insertions(+), 120 deletions(-)
delete mode 100644 meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch
delete mode 100644 meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch
rename meta/recipes-core/sysvinit/{sysvinit_3.04.bb => sysvinit_3.11.bb} (95%)meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch deleted +0 -38
@@ -1,38 +0,0 @@ -From a07c1d94e79840c59563741b45e690e77d4f3dfa Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Sun, 3 Dec 2023 20:09:30 -0800 -Subject: [PATCH] hddown: include libgen.h for basename API - -musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler - -include libgen.h for using the posix declaration of the funciton. - -Fixes - -hddown.c:135:8: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion] - 135 | ptr = basename(lnk); - | ^ ~~~~~~~~~~~~~ - -[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 - -Upstream-Status: Submitted [https://github.com/slicer69/sysvinit/pull/21] -Signed-off-by: Khem Raj <[email protected]> ---- - src/hddown.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/hddown.c b/src/hddown.c -index 7a2cf28..3b31bc0 100644 ---- a/src/hddown.c -+++ b/src/hddown.c -@@ -24,6 +24,7 @@ char *v_hddown = "@(#)hddown.c 1.02 22-Apr-2003 [email protected]"; - #ifndef _GNU_SOURCE - #define _GNU_SOURCE - #endif -+#include <libgen.h> - #include <stdio.h> - #include <stdlib.h> - #include <unistd.h> --- -2.43.0 -
meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch +11 -8
@@ -1,4 +1,4 @@ -From c3a068cf24a22bea7349849ec111ae8d91a54db4 Mon Sep 17 00:00:00 2001 +From 49250c8e0ef563aafd5bbea62612f3d15fdee3af Mon Sep 17 00:00:00 2001 From: Jeff Dike <jdike@x86_64.user-mode-linux.org> Date: Wed, 14 Jul 2010 14:35:52 -0400 Subject: [PATCH] sysvinit - Remove sulogin dependency on /usr/lib*/libcrypt.a
@@ -9,19 +9,19 @@ Upstream-Status: Inappropriate [configuration] # build environment. This patch checks for $LCRYPT in the environment # and uses it if it's there. # - [email protected] - --- - src/Makefile | 11 ++--------- - 1 file changed, 2 insertions(+), 9 deletions(-) + src/Makefile | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/Makefile b/src/Makefile -index 5b1a5a2..b686394 100644 +index 0210171..f696247 100644 --- a/src/Makefile +++ b/src/Makefile -@@ -97,15 +97,8 @@ else - endif +@@ -101,16 +101,8 @@ endif - # Additional libs for GNU libc. + ROOT ?= $(DESTDIR) + +-# Additional libs for GNU libc. -ifneq ($(wildcard $(ROOT)/usr/lib*/libcrypt.*),) - SULOGINLIBS += -lcrypt -endif
@@ -36,3 +36,6 @@ index 5b1a5a2..b686394 100644 endif all: $(BIN) $(SBIN) $(USRBIN) +-- +2.25.1 +
meta/recipes-core/sysvinit/sysvinit/install.patch +16 -34
80 lines not on this page · raw message
meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch +16 -14
@@ -1,4 +1,4 @@ -From 0e441712d0e366a0384ff3fa879f5a2d2607c24f Mon Sep 17 00:00:00 2001 +From 2b19b36409b8de0621b9aeb0d13748e947a5bbfb Mon Sep 17 00:00:00 2001 From: Hongxu Jia <[email protected]> Date: Wed, 24 Jul 2013 17:07:22 +0800 Subject: [PATCH] pidof: add -m option
@@ -14,7 +14,6 @@ Upstream-Status: Backport Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166 Signed-off-by: Hongxu Jia <[email protected]> - --- man/pidof.8 | 6 +++++ src/killall5.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++---
@@ -45,17 +44,17 @@ index 6866cb3..a87d878 100644 .TP .B 0 diff --git a/src/killall5.c b/src/killall5.c -index b0728fa..72289e3 100644 +index 6f7528a..34d656b 100644 --- a/src/killall5.c +++ b/src/killall5.c @@ -121,6 +121,7 @@ typedef struct _s_nfs /* List of processes. */ - PROC *plist; -+PROC *olist; + PROC *plist = NULL; ++PROC *olist = NULL; /* List of processes to omit. */ - OMIT *omit; + OMIT *omit = NULL; @@ -356,6 +357,20 @@ static void clear_mnt(void) } }
@@ -85,7 +84,7 @@ index b0728fa..72289e3 100644 struct dirent *d; char path[PATH_MAX+1]; char buf[PATH_MAX+1]; -@@ -670,6 +686,17 @@ int readproc() +@@ -671,6 +687,17 @@ int readproc() p->next = plist; plist = p; p->pid = pid;
@@ -103,7 +102,7 @@ index b0728fa..72289e3 100644 } closedir(dir); -@@ -870,6 +897,26 @@ PIDQ_HEAD *pidof(char *prog) +@@ -877,6 +904,26 @@ PIDQ_HEAD *pidof(char *prog) return q; }
@@ -130,7 +129,7 @@ index b0728fa..72289e3 100644 /* Give usage message and exit. */ void usage(void) { -@@ -920,6 +967,7 @@ void nsyslog(int pri, char *fmt, ...) +@@ -927,6 +974,7 @@ void nsyslog(int pri, char *fmt, ...) #define PIDOF_OMIT 0x02 #define PIDOF_NETFS 0x04 #define PIDOF_QUIET 0x08
@@ -138,7 +137,7 @@ index b0728fa..72289e3 100644 /* * Pidof functionality. -@@ -937,6 +985,7 @@ int main_pidof(int argc, char **argv) +@@ -944,6 +992,7 @@ int main_pidof(int argc, char **argv) char tmp[512]; char sep = ' ';
@@ -146,7 +145,7 @@ index b0728fa..72289e3 100644 omit = (OMIT*)0; nlist = (NFS*)0; opterr = 0; -@@ -944,7 +993,7 @@ int main_pidof(int argc, char **argv) +@@ -951,7 +1000,7 @@ int main_pidof(int argc, char **argv) if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0)) flags |= PIDOF_NETFS;
@@ -155,7 +154,7 @@ index b0728fa..72289e3 100644 case '?': nsyslog(LOG_ERR,"invalid options on command line!\n"); closelog(); -@@ -995,6 +1044,9 @@ int main_pidof(int argc, char **argv) +@@ -1002,6 +1051,9 @@ int main_pidof(int argc, char **argv) case 'z': list_dz_processes = TRUE; break;
@@ -165,7 +164,7 @@ index b0728fa..72289e3 100644 case 'n': flags |= PIDOF_NETFS; break; -@@ -1026,10 +1078,13 @@ int main_pidof(int argc, char **argv) +@@ -1033,10 +1085,13 @@ int main_pidof(int argc, char **argv) pid_t spid = 0; while ((p = get_next_from_pid_q(q))) { if ((flags & PIDOF_OMIT) && omit) {
@@ -181,7 +180,7 @@ index b0728fa..72289e3 100644 } /* -@@ -1071,6 +1126,7 @@ int main_pidof(int argc, char **argv) +@@ -1078,6 +1133,7 @@ int main_pidof(int argc, char **argv) printf("\n"); }
@@ -189,3 +188,6 @@ index b0728fa..72289e3 100644 clear_mnt(); closelog(); +-- +2.25.1 +
meta/recipes-core/sysvinit/sysvinit/realpath.patch +8 -6
@@ -1,4 +1,4 @@ -From eb158c97f19d473d01befe96359a7f93ae834517 Mon Sep 17 00:00:00 2001 +From 50e6b3a0fc7c083e6514a55ac93e5591aaeb787d Mon Sep 17 00:00:00 2001 From: Khem Raj <[email protected]> Date: Thu, 19 Nov 2015 00:10:03 +0000 Subject: [PATCH] Fix build on musl use realpath() API its available on all
@@ -10,7 +10,6 @@ However for Linux it should always work Upstream-Status: Inappropriate [Linux specific] Signed-off-by: Khem Raj <[email protected]> - --- src/killall5.c | 4 ++-- src/mountpoint.c | 1 +
@@ -18,10 +17,10 @@ Signed-off-by: Khem Raj <[email protected]> 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/killall5.c b/src/killall5.c -index a664954..9798423 100644 +index 34d656b..bc19d7f 100644 --- a/src/killall5.c +++ b/src/killall5.c -@@ -977,9 +977,9 @@ int matches(PROC *o, PROC *p) +@@ -910,9 +910,9 @@ int matches(PROC *o, PROC *p) char *oargv1, *pargv1; if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) { if (o->argv1 && p->argv1) {
@@ -34,7 +33,7 @@ index a664954..9798423 100644 if (! strcmp(oargv1, pargv1)) { ret = 1; diff --git a/src/mountpoint.c b/src/mountpoint.c -index b24335e..5f20522 100644 +index 184b1f6..c55b0df 100644 --- a/src/mountpoint.c +++ b/src/mountpoint.c @@ -23,6 +23,7 @@
@@ -46,7 +45,7 @@ index b24335e..5f20522 100644 #include <unistd.h> #include <stdlib.h> diff --git a/src/wall.c b/src/wall.c -index d3a2c70..00826e9 100644 +index e527613..1d363ca 100644 --- a/src/wall.c +++ b/src/wall.c @@ -30,6 +30,7 @@
@@ -57,3 +56,6 @@ index d3a2c70..00826e9 100644 #include "init.h" +-- +2.25.1 +
meta/recipes-core/sysvinit/sysvinit/sysvinit_remove_linux_fs.patch deleted +0 -17
@@ -1,17 +0,0 @@ -# From glibc 2.36, <linux/mount.h> (included from <linux/fs.h>) and -# <sys/mount.h> (included from glibc) are no longer compatible: -# https://sourceware.org/glibc/wiki/Release/2.36#Usage_of_.3Clinux.2Fmount.h.3E_and_.3Csys.2Fmount.h.3E - -Upstream-Status: Pending -Signed-off-by: Khem Raj <[email protected]> - ---- sysvinit-3.04/src/sulogin.c.orig 2022-08-07 23:07:42.952576274 +0200 -+++ sysvinit-3.04/src/sulogin.c 2022-08-07 23:08:26.511470983 +0200 -@@ -51,7 +51,6 @@ - #ifdef __linux__ - # include <sys/statfs.h> - # include <sys/mount.h> --# include <linux/fs.h> - # include <linux/magic.h> - # include <linux/major.h> - # ifndef TMPFS_MAGIC
meta/recipes-core/sysvinit/sysvinit_3.11.bb renamed from meta/recipes-core/sysvinit/sysvinit_3.04.bb +1 -3
@@ -16,15 +16,13 @@ SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/${BP}.tar.xz \ file://pidof-add-m-option.patch \ file://realpath.patch \ file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \ - file://sysvinit_remove_linux_fs.patch \ file://rcS-default \ file://rc \ file://rcS \ file://bootlogd.init \ file://01_bootlogd \ - file://0001-hddown-include-libgen.h-for-basename-API.patch \ " -SRC_URI[sha256sum] = "2a621fe6e4528bc91308b74867ddaaebbdf7753f02395c0c5bae817bd2b7e3a5" +SRC_URI[sha256sum] = "04f1b7d67413af1c09c41acc1e3ce946f2d0f7a1e47c9978744bc542864e13d4" S = "${WORKDIR}/sysvinit-${PV}"
Signature · 1 line
2.25.1