summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-12-05 16:43:57 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-09 12:00:42 +0000
commit7b228f2d796cb8e46c81cad4a9273311324d76bf (patch)
treede3a1b553a402158e136cc8858c4d202401a5e68 /meta
parent27120a8fedccebc3f3dd26781efe28ac454bcfb4 (diff)
downloadpoky-7b228f2d796cb8e46c81cad4a9273311324d76bf.tar.gz
sysvinit: update 2.88dsf -> 2.96
Remove 0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch, the problem has been fixed upstream. Rebase the other patches. License-Update: copyright years (From OE-Core rev: 5372e1acdd68367e64d13e19d1beb2d7b3e3c224) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch52
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch14
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch31
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/install.patch47
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch64
-rw-r--r--meta/recipes-core/sysvinit/sysvinit/realpath.patch85
-rw-r--r--meta/recipes-core/sysvinit/sysvinit_2.96.bb (renamed from meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb)20
7 files changed, 135 insertions, 178 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit/0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch b/meta/recipes-core/sysvinit/sysvinit/0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch
deleted file mode 100644
index f35c15cb31..0000000000
--- a/meta/recipes-core/sysvinit/sysvinit/0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From 36ac97bfe51797458442a6035219a504a42e703a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 21 Aug 2015 10:56:40 -0700
4Subject: [PATCH] This fixes an issue that clang reports about mutliple output
5 files
6
7Issue is that we are passing .h file to link step as seen below.
8
9| arm-oe-linux-gnueabi-clang -march=armv7-a -mthumb -mfloat-abi=hard
10-mfpu=neon-vfpv4 -mtune=cortex-a7 -D__extern_always_inline=inline
11-no-integrated-as
12--sysroot=/mnt/home/kraj/work/angstrom/sources/openembedded-core/build/tmp-glibc/sysroots/raspberrypi2
13-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed halt.o ifdown.o hddown.o
14utmp.o reboot.h -o halt
15| clang-3.7: error: cannot specify -o when generating multiple output
16files
17
18Upstream-Status: Pending
19
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21---
22 src/Makefile | 6 +++---
23 1 file changed, 3 insertions(+), 3 deletions(-)
24
25diff --git a/src/Makefile b/src/Makefile
26index e77ed5f..a6f9f40 100644
27--- a/src/Makefile
28+++ b/src/Makefile
29@@ -103,9 +103,9 @@ all: $(BIN) $(SBIN) $(USRBIN)
30 init: LDLIBS += $(INITLIBS) $(STATIC)
31 init: init.o init_utmp.o
32
33-halt: halt.o ifdown.o hddown.o utmp.o reboot.h
34+halt: halt.o ifdown.o hddown.o utmp.o
35
36-last: last.o oldutmp.h
37+last: last.o
38
39 mesg: mesg.o
40
41@@ -120,7 +120,7 @@ sulogin: sulogin.o
42
43 wall: dowall.o wall.o
44
45-shutdown: dowall.o shutdown.o utmp.o reboot.h
46+shutdown: dowall.o shutdown.o utmp.o
47
48 bootlogd: LDLIBS += -lutil
49 bootlogd: bootlogd.o
50--
512.1.4
52
diff --git a/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch b/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch
index e13ac9d06b..60fbd87534 100644
--- a/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch
+++ b/meta/recipes-core/sysvinit/sysvinit/0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch
@@ -1,4 +1,4 @@
1From 3c29a86f351ea4827dc445bb8e6cb774543c9be6 Mon Sep 17 00:00:00 2001 1From c710a3accd1fabdb671274e1a458405282d51e0c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Aug 2018 15:38:58 -0700 3Date: Mon, 6 Aug 2018 15:38:58 -0700
4Subject: [PATCH] include sys/sysmacros.h for major/minor definitions 4Subject: [PATCH] include sys/sysmacros.h for major/minor definitions
@@ -13,10 +13,10 @@ Upstream-Status: Pending
13 3 files changed, 3 insertions(+) 13 3 files changed, 3 insertions(+)
14 14
15diff --git a/src/bootlogd.c b/src/bootlogd.c 15diff --git a/src/bootlogd.c b/src/bootlogd.c
16index 570d382..68d62f3 100644 16index 787db87..8b07903 100644
17--- a/src/bootlogd.c 17--- a/src/bootlogd.c
18+++ b/src/bootlogd.c 18+++ b/src/bootlogd.c
19@@ -35,6 +35,7 @@ 19@@ -29,6 +29,7 @@
20 #include <sys/types.h> 20 #include <sys/types.h>
21 #include <sys/time.h> 21 #include <sys/time.h>
22 #include <sys/stat.h> 22 #include <sys/stat.h>
@@ -25,7 +25,7 @@ index 570d382..68d62f3 100644
25 #include <sys/utsname.h> 25 #include <sys/utsname.h>
26 #include <time.h> 26 #include <time.h>
27diff --git a/src/mountpoint.c b/src/mountpoint.c 27diff --git a/src/mountpoint.c b/src/mountpoint.c
28index 9e3dd9c..91f74ed 100644 28index 5f20522..94df7a1 100644
29--- a/src/mountpoint.c 29--- a/src/mountpoint.c
30+++ b/src/mountpoint.c 30+++ b/src/mountpoint.c
31@@ -25,6 +25,7 @@ 31@@ -25,6 +25,7 @@
@@ -37,7 +37,7 @@ index 9e3dd9c..91f74ed 100644
37 #include <stdlib.h> 37 #include <stdlib.h>
38 #include <string.h> 38 #include <string.h>
39diff --git a/src/shutdown.c b/src/shutdown.c 39diff --git a/src/shutdown.c b/src/shutdown.c
40index 7e997da..17de58d 100644 40index b744a2c..40b7faf 100644
41--- a/src/shutdown.c 41--- a/src/shutdown.c
42+++ b/src/shutdown.c 42+++ b/src/shutdown.c
43@@ -40,6 +40,7 @@ 43@@ -40,6 +40,7 @@
@@ -46,5 +46,5 @@ index 7e997da..17de58d 100644
46 #include <sys/stat.h> 46 #include <sys/stat.h>
47+#include <sys/sysmacros.h> 47+#include <sys/sysmacros.h>
48 #include <sys/wait.h> 48 #include <sys/wait.h>
49 #include <time.h> 49 #ifdef __linux__
50 #include <string.h> 50 #include <sys/sysmacros.h> /* brought in my LFS patch */
diff --git a/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch b/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
index 7b342901e1..bd4444b81b 100644
--- a/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
+++ b/meta/recipes-core/sysvinit/sysvinit/crypt-lib.patch
@@ -1,3 +1,8 @@
1From 7276275d9a08d5ae268fb263027bbc60bc0ab2e8 Mon Sep 17 00:00:00 2001
2From: Jeff Dike <jdike@x86_64.user-mode-linux.org>
3Date: Wed, 14 Jul 2010 14:35:52 -0400
4Subject: [PATCH] sysvinit - Remove sulogin dependency on /usr/lib*/libcrypt.a
5
1Upstream-Status: Inappropriate [configuration] 6Upstream-Status: Inappropriate [configuration]
2 7
3# The src Makefile was checking for libcrypt.a on the host, not in the 8# The src Makefile was checking for libcrypt.a on the host, not in the
@@ -5,21 +10,27 @@ Upstream-Status: Inappropriate [configuration]
5# and uses it if it's there. 10# and uses it if it's there.
6# - jdike@linux.intel.com 11# - jdike@linux.intel.com
7 12
8Index: sysvinit-2.88dsf/src/Makefile 13---
9=================================================================== 14 src/Makefile | 9 ++-------
10--- sysvinit-2.88dsf.orig/src/Makefile 15 1 file changed, 2 insertions(+), 7 deletions(-)
11+++ sysvinit-2.88dsf/src/Makefile 16
12@@ -85,9 +85,13 @@ else 17diff --git a/src/Makefile b/src/Makefile
18index 1380d7f..628e77f 100644
19--- a/src/Makefile
20+++ b/src/Makefile
21@@ -97,13 +97,8 @@ else
13 endif 22 endif
14 23
15 # Additional libs for GNU libc. 24 # Additional libs for GNU libc.
25-ifneq ($(wildcard /usr/lib*/libcrypt.*),)
26- SULOGINLIBS += -lcrypt
27-endif
28-
29-# Additional libs for GNU libc / multiarch on Debian based systems.
30-ifneq ($(wildcard /usr/lib/*/libcrypt.*),)
31- SULOGINLIBS += -lcrypt
16+ifneq ($(LCRYPT),) 32+ifneq ($(LCRYPT),)
17+ SULOGINLIBS += $(LCRYPT) 33+ SULOGINLIBS += $(LCRYPT)
18+else
19 ifneq ($(wildcard /usr/lib*/libcrypt.a),)
20 SULOGINLIBS += -lcrypt
21 endif 34 endif
22+endif
23 35
24 all: $(BIN) $(SBIN) $(USRBIN) 36 all: $(BIN) $(SBIN) $(USRBIN)
25
diff --git a/meta/recipes-core/sysvinit/sysvinit/install.patch b/meta/recipes-core/sysvinit/sysvinit/install.patch
index 6c4225a678..2930fb0195 100644
--- a/meta/recipes-core/sysvinit/sysvinit/install.patch
+++ b/meta/recipes-core/sysvinit/sysvinit/install.patch
@@ -1,10 +1,19 @@
1From b6cc66ab245ceb6bca0116dff7a41f6d7677b96a Mon Sep 17 00:00:00 2001
2From: Qing He <qing.he@intel.com>
3Date: Fri, 18 Jun 2010 09:40:30 +0800
4Subject: [PATCH] sysvinit: upgrade to version 2.88dsf
5
1Upstream-Status: Pending 6Upstream-Status: Pending
2 7
8---
9 src/Makefile | 53 +++++++++++++++++++++++++++++-----------------------
10 1 file changed, 30 insertions(+), 23 deletions(-)
11
3diff --git a/src/Makefile b/src/Makefile 12diff --git a/src/Makefile b/src/Makefile
4index e2b8028..3e11e92 100644 13index 9f9f09e..1380d7f 100644
5--- a/src/Makefile 14--- a/src/Makefile
6+++ b/src/Makefile 15+++ b/src/Makefile
7@@ -65,7 +65,14 @@ else 16@@ -77,7 +77,14 @@ else
8 INSTALL_DATA = install -m 644 17 INSTALL_DATA = install -m 644
9 endif 18 endif
10 INSTALL_DIR = install -m 755 -d 19 INSTALL_DIR = install -m 755 -d
@@ -20,10 +29,10 @@ index e2b8028..3e11e92 100644
20 29
21 ifeq ($(WITH_SELINUX),yes) 30 ifeq ($(WITH_SELINUX),yes)
22 SELINUX_DEF = -DWITH_SELINUX 31 SELINUX_DEF = -DWITH_SELINUX
23@@ -138,39 +145,39 @@ clobber: cleanobjs 32@@ -189,42 +196,42 @@ clobber: cleanobjs
24 distclean: clobber 33 distclean: clobber
25 34
26 install: 35 install: all
27- $(INSTALL_DIR) $(ROOT)/bin/ $(ROOT)/sbin/ 36- $(INSTALL_DIR) $(ROOT)/bin/ $(ROOT)/sbin/
28- $(INSTALL_DIR) $(ROOT)/usr/bin/ 37- $(INSTALL_DIR) $(ROOT)/usr/bin/
29+ $(INSTALL_DIR) $(ROOT)$(base_bindir)/ $(ROOT)$(base_sbindir)/ 38+ $(INSTALL_DIR) $(ROOT)$(base_bindir)/ $(ROOT)$(base_sbindir)/
@@ -40,16 +49,14 @@ index e2b8028..3e11e92 100644
40- $(INSTALL_EXEC) $$i $(ROOT)/usr/bin/ ; \ 49- $(INSTALL_EXEC) $$i $(ROOT)/usr/bin/ ; \
41+ $(INSTALL_EXEC) $$i $(ROOT)$(bindir)/ ; \ 50+ $(INSTALL_EXEC) $$i $(ROOT)$(bindir)/ ; \
42 done 51 done
43- # $(INSTALL_DIR) $(ROOT)/etc/ 52 # $(INSTALL_DIR) $(ROOT)/etc/
44- # $(INSTALL_EXEC) initscript.sample $(ROOT)/etc/ 53 # $(INSTALL_EXEC) ../doc/initscript.sample $(ROOT)/etc/
45- ln -sf halt $(ROOT)/sbin/reboot 54- ln -sf halt $(ROOT)/sbin/reboot
46- ln -sf halt $(ROOT)/sbin/poweroff 55- ln -sf halt $(ROOT)/sbin/poweroff
47- ln -sf init $(ROOT)/sbin/telinit 56- ln -sf init $(ROOT)/sbin/telinit
48- ln -sf /sbin/killall5 $(ROOT)/bin/pidof 57- ln -sf /sbin/killall5 $(ROOT)/bin/pidof
49- if [ ! -f $(ROOT)/usr/bin/lastb ]; then \ 58- if [ ! -f $(ROOT)/usr/bin/lastb ]; then \
50- ln -sf last $(ROOT)/usr/bin/lastb; \ 59- ln -sf last $(ROOT)/usr/bin/lastb; \
51+ # $(INSTALL_DIR) $(ROOT)$(sysconfdir)/
52+ # $(INSTALL_EXEC) initscript.sample $(ROOT)$(sysconfdir)/
53+ ln -sf halt $(ROOT)$(base_sbindir)/reboot 60+ ln -sf halt $(ROOT)$(base_sbindir)/reboot
54+ ln -sf halt $(ROOT)$(base_sbindir)/poweroff 61+ ln -sf halt $(ROOT)$(base_sbindir)/poweroff
55+ ln -sf init $(ROOT)$(base_sbindir)/telinit 62+ ln -sf init $(ROOT)$(base_sbindir)/telinit
@@ -67,17 +74,23 @@ index e2b8028..3e11e92 100644
67+ $(INSTALL_DIR) $(ROOT)$(mandir)/man1/ 74+ $(INSTALL_DIR) $(ROOT)$(mandir)/man1/
68+ $(INSTALL_DIR) $(ROOT)$(mandir)/man5/ 75+ $(INSTALL_DIR) $(ROOT)$(mandir)/man5/
69+ $(INSTALL_DIR) $(ROOT)$(mandir)/man8/ 76+ $(INSTALL_DIR) $(ROOT)$(mandir)/man8/
70 for i in $(MAN1); do \ 77 for man in $(MAN1); do \
71- $(INSTALL_DATA) ../man/$$i $(ROOT)$(MANDIR)/man1/; \ 78- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man1/; \
72+ $(INSTALL_DATA) ../man/$$i $(ROOT)$(mandir)/man1/; \ 79- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man1/$$man ; \
80+ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man1/; \
81+ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man1/$$man ; \
73 done 82 done
74 for i in $(MAN5); do \ 83 for man in $(MAN5); do \
75- $(INSTALL_DATA) ../man/$$i $(ROOT)$(MANDIR)/man5/; \ 84- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man5/; \
76+ $(INSTALL_DATA) ../man/$$i $(ROOT)$(mandir)/man5/; \ 85- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man5/$$man ; \
86+ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man5/; \
87+ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man5/$$man ; \
77 done 88 done
78 for i in $(MAN8); do \ 89 for man in $(MAN8); do \
79- $(INSTALL_DATA) ../man/$$i $(ROOT)$(MANDIR)/man8/; \ 90- $(INSTALL_DATA) ../man/$$man $(ROOT)$(MANDIR)/man8/; \
80+ $(INSTALL_DATA) ../man/$$i $(ROOT)$(mandir)/man8/; \ 91- sed -i "1{ $(MANDB); }" $(ROOT)$(MANDIR)/man8/$$man ; \
92+ $(INSTALL_DATA) ../man/$$man $(ROOT)$(mandir)/man8/; \
93+ sed -i "1{ $(MANDB); }" $(ROOT)$(mandir)/man8/$$man ; \
81 done 94 done
82 ifeq ($(ROOT),) 95 ifeq ($(ROOT),)
83 # 96 #
diff --git a/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch b/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch
index 5b5dfdc001..494aa0e012 100644
--- a/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch
+++ b/meta/recipes-core/sysvinit/sysvinit/pidof-add-m-option.patch
@@ -1,4 +1,7 @@
1pidof: add -m option 1From 6c490ea6579a132fabb7dbd25387bb521f820371 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 24 Jul 2013 17:07:22 +0800
4Subject: [PATCH] pidof: add -m option
2 5
3When used with -o, will also omit any processes that have the same 6When used with -o, will also omit any processes that have the same
4argv[0] and argv[1] as any explicitly omitted process ids. This can be 7argv[0] and argv[1] as any explicitly omitted process ids. This can be
@@ -11,23 +14,25 @@ Upstream-Status: backport
11Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166 14Imported patch from: https://bugzilla.redhat.com/attachment.cgi?id=658166
12 15
13Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 16Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
17
14--- 18---
15 man/pidof.8 | 6 ++++++ 19 man/pidof.8 | 6 +++++
16 src/killall5.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 20 src/killall5.c | 62 +++++++++++++++++++++++++++++++++++++++++++++++---
17 2 files changed, 65 insertions(+), 3 deletions(-) 21 2 files changed, 65 insertions(+), 3 deletions(-)
18 22
19diff --git a/man/pidof.8 b/man/pidof.8 23diff --git a/man/pidof.8 b/man/pidof.8
24index ebe5f55..2fdc4d3 100644
20--- a/man/pidof.8 25--- a/man/pidof.8
21+++ b/man/pidof.8 26+++ b/man/pidof.8
22@@ -24,6 +24,7 @@ pidof -- find the process ID of a running program. 27@@ -25,6 +25,7 @@ pidof -- find the process ID of a running program.
23 .RB [ \-c ]
24 .RB [ \-n ] 28 .RB [ \-n ]
25 .RB [ \-x ] 29 .RB [ \-x ]
30 .RB [ \-z ]
26+.RB [ \-m ] 31+.RB [ \-m ]
27 .RB [ \-o 32 .RB [ \-o
28 .IR omitpid[,omitpid..] ] 33 .IR omitpid[,omitpid...] ]
29 .RB [ \-o 34 .RB [ \-o
30@@ -63,6 +64,11 @@ shells running the named scripts. 35@@ -76,6 +77,11 @@ is shown. The default separator is a space.
31 Tells \fIpidof\fP to omit processes with that process id. The special 36 Tells \fIpidof\fP to omit processes with that process id. The special
32 pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP 37 pid \fB%PPID\fP can be used to name the parent process of the \fIpidof\fP
33 program, in other words the calling shell or shell script. 38 program, in other words the calling shell or shell script.
@@ -40,10 +45,10 @@ diff --git a/man/pidof.8 b/man/pidof.8
40 .TP 45 .TP
41 .B 0 46 .B 0
42diff --git a/src/killall5.c b/src/killall5.c 47diff --git a/src/killall5.c b/src/killall5.c
43index 5937d98..e73885e 100644 48index 8b5cb38..a664954 100644
44--- a/src/killall5.c 49--- a/src/killall5.c
45+++ b/src/killall5.c 50+++ b/src/killall5.c
46@@ -118,6 +118,7 @@ typedef struct _s_nfs 51@@ -126,6 +126,7 @@ typedef struct _s_nfs
47 52
48 /* List of processes. */ 53 /* List of processes. */
49 PROC *plist; 54 PROC *plist;
@@ -51,7 +56,7 @@ index 5937d98..e73885e 100644
51 56
52 /* List of processes to omit. */ 57 /* List of processes to omit. */
53 OMIT *omit; 58 OMIT *omit;
54@@ -345,6 +346,20 @@ static void clear_mnt(void) 59@@ -361,6 +362,20 @@ static void clear_mnt(void)
55 } 60 }
56 } 61 }
57 62
@@ -70,9 +75,9 @@ index 5937d98..e73885e 100644
70+} 75+}
71+ 76+
72 /* 77 /*
73 * Check if path is ia shadow off a NFS partition. 78 * Check if path is a shadow off a NFS partition.
74 */ 79 */
75@@ -452,6 +467,7 @@ int readproc(int do_stat) 80@@ -486,6 +501,7 @@ int readproc(int do_stat)
76 DIR *dir; 81 DIR *dir;
77 FILE *fp; 82 FILE *fp;
78 PROC *p, *n; 83 PROC *p, *n;
@@ -80,7 +85,7 @@ index 5937d98..e73885e 100644
80 struct dirent *d; 85 struct dirent *d;
81 struct stat st; 86 struct stat st;
82 char path[PATH_MAX+1]; 87 char path[PATH_MAX+1];
83@@ -624,6 +640,17 @@ int readproc(int do_stat) 88@@ -733,6 +749,17 @@ int readproc(int do_stat)
84 p->next = plist; 89 p->next = plist;
85 plist = p; 90 plist = p;
86 p->pid = pid; 91 p->pid = pid;
@@ -98,7 +103,7 @@ index 5937d98..e73885e 100644
98 } 103 }
99 closedir(dir); 104 closedir(dir);
100 105
101@@ -813,6 +840,26 @@ PIDQ_HEAD *pidof(char *prog) 106@@ -944,6 +971,26 @@ PIDQ_HEAD *pidof(char *prog)
102 return q; 107 return q;
103 } 108 }
104 109
@@ -125,42 +130,42 @@ index 5937d98..e73885e 100644
125 /* Give usage message and exit. */ 130 /* Give usage message and exit. */
126 void usage(void) 131 void usage(void)
127 { 132 {
128@@ -845,6 +892,7 @@ void nsyslog(int pri, char *fmt, ...) 133@@ -994,6 +1041,7 @@ void nsyslog(int pri, char *fmt, ...)
129 #define PIDOF_SINGLE 0x01
130 #define PIDOF_OMIT 0x02 134 #define PIDOF_OMIT 0x02
131 #define PIDOF_NETFS 0x04 135 #define PIDOF_NETFS 0x04
136 #define PIDOF_QUIET 0x08
132+#define PIDOF_OMIT_OMIT_MATCHES 0x08 137+#define PIDOF_OMIT_OMIT_MATCHES 0x08
133 138
134 /* 139 /*
135 * Pidof functionality. 140 * Pidof functionality.
136@@ -861,6 +909,7 @@ int main_pidof(int argc, char **argv) 141@@ -1011,6 +1059,7 @@ int main_pidof(int argc, char **argv)
137 struct stat st;
138 char tmp[512]; 142 char tmp[512];
143 char sep = ' ';
139 144
140+ olist = (PROC*)0; 145+ olist = (PROC*)0;
141 omit = (OMIT*)0; 146 omit = (OMIT*)0;
142 nlist = (NFS*)0; 147 nlist = (NFS*)0;
143 opterr = 0; 148 opterr = 0;
144@@ -868,7 +917,7 @@ int main_pidof(int argc, char **argv) 149@@ -1018,7 +1067,7 @@ int main_pidof(int argc, char **argv)
145 if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0)) 150 if ((token = getenv("PIDOF_NETFS")) && (strcmp(token,"no") != 0))
146 flags |= PIDOF_NETFS; 151 flags |= PIDOF_NETFS;
147 152
148- while ((opt = getopt(argc,argv,"hco:sxn")) != EOF) switch (opt) { 153- while ((opt = getopt(argc,argv,"qhco:d:sxzn")) != EOF) switch (opt) {
149+ while ((opt = getopt(argc,argv,"hcmo:sxn")) != EOF) switch (opt) { 154+ while ((opt = getopt(argc,argv,"qhcmo:d:sxzn")) != EOF) switch (opt) {
150 case '?': 155 case '?':
151 nsyslog(LOG_ERR,"invalid options on command line!\n"); 156 nsyslog(LOG_ERR,"invalid options on command line!\n");
152 closelog(); 157 closelog();
153@@ -907,6 +956,9 @@ int main_pidof(int argc, char **argv) 158@@ -1069,6 +1118,9 @@ int main_pidof(int argc, char **argv)
154 case 'x': 159 case 'z':
155 scripts_too++; 160 list_dz_processes = TRUE;
156 break; 161 break;
157+ case 'm': 162+ case 'm':
158+ flags |= PIDOF_OMIT_OMIT_MATCHES; 163+ flags |= PIDOF_OMIT_OMIT_MATCHES;
159+ break; 164+ break;
160 case 'n': 165 case 'n':
161 flags |= PIDOF_NETFS; 166 flags |= PIDOF_NETFS;
162 break; 167 break;
163@@ -938,10 +990,13 @@ int main_pidof(int argc, char **argv) 168@@ -1100,10 +1152,13 @@ int main_pidof(int argc, char **argv)
164 pid_t spid = 0; 169 pid_t spid = 0;
165 while ((p = get_next_from_pid_q(q))) { 170 while ((p = get_next_from_pid_q(q))) {
166 if ((flags & PIDOF_OMIT) && omit) { 171 if ((flags & PIDOF_OMIT) && omit) {
@@ -176,14 +181,11 @@ index 5937d98..e73885e 100644
176 } 181 }
177 182
178 /* 183 /*
179@@ -977,6 +1032,7 @@ int main_pidof(int argc, char **argv) 184@@ -1145,6 +1200,7 @@ int main_pidof(int argc, char **argv)
180 if (!first)
181 printf("\n"); 185 printf("\n");
186 }
182 187
183+ clear_omit(); 188+ clear_omit();
184 clear_mnt(); 189 clear_mnt();
185 190
186 closelog(); 191 closelog();
187--
1881.8.1.2
189
diff --git a/meta/recipes-core/sysvinit/sysvinit/realpath.patch b/meta/recipes-core/sysvinit/sysvinit/realpath.patch
index 5e0dca3bf1..859fd8baad 100644
--- a/meta/recipes-core/sysvinit/sysvinit/realpath.patch
+++ b/meta/recipes-core/sysvinit/sysvinit/realpath.patch
@@ -1,4 +1,8 @@
1Fix build on musl use realpath() API its available on all libcs 1From eb158c97f19d473d01befe96359a7f93ae834517 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 Nov 2015 00:10:03 +0000
4Subject: [PATCH] Fix build on musl use realpath() API its available on all
5 libcs
2 6
3realpath() API doesnt work on systems with PATH_MAX set to be unlimited e.g. GNU/Hurd 7realpath() API doesnt work on systems with PATH_MAX set to be unlimited e.g. GNU/Hurd
4However for Linux it should always work 8However for Linux it should always work
@@ -7,52 +11,17 @@ Upstream-Status: Inappropriate[Linux specific]
7 11
8Signed-off-by: Khem Raj <raj.khem@gmail.com> 12Signed-off-by: Khem Raj <raj.khem@gmail.com>
9 13
10Index: sysvinit-2.88dsf/src/ifdown.c 14---
11=================================================================== 15 src/killall5.c | 4 ++--
12--- sysvinit-2.88dsf.orig/src/ifdown.c 2010-03-23 07:37:01.000000000 -0700 16 src/mountpoint.c | 1 +
13+++ sysvinit-2.88dsf/src/ifdown.c 2014-04-02 00:43:43.675437029 -0700 17 src/wall.c | 1 +
14@@ -26,11 +26,11 @@ 18 3 files changed, 4 insertions(+), 2 deletions(-)
15 #include <unistd.h> 19
16 #include <time.h> 20diff --git a/src/killall5.c b/src/killall5.c
17 #include <string.h> 21index a664954..9798423 100644
18+#include <errno.h> 22--- a/src/killall5.c
19 23+++ b/src/killall5.c
20 #include <sys/ioctl.h> 24@@ -977,9 +977,9 @@ int matches(PROC *o, PROC *p)
21 #include <sys/socket.h>
22 #include <sys/time.h>
23-#include <sys/errno.h>
24
25 #include <net/if.h>
26 #include <netinet/in.h>
27Index: sysvinit-2.88dsf/src/init.c
28===================================================================
29--- sysvinit-2.88dsf.orig/src/init.c 2014-04-02 00:42:10.488770162 -0700
30+++ sysvinit-2.88dsf/src/init.c 2014-04-02 00:42:59.432103823 -0700
31@@ -49,6 +49,7 @@
32 #include <utmp.h>
33 #include <ctype.h>
34 #include <stdarg.h>
35+#include <sys/ttydefaults.h>
36 #include <sys/syslog.h>
37 #include <sys/time.h>
38
39Index: sysvinit-2.88dsf/src/mountpoint.c
40===================================================================
41--- sysvinit-2.88dsf.orig/src/mountpoint.c 2009-09-10 01:28:49.000000000 -0700
42+++ sysvinit-2.88dsf/src/mountpoint.c 2014-04-02 00:44:18.248770942 -0700
43@@ -23,6 +23,7 @@
44 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
45 */
46
47+#include <sys/types.h>
48 #include <sys/stat.h>
49 #include <unistd.h>
50 #include <stdlib.h>
51Index: sysvinit-2.88dsf/src/killall5.c
52===================================================================
53--- sysvinit-2.88dsf.orig/src/killall5.c 2014-03-26 00:49:52.982668074 -0700
54+++ sysvinit-2.88dsf/src/killall5.c 2014-04-02 00:46:45.838771653 -0700
55@@ -846,9 +846,9 @@
56 char *oargv1, *pargv1; 25 char *oargv1, *pargv1;
57 if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) { 26 if ((o->argv0 && p->argv0 && !strcmp(o->argv0,p->argv0))) {
58 if (o->argv1 && p->argv1) { 27 if (o->argv1 && p->argv1) {
@@ -64,14 +33,26 @@ Index: sysvinit-2.88dsf/src/killall5.c
64 pargv1 = strdup(p->argv1); 33 pargv1 = strdup(p->argv1);
65 if (! strcmp(oargv1, pargv1)) { 34 if (! strcmp(oargv1, pargv1)) {
66 ret = 1; 35 ret = 1;
67Index: sysvinit-2.88dsf/src/wall.c 36diff --git a/src/mountpoint.c b/src/mountpoint.c
68=================================================================== 37index b24335e..5f20522 100644
69--- sysvinit-2.88dsf.orig/src/wall.c 2009-11-22 14:05:53.000000000 -0800 38--- a/src/mountpoint.c
70+++ sysvinit-2.88dsf/src/wall.c 2014-04-02 00:49:15.258772217 -0700 39+++ b/src/mountpoint.c
71@@ -29,6 +29,7 @@ 40@@ -23,6 +23,7 @@
41 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
42 */
43
44+#include <sys/types.h>
45 #include <sys/stat.h>
72 #include <unistd.h> 46 #include <unistd.h>
47 #include <stdlib.h>
48diff --git a/src/wall.c b/src/wall.c
49index d3a2c70..00826e9 100644
50--- a/src/wall.c
51+++ b/src/wall.c
52@@ -30,6 +30,7 @@
73 #include <pwd.h> 53 #include <pwd.h>
74 #include <syslog.h> 54 #include <syslog.h>
55 #include <sys/types.h>
75+#include <time.h> 56+#include <time.h>
76 #include "init.h" 57 #include "init.h"
77 58
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.96.bb
index 8fd6df9d6b..2b146b1ef8 100644
--- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_2.96.bb
@@ -4,16 +4,15 @@ HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/"
4SECTION = "base" 4SECTION = "base"
5LICENSE = "GPLv2+" 5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ 6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
7 file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4" 7 file://COPYRIGHT;endline=15;md5=a1d3b3526501d3546d530bbe6ab6cdbe \
8PR = "r14" 8 "
9 9
10RDEPENDS_${PN} = "${PN}-inittab" 10RDEPENDS_${PN} = "${PN}-inittab"
11 11
12SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.bz2 \ 12SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \
13 file://install.patch \ 13 file://install.patch \
14 file://crypt-lib.patch \ 14 file://crypt-lib.patch \
15 file://pidof-add-m-option.patch \ 15 file://pidof-add-m-option.patch \
16 file://0001-This-fixes-an-issue-that-clang-reports-about-mutlipl.patch \
17 file://realpath.patch \ 16 file://realpath.patch \
18 file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \ 17 file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \
19 file://rcS-default \ 18 file://rcS-default \
@@ -21,10 +20,9 @@ SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.bz2 \
21 file://rcS \ 20 file://rcS \
22 file://bootlogd.init \ 21 file://bootlogd.init \
23 file://01_bootlogd \ 22 file://01_bootlogd \
24" 23 "
25 24SRC_URI[md5sum] = "48cebffebf2a96ab09bec14bf9976016"
26SRC_URI[md5sum] = "6eda8a97b86e0a6f59dabbf25202aa6f" 25SRC_URI[sha256sum] = "2a2e26b72aa235a23ab1c8471005f890309ce1196c83fbc9413c57b9ab62b587"
27SRC_URI[sha256sum] = "60bbc8c1e1792056e23761d22960b30bb13eccc2cabff8c7310a01f4d5df1519"
28 26
29S = "${WORKDIR}/sysvinit-${PV}" 27S = "${WORKDIR}/sysvinit-${PV}"
30B = "${S}/src" 28B = "${S}/src"
@@ -81,7 +79,8 @@ EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \
81 'sbindir=${sbindir}' \ 79 'sbindir=${sbindir}' \
82 'sysconfdir=${sysconfdir}' \ 80 'sysconfdir=${sysconfdir}' \
83 'includedir=${includedir}' \ 81 'includedir=${includedir}' \
84 'mandir=${mandir}'" 82 'mandir=${mandir}' \
83 MNTPOINT=yes"
85 84
86do_install () { 85do_install () {
87 oe_runmake 'ROOT=${D}' install 86 oe_runmake 'ROOT=${D}' install
@@ -107,4 +106,7 @@ do_install () {
107 106
108 chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown 107 chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
109 chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown 108 chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown
109
110 # Already provided by e2fsprogs; sysvinit's version is a copy from there
111 rm ${D}${base_sbindir}/logsave
110} 112}