diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2010-06-18 06:23:55 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2010-06-18 06:23:55 +0000 |
commit | 7576babbff002010ded3d519a3f287d589d39a60 (patch) | |
tree | 452d83e2adfd0c8d4205d6c3992c41be94d43ccb /sys-libs/nss-db | |
parent | Version Bump (diff) | |
download | gentoo-2-7576babbff002010ded3d519a3f287d589d39a60.tar.gz gentoo-2-7576babbff002010ded3d519a3f287d589d39a60.tar.bz2 gentoo-2-7576babbff002010ded3d519a3f287d589d39a60.zip |
Bug #308163: avoid sandbox more.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs/nss-db')
-rw-r--r-- | sys-libs/nss-db/ChangeLog | 10 | ||||
-rw-r--r-- | sys-libs/nss-db/files/sandbox.d_50nss-db | 1 | ||||
-rw-r--r-- | sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild | 112 |
3 files changed, 121 insertions, 2 deletions
diff --git a/sys-libs/nss-db/ChangeLog b/sys-libs/nss-db/ChangeLog index 3d7d6666b989..df2bccdcd303 100644 --- a/sys-libs/nss-db/ChangeLog +++ b/sys-libs/nss-db/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-libs/nss-db -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/nss-db/ChangeLog,v 1.21 2009/12/08 19:03:52 nixnut Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/nss-db/ChangeLog,v 1.22 2010/06/18 06:23:55 robbat2 Exp $ + +*nss-db-2.2.3_pre1-r3 (18 Jun 2010) + + 18 Jun 2010; Robin H. Johnson <robbat2@gentoo.org> + +nss-db-2.2.3_pre1-r3.ebuild, +files/sandbox.d_50nss-db: + Bug #308163: avoid sandbox more. 08 Dec 2009; nixnut <nixnut@gentoo.org> nss-db-2.2.3_pre1-r2.ebuild: ppc stable #291811 diff --git a/sys-libs/nss-db/files/sandbox.d_50nss-db b/sys-libs/nss-db/files/sandbox.d_50nss-db new file mode 100644 index 000000000000..f8cfba24dd74 --- /dev/null +++ b/sys-libs/nss-db/files/sandbox.d_50nss-db @@ -0,0 +1 @@ +SANDBOX_PREDICT="/var/db/aliases.db:/var/db/automount.db:/var/db/bootparams.db:/var/db/ethers.db:/var/db/group.db:/var/db/hosts.db:/var/db/netgroup.db:/var/db/netmasks.db:/var/db/networks.db:/var/db/passwd.db:/var/db/protocols.db:/var/db/rpc.db:/var/db/services.db:/var/db/shadow.db" diff --git a/sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild b/sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild new file mode 100644 index 000000000000..5af04ae64ed7 --- /dev/null +++ b/sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/nss-db/nss-db-2.2.3_pre1-r3.ebuild,v 1.1 2010/06/18 06:23:55 robbat2 Exp $ + +inherit eutils versionator multilib autotools + +MY_PN="${PN/-/_}" +MY_PV="${PV/_}" +MY_P="${MY_PN}-${MY_PV}" + +DESCRIPTION="Allows important system files to be stored in a fast database file rather than plain text" +HOMEPAGE="http://sources.redhat.com/glibc/" +SRC_URI="ftp://sources.redhat.com/pub/glibc/old-releases/${MY_P}.tar.gz + mirror://gentoo/${MY_P}-external.patch.bz2 + mirror://gentoo/${MY_P}-dbupgrade.patch.bz2 + mirror://gentoo/${MY_P}-dbopen.patch.bz2" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="nls" + +# awk and make ARE needed at runtime! +# and this didn't compile on BSD libc either +RDEPEND=">=sys-libs/db-4 + sys-apps/gawk + sys-devel/make + >=sys-libs/glibc-2.3" +# We really do need gettext to compile always :-( +DEPEND="${RDEPEND} + sys-devel/gettext" + +S="${WORKDIR}/${MY_P}" + +db_getver() { + local DBPKG + DBPKG="$(best_version '>=sys-libs/db-4')" + echo "${DBPKG//sys-libs\/db-}" +} + +db_getversym() { + local DBVER DBSYMSUFFIX + [ -n "${1}" ] && DBVER="${1}" || DBVER="$(db_getver)" + DBVER=($(get_version_components "${DBVER}")) + if has_version '>=sys-libs/db-4.3'; then + DBSYMSUFFIX="" + else + let DBSYMSUFFIX=(${DBVER[0]}*1000)+${DBVER[1]} + DBSYMSUFFIX=_${DBSYMSUFFIX} + fi + echo "${DBSYMSUFFIX}" +} + +src_unpack() { + unpack ${MY_P}.tar.gz + EPATCH_OPTS="-p1 -d ${S}" epatch ${DISTDIR}/${MY_P}-external.patch.bz2 + EPATCH_OPTS="-p0 -d ${S}" epatch ${DISTDIR}/${MY_P}-dbupgrade.patch.bz2 + EPATCH_OPTS="-p1 -d ${S}" epatch ${DISTDIR}/${MY_P}-dbopen.patch.bz2 + EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/${P}-root-upgrade-only.patch + + # make sure we use the correct version of DB + cd "${S}" + DB_PV="$(db_getver)" + DB_SYM="$(db_getversym ${DB_PV})" + DB_PV_MAJORMINOR="$(get_version_component_range 1-2 ${DB_PV})" + sed -i configure.in \ + -e "s!db.h!db${DB_PV_MAJORMINOR}/db.h!g" \ + -e "s!db, db_version!db-${DB_PV_MAJORMINOR}, db_version${DB_SYM}!g" + + # fix ancient broken-ness + for f in po/Makefile.in.in ./intl/Makefile.in; do + egrep -q '^mkinstalldirs = .*case.*esac' ${f} && \ + sed -i ${f} \ + -e '/^mkinstalldirs = /s,\(mkinstalldirs =\).*,\1 $(top_builddir)/./mkinstalldirs,' + done + + # Fixes thanks to Flameeyes + # missing + cp /usr/share/gettext/config.rpath . + sed -i -e '/makedb_LDADD/i makedb_CFLAGS=$(AM_CFLAGS)' src/Makefile.am + sed -i -e '/AC_PROG_CC/a AC_PROG_CC_C_O' configure.in + eautoreconf + + # This is an evil target and we don't like it + sed -i -e '/^install-data-am:.*install-data-local/s,install-data-local,,g' "${S}"/src/Makefile.in +} + +src_compile() { + econf -C --libdir=/$(get_libdir) `use_enable nls` || die + emake || die +} + +src_install() { + emake -j1 DESTDIR="${D}" slibdir="/$(get_libdir)" install || \ + die "failed emake install" + + into /usr + insinto /usr/share/${PN} + doins db-Makefile + + exeinto /usr/sbin + doexe "${FILESDIR}"/remake-all-db + + dodoc AUTHORS COPYING* ChangeLog INSTALL NEWS README THANKS + + dodir /usr/$(get_libdir)/ + mv "${D}"/$(get_libdir)/*.la "${D}"/usr/$(get_libdir)/ || \ + die "failed to set up .la" + + insinto /etc/sandbox.d/ + newins "${FILESDIR}"/sandbox.d_50nss-db 50nss-db +} |