diff options
author | Ian Delaney <idella4@gentoo.org> | 2015-05-30 09:38:29 +0000 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2015-05-30 09:38:29 +0000 |
commit | e4aaa43dfded48362acd976d1be2e1b33ae91209 (patch) | |
tree | bc942642e531e5e7a843dc502cf96e8e15b2a390 /app-admin | |
parent | [QA] Use proper install functions, bug 550542. (diff) | |
download | gentoo-2-e4aaa43dfded48362acd976d1be2e1b33ae91209.tar.gz gentoo-2-e4aaa43dfded48362acd976d1be2e1b33ae91209.tar.bz2 gentoo-2-e4aaa43dfded48362acd976d1be2e1b33ae91209.zip |
revbump; upgrade -2.0.4 with support of systemd via new system files listed. bump; additional support as for revbump, all files and patches by maintainer from bug #550330, add use flag ulog to metadata, rm old version -2.0.3
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/ulogd/ChangeLog | 14 | ||||
-rw-r--r-- | app-admin/ulogd/files/ulogd-2.0.5-remove-db-automagic.patch | 45 | ||||
-rw-r--r-- | app-admin/ulogd/files/ulogd-2.logrotate | 9 | ||||
-rw-r--r-- | app-admin/ulogd/files/ulogd.init (renamed from app-admin/ulogd/files/ulogd-2-ng.init) | 14 | ||||
-rw-r--r-- | app-admin/ulogd/files/ulogd.logrotate | 9 | ||||
-rw-r--r-- | app-admin/ulogd/files/ulogd.service | 12 | ||||
-rw-r--r-- | app-admin/ulogd/metadata.xml | 1 | ||||
-rw-r--r-- | app-admin/ulogd/ulogd-2.0.4-r1.ebuild (renamed from app-admin/ulogd/ulogd-2.0.3.ebuild) | 33 | ||||
-rw-r--r-- | app-admin/ulogd/ulogd-2.0.5.ebuild | 141 |
9 files changed, 250 insertions, 28 deletions
diff --git a/app-admin/ulogd/ChangeLog b/app-admin/ulogd/ChangeLog index a58582f28f60..96e32b0025b0 100644 --- a/app-admin/ulogd/ChangeLog +++ b/app-admin/ulogd/ChangeLog @@ -1,6 +1,18 @@ # ChangeLog for app-admin/ulogd # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/ChangeLog,v 1.97 2015/01/28 10:26:01 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/ChangeLog,v 1.98 2015/05/30 09:38:29 idella4 Exp $ + +*ulogd-2.0.4-r1 (30 May 2015) +*ulogd-2.0.5 (30 May 2015) + + 30 May 2015; Ian Delaney <idella4@gentoo.org> + +files/ulogd-2.0.5-remove-db-automagic.patch, +files/ulogd.init, + +files/ulogd.logrotate, +files/ulogd.service, +ulogd-2.0.4-r1.ebuild, + +ulogd-2.0.5.ebuild, -files/ulogd-2-ng.init, -files/ulogd-2.logrotate, + -ulogd-2.0.3.ebuild, metadata.xml: + revbump; upgrade -2.0.4 with support of systemd via new system files listed. + bump; additional support as for revbump, all files and patches by maintainer + from bug #550330, add use flag ulog to metadata, rm old version -2.0.3 28 Jan 2015; Agostino Sarubbo <ago@gentoo.org> ulogd-2.0.4.ebuild: Stable for ppc, wrt bug #534240 diff --git a/app-admin/ulogd/files/ulogd-2.0.5-remove-db-automagic.patch b/app-admin/ulogd/files/ulogd-2.0.5-remove-db-automagic.patch new file mode 100644 index 000000000000..dfa51112e063 --- /dev/null +++ b/app-admin/ulogd/files/ulogd-2.0.5-remove-db-automagic.patch @@ -0,0 +1,45 @@ +commit c61c05c2d050410c24346d42b013d7cb39149949 +Author: Harald Welte <laforge@gnumonks.org> +Date: Sun May 3 11:08:54 2015 +0200 + + configure.ac: Add --without-{mysql,pgsql} + + In some cases you may not want to build a certain output plugin, even + if the headers/libraries actually exist on the build host. + +diff --git a/configure.ac b/configure.ac +index c814bec..1a7f8de 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -85,7 +85,10 @@ if [! test "x$enable_nfacct" = "xyes"]; then + enable_nfacct="no" + fi + +-CT_CHECK_POSTGRES_DB() ++AC_ARG_WITH([pgsql], AS_HELP_STRING([--without-pgsql], [Build without postgresql output plugin [default=test]])) ++AS_IF([test "x$with_pgsql" != "xno"], [ ++ CT_CHECK_POSTGRES_DB() ++]) + AM_CONDITIONAL(HAVE_PGSQL, test "x$PQLIBPATH" != "x") + if test "x$PQLIBPATH" != "x"; then + enable_pgsql="yes" +@@ -93,7 +96,10 @@ else + enable_pgsql="no" + fi + +-CT_CHECK_MYSQL_DB() ++AC_ARG_WITH([mysql], AS_HELP_STRING([--without-mysql], [Build without mysql output plugin [default=test]])) ++AS_IF([test "x$with_mysql" != "xno"], [ ++ CT_CHECK_MYSQL_DB() ++]) + AM_CONDITIONAL(HAVE_MYSQL, test "x$MYSQL_LIB" != "x") + if test "x$MYSQL_LIB" != "x"; then + enable_mysql="yes" +@@ -101,6 +107,7 @@ else + enable_mysql="no" + fi + ++ + AC_ARG_WITH([sqlite], AS_HELP_STRING([--without-sqlite], [Build without SQLITE3 output plugin [default=test]])) + AS_IF([test "x$with_sqlite" != "xno"], [ + PKG_CHECK_MODULES([libsqlite3], [sqlite3], [], [:]) diff --git a/app-admin/ulogd/files/ulogd-2.logrotate b/app-admin/ulogd/files/ulogd-2.logrotate deleted file mode 100644 index 787f49b6fcb0..000000000000 --- a/app-admin/ulogd/files/ulogd-2.logrotate +++ /dev/null @@ -1,9 +0,0 @@ -/var/log/ulogd/ulogd.log /var/log/ulogd/ulogd_syslogemu.log { - sharedscripts - missingok - notifempty - create 0640 ulogd - postrotate - /etc/init.d/ulogd reopen_logs > /dev/null - endscript -} diff --git a/app-admin/ulogd/files/ulogd-2-ng.init b/app-admin/ulogd/files/ulogd.init index b1c5d616dc12..38b0fa9d76e8 100644 --- a/app-admin/ulogd/files/ulogd-2-ng.init +++ b/app-admin/ulogd/files/ulogd.init @@ -1,13 +1,13 @@ #!/sbin/runscript -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/files/ulogd-2-ng.init,v 1.2 2014/08/22 10:31:59 dlan Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/files/ulogd.init,v 1.1 2015/05/30 09:38:29 idella4 Exp $ -ULOGD_PIDFILE="/run/ulogd.pid" -ULOGD_BINARY="/usr/sbin/ulogd" -ULOGD_OPTS="--daemon --uid ulogd --pidfile ${ULOGD_PIDFILE}" +extra_started_commands="reload reopen" -extra_started_commands="reload reopen_logs" +: ${ULOGD_BINARY:=/usr/sbin/ulogd} +: ${ULOGD_PIDFILE:=/run/${SVCNAME}.pid} +: ${ULOGD_OPTS:=--daemon --uid ulogd --pidfile ${ULOGD_PIDFILE}} depend() { before iptables ip6tables ebtables firewall @@ -34,7 +34,7 @@ reload() { eend $? } -reopen_logs() { +reopen() { ebegin "Reopening ${SVCNAME} logfiles" start-stop-daemon --signal HUP --pidfile ${ULOGD_PIDFILE} eend $? diff --git a/app-admin/ulogd/files/ulogd.logrotate b/app-admin/ulogd/files/ulogd.logrotate new file mode 100644 index 000000000000..777e40097a5e --- /dev/null +++ b/app-admin/ulogd/files/ulogd.logrotate @@ -0,0 +1,9 @@ +/var/log/ulogd/*.log { + sharedscripts + missingok + notifempty + create 0640 ulogd + postrotate + [ -f /run/ulogd.pid ] && /bin/kill -HUP $(cat /run/ulogd.pid) + endscript +} diff --git a/app-admin/ulogd/files/ulogd.service b/app-admin/ulogd/files/ulogd.service new file mode 100644 index 000000000000..6cd49997617a --- /dev/null +++ b/app-admin/ulogd/files/ulogd.service @@ -0,0 +1,12 @@ +[Unit] +Description=A userspace logging daemon for netfilter/iptables related logging +Before=iptables.service ip6tables.service +After=mysql.service postgresql.service + +[Service] +Type=simple +ExecStart=/usr/sbin/ulogd --uid ulogd --pidfile /run/ulogd.pid +ExecReload=/bin/kill -USR1 $MAINPID + +[Install] +WantedBy=network.target diff --git a/app-admin/ulogd/metadata.xml b/app-admin/ulogd/metadata.xml index ce6670bd908a..f36297741c42 100644 --- a/app-admin/ulogd/metadata.xml +++ b/app-admin/ulogd/metadata.xml @@ -14,5 +14,6 @@ <flag name='nflog'>Build NFLOG input plugin to support stateless packet-based logging via nfnetlink_queue.</flag> <flag name='nfct'>Build NFCT input plugin to support stateful flow-based via nf_conntrack_netlink.</flag> <flag name='nfacct'>Build NFACCT input plugin to support traffic accounting via nfnetlink_acct.</flag> + <flag name='ulog'>Build ULOG input plugin to support deprecated packet-based logging via ULOG target.</flag> </use> </pkgmetadata> diff --git a/app-admin/ulogd/ulogd-2.0.3.ebuild b/app-admin/ulogd/ulogd-2.0.4-r1.ebuild index 3a068aa80632..c9541a559f7a 100644 --- a/app-admin/ulogd/ulogd-2.0.3.ebuild +++ b/app-admin/ulogd/ulogd-2.0.4-r1.ebuild @@ -1,25 +1,27 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/ulogd-2.0.3.ebuild,v 1.6 2014/12/28 14:40:24 titanofold Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/ulogd-2.0.4-r1.ebuild,v 1.1 2015/05/30 09:38:29 idella4 Exp $ EAPI="5" AUTOTOOLS_AUTORECONF=1 AUTOTOOLS_IN_SOURCE_BUILD=1 -inherit autotools-utils eutils linux-info readme.gentoo user +inherit autotools-utils eutils linux-info readme.gentoo systemd user DESCRIPTION="A userspace logging daemon for netfilter/iptables related logging" HOMEPAGE="http://netfilter.org/projects/ulogd/index.html" -SRC_URI="http://ftp.netfilter.org/pub/${PN}/${P}.tar.bz2" +SRC_URI="ftp://ftp.netfilter.org/pub/${PN}/${P}.tar.bz2 + http://www.netfilter.org/projects/${PN}/files/${P}.tar.bz2" LICENSE="GPL-2" SLOT="0" -KEYWORDS="amd64 ~ia64 ppc x86" -IUSE="dbi doc mysql nfacct +nfct +nflog pcap postgres sqlite" +KEYWORDS="~amd64 ~ia64 ~ppc ~x86" +IUSE="dbi doc json mysql nfacct +nfct +nflog pcap postgres sqlite" RDEPEND="net-firewall/iptables >=net-libs/libnfnetlink-1.0.1 dbi? ( dev-db/libdbi ) + json? ( dev-libs/jansson ) nfacct? ( >=net-libs/libmnl-1.0.3 >=net-libs/libnetfilter_acct-1.0.1 @@ -28,7 +30,7 @@ RDEPEND="net-firewall/iptables nflog? ( >=net-libs/libnetfilter_log-1.0.0 ) mysql? ( virtual/mysql ) pcap? ( net-libs/libpcap ) - postgres? ( dev-db/postgresql ) + postgres? ( dev-db/postgresql:= ) sqlite? ( dev-db/sqlite:3 )" DEPEND="${RDEPEND} @@ -38,6 +40,8 @@ DEPEND="${RDEPEND} virtual/latex-base )" +PATCHES=( "${FILESDIR}/${P}-linux-headers-3.17-ipt_ulog.patch" ) + DOCS=( AUTHORS README TODO ) DOC_CONTENTS="You must have at least one logging stack enabled to make ulogd work. Please edit example configuration located at /etc/ulogd.conf" @@ -62,6 +66,11 @@ pkg_setup() { if use nfacct && kernel_is lt 3 3 0; then ewarn "NFACCT input plugin requires kernel newer than 3.3.0" fi + + if ! use nfacct && ! use nfct && ! use nflog && kernel_is gt 3 17 0; then + ewarn "ULOG target was removed since 3.17.0 kernel release" + ewarn "Consider enabling NFACCT, NFCT or NFLOG support" + fi } src_prepare() { @@ -78,6 +87,7 @@ src_prepare() { src_configure() { local myeconfargs=( $(use_with dbi) + $(use_with json jansson) $(use_enable nfacct) $(use_enable nfct) $(use_enable nflog) @@ -92,7 +102,7 @@ src_configure() { src_compile() { autotools-utils_src_compile - if use doc ; then + if use doc; then # prevent access violations from generation of bitmap font files export VARTEXFONTS="${T}"/fonts emake -C doc @@ -104,7 +114,7 @@ src_install() { readme.gentoo_create_doc prune_libtool_files --modules - if use doc ; then + if use doc; then dohtml doc/${PN}.html dodoc doc/${PN}.dvi doc/${PN}.txt doc/${PN}.ps fi @@ -119,10 +129,11 @@ src_install() { fowners root:ulogd /etc/ulogd.conf fperms 640 /etc/ulogd.conf - newinitd "${FILESDIR}/${PN}-2-ng.init" ${PN} + newinitd "${FILESDIR}/${PN}.init" ${PN} + systemd_dounit "${FILESDIR}/${PN}.service" insinto /etc/logrotate.d - newins "${FILESDIR}/${PN}-2.logrotate" ${PN} + newins "${FILESDIR}/${PN}.logrotate" ${PN} diropts -o ulogd -g ulogd keepdir /var/log/ulogd diff --git a/app-admin/ulogd/ulogd-2.0.5.ebuild b/app-admin/ulogd/ulogd-2.0.5.ebuild new file mode 100644 index 000000000000..15c179ff7b87 --- /dev/null +++ b/app-admin/ulogd/ulogd-2.0.5.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/ulogd/ulogd-2.0.5.ebuild,v 1.1 2015/05/30 09:38:29 idella4 Exp $ + +EAPI=5 + +AUTOTOOLS_AUTORECONF=1 +AUTOTOOLS_IN_SOURCE_BUILD=1 + +inherit autotools-utils eutils linux-info readme.gentoo systemd user + +DESCRIPTION="A userspace logging daemon for netfilter/iptables related logging" +HOMEPAGE="http://netfilter.org/projects/ulogd/index.html" +SRC_URI="ftp://ftp.netfilter.org/pub/${PN}/${P}.tar.bz2 + http://www.netfilter.org/projects/${PN}/files/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ia64 ~ppc ~x86" +IUSE="dbi doc json mysql nfacct +nfct +nflog pcap postgres sqlite -ulog" + +RDEPEND=" + net-firewall/iptables + >=net-libs/libnfnetlink-1.0.1 + dbi? ( dev-db/libdbi ) + json? ( dev-libs/jansson ) + nfacct? ( + >=net-libs/libmnl-1.0.3 + >=net-libs/libnetfilter_acct-1.0.1 + ) + nfct? ( >=net-libs/libnetfilter_conntrack-1.0.2 ) + nflog? ( >=net-libs/libnetfilter_log-1.0.0 ) + mysql? ( virtual/mysql ) + pcap? ( net-libs/libpcap ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( dev-db/sqlite:3 )" + +DEPEND="${RDEPEND} + doc? ( + app-text/linuxdoc-tools + app-text/texlive-core + virtual/latex-base + )" + +PATCHES=( "${FILESDIR}/${P}-remove-db-automagic.patch" ) + +DOCS=( AUTHORS README TODO ) +DOC_CONTENTS="You must have at least one logging stack enabled to make ulogd work. +Please edit example configuration located at /etc/ulogd.conf" + +pkg_setup() { + enewgroup ulogd + enewuser ulogd -1 -1 /var/log/ulogd ulogd + + linux-info_pkg_setup + + if kernel_is lt 2 6 14; then + die "ulogd2 requires kernel newer than 2.6.14" + fi + + if kernel_is lt 2 6 18; then + ewarn "You are using kernel older than 2.6.18" + ewarn "Some ulogd2 features may be unavailable" + fi + + if use nfacct && kernel_is lt 3 3 0; then + ewarn "NFACCT input plugin requires kernel newer than 3.3.0" + fi + + if use ulog && kernel_is gt 3 17 0; then + ewarn "ULOG target was removed since 3.17.0 kernel release" + ewarn "Consider enabling NFACCT, NFCT or NFLOG support" + fi +} + +src_prepare() { + # - make all logs to be kept in a single dir /var/log/ulogd + # - place sockets in /run instead of /tmp + sed -i \ + -e 's:var/log:var/log/ulogd:g' \ + -e 's:tmp:run:g' \ + ulogd.conf.in || die 'sed on ulogd.conf.in failed' + + autotools-utils_src_prepare +} + +src_configure() { + local myeconfargs=( + $(use_with dbi) + $(use_with json jansson) + $(use_enable nfacct) + $(use_enable nfct) + $(use_enable nflog) + $(use_with mysql) + $(use_with pcap) + $(use_with postgres pgsql) + $(use_with sqlite) + $(use_enable ulog) + ) + autotools-utils_src_configure +} + +src_compile() { + autotools-utils_src_compile + + if use doc; then + # prevent access violations from generation of bitmap font files + export VARTEXFONTS="${T}"/fonts + emake -C doc + fi +} + +src_install() { + autotools-utils_src_install + readme.gentoo_create_doc + prune_libtool_files --modules + + if use doc; then + dohtml doc/${PN}.html + dodoc doc/${PN}.dvi doc/${PN}.txt doc/${PN}.ps + fi + + use sqlite && dodoc doc/sqlite3.table + use mysql && dodoc doc/mysql-*.sql + use postgres && dodoc doc/pgsql-*.sql + doman ${PN}.8 + + insinto /etc + doins ${PN}.conf + fowners root:ulogd /etc/ulogd.conf + fperms 640 /etc/ulogd.conf + + newinitd "${FILESDIR}/${PN}.init" ${PN} + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + diropts -o ulogd -g ulogd + keepdir /var/log/ulogd +} |