diff options
author | Peter Volkov <pva@gentoo.org> | 2011-09-03 12:17:52 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2011-09-03 12:17:52 +0000 |
commit | 21889453a138e0bf395172784f294fcffb4f35f6 (patch) | |
tree | 6ce5fa687523d2e75d290d621d0fcdfccc424aa1 /net-firewall/ufw | |
parent | Depend on split libreoffice-l10n package instead of installing the languages ... (diff) | |
download | historical-21889453a138e0bf395172784f294fcffb4f35f6.tar.gz historical-21889453a138e0bf395172784f294fcffb4f35f6.tar.bz2 historical-21889453a138e0bf395172784f294fcffb4f35f6.zip |
Add example syslog configurations for rsyslog and syslog-ng, bug #380461, thank Emmanuel Andry for report and Sławomir Nizio for this job.
Package-Manager: portage-2.1.10.11/cvs/Linux x86_64
Diffstat (limited to 'net-firewall/ufw')
-rw-r--r-- | net-firewall/ufw/ChangeLog | 10 | ||||
-rw-r--r-- | net-firewall/ufw/Manifest | 6 | ||||
-rw-r--r-- | net-firewall/ufw/files/rsyslog/ufw.logrotate | 13 | ||||
-rw-r--r-- | net-firewall/ufw/files/syslog-ng/syslog-ng.example | 13 | ||||
-rw-r--r-- | net-firewall/ufw/files/syslog-ng/ufw.logrotate | 12 | ||||
-rw-r--r-- | net-firewall/ufw/ufw-0.30.1-r3.ebuild | 91 |
6 files changed, 143 insertions, 2 deletions
diff --git a/net-firewall/ufw/ChangeLog b/net-firewall/ufw/ChangeLog index e676f675ec3c..68bb93381ea3 100644 --- a/net-firewall/ufw/ChangeLog +++ b/net-firewall/ufw/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-firewall/ufw # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/ChangeLog,v 1.2 2011/07/28 07:22:42 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/ChangeLog,v 1.3 2011/09/03 12:17:52 pva Exp $ + +*ufw-0.30.1-r3 (03 Sep 2011) + + 03 Sep 2011; Peter Volkov <pva@gentoo.org> +ufw-0.30.1-r3.ebuild, + +files/rsyslog/ufw.logrotate, +files/syslog-ng/syslog-ng.example, + +files/syslog-ng/ufw.logrotate: + Add example syslog configurations for rsyslog and syslog-ng, bug #380461, + thank Emmanuel Andry for report and Sławomir Nizio for this job. 28 Jul 2011; Peter Volkov <pva@gentoo.org> ufw-0.30.1-r2.ebuild, metadata.xml: diff --git a/net-firewall/ufw/Manifest b/net-firewall/ufw/Manifest index 436545794d08..24c7febedc09 100644 --- a/net-firewall/ufw/Manifest +++ b/net-firewall/ufw/Manifest @@ -1,8 +1,12 @@ +AUX rsyslog/ufw.logrotate 178 RMD160 3797baf7ddf541e338b27ef3275bd28db03fa179 SHA1 aeedd795ed99ad20f03bc36056da07ca51838dd0 SHA256 02d1a00ca68446fbe056a4c3aede319f77b3262e26092cc04ea46de8923d03f8 +AUX syslog-ng/syslog-ng.example 381 RMD160 e8b26557f5c7985d52b27f5a0bb3a2d459727063 SHA1 dfe3b055396156d3111e3283bd6e3f5f25b78566 SHA256 70a795c1b20e2cdef38565d74b9de042c6666f860a2fd1b3bdc6f31dd451bc68 +AUX syslog-ng/ufw.logrotate 269 RMD160 589a17944e28df50ba2822b1025ed2124f689b04 SHA1 fb9eb8fc41029a08323da0ec0a708a946338c432 SHA256 cddd86613bde19b45f0f935c65bb43721f69aefc14e7d629612b23ea3b5c5c97 AUX ufw-2.initd 2726 RMD160 91c510dabf76eb6f7e416dc5af27ce52ffbe09ec SHA1 81148f04f44a3194588e6a63a99676d46dc63f8e SHA256 3136432d91dfa6bcfde81590b628dbef59b8ff4b8b01118838be5e9e3c37e1d9 AUX ufw-dont-check-iptables.patch 1572 RMD160 76245c0aa6adc3edbadd311c2482aa9cad5e7824 SHA1 268d86725e202b2c1a8243907d143085f92aff53 SHA256 2ea0f9525baa82386690577525631f468e56a0fbde0e7e5a65fba36c922ea96f AUX ufw-move-path.patch 7135 RMD160 c4dba2bbc70072d4ffe270ffb70176a4cabd696c SHA1 10a95973b4c6b9ea271691993157e1b9193d435d SHA256 f8036c343f52e12493d1019e83dfdda505fae68bbc4b46144ec73033a9d4a578 AUX ufw.confd 219 RMD160 cce23a5af2c48845fde0bed837e0a2faaeb3f5c4 SHA1 b88ef87f18dbe154545a427fbf155c22c23ace1a SHA256 069aa7382b40aecebf26ef53f3f4c49890314e0357925c84b3c15f1d0b913be0 DIST ufw-0.30.1.tar.gz 297322 RMD160 7e1fc1bb77495d9d24e058546edcb2ea3832f04b SHA1 a128685ea560f2de27d5d311b6dd07f590f1dafb SHA256 98da13fe3e9aa8ff29611f20ef6e8b15be42bcdc43c8ef3145755b220f3bae1a EBUILD ufw-0.30.1-r2.ebuild 2517 RMD160 9bed4111c900f33c734ebe95c1a3dc65744ee4d6 SHA1 cbfdd6d7d20509b37cd888bda95805fc5f7dbcec SHA256 f665336f0e77a01622758f0ed2ca8ebd8059103e9ad51f5f22ab06413a63a5d1 -MISC ChangeLog 697 RMD160 b668900fcb170d173bd405ab13ae5c9aec3f4849 SHA1 619b112ff448d156d3e863de9ec9a5c63e7e6ff2 SHA256 57cec1bc78a2a0d96f2ab1281092ad6ab5da2e6e4507bf980a2036bee288d653 +EBUILD ufw-0.30.1-r3.ebuild 2900 RMD160 0b57970724c6c1034332a3e380c718931ad29517 SHA1 edc96d2e862b84bec6b5d9866900c5978b90d923 SHA256 299043eaa20b078231d3f602f5b024e51ce89b3f238ea117c4ccf987d43d9633 +MISC ChangeLog 1042 RMD160 29b3a8f966fdb034384597d3e00357dbc7246076 SHA1 67ef0e3bb7f390e184fecc3bafc886f41f2c5060 SHA256 89af0943bac301a37139d42408940720dbcb32c527961ecc0ecc534f090711a4 MISC metadata.xml 643 RMD160 628f35d460bd037a27f4488ab84a2d1265002f11 SHA1 7d7110144127c01a523718f965c4520e21e82952 SHA256 a27a669e39580ff8c14083513f3f323536f59e836f4567feb3a70f4976baab55 diff --git a/net-firewall/ufw/files/rsyslog/ufw.logrotate b/net-firewall/ufw/files/rsyslog/ufw.logrotate new file mode 100644 index 000000000000..f88ca8265bea --- /dev/null +++ b/net-firewall/ufw/files/rsyslog/ufw.logrotate @@ -0,0 +1,13 @@ +/var/log/ufw.log +{ + rotate 5 + weekly + missingok + notifempty + compress + delaycompress + sharedscripts + postrotate + /etc/init.d/rsyslog reload >/dev/null 2>&1 || true + endscript +} diff --git a/net-firewall/ufw/files/syslog-ng/syslog-ng.example b/net-firewall/ufw/files/syslog-ng/syslog-ng.example new file mode 100644 index 000000000000..41f7ce39cef7 --- /dev/null +++ b/net-firewall/ufw/files/syslog-ng/syslog-ng.example @@ -0,0 +1,13 @@ +# This is an example rule for app-admin/syslog-ng to separate ufw logs +# from /var/log/messages. +# Place those lines before "log" entries in /etc/syslog-ng/syslog-ng.conf. + +filter f_ufw { match("\\[UFW " value("MESSAGE")); }; +destination ufwfile { file("/var/log/ufw.log"); }; +log { + source(src); + filter(f_ufw); + destination(ufwfile); + destination(console_all); + flags(final); +}; diff --git a/net-firewall/ufw/files/syslog-ng/ufw.logrotate b/net-firewall/ufw/files/syslog-ng/ufw.logrotate new file mode 100644 index 000000000000..5080aa1bfa38 --- /dev/null +++ b/net-firewall/ufw/files/syslog-ng/ufw.logrotate @@ -0,0 +1,12 @@ +# logrotate snippet for ufw +# requires app-admin/syslog-ng +# copy the file into /etc/logrotate.d +/var/log/ufw.log { + missingok + rotate 5 + notifempty + sharedscripts + postrotate + /etc/init.d/syslog-ng reload > /dev/null 2>&1 || true + endscript +} diff --git a/net-firewall/ufw/ufw-0.30.1-r3.ebuild b/net-firewall/ufw/ufw-0.30.1-r3.ebuild new file mode 100644 index 000000000000..3c8607fe2a6d --- /dev/null +++ b/net-firewall/ufw/ufw-0.30.1-r3.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/ufw/ufw-0.30.1-r3.ebuild,v 1.1 2011/09/03 12:17:52 pva Exp $ + +EAPI=3 +PYTHON_DEPEND="2:2.5" + +inherit versionator bash-completion eutils linux-info distutils + +MY_PV_12=$(get_version_component_range 1-2) +DESCRIPTION="A program used to manage a netfilter firewall" +HOMEPAGE="http://launchpad.net/ufw" +SRC_URI="http://launchpad.net/ufw/${MY_PV_12}/${PV}/+download/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" + +DEPEND="" +RDEPEND=">=net-firewall/iptables-1.4" + +# tests fail; upstream bug: https://bugs.launchpad.net/ufw/+bug/815982 +RESTRICT="test" + +pkg_setup() { + local CONFIG_CHECK="~PROC_FS ~NETFILTER_XT_MATCH_COMMENT ~IP6_NF_MATCH_HL \ + ~NETFILTER_XT_MATCH_LIMIT ~NETFILTER_XT_MATCH_MULTIPORT \ + ~NETFILTER_XT_MATCH_RECENT ~NETFILTER_XT_MATCH_STATE" + + if kernel_is -ge 2 6 39; then + CONFIG_CHECK+=" ~NETFILTER_XT_MATCH_ADDRTYPE" + else + CONFIG_CHECK+=" ~IP_NF_MATCH_ADDRTYPE" + fi + + check_extra_config + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + # Allow to remove unnecessary build time dependency + # on net-firewall/iptables. + epatch "${FILESDIR}"/${PN}-dont-check-iptables.patch + # Move files away from /lib/ufw. + epatch "${FILESDIR}"/${PN}-move-path.patch + # Set as enabled by default. User can enable or disable + # the service by adding or removing it to/from a runlevel. + sed -i 's/^ENABLED=no/ENABLED=yes/' conf/ufw.conf \ + || die "sed failed (ufw.conf)" +} + +src_install() { + newconfd "${FILESDIR}"/ufw.confd ufw || die "inserting a file to conf.d failed" + newinitd "${FILESDIR}"/ufw-2.initd ufw || die "inserting a file to init.d failed" + + # users normally would want it + insinto /usr/share/doc/${PF}/logging + doins -r "${FILESDIR}"/syslog-ng || die "inserting syslog-ng configuration failed" + + insinto /usr/share/doc/${PF}/logging/rsyslog + doins "${FILESDIR}"/rsyslog/* || die "inserting rsyslog configuration failed" + doins doc/rsyslog.example || die "inserting rsyslog.example failed" + + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins examples/* || die "inserting example files failed" + fi + distutils_src_install + dobashcompletion shell-completion/bash +} + +pkg_postinst() { + distutils_pkg_postinst + if path_exists -o "${EROOT}"lib/ufw/user{,6}.rules; then + ewarn "Attention!" + ewarn "User configuration from /lib/ufw is now placed in /etc/ufw/user." + ewarn "Please stop ufw, copy .rules files from ${EROOT}lib/ufw" + ewarn "to ${EROOT}etc/ufw/user/ and start ufw again." + fi + echo + elog "Remember to enable ufw add it to your boot sequence:" + elog "-- # ufw enable" + elog "-- # rc-update add ufw boot" + echo + bash-completion_pkg_postinst + echo + elog "If you want to keep ufw logs in a separate file, take a look at" + elog "/usr/share/doc/${PF}/logging." +} |