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: cups-1.2.12-r4.ebuild ChangeLog cups-1.2.12-r5.ebuild cups-1.3.6-r1.ebuild cups-1.2.10-r1.ebuild cups-1.3.5.ebuild cups-1.3.6.ebuild
Date: Thu, 28 Feb 2008 20:24:53
Message-Id: E1JUpJB-0006UI-Np@stork.gentoo.org
1 tgurr 08/02/28 20:24:49
2
3 Modified: cups-1.2.12-r4.ebuild ChangeLog
4 Added: cups-1.2.12-r5.ebuild cups-1.3.6-r1.ebuild
5 Removed: cups-1.2.10-r1.ebuild cups-1.3.5.ebuild
6 cups-1.3.6.ebuild
7 Log:
8 Add cups-1.2.12-r5.ebuild to fix security issue CVE-2008-0882, see bug #211449.Remove older vulnerable versions. Rename patches for better versioning. Minor ebuild cleanups.
9 (Portage version: 2.1.4.4)
10
11 Revision Changes Path
12 1.4 net-print/cups/cups-1.2.12-r4.ebuild
13
14 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.2.12-r4.ebuild?rev=1.4&view=markup
15 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.2.12-r4.ebuild?rev=1.4&content-type=text/plain
16 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.2.12-r4.ebuild?r1=1.3&r2=1.4
17
18 Index: cups-1.2.12-r4.ebuild
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.2.12-r4.ebuild,v
21 retrieving revision 1.3
22 retrieving revision 1.4
23 diff -u -r1.3 -r1.4
24 --- cups-1.2.12-r4.ebuild 10 Jan 2008 09:04:24 -0000 1.3
25 +++ cups-1.2.12-r4.ebuild 28 Feb 2008 20:24:49 -0000 1.4
26 @@ -1,6 +1,6 @@
27 # Copyright 1999-2008 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.2.12-r4.ebuild,v 1.3 2008/01/10 09:04:24 vapier Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.2.12-r4.ebuild,v 1.4 2008/02/28 20:24:49 tgurr Exp $
31
32 WANT_AUTOMAKE=latest
33
34 @@ -84,10 +84,10 @@
35 # upstream does not acknowledge bindnow as a solution
36 epatch "${FILESDIR}"/cups-1.2.0-bindnow.patch
37
38 - # CVE-2007-4351 security patch, bug #196736
39 - epatch "${FILESDIR}"/${PN}-1.2-str2561-v2.patch
40 # CVE-2007-4045 security patch, bug #199195
41 - epatch "${FILESDIR}"/${PN}-1.2.4-CVE-2007-4045.patch
42 + epatch "${FILESDIR}"/${PN}-1.2.12-CVE-2007-4045.patch
43 + # CVE-2007-4351 security patch, bug #196736
44 + epatch "${FILESDIR}"/${PN}-1.2.12-CVE-2007-4351.patch
45 # CVE-2007-5849 security patch, bug #201570
46 epatch "${FILESDIR}"/${PN}-1.2.12-CVE-2007-5849.patch
47
48
49
50
51 1.282 net-print/cups/ChangeLog
52
53 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?rev=1.282&view=markup
54 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?rev=1.282&content-type=text/plain
55 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?r1=1.281&r2=1.282
56
57 Index: ChangeLog
58 ===================================================================
59 RCS file: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v
60 retrieving revision 1.281
61 retrieving revision 1.282
62 diff -u -r1.281 -r1.282
63 --- ChangeLog 22 Feb 2008 18:13:58 -0000 1.281
64 +++ ChangeLog 28 Feb 2008 20:24:49 -0000 1.282
65 @@ -1,6 +1,21 @@
66 # ChangeLog for net-print/cups
67 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
68 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.281 2008/02/22 18:13:58 tgurr Exp $
69 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.282 2008/02/28 20:24:49 tgurr Exp $
70 +
71 +*cups-1.3.6-r1 (28 Feb 2008)
72 +*cups-1.2.12-r5 (28 Feb 2008)
73 +
74 + 28 Feb 2008; Timo Gurr <tgurr@g.o>
75 + -files/cups-1.2.4-CVE-2007-4045.patch, -files/cups-1.2-str2561-v2.patch,
76 + +files/cups-1.2.12-CVE-2007-4045.patch,
77 + +files/cups-1.2.12-CVE-2007-4351.patch,
78 + +files/cups-1.2.12-CVE-2008-0882.patch, -files/cups-1.3.0-bindnow.patch,
79 + -files/cups-1.3.4-CVE-2007-4045.patch, -files/pdftops.pl,
80 + -cups-1.2.10-r1.ebuild, cups-1.2.12-r4.ebuild, +cups-1.2.12-r5.ebuild,
81 + -cups-1.3.5.ebuild, -cups-1.3.6.ebuild, +cups-1.3.6-r1.ebuild:
82 + Add cups-1.2.12-r5.ebuild to fix security issue CVE-2008-0882, see bug
83 + #211449.Remove older vulnerable versions. Rename patches for better
84 + versioning. Minor ebuild cleanups.
85
86 *cups-1.3.6 (22 Feb 2008)
87
88
89
90
91 1.1 net-print/cups/cups-1.2.12-r5.ebuild
92
93 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.2.12-r5.ebuild?rev=1.1&view=markup
94 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.2.12-r5.ebuild?rev=1.1&content-type=text/plain
95
96 Index: cups-1.2.12-r5.ebuild
97 ===================================================================
98 # Copyright 1999-2008 Gentoo Foundation
99 # Distributed under the terms of the GNU General Public License v2
100 # $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.2.12-r5.ebuild,v 1.1 2008/02/28 20:24:49 tgurr Exp $
101
102 inherit autotools eutils flag-o-matic multilib pam
103
104 MY_P=${P/_}
105
106 DESCRIPTION="The Common Unix Printing System"
107 HOMEPAGE="http://www.cups.org/"
108 SRC_URI="mirror://sourceforge/cups/${MY_P}-source.tar.bz2"
109
110 LICENSE="GPL-2"
111 SLOT="0"
112 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
113 IUSE="ldap ssl slp pam php samba nls dbus tiff png ppds jpeg X"
114
115 DEP="pam? ( virtual/pam )
116 ssl? ( net-libs/gnutls )
117 slp? ( >=net-libs/openslp-1.0.4 )
118 ldap? ( net-nds/openldap )
119 dbus? ( sys-apps/dbus )
120 png? ( >=media-libs/libpng-1.2.1 )
121 tiff? ( >=media-libs/tiff-3.5.5 )
122 jpeg? ( >=media-libs/jpeg-6b )
123 php? ( dev-lang/php )
124 app-text/libpaper"
125 DEPEND="${DEP}
126 !<net-print/foomatic-filters-ppds-20070501
127 !<net-print/hplip-1.7.4a-r1
128 nls? ( sys-devel/gettext )"
129 RDEPEND="${DEP}
130 nls? ( virtual/libintl )
131 !virtual/lpr
132 >=app-text/poppler-0.4.3-r1
133 X? ( x11-misc/xdg-utils )"
134
135 PDEPEND="
136 ppds? ( || (
137 (
138 net-print/foomatic-filters-ppds
139 net-print/foomatic-db-ppds
140 )
141 net-print/foomatic-filters-ppds
142 net-print/foomatic-db-ppds
143 net-print/hplip
144 media-gfx/gimp-print
145 net-print/foo2zjs
146 net-print/cups-pdf
147 ) )
148 samba? ( >=net-fs/samba-3.0.8 )
149 virtual/ghostscript"
150 PROVIDE="virtual/lpr"
151
152 # upstream includes an interactive test which is a nono for gentoo.
153 # therefore, since the printing herd has bigger fish to fry, for now,
154 # we just leave it out, even if FEATURES=test
155 RESTRICT="test"
156
157 S=${WORKDIR}/${MY_P}
158
159 pkg_setup() {
160 if use x86 && [ -d "/usr/lib64" ]
161 then
162 eerror "You are running an x86 system, but /usr/lib64 exists, cups will install all library objects into this directory!"
163 eerror "You should remove /usr/lib64, but before you do, you should check for existing objects, and re-compile all affected packages."
164 eerror "You can use qfile (emerge portage-utils to install qfile) to get a list of the affected ebuilds:"
165 eerror "# qfile -qC /usr/lib64"
166 die "lib64 on x86 detected"
167 fi
168
169 enewgroup lp
170 enewuser lp -1 -1 -1 lp
171
172 enewgroup lpadmin 106
173 }
174
175 src_unpack() {
176 unpack ${A}
177 cd "${S}"
178
179 # CVE-2007-4045 security patch, bug #199195
180 epatch "${FILESDIR}"/${PN}-1.2.12-CVE-2007-4045.patch
181 # CVE-2007-4351 security patch, bug #196736
182 epatch "${FILESDIR}"/${PN}-1.2.12-CVE-2007-4351.patch
183 # CVE-2007-5849 security patch, bug #201570
184 epatch "${FILESDIR}"/${PN}-1.2.12-CVE-2007-5849.patch
185 # CVE-2008-0882 security patch, bug #211449
186 epatch "${FILESDIR}"/${PN}-1.2.12-CVE-2008-0882.patch
187
188 # cups does not use autotools "the usual way" and ship a static config.h.in
189 eaclocal
190 eautoconf
191 }
192
193 src_compile() {
194 export DSOFLAGS="${LDFLAGS}"
195
196 if use ldap; then
197 append-flags -DLDAP_DEPRECATED
198 fi
199
200 econf \
201 --with-cups-user=lp \
202 --with-cups-group=lp \
203 --with-system-groups=lpadmin \
204 --localstatedir=/var \
205 --with-docdir=/usr/share/cups/html \
206 $(use_enable pam) \
207 $(use_enable ssl) \
208 --enable-gnutls \
209 $(use_enable slp) \
210 $(use_enable nls) \
211 $(use_enable dbus) \
212 $(use_enable png) \
213 $(use_enable jpeg) \
214 $(use_enable tiff) \
215 $(use_with php) \
216 $(use_enable ldap) \
217 --enable-libpaper \
218 --enable-threads \
219 --enable-static \
220 --disable-pdftops \
221 || die "econf failed"
222
223 # Install in /usr/libexec always, instead of using /usr/lib/cups, as that
224 # makes more sense when facing multilib support.
225 sed -i -e 's:SERVERBIN.*:SERVERBIN = $(BUILDROOT)/usr/libexec/cups:' Makedefs
226 sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h
227 sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config
228
229 emake || die "emake failed"
230 }
231
232 src_install() {
233 emake BUILDROOT="${D}" install || die "emake install failed"
234 dodoc {CHANGES{,-1.{0,1}},CREDITS,LICENSE,README}.txt
235
236 # clean out cups init scripts
237 rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups}
238 # install our init scripts
239 newinitd "${FILESDIR}"/cupsd.init cupsd
240 # install our pam script
241 pamd_mimic_system cups auth account
242
243 # correct path
244 sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" "${D}"/etc/xinetd.d/cups-lpd
245 # it is safer to disable this by default, bug 137130
246 grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \
247 sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd
248
249 # install pdftops filter
250 exeinto /usr/libexec/cups/filter/
251 newexe "${FILESDIR}"/pdftops-1.20.gentoo pdftops
252
253 # only for gs-esp this is correct, see bug 163897
254 if has_version app-text/ghostscript-gpl || has_version app-text/ghostscript-gnu; then
255 sed -i -e "s:#application/vnd.cups-postscript:application/vnd.cups-postscript:" "${D}"/etc/cups/mime.convs
256 fi
257
258 keepdir /usr/share/cups/profiles /usr/libexec/cups/driver /var/log/cups \
259 /var/run/cups/certs /var/cache/cups /var/spool/cups/tmp /etc/cups/ssl
260
261 # .desktop handling. X useflag. xdg-open from freedesktop is preferred
262 if use X; then
263 sed -i -e "s:htmlview:xdg-open:" "${D}"/usr/share/applications/cups.desktop
264 else
265 rm -r "${D}"/usr/share/applications
266 fi
267
268 # Fix a symlink collision, see bug #172341
269 dodir /usr/share/ppd
270 dosym /usr/share/ppd /usr/share/cups/model/foomatic-ppds
271 }
272
273 pkg_preinst() {
274 # cleanups
275 [ -n "${PN}" ] && rm -fR "${ROOT}"/usr/share/doc/${PN}-*
276 }
277
278 pkg_postinst() {
279 echo
280 elog "Remote printing: change "
281 elog "Listen localhost:631"
282 elog "to"
283 elog "Listen *:631"
284 elog "in /etc/cups/cupsd.conf"
285 echo
286 elog "For more information about installing a printer take a look at:"
287 elog "http://www.gentoo.org/doc/en/printing-howto.xml."
288 echo
289
290 local good_gs=false
291 for x in app-text/ghostscript-gpl app-text/ghostscript-gnu app-text/ghostscript-esp; do
292 if has_version ${x} && built_with_use ${x} cups; then
293 good_gs=true
294 break
295 fi
296 done;
297 if ! ${good_gs}; then
298 ewarn
299 ewarn "You need to emerge ghostscript with the \"cups\" USE flag turned on"
300 fi
301 if has_version =net-print/cups-1.1*; then
302 ewarn
303 ewarn "The configuration changed with cups-1.2, you may want to save the old"
304 ewarn "one and start from scratch:"
305 ewarn "# mv /etc/cups /etc/cups.orig; emerge -va1 cups"
306 ewarn
307 ewarn "You need to rebuild kdelibs for kdeprinter to work with cups-1.2"
308 fi
309 if [ -e "${ROOT}"/usr/lib/cups ]; then
310 ewarn
311 ewarn "/usr/lib/cups exists - You need to remerge every ebuild that"
312 ewarn "installed into /usr/lib/cups and /etc/cups, qfile is in portage-utils:"
313 ewarn "# FEATURES=-collision-protect emerge -va1 \$(qfile -qC /usr/lib/cups /etc/cups | sed \"s:net-print/cups$::\")"
314 ewarn
315 ewarn "FEATURES=-collision-protect is needed to overwrite the compatibility"
316 ewarn "symlinks installed by this package, it wont be needed on later merges."
317 ewarn "You should also run revdep-rebuild"
318
319 # place symlinks to make the update smoothless
320 for i in "${ROOT}"/usr/lib/cups/{backend,filter}/*; do
321 if [ "${i/\*}" == "${i}" ] && ! [ -e ${i/lib/libexec} ]; then
322 ln -s ${i} ${i/lib/libexec}
323 fi
324 done
325 fi
326 }
327
328
329
330 1.1 net-print/cups/cups-1.3.6-r1.ebuild
331
332 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.3.6-r1.ebuild?rev=1.1&view=markup
333 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.3.6-r1.ebuild?rev=1.1&content-type=text/plain
334
335 Index: cups-1.3.6-r1.ebuild
336 ===================================================================
337 # Copyright 1999-2008 Gentoo Foundation
338 # Distributed under the terms of the GNU General Public License v2
339 # $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.3.6-r1.ebuild,v 1.1 2008/02/28 20:24:49 tgurr Exp $
340
341 inherit autotools eutils flag-o-matic multilib pam
342
343 MY_P=${P/_}
344
345 DESCRIPTION="The Common Unix Printing System"
346 HOMEPAGE="http://www.cups.org/"
347 SRC_URI="mirror://sourceforge/cups/${MY_P}-source.tar.bz2"
348
349 LICENSE="GPL-2"
350 SLOT="0"
351 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
352 IUSE="acl avahi dbus java jpeg kerberos ldap nls pam perl php png ppds python samba slp ssl static tiff X zeroconf"
353
354 COMMON_DEPEND="acl? ( kernel_linux? ( sys-apps/acl sys-apps/attr ) )
355 avahi? ( net-dns/avahi )
356 dbus? ( sys-apps/dbus )
357 java? ( >=virtual/jre-1.4 )
358 jpeg? ( >=media-libs/jpeg-6b )
359 kerberos? ( virtual/krb5 )
360 ldap? ( net-nds/openldap )
361 pam? ( virtual/pam )
362 perl? ( dev-lang/perl )
363 php? ( dev-lang/php )
364 png? ( >=media-libs/libpng-1.2.1 )
365 python? ( dev-lang/python )
366 slp? ( >=net-libs/openslp-1.0.4 )
367 ssl? ( net-libs/gnutls )
368 tiff? ( >=media-libs/tiff-3.5.5 )
369 zeroconf? ( !avahi? ( net-misc/mDNSResponder ) )
370 app-text/libpaper
371 dev-libs/libgcrypt"
372
373 DEPEND="${COMMON_DEPEND}
374 !<net-print/foomatic-filters-ppds-20070501
375 !<net-print/hplip-1.7.4a-r1
376 nls? ( sys-devel/gettext )"
377
378 RDEPEND="${COMMON_DEPEND}
379 !virtual/lpr
380 nls? ( virtual/libintl )
381 X? ( x11-misc/xdg-utils )
382 >=app-text/poppler-0.4.3-r1"
383
384 PDEPEND="
385 ppds? ( || (
386 (
387 net-print/foomatic-filters-ppds
388 net-print/foomatic-db-ppds
389 )
390 net-print/foomatic-filters-ppds
391 net-print/foomatic-db-ppds
392 net-print/hplip
393 media-gfx/gimp-print
394 net-print/foo2zjs
395 net-print/cups-pdf
396 ) )
397 samba? ( >=net-fs/samba-3.0.8 )
398 virtual/ghostscript"
399
400 PROVIDE="virtual/lpr"
401
402 # upstream includes an interactive test which is a nono for gentoo.
403 # therefore, since the printing herd has bigger fish to fry, for now,
404 # we just leave it out, even if FEATURES=test
405 RESTRICT="test"
406
407 S="${WORKDIR}/${MY_P}"
408
409 LANGS="de en es et fr he it ja pl sv zh_TW"
410 for X in ${LANGS} ; do
411 IUSE="${IUSE} linguas_${X}"
412 done
413
414 pkg_setup() {
415 if use avahi && ! built_with_use net-dns/avahi mdnsresponder-compat ; then
416 echo
417 eerror "In order to have cups working with avahi zeroconf support, you need"
418 eerror "to have net-dns/avahi emerged with 'mdnsresponder-compat' in your USE"
419 eerror "flag. Please add that flag, re-emerge avahi, and then emerge cups again."
420 die "net-dns/avahi is missing the mdnsresponder-compat feature."
421 fi
422
423 enewgroup lp
424 enewuser lp -1 -1 -1 lp
425
426 enewgroup lpadmin 106
427 }
428
429 src_unpack() {
430 unpack ${A}
431 cd "${S}"
432
433 # disable configure automagic for acl/attr, upstream bug STR #2723.
434 epatch "${FILESDIR}/${PN}-1.3.0-configure.patch"
435
436 # cups does not use autotools "the usual way" and ship a static config.h.in
437 eaclocal
438 eautoconf
439 }
440
441 src_compile() {
442
443 # locale support
444 strip-linguas ${LANGS}
445
446 if [ -z "${LINGUAS}" ] ; then
447 export LINGUAS=all
448 fi
449
450 export DSOFLAGS="${LDFLAGS}"
451
452 if use ldap ; then
453 append-flags -DLDAP_DEPRECATED
454 fi
455
456 local myconf
457
458 if use avahi || use zeroconf ; then
459 myconf="${myconf} --enable-dnssd"
460 else
461 myconf="${myconf} --disable-dnssd"
462 fi
463
464 econf \
465 --libdir=/usr/$(get_libdir) \
466 --localstatedir=/var \
467 --with-cups-user=lp \
468 --with-cups-group=lp \
469 --with-docdir=/usr/share/cups/html \
470 --with-languages=${LINGUAS} \
471 --with-system-groups=lpadmin \
472 $(use_enable acl) \
473 $(use_enable dbus) \
474 $(use_enable jpeg) \
475 $(use_enable kerberos gssapi) \
476 $(use_enable ldap) \
477 $(use_enable nls) \
478 $(use_enable pam) \
479 $(use_enable png) \
480 $(use_enable slp) \
481 $(use_enable ssl) \
482 $(use_enable static) \
483 $(use_enable tiff) \
484 $(use_with java) \
485 $(use_with perl) \
486 $(use_with php) \
487 $(use_with python) \
488 --enable-gnutls \
489 --enable-libpaper \
490 --enable-threads \
491 --disable-pdftops \
492 ${myconf} \
493 || die "econf failed"
494
495 # install in /usr/libexec always, instead of using /usr/lib/cups, as that
496 # makes more sense when facing multilib support.
497 sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs
498 sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h
499 sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config
500
501 emake || die "emake failed"
502 }
503
504 src_install() {
505 emake BUILDROOT="${D}" install || die "emake install failed"
506 dodoc {CHANGES{,-1.{0,1}},CREDITS,README}.txt || die "dodoc install failed"
507
508 # clean out cups init scripts
509 rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups}
510
511 # install our init script
512 local neededservices
513 use avahi && neededservices="$neededservices avahi-daemon"
514 use dbus && neededservices="$neededservices dbus"
515 use zeroconf && ! use avahi && neededservices="$neededservices mDNSResponderPosix"
516 [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
517 sed -e "s/@neededservices@/$neededservices/" "${FILESDIR}"/cupsd.init.d > "${T}"/cupsd
518 doinitd "${T}"/cupsd
519
520 # install our pam script
521 pamd_mimic_system cups auth account
522
523 # correct path
524 sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" "${D}"/etc/xinetd.d/cups-lpd
525 # it is safer to disable this by default, bug 137130
526 grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \
527 sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd
528
529 # install pdftops filter
530 exeinto /usr/libexec/cups/filter/
531 newexe "${FILESDIR}"/pdftops-1.20.gentoo pdftops
532
533 # only for gs-esp this is correct, see bug 163897
534 if has_version app-text/ghostscript-gpl || has_version app-text/ghostscript-gnu ; then
535 sed -i -e "s:#application/vnd.cups-postscript:application/vnd.cups-postscript:" "${D}"/etc/cups/mime.convs
536 fi
537
538 keepdir /usr/share/cups/profiles /usr/libexec/cups/driver /var/log/cups \
539 /var/run/cups/certs /var/cache/cups /var/spool/cups/tmp /etc/cups/ssl
540
541 # .desktop handling. X useflag. xdg-open from freedesktop is preferred, upstream bug STR #2724.
542 if use X ; then
543 sed -i -e "s:htmlview:xdg-open:" "${D}"/usr/share/applications/cups.desktop
544 else
545 rm -r "${D}"/usr/share/applications
546 fi
547
548 # fix a symlink collision, see bug #172341
549 dodir /usr/share/ppd
550 dosym /usr/share/ppd /usr/share/cups/model/foomatic-ppds
551
552 # create RSS feed directory
553 diropts -m 0740 -o lp -g lp
554 dodir /var/cache/cups/rss
555 }
556
557 pkg_preinst() {
558 # cleanups
559 [ -n "${PN}" ] && rm -fR "${ROOT}"/usr/share/doc/"${PN}"-*
560 }
561
562 pkg_postinst() {
563 echo
564 elog "For information about installing a printer and general cups setup"
565 elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml"
566 echo
567
568 local good_gs=false
569 for x in app-text/ghostscript-gpl app-text/ghostscript-gnu app-text/ghostscript-esp ; do
570 if has_version ${x} && built_with_use ${x} cups ; then
571 good_gs=true
572 break
573 fi
574 done;
575 if ! ${good_gs}; then
576 echo
577 ewarn "You need to emerge ghostscript with the \"cups\" USE flag turned on"
578 echo
579 fi
580
581 if has_version =net-print/cups-1.1* ; then
582 echo
583 ewarn "The configuration changed with cups-1.3, you may want to save the old"
584 ewarn "one and start from scratch:"
585 ewarn "# mv /etc/cups /etc/cups.orig; emerge -va1 cups"
586 echo
587 ewarn "You need to rebuild kdelibs for kdeprinter to work with cups-1.3"
588 echo
589 fi
590
591 if [ -e "${ROOT}"/usr/lib/cups ] ; then
592 echo
593 ewarn "/usr/lib/cups exists - You need to remerge every ebuild that"
594 ewarn "installed into /usr/lib/cups and /etc/cups, qfile is in portage-utils:"
595 ewarn "# FEATURES=-collision-protect emerge -va1 \$(qfile -qC /usr/lib/cups /etc/cups | sed \"s:net-print/cups$::\")"
596 echo
597 ewarn "FEATURES=-collision-protect is needed to overwrite the compatibility"
598 ewarn "symlinks installed by this package, it won't be needed on later merges."
599 ewarn "You should also run revdep-rebuild"
600 echo
601
602 # place symlinks to make the update smoothless
603 for i in "${ROOT}"/usr/lib/cups/{backend,filter}/* ; do
604 if [ "${i/\*}" == "${i}" ] && ! [ -e ${i/lib/libexec} ] ; then
605 ln -s ${i} ${i/lib/libexec}
606 fi
607 done
608 fi
609 }
610
611
612
613 --
614 gentoo-commits@l.g.o mailing list