Gentoo Archives: gentoo-commits

From: "Ulrich Mueller (ulm)" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: elisp-common.eclass elisp.eclass ssl-cert.eclass
Date: Fri, 28 Dec 2007 17:48:40
Message-Id: E1J8JJz-0003lx-9n@stork.gentoo.org
1 ulm 07/12/28 17:48:35
2
3 Modified: elisp-common.eclass elisp.eclass ssl-cert.eclass
4 Log:
5 Sync eclasses from Emacs overlay (revision 894).
6
7 elisp-common.eclass:
8 Install packages' site-init files in site-gentoo.d subdirectory.
9 Update documentation and einfo messages accordingly.
10
11 Revision Changes Path
12 1.34 eclass/elisp-common.eclass
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.34&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?rev=1.34&content-type=text/plain
16 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp-common.eclass?r1=1.33&r2=1.34
17
18 Index: elisp-common.eclass
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v
21 retrieving revision 1.33
22 retrieving revision 1.34
23 diff -u -r1.33 -r1.34
24 --- elisp-common.eclass 12 Dec 2007 21:58:57 -0000 1.33
25 +++ elisp-common.eclass 28 Dec 2007 17:48:34 -0000 1.34
26 @@ -1,11 +1,11 @@
27 # Copyright 1999-2007 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 -# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.33 2007/12/12 21:58:57 ulm Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/eclass/elisp-common.eclass,v 1.34 2007/12/28 17:48:34 ulm Exp $
31 #
32 -# Copyright 2007 Christian Faulhammer <opfer@g.o>
33 # Copyright 2002-2004 Matthew Kennedy <mkennedy@g.o>
34 -# Copyright 2004-2005 Mamoru Komachi <usata@g.o>
35 # Copyright 2003 Jeremy Maitin-Shepard <jbms@×××××.com>
36 +# Copyright 2004-2005 Mamoru Komachi <usata@g.o>
37 +# Copyright 2007 Christian Faulhammer <opfer@g.o>
38 # Copyright 2007 Ulrich Mueller <ulm@g.o>
39 #
40 # @ECLASS: elisp-common.eclass
41 @@ -200,7 +200,7 @@
42 # Output version of currently active Emacs.
43
44 elisp-emacs-version() {
45 - # The following will work for at least versions 18-23.
46 + # The following will work for at least versions 18--23.
47 echo "(princ emacs-version)" >"${T}"/emacs-version.el
48 ${EMACS} ${EMACSFLAGS} -l "${T}"/emacs-version.el
49 }
50 @@ -262,28 +262,28 @@
51 # Install Emacs site-init file in SITELISP directory.
52
53 elisp-site-file-install() {
54 - local sf="$1" my_pn="${2:-${PN}}"
55 + local sf="${1##*/}" my_pn="${2:-${PN}}"
56 ebegin "Installing site initialisation file for GNU Emacs"
57 - cp "${sf}" "${T}"
58 + cp "$1" "${T}/${sf}"
59 sed -i -e "s:@SITELISP@:${SITELISP}/${my_pn}:g" \
60 - -e "s:@SITEETC@:${SITEETC}/${my_pn}:g" "${T}/${sf##*/}"
61 + -e "s:@SITEETC@:${SITEETC}/${my_pn}:g" "${T}/${sf}"
62 ( # subshell to avoid pollution of calling environment
63 - insinto "${SITELISP}"
64 - doins "${T}/${sf##*/}"
65 + insinto "${SITELISP}/site-gentoo.d"
66 + doins "${T}/${sf}"
67 )
68 eend $? "doins failed"
69 }
70
71 # @FUNCTION: elisp-site-regen
72 # @DESCRIPTION:
73 -# Regenerate site-gentoo.el file.
74 -
75 -# Old location for site initialisation files of packages was
76 -# /usr/share/emacs/site-lisp/. It is planned to change this to
77 -# /usr/share/emacs/site-lisp/site-gentoo.d/.
78 +# Regenerate site-gentoo.el file. The old location for site initialisation
79 +# files of packages was /usr/share/emacs/site-lisp/. In December 2007 this
80 +# has been changed to /usr/share/emacs/site-lisp/site-gentoo.d/. Remerge of
81 +# packages with Emacs support is enough, the old location is still supported
82 +# when generating the start-up file.
83
84 elisp-site-regen() {
85 - local i sf line
86 + local i sf line obsolete
87 local -a sflist
88
89 if [ ! -e "${ROOT}${SITELISP}"/site-gentoo.el ] \
90 @@ -324,6 +324,8 @@
91 sflist[i]=${sflist[i-1]}
92 done
93 sflist[i]=${sf}
94 + # set a flag if there are obsolete files
95 + [ "${sf%/*}" = "${ROOT}${SITELISP}" ] && obsolete=t
96 done
97
98 eval "${old_shopts}"
99 @@ -379,17 +381,27 @@
100 to /usr/share/emacs/site-lisp/site-start.el. Alternatively, that line
101 can be added by individual users to their initialisation files, or,
102 for greater flexibility, users can load individual package-specific
103 -initialisation files from /usr/share/emacs/site-lisp/.
104 +initialisation files from /usr/share/emacs/site-lisp/site-gentoo.d/.
105 EOF
106 echo
107 fi
108
109 # Kludge for backwards compatibility: During pkg_postrm, old versions
110 - # of this eclass (saved in the PDB) won't find packages' site-init files
111 + # of this eclass (saved in the VDB) won't find packages' site-init files
112 # in the new location. So we copy them to an auxiliary file that is
113 # visible to old eclass versions.
114 for sf in "${sflist[@]}"; do
115 [ "${sf%/*}" = "${ROOT}${SITELISP}/site-gentoo.d" ] \
116 && cat "${sf}" >>"${ROOT}${SITELISP}"/00site-gentoo.el
117 done
118 +
119 +# if [ "${obsolete}" ]; then
120 +# while read line; do ewarn "${line}"; done <<-EOF
121 +# Site-initialisation files of Emacs packages are now installed in
122 +# /usr/share/emacs/site-lisp/site-gentoo.d/. You may consider using
123 +# /usr/sbin/emacs-updater to rebuild the installed Emacs packages.
124 +# However, the old location is still supported.
125 +# EOF
126 +# echo
127 +# fi
128 }
129
130
131
132 1.28 eclass/elisp.eclass
133
134 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.28&view=markup
135 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?rev=1.28&content-type=text/plain
136 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/elisp.eclass?r1=1.27&r2=1.28
137
138 Index: elisp.eclass
139 ===================================================================
140 RCS file: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v
141 retrieving revision 1.27
142 retrieving revision 1.28
143 diff -u -r1.27 -r1.28
144 --- elisp.eclass 7 Dec 2007 13:52:20 -0000 1.27
145 +++ elisp.eclass 28 Dec 2007 17:48:34 -0000 1.28
146 @@ -1,10 +1,10 @@
147 # Copyright 1999-2007 Gentoo Foundation
148 # Distributed under the terms of the GNU General Public License v2
149 -# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.27 2007/12/07 13:52:20 ulm Exp $
150 +# $Header: /var/cvsroot/gentoo-x86/eclass/elisp.eclass,v 1.28 2007/12/28 17:48:34 ulm Exp $
151 #
152 -# Copyright 2007 Christian Faulhammer <opfer@g.o>
153 # Copyright 2002-2003 Matthew Kennedy <mkennedy@g.o>
154 # Copyright 2003 Jeremy Maitin-Shepard <jbms@×××××.com>
155 +# Copyright 2007 Christian Faulhammer <opfer@g.o>
156 # Copyright 2007 Ulrich Mueller <ulm@g.o>
157 #
158 # @ECLASS: elisp.eclass
159
160
161
162 1.13 eclass/ssl-cert.eclass
163
164 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ssl-cert.eclass?rev=1.13&view=markup
165 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ssl-cert.eclass?rev=1.13&content-type=text/plain
166 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/ssl-cert.eclass?r1=1.12&r2=1.13
167
168 Index: ssl-cert.eclass
169 ===================================================================
170 RCS file: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v
171 retrieving revision 1.12
172 retrieving revision 1.13
173 diff -u -r1.12 -r1.13
174 --- ssl-cert.eclass 9 Dec 2007 08:09:56 -0000 1.12
175 +++ ssl-cert.eclass 28 Dec 2007 17:48:34 -0000 1.13
176 @@ -1,17 +1,25 @@
177 # Copyright 1999-2004 Gentoo Foundation
178 # Distributed under the terms of the GNU General Public License v2
179 -# $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.12 2007/12/09 08:09:56 ulm Exp $
180 +# $Header: /var/cvsroot/gentoo-x86/eclass/ssl-cert.eclass,v 1.13 2007/12/28 17:48:34 ulm Exp $
181 #
182 +# @ECLASS: ssl-cert.eclass
183 +# @MAINTAINER:
184 # Author: Max Kalika <max@g.o>
185 -#
186 +# @BLURB: Eclass for SSL certificates
187 +# @DESCRIPTION:
188 # This eclass implements standard installation procedure for installing
189 # self-signed SSL certificates.
190 +# @EXAMPLE:
191 +# "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}
192
193 # Conditionally depend on OpenSSL: allows inheretence
194 # without pulling extra packages if not needed
195 DEPEND="ssl? ( dev-libs/openssl )"
196 IUSE="ssl"
197
198 +# @FUNCTION: gen_cnf
199 +# @USAGE:
200 +# @DESCRIPTION:
201 # Initializes variables and generates the needed
202 # OpenSSL configuration file and a CA serial file
203 #
204 @@ -60,6 +68,10 @@
205 return $?
206 }
207
208 +# @FUNCTION: get_base
209 +# @USAGE: [if_ca]
210 +# @RETURN: <base path>
211 +# @DESCRIPTION:
212 # Simple function to determine whether we're creating
213 # a CA (which should only be done once) or final part
214 #
215 @@ -72,6 +84,9 @@
216 fi
217 }
218
219 +# @FUNCTION: gen_key
220 +# @USAGE: <base path>
221 +# @DESCRIPTION:
222 # Generates an RSA key
223 #
224 # Access: private
225 @@ -85,6 +100,9 @@
226 return $?
227 }
228
229 +# @FUNCTION: gen_csr
230 +# @USAGE: <base path>
231 +# @DESCRIPTION:
232 # Generates a certificate signing request using
233 # the key made by gen_key()
234 #
235 @@ -99,6 +117,9 @@
236 return $?
237 }
238
239 +# @FUNCTION: gen_crt
240 +# @USAGE: <base path>
241 +# @DESCRIPTION:
242 # Generates either a self-signed CA certificate using
243 # the csr and key made by gen_csr() and gen_key() or
244 # a signed server certificate using the CA cert previously
245 @@ -125,6 +146,9 @@
246 return $?
247 }
248
249 +# @FUNCTION: gen_pem
250 +# @USAGE: <base path>
251 +# @DESCRIPTION:
252 # Generates a PEM file by concatinating the key
253 # and cert file created by gen_key() and gen_cert()
254 #
255 @@ -208,11 +232,12 @@
256 fi
257 }
258
259 -# Uses all the private functions above to generate
260 -# and install the requested certificates
261 -#
262 -# Usage: install_cert <certificates>
263 -# where <certificates> are full pathnames relative to ROOT, without extension.
264 +# @FUNCTION: install_cert
265 +# @USAGE: <certificates>
266 +# @DESCRIPTION:
267 +# Uses all the private functions above to generate and install the
268 +# requested certificates.
269 +# <certificates> are full pathnames relative to ROOT, without extension.
270 #
271 # Example: "install_cert /foo/bar" installs ${ROOT}/foo/bar.{key,csr,crt,pem}
272 #
273
274
275
276 --
277 gentoo-commits@g.o mailing list