diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2005-07-03 15:01:32 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2005-07-03 15:01:32 +0000 |
commit | 5dde767c5634324fc9e61f079d038cdd827c0d0f (patch) | |
tree | 55320d29cc032266b8aaa8ba99db4da3fb388fb3 /sys-libs/nss-db | |
parent | Removing outdated ebuild (diff) | |
download | historical-5dde767c5634324fc9e61f079d038cdd827c0d0f.tar.gz historical-5dde767c5634324fc9e61f079d038cdd827c0d0f.tar.bz2 historical-5dde767c5634324fc9e61f079d038cdd827c0d0f.zip |
Add small patch to only use db->update when root privileges are present.
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'sys-libs/nss-db')
-rw-r--r-- | sys-libs/nss-db/ChangeLog | 9 | ||||
-rw-r--r-- | sys-libs/nss-db/Manifest | 5 | ||||
-rw-r--r-- | sys-libs/nss-db/files/digest-nss-db-2.2.3_pre1-r1 | 4 | ||||
-rw-r--r-- | sys-libs/nss-db/files/nss-db-2.2.3_pre1-root-upgrade-only.patch | 27 | ||||
-rw-r--r-- | sys-libs/nss-db/nss-db-2.2.3_pre1-r1.ebuild | 98 |
5 files changed, 141 insertions, 2 deletions
diff --git a/sys-libs/nss-db/ChangeLog b/sys-libs/nss-db/ChangeLog index d99515102c7f..07e80eb5784a 100644 --- a/sys-libs/nss-db/ChangeLog +++ b/sys-libs/nss-db/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-libs/nss-db # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/nss-db/ChangeLog,v 1.7 2005/02/16 11:04:36 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/nss-db/ChangeLog,v 1.8 2005/07/03 15:01:32 robbat2 Exp $ + +*nss-db-2.2.3_pre1-r1 (03 Jul 2005) + + 03 Jul 2005; Robin H. Johnson <robbat2@gentoo.org> + +files/nss-db-2.2.3_pre1-root-upgrade-only.patch, + +nss-db-2.2.3_pre1-r1.ebuild: + Add small patch to only use db->update when root privileges are present. *nss-db-2.2.3_pre1 (16 Feb 2005) diff --git a/sys-libs/nss-db/Manifest b/sys-libs/nss-db/Manifest index 303470303c4e..6ada8f30bb5f 100644 --- a/sys-libs/nss-db/Manifest +++ b/sys-libs/nss-db/Manifest @@ -1,8 +1,11 @@ MD5 f16cb958d7aa84151d64918c033ae2c9 nss-db-2.2.3_pre1.ebuild 2658 MD5 610312df9caa3ff32a3b73dc9430e21f nss-db-2.2-r1.ebuild 1021 -MD5 5e67d826cdf5f2d64ff67a8aa6f6a01a ChangeLog 1283 +MD5 8ec22c0b845ecfd92c2877ff4bad56e9 nss-db-2.2.3_pre1-r1.ebuild 2762 +MD5 0e22ff73b41884de0e50a7f18866171f ChangeLog 1533 MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 MD5 597edf0286c0a43308c48b9f7112e798 files/remake-all-db 233 +MD5 bfa0ad4e21b3a2d1a8ee63b734c67bc0 files/nss-db-2.2.3_pre1-root-upgrade-only.patch 706 MD5 b5919430d82230e5d31c30d730da9149 files/digest-nss-db-2.2.3_pre1 299 MD5 03cdab663eb8542cea7c07707d596740 files/db3.patch 1174 MD5 ca50c2850faf4fa26fcf5dd10838aab9 files/digest-nss-db-2.2-r1 62 +MD5 b5919430d82230e5d31c30d730da9149 files/digest-nss-db-2.2.3_pre1-r1 299 diff --git a/sys-libs/nss-db/files/digest-nss-db-2.2.3_pre1-r1 b/sys-libs/nss-db/files/digest-nss-db-2.2.3_pre1-r1 new file mode 100644 index 000000000000..df79771ab5d6 --- /dev/null +++ b/sys-libs/nss-db/files/digest-nss-db-2.2.3_pre1-r1 @@ -0,0 +1,4 @@ +MD5 b4440ba2865d28e9068e465426c19ede nss_db-2.2.3pre1.tar.gz 235360 +MD5 ec455e427bf7bf4daba3427fd4066db3 nss_db-2.2.3pre1-external.patch.bz2 1870 +MD5 d02a1a231c70e28320ed21e883be4d6a nss_db-2.2.3pre1-dbupgrade.patch.bz2 263 +MD5 e26590083b9f32d2c134d204ba0ad72e nss_db-2.2.3pre1-dbopen.patch.bz2 258 diff --git a/sys-libs/nss-db/files/nss-db-2.2.3_pre1-root-upgrade-only.patch b/sys-libs/nss-db/files/nss-db-2.2.3_pre1-root-upgrade-only.patch new file mode 100644 index 000000000000..e2db2342e2a4 --- /dev/null +++ b/sys-libs/nss-db/files/nss-db-2.2.3_pre1-root-upgrade-only.patch @@ -0,0 +1,27 @@ +diff -NuarwbB nss_db-2.2.3pre1.orig/src/db-compat.c nss_db-2.2.3pre1/src/db-compat.c +--- nss_db-2.2.3pre1.orig/src/db-compat.c 2005-06-07 00:08:39.000000000 -0700 ++++ nss_db-2.2.3pre1/src/db-compat.c 2005-06-07 00:53:00.000000000 -0700 +@@ -20,6 +20,9 @@ + #include <assert.h> + #include <db.h> + #include <fcntl.h> ++#include <unistd.h> ++#include <sys/types.h> ++ + + #if DB_VERSION_MAJOR > 2 + +@@ -39,8 +42,13 @@ + if (err) + return err; + ++ uid_t uid = geteuid(); ++ ++ if(uid == 0) { + /* Make sure we upgrade, in case this is an older database */ ++ /* However we need root access to do so */ + db->upgrade(db, file, 0); ++ } + + err = db->open (db, NULL, file, NULL, type, flags, mode); + if (err) diff --git a/sys-libs/nss-db/nss-db-2.2.3_pre1-r1.ebuild b/sys-libs/nss-db/nss-db-2.2.3_pre1-r1.ebuild new file mode 100644 index 000000000000..e124856cc5d7 --- /dev/null +++ b/sys-libs/nss-db/nss-db-2.2.3_pre1-r1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2005 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-r1.ebuild,v 1.1 2005/07/03 15:01:32 robbat2 Exp $ + +inherit eutils versionator multilib + +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/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="~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" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext ) + sys-devel/autoconf + sys-apps/sed" + +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}")) + let DBSYMSUFFIX=(${DBVER[0]}*1000)+${DBVER[1]} + 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 + + # apply stuff + libtoolize --copy --force + export WANT_AUTOMAKE="1.4" + export WANT_AUTOCONF="2.5" + automake --add-missing || die "automake failed" + aclocal || die "aclocal failed" + autoconf || die "autoconf failed" +} + +src_compile() { + econf -C --libdir=/$(get_libdir) `use_enable nls` || die + emake || die +} + +src_install() { + emake DESTDIR="${D}" install + + into /usr + insinto /usr/share/${PN} + doins db-Makefile + + exeinto /usr/sbin + doexe ${FILESDIR}/remake-all-db + + dodoc ABOUT-NLS AUTHORS COPYING* ChangeLog INSTALL NEWS README THANKS +} |