From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4EF31139695 for ; Wed, 15 Feb 2017 00:43:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3EC22E0C8D; Wed, 15 Feb 2017 00:42:57 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 11A8DE0C89 for ; Wed, 15 Feb 2017 00:42:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BBAC4341650 for ; Wed, 15 Feb 2017 00:42:55 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2D5114820 for ; Wed, 15 Feb 2017 00:42:54 +0000 (UTC) From: "Andreas Hüttel" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Hüttel" Message-ID: <1487119364.dce4f3e5b343e66d88ba2e47b14902264d42988c.dilfridge@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-print/cups/cups-2.2.2-r2.ebuild net-print/cups/cups-9999.ebuild net-print/cups/files/cupsd.init.d-r3 X-VCS-Directories: net-print/cups/files/ net-print/cups/ X-VCS-Committer: dilfridge X-VCS-Committer-Name: Andreas Hüttel X-VCS-Revision: dce4f3e5b343e66d88ba2e47b14902264d42988c X-VCS-Branch: master Date: Wed, 15 Feb 2017 00:42:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4659d22c-ddfd-424a-9e2b-a9d856356b9d X-Archives-Hash: 4f6adefeca3b036d4c96ab8b0319403f commit: dce4f3e5b343e66d88ba2e47b14902264d42988c Author: Andreas K. Hüttel gentoo org> AuthorDate: Wed Feb 15 00:42:23 2017 +0000 Commit: Andreas Hüttel gentoo org> CommitDate: Wed Feb 15 00:42:44 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dce4f3e5 net-print/cups: Switch to using pidfile, bug 551544 Package-Manager: Portage-2.3.3, Repoman-2.3.1 .../{cups-9999.ebuild => cups-2.2.2-r2.ebuild} | 46 +++++++++++----------- net-print/cups/cups-9999.ebuild | 46 +++++++++++----------- net-print/cups/files/cupsd.init.d-r3 | 23 +++++++++++ 3 files changed, 71 insertions(+), 44 deletions(-) diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-2.2.2-r2.ebuild similarity index 91% copy from net-print/cups/cups-9999.ebuild copy to net-print/cups/cups-2.2.2-r2.ebuild index 0c97e45712..765945a438 100644 --- a/net-print/cups/cups-9999.ebuild +++ b/net-print/cups/cups-2.2.2-r2.ebuild @@ -17,7 +17,7 @@ MY_PV=${MY_PV/_beta/b} if [[ ${PV} == *9999 ]]; then inherit git-r3 - EGIT_REPO_URI="http://www.cups.org/cups.git" + EGIT_REPO_URI="https://github.com/apple/cups.git" if [[ ${PV} != 9999 ]]; then EGIT_BRANCH=branch-${PV/.9999} fi @@ -145,6 +145,12 @@ pkg_setup() { } src_prepare() { + if ! use kerberos ; then + PATCHES+=( + "${FILESDIR}/${PN}-2.2.2-no_kerberos_config.patch" + ) + fi + default # Remove ".SILENT" rule for verbose output (bug 524338). @@ -255,7 +261,7 @@ multilib_src_install_all() { use zeroconf && neededservices+=" avahi-daemon" use dbus && neededservices+=" dbus" [[ -n ${neededservices} ]] && neededservices="need${neededservices}" - cp "${FILESDIR}"/cupsd.init.d-r2 "${T}"/cupsd || die + cp "${FILESDIR}"/cupsd.init.d-r3 "${T}"/cupsd || die sed -i \ -e "s/@neededservices@/$neededservices/" \ "${T}"/cupsd || die @@ -318,30 +324,26 @@ pkg_postinst() { gnome2_icon_cache_update fdo-mime_desktop_database_update - # not slotted - at most one value - if ! [[ "${REPLACING_VERSIONS}" ]]; then + local v + + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least 2.2.2-r2 ${v}; then + echo + ewarn "The cupsd init script switched to using pidfiles. Shutting down" + ewarn "cupsd will fail the next time. To fix this, please run once as root" + ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start" + echo + break + fi + done + + for v in ${REPLACING_VERSIONS}; do 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 + break + done } pkg_postrm() { diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-9999.ebuild index 0c97e45712..765945a438 100644 --- a/net-print/cups/cups-9999.ebuild +++ b/net-print/cups/cups-9999.ebuild @@ -17,7 +17,7 @@ MY_PV=${MY_PV/_beta/b} if [[ ${PV} == *9999 ]]; then inherit git-r3 - EGIT_REPO_URI="http://www.cups.org/cups.git" + EGIT_REPO_URI="https://github.com/apple/cups.git" if [[ ${PV} != 9999 ]]; then EGIT_BRANCH=branch-${PV/.9999} fi @@ -145,6 +145,12 @@ pkg_setup() { } src_prepare() { + if ! use kerberos ; then + PATCHES+=( + "${FILESDIR}/${PN}-2.2.2-no_kerberos_config.patch" + ) + fi + default # Remove ".SILENT" rule for verbose output (bug 524338). @@ -255,7 +261,7 @@ multilib_src_install_all() { use zeroconf && neededservices+=" avahi-daemon" use dbus && neededservices+=" dbus" [[ -n ${neededservices} ]] && neededservices="need${neededservices}" - cp "${FILESDIR}"/cupsd.init.d-r2 "${T}"/cupsd || die + cp "${FILESDIR}"/cupsd.init.d-r3 "${T}"/cupsd || die sed -i \ -e "s/@neededservices@/$neededservices/" \ "${T}"/cupsd || die @@ -318,30 +324,26 @@ pkg_postinst() { gnome2_icon_cache_update fdo-mime_desktop_database_update - # not slotted - at most one value - if ! [[ "${REPLACING_VERSIONS}" ]]; then + local v + + for v in ${REPLACING_VERSIONS}; do + if ! version_is_at_least 2.2.2-r2 ${v}; then + echo + ewarn "The cupsd init script switched to using pidfiles. Shutting down" + ewarn "cupsd will fail the next time. To fix this, please run once as root" + ewarn " killall cupsd ; /etc/init.d/cupsd zap ; /etc/init.d/cupsd start" + echo + break + fi + done + + for v in ${REPLACING_VERSIONS}; do 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 + break + done } pkg_postrm() { diff --git a/net-print/cups/files/cupsd.init.d-r3 b/net-print/cups/files/cupsd.init.d-r3 new file mode 100644 index 0000000000..20373414e9 --- /dev/null +++ b/net-print/cups/files/cupsd.init.d-r3 @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 1999-2017 Gentoo Foundation +# $Id$ + +description="The Common Unix Printing System daemon" +command="/usr/sbin/cupsd" +command_args="-f -c /etc/cups/cupsd.conf -s /etc/cups/cups-files.conf" +pidfile="/var/run/cupsd.pid" +start_stop_daemon_args="-b -m --pidfile ${pidfile}" + +depend() { + use net + @neededservices@ + before nfs + after logger +} + +start_pre() { + checkpath -q -d -m 0775 -o root:lp /var/cache/cups + checkpath -q -d -m 0775 -o root:lp /var/cache/cups/rss + checkpath -q -d -m 0755 -o root:lp /run/cups + checkpath -q -d -m 0511 -o lp:lpadmin /run/cups/certs +}