diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2015-06-14 10:49:09 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2015-06-14 10:49:09 +0000 |
commit | 38d9a84b0471baf1259ebad928e7c52d8cae225b (patch) | |
tree | 69dc1f6bc41f29fe47e87cf71317670f23367b16 /net-print | |
parent | Switch to git. (diff) | |
download | historical-38d9a84b0471baf1259ebad928e7c52d8cae225b.tar.gz historical-38d9a84b0471baf1259ebad928e7c52d8cae225b.tar.bz2 historical-38d9a84b0471baf1259ebad928e7c52d8cae225b.zip |
Backport busy CPU loop on a poll(), bug #549732 by Joakim Tjernlund and Shiba.
Package-Manager: portage-2.2.20/cvs/Linux x86_64
Manifest-Sign-Key: 0x611FF3AA
Diffstat (limited to 'net-print')
-rw-r--r-- | net-print/cups/ChangeLog | 8 | ||||
-rw-r--r-- | net-print/cups/Manifest | 10 | ||||
-rw-r--r-- | net-print/cups/cups-2.0.2-r2.ebuild | 359 | ||||
-rw-r--r-- | net-print/cups/files/cups-2.0.2-poll-CPU-loop-STR-4605.patch | 48 |
4 files changed, 420 insertions, 5 deletions
diff --git a/net-print/cups/ChangeLog b/net-print/cups/ChangeLog index 1b9f6ac37c3d..6ab80f89c626 100644 --- a/net-print/cups/ChangeLog +++ b/net-print/cups/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-print/cups # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.675 2015/06/14 09:28:36 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.676 2015/06/14 10:49:08 slyfox Exp $ + +*cups-2.0.2-r2 (14 Jun 2015) + + 14 Jun 2015; Sergei Trofimovich <slyfox@gentoo.org> +cups-2.0.2-r2.ebuild, + +files/cups-2.0.2-poll-CPU-loop-STR-4605.patch: + Backport busy CPU loop on a poll(), bug #549732 by Joakim Tjernlund and Shiba. 14 Jun 2015; Sergei Trofimovich <slyfox@gentoo.org> cups-2.0.2-r1.ebuild: Allow user patching, bug #549732 by Joakim Tjernlund. diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest index 006fb6af7bca..902baeda9905 100644 --- a/net-print/cups/Manifest +++ b/net-print/cups/Manifest @@ -10,6 +10,7 @@ AUX cups-2.0.1-fix-compilation.patch 713 SHA256 adca276aa0ed4f4580da49a53f6301ec AUX cups-2.0.1-fix-linkage-to-gnutls.patch 456 SHA256 091f1ffee8e7cb7d05d6291ce3a38e00a2276e5c9068f1345d04c8222ec12612 SHA512 133c49a7fb912cdd8dab15607f08b31f2ed8d9b7eddaa1db7dad68b4118dcc62fc2cfc8a2288e813cf2a2b6a2f1fea283b50343906827e01020f5070aff12283 WHIRLPOOL 26c5302b181d2ac4916c42b8f68be6aed80e29654b82e12cc637e5ed564c8f0b7bfe7fcfa89c2b66fb33e22dba54b79c6fa463c72f478b5adade6d3f6d4b185e AUX cups-2.0.1-rename-systemd-service-files.patch 2818 SHA256 cca42237e7b12343b939519af9ca36de3e890cb0d8cccdeb2abfa0520b56285a SHA512 1efd772c9891f214a47eaafe90ffed09f8282a89953c13180957e83be7eabb4bf4b20f7f596891144e1f8b641497239c94fd8b35c01e16a368307c4dd92c1050 WHIRLPOOL 991fb45f3ac8402c4daa6b3fcf33e12e2b6938d00730f6258d13575812f50b13a5593d9dbc840e6ac391c07bc4a7f0646fa8a16b48e1714f8701cf60971165b9 AUX cups-2.0.1-xinetd-installation-fix.patch 332 SHA256 f533f03cac8f40bd0a1ca9eb91307781e7ae80be24fd1a48ead8133729c1b842 SHA512 e4111fb05ac381f5639868464734fbbc9296252bda288fc415274cb0eda37ff57d4d2816e34960a3e30a1c73c3aa6911267a5d2c29f1480d8e44fdb6e95f3836 WHIRLPOOL 1b4360e7aab326f0992d69941b69f604297eaafa3eb284b498c08bafdc5e72d107988f48986e7fe09d568a69726147cbc1baee99caefbbc1fbc3054453be63ef +AUX cups-2.0.2-poll-CPU-loop-STR-4605.patch 1520 SHA256 275435151b311de03514e26665f4d3542bed37b2d3e160ad8a8dbcc64caf153d SHA512 959081a768d3c5d4168989b5704e28bd85b7403a3fe2b188c9dfc9e33486f1934eec9c4929a3ec556776bdb0ec4f154db82349354d7ba94679f12e271bc77199 WHIRLPOOL 6021e1a1cd22811ce301a8ff34aa2d6415935dd2378c567e4843505d9d4c52ceb2e74cb6d69d95542de3b897652487829a974636e271681577b357892a5db7ad AUX cups-2.0.2-rename-systemd-service-files.patch 2092 SHA256 f6ef6f3fcbf96d383e7207130393660630a3c159b19d2c6a5437106e52bee1d6 SHA512 409a7508dccbbcfca60ba448f8cea84ecb2710890e7655c67b8292c34c8d555884e7e82e70c2c700691af1a786ce0d8c8c799b6fb471a18f1b87eda99eacd9cb WHIRLPOOL 388300e7e95fee7e6b1ed49885ae13ef79ad743b335d60f44e2745c75d4b203ac84401a9bda1a5e5a6a67c2a599243d8f2a9fd714a58ab76b74ca97041ca9a62 AUX cups-2.0.2-systemd-socket.patch 2390 SHA256 250d8c8bb406f2c0fff8c71b0e04c23610eb287ee4980a6597b727ef3ba7cbfd SHA512 221972ff8749fc8ee674bc4f1487f4e29b28d14494ee9ab177b86c5e042c342a004c6b22469f16687400bde8e40c7d82c923d8d3bbba1a072771f2b27a347a4e WHIRLPOOL 997f9a4fbe41f1ba9ed6bae6c48e4b8891f7c5cacee54a77d8ee105fe1bd4b0d3091ffecee97f7f9c926c547161569aeead44024576927e91031060c8cfdac66 AUX cupsd.init.d-r1 504 SHA256 4705b68372090ee7db69da1ad35131551ed1ba99032db2486ff6c31d2170ce6b SHA512 9eac4fc725b14615bb31c96a69c00a14ab2fb23fa355f1ced655f93e6364555b2710a277ceab439199a275405b016492b4c9183fab755c02354013e0904a03bc WHIRLPOOL e0ce34f4b73de6e63ba1f01b0df543cd66fecc692af8254acb3dd1147c0cd4e1f42ed7df4b18b26af0114db54c3b8c1bca526ed54146307223ac24a0b3d3502c @@ -23,14 +24,15 @@ EBUILD cups-1.7.9999.ebuild 10616 SHA256 70f36bd2e675e92f589047bb1f2248c8d93d998 EBUILD cups-2.0.0-r2.ebuild 10344 SHA256 fb3f9f6b4ab5c421ece4aa8e2029936b13e7ed6901c3484f8bd5e3e3135267c1 SHA512 6ee21cfa125c7f0744665bcdc01b181b79b6a6b9ce97b706afb16baf4a133f25f785bea9fb0e56895f3da9fbce96c96491e470223113cfe192fae4d10a7778c3 WHIRLPOOL ba2b0489b27473ede5d1fd6f4404761651581d90e2c7110f54a2e35753f13b8c6c0b5fcb023289ed7627092890b826056d69fc2717bd1fa96d1afdbab1fcc273 EBUILD cups-2.0.1-r1.ebuild 10518 SHA256 a6f94f410cdfa2a96e4a849296bc262a9e5e1cea1d11292d94809015ba48049b SHA512 d32312a0fa8d52e54e3dab9bab2e6c50d4216bf320de6a602849c187499a885e051ec262107281d9ac34bb341e280925a90321f72a21adb04216bb51a51e150d WHIRLPOOL 697edf75d089d90d81ea5757085f1379614fd2b6fdf2354a3cb630ef7ff53646fb134dc2463312634afbf3302df2bd7f204db9648dab9d9ecfcbc41b6d85d8d4 EBUILD cups-2.0.2-r1.ebuild 10501 SHA256 eac3653064be834c8f05ca457215867ab9a610154aa473cb73b7dab389c08acb SHA512 17f848db582f4a82115deeb10d8a82bd150a1c61c97d747e276fc7a47827ce225479109e6f60412c96cefe5365513dca6e4458e30c4eeb1777753d57543f88ed WHIRLPOOL 92376f30167b635f5816e476a1bf8dc5f7cb9142e9378a8f52e04d7e4ae34b2d82fcc9214a91d83dcb249a9ad2226b855ed141b3a23cb4c678ddfe449ddfa26d +EBUILD cups-2.0.2-r2.ebuild 10563 SHA256 4d2694cddc7f22f0f471fa7b2f9cf1e6cea319ed2748a91c879e011e8288d8fe SHA512 cce6f8fd454952e82a0d8b92e5c0f243b7b060aae0eadd1d58d51ff085df76a382f0142750232807d94ba8dc111114c08185c1115b0e4bba06133aa1855cd7f9 WHIRLPOOL b1c61c06bdd19f611450822366d37abda8bf4b71210ef020473519987070534e45679a5797f6882b45f62d6307d269c46f0d409784e9adaa6d6024bc8b349b08 EBUILD cups-2.0.2.ebuild 10351 SHA256 11c2e37a88f6be5888750d69cb27cbf75893563c21c00a4c799a21467b70a46e SHA512 1af1b857916c8063a2cfad76259652e61595a4ff2edc2c7c4b5c4079fbe68734c90845d1b2a552d7fdcf9c96756ba0de23bab4cce1a06ff7815b68df3cc10bfd WHIRLPOOL 2723754353571547ac19f7414fc1b310a424e94c2d4fe6ae91111f481fcd435161d26f91ea4d5d40bc6bda97eb719a4e403a8324002abb0c78c8101cc27b57d0 EBUILD cups-9999.ebuild 10351 SHA256 e25fdfff3311daf414c5dc99afde79667cf7a549bf85de5cf8824a495dd630a5 SHA512 49cfd816c505fcb190a7382c25efd84b20151bdda0344c357458fa9603d2a924e331f6e93e40d65fd8e45035196e344c44656dc815b1a6b481d71ab4b5daa94e WHIRLPOOL 8f24de7b1d214a8ceba57af4dc7460cf8ce55d5e2fea1fb52b44faa14f9661e9a3ec2a4c17bf1301defe2850fa33591844410afe2e44bdfcddc54a4866107d76 -MISC ChangeLog 102083 SHA256 5a6fe2c443f22f456feef0689f30e2e46965ec8d7f6ee40a66dc5ce1a5da6f6f SHA512 be7b7edeb84a6c7669220017613fcf31b4c600931e9d6bb0926eb4f3b93e40f413e298ce6fa2195d9284100d3c8977f1b5b7ccdc16cd58addf2ed83dd6912e11 WHIRLPOOL aa159f5914931f682f62307115f73693e988aebc096168c1b9361f18e17c408fa8b34001916160d243e9f8a0f836649b45618e1f95f594b4ba4cbc1057d47f9f +MISC ChangeLog 102322 SHA256 0793bfe2043b703ff323c13da9554ad15563753480ac302a54676b7c99a9b47e SHA512 70da08676df5f9a0dc52bffe808a2df9fbb9da4e414f853f4066b733ccf826264ed8db640c53bae168b2a48ef85e6be464e52d14a060522865d53ce5fc2d58d3 WHIRLPOOL c40f009a9b0f0247522c80bd1b2e76e3c6b39a3b4b27e54f546c3e67fd89db85556fd0a360f6cac5bf0618abba28919e3609673782f05463d49df101695e44b5 MISC metadata.xml 496 SHA256 732bba7ee060b7be5e0b23d06d24c12c2bfc1c6be1440cdfebe6d5d94d145c47 SHA512 713300abb461ad923c4f6e59326fa97b2372181df4ef82bf04dd6f2d68dc0eb7c34e518cbb40ebd535cb9c4bf52d2648512002cc2cb55c6f21406cc973fa4496 WHIRLPOOL 061013ee6ddaf510964589024e39c4a05f18f0a6d2488eb5b121bb962a378348e71261f7e153f34dbb33337a2e49eb7da94e52d0cb7a128d71e9b4466f8a5933 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iEYEAREIAAYFAlV9SUoACgkQcaHudmEf86oS2gCfTuG4Uab8nvLB+kRmJD6iLkd1 -Pm4AnjnU2pipZ0JyQUmPMs/Z0Z67MVzd -=Gu3W +iEYEAREIAAYFAlV9XCUACgkQcaHudmEf86oyyACghtSArhZgBVWX20LDm3XzgtKW +3m0An3cCvieY/yfrwlW0+6HunY3YYLp9 +=LbA0 -----END PGP SIGNATURE----- diff --git a/net-print/cups/cups-2.0.2-r2.ebuild b/net-print/cups/cups-2.0.2-r2.ebuild new file mode 100644 index 000000000000..f462637de206 --- /dev/null +++ b/net-print/cups/cups-2.0.2-r2.ebuild @@ -0,0 +1,359 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/cups-2.0.2-r2.ebuild,v 1.1 2015/06/14 10:49:08 slyfox Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit autotools base fdo-mime gnome2-utils flag-o-matic linux-info \ + multilib multilib-minimal pam python-single-r1 user versionator \ + java-pkg-opt-2 systemd toolchain-funcs + +MY_P=${P/_rc/rc} +MY_P=${MY_P/_beta/b} +MY_PV=${PV/_rc/rc} +MY_PV=${MY_PV/_beta/b} + +if [[ ${PV} == *9999 ]]; then + inherit git-r3 + EGIT_REPO_URI="http://www.cups.org/cups.git" + if [[ ${PV} != 9999 ]]; then + EGIT_BRANCH=branch-${PV/.9999} + fi +else + SRC_URI="http://www.cups.org/software/${MY_PV}/${MY_P}-source.tar.bz2" + KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint" +fi + +DESCRIPTION="The Common Unix Printing System" +HOMEPAGE="http://www.cups.org/" + +LICENSE="GPL-2" +SLOT="0" +IUSE="acl dbus debug java kerberos lprng-compat pam + python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf" + +LANGS="ca cs de es fr it ja pt_BR ru" +for X in ${LANGS} ; do + IUSE="${IUSE} +linguas_${X}" +done + +CDEPEND=" + app-text/libpaper + acl? ( + kernel_linux? ( + sys-apps/acl + sys-apps/attr + ) + ) + dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] ) + java? ( >=virtual/jre-1.6 ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + !lprng-compat? ( !net-print/lprng ) + pam? ( virtual/pam ) + python? ( ${PYTHON_DEPS} ) + ssl? ( + >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] + >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}] + ) + systemd? ( sys-apps/systemd ) + usb? ( virtual/libusb:1 ) + X? ( x11-misc/xdg-utils ) + xinetd? ( sys-apps/xinetd ) + zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20140508 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + ) +" + +DEPEND="${CDEPEND} + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] +" + +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-cups ) +" + +PDEPEND=" + app-text/ghostscript-gpl[cups] + app-text/poppler[utils] + >=net-print/cups-filters-1.0.43 +" + +REQUIRED_USE=" + python? ( ${PYTHON_REQUIRED_USE} ) + usb? ( threads ) +" + +# upstream includes an interactive test which is a nono for gentoo +RESTRICT="test" + +S="${WORKDIR}/${MY_P}" + +# systemd-socket.patch from Fedora +PATCHES=( + "${FILESDIR}/${PN}-1.6.0-dont-compress-manpages.patch" + "${FILESDIR}/${PN}-1.6.0-fix-install-perms.patch" + "${FILESDIR}/${PN}-1.4.4-nostrip.patch" + "${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch" + "${FILESDIR}/${PN}-2.0.2-systemd-socket.patch" + "${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch" + "${FILESDIR}/${PN}-2.0.2-poll-CPU-loop-STR-4605.patch" +) + +MULTILIB_CHOST_TOOLS=( + /usr/bin/cups-config +) + +pkg_setup() { + enewgroup lp + enewuser lp -1 -1 -1 lp + enewgroup lpadmin 106 + + use python && python-single-r1_pkg_setup + + if use kernel_linux; then + 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. In this case, " + 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 libusb code." + fi + fi + fi + fi +} + +src_prepare() { + base_src_prepare + epatch_user + + # Remove ".SILENT" rule for verbose output (bug 524338). + sed 's#^.SILENT:##g' -i "${S}"/Makedefs.in || die "sed failed" + + # Fix install-sh, posix sh does not have 'function'. + sed 's#function gzipcp#gzipcp()#g' -i "${S}/install-sh" + + AT_M4DIR=config-scripts eaclocal + eautoconf + + # custom Makefiles + multilib_copy_sources +} + +multilib_src_configure() { + export DSOFLAGS="${LDFLAGS}" + + einfo LANGS=\"${LANGS}\" + einfo LINGUAS=\"${LINGUAS}\" + + local myconf=() + + if tc-is-static-only; then + myconf+=( + --disable-shared + ) + fi + + # explicitly specify compiler wrt bug 524340 + # + # need to override KRB5CONFIG for proper flags + # https://www.cups.org/str.php?L4423 + econf \ + CC="$(tc-getCC)" \ + CXX="$(tc-getCXX)" \ + KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config \ + --libdir="${EPREFIX}"/usr/$(get_libdir) \ + --localstatedir="${EPREFIX}"/var \ + --with-rundir="${EPREFIX}"/run/cups \ + --with-cups-user=lp \ + --with-cups-group=lp \ + --with-docdir="${EPREFIX}"/usr/share/cups/html \ + --with-languages="${LINGUAS}" \ + --with-system-groups=lpadmin \ + --with-xinetd=/etc/xinetd.d \ + $(multilib_native_use_enable acl) \ + $(use_enable dbus) \ + $(use_enable debug) \ + $(use_enable debug debug-guards) \ + $(multilib_native_use_with java) \ + $(use_enable kerberos gssapi) \ + $(multilib_native_use_enable pam) \ + $(multilib_native_use_with python python "${PYTHON}") \ + $(use_enable static-libs static) \ + $(use_enable threads) \ + $(use_enable ssl gnutls) \ + $(use_enable systemd) \ + $(multilib_native_use_enable usb libusb) \ + $(use_enable zeroconf avahi) \ + --disable-dnssd \ + --without-perl \ + --without-php \ + $(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper) \ + "${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\)${EPREFIX}/usr/libexec/cups\":" Makedefs || die + sed -i -e "s:#define CUPS_SERVERBIN.*:#define CUPS_SERVERBIN \"${EPREFIX}/usr/libexec/cups\":" config.h || die + sed -i -e "s:cups_serverbin=.*:cups_serverbin=\"${EPREFIX}/usr/libexec/cups\":" cups-config || die +} + +multilib_src_compile() { + if multilib_is_native_abi; then + default + else + emake libs + fi +} + +multilib_src_test() { + multilib_is_native_abi && default +} + +multilib_src_install() { + if multilib_is_native_abi; then + emake BUILDROOT="${D}" install + else + emake BUILDROOT="${D}" install-libs install-headers + dobin cups-config + fi +} + +multilib_src_install_all() { + dodoc {CHANGES,CREDITS,README}.txt + + # move the default config file to docs + dodoc "${ED}"/etc/cups/cupsd.conf.default + rm -f "${ED}"/etc/cups/cupsd.conf.default + + # clean out cups init scripts + rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups} + + # install our init script + local neededservices + use zeroconf && neededservices+=" avahi-daemon" + use dbus && neededservices+=" dbus" + [[ -n ${neededservices} ]] && neededservices="need${neededservices}" + cp "${FILESDIR}"/cupsd.init.d-r1 "${T}"/cupsd || die + sed -i \ + -e "s/@neededservices@/$neededservices/" \ + "${T}"/cupsd || die + doinitd "${T}"/cupsd + + # 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:" \ + "${ED}"/etc/xinetd.d/cups-lpd || die + # it is safer to disable this by default, bug #137130 + grep -w 'disable' "${ED}"/etc/xinetd.d/cups-lpd || \ + { sed -i -e "s:}:\tdisable = yes\n}:" "${ED}"/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 + # always configure with --with-xinetd= and clean up later, + # bug #525604 + rm -rf "${ED}"/etc/xinetd.d + fi + + keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \ + /var/log/cups /var/spool/cups/tmp + + keepdir /etc/cups/{interfaces,ppd,ssl} + + use X || rm -r "${ED}"/usr/share/applications + + # create /etc/cups/client.conf, bug #196967 and #266678 + echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf + + # the following files are now provided by cups-filters: + rm -r "${ED}"/usr/share/cups/banners || die + rm -r "${ED}"/usr/share/cups/data/testprint || die + + # the following are created by the init script + rm -r "${ED}"/var/cache/cups || die + rm -r "${ED}"/run || die + + # for the special case of running lprng and cups together, bug 467226 + if use lprng-compat ; then + rm -fv "${ED}"/usr/bin/{lp*,cancel} + rm -fv "${ED}"/usr/sbin/lp* + rm -fv "${ED}"/usr/share/man/man1/{lp*,cancel*} + rm -fv "${ED}"/usr/share/man/man8/lp* + ewarn "Not installing lp... binaries, since the lprng-compat useflag is set." + ewarn "Unless you plan to install an exotic server setup, you most likely" + ewarn "do not want this. Disable the useflag then and all will be fine." + fi +} + +pkg_preinst() { + gnome2_icon_savelist +} + +pkg_postinst() { + # Update desktop file database and gtk icon cache (bug 370059) + gnome2_icon_cache_update + fdo-mime_desktop_database_update + + # not slotted - at most one value + if ! [[ "${REPLACING_VERSIONS}" ]]; then + echo + elog "For information about installing a printer and general cups setup" + elog "take a look at: https://wiki.gentoo.org/wiki/Printing" + echo + fi + + if [[ "${REPLACING_VERSIONS}" ]] && [[ "${REPLACING_VERSIONS}" < "1.6" ]]; then + echo + elog "CUPS-1.6 no longer supports automatic remote printers or implicit classes" + elog "via the CUPS, LDAP, or SLP protocols, i.e. \"network browsing\"." + elog "You will have to find printers using zeroconf/avahi instead, enter" + elog "the location manually, or run cups-browsed from net-print/cups-filters" + elog "which re-adds that functionality as a separate daemon." + echo + fi + + if [[ "${REPLACING_VERSIONS}" == "1.6.2-r4" ]]; then + ewarn + ewarn "You are upgrading from the broken version net-print/cups-1.6.2-r4." + ewarn "Please rebuild net-print/cups-filters now to make sure everything is OK." + ewarn + fi +} + +pkg_postrm() { + # Update desktop file database and gtk icon cache (bug 370059) + gnome2_icon_cache_update + fdo-mime_desktop_database_update +} diff --git a/net-print/cups/files/cups-2.0.2-poll-CPU-loop-STR-4605.patch b/net-print/cups/files/cups-2.0.2-poll-CPU-loop-STR-4605.patch new file mode 100644 index 000000000000..86114ea650fb --- /dev/null +++ b/net-print/cups/files/cups-2.0.2-poll-CPU-loop-STR-4605.patch @@ -0,0 +1,48 @@ +http://cups.org/str.php?L4605+P-1+S-2+C0+I0+E0+Q100%25 +https://bugs.gentoo.org/show_bug.cgi?id=549732 + +commit bb00c43fccb5aa2dec8e03bd9783e1ee267266a7 +Author: msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> +Date: Wed May 6 18:01:04 2015 +0000 + + The scheduler could get caught in a busy loop (STR #4605) + + + + git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12613 a1ca3aef-8c08-0410-bb20-df032aa958be + +diff --git a/scheduler/client.c b/scheduler/client.c +index c5a9960..50464a5 100644 +--- a/scheduler/client.c ++++ b/scheduler/client.c +@@ -585,6 +585,17 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ + * connection and we need to shut it down... + */ + ++ if (!httpGetReady(con->http) && recv(httpGetFd(con->http), buf, 1, MSG_PEEK) < 1) ++ { ++ /* ++ * Connection closed... ++ */ ++ ++ cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on EOF."); ++ cupsdCloseClient(con); ++ return; ++ } ++ + cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing on unexpected HTTP read state %s.", + httpStateString(httpGetState(con->http))); + cupsdCloseClient(con); +@@ -1979,12 +1990,6 @@ cupsdReadClient(cupsd_client_t *con) /* I - Client to read from */ + + if (httpGetState(con->http) == HTTP_STATE_POST_SEND) + { +- /* +- * Don't listen for activity until we decide to do something with this... +- */ +- +- cupsdAddSelect(httpGetFd(con->http), NULL, NULL, con); +- + if (con->file >= 0) + { + fstat(con->file, &filestats); |