diff options
author | Daniel Solano Gómez <gentoo@sattvik.com> | 2011-09-01 08:35:34 -0500 |
---|---|---|
committer | Daniel Solano Gómez <gentoo@sattvik.com> | 2011-09-01 08:35:34 -0500 |
commit | 0675585c50b904a808f5db83fc25f9dce6f6a7f9 (patch) | |
tree | 199348b5ff4db7278e19c3db35719ac8136f3dbb /net-print | |
parent | Add security fix from portage (diff) | |
download | sattvik-0675585c50b904a808f5db83fc25f9dce6f6a7f9.tar.gz sattvik-0675585c50b904a808f5db83fc25f9dce6f6a7f9.tar.bz2 sattvik-0675585c50b904a808f5db83fc25f9dce6f6a7f9.zip |
Security updates
Diffstat (limited to 'net-print')
-rw-r--r-- | net-print/cups/ChangeLog | 9 | ||||
-rw-r--r-- | net-print/cups/Manifest | 7 | ||||
-rw-r--r-- | net-print/cups/cups-1.4.8-r22.ebuild | 299 | ||||
-rw-r--r-- | net-print/cups/cups-1.5.0-r2.ebuild | 301 | ||||
-rw-r--r-- | net-print/cups/files/cups-1.4.8-CVE-2011-3170.patch (renamed from net-print/cups/files/cups-1.4.8-CVE-2011-2896.patch) | 0 | ||||
-rw-r--r-- | net-print/cups/files/cups-1.4.8-largeimage.patch | 18 |
6 files changed, 632 insertions, 2 deletions
diff --git a/net-print/cups/ChangeLog b/net-print/cups/ChangeLog index 4ca16c6..edfcad4 100644 --- a/net-print/cups/ChangeLog +++ b/net-print/cups/ChangeLog @@ -2,6 +2,15 @@ # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ +*cups-1.5.0-r2 (01 Sep 2011) +*cups-1.4.8-r22 (01 Sep 2011) + + 01 Sep 2011; Daniel Solano Gómez <gentoo@sattvik.com> + +cups-1.4.8-r22.ebuild, -files/cups-1.4.8-CVE-2011-2896.patch, + +files/cups-1.4.8-CVE-2011-3170.patch, +files/cups-1.4.8-largeimage.patch, + +cups-1.5.0-r2.ebuild: + Security updates. + *cups-1.5.0-r1 (26 Aug 2011) *cups-1.4.8-r21 (26 Aug 2011) *cups-1.4.8-r1 (26 Aug 2011) diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest index 51c4975..28aefc3 100644 --- a/net-print/cups/Manifest +++ b/net-print/cups/Manifest @@ -17,7 +17,8 @@ AUX cups-1.4.4-php-destdir.patch 679 RMD160 1b15d42373a952a608a01cb8c97efbbd3c78 AUX cups-1.4.6-force-gnutls.patch 3319 RMD160 c6cc024a702305eb81661d5cdadd9857e9a6778e SHA1 5ac62ed3ca20bc7a4541c990c676c433299b2177 SHA256 beb4014eac5218d9f424b81946ac1e209625026bf20a7f4820758e5ee1fe5b66 AUX cups-1.4.6-serialize-gnutls.patch 3625 RMD160 873b2806cfec732c4a4f3f2981f666a958dd5b0e SHA1 aae046121d0139fbba1cb9147c8742f73b2f1fa0 SHA256 6bc9e16fc6865b2f3e0ee2d1947bdde691e41f90fce32b9839b3661dcea4a827 AUX cups-1.4.6-web-hang.patch 1749 RMD160 ff8d4cfa10a5de5a911c8672313904f50b13fd0f SHA1 f37a3fb7d71a6d56bbb3e5e7a8cf74ca8cb19276 SHA256 f49cef2ce1f2eecdd8ee07d85f306a19375f6d48510763aa51e96a0c54ad27c5 -AUX cups-1.4.8-CVE-2011-2896.patch 1045 RMD160 9a27eb1ec34ced57da5bbe7c55261d8aa35b01c0 SHA1 6155d7c4b34ff6447a93aa56fa4b5958eb943202 SHA256 c94d49c3ff980b830874dae4158768554f87f429ae400838a605505aae350af6 +AUX cups-1.4.8-CVE-2011-3170.patch 1045 RMD160 9a27eb1ec34ced57da5bbe7c55261d8aa35b01c0 SHA1 6155d7c4b34ff6447a93aa56fa4b5958eb943202 SHA256 c94d49c3ff980b830874dae4158768554f87f429ae400838a605505aae350af6 +AUX cups-1.4.8-largeimage.patch 572 RMD160 62e0a92fb1dc62adff43bcdc22f201da426d8916 SHA1 1528f2b1f67e7c532418dd7f495db1788ae7d2d4 SHA256 364a3ed3e161ad75836e6bc56746c25207680ab6f44563219c93146f0cf74541 AUX cups-1.5.0-group_fix.patch 1774 RMD160 cd6b98deecbc8e6f92fdf24f6682c3426a4512b2 SHA1 501ada69a9607c7831f827277c5691b34392d519 SHA256 88a7d41298a43fd2004ef6d40690333c6a1e9c1da4251ac9f23b659e91a6559f AUX cupsd.init.d 293 RMD160 19fbef21cee7e472e7028f3101b680baa0089c54 SHA1 e6b27b2638fec258fe2f55c926c2530e909ca3d2 SHA256 b4268a6bae95e96b6af21c3716ecc905073736ce7dc33be1489d574a447f3c48 AUX pdftops-1.20.gentoo 10412 RMD160 16e229662c47e03af1d1f4cb5764a76d17a66642 SHA1 6afb8a655b6ff013a2c8c8cbfb615ba1e561503b SHA256 ac5fa01ca776d75bd7cef62eef9f6b0c3945ee87e8950b40ca9f9f3ff46a16c1 @@ -29,6 +30,8 @@ EBUILD cups-1.3.11-r4.ebuild 8230 RMD160 06cae988bc72fd05846e74c736798294c948ea1 EBUILD cups-1.4.6-r2.ebuild 7302 RMD160 ae4b79035d1bffde784e6e93e03787f7eaaf4cc6 SHA1 a8dbbd84a26884bf88c3da27234c86bab011d471 SHA256 feba1310274d9a11b2966c0e22498e3eec44aff2f342a24e53428b1c7031d4ae EBUILD cups-1.4.8-r1.ebuild 7271 RMD160 30e28628bf40bdb1f97d83842602f85ddefdd55f SHA1 f3e22d3acc56ec0dbb52955d84e49774c4c100b0 SHA256 6d2a1b411640c112a3cb52b48efd497c962ad49b4e578f00b3f55bb51143e88c EBUILD cups-1.4.8-r21.ebuild 8546 RMD160 cd52fe0c515ad712c7b4bc647407a59670ebb129 SHA1 4998452cee59b0a66a26c87ac1dce1429671d78f SHA256 6c4736f93a247345c85c777edecbd134c7c6834ecb11c040bc264c5ae3872cb7 +EBUILD cups-1.4.8-r22.ebuild 8564 RMD160 10ac049fd78cd10eeb1e8b90f30ebc49bee43bb9 SHA1 ade38fdfc3048857dba8ebe5bae1f5297a5af397 SHA256 fd676171a9dae7c172d78ef9635b4151a399d9ba1a71b504811dd213ea207ae1 EBUILD cups-1.5.0-r1.ebuild 8402 RMD160 b9cf922902bd1c0406707ef53393afe604c430ff SHA1 e3da70103a35b663871bae9af7a21d1b53991831 SHA256 ee3c66adc7a68975dde759782810c83544effba7cf60455099a90a4e86c364a1 -MISC ChangeLog 3045 RMD160 58ad0e6a02b69e72513270a9794de8e2da43e58e SHA1 3f3097ba5241ef11f45350d26c7b01d7897cf828 SHA256 efd68ffc5d25b8d40882b2e51ca7f522b24b5e34e47e38db7076e09f76e322c9 +EBUILD cups-1.5.0-r2.ebuild 8420 RMD160 113de2ef9f4b8171d4e64e9c60118169a544f9ed SHA1 f4fc1727da5d24f3642b0e7a4ca9936145f87e9c SHA256 41430b7755d8f5ad839fd9d2dc5819ffa7cb14ab1e14a416c033e20016e01298 +MISC ChangeLog 3350 RMD160 6e3f6851d001fd7c85f02d148d50b8a22b9c212f SHA1 fadd9a23593abce2d4fe3e1e84da80bdd5d33fcb SHA256 9cba216ddf6eab3ce73d1b7833024dc3733308164eeedd75acbc74e91092e453 MISC metadata.xml 586 RMD160 73a1f1c0096d5035dfa53207b00c125894f6822a SHA1 123501263490cab57af2b99f2336fb70c094d9b0 SHA256 3b729c497ee38452b1ca051b759f43b5f9e117f9c36c0f3b660e4bd8ab7c295b diff --git a/net-print/cups/cups-1.4.8-r22.ebuild b/net-print/cups/cups-1.4.8-r22.ebuild new file mode 100644 index 0000000..e1e929c --- /dev/null +++ b/net-print/cups/cups-1.4.8-r22.ebuild @@ -0,0 +1,299 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.4.8-r22.ebuild,v 1.1 2011/08/28 23:20:47 dilfridge Exp $ + +EAPI=3 + +PYTHON_DEPEND="python? 2:2.5" + +inherit autotools eutils flag-o-matic linux-info multilib pam perl-module python versionator java-pkg-opt-2 + +MY_P=${P/_} + +DESCRIPTION="The Common Unix Printing System" +HOMEPAGE="http://www.cups.org/" +SRC_URI="mirror://easysw/${PN}/${PV}/${MY_P}-source.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="acl dbus debug gnutls java +jpeg kerberos ldap pam perl php +png python samba slp +ssl static-libs +threads +tiff usb X xinetd" + +LANGS="da de es eu fi fr id it ja ko nl no pl pt pt_BR ru sv zh zh_TW" +for X in ${LANGS} ; do + IUSE="${IUSE} linguas_${X}" +done + +RDEPEND=" + app-text/libpaper + acl? ( + kernel_linux? ( + sys-apps/acl + sys-apps/attr + ) + ) + dbus? ( sys-apps/dbus ) + java? ( >=virtual/jre-1.6 ) + jpeg? ( virtual/jpeg:0 ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap[ssl?,gnutls?] ) + pam? ( virtual/pam ) + perl? ( dev-lang/perl ) + php? ( dev-lang/php ) + png? ( >=media-libs/libpng-1.4.3 ) + slp? ( >=net-libs/openslp-1.0.4 ) + ssl? ( + gnutls? ( + dev-libs/libgcrypt + net-libs/gnutls + ) + !gnutls? ( >=dev-libs/openssl-0.9.8g ) + ) + tiff? ( >=media-libs/tiff-3.5.5 ) + usb? ( virtual/libusb:0 ) + X? ( x11-misc/xdg-utils ) + xinetd? ( sys-apps/xinetd ) + !net-print/cupsddk +" + +DEPEND="${RDEPEND} + dev-util/pkgconfig +" + +PDEPEND=" + app-text/ghostscript-gpl[cups] + >=app-text/poppler-0.12.3-r3[utils] +" + +# upstream includes an interactive test which is a nono for gentoo. +RESTRICT="test" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup lp + enewuser lp -1 -1 -1 lp + enewgroup lpadmin 106 + + # python 3 is no-go + if use python; then + python_set_active_version 2 + python_pkg_setup + fi + + if use usb; then + elog "You are going to use new libusb backed to access your usb printer." + elog "This interface has quite few known issues and does not report all" + elog "issues and just refuses to print." + elog "Please consider disabling usb useflag if you are having issues." + elog + elog "Please note that if you disable the usb useflag your device will be" + elog "still working using kernel usblp interface instead of libusb." + echo + fi + + linux-info_pkg_setup + if ! linux_config_exists; then + ewarn "Can't check the linux kernel configuration." + ewarn "You might have some incompatible options enabled." + else + # recheck that we don't have usblp to collide with libusb + if use usb; then + if linux_chkconfig_present USB_PRINTER; then + eerror "Your usb printers will be managed via libusb which collides with kernel module." + eerror "${P} requires the USB_PRINTER support disabled." + eerror "Please disable it:" + eerror " CONFIG_USB_PRINTER=n" + eerror "in /usr/src/linux/.config or" + eerror " Device Drivers --->" + eerror " USB support --->" + eerror " [ ] USB Printer support" + eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)." + fi + else + #here we should warn user that he should enable it so he can print + if ! linux_chkconfig_present USB_PRINTER; then + ewarn "If you plan to use USB printers you should enable the USB_PRINTER" + ewarn "support in your kernel." + ewarn "Please enable it:" + ewarn " CONFIG_USB_PRINTER=y" + ewarn "in /usr/src/linux/.config or" + ewarn " Device Drivers --->" + ewarn " USB support --->" + ewarn " [*] USB Printer support" + ewarn "Alternatively, enable the usb useflag for cups and use the new, less-tested libusb code." + fi + fi + fi +} + +src_prepare() { + # create a missing symlink to allow https printing via IPP, bug #217293 + epatch "${FILESDIR}/${PN}-1.4.0-backend-https.patch" + # various build time fixes + epatch "${FILESDIR}/${PN}-1.4.4-dont-compress-manpages.patch" + epatch "${FILESDIR}/${PN}-1.4.4-fix-install-perms.patch" + epatch "${FILESDIR}/${PN}-1.4.4-nostrip.patch" + epatch "${FILESDIR}/${PN}-1.4.4-php-destdir.patch" + epatch "${FILESDIR}/${PN}-1.4.4-perl-includes.patch" + epatch "${FILESDIR}/${PN}-1.4.6-force-gnutls.patch" + epatch "${FILESDIR}/${PN}-1.4.6-serialize-gnutls.patch" + epatch "${FILESDIR}/${PN}-1.4.8-largeimage.patch" + # security fixes + epatch "${FILESDIR}/${PN}-1.4.8-CVE-2011-3170.patch" + + # Dan's group fix + epatch "${FILESDIR}/${PN}-1.4.1-group_fix.patch" + + AT_M4DIR=config-scripts eaclocal + eautoconf +} + +src_configure() { + export DSOFLAGS="${LDFLAGS}" + + # locale support + strip-linguas ${LANGS} + if [ -z "${LINGUAS}" ] ; then + export LINGUAS=none + fi + + local myconf + if use ssl || use gnutls ; then + myconf+=" + $(use_enable gnutls) + $(use_enable !gnutls openssl) + " + else + myconf+=" + --disable-gnutls + --disable-openssl + " + fi + + # bug 352252, recheck for later versions if still necessary.... + if use gnutls && ! use threads ; then + ewarn "The useflag gnutls requires also threads enabled. Switching on threads." + fi + if use gnutls || use threads ; then + myconf+=" --enable-threads " + else + myconf+=" --disable-threads " + fi + + econf \ + --libdir=/usr/$(get_libdir) \ + --localstatedir=/var \ + --with-cups-user=lp \ + --with-cups-group=lp \ + --with-docdir=/usr/share/cups/html \ + --with-languages="${LINGUAS}" \ + --with-pdftops=/usr/bin/pdftops \ + --with-system-groups=lpadmin \ + $(use_enable acl) \ + $(use_enable dbus) \ + $(use_enable debug) \ + $(use_enable debug debug-guards) \ + $(use_enable jpeg) \ + $(use_enable kerberos gssapi) \ + $(use_enable ldap) \ + $(use_enable pam) \ + $(use_enable png) \ + $(use_enable slp) \ + $(use_enable static-libs static) \ + $(use_enable tiff) \ + $(use_enable usb libusb) \ + $(use_with java) \ + $(use_with perl) \ + $(use_with php) \ + $(use_with python) \ + $(use_with xinetd xinetd /etc/xinetd.d) \ + --enable-libpaper \ + --disable-dnssd \ + ${myconf} + + # install in /usr/libexec always, instead of using /usr/lib/cups, as that + # makes more sense when facing multilib support. + sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs || die + sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h || die + sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config || die +} + +src_compile() { + emake || die "emake failed" + + if use perl ; then + cd "${S}"/scripting/perl + perl-module_src_prep + perl-module_src_compile + fi + + if use php ; then + cd "${S}"/scripting/php + emake || die "emake php failed" + fi +} + +src_install() { + emake BUILDROOT="${D}" install || die "emake install failed" + dodoc {CHANGES,CREDITS,README}.txt || die "dodoc install failed" + + if use perl ; then + cd "${S}"/scripting/perl + perl-module_src_install + fixlocalpod + fi + + if use php ; then + cd "${S}"/scripting/php + emake DESTDIR="${D}" install || die "emake install for php bindings failed" + fi + + # clean out cups init scripts + rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups} + + # install our init script + local neededservices + use dbus && neededservices+=" dbus" + [[ -n ${neededservices} ]] && neededservices="need${neededservices}" + cp "${FILESDIR}"/cupsd.init.d "${T}"/cupsd || die + sed -i \ + -e "s/@neededservices@/$neededservices/" \ + "${T}"/cupsd || die + doinitd "${T}"/cupsd || die "doinitd failed" + + # install our pam script + pamd_mimic_system cups auth account + + if use xinetd ; then + # correct path + sed -i \ + -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \ + "${D}"/etc/xinetd.d/cups-lpd || die + # it is safer to disable this by default, bug #137130 + grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \ + { sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd || die ; } + # write permission for file owner (root), bug #296221 + fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed" + else + rm -rf "${D}"/etc/xinetd.d + fi + + keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ + /var/cache/cups /var/cache/cups/rss /var/log/cups /var/run/cups/certs \ + /var/spool/cups/tmp + + keepdir /etc/cups/{interfaces,ppd,ssl} + + use X || rm -r "${D}"/usr/share/applications + + # create /etc/cups/client.conf, bug #196967 and #266678 + echo "ServerName /var/run/cups/cups.sock" >> "${D}"/etc/cups/client.conf +} + +pkg_postinst() { + echo + elog "For information about installing a printer and general cups setup" + elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml" + echo +} diff --git a/net-print/cups/cups-1.5.0-r2.ebuild b/net-print/cups/cups-1.5.0-r2.ebuild new file mode 100644 index 0000000..35b124d --- /dev/null +++ b/net-print/cups/cups-1.5.0-r2.ebuild @@ -0,0 +1,301 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.5.0-r2.ebuild,v 1.1 2011/08/28 23:20:47 dilfridge Exp $ + +# +# See http://git.overlays.gentoo.org/gitweb/?p=dev/dilfridge.git;a=blob;f=net-print/cups/notes.txt;hb=HEAD +# for some notes about the ongoing work here +# + +EAPI=3 + +PYTHON_DEPEND="python? 2:2.5" + +inherit autotools eutils flag-o-matic linux-info multilib pam perl-module python versionator java-pkg-opt-2 + +MY_P=${P/_} +MY_PV=${PV/_} + +DESCRIPTION="The Common Unix Printing System" +HOMEPAGE="http://www.cups.org/" +SRC_URI="mirror://easysw/${PN}/${MY_PV}/${MY_P}-source.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="acl dbus debug gnutls java +jpeg kerberos ldap pam perl php +png python samba slp +ssl static-libs +threads +tiff usb X xinetd" + +LANGS="da de es eu fi fr id it ja ko nl no pl pt pt_BR ru sv zh zh_TW" +for X in ${LANGS} ; do + IUSE="${IUSE} linguas_${X}" +done + +RDEPEND=" + app-text/libpaper + acl? ( + kernel_linux? ( + sys-apps/acl + sys-apps/attr + ) + ) + dbus? ( sys-apps/dbus ) + java? ( >=virtual/jre-1.6 ) + jpeg? ( virtual/jpeg:0 ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap[ssl?,gnutls?] ) + pam? ( virtual/pam ) + perl? ( dev-lang/perl ) + php? ( dev-lang/php ) + png? ( >=media-libs/libpng-1.4.3 ) + slp? ( >=net-libs/openslp-1.0.4 ) + ssl? ( + gnutls? ( + dev-libs/libgcrypt + >=net-libs/gnutls-2.11 + ) + !gnutls? ( >=dev-libs/openssl-0.9.8g ) + ) + tiff? ( >=media-libs/tiff-3.5.5 ) + usb? ( virtual/libusb:0 ) + X? ( x11-misc/xdg-utils ) + xinetd? ( sys-apps/xinetd ) + !net-print/cupsddk +" + +DEPEND="${RDEPEND} + dev-util/pkgconfig +" + +PDEPEND=" + app-text/ghostscript-gpl[cups] + >=app-text/poppler-0.12.3-r3[utils] +" + +# upstream includes an interactive test which is a nono for gentoo. +RESTRICT="test" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup lp + enewuser lp -1 -1 -1 lp + enewgroup lpadmin 106 + + # python 3 is no-go + if use python; then + python_set_active_version 2 + python_pkg_setup + fi + + if use usb; then + elog "You are going to use new libusb backed to access your usb printer." + elog "This interface has quite few known issues and does not report all" + elog "issues and just refuses to print." + elog "Please consider disabling usb useflag if you are having issues." + elog + elog "Please note that if you disable the usb useflag your device will be" + elog "still working using kernel usblp interface instead of libusb." + echo + fi + + linux-info_pkg_setup + if ! linux_config_exists; then + ewarn "Can't check the linux kernel configuration." + ewarn "You might have some incompatible options enabled." + else + # recheck that we don't have usblp to collide with libusb + if use usb; then + if linux_chkconfig_present USB_PRINTER; then + eerror "Your usb printers will be managed via libusb which collides with kernel module." + eerror "${P} requires the USB_PRINTER support disabled." + eerror "Please disable it:" + eerror " CONFIG_USB_PRINTER=n" + eerror "in /usr/src/linux/.config or" + eerror " Device Drivers --->" + eerror " USB support --->" + eerror " [ ] USB Printer support" + eerror "Alternatively, just disable the usb useflag for cups (your printer will still work)." + fi + else + #here we should warn user that he should enable it so he can print + if ! linux_chkconfig_present USB_PRINTER; then + ewarn "If you plan to use USB printers you should enable the USB_PRINTER" + ewarn "support in your kernel." + ewarn "Please enable it:" + ewarn " CONFIG_USB_PRINTER=y" + ewarn "in /usr/src/linux/.config or" + ewarn " Device Drivers --->" + ewarn " USB support --->" + ewarn " [*] USB Printer support" + ewarn "Alternatively, enable the usb useflag for cups and use the new, less-tested libusb code." + fi + fi + fi +} + +src_prepare() { + # various build time fixes + epatch "${FILESDIR}/${PN}-1.4.4-dont-compress-manpages.patch" + epatch "${FILESDIR}/${PN}-1.4.4-fix-install-perms.patch" + epatch "${FILESDIR}/${PN}-1.4.4-nostrip.patch" + epatch "${FILESDIR}/${PN}-1.4.4-php-destdir.patch" + epatch "${FILESDIR}/${PN}-1.4.4-perl-includes.patch" + epatch "${FILESDIR}/${PN}-1.4.8-largeimage.patch" + # security fixes + epatch "${FILESDIR}/${PN}-1.4.8-CVE-2011-3170.patch" + + # Dan's group fix + epatch "${FILESDIR}/${PN}-1.5.0-group_fix.patch" + + AT_M4DIR=config-scripts eaclocal + eautoconf +} + +src_configure() { + export DSOFLAGS="${LDFLAGS}" + + # locale support + strip-linguas ${LANGS} + if [ -z "${LINGUAS}" ] ; then + export LINGUAS=none + fi + + local myconf + if use ssl || use gnutls ; then + myconf+=" + $(use_enable gnutls) + $(use_enable !gnutls openssl) + " + else + myconf+=" + --disable-gnutls + --disable-openssl + " + fi + + # bug 352252, recheck for later versions if still necessary.... + if use gnutls && ! use threads ; then + ewarn "The useflag gnutls requires also threads enabled. Switching on threads." + fi + if use gnutls || use threads ; then + myconf+=" --enable-threads " + else + myconf+=" --disable-threads " + fi + + econf \ + --libdir=/usr/$(get_libdir) \ + --localstatedir=/var \ + --with-cups-user=lp \ + --with-cups-group=lp \ + --with-docdir=/usr/share/cups/html \ + --with-languages="${LINGUAS}" \ + --with-pdftops=/usr/bin/pdftops \ + --with-system-groups=lpadmin \ + $(use_enable acl) \ + $(use_enable dbus) \ + $(use_enable debug) \ + $(use_enable debug debug-guards) \ + $(use_enable jpeg) \ + $(use_enable kerberos gssapi) \ + $(use_enable ldap) \ + $(use_enable pam) \ + $(use_enable png) \ + $(use_enable slp) \ + $(use_enable static-libs static) \ + $(use_enable tiff) \ + $(use_enable usb libusb) \ + $(use_with java) \ + $(use_with perl) \ + $(use_with php) \ + $(use_with python) \ + $(use_with xinetd xinetd /etc/xinetd.d) \ + --enable-libpaper \ + --disable-dnssd \ + ${myconf} + + # install in /usr/libexec always, instead of using /usr/lib/cups, as that + # makes more sense when facing multilib support. + sed -i -e 's:SERVERBIN.*:SERVERBIN = "$(BUILDROOT)"/usr/libexec/cups:' Makedefs || die + sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h || die + sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config || die +} + +src_compile() { + emake || die "emake failed" + + if use perl ; then + cd "${S}"/scripting/perl + perl-module_src_prep + perl-module_src_compile + fi + + if use php ; then + cd "${S}"/scripting/php + emake || die "emake php failed" + fi +} + +src_install() { + emake BUILDROOT="${D}" install || die "emake install failed" + dodoc {CHANGES,CREDITS,README}.txt || die "dodoc install failed" + + if use perl ; then + cd "${S}"/scripting/perl + perl-module_src_install + fixlocalpod + fi + + if use php ; then + cd "${S}"/scripting/php + emake DESTDIR="${D}" install || die "emake install for php bindings failed" + fi + + # clean out cups init scripts + rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups} + + # install our init script + local neededservices + use dbus && neededservices+=" dbus" + [[ -n ${neededservices} ]] && neededservices="need${neededservices}" + cp "${FILESDIR}"/cupsd.init.d "${T}"/cupsd || die + sed -i \ + -e "s/@neededservices@/$neededservices/" \ + "${T}"/cupsd || die + doinitd "${T}"/cupsd || die "doinitd failed" + + # install our pam script + pamd_mimic_system cups auth account + + if use xinetd ; then + # correct path + sed -i \ + -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \ + "${D}"/etc/xinetd.d/cups-lpd || die + # it is safer to disable this by default, bug #137130 + grep -w 'disable' "${D}"/etc/xinetd.d/cups-lpd || \ + { sed -i -e "s:}:\tdisable = yes\n}:" "${D}"/etc/xinetd.d/cups-lpd || die ; } + # write permission for file owner (root), bug #296221 + fperms u+w /etc/xinetd.d/cups-lpd || die "fperms failed" + else + rm -rf "${D}"/etc/xinetd.d + fi + + keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ + /var/cache/cups /var/cache/cups/rss /var/log/cups /var/run/cups/certs \ + /var/spool/cups/tmp + + keepdir /etc/cups/{interfaces,ppd,ssl} + + use X || rm -r "${D}"/usr/share/applications + + # create /etc/cups/client.conf, bug #196967 and #266678 + echo "ServerName /var/run/cups/cups.sock" >> "${D}"/etc/cups/client.conf +} + +pkg_postinst() { + echo + elog "For information about installing a printer and general cups setup" + elog "take a look at: http://www.gentoo.org/doc/en/printing-howto.xml" + echo +} diff --git a/net-print/cups/files/cups-1.4.8-CVE-2011-2896.patch b/net-print/cups/files/cups-1.4.8-CVE-2011-3170.patch index 843456f..843456f 100644 --- a/net-print/cups/files/cups-1.4.8-CVE-2011-2896.patch +++ b/net-print/cups/files/cups-1.4.8-CVE-2011-3170.patch diff --git a/net-print/cups/files/cups-1.4.8-largeimage.patch b/net-print/cups/files/cups-1.4.8-largeimage.patch new file mode 100644 index 0000000..abf0b44 --- /dev/null +++ b/net-print/cups/files/cups-1.4.8-largeimage.patch @@ -0,0 +1,18 @@ +Index: filter/image.c +=================================================================== +--- filter/image.c (Revision 9872) ++++ filter/image.c (Revision 9873) +@@ -349,9 +349,10 @@ + * Load the image as appropriate... + */ + +- img->max_ics = CUPS_TILE_MINIMUM; +- img->xppi = 128; +- img->yppi = 128; ++ img->cachefile = -1; ++ img->max_ics = CUPS_TILE_MINIMUM; ++ img->xppi = 128; ++ img->yppi = 128; + + if (!memcmp(header, "GIF87a", 6) || !memcmp(header, "GIF89a", 6)) + status = _cupsImageReadGIF(img, fp, primary, secondary, saturation, hue, |