diff options
-rw-r--r-- | net-print/cups/ChangeLog | 12 | ||||
-rw-r--r-- | net-print/cups/Manifest | 25 | ||||
-rw-r--r-- | net-print/cups/cups-2.0.2-r1.ebuild | 356 | ||||
-rw-r--r-- | net-print/cups/files/cups-2.0.2-rename-systemd-service-files.patch | 46 | ||||
-rw-r--r-- | net-print/cups/files/cups-2.0.2-systemd-socket.patch | 60 |
5 files changed, 481 insertions, 18 deletions
diff --git a/net-print/cups/ChangeLog b/net-print/cups/ChangeLog index 905489247ec7..54a9c422d128 100644 --- a/net-print/cups/ChangeLog +++ b/net-print/cups/ChangeLog @@ -1,6 +1,16 @@ # 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.659 2015/02/10 21:19:39 dilfridge Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-print/cups/ChangeLog,v 1.660 2015/02/13 14:23:59 pacho Exp $ + +*cups-2.0.2-r1 (13 Feb 2015) + + 13 Feb 2015; Pacho Ramos <pacho@gentoo.org> +cups-2.0.2-r1.ebuild, + +files/cups-2.0.2-rename-systemd-service-files.patch, + +files/cups-2.0.2-systemd-socket.patch: + Fix cups starting (socket and ports handling) on systemd with Fedora approach + (that also improves the way errors in cups are reported when occur) as + currently starting is not working properly leading to the printers being not + accessible for other machines in the network. *cups-2.0.2 (10 Feb 2015) diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest index f550b1e00548..9c67410e90b3 100644 --- a/net-print/cups/Manifest +++ b/net-print/cups/Manifest @@ -10,6 +10,8 @@ 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 600 SHA256 a8bc5324cf03d78fd5bebe25fa61ec287feca438f5bd2bd1060554fa635e1130 SHA512 9994908983edac4c46f143e7407ff8c862f96a47602ed401051ef2e6130b086760cce01987fbafe001d4d556714de44b14210d9e8f744c948a66a7267282eed2 WHIRLPOOL d89f7a523e388cac8babd0ecd2c38ad5315382f5fd8a44783c3855fe2ca721d160b0f3185c54f806a1eb9ea5fd40d62cb451aad48bd1f47dcc89e3e2c1340786 +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 DIST cups-1.7.5-source.tar.bz2 8793338 SHA256 18cb4c6847dbaaaa05c8b35af787f19dd5c7686970b46548e72c711c6f26bd02 SHA512 fe446b3d904539d744d3fa24f3ced2549ef9dfea8c805f1602eb71d03e19c2f06edaacf51f148e8216207af0c901f7d956c855f49b13b01112b01c9c45b75b9d WHIRLPOOL 7a85ec51f6333493b42b566471ba218cdf7d3bf9ac6314d4a1b1e922c0bbc3f51380331c0a3da9d2ecf4bf0d58dc9e50f905c8aa6b328592fb5427ddb167ae2d DIST cups-2.0.0-source.tar.bz2 8737532 SHA256 83fdbbcb4ac4d82949bbde6d5dce7a4b6a62557da8f3d46c5e34b951110f5be2 SHA512 d6b3f3ef786c477914678825cff68c96d8e3457fdf8742e65f444312e8b9da44b44a5a91b09b855011a2abb4b16b3351d5dfd649ddb9e98d17bec849c9908d33 WHIRLPOOL 2615a2d339e4702538ee717d485130be2245cfec4091032de13ada89c9eb06b92a12de4302fcb7b15731fcfad6dcc4a0c7240d988b830a844b5701c0c067bd0a @@ -20,26 +22,15 @@ EBUILD cups-1.7.5.ebuild 10431 SHA256 328696896e43f0348df62ba50ee7715f8232b83367 EBUILD cups-1.7.9999.ebuild 10621 SHA256 e27e4f543474fa2f7a00ea0bb32758a941a6c7db0267fdab9b384b25e8b51914 SHA512 2fccf3f4759eeec3bec079073a13486136e71850ea783114ecab953212f5c0fbeefde5a6683712a88799f7a8a9ad02321e6e02c45804ae737cc55273e4066be4 WHIRLPOOL 45ed707f69b10203322392649e67238868c5675e8b67ba7e98af66128b624fbab3cf261760a3a669a8d7a81200a9015f873ecc500557ae6f9cc8ec57fe366a39 EBUILD cups-2.0.0-r2.ebuild 10350 SHA256 8d50f9037a07df7a97cb6c0ade5e348c26da12b0a4a43a9f94f9f055c1c33091 SHA512 d8f6b63e14635f36148ad5d2795321bde87f498ebc6b172f3f6dd925bc30a984a751088a3b997376e52dbd1bacc510b2c8c795a27b43bfca7e5a942f062143a4 WHIRLPOOL 06fe31e815ccb14af9e9014824e1e06a0e7f4b4b1fc77e8bfb42ae5568f326cb1b729d5bcf8f9e1380b6d0085e53f2f46ec2c59c87a5173821e9e7f63dc4fd6b EBUILD cups-2.0.1-r1.ebuild 10498 SHA256 4d696203143122013fc36aec85af12722302f586826b47077159f5f62ebe653b SHA512 705108c5faa4017ba144932b154d95a0bf300897308e9b89522cee6a2869051c4cc7219e3798d7eaa6e893b01c757e19890f1f42836fc9231ed90fd868d2a8d3 WHIRLPOOL 0883466d1c9eac0d3c59640b92bffe00a92210dbba3e21899aa06367fc429514f19e25c24ca23afe50f5155fc0865fb290657e00e03497ef2b0c8f1401249f43 +EBUILD cups-2.0.2-r1.ebuild 10442 SHA256 cd5cdbc98610322c62bbc0200127a163f167873f3129745b5ea9db8bd4f04f48 SHA512 0dc2099deb43171a339b8dfa7a86621cbaea7071042aee1389a1128a5c34ae9d2056da93cf623a803ca3dde79e16b90b1b46899135349e389e6808c06eda6da3 WHIRLPOOL 5785a4f6528cd708becac74e8a0a3006b71bcc6a9c9769838e00646617cbab6336eee8f3fc77742eafc0d12ceb5eac7ffc626f222929d2d50292c3068abb80f0 EBUILD cups-2.0.2.ebuild 10360 SHA256 e88bc427514e240e55d8bf43d36e13ba67d159be50bbd00fe9d5fca86ffbfce8 SHA512 9db8ed48a687d43dbb8a8e719877bb8fded6de7165356aed99309eabf491757dbc3bcc76ee75096ce38fa413300ac757165e7c3ae8c426a78f969eef7d39d9f8 WHIRLPOOL 3af627bb06b8b714ac6a7000a2a4153fed96e0d3e1182b989c30c88b4afd1aeaa63b41a30d019a123c6ef1cb441900ca117121aa2f4927b4252f122251965476 EBUILD cups-9999.ebuild 10360 SHA256 dee6edeb6ef62086921f21ce704788ac9dbb067456eef3d7e0afb6c8c25e36d8 SHA512 b3729b4db8a23286ee39950688a8f5c59eed3f17a8b8044e593715a7aa17d182099fb25f8d95b80fce4559f2985fa1b3886c4792d07f0203e7de1d75281c6678 WHIRLPOOL 481435ad07b4671e50b210d118a2dc71e88f7e9a5f16e19a525145d85cf3c126bef9b73ff1f92a55674be1aa75c02b52f1a46c8484c903f1f71504778f72f99b -MISC ChangeLog 99732 SHA256 607f9c867db2858707a32b933985c46888728c2bef7207511680da8706157bb9 SHA512 9b0626ac3edf530200af183e1df7102f8971dce11d45aad329e20a9d198a8f15ef8d183e101c12d4bb417b051eb1a8367191e26c0198dbf59c3b6a126bdc75bb WHIRLPOOL a99f1eec6e3b64786c57c84a45ea4e383ad8eae60685e00a2638b25941a81c93dd4cd7942c38ba0dd66f66c49faf7109ff73218150665f8a53d6d77208f7903d +MISC ChangeLog 100206 SHA256 efa3527e181054524059570d1819f5ea9692e426067fab3407ad408fc928ff4d SHA512 a1f4df5315372f89bcac872131907b34cf58feed636672d4a6d08a1ac9a28766ed65641e77a30210a24941d574c1938601f236b73775b4eb6c415e227dc4281a WHIRLPOOL 5f32b136e6ee77b85b2ed8eb1a41c0e04e5b8d7134f56e1f0d3dc8df0a36b50d4198fff375a093c241aaf757729f6ce6e7c96f0f02f2ef5126d7c075714ec9f6 MISC metadata.xml 496 SHA256 732bba7ee060b7be5e0b23d06d24c12c2bfc1c6be1440cdfebe6d5d94d145c47 SHA512 713300abb461ad923c4f6e59326fa97b2372181df4ef82bf04dd6f2d68dc0eb7c34e518cbb40ebd535cb9c4bf52d2648512002cc2cb55c6f21406cc973fa4496 WHIRLPOOL 061013ee6ddaf510964589024e39c4a05f18f0a6d2488eb5b121bb962a378348e71261f7e153f34dbb33337a2e49eb7da94e52d0cb7a128d71e9b4466f8a5933 -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0 +Version: GnuPG v2 -iQJ8BAEBCABmBQJU2nX5XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w -ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQwNzlCRDk4QzA4RENBRkYzQUEwRjQzMDlF -QkU2QTMzNkJFMTkwMzlDAAoJEOvmoza+GQOcTFIP/0p7P07EoCFqV+O5SV2jGWqJ -N5yR2ABapRdMybEQvEaYNjZmrTR3Ybi0Zdreao0N6aazJJlAr3xSL1H7OUE+OKZp -usfcNc9CTAo4f+lPdW2ixxKBHH2FOVwUGD3H293v1ZsOcOGAf/NIOGDRHha5hs9y -0zLjZFmjCmz3njh8TpkcTd1acjCkSWU57T5FnMgYvtzBaGD3jLo1ftt/YgTvtsSf -vzog6qbWhC1YbhB7R30pc0+X38HAFALrojLVGvlYJpl4c1k7R8I1eWdZP5mYnV13 -SkphRjZLifEjft9+UfpCQ2uk8MWP5p02JcMXBVN0Tp6M41ng0/IEZrEhBqqw54JQ -aN1ALmFlGe34Jjnbjid1o5ua7wbxrKw9NUHvTNXQN7xw7OOk0NUE4sDc76XPbSkF -ptkrngl6CLCHWbBIAJrgSixu2rxV4ZnLDQk7XCiLh6/wS82GGShRpZSD5IM627YZ -tOmkajHHA1EmF2v5nJqeQ2IR27ENFCbhtsPr++TcsNLV+YPRpLDxSBtKFP9GKysu -8P9vSjL4k4FL8RsScD6d81SzfAN2wj/wv/FMINn5F5LGj4pXmnfUSLclKv35cnGq -QOIXP5C2eqJcy0DBlf/39qiMlHH9Flt0GX6VystBdCGMPg1J+u1kqFGDysX1p7LZ -PQhEQ0Uk0HWdqN1zu4l1 -=U5bF +iEYEAREIAAYFAlTeCQAACgkQCaWpQKGI+9R14gCbBK0gKZcLFYu5SFXtCUjyKX8L +7A4An3U7ySp9I4RXSXPC7eCb+IzGTDvz +=3vB0 -----END PGP SIGNATURE----- diff --git a/net-print/cups/cups-2.0.2-r1.ebuild b/net-print/cups/cups-2.0.2-r1.ebuild new file mode 100644 index 000000000000..1c890a7a7b69 --- /dev/null +++ b/net-print/cups/cups-2.0.2-r1.ebuild @@ -0,0 +1,356 @@ +# 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-r1.ebuild,v 1.1 2015/02/13 14:23:59 pacho Exp $ + +EAPI=5 + +PYTHON_COMPAT=( python{2_6,2_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" +) + +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 + + # 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-rename-systemd-service-files.patch b/net-print/cups/files/cups-2.0.2-rename-systemd-service-files.patch new file mode 100644 index 000000000000..16f677ba7a37 --- /dev/null +++ b/net-print/cups/files/cups-2.0.2-rename-systemd-service-files.patch @@ -0,0 +1,46 @@ +From 33e0d4c8e450fe69b195422c0880aaa96ca9478d Mon Sep 17 00:00:00 2001 +From: Matthias Maier <tamiko@kyomu.43-1.org> +Date: Wed, 19 Nov 2014 18:00:06 +0100 +Subject: [PATCH] change systemd service files to gentoo naming scheme + +--- + scheduler/Makefile | 10 +++++----- + scheduler/org.cups.cupsd.path.in | 2 +- + scheduler/org.cups.cupsd.service.in | 2 +- + 3 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/scheduler/Makefile b/scheduler/Makefile +index 3e0884a..b354420 100644 +--- a/scheduler/Makefile ++++ b/scheduler/Makefile +@@ -203,11 +203,11 @@ install-data: + if test "x$(SYSTEMD_DIR)" != x; then \ + echo Installing systemd configuration files...; \ + $(INSTALL_DIR) $(BUILDROOT)$(SYSTEMD_DIR); \ +- $(INSTALL_DATA) org.cups.cupsd.path $(BUILDROOT)$(SYSTEMD_DIR); \ +- $(INSTALL_DATA) org.cups.cupsd.service $(BUILDROOT)$(SYSTEMD_DIR); \ +- $(INSTALL_DATA) org.cups.cupsd.socket $(BUILDROOT)$(SYSTEMD_DIR); \ +- $(INSTALL_DATA) org.cups.cups-lpdAT.service $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cups-lpd@.service; \ +- $(INSTALL_DATA) org.cups.cups-lpd.socket $(BUILDROOT)$(SYSTEMD_DIR); \ ++ $(INSTALL_DATA) org.cups.cupsd.path $(BUILDROOT)$(SYSTEMD_DIR)/cups.path; \ ++ $(INSTALL_DATA) org.cups.cupsd.service $(BUILDROOT)$(SYSTEMD_DIR)/cups.service; \ ++ $(INSTALL_DATA) org.cups.cupsd.socket $(BUILDROOT)$(SYSTEMD_DIR)/cups.socket; \ ++ $(INSTALL_DATA) org.cups.cups-lpdAT.service $(BUILDROOT)$(SYSTEMD_DIR)/cups-lpd@.service; \ ++ $(INSTALL_DATA) org.cups.cups-lpd.socket $(BUILDROOT)$(SYSTEMD_DIR)/cups-lpd.socket; \ + elif test "x$(XINETD)" != x; then \ + echo Installing xinetd configuration file for cups-lpd...; \ + $(INSTALL_DIR) -m 755 $(BUILDROOT)$(XINETD); \ +diff --git a/scheduler/org.cups.cupsd.service.in b/scheduler/org.cups.cupsd.service.in +index 0a27c76..7a04248 100644 +--- a/scheduler/org.cups.cupsd.service.in ++++ b/scheduler/org.cups.cupsd.service.in +@@ -7,5 +7,5 @@ ExecStart=@sbindir@/cupsd -l + Type=simple + + [Install] +-Also=org.cups.cupsd.socket org.cups.cupsd.path ++Also=cups.socket cups.path + WantedBy=printer.target +-- +2.0.4 + diff --git a/net-print/cups/files/cups-2.0.2-systemd-socket.patch b/net-print/cups/files/cups-2.0.2-systemd-socket.patch new file mode 100644 index 000000000000..6d8d60a07c1c --- /dev/null +++ b/net-print/cups/files/cups-2.0.2-systemd-socket.patch @@ -0,0 +1,60 @@ +diff -up cups-2.0.2/cups/usersys.c.ustTJg cups-2.0.2/cups/usersys.c +--- cups-2.0.2/cups/usersys.c.ustTJg 2015-02-10 13:40:24.294545077 +0100 ++++ cups-2.0.2/cups/usersys.c 2015-02-10 13:46:56.763989233 +0100 +@@ -1017,7 +1017,7 @@ cups_finalize_client_conf( + struct stat sockinfo; /* Domain socket information */ + + if (!stat(CUPS_DEFAULT_DOMAINSOCKET, &sockinfo) && +- (sockinfo.st_mode & S_IRWXO) == S_IRWXO) ++ (sockinfo.st_mode & (S_IROTH | S_IWOTH)) == (S_IROTH | S_IWOTH)) + cups_set_server_name(cc, CUPS_DEFAULT_DOMAINSOCKET); + else + #endif /* CUPS_DEFAULT_DOMAINSOCKET */ +diff -up cups-2.0.2/scheduler/main.c.ustTJg cups-2.0.2/scheduler/main.c +--- cups-2.0.2/scheduler/main.c.ustTJg 2015-02-10 13:40:24.121547526 +0100 ++++ cups-2.0.2/scheduler/main.c 2015-02-10 13:40:24.295545063 +0100 +@@ -658,8 +658,15 @@ main(int argc, /* I - Number of comm + + #if defined(HAVE_LAUNCHD) || defined(HAVE_SYSTEMD) + if (OnDemand) ++ { + cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started on demand."); +- else ++# ifdef HAVE_SYSTEMD ++ sd_notifyf(0, "READY=1\n" ++ "STATUS=Scheduler is running...\n" ++ "MAINPID=%lu", ++ (unsigned long) getpid()); ++# endif /* HAVE_SYSTEMD */ ++ } else + #endif /* HAVE_LAUNCHD || HAVE_SYSTEMD */ + if (fg) + cupsdAddEvent(CUPSD_EVENT_SERVER_STARTED, NULL, NULL, "Scheduler started in foreground."); +diff -up cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.path.in +--- cups-2.0.2/scheduler/org.cups.cupsd.path.in.ustTJg 2014-03-21 15:50:24.000000000 +0100 ++++ cups-2.0.2/scheduler/org.cups.cupsd.path.in 2015-02-10 13:40:24.295545063 +0100 +@@ -2,7 +2,7 @@ + Description=CUPS Scheduler + + [Path] +-PathExists=@CUPS_CACHEDIR@/org.cups.cupsd ++PathExistsGlob=@CUPS_REQUESTS@/d* + + [Install] + WantedBy=multi-user.target +diff -up cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg cups-2.0.2/scheduler/org.cups.cupsd.service.in +--- cups-2.0.2/scheduler/org.cups.cupsd.service.in.ustTJg 2014-10-21 13:55:01.000000000 +0200 ++++ cups-2.0.2/scheduler/org.cups.cupsd.service.in 2015-02-10 13:40:24.296545049 +0100 +@@ -1,10 +1,11 @@ + [Unit] + Description=CUPS Scheduler + Documentation=man:cupsd(8) ++After=network.target + + [Service] + ExecStart=@sbindir@/cupsd -l +-Type=simple ++Type=notify + + [Install] + Also=org.cups.cupsd.socket org.cups.cupsd.path |