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.3.9-r1.ebuild cups-1.3.9.ebuild
Date: Thu, 04 Dec 2008 21:42:15
Message-Id: E1L8Lxb-0005l3-Mp@stork.gentoo.org
1 tgurr 08/12/04 21:42:11
2
3 Modified: ChangeLog
4 Added: cups-1.3.9-r1.ebuild
5 Removed: cups-1.3.9.ebuild
6 Log:
7 Revbump fixing security bug #249727 (CVE-2008-5286). Remove old.
8 (Portage version: 2.2_rc16/cvs/Linux 2.6.27-gentoo-r4 x86_64)
9
10 Revision Changes Path
11 1.335 net-print/cups/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?rev=1.335&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?rev=1.335&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/ChangeLog?r1=1.334&r2=1.335
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v
20 retrieving revision 1.334
21 retrieving revision 1.335
22 diff -u -r1.334 -r1.335
23 --- ChangeLog 25 Nov 2008 23:58:46 -0000 1.334
24 +++ ChangeLog 4 Dec 2008 21:42:11 -0000 1.335
25 @@ -1,6 +1,13 @@
26 # ChangeLog for net-print/cups
27 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.334 2008/11/25 23:58:46 tgurr Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.335 2008/12/04 21:42:11 tgurr Exp $
30 +
31 +*cups-1.3.9-r1 (04 Dec 2008)
32 +
33 + 04 Dec 2008; Timo Gurr <tgurr@g.o>
34 + +files/cups-1.3.9-CVE-2008-5286.patch, -cups-1.3.9.ebuild,
35 + +cups-1.3.9-r1.ebuild:
36 + Revbump fixing security bug #249727 (CVE-2008-5286). Remove old.
37
38 25 Nov 2008; Timo Gurr <tgurr@g.o>
39 -files/cups-1.2.12-CVE-2007-4045.patch,
40
41
42
43 1.1 net-print/cups/cups-1.3.9-r1.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.3.9-r1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-print/cups/cups-1.3.9-r1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: cups-1.3.9-r1.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.3.9-r1.ebuild,v 1.1 2008/12/04 21:42:11 tgurr Exp $
53
54 inherit autotools eutils flag-o-matic multilib pam
55
56 MY_P=${P/_}
57
58 DESCRIPTION="The Common Unix Printing System"
59 HOMEPAGE="http://www.cups.org/"
60 SRC_URI="http://ftp.easysw.com/pub/cups/${PV}/${MY_P}-source.tar.bz2"
61
62 LICENSE="GPL-2"
63 SLOT="0"
64 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
65 IUSE="acl avahi dbus gnutls java jpeg kerberos ldap pam perl php png ppds python samba slp ssl static tiff X xinetd zeroconf"
66
67 COMMON_DEPEND="acl? ( kernel_linux? ( sys-apps/acl sys-apps/attr ) )
68 avahi? ( net-dns/avahi )
69 dbus? ( sys-apps/dbus )
70 gnutls? ( net-libs/gnutls )
71 java? ( >=virtual/jre-1.4 )
72 jpeg? ( >=media-libs/jpeg-6b )
73 kerberos? ( virtual/krb5 )
74 ldap? ( net-nds/openldap )
75 pam? ( virtual/pam )
76 perl? ( dev-lang/perl )
77 php? ( dev-lang/php )
78 png? ( >=media-libs/libpng-1.2.1 )
79 python? ( dev-lang/python )
80 slp? ( >=net-libs/openslp-1.0.4 )
81 ssl? ( !gnutls? ( >=dev-libs/openssl-0.9.8g ) )
82 tiff? ( >=media-libs/tiff-3.5.5 )
83 xinetd? ( sys-apps/xinetd )
84 zeroconf? ( !avahi? ( net-misc/mDNSResponder ) )
85 app-text/libpaper
86 dev-libs/libgcrypt"
87
88 DEPEND="${COMMON_DEPEND}
89 !<net-print/foomatic-filters-ppds-20070501
90 !<net-print/hplip-1.7.4a-r1"
91
92 RDEPEND="${COMMON_DEPEND}
93 !virtual/lpr
94 X? ( x11-misc/xdg-utils )
95 >=app-text/poppler-0.4.3-r1"
96
97 PDEPEND="
98 ppds? ( || (
99 (
100 net-print/foomatic-filters-ppds
101 net-print/foomatic-db-ppds
102 )
103 net-print/foomatic-filters-ppds
104 net-print/foomatic-db-ppds
105 net-print/hplip
106 net-print/gutenprint
107 net-print/foo2zjs
108 net-print/cups-pdf
109 ) )
110 samba? ( >=net-fs/samba-3.0.8 )
111 virtual/ghostscript"
112
113 PROVIDE="virtual/lpr"
114
115 # upstream includes an interactive test which is a nono for gentoo.
116 # therefore, since the printing herd has bigger fish to fry, for now,
117 # we just leave it out, even if FEATURES=test
118 RESTRICT="test"
119
120 S="${WORKDIR}/${MY_P}"
121
122 LANGS="de en es et fr he id it ja pl sv zh_TW"
123 for X in ${LANGS} ; do
124 IUSE="${IUSE} linguas_${X}"
125 done
126
127 pkg_setup() {
128 if use avahi && ! built_with_use net-dns/avahi mdnsresponder-compat ; then
129 echo
130 eerror "In order to have cups working with avahi zeroconf support, you need"
131 eerror "to have net-dns/avahi emerged with \"mdnsresponder-compat\" in your USE"
132 eerror "flag. Please add that flag, re-emerge avahi, and then emerge cups again."
133 die "net-dns/avahi is missing the mdnsresponder-compat feature."
134 fi
135
136 enewgroup lp
137 enewuser lp -1 -1 -1 lp
138
139 enewgroup lpadmin 106
140 }
141
142 src_unpack() {
143 unpack ${A}
144 cd "${S}"
145
146 # disable configure automagic for acl/attr, upstream bug STR #2723
147 epatch "${FILESDIR}/${PN}-1.3.0-configure.patch"
148
149 # create a missing symlink to allow https printing via IPP, bug #217293
150 epatch "${FILESDIR}/${PN}-1.3.7-backend-https.patch"
151
152 # security bug #249727
153 epatch "${FILESDIR}/${PN}-1.3.9-CVE-2008-5286.patch"
154
155 # cups does not use autotools "the usual way" and ship a static config.h.in
156 eaclocal
157 eautoconf
158 }
159
160 src_compile() {
161 # needed to prevent ghostscript compile failures
162 use kerberos && strip-flags
163
164 # locale support
165 strip-linguas ${LANGS}
166
167 if [ -z "${LINGUAS}" ] ; then
168 export LINGUAS=all
169 fi
170
171 export DSOFLAGS="${LDFLAGS}"
172
173 if use ldap ; then
174 append-flags -DLDAP_DEPRECATED
175 fi
176
177 local myconf
178
179 if use avahi || use zeroconf ; then
180 myconf="${myconf} --enable-dnssd"
181 else
182 myconf="${myconf} --disable-dnssd"
183 fi
184
185 if use ssl || use gnutls ; then
186 myconf="${myconf} \
187 $(use_enable gnutls) \
188 $(use_enable !gnutls openssl)"
189 else
190 myconf="${myconf} \
191 --disable-gnutls \
192 --disable-openssl"
193 fi
194
195 econf \
196 --libdir=/usr/$(get_libdir) \
197 --localstatedir=/var \
198 --with-cups-user=lp \
199 --with-cups-group=lp \
200 --with-docdir=/usr/share/cups/html \
201 --with-languages=${LINGUAS} \
202 --with-system-groups=lpadmin \
203 --with-xinetd=/etc/xinetd.d \
204 $(use_enable acl) \
205 $(use_enable dbus) \
206 $(use_enable jpeg) \
207 $(use_enable kerberos gssapi) \
208 $(use_enable ldap) \
209 $(use_enable pam) \
210 $(use_enable png) \
211 $(use_enable slp) \
212 $(use_enable static) \
213 $(use_enable tiff) \
214 $(use_with java) \
215 $(use_with perl) \
216 $(use_with php) \
217 $(use_with python) \
218 --enable-libpaper \
219 --enable-threads \
220 --disable-pdftops \
221 ${myconf}
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,README}.txt || die "dodoc install failed"
235
236 # clean out cups init scripts
237 rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups}
238
239 # install our init script
240 local neededservices
241 use avahi && neededservices="$neededservices avahi-daemon"
242 use dbus && neededservices="$neededservices dbus"
243 use zeroconf && ! use avahi && neededservices="$neededservices mDNSResponderPosix"
244 [[ -n ${neededservices} ]] && neededservices="need${neededservices}"
245 sed -e "s/@neededservices@/$neededservices/" "${FILESDIR}"/cupsd.init.d > "${T}"/cupsd
246 doinitd "${T}"/cupsd
247
248 # install our pam script
249 pamd_mimic_system cups auth account
250
251 if use xinetd ; then
252 # correct path
253 sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" "${D}"/etc/xinetd.d/cups-lpd
254 # it is safer to disable this by default, bug #137130
255 grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \
256 sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd
257 else
258 rm -rf "${D}"/etc/xinetd.d
259 fi
260
261 # install pdftops filter
262 exeinto /usr/libexec/cups/filter/
263 newexe "${FILESDIR}"/pdftops-1.20.gentoo pdftops
264
265 # only for gs-esp this is correct, see bug #163897
266 if has_version app-text/ghostscript-gpl || has_version app-text/ghostscript-gnu ; then
267 sed -i -e "s:#application/vnd.cups-postscript:application/vnd.cups-postscript:" "${D}"/etc/cups/mime.convs
268 fi
269
270 keepdir /usr/share/cups/profiles /usr/libexec/cups/driver /var/log/cups \
271 /var/run/cups/certs /var/cache/cups /var/spool/cups/tmp /etc/cups/ssl
272
273 # .desktop handling. X useflag. xdg-open from freedesktop is preferred, upstream bug STR #2724.
274 if use X ; then
275 sed -i -e "s:htmlview:xdg-open:" "${D}"/usr/share/applications/cups.desktop
276 else
277 rm -r "${D}"/usr/share/applications
278 fi
279
280 # fix a symlink collision, see bug #172341
281 dodir /usr/share/ppd
282 dosym /usr/share/ppd /usr/share/cups/model/foomatic-ppds
283
284 # create RSS feed directory
285 diropts -m 0740 -o lp -g lp
286 dodir /var/cache/cups/rss
287
288 # create /etc/cups/client.conf, bug #196967
289 echo "ServerName localhost" >> "${D}"/etc/cups/client.conf
290 }
291
292 pkg_preinst() {
293 # cleanups
294 [ -n "${PN}" ] && rm -fR "${ROOT}"/usr/share/doc/"${PN}"-*
295 has_version "=${CATEGORY}/${PN}-1.2*"
296 upgrade_from_1_2=$?
297 }
298
299 pkg_postinst() {
300 echo
301 elog "For information about installing a printer and general cups setup"
302 elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml"
303 echo
304
305 local good_gs=false
306 for x in app-text/ghostscript-gpl app-text/ghostscript-gnu app-text/ghostscript-esp ; do
307 if has_version ${x} && built_with_use ${x} cups ; then
308 good_gs=true
309 break
310 fi
311 done
312 if ! ${good_gs} ; then
313 echo
314 ewarn "You need to emerge ghostscript with the \"cups\" USE flag turned on."
315 echo
316 fi
317
318 if [[ $upgrade_from_1_2 = 0 ]] ; then
319 echo
320 ewarn "You have upgraded from an older cups version. Please make sure"
321 ewarn "to run \"etc-update\" and \"revdep-rebuild\" NOW."
322 echo
323 fi
324
325 if [ -e "${ROOT}"/usr/lib/cups ] ; then
326 echo
327 ewarn "/usr/lib/cups exists - You need to remerge every ebuild that"
328 ewarn "installed into /usr/lib/cups and /etc/cups, qfile is in portage-utils:"
329 ewarn "# FEATURES=-collision-protect emerge -va1 \$(qfile -qC /usr/lib/cups /etc/cups | sed \"s:net-print/cups$::\")"
330 echo
331 ewarn "FEATURES=-collision-protect is needed to overwrite the compatibility"
332 ewarn "symlinks installed by this package, it won't be needed on later merges."
333 ewarn "You should also run revdep-rebuild"
334 echo
335
336 # place symlinks to make the update smoothless
337 for i in "${ROOT}"/usr/lib/cups/{backend,filter}/* ; do
338 if [ "${i/\*}" == "${i}" ] && ! [ -e ${i/lib/libexec} ] ; then
339 ln -s ${i} ${i/lib/libexec}
340 fi
341 done
342 fi
343 }