diff options
Diffstat (limited to 'meta/recipes-devtools/rpm')
-rw-r--r-- | meta/recipes-devtools/rpm/rpm-postinsts.bb | 50 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_5.4.9.bb | 30 |
2 files changed, 51 insertions, 29 deletions
diff --git a/meta/recipes-devtools/rpm/rpm-postinsts.bb b/meta/recipes-devtools/rpm/rpm-postinsts.bb new file mode 100644 index 0000000000..27ef2aa384 --- /dev/null +++ b/meta/recipes-devtools/rpm/rpm-postinsts.bb | |||
@@ -0,0 +1,50 @@ | |||
1 | DESCRIPTION = "RPM postinstall script" | ||
2 | SECTION = "core" | ||
3 | LICENSE = "LGPLv2.1" | ||
4 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/LGPL-2.1;md5=1a6d268fd218675ffea8be556788b780" | ||
5 | |||
6 | RDEPENDS_${PN} = "base-files" | ||
7 | |||
8 | inherit update-rc.d allarch | ||
9 | # | ||
10 | # Allow distributions to alter when [postponed] package install scripts are run | ||
11 | # | ||
12 | POSTINSTALL_INITPOSITION ?= "98" | ||
13 | |||
14 | INITSCRIPT_NAME = "run-postinsts" | ||
15 | INITSCRIPT_PARAMS = "start ${{POSTINSTALL_INITPOSITION} S ." | ||
16 | |||
17 | POSTLOG ?= "/var/log/postinstall.log" | ||
18 | REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>>${POSTLOG} 2>&1', '', d)}" | ||
19 | |||
20 | do_fetch() { | ||
21 | : | ||
22 | } | ||
23 | |||
24 | do_configure() { | ||
25 | : | ||
26 | } | ||
27 | |||
28 | do_compile() { | ||
29 | : | ||
30 | } | ||
31 | |||
32 | do_install() { | ||
33 | install -d ${D}/${sysconfdir}/rcS.d | ||
34 | # Stop $i getting expanded below... | ||
35 | i=\$i | ||
36 | cat > ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF | ||
37 | #!/bin/sh | ||
38 | for i in \`ls /etc/rpm-postinsts/\`; do | ||
39 | i=/etc/rpm-postinsts/$i | ||
40 | echo "Running postinst $i..." | ||
41 | if [ -f $i ] && $i ${REDIRECT_CMD}; then | ||
42 | rm $i | ||
43 | else | ||
44 | echo "ERROR: postinst $i failed." | ||
45 | fi | ||
46 | done | ||
47 | rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | ||
48 | EOF | ||
49 | chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | ||
50 | } | ||
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb index 7c3897c822..c7d21e87bf 100644 --- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb +++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb | |||
@@ -200,7 +200,7 @@ CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE" | |||
200 | 200 | ||
201 | LDFLAGS_append_libc-uclibc = "-lrt -lpthread" | 201 | LDFLAGS_append_libc-uclibc = "-lrt -lpthread" |
202 | 202 | ||
203 | PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm-dev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale ${PN}-postinsts" | 203 | PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-libs ${PN}-dev ${PN}-staticdev ${PN}-common ${PN}-build python-rpm-dbg python-rpm-staticdev python-rpm-dev python-rpm perl-module-rpm perl-module-rpm-dev ${PN}-locale" |
204 | 204 | ||
205 | SOLIBS = "5.4.so" | 205 | SOLIBS = "5.4.so" |
206 | 206 | ||
@@ -228,9 +228,6 @@ FILES_${PN} = "${bindir}/rpm \ | |||
228 | 228 | ||
229 | RDEPENDS_${PN} += "${PN}-postinsts" | 229 | RDEPENDS_${PN} += "${PN}-postinsts" |
230 | 230 | ||
231 | FILES_${PN}-postinsts = "${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts \ | ||
232 | " | ||
233 | |||
234 | FILES_${PN}-dbg += "${libdir}/rpm/.debug \ | 231 | FILES_${PN}-dbg += "${libdir}/rpm/.debug \ |
235 | ${libdir}/rpm/bin/.debug \ | 232 | ${libdir}/rpm/bin/.debug \ |
236 | " | 233 | " |
@@ -375,14 +372,6 @@ do_configure() { | |||
375 | oe_runconf | 372 | oe_runconf |
376 | } | 373 | } |
377 | 374 | ||
378 | # | ||
379 | # Allow distributions to alter when [postponed] package install scripts are run | ||
380 | # | ||
381 | POSTINSTALL_INITPOSITION ?= "98" | ||
382 | |||
383 | POSTLOG ?= "/var/log/postinstall.log" | ||
384 | REDIRECT_CMD = "${@base_contains('IMAGE_FEATURES', 'debug-tweaks', '>>${POSTLOG} 2>&1', '', d)}" | ||
385 | |||
386 | do_install_append() { | 375 | do_install_append() { |
387 | sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros | 376 | sed -i -e 's,%__check_files,#%%__check_files,' ${D}/${libdir}/rpm/macros |
388 | sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros | 377 | sed -i -e 's,%__scriptlet_requires,#%%__scriptlet_requires,' ${D}/${libdir}/rpm/macros |
@@ -460,23 +449,6 @@ do_install_append() { | |||
460 | rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj | 449 | rm -rf ${D}/var/lib/wdj ${D}/var/cache/wdj |
461 | rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl | 450 | rm -f ${D}/${libdir}/rpm/bin/api-sanity-checker.pl |
462 | 451 | ||
463 | install -d ${D}/${sysconfdir}/rcS.d | ||
464 | # Stop $i getting expanded below... | ||
465 | i=\$i | ||
466 | cat > ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts << EOF | ||
467 | #!/bin/sh | ||
468 | for i in \`ls /etc/rpm-postinsts/\`; do | ||
469 | i=/etc/rpm-postinsts/$i | ||
470 | echo "Running postinst $i..." | ||
471 | if [ -f $i ] && $i ${REDIRECT_CMD}; then | ||
472 | rm $i | ||
473 | else | ||
474 | echo "ERROR: postinst $i failed." | ||
475 | fi | ||
476 | done | ||
477 | rm -f ${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | ||
478 | EOF | ||
479 | chmod 0755 ${D}${sysconfdir}/rcS.d/S${POSTINSTALL_INITPOSITION}run-postinsts | ||
480 | } | 452 | } |
481 | 453 | ||
482 | do_install_append_class-native() { | 454 | do_install_append_class-native() { |