Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-misc/ca-certificates: ChangeLog ca-certificates-20110502-r4.ebuild
Date: Wed, 07 Sep 2011 01:47:59
Message-Id: 20110907014748.3C7C62004C@flycatcher.gentoo.org
1 vapier 11/09/07 01:47:48
2
3 Modified: ChangeLog
4 Added: ca-certificates-20110502-r4.ebuild
5 Log:
6 Generate relative symlinks to certs when using --root so c_rehash works properly.
7
8 (Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.55 app-misc/ca-certificates/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/ca-certificates/ChangeLog?rev=1.55&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/ca-certificates/ChangeLog?rev=1.55&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/ca-certificates/ChangeLog?r1=1.54&r2=1.55
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-misc/ca-certificates/ChangeLog,v
20 retrieving revision 1.54
21 retrieving revision 1.55
22 diff -u -r1.54 -r1.55
23 --- ChangeLog 7 Sep 2011 00:39:11 -0000 1.54
24 +++ ChangeLog 7 Sep 2011 01:47:48 -0000 1.55
25 @@ -1,6 +1,14 @@
26 # ChangeLog for app-misc/ca-certificates
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/app-misc/ca-certificates/ChangeLog,v 1.54 2011/09/07 00:39:11 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-misc/ca-certificates/ChangeLog,v 1.55 2011/09/07 01:47:48 vapier Exp $
30 +
31 +*ca-certificates-20110502-r4 (07 Sep 2011)
32 +
33 + 07 Sep 2011; Mike Frysinger <vapier@g.o>
34 + +ca-certificates-20110502-r4.ebuild,
35 + +files/ca-certificates-20110502-root.patch:
36 + Generate relative symlinks to certs when using --root so c_rehash works
37 + properly.
38
39 07 Sep 2011; Mike Frysinger <vapier@g.o>
40 ca-certificates-20110502-r3.ebuild:
41
42
43
44 1.1 app-misc/ca-certificates/ca-certificates-20110502-r4.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/ca-certificates/ca-certificates-20110502-r4.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/ca-certificates/ca-certificates-20110502-r4.ebuild?rev=1.1&content-type=text/plain
48
49 Index: ca-certificates-20110502-r4.ebuild
50 ===================================================================
51 # Copyright 1999-2011 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/app-misc/ca-certificates/ca-certificates-20110502-r4.ebuild,v 1.1 2011/09/07 01:47:48 vapier Exp $
54
55 EAPI="3"
56
57 inherit eutils
58
59 DESCRIPTION="Common CA Certificates PEM files"
60 HOMEPAGE="http://packages.debian.org/sid/ca-certificates"
61 SRC_URI="mirror://debian/pool/main/c/${PN}/${PN}_${PV}+nmu1_all.deb"
62
63 LICENSE="MPL-1.1"
64 SLOT="0"
65 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
66 IUSE=""
67
68 # platforms like AIX don't have a good ar
69 DEPEND="kernel_AIX? ( app-arch/deb2targz )"
70 # openssl: we run `c_rehash`
71 # debianutils: we run `run-parts`
72 RDEPEND="${DEPEND}
73 dev-libs/openssl
74 sys-apps/debianutils"
75
76 S=${WORKDIR}
77
78 pkg_setup() {
79 # For the conversion to having it in CONFIG_PROTECT_MASK,
80 # we need to tell users about it once manually first.
81 [[ -f "${EPREFIX}"/etc/env.d/98ca-certificates ]] \
82 || ewarn "You should run update-ca-certificates manually after etc-update"
83 }
84
85 src_unpack() {
86 if [[ -n ${EPREFIX} ]] ; then
87 # need to perform everything in the offset, #381937
88 mkdir -p "./${EPREFIX}"
89 cd "./${EPREFIX}" || die
90 fi
91 unpack ${A}
92 unpack ./data.tar.gz
93 rm -f control.tar.gz data.tar.gz debian-binary
94 }
95
96 src_prepare() {
97 cd "./${EPREFIX}" || die
98 epatch "${FILESDIR}"/${PN}-20110502-root.patch
99 sed -i -e '/="$ROOT/s:ROOT/:ROOT'"${EPREFIX}"'/:' \
100 usr/sbin/update-ca-certificates || die
101 }
102
103 src_compile() {
104 (
105 echo "# Automatically generated by ${CATEGORY}/${PF}"
106 echo "# $(date -u)"
107 echo "# Do not edit."
108 cd "${S}${EPREFIX}"/usr/share/ca-certificates
109 find * -name '*.crt' | LC_ALL=C sort
110 ) > "${S}${EPREFIX}"/etc/ca-certificates.conf
111
112 "${S}${EPREFIX}"/usr/sbin/update-ca-certificates --root "${S}" || die
113 }
114
115 src_install() {
116 cp -pPR * "${D}"/ || die
117
118 mv "${ED}"/usr/share/doc/{ca-certificates,${PF}} || die
119 prepalldocs
120
121 echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
122 doenvd 98ca-certificates
123 }
124
125 pkg_postinst() {
126 if [ -d "${EROOT}/usr/local/share/ca-certificates" ] ; then
127 # if the user has local certs, we need to rebuild again
128 # to include their stuff in the db.
129 # However it's too overzealous when the user has custom certs in place.
130 # --fresh is to clean up dangling symlinks
131 "${EROOT}"/usr/sbin/update-ca-certificates --root "${EROOT}"
132 fi
133
134 local c badcerts=0
135 for c in $(find -L "${EROOT}"etc/ssl/certs/ -type l) ; do
136 ewarn "Broken symlink for a certificate at $c"
137 badcerts=1
138 done
139 if [ $badcerts -eq 1 ]; then
140 ewarn "You MUST remove the above broken symlinks"
141 ewarn "Otherwise any SSL validation that use the directory may fail!"
142 ewarn "To batch-remove them, run:"
143 ewarn "find -L ${EROOT}etc/ssl/certs/ -type l -exec rm {} +"
144 fi
145 }