summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Năstac <mrness@gentoo.org>2006-05-19 23:21:01 +0000
committerAlin Năstac <mrness@gentoo.org>2006-05-19 23:21:01 +0000
commitd65d73048fa1005d1756a3acbbe30009fec9c841 (patch)
treeccc565033210c2089155853c413f459631ca0b4c
parentversion bump (diff)
downloadgentoo-2-d65d73048fa1005d1756a3acbbe30009fec9c841.tar.gz
gentoo-2-d65d73048fa1005d1756a3acbbe30009fec9c841.tar.bz2
gentoo-2-d65d73048fa1005d1756a3acbbe30009fec9c841.zip
Create and use oops user and group (#133436). Use keepdir where is the case. Make it compilable with custom LDFLAGS, including --as-needed. Don't install
(Portage version: 2.0.54-r2)
-rw-r--r--net-proxy/oops/ChangeLog9
-rw-r--r--net-proxy/oops/Manifest38
-rw-r--r--net-proxy/oops/files/digest-oops-1.5.24_pre200505036
-rw-r--r--net-proxy/oops/files/digest-oops-1.5.24_pre20050503-r14
-rw-r--r--net-proxy/oops/files/modules-as-needed.patch17
-rw-r--r--net-proxy/oops/files/oops.cfg12
-rw-r--r--net-proxy/oops/oops-1.5.24_pre20050503-r1.ebuild56
-rw-r--r--net-proxy/oops/oops-1.5.24_pre20050503.ebuild105
8 files changed, 63 insertions, 184 deletions
diff --git a/net-proxy/oops/ChangeLog b/net-proxy/oops/ChangeLog
index 718cf71d75e2..b566a6d65dd1 100644
--- a/net-proxy/oops/ChangeLog
+++ b/net-proxy/oops/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-proxy/oops
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/oops/ChangeLog,v 1.9 2006/04/25 03:11:36 weeve Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/oops/ChangeLog,v 1.10 2006/05/19 23:21:01 mrness Exp $
+
+ 19 May 2006; Alin Nastac <mrness@gentoo.org>
+ +files/modules-as-needed.patch, files/oops.cfg,
+ -oops-1.5.24_pre20050503.ebuild, oops-1.5.24_pre20050503-r1.ebuild:
+ Create and use oops user and group (#133436). Use keepdir where is the case.
+ Make it compilable with custom LDFLAGS, including --as-needed. Don't install
+ example files in /etc/oops.
25 Apr 2006; Jason Wever <weeve@gentoo.org>
oops-1.5.24_pre20050503-r1.ebuild:
diff --git a/net-proxy/oops/Manifest b/net-proxy/oops/Manifest
index 94f3bbecc3fb..454430514498 100644
--- a/net-proxy/oops/Manifest
+++ b/net-proxy/oops/Manifest
@@ -1,36 +1,8 @@
-AUX oops-1.5.24-textrel.patch 803 RMD160 7cc63f2d576e99232392528eb65ed09ea4d0150a SHA1 982151649995f1376d608a783addb04b5ba77489 SHA256 56acbb949120570746c200a97c4a41579366c4a00718baa3af56c7f7d2ea16f3 size 803
+MD5 a144fc9e05a501e44213a0ef4abc6b82 ChangeLog 3152
+MD5 a36b9f44efe9372d826e375c0b562cf4 files/digest-oops-1.5.24_pre20050503-r1 140
+MD5 1713d77ed9574b4428db71709b3a5ee2 files/modules-as-needed.patch 938
MD5 1d6a6205eb41cb5a0c93d0c643375dbf files/oops-1.5.24-textrel.patch 803
-RMD160 7cc63f2d576e99232392528eb65ed09ea4d0150a files/oops-1.5.24-textrel.patch 803
-SHA256 56acbb949120570746c200a97c4a41579366c4a00718baa3af56c7f7d2ea16f3 files/oops-1.5.24-textrel.patch 803
-AUX oops.cfg 17896 RMD160 37c8b0ccd94e597c43ca46695c2e350c3d2419c2 SHA1 775fd51a2f53c320162356dccdc8eff2d835ce24 SHA256 556e5236e0f23a14449fa259c43c8aab0ac3515b2f4b396362cffc589e45cbc9 size 17896
-MD5 6f1e80af4f1280cfb10b31ab9d2ab820 files/oops.cfg 17896
-RMD160 37c8b0ccd94e597c43ca46695c2e350c3d2419c2 files/oops.cfg 17896
-SHA256 556e5236e0f23a14449fa259c43c8aab0ac3515b2f4b396362cffc589e45cbc9 files/oops.cfg 17896
-AUX oops.initd 515 RMD160 da1f9e004a8173f74a2b2086f5ae5c88e4d3bc62 SHA1 37a0a31a0ff9e87c26901332f1d682e538bfa2b7 SHA256 be8deff3c52531ff1e31f47851672e877854082290e78d1f4c998b787f6c7279 size 515
+MD5 b9d0b25939387c6ed9d3fa375d606385 files/oops.cfg 17860
MD5 5428b5e23f57fbf884ff1b92bd9ad562 files/oops.initd 515
-RMD160 da1f9e004a8173f74a2b2086f5ae5c88e4d3bc62 files/oops.initd 515
-SHA256 be8deff3c52531ff1e31f47851672e877854082290e78d1f4c998b787f6c7279 files/oops.initd 515
-DIST oops-1.5.23.tar.gz 473290 RMD160 295122ff9ce7e045cf7ddda035479056ba9e5881 SHA256 b9ab7c0b5b11de7944f098d6f99158fe1b9c3b9cf82fe7827685c6cec8ccfa04 size 473290
-DIST oops-1.5.24_pre20050503.patch.gz 101103 RMD160 dffdc6842db8c78d87c26fe180302b56608f1f2e SHA256 954e59d046096867a8e818bf47190ab06c8416abb80d151757825a664192aded size 101103
-EBUILD oops-1.5.24_pre20050503-r1.ebuild 2477 RMD160 8cc9530ac0b8465a09e1202c37f5904bc1e2ef06 SHA1 020d99c9cf075c9314e8b61fa6ec0824d468dccd SHA256 fc0f534d1192280edb7e4f8d413d6bb3efb3a0b1b9f16142699947ae29f8fc7c size 2477
-MD5 b888e07bc26c5ae5ce973b0bb6363d86 oops-1.5.24_pre20050503-r1.ebuild 2477
-RMD160 8cc9530ac0b8465a09e1202c37f5904bc1e2ef06 oops-1.5.24_pre20050503-r1.ebuild 2477
-SHA256 fc0f534d1192280edb7e4f8d413d6bb3efb3a0b1b9f16142699947ae29f8fc7c oops-1.5.24_pre20050503-r1.ebuild 2477
-EBUILD oops-1.5.24_pre20050503.ebuild 2554 RMD160 f943af684b114e9e7624f6a829098af8288768ea SHA1 b27650eab8a8438e1d30c39651c4a5bcf567203a SHA256 859d386d323c7a705db0604100a7167bde99668f10860543c6c160152a437332 size 2554
-MD5 ade96e360b510e06a645a021c3efd0f3 oops-1.5.24_pre20050503.ebuild 2554
-RMD160 f943af684b114e9e7624f6a829098af8288768ea oops-1.5.24_pre20050503.ebuild 2554
-SHA256 859d386d323c7a705db0604100a7167bde99668f10860543c6c160152a437332 oops-1.5.24_pre20050503.ebuild 2554
-MISC ChangeLog 3152 RMD160 a403d45c551c3331e28fc1417532a723164e951a SHA1 e9a8c0921b6e88d3792459a309ebdc0bfc71c573 SHA256 10d73d8e6583c4988b25cf27170a506342c940bfea7a1271ca749dbb36c316f4 size 3152
-MD5 a144fc9e05a501e44213a0ef4abc6b82 ChangeLog 3152
-RMD160 a403d45c551c3331e28fc1417532a723164e951a ChangeLog 3152
-SHA256 10d73d8e6583c4988b25cf27170a506342c940bfea7a1271ca749dbb36c316f4 ChangeLog 3152
-MISC metadata.xml 241 RMD160 49452806ed5c451d97e1fa0ea2502e0eee3c41d6 SHA1 e9ba513731cedbbad85c4e23eead942b5c34ccc8 SHA256 62971ad1585c672fdea039fe2b299a5655375b23f78d7c2149901e2b29407bd3 size 241
MD5 0bba18e763cee72e6af83a6bc6e1db87 metadata.xml 241
-RMD160 49452806ed5c451d97e1fa0ea2502e0eee3c41d6 metadata.xml 241
-SHA256 62971ad1585c672fdea039fe2b299a5655375b23f78d7c2149901e2b29407bd3 metadata.xml 241
-MD5 f4aba49a377f0c83dc835a4831e4dcf8 files/digest-oops-1.5.24_pre20050503 512
-RMD160 eabf9ca7f832e3a75feae3f31d5ebc427cf77191 files/digest-oops-1.5.24_pre20050503 512
-SHA256 0a0c1cf95c181b9ac97b8cccf2de02faf359831d1c4cd66ef169d6d72fdb809d files/digest-oops-1.5.24_pre20050503 512
-MD5 f4aba49a377f0c83dc835a4831e4dcf8 files/digest-oops-1.5.24_pre20050503-r1 512
-RMD160 eabf9ca7f832e3a75feae3f31d5ebc427cf77191 files/digest-oops-1.5.24_pre20050503-r1 512
-SHA256 0a0c1cf95c181b9ac97b8cccf2de02faf359831d1c4cd66ef169d6d72fdb809d files/digest-oops-1.5.24_pre20050503-r1 512
+MD5 1896952664b334523486e8b4b974791c oops-1.5.24_pre20050503-r1.ebuild 2619
diff --git a/net-proxy/oops/files/digest-oops-1.5.24_pre20050503 b/net-proxy/oops/files/digest-oops-1.5.24_pre20050503
deleted file mode 100644
index f1fbcce3d239..000000000000
--- a/net-proxy/oops/files/digest-oops-1.5.24_pre20050503
+++ /dev/null
@@ -1,6 +0,0 @@
-MD5 bfa19752af517bb5a6cd746acf61064c oops-1.5.23.tar.gz 473290
-RMD160 295122ff9ce7e045cf7ddda035479056ba9e5881 oops-1.5.23.tar.gz 473290
-SHA256 b9ab7c0b5b11de7944f098d6f99158fe1b9c3b9cf82fe7827685c6cec8ccfa04 oops-1.5.23.tar.gz 473290
-MD5 8fbd0e763338eba31949d2a20217707a oops-1.5.24_pre20050503.patch.gz 101103
-RMD160 dffdc6842db8c78d87c26fe180302b56608f1f2e oops-1.5.24_pre20050503.patch.gz 101103
-SHA256 954e59d046096867a8e818bf47190ab06c8416abb80d151757825a664192aded oops-1.5.24_pre20050503.patch.gz 101103
diff --git a/net-proxy/oops/files/digest-oops-1.5.24_pre20050503-r1 b/net-proxy/oops/files/digest-oops-1.5.24_pre20050503-r1
index f1fbcce3d239..61ed89b1cbe4 100644
--- a/net-proxy/oops/files/digest-oops-1.5.24_pre20050503-r1
+++ b/net-proxy/oops/files/digest-oops-1.5.24_pre20050503-r1
@@ -1,6 +1,2 @@
MD5 bfa19752af517bb5a6cd746acf61064c oops-1.5.23.tar.gz 473290
-RMD160 295122ff9ce7e045cf7ddda035479056ba9e5881 oops-1.5.23.tar.gz 473290
-SHA256 b9ab7c0b5b11de7944f098d6f99158fe1b9c3b9cf82fe7827685c6cec8ccfa04 oops-1.5.23.tar.gz 473290
MD5 8fbd0e763338eba31949d2a20217707a oops-1.5.24_pre20050503.patch.gz 101103
-RMD160 dffdc6842db8c78d87c26fe180302b56608f1f2e oops-1.5.24_pre20050503.patch.gz 101103
-SHA256 954e59d046096867a8e818bf47190ab06c8416abb80d151757825a664192aded oops-1.5.24_pre20050503.patch.gz 101103
diff --git a/net-proxy/oops/files/modules-as-needed.patch b/net-proxy/oops/files/modules-as-needed.patch
new file mode 100644
index 000000000000..41703cd389ee
--- /dev/null
+++ b/net-proxy/oops/files/modules-as-needed.patch
@@ -0,0 +1,17 @@
+diff -Nru src/modules.orig/Makefile.in src/modules/Makefile.in
+--- src/modules.orig/Makefile.in 2006-05-20 01:28:11.000000000 +0300
++++ src/modules/Makefile.in 2006-05-20 01:29:11.827604500 +0300
+@@ -110,11 +110,11 @@
+
+ passwd_pgsql.so: passwd_sql.c ../modules.h ../oops.h
+ ${CC} ${CFLAGS} ${CDEFS} -D__PGSQL -c passwd_sql.c -o passwd_pgsql.o
+- ${LD} $(SOFLAGS) $(LDFLAGS) $(LIBS) -o passwd_pgsql.so passwd_pgsql.o $(PGSQL_LIB)
++ ${LD} $(SOFLAGS) $(LDFLAGS) -o passwd_pgsql.so passwd_pgsql.o $(LIBS) $(PGSQL_LIB)
+
+ passwd_mysql.so: passwd_sql.c ../modules.h ../oops.h
+ ${CC} ${CFLAGS} ${CDEFS} -D__MYSQL -c passwd_sql.c -o passwd_mysql.o
+- ${LD} $(SOFLAGS) $(LDFLAGS) $(LIBS) -o passwd_mysql.so passwd_mysql.o $(MYSQL_LIB)
++ ${LD} $(SOFLAGS) $(LDFLAGS) -o passwd_mysql.so passwd_mysql.o $(LIBS) $(MYSQL_LIB)
+
+ passwd_pgsql.o: passwd_sql.c ../modules.h ../oops.h
+ ${CC} ${CFLAGS} ${CDEFS} -D__PGSQL -c passwd_sql.c -o passwd_pgsql.o
diff --git a/net-proxy/oops/files/oops.cfg b/net-proxy/oops/files/oops.cfg
index 03dc19dc83c5..3dc96fad2331 100644
--- a/net-proxy/oops/files/oops.cfg
+++ b/net-proxy/oops/files/oops.cfg
@@ -1,9 +1,8 @@
##
-# nameservers. Use your own, not our.
+# nameservers. Multiple nameserver entries are allowed.
##
-nameserver 195.114.128.50
-nameserver 193.219.193.130
+nameserver 127.0.0.1
##
# Ports and address to use for HTTP and ICP
@@ -16,11 +15,10 @@ icp_port 3130
##
## Change euid to that user
##
-## WARNING: if you use 'userid, then you 'reconfigure will not be able to
-## open new sockets on reserved (< 1024) ports and will not be able
-## to return to original userid.
+## WARNING: if you use userid, then you will not be able to open new sockets on
+## reserved (< 1024) ports and will not be able to return to original userid.
##
-userid squid
+userid oops
##
## Change root directory. If don't know exactly what are you doing -
diff --git a/net-proxy/oops/oops-1.5.24_pre20050503-r1.ebuild b/net-proxy/oops/oops-1.5.24_pre20050503-r1.ebuild
index 86d5912efd41..9708dcfbb565 100644
--- a/net-proxy/oops/oops-1.5.24_pre20050503-r1.ebuild
+++ b/net-proxy/oops/oops-1.5.24_pre20050503-r1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2006 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-r1.ebuild,v 1.3 2006/04/25 03:11:36 weeve Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/oops/oops-1.5.24_pre20050503-r1.ebuild,v 1.4 2006/05/19 23:21:01 mrness Exp $
-inherit eutils
+inherit eutils flag-o-matic
MY_P="${PN}-1.5.23"
@@ -25,12 +25,18 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MY_P}"
+pkg_setup() {
+ enewgroup oops
+ enewuser oops -1 -1 /var/lib/oops oops
+}
+
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${WORKDIR}/${P}.patch"
epatch "${FILESDIR}/${P/_*}-textrel.patch"
+ epatch "${FILESDIR}/modules-as-needed.patch"
sed -i -e 's:/usr/local/lib/libpcre:/usr/lib/libpcre:g' configure
sed -i -e 's:y\.tab\.h:y.tab.c:' src/Makefile.in
}
@@ -39,7 +45,7 @@ src_compile() {
./configure \
--prefix=/usr \
--libdir=/usr/lib/oops \
- --enable-oops-user=squid \
+ --enable-oops-user=oops \
--sysconfdir=/etc/oops \
--sbindir=/usr/sbin \
--with-regexp=pcre \
@@ -55,47 +61,41 @@ src_compile() {
-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
+
emake || die "compile problem"
}
src_install() {
dodir /usr/sbin
einstall || die "install problem"
- fowners root:squid /etc/oops
- fperms 0750 /etc/oops
- exeinto /etc/init.d
- newexe "${FILESDIR}/oops.initd" "${PN}"
+ newinitd "${FILESDIR}/oops.initd" oops
+ diropts -m0750 -o root -g oops
+ dodir /etc/oops
insinto /etc/oops
doins "${FILESDIR}/oops.cfg"
- diropts -m0755 -o squid
- dodir /var/run/oops
- diropts -m0770 -o squid
- dodir /var/log/oops
- dodir /var/lib/oops
- dodir /var/lib/oops/storage
+ 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
- dodir /var/lib/oops/db
keepdir /var/lib/oops/db
# cleanups
rm -rf "${D}/usr/oops"
rm -rf "${D}/usr/lib/oops/modules"
+}
- # config files; if already exist, move them to *.eg
- cd "${D}/etc/oops"
- local x y
- for y in . tables ; do
- for x in "${y}"/* ; do
- if [ -f "${x}" ] ; then
- if [ -f "${ROOT}/etc/oops/${x}" ]; then
- mv "${x}" "${x}.eg"
- else
- cp "${x}" "${x}.eg"
- fi
- fi
- done
- done
+pkg_preinst() {
+ pkg_setup # create oops user and group
}
+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"
+}
diff --git a/net-proxy/oops/oops-1.5.24_pre20050503.ebuild b/net-proxy/oops/oops-1.5.24_pre20050503.ebuild
deleted file mode 100644
index 5d06c83d9f74..000000000000
--- a/net-proxy/oops/oops-1.5.24_pre20050503.ebuild
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 1999-2005 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.ebuild,v 1.2 2005/05/04 13:36:26 gustavoz Exp $
-
-inherit eutils
-
-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="x86 sparc"
-IUSE="mysql postgres"
-
-RDEPEND="virtual/libc
- dev-libs/libpcre
- >=sys-libs/db-3
- mysql? ( dev-db/mysql )
- postgres? ( dev-db/postgresql )"
-DEPEND="${RDEPEND}
- sys-devel/flex"
-
-S=${WORKDIR}/${MY_P}
-
-src_unpack() {
- unpack ${A}
-
- cd ${S}
- epatch ${WORKDIR}/${P}.patch
- sed -i -e 's:/usr/local/lib/libpcre:/usr/lib/libpcre:g' configure
- sed -i -e 's:y\.tab\.h:y.tab.c:' src/Makefile.in
-}
-
-src_compile() {
- ./configure \
- --prefix=/usr \
- --libdir=/usr/lib/oops \
- --enable-oops-user=squid \
- --sysconfdir=/etc/oops \
- --sbindir=/usr/sbin \
- --with-regexp=pcre \
- --localstatedir=/var/run/oops \
- --enable-large-files \
- || die "configure problem"
-
- cd src
- mv config.h.in config.h.in.orig
- sed <config.h.in.orig >config.h.in \
- -e '/STRERROR_R/d'
- mv Makefile Makefile.orig
- sed <Makefile.orig >Makefile \
- -e "s|OOPS_LIBDIR = /usr/lib/oops|OOPS_LIBDIR = ${D}/usr/lib/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|"
- cd ..
- emake || die "compile problem"
-}
-
-src_install() {
- dodir /usr/sbin
- chown squid:squid ${D}
- einstall || die "install problem"
- #chmod -R g+srw ${D}/etc/oops Remove this if proved to work without it
-
- exeinto /etc/init.d
- newexe ${FILESDIR}/oops.initd ${PN}
- insinto /etc/oops
- doins ${FILESDIR}/oops.cfg
-
- diropts -m0755 -o squid
- dodir /var/run/oops
- diropts -m0770 -o squid
- dodir /var/log/oops
- dodir /var/lib/oops
- dodir /var/lib/oops/storage
- keepdir /var/lib/oops/storage
- dodir /var/lib/oops/db
- keepdir /var/lib/oops/db
-
- # cleanups
- rm -rf ${D}/usr/oops
- rm -rf ${D}/usr/lib/oops/modules
-
- # config files; if already exist, move them to *.eg
- cd ${D}/etc/oops
- local x y
- for y in . tables ; do
- for x in ${y}/* ; do
- if [ -f ${x} ] ; then
- if [ -f ${ROOT}/etc/oops/${x} ]; then
- mv ${x} ${x}.eg
- else
- cp ${x} ${x}.eg
- fi
- fi
- done
- done
-}
-