Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-flock / stx-utilities / logmgmt.bb
1 DESCRIPTION = "Management of /var/log filesystem"
2
3 require utilities-common.inc
4 SUBPATH0 = "utilities/logmgmt/logmgmt/"
5
6 LICENSE = "Apache-2.0"
7 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
8
9 RDEPENDS_${PN}_append = " \
10         systemd \
11         python-daemon \
12         "
13
14 inherit setuptools systemd
15 SYSTEMD_PACKAGES += "logmgmt"
16 SYSTEMD_SERVICE_${PN} = "logmgmt.service"
17 SYSTEMD_AUTO_ENABLE_${PN} = "enable"
18 DISTRO_FEATURES_BACKFILL_CONSIDERED_remove = "sysvinit"
19
20 do_unpack_append() {
21     bb.build.exec_func('do_restore_files', d)
22 }
23
24 do_restore_files() {
25         cd ${S}
26         git reset ${SRCREV} utilities/logmgmt/scripts
27         git checkout utilities/logmgmt/scripts
28 }
29
30 do_install_append() {
31
32         cd ${S}/utilities/logmgmt/scripts
33         install -d -m0755 ${D}/${bindir}
34         install -m0700 bin/logmgmt ${D}/${bindir}
35         install -m0700 bin/logmgmt_postrotate ${D}/${bindir}
36         install -m0700 bin/logmgmt_prerotate ${D}/${bindir}
37
38         install -d -m0755 ${D}/${sysconfdir}/init.d
39         install -m0700 init.d/logmgmt ${D}/${sysconfdir}/init.d
40
41         install -d -m0755 ${D}/${sysconfdir}/pmon.d
42         install -m0700 pmon.d/logmgmt ${D}/${sysconfdir}/pmon.d
43
44         install -d -m0755 ${D}/${systemd_system_unitdir}
45         install -m0664 etc/systemd/system/logmgmt.service ${D}/${systemd_system_unitdir}
46 }
47