summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/insserv
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2010-11-28 20:46:27 -0800
committerRichard Purdie <rpurdie@linux.intel.com>2010-12-06 22:02:19 +0000
commit1f427822e3c34bf24fa4b4a511c30c0f6d72774e (patch)
tree7b71db6e550953356e1ce300f1c81c84c418792d /meta/recipes-devtools/insserv
parent9aef79e3a0bde4e4266b357652386ee1b4873260 (diff)
downloadpoky-1f427822e3c34bf24fa4b4a511c30c0f6d72774e.tar.gz
insserv: upgrade to version 1.14.0
* Removed obsolete patches * Disabled make check tests which cannot be run when cross-compiled * Added SUMMARY, DESCRIPTION, and PRIORITY fields * Added source checksums Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'meta/recipes-devtools/insserv')
-rw-r--r--meta/recipes-devtools/insserv/files/40_segfault_virtprov.dpatch89
-rw-r--r--meta/recipes-devtools/insserv/files/42_loopnochangemsg.dpatch20
-rw-r--r--meta/recipes-devtools/insserv/files/crosscompile_fix.patch22
-rw-r--r--meta/recipes-devtools/insserv/files/disable_runtests.patch18
-rw-r--r--meta/recipes-devtools/insserv/files/make.patch58
-rw-r--r--meta/recipes-devtools/insserv/files/makefile.patch70
-rw-r--r--meta/recipes-devtools/insserv/insserv_1.11.0.bb18
-rw-r--r--meta/recipes-devtools/insserv/insserv_1.14.0.bb24
8 files changed, 112 insertions, 207 deletions
diff --git a/meta/recipes-devtools/insserv/files/40_segfault_virtprov.dpatch b/meta/recipes-devtools/insserv/files/40_segfault_virtprov.dpatch
deleted file mode 100644
index 9b0081307a..0000000000
--- a/meta/recipes-devtools/insserv/files/40_segfault_virtprov.dpatch
+++ /dev/null
@@ -1,89 +0,0 @@
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## 40_segfault_virtprov.dpatch by Petter Reinholdtsen
3
4Avoid segfault when an enabled service provide a virtual system
5facility.
6
7@DPATCH@
8--- insserv/insserv.c
9+++ insserv/insserv.c 2008-02-01 11:43:45.634618329 +0100
10@@ -166,7 +166,7 @@ typedef struct pwd_struct {
11
12 static list_t pwd = { &(pwd), &(pwd) }, * topd = &(pwd);
13
14-static void pushd(const char *const __restrict path);
15+static void pushd(const char *const __restrict path) __attribute__((nonnull(1)));
16 static void pushd(const char *const path)
17 {
18 pwd_t * dir;
19@@ -305,13 +305,13 @@ out:
20 return getserv(ptr);
21 }
22
23-static serv_t * findserv(const char *const __restrict serv) __attribute__((nonnull(1)));
24+static serv_t * findserv(const char *const __restrict serv);
25 static serv_t * findserv(const char *const serv)
26 {
27 list_t * ptr;
28 serv_t * ret = (serv_t*)0;
29
30- if (!serv)
31+ if (serv == (const char*)0)
32 goto out;
33
34 list_for_each(ptr, serv_start) {
35@@ -334,6 +334,9 @@ static void rememberreq(serv_t *serv, ui
36 list_t * ptr;
37 uint old = bit;
38
39+ if (!tmp)
40+ error("%s", strerror(errno));
41+
42 while ((token = strsep(&tmp, delimeter))) {
43 boolean found = false;
44 req_t * this;
45@@ -399,6 +402,9 @@ static void reversereq(const serv_t * se
46 char * rev = strdupa(list);
47 uint old = bit;
48
49+ if (!rev)
50+ error("%s", strerror(errno));
51+
52 while ((dep = strsep(&rev, delimeter)) && *dep) {
53 serv_t * tmp;
54 list_t * ptr;
55@@ -437,7 +443,7 @@ static void reversereq(const serv_t * se
56 /*
57 * Check required services for name
58 */
59-static boolean chkrequired(const char *const __restrict name) __attribute__((nonnull(1)));
60+static boolean chkrequired(const char *const __restrict name);
61 static boolean chkrequired(const char *const name)
62 {
63 serv_t * serv = findserv(name);
64--- insserv/listing.h
65+++ insserv/listing.h 2008-02-01 11:40:45.347748072 +0100
66@@ -97,11 +97,11 @@ extern int makeprov(const char *__restri
67 extern void setorder(const char *__restrict script, const int order, boolean recursive) __attribute__((nonnull(1)));
68 extern int getorder(const char *__restrict script) __attribute__((nonnull(1)));
69 extern boolean notincluded(const char *__restrict script, const int runlevel) __attribute__((nonnull(1)));
70-extern boolean foreach(const char **__restrict script, int *__restrict order, const int runlevel) __attribute__((nonnull(1,2)));
71-extern void virtprov(const char *__restrict virt, const char *__restrict real) __attribute__((nonnull(1,2)));
72+extern boolean foreach(const char **__restrict script, int *__restrict order, const int runlevel) __attribute__((nonnull(2)));
73+extern void virtprov(const char *__restrict virt, const char *__restrict real) __attribute__((nonnull(1)));
74 extern const char * getscript(const char *__restrict prov) __attribute__((nonnull(1)));
75 extern const char * getprovides(const char *__restrict script) __attribute__((nonnull(1)));
76-extern boolean listscripts(const char **__restrict script, const int lvl) __attribute__((nonnull(1)));
77+extern boolean listscripts(const char **__restrict script, const int lvl);
78 extern int maxorder;
79 extern boolean is_loop_detected(void);
80
81@@ -116,7 +116,7 @@ extern int map_has_runlevels(void);
82 extern int map_runlevel_to_lvl (const int runlevel);
83 extern int map_key_to_lvl(const char key);
84
85-static inline char * xstrdup(const char *__restrict s) __attribute__((always_inline,nonnull(1)));
86+static inline char * xstrdup(const char *__restrict s) __attribute__((always_inline));
87 static inline char * xstrdup(const char * s)
88 {
89 char * r;
diff --git a/meta/recipes-devtools/insserv/files/42_loopnochangemsg.dpatch b/meta/recipes-devtools/insserv/files/42_loopnochangemsg.dpatch
deleted file mode 100644
index 4a15f58312..0000000000
--- a/meta/recipes-devtools/insserv/files/42_loopnochangemsg.dpatch
+++ /dev/null
@@ -1,20 +0,0 @@
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## 40_loopnochangemsg.dpatch by Petter Reinholdtsen
3
4Make it more obvious that introducing a loop will not change the
5existing boot sequence. Thanks to Frans Pop for the rationale for
6this change.
7
8@DPATCH@
9
10--- insserv-1.11.0.orig/insserv.c
11+++ insserv-1.11.0/insserv.c
12@@ -2647,7 +2647,7 @@
13 follow_all();
14
15 if (is_loop_detected() && !ignore)
16- error("exiting now!\n");
17+ error("exiting without changing boot order!\n");
18
19 /*
20 * Re-order some well known scripts to get
diff --git a/meta/recipes-devtools/insserv/files/crosscompile_fix.patch b/meta/recipes-devtools/insserv/files/crosscompile_fix.patch
deleted file mode 100644
index 14d8db468f..0000000000
--- a/meta/recipes-devtools/insserv/files/crosscompile_fix.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1Index: insserv-1.11.0/Makefile
2===================================================================
3--- insserv-1.11.0.orig/Makefile 2008-08-25 16:00:00.000000000 +0100
4+++ insserv-1.11.0/Makefile 2008-08-25 16:00:25.000000000 +0100
5@@ -18,16 +18,7 @@
6 #
7 # Architecture
8 #
9-ifdef RPM_OPT_FLAGS
10- COPTS = -g $(RPM_OPT_FLAGS)
11-else
12- ARCH = $(shell uname -i)
13-ifeq ($(ARCH),i386)
14- COPTS = -O2 -mcpu=i586 -mtune=i686
15-else
16- COPTS = -O2
17-endif
18-endif
19+COPTS = -O2
20 COPTS += -g
21
22 MY_CFLAGS = $(CFLAGS) -Wall $(COPTS) $(DEBUG) $(LOOPS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
diff --git a/meta/recipes-devtools/insserv/files/disable_runtests.patch b/meta/recipes-devtools/insserv/files/disable_runtests.patch
new file mode 100644
index 0000000000..4e4084881a
--- /dev/null
+++ b/meta/recipes-devtools/insserv/files/disable_runtests.patch
@@ -0,0 +1,18 @@
1# Disable the make check runtime tests, which cannot be run when
2# cross-compiled.
3#
4# Signed-off-by: Scott Garman <scott.a.garman@intel.com>
5diff -urN insserv-1.14.0.orig//Makefile insserv-1.14.0/Makefile
6--- insserv-1.14.0.orig//Makefile 2010-11-28 17:12:01.715597293 -0800
7+++ insserv-1.14.0/Makefile 2010-11-28 17:16:33.837780660 -0800
8@@ -119,8 +119,8 @@
9 ifeq ($(ISSUSE),-DSUSE)
10 issuse=true tests/common
11 # issuse=true tests/suse
12-else
13- tests/common
14+#else
15+# tests/common
16 endif
17
18 install: $(TODO) check
diff --git a/meta/recipes-devtools/insserv/files/make.patch b/meta/recipes-devtools/insserv/files/make.patch
deleted file mode 100644
index bb3b51a8ca..0000000000
--- a/meta/recipes-devtools/insserv/files/make.patch
+++ /dev/null
@@ -1,58 +0,0 @@
1=== modified file 'Makefile'
2--- old/Makefile 2008-06-24 14:49:47 +0000
3+++ new/Makefile 2008-06-24 15:56:15 +0000
4@@ -7,10 +7,10 @@
5 INITDIR = /etc/init.d
6 INSCONF = /etc/insserv.conf
7 #DESTDIR = /tmp/root
8-#DEBUG = -DDEBUG=1 -Wpacked
9+DEBUG = -DDEBUG=1 -Wpacked
10 #LOOPS = -DIGNORE_LOOPS=1
11 DEBUG =
12-ISSUSE = -DSUSE
13+#ISSUSE = -DSUSE
14 DESTDIR =
15 VERSION = 1.11.0
16 DATE = $(shell date +'%d%b%y' | tr '[:lower:]' '[:upper:]')
17@@ -28,7 +28,9 @@
18 COPTS = -O2
19 endif
20 endif
21- CFLAGS = -Wall $(COPTS) $(DEBUG) $(LOOPS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
22+COPTS += -g
23+
24+ MY_CFLAGS = $(CFLAGS) -Wall $(COPTS) $(DEBUG) $(LOOPS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
25 $(ISSUSE) -DINITDIR=\"$(INITDIR)\" -DINSCONF=\"$(INSCONF)\" -pipe
26 CLOOP = -falign-loops=0
27 CC = gcc
28@@ -58,13 +60,13 @@
29 all: $(TODO)
30
31 listing.o: listing.c listing.h .system
32- $(CC) $(CFLAGS) $(CLOOP) -c $<
33+ $(CC) $(MY_CFLAGS) $(CLOOP) -c $<
34
35 insserv.o: insserv.c listing.h .system
36- $(CC) $(CFLAGS) $(CLOOP) -c $<
37+ $(CC) $(MY_CFLAGS) $(CLOOP) -c $<
38
39 insserv: insserv.o listing.o
40- $(CC) $(CFLAGS) -Wl,-O,3,--relax -o $@ $^
41+ $(CC) $(MY_CFLAGS) -Wl,-O,3,--relax -o $@ $^
42
43 ifeq ($(ISSUSE),-DSUSE)
44 insserv.8: insserv.8.in .system
45@@ -86,10 +88,10 @@
46 -include .depend.listing .depend.insserv
47
48 .depend.listing:
49- @$(CC) $(CFLAGS) -M listing.c >$@ 2>/dev/null
50+ @$(CC) $(MY_CFLAGS) -M listing.c >$@ 2>/dev/null
51
52 .depend.insserv:
53- @$(CC) $(CFLAGS) -M insserv.c >$@ 2>/dev/null
54+ @$(CC) $(MY_CFLAGS) -M insserv.c >$@ 2>/dev/null
55
56 install: $(TODO)
57 $(MKDIR) $(SBINDIR)
58
diff --git a/meta/recipes-devtools/insserv/files/makefile.patch b/meta/recipes-devtools/insserv/files/makefile.patch
new file mode 100644
index 0000000000..19e99c6324
--- /dev/null
+++ b/meta/recipes-devtools/insserv/files/makefile.patch
@@ -0,0 +1,70 @@
1# Enable debug options and modify the use of CLFAGS (carried over
2# from the previous version's patch).
3#
4# Signed-off-by: Scott Garman <scott.a.garman@intel.com>
5diff -urN insserv-1.14.0.orig//Makefile insserv-1.14.0//Makefile
6--- insserv-1.14.0.orig//Makefile 2010-04-29 03:33:40.000000000 -0700
7+++ insserv-1.14.0//Makefile 2010-11-28 17:09:20.537996190 -0800
8@@ -8,27 +8,16 @@
9 INITDIR = /etc/init.d
10 INSCONF = /etc/insserv.conf
11 #DESTDIR = /tmp/root
12-#DEBUG = -DDEBUG=1 -Wpacked
13+DEBUG = -DDEBUG=1 -Wpacked
14 DEBUG =
15-ISSUSE = -DSUSE
16+#ISSUSE = -DSUSE
17 DESTDIR =
18 VERSION = 1.14.0
19 DATE = $(shell date +'%d%b%y' | tr '[:lower:]' '[:upper:]')
20
21-#
22-# Architecture
23-#
24-ifdef RPM_OPT_FLAGS
25- COPTS = -g $(RPM_OPT_FLAGS)
26-else
27- ARCH = $(shell uname -i)
28-ifeq ($(ARCH),i386)
29- COPTS = -g -O3 -mcpu=i586 -mtune=i686
30-else
31- COPTS = -g -O2
32-endif
33-endif
34- CFLAGS = -W -Wall $(COPTS) $(DEBUG) $(LOOPS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
35+COPTS = -O2 -g
36+
37+ MY_CFLAGS = $(CFLAGS) -W -Wall $(COPTS) $(DEBUG) $(LOOPS) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
38 $(ISSUSE) -DINITDIR=\"$(INITDIR)\" -DINSCONF=\"$(INSCONF)\" -pipe
39 CLOOP = -falign-loops=0
40 LDFLAGS = -Wl,-O,3,--relax
41@@ -75,13 +64,13 @@
42 all: $(TODO)
43
44 insserv: insserv.o listing.o
45- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
46+ $(CC) $(MY_CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
47
48 listing.o: listing.c listing.h config.h .system
49- $(CC) $(CFLAGS) $(CLOOP) -c $<
50+ $(CC) $(MY_CFLAGS) $(CLOOP) -c $<
51
52 insserv.o: insserv.c listing.h config.h .system
53- $(CC) $(CFLAGS) $(CLOOP) -c $<
54+ $(CC) $(MY_CFLAGS) $(CLOOP) -c $<
55
56 listing.h: .system
57
58@@ -119,10 +108,10 @@
59 -include .depend.listing .depend.insserv
60
61 .depend.listing:: listing.c listing.h
62- @$(CC) $(CFLAGS) -M listing.c >$@ 2>/dev/null
63+ @$(CC) $(MY_CFLAGS) -M listing.c >$@ 2>/dev/null
64
65 .depend.insserv:: insserv.c listing.h
66- @$(CC) $(CFLAGS) -M insserv.c >$@ 2>/dev/null
67+ @$(CC) $(MY_CFLAGS) -M insserv.c >$@ 2>/dev/null
68
69 endif
70
diff --git a/meta/recipes-devtools/insserv/insserv_1.11.0.bb b/meta/recipes-devtools/insserv/insserv_1.11.0.bb
deleted file mode 100644
index f3c79eeb09..0000000000
--- a/meta/recipes-devtools/insserv/insserv_1.11.0.bb
+++ /dev/null
@@ -1,18 +0,0 @@
1LICENSE = "GPLv2"
2LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
3SECTION = "base"
4PR = "r1"
5
6SRC_URI = "ftp://ftp.suse.com/pub/projects/init/${BPN}-${PV}.tar.gz \
7 file://40_segfault_virtprov.dpatch;patch=1 \
8 file://42_loopnochangemsg.dpatch;patch=1 \
9 file://make.patch;patch=1 \
10 file://crosscompile_fix.patch;patch=1 \
11 file://insserv.conf"
12
13do_install () {
14 oe_runmake 'DESTDIR=${D}' install
15 install -m0644 ${WORKDIR}/insserv.conf ${D}${sysconfdir}/insserv.conf
16}
17
18BBCLASSEXTEND = "native"
diff --git a/meta/recipes-devtools/insserv/insserv_1.14.0.bb b/meta/recipes-devtools/insserv/insserv_1.14.0.bb
new file mode 100644
index 0000000000..75f79d9cad
--- /dev/null
+++ b/meta/recipes-devtools/insserv/insserv_1.14.0.bb
@@ -0,0 +1,24 @@
1SUMMARY = "Enable an installed system init script"
2DESCRIPTION = "Enable an installed system init script by reading the comment header of the script"
3# There is no known home page for insserv
4SECTION = "base"
5PRIORITY = "optional"
6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
8
9PR = "r0"
10
11SRC_URI = "ftp://ftp.suse.com/pub/projects/init/${PN}-${PV}.tar.bz2 \
12 file://makefile.patch \
13 file://disable_runtests.patch \
14 file://insserv.conf"
15
16SRC_URI[md5sum] = "4a97d900855148842b1aa8f33b988b47"
17SRC_URI[sha256sum] = "89a0a093b1cf3d802ad40568e64b496b493f51ff9825905c8bd12738b374ca47"
18
19do_install () {
20 oe_runmake 'DESTDIR=${D}' install
21 install -m0644 ${WORKDIR}/insserv.conf ${D}${sysconfdir}/insserv.conf
22}
23
24BBCLASSEXTEND = "native"