diff options
author | 2007-12-18 20:57:23 +0000 | |
---|---|---|
committer | 2007-12-18 20:57:23 +0000 | |
commit | bb042ae3cf84e435cbe8cbdab48cfb4cf2c38f02 (patch) | |
tree | 4fd1cc41355281d1d6368485a47fade78dc6f7e0 /net-print | |
parent | Sparc stable, Bug #202664 (in the tree 18 months, no bugs but enhancement (diff) | |
download | historical-bb042ae3cf84e435cbe8cbdab48cfb4cf2c38f02.tar.gz historical-bb042ae3cf84e435cbe8cbdab48cfb4cf2c38f02.tar.bz2 historical-bb042ae3cf84e435cbe8cbdab48cfb4cf2c38f02.zip |
Add cups ebuilds with security fixes for bug #201042 and bug #201570. Cleanup older ones.
Package-Manager: portage-2.1.4_rc10
RepoMan-Options: --force
Diffstat (limited to 'net-print')
-rw-r--r-- | net-print/cups/ChangeLog | 12 | ||||
-rw-r--r-- | net-print/cups/Manifest | 46 | ||||
-rw-r--r-- | net-print/cups/cups-1.1.23-r8.ebuild | 32 | ||||
-rw-r--r-- | net-print/cups/cups-1.2.12-r4.ebuild | 228 | ||||
-rw-r--r-- | net-print/cups/cups-1.3.5.ebuild (renamed from net-print/cups/cups-1.3.4-r3.ebuild) | 14 | ||||
-rw-r--r-- | net-print/cups/files/cups-1.2.12-CVE-2007-5849.patch | 45 | ||||
-rw-r--r-- | net-print/cups/files/digest-cups-1.1.23-r8 | 0 | ||||
-rw-r--r-- | net-print/cups/files/digest-cups-1.2.12-r4 | 3 | ||||
-rw-r--r-- | net-print/cups/files/digest-cups-1.3.4-r3 | 3 | ||||
-rw-r--r-- | net-print/cups/files/digest-cups-1.3.5 | 3 | ||||
-rw-r--r-- | net-print/cups/files/pdftops-1.20.gentoo | 340 |
11 files changed, 666 insertions, 60 deletions
diff --git a/net-print/cups/ChangeLog b/net-print/cups/ChangeLog index 9da7ad801277..cbd6cfd52a9a 100644 --- a/net-print/cups/ChangeLog +++ b/net-print/cups/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for net-print/cups # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.278 2007/12/10 17:53:30 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.279 2007/12/18 20:57:22 tgurr Exp $ + +*cups-1.3.5 (18 Dec 2007) +*cups-1.2.12-r4 (18 Dec 2007) + + 18 Dec 2007; Timo Gurr <tgurr@gentoo.org> + +files/cups-1.2.12-CVE-2007-5849.patch, +files/pdftops-1.20.gentoo, + -cups-1.1.23-r8.ebuild, +cups-1.2.12-r4.ebuild, -cups-1.3.4-r3.ebuild, + +cups-1.3.5.ebuild: + Add cups ebuilds with security fixes for bug #201042 and bug #201570. + Cleanup older ones. 10 Dec 2007; Raúl Porcel <armin76@gentoo.org> cups-1.2.12-r3.ebuild: alpha/ia64 stable wrt security #199195 diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest index 14cd67c3b176..e34a6336eca1 100644 --- a/net-print/cups/Manifest +++ b/net-print/cups/Manifest @@ -6,6 +6,10 @@ AUX cups-1.2.0-bindnow.patch 2178 RMD160 cdf51a6734c7a38fab33f270c7c374445a93432 MD5 17610ba395fa28cc46fe4be7d45c0a44 files/cups-1.2.0-bindnow.patch 2178 RMD160 cdf51a6734c7a38fab33f270c7c374445a934321 files/cups-1.2.0-bindnow.patch 2178 SHA256 0fffd86557fdfbf85e32781d1b77f9696e5f0ed7eb30a78fb57ca82cfafdc190 files/cups-1.2.0-bindnow.patch 2178 +AUX cups-1.2.12-CVE-2007-5849.patch 1017 RMD160 0fd58946d8cfca13460ad07bfde670a3319fe1ff SHA1 4c4cb69d857427de43b5b91b5aceb7cb157be530 SHA256 9288292457f8c8de77b04eab651b547dd6506a03453ed93294577e2fb4f3c67b +MD5 11a864728cc749dec957587a4282a0b2 files/cups-1.2.12-CVE-2007-5849.patch 1017 +RMD160 0fd58946d8cfca13460ad07bfde670a3319fe1ff files/cups-1.2.12-CVE-2007-5849.patch 1017 +SHA256 9288292457f8c8de77b04eab651b547dd6506a03453ed93294577e2fb4f3c67b files/cups-1.2.12-CVE-2007-5849.patch 1017 AUX cups-1.2.4-CVE-2007-4045.patch 1737 RMD160 6c239b26443af6cf841a457cc5611a2f78d809c3 SHA1 02c2bd1bf58204fd9e1b380f8899dae2f98c2fed SHA256 0e4898b7e42f74f894b416a1398d75bcf6062497a87e061984f09e904f68489e MD5 9aee4dabde90a5edd9e484289209ad5f files/cups-1.2.4-CVE-2007-4045.patch 1737 RMD160 6c239b26443af6cf841a457cc5611a2f78d809c3 files/cups-1.2.4-CVE-2007-4045.patch 1737 @@ -30,17 +34,17 @@ AUX cupsd.init.d 293 RMD160 19fbef21cee7e472e7028f3101b680baa0089c54 SHA1 e6b27b MD5 a1fb32d0f7745bada3c45acbf883bd93 files/cupsd.init.d 293 RMD160 19fbef21cee7e472e7028f3101b680baa0089c54 files/cupsd.init.d 293 SHA256 b4268a6bae95e96b6af21c3716ecc905073736ce7dc33be1489d574a447f3c48 files/cupsd.init.d 293 +AUX pdftops-1.20.gentoo 10412 RMD160 16e229662c47e03af1d1f4cb5764a76d17a66642 SHA1 6afb8a655b6ff013a2c8c8cbfb615ba1e561503b SHA256 ac5fa01ca776d75bd7cef62eef9f6b0c3945ee87e8950b40ca9f9f3ff46a16c1 +MD5 50f93dee63d29b428c82405bae8e7aee files/pdftops-1.20.gentoo 10412 +RMD160 16e229662c47e03af1d1f4cb5764a76d17a66642 files/pdftops-1.20.gentoo 10412 +SHA256 ac5fa01ca776d75bd7cef62eef9f6b0c3945ee87e8950b40ca9f9f3ff46a16c1 files/pdftops-1.20.gentoo 10412 AUX pdftops.pl 5552 RMD160 8c73e4a5bb5ae5a7eafb59b25ec483279dad90d4 SHA1 9c57044a5e1c716fb4b6cdb70d827c35bc0e82c1 SHA256 aeaca40973d4a4df2212e73820f96272923e23717a69b0bf738896a5fc04df25 MD5 768f46bf3324308e2cf45c8a68aa7408 files/pdftops.pl 5552 RMD160 8c73e4a5bb5ae5a7eafb59b25ec483279dad90d4 files/pdftops.pl 5552 SHA256 aeaca40973d4a4df2212e73820f96272923e23717a69b0bf738896a5fc04df25 files/pdftops.pl 5552 DIST cups-1.2.10-source.tar.bz2 3618084 RMD160 85b3bbd46a6fc097891c571ffad8e5e46693743f SHA1 241d7a3c52370fb08ed2ffc3fd8f59673d158299 SHA256 601b3b9256c55361477427c3e8db56c9ee4e141762814aea590bcf110a95bb36 DIST cups-1.2.12-source.tar.bz2 3788301 RMD160 598270e37ff8a9b9ff1e667066d6f7e120493e32 SHA1 11a540f76a1d3164b6636bf8ba47928803ad9356 SHA256 b4ff8e934da7db32d5654360ea9068faa0ed5a00fde02161ae53c2052510d00f -DIST cups-1.3.4-source.tar.bz2 4082345 RMD160 30dd2925507a0c83513ee887debecb4bad1ddb53 SHA1 f8b1bf6fc807a2a35f5d2eb0ec0d67398417779c SHA256 91581afc60aa0a6789b1c0373bc204d3b7deec5b608cc3cadc8c07d0ba749154 -EBUILD cups-1.1.23-r8.ebuild 891 RMD160 a1db30ce4119e11d41e994e88e4a9392595c4c35 SHA1 4b9b43722f4da2c7aac3f1221ec010698c435b23 SHA256 dacad11592871abd81d050cb2021f08f10d9eb1129a925522eeddd0516108ec5 -MD5 68940f81d3a286adef981b40549e34a8 cups-1.1.23-r8.ebuild 891 -RMD160 a1db30ce4119e11d41e994e88e4a9392595c4c35 cups-1.1.23-r8.ebuild 891 -SHA256 dacad11592871abd81d050cb2021f08f10d9eb1129a925522eeddd0516108ec5 cups-1.1.23-r8.ebuild 891 +DIST cups-1.3.5-source.tar.bz2 4082098 RMD160 c6157e552e833447e623175a4e90146ceb9d9ba4 SHA1 f0f7674b46e00582f327765acd4133a6035d393e SHA256 3a8ef866ffe2d5aac6a601770d27cfefec3ba40e19b1550ca4c1eb1ab27f19d1 EBUILD cups-1.2.10-r1.ebuild 6316 RMD160 396839aec0fe91130450f8c4bdc5df0598a5ae29 SHA1 cd93dc57e11bea80747b9984929f06bd81542ab7 SHA256 b7dc3e71cd9fa05d9f51274e6c9158ccaf4ad5558de57dbf2b34f1c5cc0de95b MD5 683374c073f1791ca3bfe1a3447b71f8 cups-1.2.10-r1.ebuild 6316 RMD160 396839aec0fe91130450f8c4bdc5df0598a5ae29 cups-1.2.10-r1.ebuild 6316 @@ -53,21 +57,22 @@ EBUILD cups-1.2.12-r3.ebuild 7085 RMD160 d9820681a1094f806094901f1924d3570263ed2 MD5 272bca0ff3c90cdd9e42cea733bee70a cups-1.2.12-r3.ebuild 7085 RMD160 d9820681a1094f806094901f1924d3570263ed2d cups-1.2.12-r3.ebuild 7085 SHA256 2917d740364ef5b11cb6bfa9f0fef8b4fbec115f82e0be96dc3d0aa1c3456c01 cups-1.2.12-r3.ebuild 7085 -EBUILD cups-1.3.4-r3.ebuild 8034 RMD160 beb20452ff25029bac84c2395687110c0e2eefb7 SHA1 8e8eced71d808af79a0ab6721ad8370e5bc9b125 SHA256 76c2b7f3fe56e4d5ad3cf1fe1a7af5d5025fa44a7efb512b28bdd7a8369a210d -MD5 b1bdc1da18141ef378d8853bdf504cc3 cups-1.3.4-r3.ebuild 8034 -RMD160 beb20452ff25029bac84c2395687110c0e2eefb7 cups-1.3.4-r3.ebuild 8034 -SHA256 76c2b7f3fe56e4d5ad3cf1fe1a7af5d5025fa44a7efb512b28bdd7a8369a210d cups-1.3.4-r3.ebuild 8034 -MISC ChangeLog 39397 RMD160 76dba16ffb1e3d1fb0326ab84b4763e475fbeca3 SHA1 c5dabcd0535ee7136b99de540a01eb0e0a71ebc3 SHA256 eeff137525fe228f45bd984b0217ed298664c4c7b9c542fe967851cf1e8418f5 -MD5 20929d7cf35cc728e66911945f414cd5 ChangeLog 39397 -RMD160 76dba16ffb1e3d1fb0326ab84b4763e475fbeca3 ChangeLog 39397 -SHA256 eeff137525fe228f45bd984b0217ed298664c4c7b9c542fe967851cf1e8418f5 ChangeLog 39397 +EBUILD cups-1.2.12-r4.ebuild 7052 RMD160 acb4445604dc3bee98bf27902b52159045538283 SHA1 d856e58e8c63b21283f06e3ac386bf6a0ec8c2a3 SHA256 eed1488c959ea5c2f9755d0199a0ddb9cc0494c19249348ff6d4c79dfbe7693c +MD5 35d965bf7bd1111ef12fa41855e0ba01 cups-1.2.12-r4.ebuild 7052 +RMD160 acb4445604dc3bee98bf27902b52159045538283 cups-1.2.12-r4.ebuild 7052 +SHA256 eed1488c959ea5c2f9755d0199a0ddb9cc0494c19249348ff6d4c79dfbe7693c cups-1.2.12-r4.ebuild 7052 +EBUILD cups-1.3.5.ebuild 8133 RMD160 4eddaed74267ff5ece73d572d35fa9909a9e6f09 SHA1 8b997732b5257f43daef00198688f343a960edae SHA256 51badda769193341fc04ae202c653892de92be38cd8a7a523cabce585d31b415 +MD5 9ac230819c299f28e20251aa0860fb0e cups-1.3.5.ebuild 8133 +RMD160 4eddaed74267ff5ece73d572d35fa9909a9e6f09 cups-1.3.5.ebuild 8133 +SHA256 51badda769193341fc04ae202c653892de92be38cd8a7a523cabce585d31b415 cups-1.3.5.ebuild 8133 +MISC ChangeLog 39756 RMD160 ab491cac57540b69e88fa821d5c3c40e0342cdc4 SHA1 a4e47f6ad247e6bd4c3aeacb1524dc0978b42396 SHA256 30f67a6e27becb75fb6f165928063f7c849534f04222df931a741f422681825e +MD5 42f3ce371fbd63c18ca76ce571c7a79a ChangeLog 39756 +RMD160 ab491cac57540b69e88fa821d5c3c40e0342cdc4 ChangeLog 39756 +SHA256 30f67a6e27becb75fb6f165928063f7c849534f04222df931a741f422681825e ChangeLog 39756 MISC metadata.xml 161 RMD160 1e5b1e42553c8869b93c4a5448e9a2a2ed9fe525 SHA1 209c6a46e4cdd891980115e42ba419e3799f8088 SHA256 7c85e6739a71f5bb23e8de36c88677d772946e61f7285892f7554e37bd2bca76 MD5 26b4b081d538c195dc39bcb2ec8e6f3a metadata.xml 161 RMD160 1e5b1e42553c8869b93c4a5448e9a2a2ed9fe525 metadata.xml 161 SHA256 7c85e6739a71f5bb23e8de36c88677d772946e61f7285892f7554e37bd2bca76 metadata.xml 161 -MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-cups-1.1.23-r8 0 -RMD160 9c1185a5c5e9fc54612808977ee8f548b2258d31 files/digest-cups-1.1.23-r8 0 -SHA256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 files/digest-cups-1.1.23-r8 0 MD5 126e6284164bd1c1cc5fc98f1b3f1089 files/digest-cups-1.2.10-r1 262 RMD160 73673bf65cd75f7e5b15918308b45477ce244a5e files/digest-cups-1.2.10-r1 262 SHA256 66f16eee78c2442511803e6de89563a1f32ff0150e604904a123b2b222f0e3b3 files/digest-cups-1.2.10-r1 262 @@ -77,6 +82,9 @@ SHA256 1ed8553b6b83c34074f536128d9794fdbd11070a6091353722bb0cc5d4e625df files/di MD5 422be1a8808e7fb306fcc6872c874a9b files/digest-cups-1.2.12-r3 262 RMD160 af6b2363980a1e6323b89c87f8a25598b7730897 files/digest-cups-1.2.12-r3 262 SHA256 1ed8553b6b83c34074f536128d9794fdbd11070a6091353722bb0cc5d4e625df files/digest-cups-1.2.12-r3 262 -MD5 77aecc8383995af24a8b9f15a4402f54 files/digest-cups-1.3.4-r3 259 -RMD160 b001cfa2371621a0f315bab77bb8c78976f0c150 files/digest-cups-1.3.4-r3 259 -SHA256 a330b10cc5bfd0ba11fab682de999eccf42232d850e0b8d996cb2abecbc0f8e0 files/digest-cups-1.3.4-r3 259 +MD5 422be1a8808e7fb306fcc6872c874a9b files/digest-cups-1.2.12-r4 262 +RMD160 af6b2363980a1e6323b89c87f8a25598b7730897 files/digest-cups-1.2.12-r4 262 +SHA256 1ed8553b6b83c34074f536128d9794fdbd11070a6091353722bb0cc5d4e625df files/digest-cups-1.2.12-r4 262 +MD5 88efa94d4c374e0299645c241a5a0a64 files/digest-cups-1.3.5 259 +RMD160 4859246e4ef85318b2a29d39e1a417c77050ea4e files/digest-cups-1.3.5 259 +SHA256 5d823eb9a6a8897c14afd245230f4d267e77fccc4c9bbc1e41545906e22b5ee7 files/digest-cups-1.3.5 259 diff --git a/net-print/cups/cups-1.1.23-r8.ebuild b/net-print/cups/cups-1.1.23-r8.ebuild deleted file mode 100644 index 8b5ef086cf32..000000000000 --- a/net-print/cups/cups-1.1.23-r8.ebuild +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.1.23-r8.ebuild,v 1.10 2007/11/05 22:00:57 mr_bones_ Exp $ - -# This ebuild is just kept here to not break the tree for mips stable - -# UNMAINTAINED -# UNMAINTAINED -# _ _ _ _ _ _ ____ _ _ _ ___ ____ _ _ _ ____ ___ -# | | |\ | |\/| |__| | |\ | | |__| | |\ | |___ | \ -# |__| | \| | | | | | | \| | | | | | \| |___ |__/ -# UNMAINTAINED -# UNMAINTAINED - -DESCRIPTION="The Common Unix Printing System" -HOMEPAGE="http://www.cups.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="mips" -IUSE="" - -S=${WORKDIR}/${MY_P} - -pkg_setup() { - eerror - eerror "this version is unmaintained, old, and has many bugs - not only security bugs" - eerror - eerror "It does not work, please use a newer version" - die "Please use newer version" -} diff --git a/net-print/cups/cups-1.2.12-r4.ebuild b/net-print/cups/cups-1.2.12-r4.ebuild new file mode 100644 index 000000000000..548ab173d90f --- /dev/null +++ b/net-print/cups/cups-1.2.12-r4.ebuild @@ -0,0 +1,228 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.2.12-r4.ebuild,v 1.1 2007/12/18 20:57:22 tgurr Exp $ + +WANT_AUTOMAKE=latest + +inherit autotools eutils flag-o-matic multilib pam + +MY_P=${P/_} + +DESCRIPTION="The Common Unix Printing System" +HOMEPAGE="http://www.cups.org/" +SRC_URI="mirror://sourceforge/cups/${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="ldap ssl slp pam php samba nls dbus tiff png ppds jpeg X" + +DEP="pam? ( virtual/pam ) + ssl? ( net-libs/gnutls ) + slp? ( >=net-libs/openslp-1.0.4 ) + ldap? ( net-nds/openldap ) + dbus? ( sys-apps/dbus ) + png? ( >=media-libs/libpng-1.2.1 ) + tiff? ( >=media-libs/tiff-3.5.5 ) + jpeg? ( >=media-libs/jpeg-6b ) + php? ( dev-lang/php ) + app-text/libpaper" +DEPEND="${DEP} + !<net-print/foomatic-filters-ppds-20070501 + !<net-print/hplip-1.7.4a-r1 + nls? ( sys-devel/gettext )" +RDEPEND="${DEP} + nls? ( virtual/libintl ) + !virtual/lpr + >=app-text/poppler-0.4.3-r1 + X? ( x11-misc/xdg-utils )" + +PDEPEND=" + ppds? ( || ( + ( + net-print/foomatic-filters-ppds + net-print/foomatic-db-ppds + ) + net-print/foomatic-filters-ppds + net-print/foomatic-db-ppds + net-print/hplip + media-gfx/gimp-print + net-print/foo2zjs + net-print/cups-pdf + ) ) + samba? ( >=net-fs/samba-3.0.8 ) + virtual/ghostscript" +PROVIDE="virtual/lpr" + +# upstream includes an interactive test which is a nono for gentoo. +# therefore, since the printing herd has bigger fish to fry, for now, +# we just leave it out, even if FEATURES=test +RESTRICT="test" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + if use x86 && [ -d "/usr/lib64" ] + then + eerror "You are running an x86 system, but /usr/lib64 exists, cups will install all library objects into this directory!" + eerror "You should remove /usr/lib64, but before you do, you should check for existing objects, and re-compile all affected packages." + eerror "You can use qfile (emerge portage-utils to install qfile) to get a list of the affected ebuilds:" + eerror "# qfile -qC /usr/lib64" + die "lib64 on x86 detected" + fi + + enewgroup lp + enewuser lp -1 -1 -1 lp + + enewgroup lpadmin 106 +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # upstream does not acknowledge bindnow as a solution + epatch "${FILESDIR}"/cups-1.2.0-bindnow.patch + + # CVE-2007-4351 security patch, bug #196736 + epatch "${FILESDIR}"/${PN}-1.2-str2561-v2.patch + # CVE-2007-4045 security patch, bug #199195 + epatch "${FILESDIR}"/${PN}-1.2.4-CVE-2007-4045.patch + # CVE-2007-5849 security patch, bug #201570 + epatch "${FILESDIR}"/${PN}-1.2.12-CVE-2007-5849.patch + + # cups does not use autotools "the usual way" and ship a static config.h.in + eaclocal + eautoconf +} + +src_compile() { + export DSOFLAGS="${LDFLAGS}" + econf \ + --with-cups-user=lp \ + --with-cups-group=lp \ + --with-system-groups=lpadmin \ + --localstatedir=/var \ + --with-docdir=/usr/share/cups/html \ + --with-bindnow=$(bindnow-flags) \ + $(use_enable pam) \ + $(use_enable ssl) \ + --enable-gnutls \ + $(use_enable slp) \ + $(use_enable nls) \ + $(use_enable dbus) \ + $(use_enable png) \ + $(use_enable jpeg) \ + $(use_enable tiff) \ + $(use_with php) \ + $(use_enable ldap) \ + --enable-libpaper \ + --enable-threads \ + --enable-static \ + --disable-pdftops \ + || die "econf failed" + + # 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 + sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h + sed -i -e 's:cups_serverbin=.*:cups_serverbin=/usr/libexec/cups:' cups-config + + emake || die "emake failed" +} + +src_install() { + emake BUILDROOT="${D}" install || die "emake install failed" + dodoc {CHANGES{,-1.{0,1}},CREDITS,LICENSE,README}.txt + + # clean out cups init scripts + rm -rf "${D}"/etc/{init.d/cups,rc*,pam.d/cups} + # install our init scripts + newinitd "${FILESDIR}"/cupsd.init cupsd + # install our pam script + pamd_mimic_system cups auth account + + # correct path + sed -i -e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" "${D}"/etc/xinetd.d/cups-lpd + # 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 + + # install pdftops filter + exeinto /usr/libexec/cups/filter/ + newexe "${FILESDIR}"/pdftops-1.20.gentoo pdftops + + # only for gs-esp this is correct, see bug 163897 + if has_version app-text/ghostscript-gpl || has_version app-text/ghostscript-gnu; then + sed -i -e "s:#application/vnd.cups-postscript:application/vnd.cups-postscript:" "${D}"/etc/cups/mime.convs + fi + + keepdir /usr/share/cups/profiles /usr/libexec/cups/driver /var/log/cups \ + /var/run/cups/certs /var/cache/cups /var/spool/cups/tmp /etc/cups/ssl + + # .desktop handling. X useflag. xdg-open from freedesktop is preferred + if use X; then + sed -i -e "s:htmlview:xdg-open:" "${D}"/usr/share/applications/cups.desktop + else + rm -r "${D}"/usr/share/applications + fi + + # Fix a symlink collision, see bug #172341 + dodir /usr/share/ppd + dosym /usr/share/ppd /usr/share/cups/model/foomatic-ppds +} + +pkg_preinst() { + # cleanups + [ -n "${PN}" ] && rm -fR "${ROOT}"/usr/share/doc/${PN}-* +} + +pkg_postinst() { + echo + elog "Remote printing: change " + elog "Listen localhost:631" + elog "to" + elog "Listen *:631" + elog "in /etc/cups/cupsd.conf" + echo + elog "For more information about installing a printer take a look at:" + elog "http://www.gentoo.org/doc/en/printing-howto.xml." + echo + + local good_gs=false + for x in app-text/ghostscript-gpl app-text/ghostscript-gnu app-text/ghostscript-esp; do + if has_version ${x} && built_with_use ${x} cups; then + good_gs=true + break + fi + done; + if ! ${good_gs}; then + ewarn + ewarn "You need to emerge ghostscript with the \"cups\" USE flag turned on" + fi + if has_version =net-print/cups-1.1*; then + ewarn + ewarn "The configuration changed with cups-1.2, you may want to save the old" + ewarn "one and start from scratch:" + ewarn "# mv /etc/cups /etc/cups.orig; emerge -va1 cups" + ewarn + ewarn "You need to rebuild kdelibs for kdeprinter to work with cups-1.2" + fi + if [ -e "${ROOT}"/usr/lib/cups ]; then + ewarn + ewarn "/usr/lib/cups exists - You need to remerge every ebuild that" + ewarn "installed into /usr/lib/cups and /etc/cups, qfile is in portage-utils:" + ewarn "# FEATURES=-collision-protect emerge -va1 \$(qfile -qC /usr/lib/cups /etc/cups | sed \"s:net-print/cups$::\")" + ewarn + ewarn "FEATURES=-collision-protect is needed to overwrite the compatibility" + ewarn "symlinks installed by this package, it wont be needed on later merges." + ewarn "You should also run revdep-rebuild" + + # place symlinks to make the update smoothless + for i in "${ROOT}"/usr/lib/cups/{backend,filter}/*; do + if [ "${i/\*}" == "${i}" ] && ! [ -e ${i/lib/libexec} ]; then + ln -s ${i} ${i/lib/libexec} + fi + done + fi +} diff --git a/net-print/cups/cups-1.3.4-r3.ebuild b/net-print/cups/cups-1.3.5.ebuild index 7920e70bfdad..cc6b542fe64c 100644 --- a/net-print/cups/cups-1.3.4-r3.ebuild +++ b/net-print/cups/cups-1.3.5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.3.4-r3.ebuild,v 1.1 2007/11/16 20:13:07 tgurr Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-1.3.5.ebuild,v 1.1 2007/12/18 20:57:22 tgurr Exp $ inherit autotools eutils flag-o-matic multilib pam @@ -101,7 +101,7 @@ src_unpack() { epatch "${FILESDIR}/${PN}-1.3.0-configure.patch" # CVE-2007-4045 security patch, bug #199195 - epatch "${FILESDIR}/${P}-CVE-2007-4045.patch" + epatch "${FILESDIR}/${PN}-1.3.4-CVE-2007-4045.patch" # cups does not use autotools "the usual way" and ship a static config.h.in eaclocal @@ -160,7 +160,7 @@ src_compile() { ${myconf} \ || die "econf failed" - # Install in /usr/libexec always, instead of using /usr/lib/cups, as that + # 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 sed -i -e 's:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN "/usr/libexec/cups":' config.h @@ -196,7 +196,7 @@ src_install() { # install pdftops filter exeinto /usr/libexec/cups/filter/ - newexe "${FILESDIR}"/pdftops.pl pdftops + newexe "${FILESDIR}"/pdftops-1.20.gentoo pdftops # only for gs-esp this is correct, see bug 163897 if has_version app-text/ghostscript-gpl || has_version app-text/ghostscript-gnu; then @@ -213,9 +213,13 @@ src_install() { rm -r "${D}"/usr/share/applications fi - # Fix a symlink collision, see bug #172341 + # fix a symlink collision, see bug #172341 dodir /usr/share/ppd dosym /usr/share/ppd /usr/share/cups/model/foomatic-ppds + + # create RSS feed directory + diropts -m 0740 -o lp -g lp + dodir /var/cache/cups/rss } pkg_preinst() { diff --git a/net-print/cups/files/cups-1.2.12-CVE-2007-5849.patch b/net-print/cups/files/cups-1.2.12-CVE-2007-5849.patch new file mode 100644 index 000000000000..cc1c9067b904 --- /dev/null +++ b/net-print/cups/files/cups-1.2.12-CVE-2007-5849.patch @@ -0,0 +1,45 @@ +diff -Naur cups-1.3.4/backend/snmp.c cups-1.3.4.new/backend/snmp.c +--- cups-1.3.4/backend/snmp.c 2007-07-11 23:46:42.000000000 +0200 ++++ cups-1.3.4.new/backend/snmp.c 2007-12-10 12:56:12.680574919 +0100 +@@ -1064,18 +1064,38 @@ + char *string, /* I - String buffer */ + int strsize) /* I - String buffer size */ + { +- if (length < strsize) ++ if (length < 0) + { +- memcpy(string, *buffer, length); ++ /* ++ * Disallow negative lengths! ++ */ ++ ++ fprintf(stderr, "ERROR: Bad ASN1 string length %d!\n", length); ++ *string = '\0'; ++ } ++ else if (length < strsize) ++ { ++ /* ++ * String is smaller than the buffer... ++ */ ++ ++ if (length > 0) ++ memcpy(string, *buffer, length); ++ + string[length] = '\0'; + } + else + { ++ /* ++ * String is larger than the buffer... ++ */ ++ + memcpy(string, buffer, strsize - 1); + string[strsize - 1] = '\0'; + } + +- (*buffer) += length; ++ if (length > 0) ++ (*buffer) += length; + + return (string); + } diff --git a/net-print/cups/files/digest-cups-1.1.23-r8 b/net-print/cups/files/digest-cups-1.1.23-r8 deleted file mode 100644 index e69de29bb2d1..000000000000 --- a/net-print/cups/files/digest-cups-1.1.23-r8 +++ /dev/null diff --git a/net-print/cups/files/digest-cups-1.2.12-r4 b/net-print/cups/files/digest-cups-1.2.12-r4 new file mode 100644 index 000000000000..8073a9a92cbd --- /dev/null +++ b/net-print/cups/files/digest-cups-1.2.12-r4 @@ -0,0 +1,3 @@ +MD5 d410658468384b5ba5d04a808f6157fe cups-1.2.12-source.tar.bz2 3788301 +RMD160 598270e37ff8a9b9ff1e667066d6f7e120493e32 cups-1.2.12-source.tar.bz2 3788301 +SHA256 b4ff8e934da7db32d5654360ea9068faa0ed5a00fde02161ae53c2052510d00f cups-1.2.12-source.tar.bz2 3788301 diff --git a/net-print/cups/files/digest-cups-1.3.4-r3 b/net-print/cups/files/digest-cups-1.3.4-r3 deleted file mode 100644 index 991c8b77ff2e..000000000000 --- a/net-print/cups/files/digest-cups-1.3.4-r3 +++ /dev/null @@ -1,3 +0,0 @@ -MD5 4bd20d69bb083b42632346a383b6aefb cups-1.3.4-source.tar.bz2 4082345 -RMD160 30dd2925507a0c83513ee887debecb4bad1ddb53 cups-1.3.4-source.tar.bz2 4082345 -SHA256 91581afc60aa0a6789b1c0373bc204d3b7deec5b608cc3cadc8c07d0ba749154 cups-1.3.4-source.tar.bz2 4082345 diff --git a/net-print/cups/files/digest-cups-1.3.5 b/net-print/cups/files/digest-cups-1.3.5 new file mode 100644 index 000000000000..014824f91bde --- /dev/null +++ b/net-print/cups/files/digest-cups-1.3.5 @@ -0,0 +1,3 @@ +MD5 355705c528e9a8d0d439da15454d79a6 cups-1.3.5-source.tar.bz2 4082098 +RMD160 c6157e552e833447e623175a4e90146ceb9d9ba4 cups-1.3.5-source.tar.bz2 4082098 +SHA256 3a8ef866ffe2d5aac6a601770d27cfefec3ba40e19b1550ca4c1eb1ab27f19d1 cups-1.3.5-source.tar.bz2 4082098 diff --git a/net-print/cups/files/pdftops-1.20.gentoo b/net-print/cups/files/pdftops-1.20.gentoo new file mode 100644 index 000000000000..8fdafe34a674 --- /dev/null +++ b/net-print/cups/files/pdftops-1.20.gentoo @@ -0,0 +1,340 @@ +#!/usr/bin/perl -w +# pdftops.pl - wrapper script for xpdf's pdftops utility to act as a CUPS filter +# ============================================================================== +# 1.00 - 2004-10-05/Bl +# Initial implementation +# 1.10 - 2006-09-27/Bl +# Alternatively, use Adobe Reader in place of Xpdf's pdftops +# 1.20 - 2007-12-03/Bl +# Safe temp file creation (fix gentoo bug # 201042) +# +# Copyright: Helge Blischke / SRZ Berlin 2004-2006 +# This program is free seoftware and governed by the GNU Public License Version 2. +# +# Description: +# ------------ +# This program wraps the pdftops utility from the xpdf 3.00 (and higher) suite +# to behave as a CUPS filter as a replacement for the original pdftops filter. +# As an alternative the Adobe Reader may be used. +# +# The main purpose of this approach is to keep the properties of a PDF to be +# printed as undesturbed as possible, especially with respect to page size, +# scaling, and positioning. +# +# The pdftops utility reads a configuration file 'pdftops.conf' or 'acroread.conf', +# respectively, in the CUPS_SERVERROOT directory, which must exist but may be empty. +# The sample configuration file accompanying this program sets the defaults which +# seem plausible to me with respect to high end production printers. +# +# To give the user highest possible flexibility, this program accepts and +# evaluates a set of job attributes special to this filter, which are +# described below: +# +# pdf-pages=<f>,<l> +# expands to the -f and -l options of pdftops +# or the -start and -end options of acroread, respectively +# to select a page range to process. This is independent +# of the page-ranges attribute and may significantly +# increase throughput when printing page ranges. +# Either of these numbers may be omitted. +# +# pdf-paper=<name> +# For pdftops, <name> may be one of "letter", "legal", +# "A4", "A3", or "match"; for acroread, the permetted values +# are "letter", "legal", "tabloid", "ledger", "executive", +# "a3", "a4", "a5", "b4", "b5", respectively (without the +# quotes; the names are treated case independent). +# In case of acroread, no paper specification is equivalent +# to pdsftops's "match". +# pdf-paper=<width>x<height> +# <name> may be one of letter, legal , A4, A3, or match; +# <width> and <height> are the paper width and height +# in printers points (1/72 inch). This expands to +# either the -paper or the -paperh and -paperw options +# of pdftops or the -size option of acroread. +# +# pdf-opw=<password> +# pdf-upw=<password> +# expand to the -opw and -upw options of pdftops, +# respectively and permit printing of password +# protected PDFs. +# +# pdf-<option> where <option> is one of +# level1, level1sep, level2, level2sep, level3, level3sep, +# opi, nocrop, expand, noshrink, nocenter. +# See the pdftops manpage for a detailed description of +# the respective options. +# In case of acroread, the options level1, level?sep, opi, +# nocrop, noshrink, and nocenter are silently ignored. +# +# All other pdftops commandline options are refused. +# +# The return code of the pdftops utility or acroread, if nonzero, is used as the exit code +# of this program; error messages of the pdftops utility are only visible +# if 'debug' is specified as LogLevel in cupsd.conf. +# +# NOTE: +# ----- +# This wrapper script has been initially designed to use the original pdftops utility +# as a CUPS filter and now extended to alternately use acroread. +# But there are situations where you need to be able to select either variant, thus it +# is possible to configure the wrapper to both programs but select one of them by default; +# the other one then may be selected by command line option: +# +# use-pdftops selects pdftops +# use-acroread selects acroread +# +# if both are configured (by defining the appropriate configuration file). +# + +# +# Site specific parameters - modify as needed +# ---------------------------------------------------------------------------------- +$pdftops_path = "/usr/bin/pdftops"; # path to the xpdf utility +$acroread_path = "/opt/bin/acroread"; # path to Adobe Reader +$default_app = 'use-pdftops'; # the default if both are configured +$use_pdftops = 1; # default on gentoo and highly recommended +$use_acroread = 0; # not supported/working on gentoo yet, use at your own risk +# ---------------------------------------------------------------------------------- + +use File::Temp qw( tempfile ); + +# +# Check which app to use - pdftops or acroread +# +$rootdir = $ENV{CUPS_SERVERROOT} || die ("ERROR: CUPS server root directory undefined\n"); +$use_both = $use_pdftops && $use_acroread; + +# +# Check the arguments +# +die ("ERROR: wrong number of arguments\n") if (scalar @ARGV < 5); + +$jobid = $username = $title = $copies = undef; +$jobid = shift; # Job ID +$username = shift; # Job requesting user name +$title = shift; # Job title +$copies = shift; # Number of requested copies +$options = shift; # Textual representation of job attributes +$pdffile = shift; # Pathname of PDF file to process + +if (defined $use_both && $use_both) +{ + my $optstr = " $options "; + my $to_use = ''; + if ($optstr =~ /\s+(use-acroread|use-pdftops)\s+/) + { + $to_use = $1; + } + else + { + $to_use = $default_app; + } + if ($to_use eq 'use-acroread') + { + undef $use_pdftops; + } + elsif ($to_use eq 'use-pdftops') + { + undef $use_acroread; + } + else + { + die ("ERROR: cannot use both pdftops and acroread simultaneously\n"); + } +} + + +if (defined $use_pdftops) +{ + # If we are reading from STDIN, we must copy the input to a temporary file + # as the PDF consumer needs a seekable input. + if (! defined $pdffile) + { + my $template = "pdfinXXXXXX"; + my $tmpdir = $ENV{TMPDIR}; + my ($bytes, $buffer); + my ($tmpfh, $tmpfile) = tempfile ($template, OPEN => 1, DIR => $tmpdir, UNLINK => 0, SUFFIX => '.tmp'); + while (($bytes = read (STDIN, $buffer, 1024)) > 0) + { + print $tmpfh "$buffer"; + } + if ($bytes < 0) + { + close ($tmpfh); + unlink $tmpfile; + die ("ERROR: pdftops wrapper: $tmpfile: $!\n"); + } + close ($tmpfh); + $pdffile = $tmpfile; + $delete_input = 1; # for deleting the temp file after converting + } +} + + +# +# Check the options string for options to modify the bahaviour of the pdftops utility: +# +@optarr = split (/\s+/, $options); +if (defined $use_pdftops) +{ + $cmdopt = ""; # do not pass the -cfg argument to the poppler pdftops util + # The following are the (parameterless) command line options that may be used to change the + # defaults defiend by pdftops.conf + $simple = 'level1|level1sep|level2|level2sep|level3|level3sep|opi|nocrop|expand|noshrink|nocenter'; + %papernames = ( + 'letter' => '-paper letter', + 'tabloid' => '-paperw 792 -paperh 1224', + 'ledger' => '-paperw 1224 -paperh 792', + 'legal' => '-paper legal', + 'executive' => '-paperw 756 -paperh 522', + 'a3' => '-paper A3', + 'a4' => '-paper A4', + 'a5' => '-paperw 421 -paperh 595', + 'b4' => '-paperw 709 -paperh 1002', + 'b5' => '-paperw 501 -paperh 709', + 'match' => '-paper match' + ); +} +else +{ + open (CFG, "<$rootdir/acroread.conf") || die ("ERROR: acroread.conf: $!\n"); + $cmdopt = '-toPostScript'; + while (<CFG>) + { + chomp; + next if (/^\s*#/); # skip comment lines + next if (/^\s*$/); # skip blank lines + s/^-\s*//; # discard leading '-' and white space, as it will be generated later + s/\s+$//; # discard trailing white space + $cmdopt .= " -$_"; + } + close (CFG); + $simple = 'level1|level1sep|level2|level2sep|level3|level3sep|opi|nocrop|expand|noshrink|nocenter'; + %papernames = ( + 'letter' => '-size letter', + 'tabloid' => '-size tabloid', + 'ledger' => '-size ledger', + 'legal' => '-size legal', + 'executive' => '-size executive', + 'a3' => '-size a3', + 'a4' => '-size a4', + 'a5' => '-size a5', + 'b4' => '-size b4', + 'b5' => '-size b5', + 'match' => '' # this is the default with acroread + ); +} + +foreach my $option (@optarr) +{ + if ($option =~ /^pdf-(.+)$/) + { # We assume this is an option to evaluate + my $optkey = $1; # possible pdftops option + if ($optkey =~ /^pages=(\d*),(\d*)$/) + { + # We do this hack here to avoid clashes with the page-ranges atrribute + # which is handled by the pstops filter. And we allow one of the numbers + # to be omitted. + my $first = $1; + my $lastp = $2; + if (defined $use_pdftops) + { + $cmdopt .= " -f $1" if ($1); # first page + $cmdopt .= " -l $2" if ($2); # last page + } + else + { + $cmdopt .= " -start $1" if ($1); # first page + $cmdopt .= " -end $2" if ($2); # last page + } + } + elsif ($optkey =~ /^paper=(letter|tabloid|ledger|legal|[Aa]3|[Aa]4|[Aa]5|[Bb]4|[Bb]5|match)$/) + { + # evaluate paper name + my $paper = $1; + $paper =~ tr/A-Z/a-z/; + my $value = $papernames{$paper}; + $cmdopt .= " $value" if ($value); + } + elsif ($optkey =~ /^paper=(\d+)x(\d+)$/) + { + # evaluate paper dimensions + if (defined $use_pdftops) + { + $cmdopt .= " -paperw $1 -paperh $2"; + } + else + { + $cmdopt .= " -size $1" . 'x' . "$2"; + } + } + elsif ($optkey =~ /^(o|u)pw=(\S+)$/) + { + $cmdopt .= " $1" . 'pw ' . $2 if (defined $use_pdftops); # owner/user password + } + elsif ($optkey =~ /^($simple)$/) + { + my $thisopt = $1; + if (defined $use_pdftops) + { + $cmdopt .= ' -' . $1; # allowed simple options + } + else + { + $thisopt =~ s/sep$//; # ignore the ...sep suffix + if ($thisopt =~ /level1|opi|nocrop|nocenter/) + { + $thisopt = ''; + } + elsif ($thisopt eq 'noshrink') + { + $thisopt = ''; + $cmdopt =~ s/ -shrink//; + } + $cmdopt .= " -" . $thisopt if ($thisopt); + } + } + else + { + warn ("ERROR: pdftops wrapper: illegal attribute \"pdf-$optkey\"\n"); + } + } + # All other attributes are processed elsewhere +} +# +# Complete the command +# +if (defined $use_pdftops) +{ + warn ("ERROR: pdftops-options: $cmdopt\n"); +} +else +{ + warn ("ERROR: acroread-options: $cmdopt\n"); +} +if (defined $use_pdftops) +{ + $rc = system ("$pdftops_path $cmdopt $pdffile -"); +} +else +{ + if (defined $pdffile && $pdffile) + { + $rc = system ("$acroread_path $cmdopt < $pdffile") + } + else + { + $rc = system ("$acroread_path $cmdopt"); + } +} +if ($rc) +{ + $ir = $rc & 127; + $rc >>= 8; + my $temp = (defined $use_pdftops) ? $pdftops_path : $acroread_path; + warn ("ERROR: $temp exited with ", ($ir) ? "signal $ir, " : " exit code $rc", "\n"); + exit $rc; +} +unlink ($pdffile) if (defined $delete_input); # Delete the temp file if any +exit 0; |