[oe-commits] [meta-openembedded] 54/74: logcheck: update to 1.3.18 and move to meta-perl

git at git.openembedded.org git at git.openembedded.org
Mon Aug 28 09:05:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

martin_jansa pushed a commit to branch master
in repository meta-openembedded.

commit d853932c664edaed63d5491a7cee1e1031f41ff4
Author: Jackie Huang <jackie.huang at windriver.com>
AuthorDate: Thu Aug 24 11:19:53 2017 +0800

    logcheck: update to 1.3.18 and move to meta-perl
    
    - logcheck depends on mime-construct which is in meta-perl,
      so move it to meta-perl to avoid that meta-oe depends on
      meta-perl.
    
    - logcheck should not be run as root, so inherit useradd
      and add proper user and group.
    
    - Add missing runtime dependencies according to the file
      debian/control and simple test by running "logcheck -ot".
    
    - For syslog, debian directly depends on rsyslog, but logcheck
      works with any syslog and we have busybox-syslog, sysklogd,
      syslog-ng and rsyslog, so use VIRTUAL-RUNTIME_syslog for the
      syslog dependency and set rsyslog as the default, which can be
      easily overridden in distro conf file or local.conf.
    
    - Don't install /var/lock when populating rootfs. Do it
      through volatile.
    
    - install header.txt for generated mails
    
    Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
    Signed-off-by: Martin Jansa <Martin.Jansa at gmail.com>
---
 .../recipes-extended/logcheck/logcheck_1.3.17.bb   | 38 -----------
 .../recipes-extended/logcheck/files/99_logcheck    |  2 +
 .../recipes-extended/logcheck/logcheck_1.3.18.bb   | 78 ++++++++++++++++++++++
 3 files changed, 80 insertions(+), 38 deletions(-)

