diff options
author | 2014-03-27 09:36:02 +0000 | |
---|---|---|
committer | 2014-03-27 09:36:02 +0000 | |
commit | 775ed8eb3824b385c8116d98eef3838cde79bd24 (patch) | |
tree | cd92af6839a51155ecaa259f2b850c6931f2dfbd /app-misc | |
parent | Update net-analyzer/rrdtool-1.4.8 (diff) | |
download | srcshelton-775ed8eb3824b385c8116d98eef3838cde79bd24.tar.gz srcshelton-775ed8eb3824b385c8116d98eef3838cde79bd24.tar.bz2 srcshelton-775ed8eb3824b385c8116d98eef3838cde79bd24.zip |
Add app-misc/ca-certificates-20130906-r1 with Debian packaging files removed
Diffstat (limited to 'app-misc')
-rw-r--r-- | app-misc/ca-certificates/Manifest | 3 | ||||
-rw-r--r-- | app-misc/ca-certificates/ca-certificates-20130906-r1.ebuild | 98 | ||||
-rw-r--r-- | app-misc/ca-certificates/files/ca-certificates-20110502-root.patch | 110 |
3 files changed, 211 insertions, 0 deletions
diff --git a/app-misc/ca-certificates/Manifest b/app-misc/ca-certificates/Manifest new file mode 100644 index 00000000..c858e7d6 --- /dev/null +++ b/app-misc/ca-certificates/Manifest @@ -0,0 +1,3 @@ +AUX ca-certificates-20110502-root.patch 2942 SHA256 7f2273b748140c5806c37e954bb27846cb0b8bdddda15ba0f23d3fcae6e77e28 SHA512 972798239229d7d32b4e3c52a962f67db79eaafcbfac03683283861d2ed049daa5d2c77ef05343606afaed108bd8513c9aa588545049263ec8be598dfdb20d96 WHIRLPOOL 667d62670c3e498a69e46ba7d384fdacb37631ed887e7c4b110745905a8a28fdcc69e97778e1d177eb2ce68d724f0852e66f324025ecf059b1bc615c2cdf9d53 +DIST ca-certificates_20130906_all.deb 185064 SHA256 b2326834479192de2298c607bc020715c949cbd4dc5dd6be28a1b3f348eb9b76 SHA512 0410d11843e36fb488698a5ce7e1eda473b91d476c99d8e3bd006705167c9f2ac9a554e7fce1595f3717f1781a1390af345b3e7e4bc1e58c055e0a11321ececa WHIRLPOOL b9cf04b0e080752567a82c8fecffd033d10f19e41c0ecb1e676246947a34d1380002f9860539611dd79b04c47d19f6631a126c5887cff7ee52ff866b36c50109 +EBUILD ca-certificates-20130906-r1.ebuild 3177 SHA256 d553b7112bc4c803d3b5d67cb5327576b9f9b520cda90e614e65eb87698e5883 SHA512 54c5c4167f426ea44c7ed0fe99706032df2378a1c872157b360499661f5ab0ebc44f428b6d34a01c0d5daf4d4274e160f543136827c01364d4dbda5daf9ecb9d WHIRLPOOL 7173023d250994ba024d366b9677bbdb24387e8bbd46b650d15549d39b187ec58c8d21f1aaa9271b9949c2e0f15461e00cf274a60be912298c0f3a7cf499e46a diff --git a/app-misc/ca-certificates/ca-certificates-20130906-r1.ebuild b/app-misc/ca-certificates/ca-certificates-20130906-r1.ebuild new file mode 100644 index 00000000..8bee4dbd --- /dev/null +++ b/app-misc/ca-certificates/ca-certificates-20130906-r1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-misc/ca-certificates/ca-certificates-20130906-r1.ebuild,v 1.1 2014/03/27 00:49:50 zerochaos Exp $ + +EAPI="4" + +inherit eutils unpacker + +DESCRIPTION="Common CA Certificates PEM files" +HOMEPAGE="http://packages.debian.org/sid/ca-certificates" +#NMU_PR="1" +SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}${NMU_PR:++nmu}${NMU_PR}_all.deb" + +LICENSE="MPL-1.1" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" +IUSE="" + +# platforms like AIX don't have a good ar +DEPEND="kernel_AIX? ( app-arch/deb2targz ) + !<sys-apps/portage-2.1.10.41" +# openssl: we run `c_rehash` +# debianutils: we run `run-parts` +RDEPEND="${DEPEND} + dev-libs/openssl + sys-apps/debianutils" + +S=${WORKDIR} + +pkg_setup() { + # For the conversion to having it in CONFIG_PROTECT_MASK, + # we need to tell users about it once manually first. + [[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \ + || ewarn "You should run update-ca-certificates manually after etc-update" +} + +src_unpack() { + if [[ -n ${EPREFIX} ]] ; then + # need to perform everything in the offset, #381937 + mkdir -p "./${EPREFIX}" + cd "./${EPREFIX}" || die + fi + unpack_deb ${A} +} + +src_prepare() { + cd "./${EPREFIX}" || die + epatch "${FILESDIR}"/${PN}-20110502-root.patch + local relp=$(echo "${EPREFIX}" | sed -e 's:[^/]\+:..:g') + sed -i \ + -e '/="$ROOT/s:ROOT/:ROOT'"${EPREFIX}"'/:' \ + -e '/RELPATH="\.\./s:"$:'"${relp}"'":' \ + usr/sbin/update-ca-certificates || die +} + +src_compile() { + ( + echo "# Automatically generated by ${CATEGORY}/${PF}" + echo "# $(date -u)" + echo "# Do not edit." + cd "${S}${EPREFIX}"/usr/share/ca-certificates + find * -name '*.crt' | LC_ALL=C sort + ) > "${S}${EPREFIX}"/etc/ca-certificates.conf + + sh "${S}${EPREFIX}"/usr/sbin/update-ca-certificates --root "${S}" || die +} + +src_install() { + cp -pPR . "${D}"/ || die + + rm -r \ + "${ED}"/usr/share/doc/ca-certificates/examples \ + "${ED}"/usr/share/doc/ca-certificates/NEWS.Debian* + mv "${ED}"/usr/share/doc/{ca-certificates,${PF}} || die + + echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates + doenvd 98ca-certificates +} + +pkg_postinst() { + if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then + # if the user has local certs, we need to rebuild again + # to include their stuff in the db. + # However it's too overzealous when the user has custom certs in place. + # --fresh is to clean up dangling symlinks + "${EROOT}"/usr/sbin/update-ca-certificates --root "${EROOT}" + fi + + local c badcerts=0 + for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do + ewarn "Broken symlink for a certificate at $c" + badcerts=1 + done + if [ $badcerts -eq 1 ]; then + ewarn "Removing the following broken symlinks:" + ewarn "$(find -L "${EROOT}"/etc/ssl/certs/ -type l -printf '%p -> %l\n' -delete)" + fi +} diff --git a/app-misc/ca-certificates/files/ca-certificates-20110502-root.patch b/app-misc/ca-certificates/files/ca-certificates-20110502-root.patch new file mode 100644 index 00000000..f3fcf5d5 --- /dev/null +++ b/app-misc/ca-certificates/files/ca-certificates-20110502-root.patch @@ -0,0 +1,110 @@ +--- a/usr/sbin/update-ca-certificates ++++ b/usr/sbin/update-ca-certificates +@@ -23,6 +23,8 @@ + + verbose=0 + fresh=0 ++ROOT="" ++RELPATH="" + while [ $# -gt 0 ]; + do + case $1 in +@@ -30,6 +31,11 @@ + verbose=1;; + --fresh|-f) + fresh=1;; ++ --root|-r) ++ ROOT=$(readlink -f "$2") ++ # needed as c_rehash wants to read the files directly ++ RELPATH="../../.." ++ shift;; + --help|-h|*) +- echo "$0: [--verbose] [--fresh]" ++ echo "$0: [--verbose] [--fresh] [--root <dir>]" + exit;; +@@ -37,11 +41,11 @@ + shift + done + +-CERTSCONF=/etc/ca-certificates.conf +-CERTSDIR=/usr/share/ca-certificates +-LOCALCERTSDIR=/usr/local/share/ca-certificates ++CERTSCONF="$ROOT/etc/ca-certificates.conf" ++CERTSDIR="$ROOT/usr/share/ca-certificates" ++LOCALCERTSDIR="$ROOT/usr/local/share/ca-certificates" + CERTBUNDLE=ca-certificates.crt +-ETCCERTSDIR=/etc/ssl/certs ++ETCCERTSDIR="$ROOT/etc/ssl/certs" + + cleanup() { + rm -f "$TEMPBUNDLE" +@@ -66,7 +70,7 @@ + -e 's/,/_/g').pem" + if ! test -e "$PEM" || [ "$(readlink "$PEM")" != "$CERT" ] + then +- ln -sf "$CERT" "$PEM" ++ ln -sf "${RELPATH}${CERT#$ROOT}" "$PEM" + echo +$PEM >> "$ADDED" + fi + cat "$CERT" >> "$TEMPBUNDLE" +@@ -78,22 +82,22 @@ + if test -L "$PEM" + then + rm -f "$PEM" +- echo -$PEM >> "$REMOVED" ++ echo "-$PEM" >> "$REMOVED" + fi + } + +-cd $ETCCERTSDIR ++cd "$ETCCERTSDIR" + if [ "$fresh" = 1 ]; then + echo -n "Clearing symlinks in $ETCCERTSDIR..." + find . -type l -print | while read symlink + do +- case $(readlink $symlink) in +- $CERTSDIR*) rm -f $symlink;; ++ case $(readlink "$symlink") in ++ "$CERTSDIR"*) rm -f "$symlink";; + esac + done + find . -type l -print | while read symlink + do +- test -f $symlink || rm -f $symlink ++ test -f "$symlink" || rm -f "$symlink" + done + echo "done." + fi +@@ -102,12 +106,12 @@ + + # Handle certificates that should be removed. This is an explicit act + # by prefixing lines in the configuration files with exclamation marks (!). +-sed -n -e '/^$/d' -e 's/^!//p' $CERTSCONF | while read crt ++sed -n -e '/^$/d' -e 's/^!//p' "$CERTSCONF" | while read crt + do + remove "$CERTSDIR/$crt" + done + +-sed -e '/^$/d' -e '/^#/d' -e '/^!/d' $CERTSCONF | while read crt ++sed -e '/^$/d' -e '/^#/d' -e '/^!/d' "$CERTSCONF" | while read crt + do + if ! test -f "$CERTSDIR/$crt" + then +@@ -146,14 +150,14 @@ + + echo "$ADDED_CNT added, $REMOVED_CNT removed; done." + +-HOOKSDIR=/etc/ca-certificates/update.d ++HOOKSDIR="$ROOT/etc/ca-certificates/update.d" + echo -n "Running hooks in $HOOKSDIR...." + VERBOSE_ARG= + [ "$verbose" = 0 ] || VERBOSE_ARG=--verbose +-eval run-parts $VERBOSE_ARG --test -- $HOOKSDIR | while read hook ++eval run-parts $VERBOSE_ARG --test -- \""$HOOKSDIR"\" | while read hook + do + ( cat $ADDED +- cat $REMOVED ) | $hook || echo E: $hook exited with code $?. ++ cat $REMOVED ) | "$hook" || echo E: "$hook" exited with code $?. + done + echo "done." + |