diff options
author | Alin Năstac <mrness@gentoo.org> | 2009-07-12 10:57:25 +0000 |
---|---|---|
committer | Alin Năstac <mrness@gentoo.org> | 2009-07-12 10:57:25 +0000 |
commit | 4d189160209023c1d6f1fc4aa7c83270bce758e9 (patch) | |
tree | 01aa518bf867fd2d1047fba27047f2e6fada271c /net-proxy/oops | |
parent | alpha/ia64/sparc stable wrt #271889 (diff) | |
download | gentoo-2-4d189160209023c1d6f1fc4aa7c83270bce758e9.tar.gz gentoo-2-4d189160209023c1d6f1fc4aa7c83270bce758e9.tar.bz2 gentoo-2-4d189160209023c1d6f1fc4aa7c83270bce758e9.zip |
Migrate to EAPI 2. Set file permissions on rotating logs (#275919).
(Portage version: 2.1.6.13/cvs/Linux x86_64)
Diffstat (limited to 'net-proxy/oops')
-rw-r--r-- | net-proxy/oops/ChangeLog | 10 | ||||
-rw-r--r-- | net-proxy/oops/files/rotate-logs.patch | 12 | ||||
-rw-r--r-- | net-proxy/oops/oops-1.5.24_pre20050503-r4.ebuild | 97 |
3 files changed, 117 insertions, 2 deletions
diff --git a/net-proxy/oops/ChangeLog b/net-proxy/oops/ChangeLog index 3a0793e8884a..59e96b4dbd6a 100644 --- a/net-proxy/oops/ChangeLog +++ b/net-proxy/oops/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-proxy/oops -# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-proxy/oops/ChangeLog,v 1.21 2008/12/14 14:52:13 mrness Exp $ +# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/oops/ChangeLog,v 1.22 2009/07/12 10:57:25 mrness Exp $ + +*oops-1.5.24_pre20050503-r4 (12 Jul 2009) + + 12 Jul 2009; Alin Năstac <mrness@gentoo.org> +files/rotate-logs.patch, + +oops-1.5.24_pre20050503-r4.ebuild: + Migrate to EAPI 2. Set file permissions on rotating logs (#275919). *oops-1.5.24_pre20050503-r3 (14 Dec 2008) diff --git a/net-proxy/oops/files/rotate-logs.patch b/net-proxy/oops/files/rotate-logs.patch new file mode 100644 index 000000000000..236aa4b60926 --- /dev/null +++ b/net-proxy/oops/files/rotate-logs.patch @@ -0,0 +1,12 @@ +diff -Nru oops-1.5.23.orig/src/rotate_logs.c oops-1.5.23/src/rotate_logs.c +--- oops-1.5.23.orig/src/rotate_logs.c 2001-08-31 15:30:30.000000000 +0200 ++++ oops-1.5.23/src/rotate_logs.c 2009-07-12 12:47:56.000000000 +0200 +@@ -32,7 +32,7 @@ + if ( !num ) { + /* if no number of logs configured just reopen file */ + close(fb->fd); +- fb->fd = open(name, O_WRONLY|O_APPEND|O_CREAT); ++ fb->fd = open(name, O_WRONLY|O_APPEND|O_CREAT, 0660); + return; + + } diff --git a/net-proxy/oops/oops-1.5.24_pre20050503-r4.ebuild b/net-proxy/oops/oops-1.5.24_pre20050503-r4.ebuild new file mode 100644 index 000000000000..f58a5521f55d --- /dev/null +++ b/net-proxy/oops/oops-1.5.24_pre20050503-r4.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-proxy/oops/oops-1.5.24_pre20050503-r4.ebuild,v 1.1 2009/07/12 10:57:25 mrness Exp $ + +EAPI="2" + +inherit eutils flag-o-matic toolchain-funcs autotools + +MY_P="${PN}-1.5.23" + +DESCRIPTION="An advanced multithreaded caching web proxy" +HOMEPAGE="http://zipper.paco.net/~igor/oops.eng/" +SRC_URI="http://zipper.paco.net/~igor/oops/${MY_P}.tar.gz + mirror://gentoo/${P}.patch.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~sparc ~x86" +IUSE="" + +RDEPEND="dev-libs/libpcre + >=sys-libs/db-3" +DEPEND="${RDEPEND} + sys-devel/flex" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup oops + enewuser oops -1 -1 /var/lib/oops oops +} + +src_prepare() { + epatch "${WORKDIR}/${P}.patch" + epatch "${FILESDIR}/${P/_*}-textrel.patch" + epatch "${FILESDIR}/${P/_*}-pthread-rwlock.patch" + epatch "${FILESDIR}/modules-as-needed.patch" + epatch "${FILESDIR}/implicit-decl.patch" + epatch "${FILESDIR}/libpcreposix.patch" + epatch "${FILESDIR}/rotate-logs.patch" + sed -i -e 's:y\.tab\.h:y.tab.c:' src/Makefile.in + eautoreconf +} + +src_configure() { + econf \ + --prefix=/usr \ + --libdir=/usr/$(get_libdir)/oops \ + --enable-oops-user=oops \ + --sysconfdir=/etc/oops \ + --sbindir=/usr/sbin \ + --with-regexp=pcre \ + --localstatedir=/var/run/oops \ + --enable-large-files \ + --with-zlib=-lz \ + || die "configure problem" + + sed -i -e '/STRERROR_R/d' src/config.h.in + sed -i \ + -e "s|OOPS_LIBDIR = /usr/$(get_libdir)/oops|OOPS_LIBDIR = ${D}/usr/$(get_libdir)/oops|" \ + -e "s|OOPS_SBINDIR = /usr/sbin|OOPS_SBINDIR = ${D}/usr/sbin|" \ + -e "s|OOPS_SYSCONFDIR = /etc/oops|OOPS_SYSCONFDIR = ${D}/etc/oops|" \ + -e "s|OOPS_LOCALSTATEDIR = /var/run/oops|OOPS_LOCALSTATEDIR = ${D}/var/run/oops|" \ + -e "s|OOPSPATH=/usr/oops|OOPSPATH=${D}/usr/oops|" \ + src/Makefile + sed -i \ + -e "s|^\(LDFLAGS *= *\)${LDFLAGS}|\1$(raw-ldflags)|" \ + src/modules/Makefile #modules makefile use ld directly +} + +src_install() { + dodir /usr/sbin + einstall || die "install problem" + + newinitd "${FILESDIR}/oops.initd" oops + diropts -m0750 -o root -g oops + dodir /etc/oops + insinto /etc/oops + doins "${FILESDIR}/oops.cfg" + + diropts -m0755 -o oops -g oops + keepdir /var/run/oops + diropts -m0770 -o oops -g oops + keepdir /var/log/oops + keepdir /var/lib/oops/storage + keepdir /var/lib/oops/db + + # cleanups + rm -rf "${D}/usr/oops" + rm -rf "${D}/usr/lib/oops/modules" +} + +pkg_postinst() { + #Set proper owner/group if installed from binary package + chgrp oops "${ROOT}/etc/oops" + chown -R oops:oops "${ROOT}/var/run/oops" "${ROOT}/var/log/oops" "${ROOT}/var/lib/oops" +} |