summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/sysvinit/sysvinit_2.98.bb
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2020-12-26 10:27:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-12-30 14:01:06 +0000
commit8ef551159d81a5f995e1eacabc83d2523681d83e (patch)
tree2c775f23d3d56ea49146f98defa630562f5b40f3 /meta/recipes-core/sysvinit/sysvinit_2.98.bb
parent8d8bd70fcab514e7d54810c434aabc284172beed (diff)
downloadpoky-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.bb112
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 @@
1SUMMARY = "System-V like init"
2DESCRIPTION = "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."
3HOMEPAGE = "http://savannah.nongnu.org/projects/sysvinit/"
4SECTION = "base"
5LICENSE = "GPLv2+"
6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
7 file://COPYRIGHT;endline=15;md5=a1d3b3526501d3546d530bbe6ab6cdbe \
8 "
9
10RDEPENDS_${PN} = "${PN}-inittab"
11
12SRC_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 "
24SRC_URI[sha256sum] = "7b2c3ffaf19eaf1ca80268762f85f9e4eb8e3c973213d49f9802605b72caa7dc"
25
26S = "${WORKDIR}/sysvinit-${PV}"
27
28inherit update-alternatives features_check
29DEPENDS_append = " update-rc.d-native base-passwd virtual/crypt"
30do_package_setscene[depends] = "${MLPREFIX}base-passwd:do_populate_sysroot"
31
32REQUIRED_DISTRO_FEATURES = "sysvinit"
33
34ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last lastb mesg utmpdump wall"
35
36ALTERNATIVE_PRIORITY = "200"
37
38ALTERNATIVE_LINK_NAME[init] = "${base_sbindir}/init"
39ALTERNATIVE_PRIORITY[init] = "50"
40
41ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
42ALTERNATIVE_PRIORITY[mountpoint] = "20"
43
44ALTERNATIVE_LINK_NAME[halt] = "${base_sbindir}/halt"
45ALTERNATIVE_LINK_NAME[reboot] = "${base_sbindir}/reboot"
46ALTERNATIVE_LINK_NAME[runlevel] = "${base_sbindir}/runlevel"
47ALTERNATIVE_LINK_NAME[shutdown] = "${base_sbindir}/shutdown"
48ALTERNATIVE_LINK_NAME[poweroff] = "${base_sbindir}/poweroff"
49
50ALTERNATIVE_${PN}-pidof = "pidof"
51ALTERNATIVE_LINK_NAME[pidof] = "${base_bindir}/pidof"
52
53ALTERNATIVE_${PN}-sulogin = "sulogin"
54ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
55
56ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 sulogin.8 utmpdump.1"
57
58ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
59ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
60ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
61ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
62ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
63ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
64ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
65
66PACKAGES =+ "sysvinit-pidof sysvinit-sulogin"
67FILES_${PN} += "${base_sbindir}/* ${base_bindir}/*"
68FILES_sysvinit-pidof = "${base_bindir}/pidof.sysvinit ${base_sbindir}/killall5"
69FILES_sysvinit-sulogin = "${base_sbindir}/sulogin.sysvinit"
70
71RDEPENDS_${PN} += "sysvinit-pidof initd-functions base-passwd"
72
73CFLAGS_prepend = "-D_GNU_SOURCE "
74export LCRYPT = "-lcrypt"
75EXTRA_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
84do_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}