diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/metalog |
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/metalog')
-rw-r--r-- | app-admin/metalog/Manifest | 11 | ||||
-rw-r--r-- | app-admin/metalog/files/consolelog.sh | 20 | ||||
-rw-r--r-- | app-admin/metalog/files/metalog-0.9-metalog-conf.patch | 11 | ||||
-rw-r--r-- | app-admin/metalog/files/metalog.confd | 18 | ||||
-rw-r--r-- | app-admin/metalog/files/metalog.initd | 41 | ||||
-rw-r--r-- | app-admin/metalog/files/metalog.service-r1 | 10 | ||||
-rw-r--r-- | app-admin/metalog/metadata.xml | 14 | ||||
-rw-r--r-- | app-admin/metalog/metalog-3-r1.ebuild | 58 | ||||
-rw-r--r-- | app-admin/metalog/metalog-3-r2.ebuild | 56 |
9 files changed, 239 insertions, 0 deletions
diff --git a/app-admin/metalog/Manifest b/app-admin/metalog/Manifest new file mode 100644 index 000000000000..ad6c740cedcc --- /dev/null +++ b/app-admin/metalog/Manifest @@ -0,0 +1,11 @@ +AUX consolelog.sh 269 SHA256 b076ed8329052c8ec6d61722c15c589dbf53487cc3e7dbc0c54af6965c54048e SHA512 4cbf2145480d67b46db8a291137f5d953ce07d5d35b7c011e3dec13e4e5ab729f81666884c23db568065cb0b16fddba7178570c04777428861107aeb7c48f332 WHIRLPOOL 0d07497cbf1889b07911972e7bb681c98f8d9b9a1cda0569e182f553f6fd676366c8dc574d3283186f101ab8bfc1bf058f3c058290b398a576d59a1812d7d1cf +AUX metalog-0.9-metalog-conf.patch 269 SHA256 55c41e40d0e46584c1449d2704a3e29196850318d7d5d512bf9c5945e1807cce SHA512 0c95e8461e89d9469452d2ef66fa52f469b61578b12a6c72adb73e48807f998f8fb58cf0b3f1bc5caa38296fd59c8f8d1fc209beec81790387816d1c497a07df WHIRLPOOL 85fa9879d7ec564f7e52751ab5f7c0e815ede48d7c5f0f27bcd6aa6d8ca60984d6ce2cdff52edfe3107ebb7c3cf8fd1c830f61022275053514dd1fed4dfc9f37 +AUX metalog.confd 393 SHA256 dd9d30a6c22dca6d072a9c63e1494d3d0a26709a5f045ce5985642933fe24efc SHA512 4fea6b7f48e55d5f69a9c9a69f54623bb9d515e2fd2eda6829f8b769eec85e3de448eb42feb6bf65645400480169b3d70d56dff090103cfc95a3810515c42b2e WHIRLPOOL fdd0afe33686b1a403a901e26315188b429cdb522f06eb593a6d103edf2707cf1dc23fa2351a92b9edba8bbd59fbff9a306a0df5fc494880bc93fcfa69b3cde1 +AUX metalog.initd 701 SHA256 78e372a0c04c36e590a66d0750083fcb6302159eaae06a81c19a379e6115087e SHA512 45eb2f4c5a99723ac24bdb90726a81efef422aab7c991d1502a0bb728a4138cda74b2f8efb4cc70f1375b21b92039639e8bd5ab01af310991a81fce668f6f096 WHIRLPOOL 7794154e2f27e328ccf4fee668fc797c74e5332f9ae6835db203182207aa8da7c85d8ba7952c018063e814a2e1ca40870bd0cf6e31ec7dc82f7b0afb330cb73b +AUX metalog.service-r1 153 SHA256 68131c0c7480712b59265c7ba57deb5430c14d4b8c8ca3dcc3c84757e9a6c70c SHA512 72076f6aeab9975dedd824ea1d48b96f6a964d06f529923d4f7a1280a1123a63c0e958f74c6a1417c6362487a69d165bf3eb6c417aae3887ff43ae726f5a30d8 WHIRLPOOL daa8d2188ba10508eb1d6a5c9d052a0ce8dfe285bf1292b68b82925935184a8b75ccfeb141dd56ebee90176114bc59c3583713c46a23c1f0d16a2deab91442b9 +DIST metalog-3.tar.xz 360784 SHA256 0c3a1e19008b3d525eab6e5548a4e8cbb0fb235f2804dc41aace82c67ceeebe0 SHA512 2ac614bb85fe466308c4ced0842fdab5f056eda60e892189a8220719f1e06a72fce3c76842a2ac8c63a6808c20d8b7a7d8676896e14f7f54e40630ecbd21e289 WHIRLPOOL d06a23622bfcef053ac4d959952060c8c1649ea0a5e2f759612caf5819a32944b3c7f6d78233fec83944fe7b5535851d7dca4579b7849e08951da18be503ed09 +EBUILD metalog-3-r1.ebuild 1533 SHA256 585bac71502403575515dc0684237f41592ddb731a702c5e46bd2cfa44008491 SHA512 3e1f0ff8ddd35d3ba9432489ae3ff35e30bc24af43056144c3eacc9a2654378c157699c86ce1ab2ff39c4f38bef8be0d07d21ee9d14ca6978709767ca7b0e87a WHIRLPOOL a4898077adee20dfe0d49e99051d8cbb9b37b70d41994d9e4df80b6210897ea8033b636d36ae8e444a17c2b846d165b1a41aba987fb14d03b42dc8ea186495ac +EBUILD metalog-3-r2.ebuild 1496 SHA256 327bd1d097abecd60af59db802d433affda5917b3967d623c0d6cb29d7aa9e80 SHA512 91b3e9287583c61a375bbc9603021948f8508bf594ab6eff6398585419e30aba11ea6f600eb1305a8cf87f5c0b33aa80225b80fd003d74c8e17b31b2c543619b WHIRLPOOL da0bb29eb2148dee66b41b865a58e96bdf0b40ce41d83ba408bb09b338403b93d5f4f5adf342bfa6c52bf157c2f40060392b64a927c6a878802de51f14590d60 +MISC ChangeLog 2814 SHA256 0686ce19743df77440fd505e4ad20fe24660861908c7f5207c53ec65656ab9c2 SHA512 4da52d962d0d8ebb293fa8ae5ea7a06b54dce6175a7e1bf6afaa318bcf361d46e3678f5c573fe7ba3fbefe8462b0236603da21f2d3cf325ec488fc748bcbdb43 WHIRLPOOL ebe0532632c663fa3f04a52492541aa9e5d303323250f33cc0df29badec0962960418d354c9a61fc6b92d6fc2d31f0204b009d7d950e12d50726a8488d10c5e6 +MISC ChangeLog-2015 15409 SHA256 7b534edc547a716c20e34531f4b200f8463deb7fe6c7006a4423a0f6f74d07c7 SHA512 fa2e58da5d7e652622375fe9a608dc73e40bb6bed99f11d1540d07e217ac98c51bfae7aca2ee65ff34667556069be983e4a6c06d855150b7865b56790fad21ce WHIRLPOOL 1b1b36808eeae9bfc6a9ea0589b195ea1067d42df05e372b09fc2effaca6bd0be7a18c3627681537e6108ca8a84aed97a90ee49b6f07df293dc2cdac3152236e +MISC metadata.xml 412 SHA256 c50d7550b9b253bce0339a26c3fcfa548921ce52ee740184fe8c05b6d4ce7376 SHA512 3c5b8ad724089154480e4a1672e714fba022f30e371d317e53c144411ded8d8ca92bddac9eb51503ed9eb9e8069b851a8ff5078f9c9b576542efc54e621a98a8 WHIRLPOOL 4015be7464f2d87e56e0aeabdf2862d61638563e919e2709957f7365bebb0d8240480ac279b1b6a913e1c3242f22b309f29023f252e9dd386a79171eabb7f50b diff --git a/app-admin/metalog/files/consolelog.sh b/app-admin/metalog/files/consolelog.sh new file mode 100644 index 000000000000..90fb38e9921a --- /dev/null +++ b/app-admin/metalog/files/consolelog.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# consolelog.sh +# For metalog -- log to a console + +set -f + +. /etc/conf.d/metalog +if [ -z "${CONSOLE}" ] ; then + CONSOLE="/dev/console" +fi + +if [ -z "${FORMAT}" ] ; then + FORMAT='$1 [$2] $3' +fi + +for d in ${CONSOLE} ; do + eval echo ${FORMAT} > ${d} +done + +exit 0 diff --git a/app-admin/metalog/files/metalog-0.9-metalog-conf.patch b/app-admin/metalog/files/metalog-0.9-metalog-conf.patch new file mode 100644 index 000000000000..efb794de5454 --- /dev/null +++ b/app-admin/metalog/files/metalog-0.9-metalog-conf.patch @@ -0,0 +1,11 @@ +--- a/metalog.conf ++++ b/metalog.conf +@@ -21,6 +21,8 @@ + # merely write $@ to some device (your console for messages): + # echo "$@" > /dev/tty10 + # ++# Hint: you can control the consolelog.sh behavior in /etc/conf.d/metalog ++# + #console logging : + # + # facility = "*" diff --git a/app-admin/metalog/files/metalog.confd b/app-admin/metalog/files/metalog.confd new file mode 100644 index 000000000000..ec7e64edae2b --- /dev/null +++ b/app-admin/metalog/files/metalog.confd @@ -0,0 +1,18 @@ +# /etc/conf.d/metalog + +# Some useful options: +# -a Log with buffering +# -s Log without buffering +# See `metalog --help` for more + +METALOG_OPTS="" + + +# Options used by /usr/sbin/consolelog.sh + +# Space delimited list of devices to write "console" messages to +#CONSOLE="/dev/console /dev/tty10" +CONSOLE="/dev/tty10" + +# Format of logging (make sure you use single quotes) +FORMAT='$1 [$2] $3' diff --git a/app-admin/metalog/files/metalog.initd b/app-admin/metalog/files/metalog.initd new file mode 100644 index 000000000000..f81e9eec51ca --- /dev/null +++ b/app-admin/metalog/files/metalog.initd @@ -0,0 +1,41 @@ +#!/sbin/openrc-run +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="buffer unbuffer" + +PIDFILE=/var/run/metalog.pid + +depend() { + need localmount + use clock hostname + after bootmisc + provide logger +} + +ssd() { start-stop-daemon --exec /usr/sbin/metalog --pidfile "${PIDFILE}" "$@" ; } + +start() { + ebegin "Starting metalog" + ssd --start -- \ + --daemonize --pidfile="${PIDFILE}" ${METALOG_OPTS} + eend $? +} + +stop() { + ebegin "Stopping metalog" + ssd --stop + eend $? +} + +buffer() { + ebegin "Enabling log buffering" + ssd --signal USR2 + eend $? +} + +unbuffer() { + ebegin "Disabling log buffering" + ssd --signal USR1 + eend $? +} diff --git a/app-admin/metalog/files/metalog.service-r1 b/app-admin/metalog/files/metalog.service-r1 new file mode 100644 index 000000000000..862881aee165 --- /dev/null +++ b/app-admin/metalog/files/metalog.service-r1 @@ -0,0 +1,10 @@ +[Unit] +Description=System Logger Daemon + +[Service] +ExecStart=/usr/sbin/metalog +Restart=always + +[Install] +WantedBy=multi-user.target +Alias=syslog.service diff --git a/app-admin/metalog/metadata.xml b/app-admin/metalog/metadata.xml new file mode 100644 index 000000000000..e6a099eb943e --- /dev/null +++ b/app-admin/metalog/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>vapier@gentoo.org</email> + </maintainer> + <maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> + </maintainer> + <upstream> + <remote-id type="sourceforge">metalog</remote-id> + </upstream> +</pkgmetadata> diff --git a/app-admin/metalog/metalog-3-r1.ebuild b/app-admin/metalog/metalog-3-r1.ebuild new file mode 100644 index 000000000000..b67bb91b753a --- /dev/null +++ b/app-admin/metalog/metalog-3-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="3" +inherit eutils systemd + +DESCRIPTION="A highly configurable replacement for syslogd/klogd" +HOMEPAGE="http://metalog.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd" +IUSE="unicode" + +RDEPEND=">=dev-libs/libpcre-3.4" +DEPEND="${RDEPEND} + virtual/pkgconfig + app-arch/xz-utils" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-0.9-metalog-conf.patch +} + +src_configure() { + econf $(use_with unicode) +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + dodoc AUTHORS ChangeLog README NEWS metalog.conf + + into / + dosbin "${FILESDIR}"/consolelog.sh || die + + newinitd "${FILESDIR}"/metalog.initd metalog + newconfd "${FILESDIR}"/metalog.confd metalog + systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service" +} + +pkg_preinst() { + if [[ -d "${ROOT}"/etc/metalog ]] && [[ ! -e "${ROOT}"/etc/metalog.conf ]] ; then + mv -f "${ROOT}"/etc/metalog/metalog.conf "${ROOT}"/etc/metalog.conf + rmdir "${ROOT}"/etc/metalog + export MOVED_METALOG_CONF=true + else + export MOVED_METALOG_CONF=false + fi +} + +pkg_postinst() { + if ${MOVED_METALOG_CONF} ; then + ewarn "The default metalog.conf file has been moved" + ewarn "from /etc/metalog/metalog.conf to just" + ewarn "/etc/metalog.conf. If you had a standard" + ewarn "setup, the file has been moved for you." + fi +} diff --git a/app-admin/metalog/metalog-3-r2.ebuild b/app-admin/metalog/metalog-3-r2.ebuild new file mode 100644 index 000000000000..073d55ec90e1 --- /dev/null +++ b/app-admin/metalog/metalog-3-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" +inherit eutils systemd + +DESCRIPTION="A highly configurable replacement for syslogd/klogd" +HOMEPAGE="http://metalog.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="unicode" + +RDEPEND=">=dev-libs/libpcre-3.4" +DEPEND="${RDEPEND} + virtual/pkgconfig + app-arch/xz-utils" + +PATCHES=( "${FILESDIR}"/${PN}-0.9-metalog-conf.patch ) + +src_configure() { + econf $(use_with unicode) +} + +src_install() { + emake DESTDIR="${D}" install + dodoc AUTHORS ChangeLog README NEWS metalog.conf + + into / + dosbin "${FILESDIR}"/consolelog.sh + + newinitd "${FILESDIR}"/metalog.initd metalog + newconfd "${FILESDIR}"/metalog.confd metalog + systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service" +} + +pkg_preinst() { + if [[ -d "${ROOT}"/etc/metalog ]] && [[ ! -e "${ROOT}"/etc/metalog.conf ]] ; then + mv -f "${ROOT}"/etc/metalog/metalog.conf "${ROOT}"/etc/metalog.conf + rmdir "${ROOT}"/etc/metalog + export MOVED_METALOG_CONF=true + else + export MOVED_METALOG_CONF=false + fi +} + +pkg_postinst() { + if ${MOVED_METALOG_CONF} ; then + ewarn "The default metalog.conf file has been moved" + ewarn "from /etc/metalog/metalog.conf to just" + ewarn "/etc/metalog.conf. If you had a standard" + ewarn "setup, the file has been moved for you." + fi +} |