diff --git a/meta-oe/recipes-extended/logcheck/logcheck_1.3.17.bb b/meta-oe/recipes-extended/logcheck/logcheck_1.3.17.bb
deleted file mode 100644
index ba4c2ab..0000000
--- a/meta-oe/recipes-extended/logcheck/logcheck_1.3.17.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-SUMMARY = "Analyzes log files and sends noticeable events as email"
-DESCRIPTION = "\
-Logcheck is a simple utility which is designed to allow a system administrator \
-to view the log-files which are produced upon hosts under their control. \
-It does this by mailing summaries of the log-files to them, after first \
-filtering out "normal" entries. \
-Normal entries are entries which match one of the many included regular \
-expression files contain in the database."
-SECTION = "Applications/System"
-LICENSE = "GPLv2"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=c93c0550bd3173f4504b2cbd8991e50b"
-
-SRC_URI = "git://git.debian.org/git/logcheck/logcheck.git"
-SRCREV = "2429e67ad875fee8a0234c64d504277b038c89cd"
-
-S = "${WORKDIR}/git"
-
-do_install() {
-    # Fix QA Issue
-    sed -i '/install -d $(DESTDIR)\/var\/lock\/logcheck/s/^/#/' Makefile
-
-    # "make install" do not install the manpages. Install them manually.
-    install -m 755 -d ${D}${mandir}/man1
-    install -m 755 -d ${D}${mandir}/man8
-    install -m 644 docs/logcheck-test.1 ${D}${mandir}/man1/
-    install -m 644 docs/logtail.8 ${D}${mandir}/man8/
-    install -m 644 docs/logtail2.8 ${D}${mandir}/man8/
-    sed -i "s/syslog/messages/" etc/logcheck.logfiles
-    sed -i "s/auth\.log/secure/" etc/logcheck.logfiles
-    install -m 755 -d ${D}${sysconfdir}/cron.d
-    install -m 644 debian/logcheck.cron.d ${D}${sysconfdir}/cron.d/logcheck
-    install -m 755 -d ${D}/var/lib/logcheck
-    oe_runmake install DESTDIR=${D}
-}
-
-RDEPENDS_${PN} = "perl"
-
-FILES_${PN} += "${datadir}/logtail"
diff --git a/meta-perl/recipes-extended/logcheck/files/99_logcheck b/meta-perl/recipes-extended/logcheck/files/99_logcheck
new file mode 100644
index 0000000..4de33ac
--- /dev/null
+++ b/meta-perl/recipes-extended/logcheck/files/99_logcheck
@@ -0,0 +1,2 @@
+# <type> <owner> <group> <mode> <path> <linksource>
+d logcheck logcheck 0755 /var/lock/logcheck none
diff --git a/meta-perl/recipes-extended/logcheck/logcheck_1.3.18.bb b/meta-perl/recipes-extended/logcheck/logcheck_1.3.18.bb
new file mode 100644
index 0000000..24c19b7
--- /dev/null
+++ b/meta-perl/recipes-extended/logcheck/logcheck_1.3.18.bb
@@ -0,0 +1,78 @@
+SUMMARY = "Analyzes log files and sends noticeable events as email"
+DESCRIPTION = "\
+Logcheck is a simple utility which is designed to allow a system administrator \
+to view the log-files which are produced upon hosts under their control. \
+It does this by mailing summaries of the log-files to them, after first \
+filtering out "normal" entries. \
+Normal entries are entries which match one of the many included regular \
+expression files contain in the database."
+SECTION = "Applications/System"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=c93c0550bd3173f4504b2cbd8991e50b"
+
+SRC_URI = "git://git.debian.org/git/logcheck/logcheck.git \
+           file://99_logcheck \
+"
+SRCREV = "0a5865d80fa34c55387a1917a3e6f885bcff7f1d"
+
+S = "${WORKDIR}/git"
+
+inherit useradd
+
+USERADD_PACKAGES = "${PN}"
+USERADD_PARAM_${PN} = "-m -g ${BPN} -G adm -r -d ${localstatedir}/lib/${BPN} \
+                       -s /bin/false -c 'logcheck account' ${BPN}"
+GROUPADD_PARAM_${PN} = "-r ${BPN}"
+
+do_install() {
+    # Fix QA Issue
+    sed -i '/install -d $(DESTDIR)\/var\/lock\/logcheck/s/^/#/' Makefile
+
+    # "make install" do not install the manpages. Install them manually.
+    install -m 755 -d ${D}${mandir}/man1
+    install -m 755 -d ${D}${mandir}/man8
+    install -m 644 docs/logcheck-test.1 ${D}${mandir}/man1/
+    install -m 644 docs/logtail.8 ${D}${mandir}/man8/
+    install -m 644 docs/logtail2.8 ${D}${mandir}/man8/
+
+    install -m 755 -d ${D}${sysconfdir}/cron.d
+    install -m 644 debian/logcheck.cron.d ${D}${sysconfdir}/cron.d/logcheck
+    install -m 755 -d ${D}/var/lib/logcheck
+
+    oe_runmake install DESTDIR=${D}
+
+    # install header.txt for generated mails
+    install -m 0644 ${S}/debian/header.txt ${D}${sysconfdir}/${BPN}
+
+    chown -R ${BPN}:${BPN} ${D}${localstatedir}/lib/${BPN}
+    chown -R root:${BPN} ${D}${sysconfdir}/${BPN}
+
+    # Don't install /var/lock when populating rootfs. Do it through volatile
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/default/volatiles
+        install -m 0644 ${WORKDIR}/99_logcheck ${D}${sysconfdir}/default/volatiles
+    fi
+    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+        install -d ${D}${sysconfdir}/tmpfiles.d
+        echo "d /var/lock/logcheck 0755 logcheck logcheck -" \
+            > ${D}${sysconfdir}/tmpfiles.d/logcheck.conf
+    fi
+}
+
+VIRTUAL-RUNTIME_syslog ??= "rsyslog"
+
+RDEPENDS_${PN} = "\
+    bash \
+    cronie \
+    debianutils-run-parts \
+    grep \
+    lockfile-progs \
+    mime-construct \
+    perl \
+    perl-module-file-basename \
+    perl-module-getopt-std \
+    perl-module-file-glob \
+    ${VIRTUAL-RUNTIME_syslog} \
+"
+
+FILES_${PN} += "${datadir}/logtail"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list