diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2020-12-26 10:27:12 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-30 14:01:06 +0000 |
commit | 8ef551159d81a5f995e1eacabc83d2523681d83e (patch) | |
tree | 2c775f23d3d56ea49146f98defa630562f5b40f3 /meta/recipes-core/sysvinit/sysvinit_2.98.bb | |
parent | 8d8bd70fcab514e7d54810c434aabc284172beed (diff) | |
download | poky-8ef551159d81a5f995e1eacabc83d2523681d83e.tar.gz |
sysvinit: upgrade 2.97 -> 2.98
(From OE-Core rev: bfcf3304cc35e59aafb66a3b61278cc11f96fec7)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/sysvinit/sysvinit_2.98.bb')
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit_2.98.bb | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.98.bb b/meta/recipes-core/sysvinit/sysvinit_2.98.bb new file mode 100644 index 0000000000..fd39c61fb5 --- /dev/null +++ b/meta/recipes-core/sysvinit/sysvinit_2.98.bb | |||
@@ -0,0 +1,112 @@ | |||
1 | SUMMARY = "System-V like init" | ||
2 | DESCRIPTION = "This package is required to boot in most configurations. It provides the /sbin/init program. This is the first process started on boot, and the last process terminated before the system halts." | ||
3 | HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/" | ||
4 | SECTION = "base" | ||
5 | LICENSE = "GPLv2+" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \ | ||
7 | file://COPYRIGHT;endline=15;md5=a1d3b3526501d3546d530bbe6ab6cdbe \ | ||
8 | " | ||
9 | |||
10 | RDEPENDS_${PN} = "${PN}-inittab" | ||
11 | |||
12 | SRC_URI = "${SAVANNAH_GNU_MIRROR}/sysvinit/sysvinit-${PV}.tar.xz \ | ||
13 | file://install.patch \ | ||
14 | file://crypt-lib.patch \ | ||
15 | file://pidof-add-m-option.patch \ | ||
16 | file://realpath.patch \ | ||
17 | file://0001-include-sys-sysmacros.h-for-major-minor-defines-in-g.patch \ | ||
18 | file://rcS-default \ | ||
19 | file://rc \ | ||
20 | file://rcS \ | ||
21 | file://bootlogd.init \ | ||
22 | file://01_bootlogd \ | ||
23 | " | ||
24 | SRC_URI[sha256sum] = "7b2c3ffaf19eaf1ca80268762f85f9e4eb8e3c973213d49f9802605b72caa7dc" | ||
25 | |||
26 | S = "${WORKDIR}/sysvinit-${PV}" | ||
27 | |||
28 | inherit update-alternatives features_check | ||
29 | DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt" | ||
30 | do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot" | ||
31 | |||
32 | REQUIRED_DISTRO_FEATURES = "sysvinit" | ||
33 | |||
34 | ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall" | ||
35 | |||
36 | ALTERNATIVE_PRIORITY = "200" | ||
37 | |||
38 | ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init" | ||
39 | ALTERNATIVE_PRIORITY[init] = "50" | ||
40 | |||
41 | ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint" | ||
42 | ALTERNATIVE_PRIORITY[mountpoint] = "20" | ||
43 | |||
44 | ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt" | ||
45 | ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot" | ||
46 | ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel" | ||
47 | ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown" | ||
48 | ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff" | ||
49 | |||
50 | ALTERNATIVE_${PN}-pidof = "pidof" | ||
51 | ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof" | ||
52 | |||
53 | ALTERNATIVE_${PN}-sulogin = "sulogin" | ||
54 | ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin" | ||
55 | |||
56 | ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1" | ||
57 | |||
58 | ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1" | ||
59 | ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1" | ||
60 | ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1" | ||
61 | ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1" | ||
62 | ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8" | ||
63 | ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1" | ||
64 | ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1" | ||
65 | |||
66 | PACKAGES =+ "sysvinit-pidof sysvinit-sulogin" | ||
67 | FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*" | ||
68 | FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5" | ||
69 | FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit" | ||
70 | |||
71 | RDEPENDS_${PN} += "sysvinit-pidof initd-functions base-passwd" | ||
72 | |||
73 | CFLAGS_prepend = "-D_GNU_SOURCE " | ||
74 | export LCRYPT = "-lcrypt" | ||
75 | EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \ | ||
76 | 'base_sbindir=${base_sbindir}' \ | ||
77 | 'bindir=${bindir}' \ | ||
78 | 'sbindir=${sbindir}' \ | ||
79 | 'sysconfdir=${sysconfdir}' \ | ||
80 | 'includedir=${includedir}' \ | ||
81 | 'mandir=${mandir}' \ | ||
82 | MNTPOINT=yes" | ||
83 | |||
84 | do_install () { | ||
85 | oe_runmake 'ROOT=${D}' install | ||
86 | |||
87 | install -d ${D}${sysconfdir} \ | ||
88 | ${D}${sysconfdir}/default \ | ||
89 | ${D}${sysconfdir}/init.d | ||
90 | for level in S 0 1 2 3 4 5 6; do | ||
91 | install -d ${D}${sysconfdir}/rc$level.d | ||
92 | done | ||
93 | |||
94 | install -m 0644 ${WORKDIR}/rcS-default ${D}${sysconfdir}/default/rcS | ||
95 | install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d | ||
96 | install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d | ||
97 | install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd | ||
98 | ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd | ||
99 | |||
100 | update-rc.d -r ${D} bootlogd start 07 S . | ||
101 | update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 . | ||
102 | |||
103 | install -d ${D}${sysconfdir}/default/volatiles | ||
104 | install -m 0644 ${WORKDIR}/01_bootlogd ${D}${sysconfdir}/default/volatiles | ||
105 | |||
106 | chown root:shutdown ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown | ||
107 | chmod o-x,u+s ${D}${base_sbindir}/halt ${D}${base_sbindir}/shutdown | ||
108 | |||
109 | # Already provided by e2fsprogs; sysvinit's version is a copy from there | ||
110 | rm ${D}${base_sbindir}/logsave | ||
111 | rm ${D}${mandir}/man8/logsave.8 | ||
112 | } | ||