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-r2.ebuild
Date: Fri, 02 Sep 2011 17:47:28
Message-Id: 20110902174718.0270D20051@flycatcher.gentoo.org
1 vapier 11/09/02 17:47:17
2
3 Modified: ChangeLog
4 Added: ca-certificates-20110502-r2.ebuild
5 Log:
6 Move the config file generation to src_compile for most people to make binpkgs easier to deploy.
7
8 (Portage version: 2.2.0_alpha51/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.47 app-misc/ca-certificates/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/ca-certificates/ChangeLog?rev=1.47&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/ca-certificates/ChangeLog?rev=1.47&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/ca-certificates/ChangeLog?r1=1.46&r2=1.47
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/app-misc/ca-certificates/ChangeLog,v
20 retrieving revision 1.46
21 retrieving revision 1.47
22 diff -u -r1.46 -r1.47
23 --- ChangeLog 1 Sep 2011 14:14:07 -0000 1.46
24 +++ ChangeLog 2 Sep 2011 17:47:17 -0000 1.47
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.46 2011/09/01 14:14:07 chainsaw Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/app-misc/ca-certificates/ChangeLog,v 1.47 2011/09/02 17:47:17 vapier Exp $
30 +
31 +*ca-certificates-20110502-r2 (02 Sep 2011)
32 +
33 + 02 Sep 2011; Mike Frysinger <vapier@g.o>
34 + +files/ca-certificates-20090709-root.patch,
35 + +ca-certificates-20110502-r2.ebuild:
36 + Move the config file generation to src_compile for most people to make
37 + binpkgs easier to deploy.
38
39 01 Sep 2011; Tony Vroon <chainsaw@g.o>
40 ca-certificates-20110502-r1.ebuild:
41
42
43
44 1.1 app-misc/ca-certificates/ca-certificates-20110502-r2.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/ca-certificates/ca-certificates-20110502-r2.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/ca-certificates/ca-certificates-20110502-r2.ebuild?rev=1.1&content-type=text/plain
48
49 Index: ca-certificates-20110502-r2.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-r2.ebuild,v 1.1 2011/09/02 17:47:17 vapier Exp $
54
55 EAPI="2"
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 ~sparc-fbsd ~x86-fbsd"
66 IUSE=""
67
68 DEPEND="|| ( >=sys-apps/coreutils-6.10-r1 sys-apps/mktemp sys-freebsd/freebsd-ubin )"
69 RDEPEND="${DEPEND}
70 dev-libs/openssl
71 sys-apps/debianutils"
72
73 S=${WORKDIR}
74
75 pkg_setup() {
76 # For the conversion to having it in CONFIG_PROTECT_MASK,
77 # we need to tell users about it once manually first.
78 [[ -f /etc/env.d/98ca-certificates ]] \
79 || ewarn "You should run update-ca-certificates manually after etc-update"
80 }
81
82 src_unpack() {
83 unpack ${A}
84 unpack ./data.tar.gz
85 rm -f control.tar.gz data.tar.gz debian-binary
86 }
87
88 src_prepare() {
89 epatch "${FILESDIR}"/${PN}-20090709-root.patch
90 }
91
92 src_compile() {
93 (
94 echo "# Automatically generated by ${CATEGORY}/${PF}"
95 echo "# $(date -u)"
96 echo "# Do not edit."
97 cd "${S}"/usr/share/ca-certificates
98 find * -name '*.crt' | LC_ALL=C sort
99 ) > "${S}"/etc/ca-certificates.conf
100
101 "${S}"/usr/sbin/update-ca-certificates --root "${S}"
102 }
103
104 src_install() {
105 cp -pPR * "${D}"/ || die
106
107 mv "${D}"/usr/share/doc/{ca-certificates,${PF}} || die
108 prepalldocs
109
110 echo 'CONFIG_PROTECT_MASK="/etc/ca-certificates.conf"' > 98ca-certificates
111 doenvd 98ca-certificates
112 }
113
114 pkg_postinst() {
115 if [ -d "${ROOT}/usr/local/share/ca-certificates" ] ; then
116 # if the user has local certs, we need to rebuild again
117 # to include their stuff in the db.
118 # However it's too overzealous when the user has custom certs in place.
119 # --fresh is to clean up dangling symlinks
120 "${ROOT}"/usr/sbin/update-ca-certificates --root "${ROOT}"
121 fi
122
123 local c badcerts=0
124 for c in $(find -L "${ROOT}"etc/ssl/certs/ -type l) ; do
125 ewarn "Broken symlink for a certificate at $c"
126 badcerts=1
127 done
128 if [ $badcerts -eq 1 ]; then
129 ewarn "You MUST remove the above broken symlinks"
130 ewarn "Otherwise any SSL validation that use the directory may fail!"
131 ewarn "To batch-remove them, run:"
132 ewarn "find -L ${ROOT}etc/ssl/certs/ -type l -exec rm {} +"
133 fi
134 }