public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Hüttel" <dilfridge@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
Date: Wed, 15 Feb 2017 00:42:54 +0000 (UTC)	[thread overview]
Message-ID: <1487119364.dce4f3e5b343e66d88ba2e47b14902264d42988c.dilfridge@gentoo> (raw)

commit:     dce4f3e5b343e66d88ba2e47b14902264d42988c
Author:     Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 15 00:42:23 2017 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> 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
+}


             reply	other threads:[~2017-02-15  0:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-15  0:42 Andreas Hüttel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-09-27  4:20 [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/ Sam James
2022-09-06  5:23 Sam James
2022-05-28  4:26 Sam James
2022-05-22 12:34 Pacho Ramos
2021-10-28  9:49 Pacho Ramos
2019-09-03  7:56 Lars Wendler
2019-03-23 21:37 Lars Wendler
2019-03-23 21:37 Lars Wendler
2018-06-12  8:17 Lars Wendler
2018-06-06 10:51 Lars Wendler
2017-11-10  9:07 Lars Wendler
2017-06-30 21:49 Lars Wendler
2016-12-29 18:52 Lars Wendler
2016-06-15  7:37 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1487119364.dce4f3e5b343e66d88ba2e47b14902264d42988c.dilfridge@gentoo \
    --to=dilfridge@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox