Gentoo Archives: gentoo-commits

From: "Timo Gurr (tgurr)" <tgurr@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-print/cups: ChangeLog cups-1.4.2-r1.ebuild cups-1.3.11-r2.ebuild cups-1.4.2.ebuild cups-1.3.10-r2.ebuild
Date: Mon, 30 Nov 2009 22:00:59
Message-Id: E1NFEIi-0004xx-Pl@stork.gentoo.org
1 tgurr 09/11/30 22:00:56
2
3 Modified: ChangeLog
4 Added: cups-1.4.2-r1.ebuild cups-1.3.11-r2.ebuild
5 Removed: cups-1.4.2.ebuild cups-1.3.10-r2.ebuild
6 Log:
7 Revbumps fixing security issue CVE-2009-3553. Fix linguas handling bug #293217 thanks to Rafał Mużyło, remove zeroconf of cups 1.4 since it's missing an avahi implementation, bug #293295. Remove old.
8 (Portage version: 2.2_rc54/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.375 net-print/cups/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?rev=1.375&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?rev=1.375&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?r1=1.374&r2=1.375
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v
20 retrieving revision 1.374
21 retrieving revision 1.375
22 diff -u -r1.374 -r1.375
23 --- ChangeLog 24 Nov 2009 04:02:42 -0000 1.374
24 +++ ChangeLog 30 Nov 2009 22:00:56 -0000 1.375
25 @@ -1,6 +1,17 @@
26 # ChangeLog for net-print/cups
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.374 2009/11/24 04:02:42 jer Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.375 2009/11/30 22:00:56 tgurr Exp $
30 +
31 +*cups-1.4.2-r1 (30 Nov 2009)
32 +*cups-1.3.11-r2 (30 Nov 2009)
33 +
34 + 30 Nov 2009; Timo Gurr <tgurr@g.o> -cups-1.3.10-r2.ebuild,
35 + +cups-1.3.11-r2.ebuild, +files/cups-1.3.11-str3200.patch,
36 + -cups-1.4.2.ebuild, +cups-1.4.2-r1.ebuild,
37 + +files/cups-1.4.2-str3200.patch:
38 + Revbumps fixing security issue CVE-2009-3553. Fix linguas handling bug
39 + #293217 thanks to Rafał Mużyło, remove zeroconf of cups 1.4 since it's
40 + missing an avahi implementation, bug #293295. Remove old.
41
42 24 Nov 2009; Jeroen Roovers <jer@g.o> cups-1.3.11-r1.ebuild:
43 Stable for HPPA (bug #293865).
44
45
46
47 1.1 net-print/cups/cups-1.4.2-r1.ebuild
48
49 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.4.2-r1.ebuild?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.4.2-r1.ebuild?rev=1.1&content-type=text/plain
51
52 Index: cups-1.4.2-r1.ebuild
53 ===================================================================
54 # Copyright 1999-2009 Gentoo Foundation
55 # Distributed under the terms of the GNU General Public License v2
56 # $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.4.2-r1.ebuild,v 1.1 2009/11/30 22:00:56 tgurr Exp $
57
58 EAPI="2"
59
60 inherit eutils flag-o-matic multilib pam versionator
61
62 MY_P=${P/_}
63
64 DESCRIPTION="The Common Unix Printing System."
65 HOMEPAGE="http://www.cups.org/"
66 SRC_URI="mirror://easysw/${PN}/${PV}/${MY_P}-source.tar.bz2"
67
68 LICENSE="GPL-2"
69 SLOT="0"
70 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
71 IUSE="acl dbus debug gnutls java +jpeg kerberos ldap pam perl php +png python samba slp +ssl static +tiff X xinetd"
72
73 COMMON_DEPEND="acl? ( kernel_linux? ( sys-apps/acl sys-apps/attr ) )
74 dbus? ( sys-apps/dbus )
75 gnutls? ( net-libs/gnutls )
76 java? ( >=virtual/jre-1.4 )
77 jpeg? ( >=media-libs/jpeg-6b )
78 kerberos? ( virtual/krb5 )
79 ldap? ( net-nds/openldap )
80 pam? ( virtual/pam )
81 perl? ( dev-lang/perl )
82 php? ( dev-lang/php )
83 png? ( >=media-libs/libpng-1.2.1 )
84 python? ( dev-lang/python )
85 slp? ( >=net-libs/openslp-1.0.4 )
86 ssl? ( !gnutls? ( >=dev-libs/openssl-0.9.8g ) )
87 tiff? ( >=media-libs/tiff-3.5.5 )
88 xinetd? ( sys-apps/xinetd )
89 app-text/libpaper
90 app-text/poppler-utils
91 dev-libs/libgcrypt
92 dev-libs/libusb
93 !net-print/cupsddk"
94
95 DEPEND="${COMMON_DEPEND}"
96
97 RDEPEND="${COMMON_DEPEND}
98 !virtual/lpr
99 X? ( x11-misc/xdg-utils )"
100
101 PDEPEND="|| ( app-text/ghostscript-gpl[cups] app-text/ghostscript-gnu[cups] )"
102
103 PROVIDE="virtual/lpr"
104
105 # upstream includes an interactive test which is a nono for gentoo.
106 # therefore, since the printing herd has bigger fish to fry, for now,
107 # we just leave it out, even if FEATURES=test
108 RESTRICT="test"
109
110 S="${WORKDIR}/${MY_P}"
111
112 LANGS="da de es eu fi fr it ja ko nl no pl pt pt_BR ru sv zh zh_TW"
113 for X in ${LANGS} ; do
114 IUSE="${IUSE} linguas_${X}"
115 done
116
117 pkg_setup() {
118 enewgroup lp
119 enewuser lp -1 -1 -1 lp
120 enewgroup lpadmin 106
121 }
122
123 src_prepare() {
124 # create a missing symlink to allow https printing via IPP, bug #217293
125 epatch "${FILESDIR}/${PN}-1.4.0-backend-https.patch"
126
127 # CVE-2009-3553: Use-after-free (crash) due improper reference counting
128 # in abstract file descriptors handling interface
129 # upstream bug STR #3200
130 epatch "${FILESDIR}/${PN}-1.4.2-str3200.patch"
131 }
132
133 src_configure() {
134 # locale support
135 strip-linguas ${LANGS}
136 if [ -z "${LINGUAS}" ] ; then
137 export LINGUAS=none
138 fi
139
140 local myconf
141 if use ssl || use gnutls ; then
142 myconf="${myconf} \
143 $(use_enable gnutls) \
144 $(use_enable !gnutls openssl)"
145 else
146 myconf="${myconf} \
147 --disable-gnutls \
148 --disable-openssl"
149 fi
150
151 econf \
152 --libdir=/usr/$(get_libdir) \
153 --localstatedir=/var \
154 --with-cups-user=lp \
155 --with-cups-group=lp \
156 --with-docdir=/usr/share/cups/html \
157 --with-languages="${LINGUAS}" \
158 --with-pdftops=pdftops \
159 --with-system-groups=lpadmin \
160 $(use_enable acl) \
161 $(use_enable dbus) \
162 $(use_enable debug) \
163 $(use_enable debug debug-guards) \
164 $(use_enable jpeg) \
165 $(use_enable kerberos gssapi) \
166 $(use_enable ldap) \
167 $(use_enable pam) \
168 $(use_enable png) \
169 $(use_enable slp) \
170 $(use_enable static) \
171 $(use_enable tiff) \
172 $(use_enable xinetd xinetd /etc/xinetd.d) \
173 $(use_with java) \
174 $(use_with perl) \
175 $(use_with php) \
176 $(use_with python) \
177 --enable-libpaper \
178 --enable-libusb \
179 --enable-threads \
180 --enable-pdftops \
181 --disable-dnssd \
182 ${myconf}
183
184 # install in /usr/libexec always, instead of using /usr/lib/cups, as that
185 # makes more sense when facing multilib support.
186 sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs
187 sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h
188 sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config
189 }
190
191 src_install() {
192 emake BUILDROOT="${D}" install || die "emake install failed"
193 dodoc {CHANGES,CREDITS,README}.txt || die "dodoc install failed"
194
195 # clean out cups init scripts
196 rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups}
197
198 # install our init script
199 local neededservices
200 use dbus && neededservices="$neededservices dbus"
201 [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
202 sed -e "s/@neededservices@/$neededservices/" "${FILESDIR}"/cupsd.init.d > "${T}"/cupsd
203 doinitd "${T}"/cupsd || die "doinitd failed"
204
205 # install our pam script
206 pamd_mimic_system cups auth account
207
208 if use xinetd ; then
209 # correct path
210 sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" "${D}"/etc/xinetd.d/cups-lpd
211 # it is safer to disable this by default, bug #137130
212 grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \
213 sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd
214 else
215 rm -rf "${D}"/etc/xinetd.d
216 fi
217
218 keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
219 /var/cache/cups /var/cache/cups/rss /var/log/cups /var/run/cups/certs \
220 /var/spool/cups/tmp
221
222 keepdir /etc/cups/{interfaces,ppd,ssl}
223
224 use X || rm -r "${D}"/usr/share/applications
225
226 # create /etc/cups/client.conf, bug #196967 and #266678
227 echo "ServerName /var/run/cups/cups.sock" >> "${D}"/etc/cups/client.conf
228 }
229
230 pkg_postinst() {
231 echo
232 elog "For information about installing a printer and general cups setup"
233 elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml"
234 echo
235 }
236
237
238
239 1.1 net-print/cups/cups-1.3.11-r2.ebuild
240
241 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.3.11-r2.ebuild?rev=1.1&view=markup
242 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.3.11-r2.ebuild?rev=1.1&content-type=text/plain
243
244 Index: cups-1.3.11-r2.ebuild
245 ===================================================================
246 # Copyright 1999-2009 Gentoo Foundation
247 # Distributed under the terms of the GNU General Public License v2
248 # $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.3.11-r2.ebuild,v 1.1 2009/11/30 22:00:56 tgurr Exp $
249
250 inherit autotools eutils flag-o-matic multilib pam
251
252 MY_P=${P/_}
253
254 DESCRIPTION="The Common Unix Printing System"
255 HOMEPAGE="http://www.cups.org/"
256 SRC_URI="mirror://easysw/${PN}/${PV}/${MY_P}-source.tar.bz2"
257
258 LICENSE="GPL-2"
259 SLOT="0"
260 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
261 IUSE="acl avahi dbus gnutls java jpeg kerberos ldap pam perl php png ppds python samba slp ssl static tiff X xinetd zeroconf"
262
263 COMMON_DEPEND="acl? ( kernel_linux? ( sys-apps/acl sys-apps/attr ) )
264 avahi? ( net-dns/avahi )
265 dbus? ( sys-apps/dbus )
266 gnutls? ( net-libs/gnutls )
267 java? ( >=virtual/jre-1.4 )
268 jpeg? ( >=media-libs/jpeg-6b )
269 kerberos? ( virtual/krb5 )
270 ldap? ( net-nds/openldap )
271 pam? ( virtual/pam )
272 perl? ( dev-lang/perl )
273 php? ( dev-lang/php )
274 png? ( >=media-libs/libpng-1.2.1 )
275 python? ( dev-lang/python )
276 slp? ( >=net-libs/openslp-1.0.4 )
277 ssl? ( !gnutls? ( >=dev-libs/openssl-0.9.8g ) )
278 tiff? ( >=media-libs/tiff-3.5.5 )
279 xinetd? ( sys-apps/xinetd )
280 zeroconf? ( !avahi? ( net-misc/mDNSResponder ) )
281 app-text/libpaper
282 dev-libs/libgcrypt"
283
284 DEPEND="${COMMON_DEPEND}
285 !<net-print/foomatic-filters-ppds-20070501
286 !<net-print/hplip-1.7.4a-r1"
287
288 RDEPEND="${COMMON_DEPEND}
289 !virtual/lpr
290 X? ( x11-misc/xdg-utils )
291 >=virtual/poppler-utils-0.4.3-r1
292 "
293
294 PDEPEND="
295 ppds? ( || (
296 (
297 net-print/foomatic-filters-ppds
298 net-print/foomatic-db-ppds
299 )
300 net-print/foomatic-filters-ppds
301 net-print/foomatic-db-ppds
302 net-print/hplip
303 net-print/gutenprint
304 net-print/foo2zjs
305 net-print/cups-pdf
306 ) )
307 samba? ( >=net-fs/samba-3.0.8 )
308 virtual/ghostscript"
309
310 PROVIDE="virtual/lpr"
311
312 # upstream includes an interactive test which is a nono for gentoo.
313 # therefore, since the printing herd has bigger fish to fry, for now,
314 # we just leave it out, even if FEATURES=test
315 RESTRICT="test"
316
317 S="${WORKDIR}/${MY_P}"
318
319 LANGS="de en es et fr he id it ja pl sv zh_TW"
320 for X in ${LANGS} ; do
321 IUSE="${IUSE} linguas_${X}"
322 done
323
324 pkg_setup() {
325 if use avahi && ! built_with_use net-dns/avahi mdnsresponder-compat ; then
326 echo
327 eerror "In order to have cups working with avahi zeroconf support, you need"
328 eerror "to have net-dns/avahi emerged with \"mdnsresponder-compat\" in your USE"
329 eerror "flag. Please add that flag, re-emerge avahi, and then emerge cups again."
330 die "net-dns/avahi is missing the mdnsresponder-compat feature."
331 fi
332
333 enewgroup lp
334 enewuser lp -1 -1 -1 lp
335
336 enewgroup lpadmin 106
337 }
338
339 src_unpack() {
340 unpack ${A}
341 cd "${S}"
342
343 # disable configure automagic for acl/attr, upstream bug STR #2723
344 epatch "${FILESDIR}/${PN}-1.3.0-configure.patch"
345
346 # create a missing symlink to allow https printing via IPP, bug #217293
347 epatch "${FILESDIR}/${PN}-1.3.7-backend-https.patch"
348
349 # detect recent libgnutls versions, upstream bug STR #3178
350 epatch "${FILESDIR}/${PN}-1.3.10-str3178.patch"
351
352 # CVE-2009-2820: Several XSS flaws in forms processed by CUPS web interface
353 # upstream bug STR #3178 and STR #3401
354 epatch "${FILESDIR}/${PN}-1.3.11-str3367-security-1.3v2.patch"
355 epatch "${FILESDIR}/${PN}-1.3.11-str3401-security-1.3v2-regression.patch"
356 # CVE-2009-3553: Use-after-free (crash) due improper reference counting in abstract file descriptors handling interface
357 # upstream bug STR #3200
358 epatch "${FILESDIR}/${PN}-1.3.11-str3200.patch"
359
360 # cups does not use autotools "the usual way" and ship a static config.h.in
361 eaclocal
362 eautoconf
363 }
364
365 src_compile() {
366 # Fails to compile on SH
367 use sh && replace-flags -O? -O0
368
369 # needed to prevent ghostscript compile failures
370 use kerberos && strip-flags
371
372 # locale support
373 strip-linguas ${LANGS}
374
375 if [ -z "${LINGUAS}" ] ; then
376 export LINGUAS=all
377 fi
378
379 export DSOFLAGS="${LDFLAGS}"
380
381 if use ldap ; then
382 append-flags -DLDAP_DEPRECATED
383 fi
384
385 local myconf
386
387 if use avahi || use zeroconf ; then
388 myconf="${myconf} --enable-dnssd"
389 else
390 myconf="${myconf} --disable-dnssd"
391 fi
392
393 if use ssl || use gnutls ; then
394 myconf="${myconf} \
395 $(use_enable gnutls) \
396 $(use_enable !gnutls openssl)"
397 else
398 myconf="${myconf} \
399 --disable-gnutls \
400 --disable-openssl"
401 fi
402
403 econf \
404 --libdir=/usr/$(get_libdir) \
405 --localstatedir=/var \
406 --with-cups-user=lp \
407 --with-cups-group=lp \
408 --with-docdir=/usr/share/cups/html \
409 --with-languages=${LINGUAS} \
410 --with-pdftops=pdftops \
411 --with-system-groups=lpadmin \
412 --with-xinetd=/etc/xinetd.d \
413 $(use_enable acl) \
414 $(use_enable dbus) \
415 $(use_enable jpeg) \
416 $(use_enable kerberos gssapi) \
417 $(use_enable ldap) \
418 $(use_enable pam) \
419 $(use_enable png) \
420 $(use_enable slp) \
421 $(use_enable static) \
422 $(use_enable tiff) \
423 $(use_with java) \
424 $(use_with perl) \
425 $(use_with php) \
426 $(use_with python) \
427 --enable-libpaper \
428 --enable-pdftops \
429 --enable-threads \
430 ${myconf}
431
432 # install in /usr/libexec always, instead of using /usr/lib/cups, as that
433 # makes more sense when facing multilib support.
434 sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs
435 sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h
436 sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config
437
438 emake || die "emake failed"
439 }
440
441 src_install() {
442 emake BUILDROOT="${D}" install || die "emake install failed"
443 dodoc {CHANGES{,-1.{0,1}},CREDITS,README}.txt || die "dodoc install failed"
444
445 # clean out cups init scripts
446 rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups}
447
448 # install our init script
449 local neededservices
450 use avahi && neededservices="$neededservices avahi-daemon"
451 use dbus && neededservices="$neededservices dbus"
452 use zeroconf && ! use avahi && neededservices="$neededservices mDNSResponderPosix"
453 [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
454 sed -e "s/@neededservices@/$neededservices/" "${FILESDIR}"/cupsd.init.d > "${T}"/cupsd
455 doinitd "${T}"/cupsd
456
457 # install our pam script
458 pamd_mimic_system cups auth account
459
460 if use xinetd ; then
461 # correct path
462 sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" "${D}"/etc/xinetd.d/cups-lpd
463 # it is safer to disable this by default, bug #137130
464 grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \
465 sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd
466 else
467 rm -rf "${D}"/etc/xinetd.d
468 fi
469
470 keepdir /usr/share/cups/profiles /usr/libexec/cups/driver /var/log/cups \
471 /var/run/cups/certs /var/cache/cups /var/spool/cups/tmp /etc/cups/ssl
472
473 # .desktop handling. X useflag. xdg-open from freedesktop is preferred, upstream bug STR #2724.
474 if use X ; then
475 sed -i -e "s:htmlview:xdg-open:" "${D}"/usr/share/applications/cups.desktop
476 else
477 rm -r "${D}"/usr/share/applications
478 fi
479
480 # fix a symlink collision, see bug #172341
481 dodir /usr/share/ppd
482 dosym /usr/share/ppd /usr/share/cups/model/foomatic-ppds
483
484 # create RSS feed directory
485 diropts -m 0740 -o lp -g lp
486 dodir /var/cache/cups/rss
487
488 # create /etc/cups/client.conf, bug #196967 and #266678
489 echo "ServerName /var/run/cups/cups.sock" >> "${D}"/etc/cups/client.conf
490 }
491
492 pkg_preinst() {
493 # cleanups
494 [ -n "${PN}" ] && rm -fR "${ROOT}"/usr/share/doc/"${PN}"-*
495 has_version "=${CATEGORY}/${PN}-1.2*"
496 upgrade_from_1_2=$?
497 }
498
499 pkg_postinst() {
500 echo
501 elog "For information about installing a printer and general cups setup"
502 elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml"
503 echo
504
505 local good_gs=false
506 for x in app-text/ghostscript-gpl app-text/ghostscript-gnu ; do
507 if has_version ${x} && built_with_use ${x} cups ; then
508 good_gs=true
509 break
510 fi
511 done
512 if ! ${good_gs} ; then
513 echo
514 ewarn "You need to emerge ghostscript with the \"cups\" USE flag turned on."
515 echo
516 fi
517
518 if [[ $upgrade_from_1_2 = 0 ]] ; then
519 echo
520 ewarn "You have upgraded from an older cups version. Please make sure"
521 ewarn "to run \"etc-update\" and \"revdep-rebuild\" NOW."
522 echo
523 fi
524
525 if [ -e "${ROOT}"/usr/lib/cups ] ; then
526 echo
527 ewarn "/usr/lib/cups exists - You need to remerge every ebuild that"
528 ewarn "installed into /usr/lib/cups and /etc/cups, qfile is in portage-utils:"
529 ewarn "# FEATURES=-collision-protect emerge -va1 \$(qfile -qC /usr/lib/cups /etc/cups | sed -e \"s:net-print/cups$::\")"
530 echo
531 ewarn "FEATURES=-collision-protect is needed to overwrite the compatibility"
532 ewarn "symlinks installed by this package, it won't be needed on later merges."
533 ewarn "You should also run revdep-rebuild"
534 echo
535
536 # place symlinks to make the update smoothless
537 for i in "${ROOT}"/usr/lib/cups/{backend,filter}/* ; do
538 if [ "${i/\*}" == "${i}" ] && ! [ -e ${i/lib/libexec} ] ; then
539 ln -s ${i} ${i/lib/libexec}
540 fi
541 done
542 fi
543 }