public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2016-06-15  7:37 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2016-06-15  7:37 UTC (permalink / raw
  To: gentoo-commits

commit:     453566f39c2b5880b5c6593b1e650756dcff6c1e
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Jun 15 07:35:20 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jun 15 07:37:05 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=453566f3

net-print/cups: Removed old.

Package-Manager: portage-2.2.28
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-print/cups/Manifest                            |   1 -
 net-print/cups/cups-2.1.2-r2.ebuild                | 360 -------------------
 net-print/cups/cups-2.1.3.ebuild                   | 358 -------------------
 .../cups/files/cups-1.7.2-systemd-socket-2.patch   | 391 ---------------------
 .../cups-2.0.0-rename-systemd-service-files.patch  | 177 ----------
 .../cups/files/cups-2.0.1-fix-compilation.patch    |  25 --
 .../files/cups-2.0.1-fix-linkage-to-gnutls.patch   |  24 --
 .../cups-2.0.1-rename-systemd-service-files.patch  |  73 ----
 .../files/cups-2.0.2-poll-CPU-loop-STR-4605.patch  |  48 ---
 9 files changed, 1457 deletions(-)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index 61b6ad1..5599f94 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,5 +1,4 @@
 DIST cups-2.0.3-source.tar.bz2 8797220 SHA256 bc3167048690a7379f29a37d9fbd2143cf0ca033b54eedd9333ddfc4ee258881 SHA512 fcc2be8d12cec624423a07706486afd226c9cb29b2ba694d63b8250c16a7d0f39aa51e6c831ca7c978ba5009e98b1daedad4b119a4f3287a88e21e48f0d07e18 WHIRLPOOL d12771b6d941db78854a1b05644a4402fa6a62f8acab1332c7490887e0099463b129684f4dd21b5e9f02e4f8e23bef633a06fca01ad8fa8b34de9298b72ab3ba
 DIST cups-2.0.4-source.tar.bz2 8799274 SHA256 e1d5e68d9f24faca317aeaebc164c34102813bc0f1d69c00b3a59b49c49f4abd SHA512 d0db3ce729ee893f260b69814343e84af4b934f1783d96049fcf58204a93ac534d0bf0c1626f5ac55371962419b91c857bd872f499e905223069b5103405c4ae WHIRLPOOL cbeb3f61cf534017180aa0d55f60ec81ac082f92d3626b18b4480aaf9e67b425b829ad260dfa1227ba56a79b52959f1e740848d26dc938fc9fc0159f1844a2bb
-DIST cups-2.1.2-source.tar.bz2 8831726 SHA256 bab0ca3ba80eae48319b3a6b19a5b14fad5ce230f30151a0cfa4c0271df281ad SHA512 c1bd15acdd8ac55a731c9267f0dcf9159a02c3a895d4b032b0e0d0bbb1189eb4b3b4600a9f025a8359a55ce93a5911014058f361f2bc954d1fb2cdbf219e183d WHIRLPOOL e4bb7729bb4ac7d8ba51a18178dfaeaa98c3e4525c7c6beb17dbe78f938e7cb2da466f9b4cb7f68452ddae6a52de36ee3c2b204dd1f5c9e21141cdaf7fdccea0
 DIST cups-2.1.3-source.tar.bz2 8832400 SHA256 36a70d43584aea2617da914b9331e23341c3501a8254c4d2eae9c11ec01fd4d3 SHA512 5cc715b8521b4d6af29a97a8abf7a1b0973840c00727ee8e7926e89a4a9da8e67565d14cc4b57ab7cfb40b238d4faaed7608b9ab95947cc3671ed87b710f8f36 WHIRLPOOL 161c65b8adc3ab1c65208fe23bf14aefe5dfd84e9b162c69b1a8f977c3a4fc7c31ea92d0c2eaca3c276fa192596a31701052f0c2a1ffd213a09d48c11d446f6f
 DIST cups-2.1.4.tar.gz 9572653 SHA256 1f182f145489e2454969b221056b6b9bac2beb4e38cd75fa12a9ec15d24d5301 SHA512 5f36d21e1e094323f1811229b452f096f3f0b264757b3c3b1742bbd7ea0059e34d3cd2fbf3b6856d25a04ae1779babafa6d598a8ba249448fce3bf7cafa59aae WHIRLPOOL 217b9024c34369c8839b0a1b2b3924eb00e9b8d87cfd8d50a59ad0c33c1044f53d479246d67dff4598049efd15259def90e4bcddc6c3c20dff38811e159d2c4b

diff --git a/net-print/cups/cups-2.1.2-r2.ebuild b/net-print/cups/cups-2.1.2-r2.ebuild
deleted file mode 100644
index c5ed668..0000000
--- a/net-print/cups/cups-2.1.2-r2.ebuild
+++ /dev/null
@@ -1,360 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools 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 ~arm64 ~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 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.1.2-systemd-socket.patch"
-	"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
-	"${FILESDIR}/${PN}-2.0.3-cross-compile.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() {
-	epatch ${PATCHES[@]}
-
-	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) \
-		$(use_enable debug debug-printfs) \
-		$(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 file is now provided by cups-filters:
-	rm -r "${ED}"/usr/share/cups/banners || 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/cups-2.1.3.ebuild b/net-print/cups/cups-2.1.3.ebuild
deleted file mode 100644
index 9be7bc9..0000000
--- a/net-print/cups/cups-2.1.3.ebuild
+++ /dev/null
@@ -1,358 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools 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 ~arm64 ~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 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.1.2-systemd-socket.patch"
-	"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
-	"${FILESDIR}/${PN}-2.0.3-cross-compile.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() {
-	default
-
-	# 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) \
-		$(use_enable debug debug-printfs) \
-		$(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-r2 "${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 file is now provided by cups-filters:
-	rm -r "${ED}"/usr/share/cups/banners || 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-1.7.2-systemd-socket-2.patch b/net-print/cups/files/cups-1.7.2-systemd-socket-2.patch
deleted file mode 100644
index f4e8640..0000000
--- a/net-print/cups/files/cups-1.7.2-systemd-socket-2.patch
+++ /dev/null
@@ -1,391 +0,0 @@
-diff -ruN cups-1.7.2.orig/Makedefs.in cups-1.7.2/Makedefs.in
---- cups-1.7.2.orig/Makedefs.in	2013-07-17 17:21:18.000000000 +0200
-+++ cups-1.7.2/Makedefs.in	2014-04-15 13:24:45.594054459 +0200
-@@ -134,6 +134,7 @@
- CXXLIBS		=	@CXXLIBS@
- DBUS_NOTIFIER	=	@DBUS_NOTIFIER@
- DBUS_NOTIFIERLIBS =	@DBUS_NOTIFIERLIBS@
-+SYSTEMD_UNITS   =       @SYSTEMD_UNITS@
- DNSSD_BACKEND	=	@DNSSD_BACKEND@
- DSOFLAGS	=	-L../cups @DSOFLAGS@
- DSOLIBS		=	@DSOLIBS@ $(COMMONLIBS)
-@@ -141,6 +142,7 @@
- IPPFIND_BIN	=	@IPPFIND_BIN@
- IPPFIND_MAN	=	@IPPFIND_MAN@
- LAUNCHDLIBS	=	@LAUNCHDLIBS@
-+SDLIBS		=	@SDLIBS@
- LDFLAGS		=	-L../cgi-bin -L../cups -L../filter -L../ppdc \
- 			-L../scheduler @LDARCHFLAGS@ \
- 			@LDFLAGS@ @RELROFLAGS@ @PIEFLAGS@ $(OPTIM)
-@@ -232,6 +234,7 @@
- 
- DEFAULT_LAUNCHD_CONF =	@DEFAULT_LAUNCHD_CONF@
- DBUSDIR		=	@DBUSDIR@
-+SYSTEMDUNITDIR  =       $(BUILDROOT)@systemdsystemunitdir@
- 
- 
- #
-diff -ruN cups-1.7.2.orig/config-scripts/cups-systemd.m4 cups-1.7.2/config-scripts/cups-systemd.m4
---- cups-1.7.2.orig/config-scripts/cups-systemd.m4	1970-01-01 01:00:00.000000000 +0100
-+++ cups-1.7.2/config-scripts/cups-systemd.m4	2014-04-15 13:24:45.592054459 +0200
-@@ -0,0 +1,36 @@
-+dnl
-+dnl "$Id$"
-+dnl
-+dnl   systemd stuff for CUPS.
-+
-+dnl Find whether systemd is available
-+
-+SDLIBS=""
-+AC_ARG_WITH([systemdsystemunitdir],
-+        AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
-+        [], [with_systemdsystemunitdir=$($PKGCONFIG --variable=systemdsystemunitdir systemd)])
-+if test "x$with_systemdsystemunitdir" != xno; then
-+        AC_MSG_CHECKING(for libsystemd-daemon)
-+	AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
-+        if $PKGCONFIG --exists libsystemd-daemon; then
-+		AC_MSG_RESULT(yes)
-+        	SDCFLAGS=`$PKGCONFIG --cflags libsystemd-daemon`
-+        	SDLIBS=`$PKGCONFIG --libs libsystemd-daemon`
-+		AC_DEFINE(HAVE_SYSTEMD)
-+	else
-+		AC_MSG_RESULT(no)
-+	fi
-+fi
-+
-+if test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != xno ; then
-+        SYSTEMD_UNITS="cups.service cups.socket cups.path"
-+else
-+        SYSTEMD_UNITS=""
-+fi
-+
-+AC_SUBST(SYSTEMD_UNITS)
-+AC_SUBST(SDLIBS)
-+
-+dnl
-+dnl "$Id$"
-+dnl
-diff -ruN cups-1.7.2.orig/config.h.in cups-1.7.2/config.h.in
---- cups-1.7.2.orig/config.h.in	2014-02-27 16:57:59.000000000 +0100
-+++ cups-1.7.2/config.h.in	2014-04-15 13:24:45.592054459 +0200
-@@ -451,6 +451,13 @@
- 
- 
- /*
-+ * Do we have systemd support?
-+ */
-+
-+#undef HAVE_SYSTEMD
-+
-+
-+/*
-  * Various scripting languages...
-  */
- 
-diff -ruN cups-1.7.2.orig/configure.in cups-1.7.2/configure.in
---- cups-1.7.2.orig/configure.in	2013-07-08 23:15:13.000000000 +0200
-+++ cups-1.7.2/configure.in	2014-04-15 13:24:45.593054459 +0200
-@@ -33,6 +33,7 @@
- sinclude(config-scripts/cups-largefile.m4)
- sinclude(config-scripts/cups-dnssd.m4)
- sinclude(config-scripts/cups-launchd.m4)
-+sinclude(config-scripts/cups-systemd.m4)
- sinclude(config-scripts/cups-defaults.m4)
- sinclude(config-scripts/cups-scripting.m4)
- 
-@@ -67,6 +68,9 @@
- 	  conf/snmp.conf
- 	  cups-config
- 	  data/testprint
-+          data/cups.service
-+          data/cups.socket
-+          data/cups.path
- 	  desktop/cups.desktop
- 	  doc/help/ref-cups-files-conf.html
- 	  doc/help/ref-cupsd-conf.html
-diff -ruN cups-1.7.2.orig/cups/usersys.c cups-1.7.2/cups/usersys.c
---- cups-1.7.2.orig/cups/usersys.c	2014-03-05 22:22:12.000000000 +0100
-+++ cups-1.7.2/cups/usersys.c	2014-04-15 13:24:45.593054459 +0200
-@@ -1050,7 +1050,7 @@
-     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_server = CUPS_DEFAULT_DOMAINSOCKET;
-     else
- #endif /* CUPS_DEFAULT_DOMAINSOCKET */
-diff -ruN cups-1.7.2.orig/data/Makefile cups-1.7.2/data/Makefile
---- cups-1.7.2.orig/data/Makefile	2013-05-29 13:51:34.000000000 +0200
-+++ cups-1.7.2/data/Makefile	2014-04-15 13:24:45.594054459 +0200
-@@ -100,6 +100,12 @@
- 		$(INSTALL_DATA) $$file $(DATADIR)/ppdc; \
- 	done
- 	$(INSTALL_DIR) -m 755 $(DATADIR)/profiles
-+	if test "x$(SYSTEMD_UNITS)" != "x" ; then \
-+		$(INSTALL_DIR) -m 755 $(SYSTEMDUNITDIR); \
-+		for file in $(SYSTEMD_UNITS); do \
-+			$(INSTALL_DATA) $$file $(SYSTEMDUNITDIR); \
-+		done; \
-+	fi
- 
- 
- #
-@@ -143,6 +149,9 @@
- 	-$(RMDIR) $(DATADIR)/data
- 	-$(RMDIR) $(DATADIR)/banners
- 	-$(RMDIR) $(DATADIR)
-+	for file in $(SYSTEMD_UNITS); do \
-+		$(RM) $(SYSTEMDUNITDIR)/$$file; \
-+	done
- 
- 
- #
-diff -ruN cups-1.7.2.orig/data/cups.path.in cups-1.7.2/data/cups.path.in
---- cups-1.7.2.orig/data/cups.path.in	1970-01-01 01:00:00.000000000 +0100
-+++ cups-1.7.2/data/cups.path.in	2014-04-15 13:24:45.593054459 +0200
-@@ -0,0 +1,8 @@
-+[Unit]
-+Description=CUPS Printer Service Spool
-+
-+[Path]
-+PathExistsGlob=@CUPS_REQUESTS@/d*
-+
-+[Install]
-+WantedBy=multi-user.target
-diff -ruN cups-1.7.2.orig/data/cups.service.in cups-1.7.2/data/cups.service.in
---- cups-1.7.2.orig/data/cups.service.in	1970-01-01 01:00:00.000000000 +0100
-+++ cups-1.7.2/data/cups.service.in	2014-04-15 13:24:45.594054459 +0200
-@@ -0,0 +1,9 @@
-+[Unit]
-+Description=CUPS Printing Service
-+
-+[Service]
-+ExecStart=@sbindir@/cupsd -f
-+
-+[Install]
-+Also=cups.socket cups.path
-+WantedBy=printer.target
-diff -ruN cups-1.7.2.orig/data/cups.socket.in cups-1.7.2/data/cups.socket.in
---- cups-1.7.2.orig/data/cups.socket.in	1970-01-01 01:00:00.000000000 +0100
-+++ cups-1.7.2/data/cups.socket.in	2014-04-15 13:24:45.594054459 +0200
-@@ -0,0 +1,10 @@
-+[Unit]
-+Description=CUPS Printing Service Sockets
-+
-+[Socket]
-+ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
-+ListenStream=631
-+BindIPv6Only=ipv6-only
-+
-+[Install]
-+WantedBy=sockets.target
-diff -ruN cups-1.7.2.orig/scheduler/Makefile cups-1.7.2/scheduler/Makefile
---- cups-1.7.2.orig/scheduler/Makefile	2013-05-29 13:51:34.000000000 +0200
-+++ cups-1.7.2/scheduler/Makefile	2014-04-15 13:24:45.595054459 +0200
-@@ -381,7 +381,7 @@
- 	$(CC) $(LDFLAGS) -o cupsd $(CUPSDOBJS) -L. -lcupsmime \
- 		$(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
- 		$(LIBPAPER) $(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBS) \
--		$(LIBGSSAPI) $(LIBWRAP)
-+		$(LIBGSSAPI) $(LIBWRAP) $(SDLIBS)
- 
- cupsd-static:	$(CUPSDOBJS) libcupsmime.a ../cups/$(LIBCUPSSTATIC)
- 	echo Linking $@...
-@@ -389,7 +389,7 @@
- 		$(LIBZ) $(SSLLIBS) $(LIBSLP) $(LIBLDAP) $(PAMLIBS) \
- 		../cups/$(LIBCUPSSTATIC) $(COMMONLIBS) $(LIBZ) $(LIBPAPER) \
- 		$(LIBMALLOC) $(SERVERLIBS) $(DNSSDLIBS) $(LIBGSSAPI) \
--		$(LIBWRAP)
-+		$(LIBWRAP) $(SDLIBS)
- 
- tls.o:	tls-darwin.c tls-gnutls.c tls-openssl.c
- 
-diff -ruN cups-1.7.2.orig/scheduler/client.h cups-1.7.2/scheduler/client.h
---- cups-1.7.2.orig/scheduler/client.h	2013-08-02 00:23:18.000000000 +0200
-+++ cups-1.7.2/scheduler/client.h	2014-04-15 13:24:45.594054459 +0200
-@@ -79,6 +79,9 @@
-   int			fd;		/* File descriptor for this server */
-   http_addr_t		address;	/* Bind address of socket */
-   http_encryption_t	encryption;	/* To encrypt or not to encrypt... */
-+#ifdef HAVE_SYSTEMD
-+  int			is_systemd;	/* Is this a systemd socket? */
-+#endif /* HAVE_SYSTEMD */
- } cupsd_listener_t;
- 
- 
-diff -ruN cups-1.7.2.orig/scheduler/listen.c cups-1.7.2/scheduler/listen.c
---- cups-1.7.2.orig/scheduler/listen.c	2013-05-29 13:51:34.000000000 +0200
-+++ cups-1.7.2/scheduler/listen.c	2014-04-15 13:24:45.594054459 +0200
-@@ -401,7 +401,11 @@
-        lis;
-        lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
-   {
--    if (lis->fd != -1)
-+    if (lis->fd != -1
-+#ifdef HAVE_SYSTEMD
-+        && !lis->is_systemd
-+#endif /* HAVE_SYSTEMD */
-+        )
-     {
- #ifdef WIN32
-       closesocket(lis->fd);
-diff -ruN cups-1.7.2.orig/scheduler/main.c cups-1.7.2/scheduler/main.c
---- cups-1.7.2.orig/scheduler/main.c	2014-03-21 19:18:56.000000000 +0100
-+++ cups-1.7.2/scheduler/main.c	2014-04-15 13:24:45.595054459 +0200
-@@ -39,6 +39,10 @@
- #  endif /* !LAUNCH_JOBKEY_SERVICEIPC */
- #endif /* HAVE_LAUNCH_H */
- 
-+#ifdef HAVE_SYSTEMD
-+#include <systemd/sd-daemon.h>
-+#endif /* HAVE_SYSTEMD */
-+
- #if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO)
- #  include <malloc.h>
- #endif /* HAVE_MALLOC_H && HAVE_MALLINFO */
-@@ -64,6 +68,9 @@
- static void		launchd_checkin(void);
- static void		launchd_checkout(void);
- #endif /* HAVE_LAUNCHD */
-+#ifdef HAVE_SYSTEMD
-+static int		systemd_checkin(void);
-+#endif /* HAVE_SYSTEMD */
- static void		parent_handler(int sig);
- static void		process_children(void);
- static void		sigchld_handler(int sig);
-@@ -553,6 +560,14 @@
-   }
- #endif /* HAVE_LAUNCHD */
- 
-+#ifdef HAVE_SYSTEMD
-+ /*
-+  * If we were started by systemd get the listen sockets file descriptors...
-+  */
-+  if (systemd_checkin() < 0)
-+    exit(EXIT_FAILURE);
-+#endif /* HAVE_SYSTEMD */
-+
-  /*
-   * Startup the server...
-   */
-@@ -741,6 +756,16 @@
- 	}
- #endif /* HAVE_LAUNCHD */
- 
-+#ifdef HAVE_SYSTEMD
-+       /*
-+	* If we were started by systemd get the listen sockets file
-+	* descriptors...
-+        */
-+
-+        if (systemd_checkin() < 0)
-+	  exit(EXIT_FAILURE);
-+#endif /* HAVE_SYSTEMD */
-+
-        /*
-         * Startup the server...
-         */
-@@ -1490,6 +1515,102 @@
- }
- #endif /* HAVE_LAUNCHD */
- 
-+#ifdef HAVE_SYSTEMD
-+static int
-+systemd_checkin(void)
-+{
-+  int n, fd;
-+
-+  n = sd_listen_fds(0);
-+  if (n < 0)
-+  {
-+    cupsdLogMessage(CUPSD_LOG_ERROR,
-+		    "systemd_checkin: Failed to acquire sockets "
-+		    "from systemd - %s -- skipping systemd activation",
-+           strerror(-n));
-+    return (1);
-+  }
-+
-+  if (n == 0)
-+    return (0);
-+
-+  for (fd = SD_LISTEN_FDS_START; fd < SD_LISTEN_FDS_START + n; fd ++)
-+  {
-+    http_addr_t addr;
-+    socklen_t addrlen = sizeof (addr);
-+    int r;
-+    cupsd_listener_t *lis;
-+    char s[256];
-+
-+    r = sd_is_socket(fd, AF_UNSPEC, SOCK_STREAM, 1);
-+    if (r < 0) {
-+      cupsdLogMessage(CUPSD_LOG_ERROR,
-+             "systemd_checkin: Unable to verify socket type - %s",
-+             strerror(-r));
-+      continue;
-+    }
-+
-+    if (!r) {
-+      cupsdLogMessage(CUPSD_LOG_ERROR,
-+             "systemd_checkin: Socket not of the right type");
-+      continue;
-+    }
-+
-+    if (getsockname(fd, (struct sockaddr*) &addr, &addrlen))
-+    {
-+      cupsdLogMessage(CUPSD_LOG_ERROR,
-+             "systemd_checkin: Unable to get local address - %s",
-+             strerror(errno));
-+      continue;
-+    }
-+
-+     /*
-+    * Try to match the systemd socket address to one of the listeners...
-+    */
-+
-+    for (lis = (cupsd_listener_t *)cupsArrayFirst(Listeners);
-+       lis;
-+       lis = (cupsd_listener_t *)cupsArrayNext(Listeners))
-+      if (httpAddrEqual(&lis->address, &addr))
-+      break;
-+
-+    if (lis)
-+    {
-+      cupsdLogMessage(CUPSD_LOG_DEBUG,
-+                      "systemd_checkin: Matched existing listener %s with fd %d...",
-+                      httpAddrString(&(lis->address), s, sizeof(s)), fd);
-+    }
-+    else
-+    {
-+      cupsdLogMessage(CUPSD_LOG_DEBUG,
-+                      "systemd_checkin: Adding new listener %s with fd %d...",
-+                      httpAddrString(&addr, s, sizeof(s)), fd);
-+
-+      if ((lis = calloc(1, sizeof(cupsd_listener_t))) == NULL)
-+      {
-+        cupsdLogMessage(CUPSD_LOG_ERROR,
-+                        "systemd_checkin: Unable to allocate listener - "
-+                        "%s.", strerror(errno));
-+	return (-ENOMEM);
-+      }
-+
-+      cupsArrayAdd(Listeners, lis);
-+
-+      memcpy(&lis->address, &addr, sizeof(lis->address));
-+    }
-+
-+    lis->fd = fd;
-+    lis->is_systemd = 1;
-+
-+#  ifdef HAVE_SSL
-+    if (_httpAddrPort(&(lis->address)) == 443)
-+      lis->encryption = HTTP_ENCRYPT_ALWAYS;
-+#  endif /* HAVE_SSL */
-+  }
-+
-+  return (0);
-+}
-+#endif /* HAVE_SYSTEMD */
- 
- /*
-  * 'parent_handler()' - Catch USR1/CHLD signals...

diff --git a/net-print/cups/files/cups-2.0.0-rename-systemd-service-files.patch b/net-print/cups/files/cups-2.0.0-rename-systemd-service-files.patch
deleted file mode 100644
index c93f322..0000000
--- a/net-print/cups/files/cups-2.0.0-rename-systemd-service-files.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From caebb5eb5194b89da1ff08cca8d35ddfe6b293d3 Mon Sep 17 00:00:00 2001
-From: Matthias Maier <tamiko@kyomu.43-1.org>
-Date: Thu, 16 Oct 2014 01:25:23 +0200
-Subject: [PATCH] change systemd service files to gentoo naming scheme
-
----
- configure.ac                        |  6 +++---
- scheduler/Makefile                  | 14 +++++++-------
- scheduler/cups.path.in              |  8 ++++++++
- scheduler/cups.service.in           | 10 ++++++++++
- scheduler/cups.socket.in            | 12 ++++++++++++
- scheduler/org.cups.cupsd.path.in    |  8 --------
- scheduler/org.cups.cupsd.service.in | 10 ----------
- scheduler/org.cups.cupsd.socket.in  | 12 ------------
- 8 files changed, 40 insertions(+), 40 deletions(-)
- create mode 100644 scheduler/cups.path.in
- create mode 100644 scheduler/cups.service.in
- create mode 100644 scheduler/cups.socket.in
- delete mode 100644 scheduler/org.cups.cupsd.path.in
- delete mode 100644 scheduler/org.cups.cupsd.service.in
- delete mode 100644 scheduler/org.cups.cupsd.socket.in
-
-diff --git a/configure.ac b/configure.ac
-index 21d7f93..cb5db92 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -81,9 +81,9 @@ AC_OUTPUT(Makedefs
- 	  scheduler/cups.sh
- 	  scheduler/cups.xml
- 	  scheduler/org.cups.cups-lpd.plist
--	  scheduler/org.cups.cupsd.path
--	  scheduler/org.cups.cupsd.service
--	  scheduler/org.cups.cupsd.socket
-+	  scheduler/cups.path
-+	  scheduler/cups.service
-+	  scheduler/cups.socket
-  	  templates/header.tmpl
-           packaging/cups.list
- 	  $LANGFILES)
-diff --git a/scheduler/Makefile b/scheduler/Makefile
-index c0c54a4..bf1ae32 100644
---- a/scheduler/Makefile
-+++ b/scheduler/Makefile
-@@ -192,7 +192,7 @@ install-data:
- 	if test "x$(LAUNCHD_DIR)" != x; then \
- 		echo Installing launchd configuration files...; \
- 		$(INSTALL_DIR) $(BUILDROOT)$(LAUNCHD_DIR); \
--		$(INSTALL_DATA) org.cups.cupsd.plist $(BUILDROOT)$(LAUNCHD_DIR); \
-+		$(INSTALL_DATA) cups.plist $(BUILDROOT)$(LAUNCHD_DIR); \
- 		$(INSTALL_DATA) org.cups.cups-lpd.plist $(BUILDROOT)$(LAUNCHD_DIR); \
- 	fi
- 	if test "x$(SMFMANIFESTDIR)" != x; then \
-@@ -203,9 +203,9 @@ 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) cups.path $(BUILDROOT)$(SYSTEMD_DIR); \
-+		$(INSTALL_DATA) cups.service $(BUILDROOT)$(SYSTEMD_DIR); \
-+		$(INSTALL_DATA) cups.socket $(BUILDROOT)$(SYSTEMD_DIR); \
- 	fi
- 	if test "x$(XINETD)" != x; then \
- 		echo Installing xinetd configuration file for cups-lpd...; \
-@@ -335,9 +335,9 @@ uninstall:
- 	fi
- 	if test "x$SYSTEMD_DIR" != x; then \
- 		echo Uninstalling systemd files...; \
--		$(RM) $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cupsd.path; \
--		$(RM) $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cupsd.service; \
--		$(RM) $(BUILDROOT)$(SYSTEMD_DIR)/org.cups.cupsd.socket; \
-+		$(RM) $(BUILDROOT)$(SYSTEMD_DIR)/cups.path; \
-+		$(RM) $(BUILDROOT)$(SYSTEMD_DIR)/cups.service; \
-+		$(RM) $(BUILDROOT)$(SYSTEMD_DIR)/cups.socket; \
- 	fi
- 	if test "x$(SMFMANIFESTDIR)" != x; then \
- 		echo Uninstalling SMF manifest file...;\
-diff --git a/scheduler/cups.path.in b/scheduler/cups.path.in
-new file mode 100644
-index 0000000..4281d6a
---- /dev/null
-+++ b/scheduler/cups.path.in
-@@ -0,0 +1,8 @@
-+[Unit]
-+Description=CUPS Scheduler
-+
-+[Path]
-+PathExistsGlob=@CUPS_CACHEDIR@/d*
-+
-+[Install]
-+WantedBy=multi-user.target
-diff --git a/scheduler/cups.service.in b/scheduler/cups.service.in
-new file mode 100644
-index 0000000..f8912eb
---- /dev/null
-+++ b/scheduler/cups.service.in
-@@ -0,0 +1,10 @@
-+[Unit]
-+Description=CUPS Scheduler
-+
-+[Service]
-+ExecStart=@sbindir@/cupsd -l
-+Type=simple
-+
-+[Install]
-+Also=cups.socket cups.path
-+WantedBy=printer.target
-diff --git a/scheduler/cups.socket.in b/scheduler/cups.socket.in
-new file mode 100644
-index 0000000..cd98aa5
---- /dev/null
-+++ b/scheduler/cups.socket.in
-@@ -0,0 +1,12 @@
-+[Unit]
-+Description=CUPS Scheduler
-+
-+[Socket]
-+ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
-+ListenStream=[::1]:631
-+ListenStream=127.0.0.1:631
-+BindIPv6Only=ipv6-only
-+ReusePort=true
-+
-+[Install]
-+WantedBy=sockets.target
-diff --git a/scheduler/org.cups.cupsd.path.in b/scheduler/org.cups.cupsd.path.in
-deleted file mode 100644
-index 1bccc6f..0000000
---- a/scheduler/org.cups.cupsd.path.in
-+++ /dev/null
-@@ -1,8 +0,0 @@
--[Unit]
--Description=CUPS Scheduler
--
--[Path]
--PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
--
--[Install]
--WantedBy=multi-user.target
-diff --git a/scheduler/org.cups.cupsd.service.in b/scheduler/org.cups.cupsd.service.in
-deleted file mode 100644
-index 4390016..0000000
---- a/scheduler/org.cups.cupsd.service.in
-+++ /dev/null
-@@ -1,10 +0,0 @@
--[Unit]
--Description=CUPS Scheduler
--
--[Service]
--ExecStart=@sbindir@/cupsd -l
--Type=simple
--
--[Install]
--Also=org.cups.cupsd.socket org.cups.cupsd.path
--WantedBy=printer.target
-diff --git a/scheduler/org.cups.cupsd.socket.in b/scheduler/org.cups.cupsd.socket.in
-deleted file mode 100644
-index cd98aa5..0000000
---- a/scheduler/org.cups.cupsd.socket.in
-+++ /dev/null
-@@ -1,12 +0,0 @@
--[Unit]
--Description=CUPS Scheduler
--
--[Socket]
--ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
--ListenStream=[::1]:631
--ListenStream=127.0.0.1:631
--BindIPv6Only=ipv6-only
--ReusePort=true
--
--[Install]
--WantedBy=sockets.target
--- 
-2.0.4
-

diff --git a/net-print/cups/files/cups-2.0.1-fix-compilation.patch b/net-print/cups/files/cups-2.0.1-fix-compilation.patch
deleted file mode 100644
index 5828b68..0000000
--- a/net-print/cups/files/cups-2.0.1-fix-compilation.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 7bb9184b40bea3c4b9f46362642e5d40053a3ae1 Mon Sep 17 00:00:00 2001
-From: Matthias Maier <tamiko@kyomu.43-1.org>
-Date: Wed, 19 Nov 2014 18:44:33 +0100
-Subject: [PATCH] fix compilation
-
----
- test/ippserver.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/test/ippserver.c b/test/ippserver.c
-index c785e5f..1c64668 100644
---- a/test/ippserver.c
-+++ b/test/ippserver.c
-@@ -421,7 +421,7 @@ static int		valid_job_attributes(_ipp_client_t *client);
- 
- #  ifdef HAVE_DNSSD
- static DNSServiceRef	DNSSDMaster = NULL;
--#  else /* HAVE_AVAHI */
-+#  elif defined(HAVE_AVAHI)
- static AvahiThreadedPoll *DNSSDMaster = NULL;
- static AvahiClient	*DNSSDClient = NULL;
- #  endif /* HAVE_DNSSD */
--- 
-2.0.4
-

diff --git a/net-print/cups/files/cups-2.0.1-fix-linkage-to-gnutls.patch b/net-print/cups/files/cups-2.0.1-fix-linkage-to-gnutls.patch
deleted file mode 100644
index dafb6e1..0000000
--- a/net-print/cups/files/cups-2.0.1-fix-linkage-to-gnutls.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/cups/usersys.c
-+++ b/cups/usersys.c
-@@ -1044,7 +1044,9 @@
- 	  options = 0;
-       }
- 
-+#ifdef HAVE_SSL
-       _httpTLSSetOptions(options);
-+#endif /* HAVE_SSL */
-     }
-   }
- 
---- a/scheduler/conf.c
-+++ b/scheduler/conf.c
-@@ -2975,7 +2975,9 @@
-         }
-       }
- 
-+#ifdef HAVE_SSL
-       _httpTLSSetOptions(options);
-+#endif /* HAVE_SSL */
-     }
-     else if ((!_cups_strcasecmp(line, "Port") || !_cups_strcasecmp(line, "Listen")
- #ifdef HAVE_SSL

diff --git a/net-print/cups/files/cups-2.0.1-rename-systemd-service-files.patch b/net-print/cups/files/cups-2.0.1-rename-systemd-service-files.patch
deleted file mode 100644
index c77997d..0000000
--- a/net-print/cups/files/cups-2.0.1-rename-systemd-service-files.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-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.path.in b/scheduler/org.cups.cupsd.path.in
-index 1bccc6f..90c8576 100644
---- a/scheduler/org.cups.cupsd.path.in
-+++ b/scheduler/org.cups.cupsd.path.in
-@@ -2,7 +2,7 @@
- Description=CUPS Scheduler
- 
- [Path]
--PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
-+PathExists=@CUPS_CACHEDIR@/d*
- 
- [Install]
- WantedBy=multi-user.target
-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
-diff --git a/scheduler/org.cups.cupsd.socket.in b/scheduler/org.cups.cupsd.socket.in
---- a/scheduler/org.cups.cupsd.socket.in
-+++ a/scheduler/org.cups.cupsd.socket.in
-@@ -3,6 +3,10 @@
- 
- [Socket]
- ListenStream=@CUPS_DEFAULT_DOMAINSOCKET@
-+ListenStream=[::1]:631
-+ListenStream=127.0.0.1:631
-+BindIPv6Only=ipv6-only
-+ReusePort=true
- 
- [Install]
- WantedBy=sockets.target
--- 
-2.0.4
-

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
deleted file mode 100644
index 86114ea..0000000
--- a/net-print/cups/files/cups-2.0.2-poll-CPU-loop-STR-4605.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-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);


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2016-12-29 18:52 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2016-12-29 18:52 UTC (permalink / raw
  To: gentoo-commits

commit:     092b1bc43277abe35e537772ff7a404fd9a4a420
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 29 18:50:39 2016 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Thu Dec 29 18:52:09 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=092b1bc4

net-print/cups: Bump to version 2.2.1 (bug #594458).

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 net-print/cups/Manifest                            |   1 +
 net-print/cups/cups-2.2.1.ebuild                   | 351 +++++++++++++++++++++
 .../files/cups-2.2.0-dont-compress-manpages.patch  |  17 +
 3 files changed, 369 insertions(+)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index 5599f94..6c830a1 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -2,3 +2,4 @@ DIST cups-2.0.3-source.tar.bz2 8797220 SHA256 bc3167048690a7379f29a37d9fbd2143cf
 DIST cups-2.0.4-source.tar.bz2 8799274 SHA256 e1d5e68d9f24faca317aeaebc164c34102813bc0f1d69c00b3a59b49c49f4abd SHA512 d0db3ce729ee893f260b69814343e84af4b934f1783d96049fcf58204a93ac534d0bf0c1626f5ac55371962419b91c857bd872f499e905223069b5103405c4ae WHIRLPOOL cbeb3f61cf534017180aa0d55f60ec81ac082f92d3626b18b4480aaf9e67b425b829ad260dfa1227ba56a79b52959f1e740848d26dc938fc9fc0159f1844a2bb
 DIST cups-2.1.3-source.tar.bz2 8832400 SHA256 36a70d43584aea2617da914b9331e23341c3501a8254c4d2eae9c11ec01fd4d3 SHA512 5cc715b8521b4d6af29a97a8abf7a1b0973840c00727ee8e7926e89a4a9da8e67565d14cc4b57ab7cfb40b238d4faaed7608b9ab95947cc3671ed87b710f8f36 WHIRLPOOL 161c65b8adc3ab1c65208fe23bf14aefe5dfd84e9b162c69b1a8f977c3a4fc7c31ea92d0c2eaca3c276fa192596a31701052f0c2a1ffd213a09d48c11d446f6f
 DIST cups-2.1.4.tar.gz 9572653 SHA256 1f182f145489e2454969b221056b6b9bac2beb4e38cd75fa12a9ec15d24d5301 SHA512 5f36d21e1e094323f1811229b452f096f3f0b264757b3c3b1742bbd7ea0059e34d3cd2fbf3b6856d25a04ae1779babafa6d598a8ba249448fce3bf7cafa59aae WHIRLPOOL 217b9024c34369c8839b0a1b2b3924eb00e9b8d87cfd8d50a59ad0c33c1044f53d479246d67dff4598049efd15259def90e4bcddc6c3c20dff38811e159d2c4b
+DIST cups-2.2.1.tar.gz 9485107 SHA256 e5864ac2f984a0f8dcb8c1e3a71740f8e4727da73944f93c7ef84adeccc1d971 SHA512 b7f10fcb0bbf1eb977d1568032f660ad4aedb25c0195fa133e1c5b365df8fc38170d9c3fcfeeac3e1a2541cba5ac7218ea17736c601802cffcfb446a4a578ce8 WHIRLPOOL 14080b7cf9791db12b462eb5a7d05cc4218560b0a95d2caedd1ca71996a524f3ad7ea0d65b14a14414a7359f15b112f8ba2d6f5fa489d6d3f5873a902c0cef4c

diff --git a/net-print/cups/cups-2.2.1.ebuild b/net-print/cups/cups-2.2.1.ebuild
new file mode 100644
index 00000000..d795683
--- /dev/null
+++ b/net-print/cups/cups-2.2.1.ebuild
@@ -0,0 +1,351 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools 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="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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 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=">=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"
+
+# systemd-socket.patch from Fedora
+PATCHES=(
+	"${FILESDIR}/${PN}-2.2.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.1-xinetd-installation-fix.patch"
+	"${FILESDIR}/${PN}-2.0.3-cross-compile.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() {
+	default
+
+	# 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) \
+		$(use_enable debug debug-printfs) \
+		$(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-r2 "${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 file is now provided by cups-filters:
+	rm -r "${ED}"/usr/share/cups/banners || 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.2.0-dont-compress-manpages.patch b/net-print/cups/files/cups-2.2.0-dont-compress-manpages.patch
new file mode 100644
index 00000000..7b61b39
--- /dev/null
+++ b/net-print/cups/files/cups-2.2.0-dont-compress-manpages.patch
@@ -0,0 +1,17 @@
+--- cups-2.2.0/config-scripts/cups-manpages.m4
++++ cups-2.2.0/config-scripts/cups-manpages.m4
+@@ -53,10 +53,10 @@
+ 		;;
+ 	Linux* | GNU* | Darwin*)
+ 		# Linux, GNU Hurd, and macOS
+-		MAN1EXT=1.gz
+-		MAN5EXT=5.gz
+-		MAN7EXT=7.gz
+-		MAN8EXT=8.gz
++		MAN1EXT=1
++		MAN5EXT=5
++		MAN7EXT=7
++		MAN8EXT=8
+ 		MAN8DIR=8
+ 		;;
+ 	*)


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2017-02-15  0:42 Andreas Hüttel
  0 siblings, 0 replies; 15+ messages in thread
From: Andreas Hüttel @ 2017-02-15  0:42 UTC (permalink / raw
  To: gentoo-commits

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
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2017-06-30 21:49 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2017-06-30 21:49 UTC (permalink / raw
  To: gentoo-commits

commit:     124b7ed7b9e73215f832640b729f090fd39c7015
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 30 21:45:04 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Jun 30 21:49:24 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=124b7ed7

net-print/cups: Bump to version 2.2.4

Package-Manager: Portage-2.3.6, Repoman-2.3.2

 net-print/cups/Manifest                            |   1 +
 net-print/cups/cups-2.2.4.ebuild                   | 349 +++++++++++++++++++++
 .../cups/files/cups-2.2.4-fix-install-perms.patch  |  18 ++
 3 files changed, 368 insertions(+)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index 001caaa444e..ecf1c7b02ab 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,3 +1,4 @@
 DIST cups-2.1.4.tar.gz 9572653 SHA256 1f182f145489e2454969b221056b6b9bac2beb4e38cd75fa12a9ec15d24d5301 SHA512 5f36d21e1e094323f1811229b452f096f3f0b264757b3c3b1742bbd7ea0059e34d3cd2fbf3b6856d25a04ae1779babafa6d598a8ba249448fce3bf7cafa59aae WHIRLPOOL 217b9024c34369c8839b0a1b2b3924eb00e9b8d87cfd8d50a59ad0c33c1044f53d479246d67dff4598049efd15259def90e4bcddc6c3c20dff38811e159d2c4b
 DIST cups-2.2.2.tar.gz 9489493 SHA256 5e7b396b41f55231dde8dd0465cdd81583cd47ecffe4960c777162fbe3cce03c SHA512 98640b62f706609bbe703318999efb8f78c747e751aafaa1a6f38f4f0dca6fad84ec7e1dfbe9ce17b02ba2ac3fd6e8e480582be5c2cee8eaa707c0ca7eb1978f WHIRLPOOL 745c80114dcac1ed61eec8a8d903ced0d005ec0ad2c05883dcb0aaf9afaf1c410801245ef6bdcb5b77f09a9d96f90e2f94d553b4a19d9425d4005738c8508feb
 DIST cups-2.2.3.tar.gz 9496214 SHA256 7aa7e8d581f0eb204f75203082403bfa931f8c058bffae71b210800102e5feb5 SHA512 95d8f18fad5b3fd25fe88cc29d159723dcfa735248503d0285949fcd7451f0ccac286719077d0f8a8eda7ee9a053a3d30fa3fd28cb74b59336b6718552d9d2e8 WHIRLPOOL 3aa43f1b83ee62939939bd148c2ab13985143746f7acc3d9c82283e1b096524c7738ae5e1670e717c9329f8d3e917cfcc1c8a7e33af93baa74ea83837d92b5f9
+DIST cups-2.2.4.tar.gz 9984903 SHA256 339fb0c0a70a1edf1ef169f2afb21bab92cdd3074adf630352c427b795f20fa7 SHA512 765fe49d1a7a491d7d5db051f73d039d183d0f7a560e9fd89f6732b8a699d3246080e1aaed4ddfed3a9fbdb876b09aa22939d6ee5da2280b1246e4ba933c55f0 WHIRLPOOL 86557f6244b7aa7b19cc67caff7c845291d09699353bd337090111f92b6afb6b9e175ca68df8a15d8915a5a15fd72348805e4ecb7da532a994f46b2c2d4cdada

diff --git a/net-print/cups/cups-2.2.4.ebuild b/net-print/cups/cups-2.2.4.ebuild
new file mode 100644
index 00000000000..42bac42a67b
--- /dev/null
+++ b/net-print/cups/cups-2.2.4.ebuild
@@ -0,0 +1,349 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools 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="https://github.com/apple/cups.git"
+	if [[ ${PV} != 9999 ]]; then
+		EGIT_BRANCH=branch-${PV/.9999}
+	fi
+else
+	SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~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 ru"
+for X in ${LANGS} ; do
+	IUSE="${IUSE} +linguas_${X}"
+done
+
+CDEPEND="
+	app-text/libpaper
+	sys-libs/zlib
+	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? (
+		>=net-libs/gnutls-2.12.23-r6:0=[${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=">=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"
+
+# systemd-socket.patch from Fedora
+PATCHES=(
+	"${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch"
+	"${FILESDIR}/${PN}-2.2.4-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.1-xinetd-installation-fix.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; this should now work in most cases (bug 501122)
+			if use usb; then
+				if linux_chkconfig_present USB_PRINTER; then
+					elog "Your USB printers will be managed via libusb. In case you run into problems, "
+					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
+					elog "usblp kernel module."
+					elog "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() {
+	default
+
+	# 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 myeconfargs=()
+
+	# explicitly specify compiler wrt bug 524340
+	#
+	# need to override KRB5CONFIG for proper flags
+	# https://www.cups.org/str.php?L4423
+	myeconfargs+=(
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
+		--libdir="${EPREFIX}"/usr/$(get_libdir)
+		--localstatedir="${EPREFIX}"/var
+		--with-exe-file-perm=755
+		--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="${EPREFIX}"/etc/xinetd.d
+		$(multilib_native_use_enable acl)
+		$(use_enable dbus)
+		$(use_enable debug)
+		$(use_enable debug debug-guards)
+		$(use_enable debug debug-printfs)
+		$(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)
+	)
+
+	if tc-is-static-only; then
+		myeconfargs+=(
+			--disable-shared
+		)
+	fi
+
+	econf "${myeconfargs[@]}"
+
+	# 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
+
+	# additional path corrections needed for prefix, see bug 597728
+	sed -i -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" Makedefs || die
+	sed -i -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" Makedefs || die
+	sed -i -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" Makedefs || die
+	sed -i -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" Makedefs || 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}.md
+
+	# 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-r3 "${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 file is now provided by cups-filters:
+	rm -r "${ED}"/usr/share/cups/banners || 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
+
+	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
+		break
+	done
+}
+
+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.2.4-fix-install-perms.patch b/net-print/cups/files/cups-2.2.4-fix-install-perms.patch
new file mode 100644
index 00000000000..b9fda922d2c
--- /dev/null
+++ b/net-print/cups/files/cups-2.2.4-fix-install-perms.patch
@@ -0,0 +1,18 @@
+--- cups-2.2.4/Makedefs.in
++++ cups-2.2.4/Makedefs.in
+@@ -39,12 +39,12 @@
+ #
+ 
+ INSTALL_BIN	=	$(LIBTOOL) $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
+-INSTALL_COMPDATA =	$(INSTALL) -c -m 444 @INSTALL_GZIP@
++INSTALL_COMPDATA =	$(INSTALL) -c -m 644 @INSTALL_GZIP@
+ INSTALL_CONFIG	=	$(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
+-INSTALL_DATA	=	$(INSTALL) -c -m 444
++INSTALL_DATA	=	$(INSTALL) -c -m 644
+ INSTALL_DIR	=	$(INSTALL) -d
+ INSTALL_LIB	=	$(LIBTOOL) $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
+-INSTALL_MAN	=	$(INSTALL) -c -m 444
++INSTALL_MAN	=	$(INSTALL) -c -m 644
+ INSTALL_SCRIPT	=	$(INSTALL) -c -m @CUPS_EXE_FILE_PERM@
+ 
+ #


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2017-11-10  9:07 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2017-11-10  9:07 UTC (permalink / raw
  To: gentoo-commits

commit:     a7e1ca391848b9c28162521b20bc9d8a7ffde697
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Nov 10 09:03:06 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Nov 10 09:07:48 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7e1ca39

net-print/cups: Bump to version 2.2.6

Package-Manager: Portage-2.3.13, Repoman-2.3.4

 net-print/cups/Manifest                            |   1 +
 net-print/cups/cups-2.2.6.ebuild                   | 349 +++++++++++++++++++++
 .../cups/files/cups-2.2.6-fix-install-perms.patch  |  18 ++
 3 files changed, 368 insertions(+)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index a2cc1d96677..95ee332eebc 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,3 +1,4 @@
 DIST cups-2.1.4.tar.gz 9572653 SHA256 1f182f145489e2454969b221056b6b9bac2beb4e38cd75fa12a9ec15d24d5301 SHA512 5f36d21e1e094323f1811229b452f096f3f0b264757b3c3b1742bbd7ea0059e34d3cd2fbf3b6856d25a04ae1779babafa6d598a8ba249448fce3bf7cafa59aae WHIRLPOOL 217b9024c34369c8839b0a1b2b3924eb00e9b8d87cfd8d50a59ad0c33c1044f53d479246d67dff4598049efd15259def90e4bcddc6c3c20dff38811e159d2c4b
 DIST cups-2.2.3.tar.gz 9496214 SHA256 7aa7e8d581f0eb204f75203082403bfa931f8c058bffae71b210800102e5feb5 SHA512 95d8f18fad5b3fd25fe88cc29d159723dcfa735248503d0285949fcd7451f0ccac286719077d0f8a8eda7ee9a053a3d30fa3fd28cb74b59336b6718552d9d2e8 WHIRLPOOL 3aa43f1b83ee62939939bd148c2ab13985143746f7acc3d9c82283e1b096524c7738ae5e1670e717c9329f8d3e917cfcc1c8a7e33af93baa74ea83837d92b5f9
 DIST cups-2.2.4.tar.gz 9984903 SHA256 339fb0c0a70a1edf1ef169f2afb21bab92cdd3074adf630352c427b795f20fa7 SHA512 765fe49d1a7a491d7d5db051f73d039d183d0f7a560e9fd89f6732b8a699d3246080e1aaed4ddfed3a9fbdb876b09aa22939d6ee5da2280b1246e4ba933c55f0 WHIRLPOOL 86557f6244b7aa7b19cc67caff7c845291d09699353bd337090111f92b6afb6b9e175ca68df8a15d8915a5a15fd72348805e4ecb7da532a994f46b2c2d4cdada
+DIST cups-2.2.6.tar.gz 10317889 SHA256 bf75b33755be92ffe11642dc54365d876c57cee13d6e12507645a8c2d570033a SHA512 ae880aa3f675e0c1ad269200d06be3c25675a45a697c7a8b44e6ec0c30f05f333acca35cd965e667ff066d753df5e59447c2eeaea240e72d2731690b3b9dcf76 WHIRLPOOL 6f7107703701f12349122f45401d4fbfd7c03fae847fcf5760a656b24f2cadf836447491b305bbc1074bf2f17aead3b9544c6d03fd16201dc30b5852ff349662

diff --git a/net-print/cups/cups-2.2.6.ebuild b/net-print/cups/cups-2.2.6.ebuild
new file mode 100644
index 00000000000..af840a3d0aa
--- /dev/null
+++ b/net-print/cups/cups-2.2.6.ebuild
@@ -0,0 +1,349 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python2_7 )
+
+inherit autotools gnome2-utils flag-o-matic linux-info xdg-utils \
+	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="https://github.com/apple/cups.git"
+	if [[ ${PV} != 9999 ]]; then
+		EGIT_BRANCH=branch-${PV/.9999}
+	fi
+else
+	SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
+fi
+
+DESCRIPTION="The Common Unix Printing System"
+HOMEPAGE="https://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 ru"
+for X in ${LANGS} ; do
+	IUSE="${IUSE} +linguas_${X}"
+done
+
+CDEPEND="
+	app-text/libpaper
+	sys-libs/zlib
+	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? (
+		>=net-libs/gnutls-2.12.23-r6:0=[${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=">=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"
+
+# systemd-socket.patch from Fedora
+PATCHES=(
+	"${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch"
+	"${FILESDIR}/${PN}-2.2.6-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.1-xinetd-installation-fix.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; this should now work in most cases (bug 501122)
+			if use usb; then
+				if linux_chkconfig_present USB_PRINTER; then
+					elog "Your USB printers will be managed via libusb. In case you run into problems, "
+					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
+					elog "usblp kernel module."
+					elog "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() {
+	default
+
+	# 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 myeconfargs=()
+
+	# explicitly specify compiler wrt bug 524340
+	#
+	# need to override KRB5CONFIG for proper flags
+	# https://github.com/apple/cups/issues/4423
+	myeconfargs+=(
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
+		--libdir="${EPREFIX}"/usr/$(get_libdir)
+		--localstatedir="${EPREFIX}"/var
+		--with-exe-file-perm=755
+		--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="${EPREFIX}"/etc/xinetd.d
+		$(multilib_native_use_enable acl)
+		$(use_enable dbus)
+		$(use_enable debug)
+		$(use_enable debug debug-guards)
+		$(use_enable debug debug-printfs)
+		$(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)
+	)
+
+	if tc-is-static-only; then
+		myeconfargs+=(
+			--disable-shared
+		)
+	fi
+
+	econf "${myeconfargs[@]}"
+
+	# 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
+
+	# additional path corrections needed for prefix, see bug 597728
+	sed -i -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" Makedefs || die
+	sed -i -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" Makedefs || die
+	sed -i -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" Makedefs || die
+	sed -i -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" Makedefs || 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}.md
+
+	# 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-r3 "${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 file is now provided by cups-filters:
+	rm -r "${ED}"/usr/share/cups/banners || 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
+	xdg_desktop_database_update
+
+	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
+		break
+	done
+}
+
+pkg_postrm() {
+	# Update desktop file database and gtk icon cache (bug 370059)
+	gnome2_icon_cache_update
+	xdg_desktop_database_update
+}

diff --git a/net-print/cups/files/cups-2.2.6-fix-install-perms.patch b/net-print/cups/files/cups-2.2.6-fix-install-perms.patch
new file mode 100644
index 00000000000..a8f007446f2
--- /dev/null
+++ b/net-print/cups/files/cups-2.2.6-fix-install-perms.patch
@@ -0,0 +1,18 @@
+--- cups-2.2.6/Makedefs.in
++++ cups-2.2.6/Makedefs.in
+@@ -49,12 +49,12 @@
+ #
+ 
+ INSTALL_BIN	=	@LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
+-INSTALL_COMPDATA =	$(INSTALL) -c -m 444 @INSTALL_GZIP@
++INSTALL_COMPDATA =	$(INSTALL) -c -m 644 @INSTALL_GZIP@
+ INSTALL_CONFIG	=	$(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
+-INSTALL_DATA	=	$(INSTALL) -c -m 444
++INSTALL_DATA	=	$(INSTALL) -c -m 644
+ INSTALL_DIR	=	$(INSTALL) -d
+ INSTALL_LIB	=	@LIBTOOL_INSTALL@ $(INSTALL) -c -m @CUPS_EXE_FILE_PERM@ @INSTALL_STRIP@
+-INSTALL_MAN	=	$(INSTALL) -c -m 444
++INSTALL_MAN	=	$(INSTALL) -c -m 644
+ INSTALL_SCRIPT	=	$(INSTALL) -c -m @CUPS_EXE_FILE_PERM@
+ 
+ #


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2018-06-06 10:51 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2018-06-06 10:51 UTC (permalink / raw
  To: gentoo-commits

commit:     533b777243fff02705e8e850894dd6cf972b6a1b
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Jun  6 10:07:40 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Jun  6 10:51:28 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=533b7772

net-print/cups: Removed old.

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 net-print/cups/Manifest                            |   2 -
 net-print/cups/cups-2.1.4.ebuild                   | 344 ---------------------
 net-print/cups/cups-2.2.6.ebuild                   | 339 --------------------
 .../files/cups-1.6.0-dont-compress-manpages.patch  |  17 -
 .../cups/files/cups-1.6.0-fix-install-perms.patch  |  23 --
 .../cups/files/cups-2.0.3-cross-compile.patch      |  30 --
 .../cups/files/cups-2.1.2-systemd-socket.patch     |  51 ---
 net-print/cups/files/cupsd.init.d-r2               |  19 --
 8 files changed, 825 deletions(-)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index 3d97bd7f229..0c1198ceaf7 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,5 +1,3 @@
-DIST cups-2.1.4.tar.gz 9572653 BLAKE2B d01242e8188f8b179e2beebc3730cc32588c4512e56e76be740f6a3e63411f277a6e9b241b27cfa12d3b26743ad9ef6e85f70f66e19d4f4c70593707b1bbaec1 SHA512 5f36d21e1e094323f1811229b452f096f3f0b264757b3c3b1742bbd7ea0059e34d3cd2fbf3b6856d25a04ae1779babafa6d598a8ba249448fce3bf7cafa59aae
-DIST cups-2.2.6.tar.gz 10317889 BLAKE2B 5d9d8a09e73074a8638913c30e163cbed6bbadc4fa0c6b24dd185a2137f3af72aba553b3de62dbf053f9f92f7737efdb5d06e27bfb84225f39d855d830aea02e SHA512 ae880aa3f675e0c1ad269200d06be3c25675a45a697c7a8b44e6ec0c30f05f333acca35cd965e667ff066d753df5e59447c2eeaea240e72d2731690b3b9dcf76
 DIST cups-2.2.7-source.tar.gz 10330296 BLAKE2B 015a64758ee8d2559f4259ff36bf702b93dc695a44e2170d4ecf71b80d5691b4d947decf0a84ff9433b43c6d47dc350a8769d1e230ceda276c13add67e5e8a20 SHA512 780a6a484f38967ff678456ec7b532aa8445a9562663e4e4f6f7a24aac6ec9e8eae36459ee3c025dff053d59ad1d9ecfb823e8a832bae9d384db3d1a10d8860e
 DIST cups-2.2.8-source.tar.gz 10374921 BLAKE2B 3fc4d5cae3848cbb7fb1263b377210254dfa08d70a1218c7f20d5a277d0536791e071c50bac282ab2049e1cffddfe91438216ceb37ec279d7cb0ec7b57a315da SHA512 6ed44c5e6f1c46c85b06691713ce476330c93834243720ad2c04fa983e20cde9f6ebfc2eb2ba8bb3700f11320471b99856d6402d3641038da690f89c49fbd261
 DIST cups-2.3b5-source.tar.gz 10176856 BLAKE2B beda07a64ef463371e4e1f25b397caa9487f7acdc982fcfa7edee736a41f6a6875747c772e4c59e2d2746c8c508a0cc87f8608227592f5e1d9c8c48d956ab97c SHA512 48d45f090637bf32bdcc83106272efb8462ff609f74fbe4e82add7f851dcb9173126a1df186848c087d02e8c1441f31a70859faf2714b6ddb1f3738ef8dba60d

diff --git a/net-print/cups/cups-2.1.4.ebuild b/net-print/cups/cups-2.1.4.ebuild
deleted file mode 100644
index f3ca5bc789d..00000000000
--- a/net-print/cups/cups-2.1.4.ebuild
+++ /dev/null
@@ -1,344 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools 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="https://github.com/apple/cups.git"
-	if [[ ${PV} != 9999 ]]; then
-		EGIT_BRANCH=branch-${PV/.9999}
-	fi
-else
-	SRC_URI="https://github.com/apple/${PN}/archive/release-${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
-fi
-
-DESCRIPTION="The Common Unix Printing System"
-HOMEPAGE="https://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"
-
-CDEPEND="
-	app-text/libpaper
-	sys-libs/zlib
-	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}] )
-"
-
-DEPEND="${CDEPEND}
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
-"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-cups )
-"
-
-PDEPEND=">=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}/${PN}-release-${MY_PV}"
-
-# 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.1.2-systemd-socket.patch"
-	"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
-	"${FILESDIR}/${PN}-2.0.3-cross-compile.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() {
-	default
-
-	# 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 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://github.com/apple/cups/issues/4423
-	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) \
-		$(use_enable debug debug-printfs) \
-		$(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-r2 "${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 file is now provided by cups-filters:
-	rm -r "${ED}"/usr/share/cups/banners || 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/cups-2.2.6.ebuild b/net-print/cups/cups-2.2.6.ebuild
deleted file mode 100644
index 362712966b7..00000000000
--- a/net-print/cups/cups-2.2.6.ebuild
+++ /dev/null
@@ -1,339 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools gnome2-utils flag-o-matic linux-info xdg-utils \
-	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="https://github.com/apple/cups.git"
-	if [[ ${PV} != 9999 ]]; then
-		EGIT_BRANCH=branch-${PV/.9999}
-	fi
-else
-	SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
-fi
-
-DESCRIPTION="The Common Unix Printing System"
-HOMEPAGE="https://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"
-
-CDEPEND="
-	app-text/libpaper
-	sys-libs/zlib
-	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? (
-		>=net-libs/gnutls-2.12.23-r6:0=[${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}] )
-"
-
-DEPEND="${CDEPEND}
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
-"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-cups )
-"
-
-PDEPEND=">=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"
-
-# systemd-socket.patch from Fedora
-PATCHES=(
-	"${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch"
-	"${FILESDIR}/${PN}-2.2.6-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.1-xinetd-installation-fix.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; this should now work in most cases (bug 501122)
-			if use usb; then
-				if linux_chkconfig_present USB_PRINTER; then
-					elog "Your USB printers will be managed via libusb. In case you run into problems, "
-					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
-					elog "usblp kernel module."
-					elog "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() {
-	default
-
-	# 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 LINGUAS=\"${LINGUAS}\"
-
-	local myeconfargs=()
-
-	# explicitly specify compiler wrt bug 524340
-	#
-	# need to override KRB5CONFIG for proper flags
-	# https://github.com/apple/cups/issues/4423
-	myeconfargs+=(
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
-		--libdir="${EPREFIX}"/usr/$(get_libdir)
-		--localstatedir="${EPREFIX}"/var
-		--with-exe-file-perm=755
-		--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="${EPREFIX}"/etc/xinetd.d
-		$(multilib_native_use_enable acl)
-		$(use_enable dbus)
-		$(use_enable debug)
-		$(use_enable debug debug-guards)
-		$(use_enable debug debug-printfs)
-		$(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)
-	)
-
-	if tc-is-static-only; then
-		myeconfargs+=(
-			--disable-shared
-		)
-	fi
-
-	econf "${myeconfargs[@]}"
-
-	# 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
-
-	# additional path corrections needed for prefix, see bug 597728
-	sed -i -e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" Makedefs || die
-	sed -i -e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" Makedefs || die
-	sed -i -e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" Makedefs || die
-	sed -i -e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" Makedefs || 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}.md
-
-	# 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-r3 "${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 file is now provided by cups-filters:
-	rm -r "${ED}"/usr/share/cups/banners || 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
-	xdg_desktop_database_update
-
-	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
-		break
-	done
-}
-
-pkg_postrm() {
-	# Update desktop file database and gtk icon cache (bug 370059)
-	gnome2_icon_cache_update
-	xdg_desktop_database_update
-}

diff --git a/net-print/cups/files/cups-1.6.0-dont-compress-manpages.patch b/net-print/cups/files/cups-1.6.0-dont-compress-manpages.patch
deleted file mode 100644
index a388b4d5e02..00000000000
--- a/net-print/cups/files/cups-1.6.0-dont-compress-manpages.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/config-scripts/cups-manpages.m4
-+++ b/config-scripts/cups-manpages.m4
-@@ -69,10 +69,10 @@
- 		;;
- 	Linux* | GNU* | Darwin*)
- 		# Linux, GNU Hurd, and OS X
--		MAN1EXT=1.gz
--		MAN5EXT=5.gz
--		MAN7EXT=7.gz
--		MAN8EXT=8.gz
-+		MAN1EXT=1
-+		MAN5EXT=5
-+		MAN7EXT=7
-+		MAN8EXT=8
- 		MAN8DIR=8
- 		;;
- 	*)

diff --git a/net-print/cups/files/cups-1.6.0-fix-install-perms.patch b/net-print/cups/files/cups-1.6.0-fix-install-perms.patch
deleted file mode 100644
index e71934b7d49..00000000000
--- a/net-print/cups/files/cups-1.6.0-fix-install-perms.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/Makedefs.in
-+++ b/Makedefs.in
-@@ -40,14 +40,14 @@
- # Installation programs...
- #
- 
--INSTALL_BIN	=	$(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
--INSTALL_COMPDATA =	$(INSTALL) -c -m 444 @INSTALL_GZIP@
-+INSTALL_BIN	=	$(LIBTOOL) $(INSTALL) -c -m 755 @INSTALL_STRIP@
-+INSTALL_COMPDATA =	$(INSTALL) -c -m 644 @INSTALL_GZIP@
- INSTALL_CONFIG	=	$(INSTALL) -c -m @CUPS_CONFIG_FILE_PERM@
--INSTALL_DATA	=	$(INSTALL) -c -m 444
-+INSTALL_DATA	=	$(INSTALL) -c -m 644
- INSTALL_DIR	=	$(INSTALL) -d
--INSTALL_LIB	=	$(LIBTOOL) $(INSTALL) -c -m 555 @INSTALL_STRIP@
--INSTALL_MAN	=	$(INSTALL) -c -m 444
--INSTALL_SCRIPT	=	$(INSTALL) -c -m 555
-+INSTALL_LIB	=	$(LIBTOOL) $(INSTALL) -c -m 755 @INSTALL_STRIP@
-+INSTALL_MAN	=	$(INSTALL) -c -m 644
-+INSTALL_SCRIPT	=	$(INSTALL) -c -m 755
- 
- #
- # Default user, group, and system groups for the scheduler...

diff --git a/net-print/cups/files/cups-2.0.3-cross-compile.patch b/net-print/cups/files/cups-2.0.3-cross-compile.patch
deleted file mode 100644
index d0893c31fa7..00000000000
--- a/net-print/cups/files/cups-2.0.3-cross-compile.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-we don't actually install the generated html output, so no point in building
-them.  this also helps cross-compiling because the tool to create the html
-uses $CC and has no logic for $BUILD_CC.  simpler to disable than fix.
-
---- a/man/Makefile
-+++ b/man/Makefile
-@@ -73,7 +73,7 @@ MAN8	=	cupsaccept.$(MAN8EXT) \
- # Make everything...
- #
- 
--all:	$(MAN1) $(MAN5) $(MAN7) $(MAN8) html
-+all:	$(MAN1) $(MAN5) $(MAN7) $(MAN8)
- 
- 
- #
-
-similarly, the genstrings tool is used to gather all the translatable strings
-in the code base for passing to gettext.  in our builds, those strings already
-exist, so no point in running this tool.
-
---- a/ppdc/Makefile
-+++ b/ppdc/Makefile
-@@ -70,7 +70,6 @@ EXECTARGETS =	\
- TARGETS	=	\
- 		$(LIBTARGETS) \
- 		$(EXECTARGETS) \
--		genstrings
- 
- 
- #

diff --git a/net-print/cups/files/cups-2.1.2-systemd-socket.patch b/net-print/cups/files/cups-2.1.2-systemd-socket.patch
deleted file mode 100644
index 2f88924ee2d..00000000000
--- a/net-print/cups/files/cups-2.1.2-systemd-socket.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-diff --git a/scheduler/main.c b/scheduler/main.c
-index b1aa503..2f0f5fe 100644
---- a/scheduler/main.c
-+++ b/scheduler/main.c
-@@ -656,8 +656,15 @@ main(int  argc,				/* I - Number of command-line args */
- 
- #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 --git a/scheduler/org.cups.cupsd.path.in b/scheduler/org.cups.cupsd.path.in
-index 1bccc6f..4564164 100644
---- a/scheduler/org.cups.cupsd.path.in
-+++ b/scheduler/org.cups.cupsd.path.in
-@@ -2,7 +2,7 @@
- Description=CUPS Scheduler
- 
- [Path]
--PathExists=@CUPS_CACHEDIR@/org.cups.cupsd
-+PathExistsGlob=@CUPS_REQUESTS@/d*
- 
- [Install]
- WantedBy=multi-user.target
-diff --git a/scheduler/org.cups.cupsd.service.in b/scheduler/org.cups.cupsd.service.in
-index 0a27c76..0a841a2 100644
---- a/scheduler/org.cups.cupsd.service.in
-+++ b/scheduler/org.cups.cupsd.service.in
-@@ -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

diff --git a/net-print/cups/files/cupsd.init.d-r2 b/net-print/cups/files/cupsd.init.d-r2
deleted file mode 100644
index f8926307759..00000000000
--- a/net-print/cups/files/cupsd.init.d-r2
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-
-description="The Common Unix Printing System daemon"
-command="/usr/sbin/cupsd"
-
-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
-}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2018-06-12  8:17 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2018-06-12  8:17 UTC (permalink / raw
  To: gentoo-commits

commit:     48bc37017baa171ff6472b384f866cdf64a4edfa
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 12 08:15:14 2018 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Jun 12 08:15:14 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48bc3701

net-print/cups: Use official upstream fixes.

Closes: https://bugs.gentoo.org/657526
Package-Manager: Portage-2.3.40, Repoman-2.3.9

 net-print/cups/cups-2.2.8-r1.ebuild                |  2 +-
 net-print/cups/cups-2.3_beta5-r1.ebuild            |  2 +-
 .../cups/files/cups-2.2.8-validation_fixes.patch   | 79 ++++++++++++----------
 .../files/cups-2.3_beta5-validation_fixes.patch    | 69 +++++++++++++++++++
 4 files changed, 115 insertions(+), 37 deletions(-)

diff --git a/net-print/cups/cups-2.2.8-r1.ebuild b/net-print/cups/cups-2.2.8-r1.ebuild
index d9adea70fc4..f382bb8f76a 100644
--- a/net-print/cups/cups-2.2.8-r1.ebuild
+++ b/net-print/cups/cups-2.2.8-r1.ebuild
@@ -79,7 +79,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-1.4.4-nostrip.patch"
 	"${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
 	"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
-	"${FILESDIR}/${PN}-2.2.8-validation_fixes.patch" #657526
+	"${FILESDIR}/${P}-validation_fixes.patch" #657526
 )
 
 MULTILIB_CHOST_TOOLS=(

diff --git a/net-print/cups/cups-2.3_beta5-r1.ebuild b/net-print/cups/cups-2.3_beta5-r1.ebuild
index ee8375c1474..f7c6d292fae 100644
--- a/net-print/cups/cups-2.3_beta5-r1.ebuild
+++ b/net-print/cups/cups-2.3_beta5-r1.ebuild
@@ -77,7 +77,7 @@ PATCHES=(
 	"${FILESDIR}/${PN}-1.4.4-nostrip.patch"
 	"${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
 	"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
-	"${FILESDIR}/${PN}-2.2.8-validation_fixes.patch" #657526
+	"${FILESDIR}/${P}-validation_fixes.patch" #657526
 )
 
 MULTILIB_CHOST_TOOLS=(

diff --git a/net-print/cups/files/cups-2.2.8-validation_fixes.patch b/net-print/cups/files/cups-2.2.8-validation_fixes.patch
index ef87b6a81d8..4eee2274b94 100644
--- a/net-print/cups/files/cups-2.2.8-validation_fixes.patch
+++ b/net-print/cups/files/cups-2.2.8-validation_fixes.patch
@@ -1,30 +1,15 @@
-From 455c52a027ab3548953372a0b7bdb0008420e9ba Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
-Date: Fri, 8 Jun 2018 22:29:50 +0200
-Subject: [PATCH] Fix validation rejecting all NAME and TEXT attrs
-
-When the UTF-8 validation loop finishes successfully, `*ptr` points at
-the `'\0'` at the end of the string. The code misinterpreted this as a
-control character (`*ptr < ' '`) and failed the validation.
-
-Fixes https://github.com/apple/cups/issues/5325
----
- cups/ipp.c | 24 ++++++++++--------------
- 1 file changed, 10 insertions(+), 14 deletions(-)
+From 18545a5e7ab478b187a0d7136ee19496ae32fc9b Mon Sep 17 00:00:00 2001
+From: Michael R Sweet <michael.r.sweet@gmail.com>
+Date: Mon, 11 Jun 2018 09:37:55 -0400
+Subject: [PATCH] Fix regressions in ippValidateAttribute (Issue #5322, Issue
+ #5330)
 
 diff --git a/cups/ipp.c b/cups/ipp.c
-index 95d53cc44..204c71fcd 100644
+index 9346b201f..d6e39d5d8 100644
 --- a/cups/ipp.c
 +++ b/cups/ipp.c
-@@ -5030,15 +5030,13 @@ ippValidateAttribute(
- 	    else if (*ptr & 0x80)
+@@ -5101,16 +5101,19 @@ ippValidateAttribute(
  	      break;
- 	    else if ((*ptr < ' ' && *ptr != '\n' && *ptr != '\r' && *ptr != '\t') || *ptr == 0x7f)
--	      break;
-+		{
-+		  ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
-+		  return (0);
-+		}
  	  }
  
 -	  if (*ptr < ' ' || *ptr == 0x7f)
@@ -33,19 +18,28 @@ index 95d53cc44..204c71fcd 100644
 -	    return (0);
 -	  }
 -	  else if (*ptr)
-+	  if (*ptr)
+-	  {
+-	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
+-	    return (0);
+-	  }
++          if (*ptr)
++          {
++	    if (*ptr < ' ' || *ptr == 0x7f)
++	    {
++	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
++	      return (0);
++	    }
++	    else
++	    {
++	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
++	      return (0);
++	    }
++          }
+ 
+ 	  if ((ptr - attr->values[i].string.text) > (IPP_MAX_TEXT - 1))
  	  {
- 	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
- 	    return (0);
-@@ -5088,15 +5086,13 @@ ippValidateAttribute(
- 	    else if (*ptr & 0x80)
+@@ -5163,16 +5166,19 @@ ippValidateAttribute(
  	      break;
- 	    else if (*ptr < ' ' || *ptr == 0x7f)
--	      break;
-+		{
-+		  ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
-+		  return (0);
-+		}
  	  }
  
 -	  if (*ptr < ' ' || *ptr == 0x7f)
@@ -56,5 +50,20 @@ index 95d53cc44..204c71fcd 100644
 -	  else if (*ptr)
 +	  if (*ptr)
  	  {
- 	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
- 	    return (0);
+-	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
+-	    return (0);
+-	  }
++	    if (*ptr < ' ' || *ptr == 0x7f)
++	    {
++	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
++	      return (0);
++	    }
++	    else
++	    {
++	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
++	      return (0);
++	    }
++          }
+ 
+ 	  if ((ptr - attr->values[i].string.text) > (IPP_MAX_NAME - 1))
+ 	  {

diff --git a/net-print/cups/files/cups-2.3_beta5-validation_fixes.patch b/net-print/cups/files/cups-2.3_beta5-validation_fixes.patch
new file mode 100644
index 00000000000..29e2533eeb1
--- /dev/null
+++ b/net-print/cups/files/cups-2.3_beta5-validation_fixes.patch
@@ -0,0 +1,69 @@
+From 1d677f11f1e3353524d46c2842188eccfcdcd5a2 Mon Sep 17 00:00:00 2001
+From: Michael R Sweet <michael.r.sweet@gmail.com>
+Date: Mon, 11 Jun 2018 09:37:34 -0400
+Subject: [PATCH] Fix regressions in ippValidateAttribute (Issue #5322, Issue
+ #5330)
+
+diff --git a/cups/ipp.c b/cups/ipp.c
+index 95d53cc44..325de02b9 100644
+--- a/cups/ipp.c
++++ b/cups/ipp.c
+@@ -5033,16 +5033,19 @@ ippValidateAttribute(
+ 	      break;
+ 	  }
+ 
+-	  if (*ptr < ' ' || *ptr == 0x7f)
+-	  {
+-	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
+-	    return (0);
+-	  }
+-	  else if (*ptr)
+-	  {
+-	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
+-	    return (0);
+-	  }
++          if (*ptr)
++          {
++	    if (*ptr < ' ' || *ptr == 0x7f)
++	    {
++	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
++	      return (0);
++	    }
++	    else
++	    {
++	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
++	      return (0);
++	    }
++          }
+ 
+ 	  if ((ptr - attr->values[i].string.text) > (IPP_MAX_TEXT - 1))
+ 	  {
+@@ -5091,16 +5094,19 @@ ippValidateAttribute(
+ 	      break;
+ 	  }
+ 
+-	  if (*ptr < ' ' || *ptr == 0x7f)
+-	  {
+-	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
+-	    return (0);
+-	  }
+-	  else if (*ptr)
++	  if (*ptr)
+ 	  {
+-	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
+-	    return (0);
+-	  }
++	    if (*ptr < ' ' || *ptr == 0x7f)
++	    {
++	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
++	      return (0);
++	    }
++	    else
++	    {
++	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
++	      return (0);
++	    }
++          }
+ 
+ 	  if ((ptr - attr->values[i].string.text) > (IPP_MAX_NAME - 1))
+ 	  {


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2019-03-23 21:37 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2019-03-23 21:37 UTC (permalink / raw
  To: gentoo-commits

commit:     45bddeac383c14eecbf65814e172443988e4b10e
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 23 21:25:43 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 21:37:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45bddeac

net-print/cups: Bump to versions 2.2.11 and 2.3_beta7. Removed old.

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-print/cups/Manifest                            |   3 +-
 .../{cups-2.3_beta6.ebuild => cups-2.2.11.ebuild}  |  74 ++++---
 ...cups-2.3_beta6.ebuild => cups-2.3_beta7.ebuild} |  50 ++---
 net-print/cups/cups-9999.ebuild                    |  49 ++---
 .../files/cups-2.3_beta6-usage_argument_fix.patch  | 243 ---------------------
 5 files changed, 89 insertions(+), 330 deletions(-)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index 28e73772df4..e6a050179f6 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,5 +1,6 @@
 DIST cups-2.2.10-source.tar.gz 10403568 BLAKE2B 42937088758893772545fff7bbfbf4610ae34764b1e962110b7ea88940ddcba92376e55f4665b9815278de566daec07190ad78e5f2b1e37f905447a7fd17bf4e SHA512 1393987a263ebf20089dd3008ae4ed770a27a1f289032604eb9e18f2e863bd0e4215a70118f5a6d3940875625278b6798fbc9070e791ec559179c6cf7dc7b05f
+DIST cups-2.2.11-source.tar.gz 10405908 BLAKE2B 9b7ee4da9502e42fd1b4a2c57ab709b3127ee8aeb8481a52f37da19fe5578f406260f1551e3fcedcd3a828fbed69267e68fcfd7bfabadf65afce4c3af19b4a1f SHA512 21a6916041b50044d336871f10d1192635458a3d318f19a18ad21d27027dd3839400601019e758424c218225a34aba148ba3a57f0ce3fe14c4df03bd1fde3403
 DIST cups-2.2.7-source.tar.gz 10330296 BLAKE2B 015a64758ee8d2559f4259ff36bf702b93dc695a44e2170d4ecf71b80d5691b4d947decf0a84ff9433b43c6d47dc350a8769d1e230ceda276c13add67e5e8a20 SHA512 780a6a484f38967ff678456ec7b532aa8445a9562663e4e4f6f7a24aac6ec9e8eae36459ee3c025dff053d59ad1d9ecfb823e8a832bae9d384db3d1a10d8860e
 DIST cups-2.2.8-source.tar.gz 10374921 BLAKE2B 3fc4d5cae3848cbb7fb1263b377210254dfa08d70a1218c7f20d5a277d0536791e071c50bac282ab2049e1cffddfe91438216ceb37ec279d7cb0ec7b57a315da SHA512 6ed44c5e6f1c46c85b06691713ce476330c93834243720ad2c04fa983e20cde9f6ebfc2eb2ba8bb3700f11320471b99856d6402d3641038da690f89c49fbd261
 DIST cups-2.2.9-source.tar.gz 10402885 BLAKE2B 6736a2f5efa6ee8eadeea6620b5750e16e3be2e1c46d6f5821146d21078d10cda8e993b111ae326863db93d0c36e55c26d1c91140f8a518759111bafc9c93996 SHA512 423d2a215a115d5f78ce73118e8a2e566662e5d7f8acbffea39e1bfefb2f48f94841c8b85d731b0786b682dc579df8dfb5508570225b5205a182fbb2cd6dd2a5
-DIST cups-2.3b6-source.tar.gz 10240934 BLAKE2B 16b7381617d97d5c68e7bdf971b2cbc81c8f33208e408e051fce9770cffebed3a9337296d3e9f95a9f0a4e76cffe3201b99207f83169b8397d11455964178f4f SHA512 f9f79bbc694e4bb4f37906f6dffad7c5067d86e07878ca73953ebf519d2637c23fded18646bd086cbd397e49de6b629fe9323f57ccfb2c9bf912c3bfd20b345e
+DIST cups-2.3b7-source.tar.gz 10239838 BLAKE2B f2a0317f6c0852c97ec5bed2476705f81ae7089fed2c6f1b34aacda9ff16df780e4157fe214aba0dcfcdb98cba9b45f8ea060fb6ff3206d56332afd37d3bb3ba SHA512 e390fda14e03a2043460959fce1877e45cc37d76ee62dfd11cc0affe7f181d215c517472398cddceadc09b9937356347ee3a33619dc8aa77229d9ea580c3cbc5

diff --git a/net-print/cups/cups-2.3_beta6.ebuild b/net-print/cups/cups-2.2.11.ebuild
similarity index 83%
copy from net-print/cups/cups-2.3_beta6.ebuild
copy to net-print/cups/cups-2.2.11.ebuild
index 4801eaf8b9a..21a9257329d 100644
--- a/net-print/cups/cups-2.3_beta6.ebuild
+++ b/net-print/cups/cups-2.2.11.ebuild
@@ -1,15 +1,16 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 PYTHON_COMPAT=( python2_7 )
 
-inherit autotools eapi7-ver gnome2-utils flag-o-matic linux-info xdg-utils multilib multilib-minimal pam user systemd toolchain-funcs
+inherit autotools flag-o-matic linux-info xdg multilib-minimal pam python-single-r1 user 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}"
-MY_P="${PN}-${MY_PV}"
 
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
@@ -19,18 +20,16 @@ if [[ ${PV} == *9999 ]]; then
 	fi
 else
 	#SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-	SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
-	if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then
-		KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
-	fi
+	SRC_URI="https://github.com/apple/cups/releases/download/v${PV}/${P}-source.tar.gz"
+	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
 fi
 
 DESCRIPTION="The Common Unix Printing System"
 HOMEPAGE="https://www.cups.org/"
 
-LICENSE="Apache-2.0"
+LICENSE="GPL-2"
 SLOT="0"
-IUSE="acl dbus debug kerberos lprng-compat pam selinux +ssl static-libs systemd +threads usb X xinetd zeroconf"
+IUSE="acl dbus debug java kerberos lprng-compat pam python selinux +ssl static-libs systemd +threads usb X xinetd zeroconf"
 
 CDEPEND="
 	app-text/libpaper
@@ -42,9 +41,11 @@ CDEPEND="
 		)
 	)
 	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? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] )
 	systemd? ( sys-apps/systemd )
 	usb? ( virtual/libusb:1 )
@@ -53,7 +54,8 @@ CDEPEND="
 	zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
 "
 
-DEPEND="${CDEPEND}
+DEPEND="${CDEPEND}"
+BDEPEND="
 	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
 "
 
@@ -64,6 +66,7 @@ RDEPEND="${CDEPEND}
 PDEPEND=">=net-print/cups-filters-1.0.43"
 
 REQUIRED_USE="
+	python? ( ${PYTHON_REQUIRED_USE} )
 	usb? ( threads )
 "
 
@@ -77,20 +80,19 @@ PATCHES=(
 	"${FILESDIR}/${PN}-1.4.4-nostrip.patch"
 	"${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
 	"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
-	"${FILESDIR}/${P}-usage_argument_fix.patch"
 )
 
 MULTILIB_CHOST_TOOLS=(
 	/usr/bin/cups-config
 )
 
-S="${WORKDIR}/${MY_P}"
-
 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
@@ -167,8 +169,10 @@ multilib_src_configure() {
 		$(use_enable debug)
 		$(use_enable debug debug-guards)
 		$(use_enable debug debug-printfs)
+		$(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)
@@ -176,6 +180,8 @@ multilib_src_configure() {
 		$(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)
 	)
 
@@ -227,11 +233,11 @@ multilib_src_install_all() {
 	dodoc {CHANGES,CREDITS,README}.md
 
 	# move the default config file to docs
-	dodoc "${ED%/}"/etc/cups/cupsd.conf.default
-	rm -f "${ED%/}"/etc/cups/cupsd.conf.default
+	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}
+	rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups}
 
 	# install our init script
 	local neededservices
@@ -251,16 +257,16 @@ multilib_src_install_all() {
 		# correct path
 		sed -i \
 			-e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
-			"${ED%/}"/etc/xinetd.d/cups-lpd || die
+			"${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 ; }
+		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
+		rm -rf "${ED}"/etc/xinetd.d
 	fi
 
 	keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
@@ -269,25 +275,25 @@ multilib_src_install_all() {
 	keepdir /etc/cups/{interfaces,ppd,ssl}
 
 	if ! use X ; then
-		rm -r "${ED%/}"/usr/share/applications || die
+		rm -r "${ED}"/usr/share/applications || die
 	fi
 
 	# create /etc/cups/client.conf, bug #196967 and #266678
-	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED%/}"/etc/cups/client.conf
+	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
 
 	# the following file is now provided by cups-filters:
-	rm -r "${ED%/}"/usr/share/cups/banners || die
+	rm -r "${ED}"/usr/share/cups/banners || die
 
 	# the following are created by the init script
-	rm -r "${ED%/}"/var/cache/cups || die
-	rm -r "${ED%/}"/run || die
+	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*
+		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."
@@ -295,13 +301,12 @@ multilib_src_install_all() {
 }
 
 pkg_preinst() {
-	gnome2_icon_savelist
+	xdg_pkg_preinst
 }
 
 pkg_postinst() {
 	# Update desktop file database and gtk icon cache (bug 370059)
-	gnome2_icon_cache_update
-	xdg_desktop_database_update
+	xdg_pkg_postinst
 
 	local v
 
@@ -327,6 +332,5 @@ pkg_postinst() {
 
 pkg_postrm() {
 	# Update desktop file database and gtk icon cache (bug 370059)
-	gnome2_icon_cache_update
-	xdg_desktop_database_update
+	xdg_pkg_postrm
 }

diff --git a/net-print/cups/cups-2.3_beta6.ebuild b/net-print/cups/cups-2.3_beta7.ebuild
similarity index 88%
rename from net-print/cups/cups-2.3_beta6.ebuild
rename to net-print/cups/cups-2.3_beta7.ebuild
index 4801eaf8b9a..1a22a0b0ae7 100644
--- a/net-print/cups/cups-2.3_beta6.ebuild
+++ b/net-print/cups/cups-2.3_beta7.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 PYTHON_COMPAT=( python2_7 )
 
-inherit autotools eapi7-ver gnome2-utils flag-o-matic linux-info xdg-utils multilib multilib-minimal pam user systemd toolchain-funcs
+inherit autotools flag-o-matic linux-info xdg multilib-minimal pam user systemd toolchain-funcs
 
 MY_PV="${PV/_rc/rc}"
 MY_PV="${MY_PV/_beta/b}"
@@ -53,7 +53,8 @@ CDEPEND="
 	zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
 "
 
-DEPEND="${CDEPEND}
+DEPEND="${CDEPEND}"
+BDEPEND="
 	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
 "
 
@@ -77,7 +78,6 @@ PATCHES=(
 	"${FILESDIR}/${PN}-1.4.4-nostrip.patch"
 	"${FILESDIR}/${PN}-2.0.2-rename-systemd-service-files.patch"
 	"${FILESDIR}/${PN}-2.0.1-xinetd-installation-fix.patch"
-	"${FILESDIR}/${P}-usage_argument_fix.patch"
 )
 
 MULTILIB_CHOST_TOOLS=(
@@ -227,11 +227,11 @@ multilib_src_install_all() {
 	dodoc {CHANGES,CREDITS,README}.md
 
 	# move the default config file to docs
-	dodoc "${ED%/}"/etc/cups/cupsd.conf.default
-	rm -f "${ED%/}"/etc/cups/cupsd.conf.default
+	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}
+	rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups}
 
 	# install our init script
 	local neededservices
@@ -251,16 +251,16 @@ multilib_src_install_all() {
 		# correct path
 		sed -i \
 			-e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
-			"${ED%/}"/etc/xinetd.d/cups-lpd || die
+			"${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 ; }
+		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
+		rm -rf "${ED}"/etc/xinetd.d
 	fi
 
 	keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
@@ -269,25 +269,25 @@ multilib_src_install_all() {
 	keepdir /etc/cups/{interfaces,ppd,ssl}
 
 	if ! use X ; then
-		rm -r "${ED%/}"/usr/share/applications || die
+		rm -r "${ED}"/usr/share/applications || die
 	fi
 
 	# create /etc/cups/client.conf, bug #196967 and #266678
-	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED%/}"/etc/cups/client.conf
+	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
 
 	# the following file is now provided by cups-filters:
-	rm -r "${ED%/}"/usr/share/cups/banners || die
+	rm -r "${ED}"/usr/share/cups/banners || die
 
 	# the following are created by the init script
-	rm -r "${ED%/}"/var/cache/cups || die
-	rm -r "${ED%/}"/run || die
+	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*
+		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."
@@ -295,13 +295,12 @@ multilib_src_install_all() {
 }
 
 pkg_preinst() {
-	gnome2_icon_savelist
+	xdg_pkg_preinst
 }
 
 pkg_postinst() {
 	# Update desktop file database and gtk icon cache (bug 370059)
-	gnome2_icon_cache_update
-	xdg_desktop_database_update
+	xdg_pkg_postinst
 
 	local v
 
@@ -327,6 +326,5 @@ pkg_postinst() {
 
 pkg_postrm() {
 	# Update desktop file database and gtk icon cache (bug 370059)
-	gnome2_icon_cache_update
-	xdg_desktop_database_update
+	xdg_pkg_postrm
 }

diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-9999.ebuild
index 608055933fa..1a22a0b0ae7 100644
--- a/net-print/cups/cups-9999.ebuild
+++ b/net-print/cups/cups-9999.ebuild
@@ -1,11 +1,11 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
+EAPI=7
 
 PYTHON_COMPAT=( python2_7 )
 
-inherit autotools eapi7-ver gnome2-utils flag-o-matic linux-info xdg-utils multilib multilib-minimal pam user systemd toolchain-funcs
+inherit autotools flag-o-matic linux-info xdg multilib-minimal pam user systemd toolchain-funcs
 
 MY_PV="${PV/_rc/rc}"
 MY_PV="${MY_PV/_beta/b}"
@@ -53,7 +53,8 @@ CDEPEND="
 	zeroconf? ( >=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}] )
 "
 
-DEPEND="${CDEPEND}
+DEPEND="${CDEPEND}"
+BDEPEND="
 	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
 "
 
@@ -226,11 +227,11 @@ multilib_src_install_all() {
 	dodoc {CHANGES,CREDITS,README}.md
 
 	# move the default config file to docs
-	dodoc "${ED%/}"/etc/cups/cupsd.conf.default
-	rm -f "${ED%/}"/etc/cups/cupsd.conf.default
+	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}
+	rm -rf "${ED}"/etc/{init.d/cups,rc*,pam.d/cups}
 
 	# install our init script
 	local neededservices
@@ -250,16 +251,16 @@ multilib_src_install_all() {
 		# correct path
 		sed -i \
 			-e "s:server = .*:server = /usr/libexec/cups/daemon/cups-lpd:" \
-			"${ED%/}"/etc/xinetd.d/cups-lpd || die
+			"${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 ; }
+		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
+		rm -rf "${ED}"/etc/xinetd.d
 	fi
 
 	keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} \
@@ -268,25 +269,25 @@ multilib_src_install_all() {
 	keepdir /etc/cups/{interfaces,ppd,ssl}
 
 	if ! use X ; then
-		rm -r "${ED%/}"/usr/share/applications || die
+		rm -r "${ED}"/usr/share/applications || die
 	fi
 
 	# create /etc/cups/client.conf, bug #196967 and #266678
-	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED%/}"/etc/cups/client.conf
+	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
 
 	# the following file is now provided by cups-filters:
-	rm -r "${ED%/}"/usr/share/cups/banners || die
+	rm -r "${ED}"/usr/share/cups/banners || die
 
 	# the following are created by the init script
-	rm -r "${ED%/}"/var/cache/cups || die
-	rm -r "${ED%/}"/run || die
+	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*
+		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."
@@ -294,13 +295,12 @@ multilib_src_install_all() {
 }
 
 pkg_preinst() {
-	gnome2_icon_savelist
+	xdg_pkg_preinst
 }
 
 pkg_postinst() {
 	# Update desktop file database and gtk icon cache (bug 370059)
-	gnome2_icon_cache_update
-	xdg_desktop_database_update
+	xdg_pkg_postinst
 
 	local v
 
@@ -326,6 +326,5 @@ pkg_postinst() {
 
 pkg_postrm() {
 	# Update desktop file database and gtk icon cache (bug 370059)
-	gnome2_icon_cache_update
-	xdg_desktop_database_update
+	xdg_pkg_postrm
 }

diff --git a/net-print/cups/files/cups-2.3_beta6-usage_argument_fix.patch b/net-print/cups/files/cups-2.3_beta6-usage_argument_fix.patch
deleted file mode 100644
index d77a5bba28e..00000000000
--- a/net-print/cups/files/cups-2.3_beta6-usage_argument_fix.patch
+++ /dev/null
@@ -1,243 +0,0 @@
-From 065632e2095bcb32f15a370633e60d6a6a3dd78e Mon Sep 17 00:00:00 2001
-From: Michael R Sweet <michael.r.sweet@gmail.com>
-Date: Sat, 8 Dec 2018 08:12:52 -0500
-Subject: [PATCH] Fix compile errors - not sure why these didn't show up
- before...
-
----
- cups/adminutil.c | 197 -----------------------------------------------
- scheduler/main.c |   2 +-
- 2 files changed, 1 insertion(+), 198 deletions(-)
-
-diff --git a/cups/adminutil.c b/cups/adminutil.c
-index 5ecada44c..1a5067f1b 100644
---- a/cups/adminutil.c
-+++ b/cups/adminutil.c
-@@ -32,12 +32,6 @@ static http_status_t	get_cupsd_conf(http_t *http, _cups_globals_t *cg,
- 			               time_t last_update, char *name,
- 				       size_t namelen, int *remote);
- static void		invalidate_cupsd_cache(_cups_globals_t *cg);
--static void		write_option(cups_file_t *dstfp, int order,
--			             const char *name, const char *text,
--				     const char *attrname,
--		        	     ipp_attribute_t *suppattr,
--				     ipp_attribute_t *defattr, int defval,
--				     int valcount);
- 
- 
- /*
-@@ -1330,88 +1324,6 @@ cupsAdminSetServerSettings(
- }
- 
- 
--/*
-- * 'do_samba_command()' - Do a SAMBA command.
-- */
--
--static int				/* O - Status of command */
--do_samba_command(const char *command,	/* I - Command to run */
--                 const char *address,	/* I - Address for command */
--                 const char *subcmd,	/* I - Sub-command */
--		 const char *authfile,	/* I - Samba authentication file */
--		 FILE *logfile)		/* I - Optional log file */
--{
--#ifdef _WIN32
--  return (1);				/* Always fail on Windows... */
--
--#else
--  int		status;			/* Status of command */
--  int		pid;			/* Process ID of child */
--
--
--  if (logfile)
--    _cupsLangPrintf(logfile,
--                    _("Running command: %s %s -N -A %s -c \'%s\'"),
--        	    command, address, authfile, subcmd);
--
--  if ((pid = fork()) == 0)
--  {
--   /*
--    * Child goes here, redirect stdin/out/err and execute the command...
--    */
--
--    int fd = open("/dev/null", O_RDONLY);
--
--    if (fd > 0)
--    {
--      dup2(fd, 0);
--      close(fd);
--    }
--
--    if (logfile)
--      dup2(fileno(logfile), 1);
--    else if ((fd = open("/dev/null", O_WRONLY)) > 1)
--    {
--      dup2(fd, 1);
--      close(fd);
--    }
--
--    dup2(1, 2);
--
--    execlp(command, command, address, "-N", "-A", authfile, "-c", subcmd,
--           (char *)0);
--    exit(errno);
--  }
--  else if (pid < 0)
--  {
--    status = -1;
--
--    if (logfile)
--      _cupsLangPrintf(logfile, _("Unable to run \"%s\": %s"),
--                      command, strerror(errno));
--  }
--  else
--  {
--   /*
--    * Wait for the process to complete...
--    */
--
--    while (wait(&status) != pid);
--  }
--
--  if (logfile)
--    _cupsLangPuts(logfile, "");
--
--  DEBUG_printf(("9do_samba_command: status=%d", status));
--
--  if (WIFEXITED(status))
--    return (WEXITSTATUS(status));
--  else
--    return (-WTERMSIG(status));
--#endif /* _WIN32 */
--}
--
--
- /*
-  * 'get_cupsd_conf()' - Get the current cupsd.conf file.
-  */
-@@ -1527,112 +1439,3 @@ invalidate_cupsd_cache(
-   cg->cupsd_num_settings = 0;
-   cg->cupsd_settings     = NULL;
- }
--
--
--/*
-- * 'write_option()' - Write a CUPS option to a PPD file.
-- */
--
--static void
--write_option(cups_file_t     *dstfp,	/* I - PPD file */
--             int             order,	/* I - Order dependency */
--             const char      *name,	/* I - Option name */
--	     const char      *text,	/* I - Option text */
--             const char      *attrname,	/* I - Attribute name */
--             ipp_attribute_t *suppattr,	/* I - IPP -supported attribute */
--	     ipp_attribute_t *defattr,	/* I - IPP -default attribute */
--	     int             defval,	/* I - Default value number */
--	     int             valcount)	/* I - Number of values */
--{
--  int	i;				/* Looping var */
--
--
--  cupsFilePrintf(dstfp, "*JCLOpenUI *%s/%s: PickOne\n"
--                        "*OrderDependency: %d JCLSetup *%s\n",
--                 name, text, order, name);
--
--  if (defattr->value_tag == IPP_TAG_INTEGER)
--  {
--   /*
--    * Do numeric options with a range or list...
--    */
--
--    cupsFilePrintf(dstfp, "*Default%s: %d\n", name,
--                   defattr->values[defval].integer);
--
--    if (suppattr->value_tag == IPP_TAG_RANGE)
--    {
--     /*
--      * List each number in the range...
--      */
--
--      for (i = suppattr->values[0].range.lower;
--           i <= suppattr->values[0].range.upper;
--	   i ++)
--      {
--        cupsFilePrintf(dstfp, "*%s %d: \"", name, i);
--
--        if (valcount == 1)
--	  cupsFilePrintf(dstfp, "%%cupsJobTicket: %s=%d\n\"\n*End\n",
--	                 attrname, i);
--        else if (defval == 0)
--	  cupsFilePrintf(dstfp, "%%cupsJobTicket: %s=%d\"\n", attrname, i);
--        else if (defval < (valcount - 1))
--	  cupsFilePrintf(dstfp, ",%d\"\n", i);
--        else
--	  cupsFilePrintf(dstfp, ",%d\n\"\n*End\n", i);
--      }
--    }
--    else
--    {
--     /*
--      * List explicit numbers...
--      */
--
--      for (i = 0; i < suppattr->num_values; i ++)
--      {
--        cupsFilePrintf(dstfp, "*%s %d: \"", name, suppattr->values[i].integer);
--
--        if (valcount == 1)
--	  cupsFilePrintf(dstfp, "%%cupsJobTicket: %s=%d\n\"\n*End\n", attrname,
--	          suppattr->values[i].integer);
--        else if (defval == 0)
--	  cupsFilePrintf(dstfp, "%%cupsJobTicket: %s=%d\"\n", attrname,
--	          suppattr->values[i].integer);
--        else if (defval < (valcount - 1))
--	  cupsFilePrintf(dstfp, ",%d\"\n", suppattr->values[i].integer);
--        else
--	  cupsFilePrintf(dstfp, ",%d\n\"\n*End\n", suppattr->values[i].integer);
--      }
--    }
--  }
--  else
--  {
--   /*
--    * Do text options with a list...
--    */
--
--    cupsFilePrintf(dstfp, "*Default%s: %s\n", name,
--                   defattr->values[defval].string.text);
--
--    for (i = 0; i < suppattr->num_values; i ++)
--    {
--      cupsFilePrintf(dstfp, "*%s %s: \"", name,
--                     suppattr->values[i].string.text);
--
--      if (valcount == 1)
--	cupsFilePrintf(dstfp, "%%cupsJobTicket: %s=%s\n\"\n*End\n", attrname,
--	        suppattr->values[i].string.text);
--      else if (defval == 0)
--	cupsFilePrintf(dstfp, "%%cupsJobTicket: %s=%s\"\n", attrname,
--	        suppattr->values[i].string.text);
--      else if (defval < (valcount - 1))
--	cupsFilePrintf(dstfp, ",%s\"\n", suppattr->values[i].string.text);
--      else
--	cupsFilePrintf(dstfp, ",%s\n\"\n*End\n",
--	               suppattr->values[i].string.text);
--    }
--  }
--
--  cupsFilePrintf(dstfp, "*JCLCloseUI: *%s\n\n", name);
--}
-diff --git a/scheduler/main.c b/scheduler/main.c
-index ce7df89c0..5b00efae2 100644
---- a/scheduler/main.c
-+++ b/scheduler/main.c
-@@ -155,7 +155,7 @@ main(int  argc,				/* I - Number of command-line args */
-   for (i = 1; i < argc; i ++)
-   {
-     if (!strcmp(argv[i], "--help"))
--      usage();
-+      usage(0);
-     else if (argv[i][0] == '-')
-     {
-       for (opt = argv[i] + 1; *opt != '\0'; opt ++)


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2019-03-23 21:37 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2019-03-23 21:37 UTC (permalink / raw
  To: gentoo-commits

commit:     0d3a0c234f903e22a44d77ad88951a1d1c67bddf
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 23 21:27:46 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sat Mar 23 21:37:46 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d3a0c23

net-print/cups: Removed old.

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-print/cups/Manifest                            |   2 -
 net-print/cups/cups-2.2.8-r1.ebuild                | 338 ---------------------
 net-print/cups/cups-2.2.9.ebuild                   | 337 --------------------
 .../cups/files/cups-2.2.8-validation_fixes.patch   |  69 -----
 4 files changed, 746 deletions(-)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index e6a050179f6..0211b90b5ab 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,6 +1,4 @@
 DIST cups-2.2.10-source.tar.gz 10403568 BLAKE2B 42937088758893772545fff7bbfbf4610ae34764b1e962110b7ea88940ddcba92376e55f4665b9815278de566daec07190ad78e5f2b1e37f905447a7fd17bf4e SHA512 1393987a263ebf20089dd3008ae4ed770a27a1f289032604eb9e18f2e863bd0e4215a70118f5a6d3940875625278b6798fbc9070e791ec559179c6cf7dc7b05f
 DIST cups-2.2.11-source.tar.gz 10405908 BLAKE2B 9b7ee4da9502e42fd1b4a2c57ab709b3127ee8aeb8481a52f37da19fe5578f406260f1551e3fcedcd3a828fbed69267e68fcfd7bfabadf65afce4c3af19b4a1f SHA512 21a6916041b50044d336871f10d1192635458a3d318f19a18ad21d27027dd3839400601019e758424c218225a34aba148ba3a57f0ce3fe14c4df03bd1fde3403
 DIST cups-2.2.7-source.tar.gz 10330296 BLAKE2B 015a64758ee8d2559f4259ff36bf702b93dc695a44e2170d4ecf71b80d5691b4d947decf0a84ff9433b43c6d47dc350a8769d1e230ceda276c13add67e5e8a20 SHA512 780a6a484f38967ff678456ec7b532aa8445a9562663e4e4f6f7a24aac6ec9e8eae36459ee3c025dff053d59ad1d9ecfb823e8a832bae9d384db3d1a10d8860e
-DIST cups-2.2.8-source.tar.gz 10374921 BLAKE2B 3fc4d5cae3848cbb7fb1263b377210254dfa08d70a1218c7f20d5a277d0536791e071c50bac282ab2049e1cffddfe91438216ceb37ec279d7cb0ec7b57a315da SHA512 6ed44c5e6f1c46c85b06691713ce476330c93834243720ad2c04fa983e20cde9f6ebfc2eb2ba8bb3700f11320471b99856d6402d3641038da690f89c49fbd261
-DIST cups-2.2.9-source.tar.gz 10402885 BLAKE2B 6736a2f5efa6ee8eadeea6620b5750e16e3be2e1c46d6f5821146d21078d10cda8e993b111ae326863db93d0c36e55c26d1c91140f8a518759111bafc9c93996 SHA512 423d2a215a115d5f78ce73118e8a2e566662e5d7f8acbffea39e1bfefb2f48f94841c8b85d731b0786b682dc579df8dfb5508570225b5205a182fbb2cd6dd2a5
 DIST cups-2.3b7-source.tar.gz 10239838 BLAKE2B f2a0317f6c0852c97ec5bed2476705f81ae7089fed2c6f1b34aacda9ff16df780e4157fe214aba0dcfcdb98cba9b45f8ea060fb6ff3206d56332afd37d3bb3ba SHA512 e390fda14e03a2043460959fce1877e45cc37d76ee62dfd11cc0affe7f181d215c517472398cddceadc09b9937356347ee3a33619dc8aa77229d9ea580c3cbc5

diff --git a/net-print/cups/cups-2.2.8-r1.ebuild b/net-print/cups/cups-2.2.8-r1.ebuild
deleted file mode 100644
index f382bb8f76a..00000000000
--- a/net-print/cups/cups-2.2.8-r1.ebuild
+++ /dev/null
@@ -1,338 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools eapi7-ver gnome2-utils flag-o-matic linux-info xdg-utils multilib multilib-minimal pam python-single-r1 user 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="https://github.com/apple/cups.git"
-	if [[ ${PV} != 9999 ]]; then
-		EGIT_BRANCH=branch-${PV/.9999}
-	fi
-else
-	#SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-	SRC_URI="https://github.com/apple/cups/releases/download/v${PV}/${P}-source.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
-fi
-
-DESCRIPTION="The Common Unix Printing System"
-HOMEPAGE="https://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"
-
-CDEPEND="
-	app-text/libpaper
-	sys-libs/zlib
-	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? ( >=net-libs/gnutls-2.12.23-r6:0=[${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}] )
-"
-
-DEPEND="${CDEPEND}
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
-"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-cups )
-"
-
-PDEPEND=">=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"
-
-# systemd-socket.patch from Fedora
-PATCHES=(
-	"${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch"
-	"${FILESDIR}/${PN}-2.2.6-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.1-xinetd-installation-fix.patch"
-	"${FILESDIR}/${P}-validation_fixes.patch" #657526
-)
-
-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; this should now work in most cases (bug 501122)
-			if use usb; then
-				if linux_chkconfig_present USB_PRINTER; then
-					elog "Your USB printers will be managed via libusb. In case you run into problems, "
-					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
-					elog "usblp kernel module."
-					elog "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() {
-	default
-
-	# 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 LINGUAS=\"${LINGUAS}\"
-
-	# explicitly specify compiler wrt bug 524340
-	#
-	# need to override KRB5CONFIG for proper flags
-	# https://github.com/apple/cups/issues/4423
-	local myeconfargs=(
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
-		--libdir="${EPREFIX}"/usr/$(get_libdir)
-		--localstatedir="${EPREFIX}"/var
-		--with-exe-file-perm=755
-		--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="${EPREFIX}"/etc/xinetd.d
-		$(multilib_native_use_enable acl)
-		$(use_enable dbus)
-		$(use_enable debug)
-		$(use_enable debug debug-guards)
-		$(use_enable debug debug-printfs)
-		$(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)
-	)
-
-	if tc-is-static-only; then
-		myeconfargs+=(
-			--disable-shared
-		)
-	fi
-
-	econf "${myeconfargs[@]}"
-
-	# 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
-
-	# additional path corrections needed for prefix, see bug 597728
-	sed \
-		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
-		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
-		-e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \
-		-e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \
-		-i Makedefs || 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}.md
-
-	# 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-r3 "${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}
-
-	if ! use X ; then
-		rm -r "${ED%/}"/usr/share/applications || die
-	fi
-
-	# create /etc/cups/client.conf, bug #196967 and #266678
-	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED%/}"/etc/cups/client.conf
-
-	# the following file is now provided by cups-filters:
-	rm -r "${ED%/}"/usr/share/cups/banners || 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
-	xdg_desktop_database_update
-
-	local v
-
-	for v in ${REPLACING_VERSIONS}; do
-		if ! ver_test ${v} -ge 2.2.2-r2 ; 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
-		break
-	done
-}
-
-pkg_postrm() {
-	# Update desktop file database and gtk icon cache (bug 370059)
-	gnome2_icon_cache_update
-	xdg_desktop_database_update
-}

diff --git a/net-print/cups/cups-2.2.9.ebuild b/net-print/cups/cups-2.2.9.ebuild
deleted file mode 100644
index b5fcaa92de9..00000000000
--- a/net-print/cups/cups-2.2.9.ebuild
+++ /dev/null
@@ -1,337 +0,0 @@
-# Copyright 1999-2018 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools eapi7-ver gnome2-utils flag-o-matic linux-info xdg-utils multilib multilib-minimal pam python-single-r1 user 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="https://github.com/apple/cups.git"
-	if [[ ${PV} != 9999 ]]; then
-		EGIT_BRANCH=branch-${PV/.9999}
-	fi
-else
-	#SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-	SRC_URI="https://github.com/apple/cups/releases/download/v${PV}/${P}-source.tar.gz"
-	KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
-fi
-
-DESCRIPTION="The Common Unix Printing System"
-HOMEPAGE="https://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"
-
-CDEPEND="
-	app-text/libpaper
-	sys-libs/zlib
-	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? ( >=net-libs/gnutls-2.12.23-r6:0=[${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}] )
-"
-
-DEPEND="${CDEPEND}
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
-"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-cups )
-"
-
-PDEPEND=">=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"
-
-# systemd-socket.patch from Fedora
-PATCHES=(
-	"${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch"
-	"${FILESDIR}/${PN}-2.2.6-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.1-xinetd-installation-fix.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; this should now work in most cases (bug 501122)
-			if use usb; then
-				if linux_chkconfig_present USB_PRINTER; then
-					elog "Your USB printers will be managed via libusb. In case you run into problems, "
-					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
-					elog "usblp kernel module."
-					elog "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() {
-	default
-
-	# 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 LINGUAS=\"${LINGUAS}\"
-
-	# explicitly specify compiler wrt bug 524340
-	#
-	# need to override KRB5CONFIG for proper flags
-	# https://github.com/apple/cups/issues/4423
-	local myeconfargs=(
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
-		--libdir="${EPREFIX}"/usr/$(get_libdir)
-		--localstatedir="${EPREFIX}"/var
-		--with-exe-file-perm=755
-		--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="${EPREFIX}"/etc/xinetd.d
-		$(multilib_native_use_enable acl)
-		$(use_enable dbus)
-		$(use_enable debug)
-		$(use_enable debug debug-guards)
-		$(use_enable debug debug-printfs)
-		$(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)
-	)
-
-	if tc-is-static-only; then
-		myeconfargs+=(
-			--disable-shared
-		)
-	fi
-
-	econf "${myeconfargs[@]}"
-
-	# 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
-
-	# additional path corrections needed for prefix, see bug 597728
-	sed \
-		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
-		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
-		-e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \
-		-e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \
-		-i Makedefs || 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}.md
-
-	# 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-r3 "${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}
-
-	if ! use X ; then
-		rm -r "${ED%/}"/usr/share/applications || die
-	fi
-
-	# create /etc/cups/client.conf, bug #196967 and #266678
-	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED%/}"/etc/cups/client.conf
-
-	# the following file is now provided by cups-filters:
-	rm -r "${ED%/}"/usr/share/cups/banners || 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
-	xdg_desktop_database_update
-
-	local v
-
-	for v in ${REPLACING_VERSIONS}; do
-		if ! ver_test ${v} -ge 2.2.2-r2 ; 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
-		break
-	done
-}
-
-pkg_postrm() {
-	# Update desktop file database and gtk icon cache (bug 370059)
-	gnome2_icon_cache_update
-	xdg_desktop_database_update
-}

diff --git a/net-print/cups/files/cups-2.2.8-validation_fixes.patch b/net-print/cups/files/cups-2.2.8-validation_fixes.patch
deleted file mode 100644
index 4eee2274b94..00000000000
--- a/net-print/cups/files/cups-2.2.8-validation_fixes.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 18545a5e7ab478b187a0d7136ee19496ae32fc9b Mon Sep 17 00:00:00 2001
-From: Michael R Sweet <michael.r.sweet@gmail.com>
-Date: Mon, 11 Jun 2018 09:37:55 -0400
-Subject: [PATCH] Fix regressions in ippValidateAttribute (Issue #5322, Issue
- #5330)
-
-diff --git a/cups/ipp.c b/cups/ipp.c
-index 9346b201f..d6e39d5d8 100644
---- a/cups/ipp.c
-+++ b/cups/ipp.c
-@@ -5101,16 +5101,19 @@ ippValidateAttribute(
- 	      break;
- 	  }
- 
--	  if (*ptr < ' ' || *ptr == 0x7f)
--	  {
--	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
--	    return (0);
--	  }
--	  else if (*ptr)
--	  {
--	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
--	    return (0);
--	  }
-+          if (*ptr)
-+          {
-+	    if (*ptr < ' ' || *ptr == 0x7f)
-+	    {
-+	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad control character (PWG 5100.14 section 8.3)."), attr->name, attr->values[i].string.text);
-+	      return (0);
-+	    }
-+	    else
-+	    {
-+	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad text value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.2)."), attr->name, attr->values[i].string.text);
-+	      return (0);
-+	    }
-+          }
- 
- 	  if ((ptr - attr->values[i].string.text) > (IPP_MAX_TEXT - 1))
- 	  {
-@@ -5163,16 +5166,19 @@ ippValidateAttribute(
- 	      break;
- 	  }
- 
--	  if (*ptr < ' ' || *ptr == 0x7f)
--	  {
--	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
--	    return (0);
--	  }
--	  else if (*ptr)
-+	  if (*ptr)
- 	  {
--	    ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
--	    return (0);
--	  }
-+	    if (*ptr < ' ' || *ptr == 0x7f)
-+	    {
-+	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad control character (PWG 5100.14 section 8.1)."), attr->name, attr->values[i].string.text);
-+	      return (0);
-+	    }
-+	    else
-+	    {
-+	      ipp_set_error(IPP_STATUS_ERROR_BAD_REQUEST, _("\"%s\": Bad name value \"%s\" - bad UTF-8 sequence (RFC 8011 section 5.1.3)."), attr->name, attr->values[i].string.text);
-+	      return (0);
-+	    }
-+          }
- 
- 	  if ((ptr - attr->values[i].string.text) > (IPP_MAX_NAME - 1))
- 	  {


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2019-09-03  7:56 Lars Wendler
  0 siblings, 0 replies; 15+ messages in thread
From: Lars Wendler @ 2019-09-03  7:56 UTC (permalink / raw
  To: gentoo-commits

commit:     5983cc09eade48687c10dd3241c946d899369a43
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  3 07:51:15 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Tue Sep  3 07:51:15 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5983cc09

net-print/cups: Security cleanup

Bug: https://bugs.gentoo.org/692300
Package-Manager: Portage-2.3.75, Repoman-2.3.17
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 net-print/cups/Manifest                        |   1 -
 net-print/cups/cups-2.2.11.ebuild              | 336 -------------------------
 net-print/cups/files/cups-2.3_rc1-no_pam.patch | 164 ------------
 3 files changed, 501 deletions(-)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index b9b923a3fe7..c4d4ef2a259 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,3 +1,2 @@
-DIST cups-2.2.11-source.tar.gz 10405908 BLAKE2B 9b7ee4da9502e42fd1b4a2c57ab709b3127ee8aeb8481a52f37da19fe5578f406260f1551e3fcedcd3a828fbed69267e68fcfd7bfabadf65afce4c3af19b4a1f SHA512 21a6916041b50044d336871f10d1192635458a3d318f19a18ad21d27027dd3839400601019e758424c218225a34aba148ba3a57f0ce3fe14c4df03bd1fde3403
 DIST cups-2.2.12-source.tar.gz 10409313 BLAKE2B 126ea81f7108b3b62f5e062ed522898dd48d4e5b4077c834e8fe89012445dd0a903bafa62f593551ed5f1c92cce4fbd22f56834e0615ed65ca4a6ae84dc2ca1c SHA512 b8e7be512938ad388d469d093ad0c882ab42ea1408c27a91340f8424aa0e79e588df3d59795624973b89074a2af650fa9b5b6ed5224138b17e4c6dbbcbf0a2e6
 DIST cups-2.3.0-source.tar.gz 8129049 BLAKE2B 738dbc7ee5ddcc9ffee44083cd93d8a0e75f4d3bf0b704dd643dc59db2cc2381dd65f676c0979bc65fee03438d160d9d650ceb93f8c702102eb1449d306a81a3 SHA512 c51f173b5fbae1554a3f4a3786fb3b5566e50d9f775473788ee3553922ac7e02e4785492c87c93fd46f159f50d97cc10ff6feafb3397cd9c1840840f3a9cdfae

diff --git a/net-print/cups/cups-2.2.11.ebuild b/net-print/cups/cups-2.2.11.ebuild
deleted file mode 100644
index 1c078ac92c8..00000000000
--- a/net-print/cups/cups-2.2.11.ebuild
+++ /dev/null
@@ -1,336 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit autotools flag-o-matic linux-info xdg multilib-minimal pam python-single-r1 user 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="https://github.com/apple/cups.git"
-	if [[ ${PV} != 9999 ]]; then
-		EGIT_BRANCH=branch-${PV/.9999}
-	fi
-else
-	#SRC_URI="https://github.com/apple/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
-	SRC_URI="https://github.com/apple/cups/releases/download/v${PV}/${P}-source.tar.gz"
-	KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~m68k-mint"
-fi
-
-DESCRIPTION="The Common Unix Printing System"
-HOMEPAGE="https://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"
-
-CDEPEND="
-	app-text/libpaper
-	sys-libs/zlib
-	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? ( >=net-libs/gnutls-2.12.23-r6:0=[${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}] )
-"
-
-DEPEND="${CDEPEND}"
-BDEPEND="
-	>=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}]
-"
-
-RDEPEND="${CDEPEND}
-	selinux? ( sec-policy/selinux-cups )
-"
-
-PDEPEND=">=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"
-
-# systemd-socket.patch from Fedora
-PATCHES=(
-	"${FILESDIR}/${PN}-2.2.0-dont-compress-manpages.patch"
-	"${FILESDIR}/${PN}-2.2.6-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.1-xinetd-installation-fix.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; this should now work in most cases (bug 501122)
-			if use usb; then
-				if linux_chkconfig_present USB_PRINTER; then
-					elog "Your USB printers will be managed via libusb. In case you run into problems, "
-					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
-					elog "usblp kernel module."
-					elog "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() {
-	default
-
-	# 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 LINGUAS=\"${LINGUAS}\"
-
-	# explicitly specify compiler wrt bug 524340
-	#
-	# need to override KRB5CONFIG for proper flags
-	# https://github.com/apple/cups/issues/4423
-	local myeconfargs=(
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
-		--libdir="${EPREFIX}"/usr/$(get_libdir)
-		--localstatedir="${EPREFIX}"/var
-		--with-exe-file-perm=755
-		--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="${EPREFIX}"/etc/xinetd.d
-		$(multilib_native_use_enable acl)
-		$(use_enable dbus)
-		$(use_enable debug)
-		$(use_enable debug debug-guards)
-		$(use_enable debug debug-printfs)
-		$(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)
-	)
-
-	if tc-is-static-only; then
-		myeconfargs+=(
-			--disable-shared
-		)
-	fi
-
-	econf "${myeconfargs[@]}"
-
-	# 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
-
-	# additional path corrections needed for prefix, see bug 597728
-	sed \
-		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
-		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
-		-e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \
-		-e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \
-		-i Makedefs || 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}.md
-
-	# 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-r3 "${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}
-
-	if ! use X ; then
-		rm -r "${ED}"/usr/share/applications || die
-	fi
-
-	# create /etc/cups/client.conf, bug #196967 and #266678
-	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
-
-	# the following file is now provided by cups-filters:
-	rm -r "${ED}"/usr/share/cups/banners || 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() {
-	xdg_pkg_preinst
-}
-
-pkg_postinst() {
-	# Update desktop file database and gtk icon cache (bug 370059)
-	xdg_pkg_postinst
-
-	local v
-
-	for v in ${REPLACING_VERSIONS}; do
-		if ! ver_test ${v} -ge 2.2.2-r2 ; 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
-		break
-	done
-}
-
-pkg_postrm() {
-	# Update desktop file database and gtk icon cache (bug 370059)
-	xdg_pkg_postrm
-}

diff --git a/net-print/cups/files/cups-2.3_rc1-no_pam.patch b/net-print/cups/files/cups-2.3_rc1-no_pam.patch
deleted file mode 100644
index 17e69ab7b0a..00000000000
--- a/net-print/cups/files/cups-2.3_rc1-no_pam.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-From 3cd7b5e053f8100da1ca8d8daf93976cca3516ef Mon Sep 17 00:00:00 2001
-From: Michael R Sweet <michael.r.sweet@gmail.com>
-Date: Fri, 23 Feb 2018 13:21:56 -0500
-Subject: [PATCH] Fix builds without PAM (Issue #5253)
-
---- a/scheduler/auth.c
-+++ b/scheduler/auth.c
-@@ -67,9 +68,6 @@ static int		check_authref(cupsd_client_t *con, const char *right);
- static int		compare_locations(cupsd_location_t *a,
- 			                  cupsd_location_t *b);
- static cupsd_authmask_t	*copy_authmask(cupsd_authmask_t *am, void *data);
--#if !HAVE_LIBPAM
--static char		*cups_crypt(const char *pw, const char *salt);
--#endif /* !HAVE_LIBPAM */
- static void		free_authmask(cupsd_authmask_t *am, void *data);
- #if HAVE_LIBPAM
- static int		pam_func(int, const struct pam_message **,
-@@ -690,14 +688,14 @@ cupsdAuthorize(cupsd_client_t *con)	/* I - Client connection */
- 	    * client...
- 	    */
- 
--	    pass = cups_crypt(password, pw->pw_passwd);
-+	    pass = crypt(password, pw->pw_passwd);
- 
- 	    if (!pass || strcmp(pw->pw_passwd, pass))
- 	    {
- #  ifdef HAVE_SHADOW_H
- 	      if (spw)
- 	      {
--		pass = cups_crypt(password, spw->sp_pwdp);
-+		pass = crypt(password, spw->sp_pwdp);
- 
- 		if (pass == NULL || strcmp(spw->sp_pwdp, pass))
- 		{
-@@ -1991,129 +1989,6 @@ copy_authmask(cupsd_authmask_t *mask,	/* I - Existing auth mask */
- }
- 
- 
--#if !HAVE_LIBPAM
--/*
-- * 'cups_crypt()' - Encrypt the password using the DES or MD5 algorithms,
-- *                  as needed.
-- */
--
--static char *				/* O - Encrypted password */
--cups_crypt(const char *pw,		/* I - Password string */
--           const char *salt)		/* I - Salt (key) string */
--{
--  if (!strncmp(salt, "$1$", 3))
--  {
--   /*
--    * Use MD5 passwords without the benefit of PAM; this is for
--    * Slackware Linux, and the algorithm was taken from the
--    * old shadow-19990827/lib/md5crypt.c source code... :(
--    */
--
--    int			i;		/* Looping var */
--    unsigned long	n;		/* Output number */
--    int			pwlen;		/* Length of password string */
--    const char		*salt_end;	/* End of "salt" data for MD5 */
--    char		*ptr;		/* Pointer into result string */
--    _cups_md5_state_t	state;		/* Primary MD5 state info */
--    _cups_md5_state_t	state2;		/* Secondary MD5 state info */
--    unsigned char	digest[16];	/* MD5 digest result */
--    static char		result[120];	/* Final password string */
--
--
--   /*
--    * Get the salt data between dollar signs, e.g. $1$saltdata$md5.
--    * Get a maximum of 8 characters of salt data after $1$...
--    */
--
--    for (salt_end = salt + 3; *salt_end && (salt_end - salt) < 11; salt_end ++)
--      if (*salt_end == '$')
--        break;
--
--   /*
--    * Compute the MD5 sum we need...
--    */
--
--    pwlen = strlen(pw);
--
--    _cupsMD5Init(&state);
--    _cupsMD5Append(&state, (unsigned char *)pw, pwlen);
--    _cupsMD5Append(&state, (unsigned char *)salt, salt_end - salt);
--
--    _cupsMD5Init(&state2);
--    _cupsMD5Append(&state2, (unsigned char *)pw, pwlen);
--    _cupsMD5Append(&state2, (unsigned char *)salt + 3, salt_end - salt - 3);
--    _cupsMD5Append(&state2, (unsigned char *)pw, pwlen);
--    _cupsMD5Finish(&state2, digest);
--
--    for (i = pwlen; i > 0; i -= 16)
--      _cupsMD5Append(&state, digest, i > 16 ? 16 : i);
--
--    for (i = pwlen; i > 0; i >>= 1)
--      _cupsMD5Append(&state, (unsigned char *)((i & 1) ? "" : pw), 1);
--
--    _cupsMD5Finish(&state, digest);
--
--    for (i = 0; i < 1000; i ++)
--    {
--      _cupsMD5Init(&state);
--
--      if (i & 1)
--        _cupsMD5Append(&state, (unsigned char *)pw, pwlen);
--      else
--        _cupsMD5Append(&state, digest, 16);
--
--      if (i % 3)
--        _cupsMD5Append(&state, (unsigned char *)salt + 3, salt_end - salt - 3);
--
--      if (i % 7)
--        _cupsMD5Append(&state, (unsigned char *)pw, pwlen);
--
--      if (i & 1)
--        _cupsMD5Append(&state, digest, 16);
--      else
--        _cupsMD5Append(&state, (unsigned char *)pw, pwlen);
--
--      _cupsMD5Finish(&state, digest);
--    }
--
--   /*
--    * Copy the final sum to the result string and return...
--    */
--
--    memcpy(result, salt, (size_t)(salt_end - salt));
--    ptr = result + (salt_end - salt);
--    *ptr++ = '$';
--
--    for (i = 0; i < 5; i ++, ptr += 4)
--    {
--      n = ((((unsigned)digest[i] << 8) | (unsigned)digest[i + 6]) << 8);
--
--      if (i < 4)
--        n |= (unsigned)digest[i + 12];
--      else
--        n |= (unsigned)digest[5];
--
--      to64(ptr, n, 4);
--    }
--
--    to64(ptr, (unsigned)digest[11], 2);
--    ptr += 2;
--    *ptr = '\0';
--
--    return (result);
--  }
--  else
--  {
--   /*
--    * Use the standard crypt() function...
--    */
--
--    return (crypt(pw, salt));
--  }
--}
--#endif /* !HAVE_LIBPAM */
--
--
- /*
-  * 'free_authmask()' - Free function for auth masks.
-  */


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2021-10-28  9:49 Pacho Ramos
  0 siblings, 0 replies; 15+ messages in thread
From: Pacho Ramos @ 2021-10-28  9:49 UTC (permalink / raw
  To: gentoo-commits

commit:     8f6d1abb628f060426d6871edd65aa0ec70cee12
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 28 09:49:01 2021 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Thu Oct 28 09:49:13 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8f6d1abb

net-print/cups: Multiple bug fixes

- Fix missing dep on avahi[dbus] (#695438)
- Ensure server path is always correct (#615438)
- Recommend sys-auth/nss-mdns when needed (#634048)
- Fix /run paths (#685308)
- Respect empty LINGUAS (#771162)
- Fix empty dirs handling (#798855)
- Fix printing on some Samsung devices (#801316)
- Apply other upstream accepted patches widely tested on Fedora and Debian.

Closes: https://bugs.gentoo.org/695438
Thanks-to: Mart Raudsepp
Closes: https://bugs.gentoo.org/615438
Thanks-to: Stefan Schmid
Closes: https://bugs.gentoo.org/634048
Closes: https://bugs.gentoo.org/685308
Thanks-to: Bertrand Jacquin
Closes: https://bugs.gentoo.org/771162
Thanks-to: i.Dark_Templar
Closes: https://bugs.gentoo.org/798855
Thanks-to: Marco Scardovi (scardracs)
Closes: https://bugs.gentoo.org/801316
Thanks-to: Gentlenoob
Thanks-to: mehw
Thanks-to: Volkmar W. Pogatzki
Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 net-print/cups/cups-2.3.3_p2-r3.ebuild             | 326 +++++++++++++++++++++
 .../files/cups-2.3.3-enforcing-read-limits.patch   |  29 ++
 .../cups/files/cups-2.3.3-ipp-retry-validate.patch |  43 +++
 net-print/cups/files/cups-2.3.3-manpage.patch      |  23 ++
 net-print/cups/files/cups-2.3.3-timeout.patch      |  26 ++
 net-print/cups/files/cupsd.init.d-r4               |  22 ++
 6 files changed, 469 insertions(+)

diff --git a/net-print/cups/cups-2.3.3_p2-r3.ebuild b/net-print/cups/cups-2.3.3_p2-r3.ebuild
new file mode 100644
index 00000000000..2cf405ade5c
--- /dev/null
+++ b/net-print/cups/cups-2.3.3_p2-r3.ebuild
@@ -0,0 +1,326 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools flag-o-matic linux-info xdg multilib-minimal optfeature pam systemd toolchain-funcs
+
+MY_PV="${PV/_beta/b}"
+MY_PV="${MY_PV/_rc/rc}"
+MY_PV="${MY_PV/_p/op}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+#	EGIT_REPO_URI="https://github.com/apple/cups.git"
+	EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
+	[[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
+else
+#	SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
+	SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
+	if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then
+		KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+	fi
+fi
+
+DESCRIPTION="The Common Unix Printing System"
+HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="acl dbus debug kerberos pam selinux +ssl static-libs systemd +threads usb X xinetd zeroconf"
+
+REQUIRED_USE="usb? ( threads )"
+# upstream includes an interactive test which is a nono for gentoo
+RESTRICT="test"
+
+BDEPEND="
+	acct-group/lp
+	acct-group/lpadmin
+	virtual/pkgconfig
+"
+DEPEND="
+	app-text/libpaper
+	sys-libs/zlib
+	acl? (
+		kernel_linux? (
+			sys-apps/acl
+			sys-apps/attr
+		)
+	)
+	dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+	kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+	pam? ( sys-libs/pam )
+	!pam? ( virtual/libcrypt:= )
+	ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${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[dbus,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}
+	acct-group/lp
+	acct-group/lpadmin
+	selinux? ( sec-policy/selinux-cups )
+"
+PDEPEND=">=net-print/cups-filters-1.0.43"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.2.6-fix-install-perms.patch"
+	"${FILESDIR}/${PN}-1.4.4-nostrip.patch"
+	"${FILESDIR}/${PN}-2.3.3-user-AR.patch"
+	# Upstream patches (from Debian and Fedora)
+	"${FILESDIR}/${PN}-2.3.3-timeout.patch"
+	"${FILESDIR}/${PN}-2.3.3-enforcing-read-limits.patch"
+	"${FILESDIR}/${PN}-2.3.3-manpage.patch"
+	"${FILESDIR}/${PN}-2.3.3-ipp-retry-validate.patch"
+)
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/cups-config
+)
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+	#enewgroup lp -> acct-group/lp
+	# user lp already provided by baselayout
+	#enewuser lp -1 -1 -1 lp
+	#enewgroup lpadmin 106
+
+	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; this should now work in most cases (bug 501122)
+			if use usb; then
+				if linux_chkconfig_present USB_PRINTER; then
+					elog "Your USB printers will be managed via libusb. In case you run into problems, "
+					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
+					elog "usblp kernel module."
+					elog "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() {
+	default
+
+	# Remove ".SILENT" rule for verbose output (bug 524338).
+	sed 's#^.SILENT:##g' -i Makedefs.in || die
+
+	# Fix install-sh, posix sh does not have 'function'.
+	sed 's#function gzipcp#gzipcp()#g' -i install-sh || die
+
+	# Do not add -Werror even for live ebuilds
+	sed '/WARNING_OPTIONS/s@-Werror@@' \
+		-i config-scripts/cups-compiler.m4 || die
+
+	AT_M4DIR=config-scripts eaclocal
+	eautoconf
+
+	# custom Makefiles
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	export DSOFLAGS="${LDFLAGS}"
+
+	# explicitly specify compiler wrt bug 524340
+	#
+	# need to override KRB5CONFIG for proper flags
+	# https://github.com/apple/cups/issues/4423
+	local myeconfargs=(
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
+		--libdir="${EPREFIX}"/usr/$(get_libdir)
+		--localstatedir="${EPREFIX}"/var
+		--with-exe-file-perm=755
+		--with-rundir="${EPREFIX}"/run/cups
+		--with-cups-user=lp
+		--with-cups-group=lp
+		--with-docdir="${EPREFIX}"/usr/share/cups/html
+		--with-system-groups=lpadmin
+		--with-xinetd="${EPREFIX}"/etc/xinetd.d
+		$(multilib_native_use_enable acl)
+		$(use_enable dbus)
+		$(use_enable debug)
+		$(use_enable debug debug-guards)
+		$(use_enable debug debug-printfs)
+		$(use_enable kerberos gssapi)
+		$(multilib_native_use_enable pam)
+		$(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
+		$(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper)
+	)
+
+	# Handle empty LINGUAS properly, bug #771162
+	if [ -n "${LINGUAS+x}" ] ; then
+		myeconfargs+=(
+			--with-languages="${LINGUAS}"
+		)
+	fi
+
+	if tc-is-static-only; then
+		myeconfargs+=(
+			--disable-shared
+		)
+	fi
+
+	# install in /usr/libexec always, instead of using /usr/lib/cups, as that
+	# makes more sense when facing multilib support.
+	sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
+
+	econf "${myeconfargs[@]}"
+
+	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
+
+	# additional path corrections needed for prefix, see bug 597728
+	sed \
+		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
+		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
+		-e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \
+		-e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \
+		-i Makedefs || 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}.md
+
+	# move the default config file to docs
+	dodoc "${ED}"/etc/cups/cupsd.conf.default
+	rm "${ED}"/etc/cups/cupsd.conf.default || die
+
+	# clean out cups init scripts
+	rm -r "${ED}"/etc/{init.d/cups,rc*} || die
+
+	# install our init script
+	local neededservices=(
+		$(usex zeroconf avahi-daemon '')
+		$(usex dbus dbus '')
+	)
+	[[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}"
+	cp "${FILESDIR}"/cupsd.init.d-r4 "${T}"/cupsd || die
+	sed -i -e "s/@neededservices@/${neededservices}/" "${T}"/cupsd || die
+	doinitd "${T}"/cupsd
+
+	if use pam ; then
+		rm "${ED}"/etc/pam.d/${PN} || die
+		pamd_mimic_system cups auth account
+	fi
+
+	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
+	else
+		# always configure with --with-xinetd= and clean up later,
+		# bug #525604
+		rm -r "${ED}"/etc/xinetd.d || die
+	fi
+
+	keepdir /etc/cups/{interfaces,ppd,ssl}
+
+	if ! use X ; then
+		rm -r "${ED}"/usr/share/applications || die
+	fi
+
+	# create /etc/cups/client.conf, bug #196967 and #266678
+	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
+
+	# the following file is now provided by cups-filters:
+	rm -r "${ED}"/usr/share/cups/banners || die
+
+	# the following are created by the init script
+	rm -r "${ED}"/var/cache || die
+	rm -r "${ED}"/run || die
+
+	keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp
+}
+
+pkg_preinst() {
+	xdg_pkg_preinst
+}
+
+pkg_postinst() {
+	# Update desktop file database and gtk icon cache (bug 370059)
+	xdg_pkg_postinst
+
+	local v
+
+	for v in ${REPLACING_VERSIONS}; do
+		if ! ver_test ${v} -ge 2.2.2-r2 ; then
+			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"
+			break
+		fi
+	done
+
+	for v in ${REPLACING_VERSIONS}; do
+		elog
+		elog "For information about installing a printer and general cups setup"
+		elog "take a look at: https://wiki.gentoo.org/wiki/Printing"
+		break
+	done
+
+	optfeature_header "CUPS may need installing the following for certain features to work:"
+	use zeroconf && optfeature "local hostname resolution using a hostname.local naming scheme" sys-auth/nss-mdns
+}
+
+pkg_postrm() {
+	# Update desktop file database and gtk icon cache (bug 370059)
+	xdg_pkg_postrm
+}

diff --git a/net-print/cups/files/cups-2.3.3-enforcing-read-limits.patch b/net-print/cups/files/cups-2.3.3-enforcing-read-limits.patch
new file mode 100644
index 00000000000..1782d122ae5
--- /dev/null
+++ b/net-print/cups/files/cups-2.3.3-enforcing-read-limits.patch
@@ -0,0 +1,29 @@
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Tue, 13 Apr 2021 15:47:37 +0200
+Subject: backend/usb-libusb.c: Revert enforcing read limits
+
+This commit reverts the change introduced by 2.2.12 [1] - its
+implementation caused a regression with Lexmark filters.
+
+[1] https://github.com/apple/cups/commit/35e927f83529cd9b4bc37bcd418c50e307fced35
+
+Origin: upstream, https://github.com/OpenPrinting/cups/pull/174
+Bug: https://github.com/OpenPrinting/cups/issues/72
+---
+ backend/usb-libusb.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
+index fbb0d9d..89b5182 100644
+--- a/backend/usb-libusb.c
++++ b/backend/usb-libusb.c
+@@ -1721,7 +1721,8 @@ static void *read_thread(void *reference)
+     * Make sure this loop executes no more than once every 250 miliseconds...
+     */
+ 
+-    if ((g.wait_eof || !g.read_thread_stop))
++    if ((readstatus != LIBUSB_SUCCESS || rbytes == 0) &&
++	 (g.wait_eof || !g.read_thread_stop))
+       usleep(250000);
+   }
+   while (g.wait_eof || !g.read_thread_stop);

diff --git a/net-print/cups/files/cups-2.3.3-ipp-retry-validate.patch b/net-print/cups/files/cups-2.3.3-ipp-retry-validate.patch
new file mode 100644
index 00000000000..a677090cd91
--- /dev/null
+++ b/net-print/cups/files/cups-2.3.3-ipp-retry-validate.patch
@@ -0,0 +1,43 @@
+From 6e6999b1f74457b7fd6057a31f1d3606de19a05b Mon Sep 17 00:00:00 2001
+From: Michael R Sweet <michael.r.sweet@gmail.com>
+Date: Fri, 9 Apr 2021 10:20:04 -0400
+Subject: [PATCH] Retry Validate-Job once, if needed (Issue #132)
+
+---
+ CHANGES.md    |  1 +
+ backend/ipp.c | 14 +++++++++++++-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+diff --git a/backend/ipp.c b/backend/ipp.c
+index 63353a66d..020ab7fd4 100644
+--- a/backend/ipp.c
++++ b/backend/ipp.c
+@@ -256,6 +257,7 @@ main(int  argc,				/* I - Number of command-line args */
+ 		get_job_attrs = 0,	/* Does printer support Get-Job-Attributes? */
+ 		send_document = 0,	/* Does printer support Send-Document? */
+ 		validate_job = 0,	/* Does printer support Validate-Job? */
++		validate_retried = 0,	/* Was Validate-Job request retried? */
+ 		copies,			/* Number of copies for job */
+ 		copies_remaining;	/* Number of copies remaining */
+   const char	*content_type,		/* CONTENT_TYPE environment variable */
+@@ -1559,7 +1561,17 @@ main(int  argc,				/* I - Number of command-line args */
+              ipp_status == IPP_STATUS_ERROR_BAD_REQUEST)
+       break;
+     else if (job_auth == NULL && ipp_status > IPP_STATUS_ERROR_BAD_REQUEST)
++    {
++      if (!validate_retried)
++      {
++        // Retry Validate-Job operation once, to work around known printer bug...
++        validate_retried = 1;
++        sleep(10);
++        continue;
++      }
++
+       goto cleanup;
++    }
+   }
+ 
+  /*
+-- 
+2.26.3
+

diff --git a/net-print/cups/files/cups-2.3.3-manpage.patch b/net-print/cups/files/cups-2.3.3-manpage.patch
new file mode 100644
index 00000000000..db22adeeec4
--- /dev/null
+++ b/net-print/cups/files/cups-2.3.3-manpage.patch
@@ -0,0 +1,23 @@
+From: Didier Raboud <odyx@debian.org>
+Date: Fri, 12 Feb 2021 13:47:22 +0100
+Subject: Let cups.1 point to client.conf.5, not client.conf.7
+
+Bug: https://github.com/OpenPrinting/cups/pull/92
+Closes: #982303
+---
+ man/cups.1 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/man/cups.1 b/man/cups.1
+index 706620d..751ad9a 100644
+--- a/man/cups.1
++++ b/man/cups.1
+@@ -125,7 +125,7 @@ Printers that do not support IPP can be supported using applications such as
+ .BR ippeveprinter (1).
+ .SH SEE ALSO
+ .BR cancel (1),
+-.BR client.conf (7),
++.BR client.conf (5),
+ .BR cupsctl (8),
+ .BR cupsd (8),
+ .BR lp (1),

diff --git a/net-print/cups/files/cups-2.3.3-timeout.patch b/net-print/cups/files/cups-2.3.3-timeout.patch
new file mode 100644
index 00000000000..280f71f2fad
--- /dev/null
+++ b/net-print/cups/files/cups-2.3.3-timeout.patch
@@ -0,0 +1,26 @@
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Tue, 13 Apr 2021 15:44:14 +0200
+Subject: backend/usb-libusb.c: Use 60s timeout for reading at backchannel
+
+Some older models malfunction if timeout is too short.
+
+Origin: upstream, https://github.com/OpenPrinting/cups/pull/174
+Bug: https://github.com/OpenPrinting/cups/issues/160
+Bug-Debian: https://bugs.debian.org/989073
+---
+ backend/usb-libusb.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/backend/usb-libusb.c b/backend/usb-libusb.c
+index d6b0eb4..fbb0d9d 100644
+--- a/backend/usb-libusb.c
++++ b/backend/usb-libusb.c
+@@ -1704,7 +1704,7 @@ static void *read_thread(void *reference)
+     readstatus = libusb_bulk_transfer(g.printer->handle,
+ 				      g.printer->read_endp,
+ 				      readbuffer, rbytes,
+-				      &rbytes, 250);
++				      &rbytes, 60000);
+     if (readstatus == LIBUSB_SUCCESS && rbytes > 0)
+     {
+       fprintf(stderr, "DEBUG: Read %d bytes of back-channel data...\n", (int)rbytes);

diff --git a/net-print/cups/files/cupsd.init.d-r4 b/net-print/cups/files/cupsd.init.d-r4
new file mode 100644
index 00000000000..3f65258fbe4
--- /dev/null
+++ b/net-print/cups/files/cupsd.init.d-r4
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2021 Gentoo Authors
+
+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="/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
+}


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2022-05-22 12:34 Pacho Ramos
  0 siblings, 0 replies; 15+ messages in thread
From: Pacho Ramos @ 2022-05-22 12:34 UTC (permalink / raw
  To: gentoo-commits

commit:     223305bc13eb0aad4824fb632d288f621a835616
Author:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sun May 22 12:33:00 2022 +0000
Commit:     Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sun May 22 12:34:16 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=223305bc

net-print/cups: add 2.4.1

Closes: https://bugs.gentoo.org/829920
Closes: https://bugs.gentoo.org/833577
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>

 net-print/cups/Manifest                            |   1 +
 net-print/cups/cups-2.4.1.ebuild                   | 320 ++++++++++
 .../files/0001-Fix-some-web-interface-issues.patch | 667 +++++++++++++++++++++
 .../cups/files/0001-Footer-message-corrected.patch |  89 +++
 .../files/0001-cups-fix-uninit-value-jump.patch    |  18 +
 ...ps-tls-gnutls.c-Use-always-GNUTLS_SHUT_WR.patch |  55 ++
 net-print/cups/files/cups-2.4.1-nostrip.patch      |  11 +
 net-print/cups/files/cups-2.4.1-resolve-uri.patch  |  31 +
 net-print/cups/files/cups-2.4.1-user-AR.patch      |  21 +
 9 files changed, 1213 insertions(+)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index f26affcecc5f..27494be3c394 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,2 +1,3 @@
 DIST cups-2.3.3-source.tar.gz 8140741 BLAKE2B 427e6ee3602aec33ac336d9b2c6c8eb270f2996371f0edd3d69e411b94b2e93fc58a0032ba9f6d048f2c58a1c6b48f742671b4011cd725b882adfcc06ed7fd8a SHA512 7d6f4a01794c5599cc71525778ea785fd17271c31ac146a56e8fc374a88f99e4035d018dae48e37e541455e9cc93b302e892b2e93ec558c1b4bfc46dad68c92d
 DIST cups-2.3.3op2-source.tar.gz 7993205 BLAKE2B 8c115b91ec185a4820578561aaf681238280b22b5c68b68c484ffbd0fa3c4ec1beb4d426e3f0e33192e32bce78aa8b7f50ed6799732a467fa9e75c34787057ee SHA512 db27dd6fb616bd7ad895b2bdf4ea7b010501358a50dc8f2e7e29558d1cfc088a572b1b35ac512654d3ed410c84df87dc34ca636533a4499117253915d4763117
+DIST cups-2.4.1-source.tar.gz 8113914 BLAKE2B 690d9d92f9bc84c2bb360699191cd67e1489ffc3ab219376dfc1a8795379950c95bf58c2033a0dbd2918262c5d104e21e31c4585cb35d229b0fac6cf4967bfd7 SHA512 74e83728fcc3baf709176442b26711250fd4d4ede1e81e35b02a5607711067e28cd5a05d5bc3337953f6b2236c5a429b13f3a7f1218a08a2d3c30a8c9b0d96fd

diff --git a/net-print/cups/cups-2.4.1.ebuild b/net-print/cups/cups-2.4.1.ebuild
new file mode 100644
index 000000000000..be3e3b15e512
--- /dev/null
+++ b/net-print/cups/cups-2.4.1.ebuild
@@ -0,0 +1,320 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs
+
+MY_PV="${PV/_beta/b}"
+MY_PV="${MY_PV/_rc/rc}"
+MY_PV="${MY_PV/_p/op}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == *9999 ]]; then
+	inherit git-r3
+#	EGIT_REPO_URI="https://github.com/apple/cups.git"
+	EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
+	[[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
+else
+#	SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
+	SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
+	if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then
+		KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+	fi
+fi
+
+DESCRIPTION="The Common Unix Printing System"
+HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="acl dbus debug kerberos pam selinux +ssl static-libs systemd usb X xinetd zeroconf"
+
+# upstream includes an interactive test which is a nono for gentoo
+RESTRICT="test"
+
+BDEPEND="
+	acct-group/lp
+	acct-group/lpadmin
+	virtual/pkgconfig
+"
+DEPEND="
+	app-text/libpaper
+	sys-libs/zlib
+	acl? (
+		kernel_linux? (
+			sys-apps/acl
+			sys-apps/attr
+		)
+	)
+	dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+	kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+	pam? ( sys-libs/pam )
+	!pam? ( virtual/libcrypt:= )
+	ssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${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[dbus,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}
+	acct-group/lp
+	acct-group/lpadmin
+	selinux? ( sec-policy/selinux-cups )
+"
+PDEPEND=">=net-print/cups-filters-1.0.43"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-2.4.1-nostrip.patch"
+	"${FILESDIR}/${PN}-2.4.1-user-AR.patch"
+
+	# Upstream patches applied by Fedora
+	# https://github.com/OpenPrinting/cups/pull/329
+	"${FILESDIR}"/0001-cups-fix-uninit-value-jump.patch
+	# https://github.com/OpenPrinting/cups/issues/340
+	"${FILESDIR}"/${PN}-2.4.1-resolve-uri.patch
+	# https://src.fedoraproject.org/rpms/cups/blob/rawhide/f/cups.spec#_79
+	"${FILESDIR}"/0001-Footer-message-corrected.patch
+	"${FILESDIR}"/0001-Fix-some-web-interface-issues.patch
+	# https://bugzilla.redhat.com/show_bug.cgi?id=2073268
+	"${FILESDIR}"/0001-cups-tls-gnutls.c-Use-always-GNUTLS_SHUT_WR.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/cups-config
+)
+
+S="${WORKDIR}/${MY_P}"
+
+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; this should now work in most cases (bug 501122)
+			if use usb; then
+				if linux_chkconfig_present USB_PRINTER; then
+					elog "Your USB printers will be managed via libusb. In case you run into problems, "
+					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
+					elog "usblp kernel module."
+					elog "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() {
+	default
+
+	# Remove ".SILENT" rule for verbose output (bug 524338).
+	sed 's#^.SILENT:##g' -i Makedefs.in || die
+
+	# Fix install-sh, posix sh does not have 'function'.
+	sed 's#function gzipcp#gzipcp()#g' -i install-sh || die
+
+	# Do not add -Werror even for live ebuilds
+	sed '/WARNING_OPTIONS/s@-Werror@@' \
+		-i config-scripts/cups-compiler.m4 || die
+
+	AT_M4DIR=config-scripts eaclocal
+	eautoconf
+
+	# custom Makefiles
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	export DSOFLAGS="${LDFLAGS}"
+
+	# explicitly specify compiler wrt bug 524340
+	#
+	# need to override KRB5CONFIG for proper flags
+	# https://github.com/apple/cups/issues/4423
+	local myeconfargs=(
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
+		--libdir="${EPREFIX}"/usr/$(get_libdir)
+		--localstatedir="${EPREFIX}"/var
+		# Follow Fedora permission setting
+		--with-cupsd-file-perm=0755
+		--with-exe-file-perm=755
+		--with-log-file-perm=0640
+		# Used by Debian, also prevents printers from getting
+		# disabled and users not knowing how to re-enable them
+		--with-error-policy=retry-job
+		# Used in Debian and Fedora
+		--enable-sync-on-close
+		#
+		--with-rundir="${EPREFIX}"/run/cups
+		--with-cups-user=lp
+		--with-cups-group=lp
+		--with-docdir="${EPREFIX}"/usr/share/cups/html
+		--with-system-groups=lpadmin
+		--with-xinetd="${EPREFIX}"/etc/xinetd.d
+		$(multilib_native_use_enable acl)
+		$(use_enable dbus)
+		$(use_enable debug)
+		$(use_enable debug debug-guards)
+		$(use_enable debug debug-printfs)
+		$(use_enable kerberos gssapi)
+		$(multilib_native_use_enable pam)
+		$(use_enable static-libs static)
+		$(use_with ssl tls gnutls)
+		$(use_with systemd ondemand systemd)
+		$(multilib_native_use_enable usb libusb)
+		$(use_with zeroconf dnssd avahi)
+		$(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper)
+	)
+
+	# Handle empty LINGUAS properly, bug #771162
+	if [ -n "${LINGUAS+x}" ] ; then
+		myeconfargs+=(
+			--with-languages="${LINGUAS}"
+		)
+	fi
+
+	if tc-is-static-only; then
+		myeconfargs+=(
+			--disable-shared
+		)
+	fi
+
+	# install in /usr/libexec always, instead of using /usr/lib/cups, as that
+	# makes more sense when facing multilib support.
+	sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
+
+	econf "${myeconfargs[@]}"
+
+	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
+
+	# additional path corrections needed for prefix, see bug 597728
+	sed \
+		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
+		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
+		-e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \
+		-e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \
+		-i Makedefs || 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}.md
+
+	# move the default config file to docs
+	dodoc "${ED}"/etc/cups/cupsd.conf.default
+	rm "${ED}"/etc/cups/cupsd.conf.default || die
+
+	# clean out cups init scripts
+	rm -r "${ED}"/etc/{init.d/cups,rc*} || die
+
+	# install our init script
+	local neededservices=(
+		$(usex zeroconf avahi-daemon '')
+		$(usex dbus dbus '')
+	)
+	[[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}"
+	cp "${FILESDIR}"/cupsd.init.d-r4 "${T}"/cupsd || die
+	sed -i -e "s/@neededservices@/${neededservices}/" "${T}"/cupsd || die
+	doinitd "${T}"/cupsd
+
+	if use pam ; then
+		rm "${ED}"/etc/pam.d/${PN} || die
+		pamd_mimic_system cups auth account
+	fi
+
+	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
+	else
+		# always configure with --with-xinetd= and clean up later,
+		# bug #525604
+		rm -r "${ED}"/etc/xinetd.d || die
+	fi
+
+	keepdir /etc/cups/{interfaces,ppd,ssl}
+
+	if ! use X ; then
+		rm -r "${ED}"/usr/share/applications || die
+	fi
+
+	# create /etc/cups/client.conf, bug #196967 and #266678
+	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
+
+	# the following file is now provided by cups-filters:
+	rm -r "${ED}"/usr/share/cups/banners || die
+
+	# the following are created by the init script
+	rm -r "${ED}"/var/cache || die
+	rm -r "${ED}"/run || die
+
+	keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+	local v
+
+	for v in ${REPLACING_VERSIONS}; do
+		if ! ver_test ${v} -ge 2.2.2-r2 ; then
+			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"
+			break
+		fi
+	done
+
+	for v in ${REPLACING_VERSIONS}; do
+		elog
+		elog "For information about installing a printer and general cups setup"
+		elog "take a look at: https://wiki.gentoo.org/wiki/Printing"
+		break
+	done
+
+	optfeature_header "CUPS may need installing the following for certain features to work:"
+	use zeroconf && optfeature "local hostname resolution using a hostname.local naming scheme" sys-auth/nss-mdns
+}

diff --git a/net-print/cups/files/0001-Fix-some-web-interface-issues.patch b/net-print/cups/files/0001-Fix-some-web-interface-issues.patch
new file mode 100644
index 000000000000..d2a8ec19429d
--- /dev/null
+++ b/net-print/cups/files/0001-Fix-some-web-interface-issues.patch
@@ -0,0 +1,667 @@
+diff -up cups-2.4.1/doc/cups.css.css-issues cups-2.4.1/doc/cups.css
+--- cups-2.4.1/doc/cups.css.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/doc/cups.css	2022-03-08 13:55:16.075624812 +0100
+@@ -1,5 +1,5 @@
+ /* Layout CSS */
+-.header {
++.cups-header {
+   background: rgba(46,46,46,.9);
+   box-shadow: 0 2px 5px rgba(0,0,0,0.25);
+   color: white;
+@@ -11,7 +11,7 @@
+   top: 0;
+   width: 100%;
+ }
+-.header ul {
++.cups-header ul {
+   list-style: none;
+   margin: 0;
+   -webkit-margin-before: 0;
+@@ -20,37 +20,37 @@
+   -webkit-margin-end: 5px;
+   -webkit-padding-start: 0;
+ }
+-.header ul li {
++.cups-header ul li {
+   float: left;
+ }
+-.header a {
++.cups-header a {
+   display: block;
+   padding: 5px 10px !important;
+ }
+-.header a:link, .header a:visited {
++.cups-header a:link, .cups-header a:visited {
+   color: white !important;
+   text-decoration: none !important;
+ }
+-.header a:hover {
++.cups-header a:hover {
+   background: #cccccc !important;
+   color: #333333 !important;
+   text-decoration: none !important;
+ }
+-.header a.active {
++.cups-header a.active {
+   background: white !important;
+   box-shadow: rgba(0,0,0,0.1) 0 0 10px 0 inset;
+   color: black !important;
+   text-decoration: none !important;
+ }
+ 
+-.body {
++.cups-body {
+   padding: 40px 20px;
+ }
+-.row .body {
++.row .cups-body {
+   padding: 0;
+ }
+ 
+-.footer {
++.cups-footer {
+   background: rgba(46,46,46,.9);
+   bottom: 0;
+   box-shadow: 0 -2px 5px rgba(0,0,0,0.25);
+@@ -62,7 +62,7 @@
+   position: fixed;
+   width: 100%;
+ }
+-.footer a:link, footer a:hover, .footer a:visited {
++.cups-footer a:link, footer a:hover, .cups-footer a:visited {
+   color: white !important;
+   text-decoration: none !important;
+ }
+@@ -131,6 +131,7 @@ pre {
+ }
+ 
+ blockquote {
++  background: rgba(191,191,191,0.1);
+   border-left: solid 2px #777;
+   margin: 1em 0;
+   padding: 10px;
+@@ -207,7 +208,7 @@ table.page {
+   width: 100%;
+ }
+ 
+-td.body {
++td.cups-body {
+   height: 100%;
+   vertical-align: top;
+ }
+@@ -365,7 +366,7 @@ h1.title {
+   display: none;
+ }
+ 
+-h2.title, h3.title, .row .body h2, .row .body h3 {
++h2.title, h3.title, .row .cups-body h2, .row .cups-body h3 {
+   border-bottom: solid 2pt black;
+ }
+ 
+@@ -451,8 +452,8 @@ div.sidebar p.l2 {
+ }
+ 
+ table.inset {
+-  background: rgba(191,191,191,0.15);
+-  border: thin solid rgba(191,191,191,0.3);
++  background: #f4f4f4;
++  border: thin solid rgba(191,191,191,0.5);
+   margin-top: 1em;
+   padding: 0;
+   width: 100%;
+@@ -471,7 +472,7 @@ table.inset caption {
+ }
+ 
+ table.inset td {
+-  padding: 2px;
++  padding: 2px 5px;
+ }
+ 
+ dt {
+@@ -525,15 +526,15 @@ div.tab {
+ }
+ 
+ /* API documentation styles... */
+-div.body h1 {
++div.cups-body h1 {
+ }
+-div.body h2 {
++div.cups-body h2 {
+ }
+-div.body h3 {
++div.cups-body h3 {
+ }
+-div.body h4 {
++div.cups-body h4 {
+ }
+-div.body h5 {
++div.cups-body h5 {
+ }
+ div.contents {
+ }
+@@ -589,9 +590,14 @@ h1, h2, h3, h4, h5, h6 {
+ blockquote {
+   page-break-inside: avoid;
+ }
+-p code, li code, p.code, pre, ul.code li {
+-  background: rgba(127,127,127,0.1);
++p.code, pre, ul.code li {
+   border-left: thin dotted gray;
++  background: rgba(191,191,191,0.1);
++}
++p code, li code {
++  background: rgba(191,191,191,0.3);
++}
++p code, li code, p.code, pre, ul.code li {
+   font-family: monospace;
+   hyphens: manual;
+   margin: 18pt 0;
+@@ -644,19 +650,19 @@ ul.contents li ul.code, ul.contents li u
+     display: none;
+   }
+ 
+-  .header {
++  .cups-header {
+     margin: 0;
+     position: relative;
+   }
+-  .header ul li {
++  .cups-header ul li {
+     float: none;
+   }
+ 
+-  .body {
++  .cups-body {
+     padding: 0;
+   }
+ 
+-  .footer {
++  .cups-footer {
+     font-size: 10px;
+     height: auto;
+     position: relative;
+@@ -715,6 +721,12 @@ ul.contents li ul.code, ul.contents li u
+   hr {
+     color: #666;
+   }
++  table.inset {
++    background: #1d1d1d;
++  }
++  h2.title, h3.title, .row .cups-body h2, .row .cups-body h3 {
++    border-bottom: solid 2pt #ccc;
++  }
+   div.table table td, table.list th {
+     background: black;
+   }
+diff -up cups-2.4.1/doc/da/index.html.in.css-issues cups-2.4.1/doc/da/index.html.in
+--- cups-2.4.1/doc/da/index.html.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/doc/da/index.html.in	2022-03-08 13:55:16.075624812 +0100
+@@ -10,7 +10,7 @@
+     <title>Hjem - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body>
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a class="active" href="/">Hjem</a></li>
+@@ -21,7 +21,7 @@
+ 	<li><a href="/printers/">Printere</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>CUPS @CUPS_VERSION@</h1>
+ 	<p>CUPS er det standardbaseret, open source-udskrivningssystem som er udviklet af <a class="jumbolink" href="https://openprinting.github.io/" target="_blank">OpenPrinting</a> til Linux® og andre UNIX<sup>&reg;</sup>-lignende styresystemer. CUPS uses <a href="https://www.pwg.org/ipp/everywhere.html" target="_blank">IPP Everywhere™</a> to support printing to local and network printers</p>
+@@ -47,6 +47,6 @@
+ 	</div>
+       </div>
+     </div>
+-    <div class="footer">Ophavsret &copy; 2021-2022 OpenPrinting. Alle rettigheder forbeholdt.</div>
++    <div class="cups-footer">Ophavsret &copy; 2021-2022 OpenPrinting. Alle rettigheder forbeholdt.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/doc/de/index.html.in.css-issues cups-2.4.1/doc/de/index.html.in
+--- cups-2.4.1/doc/de/index.html.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/doc/de/index.html.in	2022-03-08 13:55:16.075624812 +0100
+@@ -10,7 +10,7 @@
+     <title>Startseite - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body>
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a class="active" href="/">Startseite</a></li>
+@@ -21,7 +21,7 @@
+ 	<li><a href="/printers/">Drucker</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>OpenPrinting CUPS @CUPS_VERSION@</h1>
+ 	<p>CUPS basiert auf Standards, Open Source Drucksystem entwickelt durch <a class="jumbolink" href="https://openprinting.github.io/" target="_blank">OpenPrinting</a> für Linux® und andere UNIX®-artige Betriebssysteme. CUPS benutzt <a href="https://www.pwg.org/ipp/everywhere.html" target="_blank">IPP Everywhere™</a> zur Unterstützung lokaler und Netzwerkdrucker.</p>
+@@ -47,6 +47,6 @@
+ 	</div>
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. Alle Rechte vorbehalten.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. Alle Rechte vorbehalten.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/doc/es/index.html.in.css-issues cups-2.4.1/doc/es/index.html.in
+--- cups-2.4.1/doc/es/index.html.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/doc/es/index.html.in	2022-03-08 13:55:16.075624812 +0100
+@@ -10,7 +10,7 @@
+     <title>Inicio - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body>
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a class="active" href="/">Inicio</a></li>
+@@ -21,7 +21,7 @@
+ 	<li><a href="/printers/">Impresoras</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>CUPS @CUPS_VERSION@</h1>
+ 	<p>CUPS es el sistema de impresi&oacute;n de c&oacute;digo abierto basado en est&aacute;ndares desarrollado por <a class="jumbolink" href="https://openprinting.github.io/" target="_blank">OpenPrinting</a> para macOS<sup>&reg;</sup> y otros sistemas operativos tipo UNIX<sup>&reg;</sup>. CUPS uses <a href="https://www.pwg.org/ipp/everywhere.html" target="_blank">IPP Everywhere™</a> to support printing to local and network printers.</p>
+@@ -47,6 +47,6 @@
+ 	</div>
+       </div>
+     </div>
+-    <div class="footer">Derechos de autor &copy; 2021-2022 OpenPrinting. Todos los derechos reservados.</div>
++    <div class="cups-footer">Derechos de autor &copy; 2021-2022 OpenPrinting. Todos los derechos reservados.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/doc/fr/index.html.in.css-issues cups-2.4.1/doc/fr/index.html.in
+--- cups-2.4.1/doc/fr/index.html.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/doc/fr/index.html.in	2022-03-08 13:55:16.075624812 +0100
+@@ -10,7 +10,7 @@
+     <title>Home - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body>
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a class="active" href="/">Home</a></li>
+@@ -21,7 +21,7 @@
+ 	<li><a href="/printers/">Imprimantes</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>OpenPrinting CUPS @CUPS_VERSION@</h1>
+ 	<p>Le système d'impression open source basé sur des normes, développé par <a class="jumbolink" href="https://openprinting.github.io/" target="_blank">OpenPrinting</a> for Linux® and other Unix®-like operating systems. CUPS uses <a href="https://www.pwg.org/ipp/everywhere.html" target="_blank">IPP Everywhere™</a> pour prendre en charge l'impression vers des imprimantes locales et de réseau.</p>
+@@ -47,6 +47,6 @@
+ 	</div>
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/doc/index.html.in.css-issues cups-2.4.1/doc/index.html.in
+--- cups-2.4.1/doc/index.html.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/doc/index.html.in	2022-03-08 13:55:16.075624812 +0100
+@@ -10,7 +10,7 @@
+     <title>Home - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body>
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a class="active" href="/">Home</a></li>
+@@ -21,7 +21,7 @@
+ 	<li><a href="/printers/">Printers</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>OpenPrinting CUPS @CUPS_VERSION@</h1>
+ 	<p>The standards-based, open source printing system developed by <a class="jumbolink" href="https://openprinting.github.io/" target="_blank">OpenPrinting</a> for Linux® and other Unix®-like operating systems. CUPS uses <a href="https://www.pwg.org/ipp/everywhere.html" target="_blank">IPP Everywhere™</a> to support printing to local and network printers.</p>
+@@ -47,6 +47,6 @@
+ 	</div>
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/doc/ja/index.html.in.css-issues cups-2.4.1/doc/ja/index.html.in
+--- cups-2.4.1/doc/ja/index.html.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/doc/ja/index.html.in	2022-03-08 13:55:16.075624812 +0100
+@@ -10,7 +10,7 @@
+     <title>ホーム - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body>
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a class="active" href="/">ホーム</a></li>
+@@ -21,7 +21,7 @@
+ 	<li><a href="/printers/">プリンター</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>CUPS @CUPS_VERSION@</h1>
+ 	<p>CUPS は、macOS<sup>&reg;</sup> およびその他の UNIX <SUP>&reg;</sup> 系 OS のために、<a href="http://www.apple.com/">Apple Inc.</a> によって開発された標準ベースのオープンソース印刷システムです。</p>
+@@ -47,6 +47,6 @@
+ 	</div>
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/doc/pt_BR/index.html.in.css-issues cups-2.4.1/doc/pt_BR/index.html.in
+--- cups-2.4.1/doc/pt_BR/index.html.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/doc/pt_BR/index.html.in	2022-03-08 13:55:16.075624812 +0100
+@@ -10,7 +10,7 @@
+     <title>In&iacute;cio - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body>
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a class="active" href="/">In&iacute;cio</a></li>
+@@ -21,7 +21,7 @@
+ 	<li><a href="/printers/">Impressoras</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>CUPS @CUPS_VERSION@</h1>
+ 	<p>CUPS &eacute; o sistema de impress&atilde;o baseado em padr&otilde;es e de c&oacute;digo aberto desenvolvido pela <a class="jumbolink" href="https://openprinting.github.io/" target="_blank">OpenPrinting</a> para Linux® e outros sistemas operacionais similares ao UNIX<sup>&reg;</sup>. CUPS uses <a href="https://www.pwg.org/ipp/everywhere.html" target="_blank">IPP Everywhere™</a> to support printing to local and network printers.</p>
+@@ -47,6 +47,6 @@
+ 	</div>
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. Todos os direitos reservados.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. Todos os direitos reservados.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/doc/ru/index.html.in.css-issues cups-2.4.1/doc/ru/index.html.in
+--- cups-2.4.1/doc/ru/index.html.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/doc/ru/index.html.in	2022-03-08 13:55:16.075624812 +0100
+@@ -10,7 +10,7 @@
+ 	<title>Home - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body>
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a class="active" href="/">Начало</a></li>
+@@ -21,7 +21,7 @@
+ 	<li><a href="/printers/">Принтеры</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>OpenPrinting CUPS @CUPS_VERSION@</h1>
+ 	<P>CUPS — поддерживающая большинство стандартов, свободная подсистема печати, разрабатываемая компанией <a class="jumbolink" href="https://openprinting.github.io/" target="_blank">OpenPrinting</a> для операционной системы Linux® и других UNIX<SUP>&reg;</SUP>-подобных операционных систем. CUPS uses <a href="https://www.pwg.org/ipp/everywhere.html" target="_blank">IPP Everywhere™</a> to support printing to local and network printers</P>
+@@ -47,6 +47,6 @@
+ </div>
+       </div>
+     </div>
+-    <div class="footer"> Авторские права на CUPS принадлежат (2021) компании OpenPrinting Все права защищены.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. All Rights Reserved.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/templates/da/header.tmpl.in.css-issues cups-2.4.1/templates/da/header.tmpl.in
+--- cups-2.4.1/templates/da/header.tmpl.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/templates/da/header.tmpl.in	2022-03-08 13:55:16.075624812 +0100
+@@ -27,7 +27,7 @@
+     <title>{title} - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body onload="check_cookies();">
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a href="/">Hjem</a></li>
+@@ -38,6 +38,6 @@
+ 	<li><a {SECTION=printers?class="active" :}href="/printers/">Printere</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>{title}</h1>
+diff -up cups-2.4.1/templates/da/trailer.tmpl.css-issues cups-2.4.1/templates/da/trailer.tmpl
+--- cups-2.4.1/templates/da/trailer.tmpl.css-issues	2022-03-08 13:55:16.076624818 +0100
++++ cups-2.4.1/templates/da/trailer.tmpl	2022-03-08 13:56:03.419892000 +0100
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">Ophavsret &copy; 2021-2022 OpenPrinting. Alle rettigheder forbeholdt.</div>
++    <div class="cups-footer">Ophavsret &copy; 2021-2022 OpenPrinting. Alle rettigheder forbeholdt.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/templates/de/header.tmpl.in.css-issues cups-2.4.1/templates/de/header.tmpl.in
+--- cups-2.4.1/templates/de/header.tmpl.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/templates/de/header.tmpl.in	2022-03-08 13:55:16.076624818 +0100
+@@ -27,7 +27,7 @@
+     <title>{title} - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body onload="check_cookies();">
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a href="/">Startseite</a></li>
+@@ -38,6 +38,6 @@
+ 	<li><a {SECTION=printers?class="active" :}href="/printers/">Drucker</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>{title}</h1>
+diff -up cups-2.4.1/templates/de/trailer.tmpl.css-issues cups-2.4.1/templates/de/trailer.tmpl
+--- cups-2.4.1/templates/de/trailer.tmpl.css-issues	2022-03-08 13:55:16.076624818 +0100
++++ cups-2.4.1/templates/de/trailer.tmpl	2022-03-08 13:56:14.892956747 +0100
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. Alle Rechte vorbehalten.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. Alle Rechte vorbehalten.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/templates/es/header.tmpl.in.css-issues cups-2.4.1/templates/es/header.tmpl.in
+--- cups-2.4.1/templates/es/header.tmpl.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/templates/es/header.tmpl.in	2022-03-08 13:55:16.076624818 +0100
+@@ -27,7 +27,7 @@
+     <title>{title} - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body onload="check_cookies();">
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a href="/">Inicio</a></li>
+@@ -38,6 +38,6 @@
+ 	<li><a {SECTION=printers?class="active" :}href="/printers/">Impresoras</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>{title}</h1>
+diff -up cups-2.4.1/templates/es/trailer.tmpl.css-issues cups-2.4.1/templates/es/trailer.tmpl
+--- cups-2.4.1/templates/es/trailer.tmpl.css-issues	2022-03-08 13:55:16.076624818 +0100
++++ cups-2.4.1/templates/es/trailer.tmpl	2022-03-08 13:56:29.420038731 +0100
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">Derechos de autor &copy; 2021-2022 OpenPrinting. Todos los derechos reservados.</div>
++    <div class="cups-footer">Derechos de autor &copy; 2021-2022 OpenPrinting. Todos los derechos reservados.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/templates/fr/header.tmpl.in.css-issues cups-2.4.1/templates/fr/header.tmpl.in
+--- cups-2.4.1/templates/fr/header.tmpl.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/templates/fr/header.tmpl.in	2022-03-08 13:55:16.076624818 +0100
+@@ -27,7 +27,7 @@
+     <title>{title} - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body onload="check_cookies();">
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a href="/">Home</a></li>
+@@ -38,6 +38,6 @@
+ 	<li><a {SECTION=printers?class="active" :}href="/printers/">Imprimantes</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>{title}</h1>
+diff -up cups-2.4.1/templates/fr/trailer.tmpl.css-issues cups-2.4.1/templates/fr/trailer.tmpl
+--- cups-2.4.1/templates/fr/trailer.tmpl.css-issues	2022-03-08 13:55:16.076624818 +0100
++++ cups-2.4.1/templates/fr/trailer.tmpl	2022-03-08 13:56:40.341100363 +0100
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. Tous droits r&eacute;serv&eacute;s.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. Tous droits r&eacute;serv&eacute;s.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/templates/header.tmpl.in.css-issues cups-2.4.1/templates/header.tmpl.in
+--- cups-2.4.1/templates/header.tmpl.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/templates/header.tmpl.in	2022-03-08 13:55:16.076624818 +0100
+@@ -27,7 +27,7 @@
+     <title>{title} - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body onload="check_cookies();">
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a href="/">Home</a></li>
+@@ -38,6 +38,6 @@
+ 	<li><a {SECTION=printers?class="active" :}href="/printers/">Printers</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>{title}</h1>
+diff -up cups-2.4.1/templates/ja/header.tmpl.in.css-issues cups-2.4.1/templates/ja/header.tmpl.in
+--- cups-2.4.1/templates/ja/header.tmpl.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/templates/ja/header.tmpl.in	2022-03-08 13:55:16.076624818 +0100
+@@ -19,7 +19,7 @@
+     <title>{title} - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body onload="check_cookies();">
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a href="/">ホーム</a></li>
+@@ -30,6 +30,6 @@
+ 	<li><a {SECTION=printers?class="active" :}href="/printers/">プリンター</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>{title}</h1>
+diff -up cups-2.4.1/templates/ja/trailer.tmpl.css-issues cups-2.4.1/templates/ja/trailer.tmpl
+--- cups-2.4.1/templates/ja/trailer.tmpl.css-issues	2022-03-08 13:55:16.077624823 +0100
++++ cups-2.4.1/templates/ja/trailer.tmpl	2022-03-08 13:56:55.101183659 +0100
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/templates/pt_BR/header.tmpl.in.css-issues cups-2.4.1/templates/pt_BR/header.tmpl.in
+--- cups-2.4.1/templates/pt_BR/header.tmpl.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/templates/pt_BR/header.tmpl.in	2022-03-08 13:55:16.077624823 +0100
+@@ -27,7 +27,7 @@
+     <title>{title} - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body onload="check_cookies();">
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a href="/">In&iacute;cio</a></li>
+@@ -38,6 +38,6 @@
+ 	<li><a {SECTION=printers?class="active" :}href="/printers/">Impressoras</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>{title}</h1>
+diff -up cups-2.4.1/templates/pt_BR/trailer.tmpl.css-issues cups-2.4.1/templates/pt_BR/trailer.tmpl
+--- cups-2.4.1/templates/pt_BR/trailer.tmpl.css-issues	2022-03-08 13:55:16.077624823 +0100
++++ cups-2.4.1/templates/pt_BR/trailer.tmpl	2022-03-08 13:57:11.349275354 +0100
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. Todos os direitos reservados.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. Todos os direitos reservados.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/templates/ru/header.tmpl.in.css-issues cups-2.4.1/templates/ru/header.tmpl.in
+--- cups-2.4.1/templates/ru/header.tmpl.in.css-issues	2022-01-27 12:11:42.000000000 +0100
++++ cups-2.4.1/templates/ru/header.tmpl.in	2022-03-08 13:55:16.077624823 +0100
+@@ -27,7 +27,7 @@
+     <title>{title} - CUPS @CUPS_VERSION@</title>
+   </head>
+   <body onload="check_cookies();">
+-    <div class="header">
++    <div class="cups-header">
+       <ul>
+ 	<li><a href="https://openprinting.github.io/cups/" target="_blank">OpenPrinting CUPS</a></li>
+ 	<li><a href="/">Начало</a></li>
+@@ -38,6 +38,6 @@
+ 	<li><a {SECTION=printers?class="active" :}href="/printers/">Принтеры</a></li>
+       </ul>
+     </div>
+-    <div class="body">
++    <div class="cups-body">
+       <div class="row">
+ 	<h1>{title}</h1>
+diff -up cups-2.4.1/templates/ru/trailer.tmpl.css-issues cups-2.4.1/templates/ru/trailer.tmpl
+--- cups-2.4.1/templates/ru/trailer.tmpl.css-issues	2022-03-08 13:55:16.077624823 +0100
++++ cups-2.4.1/templates/ru/trailer.tmpl	2022-03-08 13:57:25.262353870 +0100
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. Все права защищены.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. Все права защищены.</div>
+   </body>
+ </html>
+diff -up cups-2.4.1/templates/trailer.tmpl.css-issues cups-2.4.1/templates/trailer.tmpl
+--- cups-2.4.1/templates/trailer.tmpl.css-issues	2022-03-08 13:55:16.073624801 +0100
++++ cups-2.4.1/templates/trailer.tmpl	2022-03-08 13:55:16.077624823 +0100
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
++    <div class="cups-footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
+   </body>
+ </html>

diff --git a/net-print/cups/files/0001-Footer-message-corrected.patch b/net-print/cups/files/0001-Footer-message-corrected.patch
new file mode 100644
index 000000000000..b2a2074c70d1
--- /dev/null
+++ b/net-print/cups/files/0001-Footer-message-corrected.patch
@@ -0,0 +1,89 @@
+diff --git a/templates/da/trailer.tmpl b/templates/da/trailer.tmpl
+index aede375..d448d7e 100644
+--- a/templates/da/trailer.tmpl
++++ b/templates/da/trailer.tmpl
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">CUPS og CUPS-logoet er varemærker som tilhører <a href="http://www.apple.com">Apple Inc.</a> Ophavsret &copy; 2007-2019 Apple Inc. Alle rettigheder forbeholdt.</div>
++    <div class="footer">Ophavsret &copy; 2021-2022 OpenPrinting. Alle rettigheder forbeholdt.</div>
+   </body>
+ </html>
+diff --git a/templates/de/trailer.tmpl b/templates/de/trailer.tmpl
+index c1f5d38..cf3caca 100644
+--- a/templates/de/trailer.tmpl
++++ b/templates/de/trailer.tmpl
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">CUPS und das CUPS-Logo sind Warenzeichen der <a href="https://www.apple.com/">Apple Inc.</a> Copyright &copy; 2007-2019 Apple Inc. Alle Rechte vorbehalten.</div>
++    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. Alle Rechte vorbehalten.</div>
+   </body>
+ </html>
+diff --git a/templates/es/trailer.tmpl b/templates/es/trailer.tmpl
+index c1cb58f..9b9047e 100644
+--- a/templates/es/trailer.tmpl
++++ b/templates/es/trailer.tmpl
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">CUPS y el logo de CUPS son marcas registradas de <a href="http://www.apple.com">Apple Inc.</a> Derechos de autor &copy; 2007-2019 Apple Inc. Todos los derechos reservados.</div>
++    <div class="footer">Derechos de autor &copy; 2021-2022 OpenPrinting. Todos los derechos reservados.</div>
+   </body>
+ </html>
+diff --git a/templates/fr/trailer.tmpl b/templates/fr/trailer.tmpl
+index 6e9b8b1..9628176 100644
+--- a/templates/fr/trailer.tmpl
++++ b/templates/fr/trailer.tmpl
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">CUPS et le logo CUPS sont des marques d&eacute;pos&eacute;es de <a href="http://www.apple.com">Apple Inc.</a> CUPS est sous copyright 2007-2019 Apple Inc. Tous droits r&eacute;serv&eacute;s.</div>
++    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. Tous droits r&eacute;serv&eacute;s.</div>
+   </body>
+ </html>
+diff --git a/templates/ja/trailer.tmpl b/templates/ja/trailer.tmpl
+index a4f86b1..240c56b 100644
+--- a/templates/ja/trailer.tmpl
++++ b/templates/ja/trailer.tmpl
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright &copy; 2007-2019 Apple Inc. All rights reserved.</div>
++    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
+   </body>
+ </html>
+diff --git a/templates/pt_BR/trailer.tmpl b/templates/pt_BR/trailer.tmpl
+index 673a555..774bc1d 100644
+--- a/templates/pt_BR/trailer.tmpl
++++ b/templates/pt_BR/trailer.tmpl
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">CUPS e sua logo s&atilde;o marcas registradas da <a href="http://www.apple.com">Apple Inc.</a> Copyright &copy; 2007-2019 Apple Inc. Todos os direitos reservados.</div>
++    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. Todos os direitos reservados.</div>
+   </body>
+ </html>
+diff --git a/templates/ru/trailer.tmpl b/templates/ru/trailer.tmpl
+index 260d0e9..c6ec6e4 100644
+--- a/templates/ru/trailer.tmpl
++++ b/templates/ru/trailer.tmpl
+@@ -1,6 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">CUPS, а так же логотип CUPS являются зарегистрированными торговыми марками
+-<A HREF="http://www.apple.com">Apple Inc.</A> Авторские права на CUPS принадлежат (2007-2019) компании Apple Inc. Все права защищены.</div>
++    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. Все права защищены.</div>
+   </body>
+ </html>
+diff --git a/templates/trailer.tmpl b/templates/trailer.tmpl
+index a4f86b1..240c56b 100644
+--- a/templates/trailer.tmpl
++++ b/templates/trailer.tmpl
+@@ -1,5 +1,5 @@
+       </div>
+     </div>
+-    <div class="footer">CUPS and the CUPS logo are trademarks of <a href="http://www.apple.com">Apple Inc.</a> Copyright &copy; 2007-2019 Apple Inc. All rights reserved.</div>
++    <div class="footer">Copyright &copy; 2021-2022 OpenPrinting. All rights reserved.</div>
+   </body>
+ </html>

diff --git a/net-print/cups/files/0001-cups-fix-uninit-value-jump.patch b/net-print/cups/files/0001-cups-fix-uninit-value-jump.patch
new file mode 100644
index 000000000000..79e462e1547d
--- /dev/null
+++ b/net-print/cups/files/0001-cups-fix-uninit-value-jump.patch
@@ -0,0 +1,18 @@
+diff --git a/cups/ppd.c b/cups/ppd.c
+index 525df3592..54368ac4c 100644
+--- a/cups/ppd.c
++++ b/cups/ppd.c
+@@ -3430,12 +3430,12 @@ ppd_update_filters(ppd_file_t     *ppd,	/* I - PPD file */
+ 		srctype[256],
+ 		dstsuper[16],		/* Destination MIME media type */
+ 		dsttype[256],
+-		program[1024],		/* Command to run */
+ 		*ptr,			/* Pointer into command to run */
+ 		buffer[1024],		/* Re-written cupsFilter value */
+ 		**filter;		/* Current filter */
+   int		cost;			/* Cost of filter */
+ 
++  char		program[1024] = { 0 };	/* Command to run */
+ 
+   DEBUG_printf(("4ppd_update_filters(ppd=%p, cg=%p)", ppd, pg));
+ 

diff --git a/net-print/cups/files/0001-cups-tls-gnutls.c-Use-always-GNUTLS_SHUT_WR.patch b/net-print/cups/files/0001-cups-tls-gnutls.c-Use-always-GNUTLS_SHUT_WR.patch
new file mode 100644
index 000000000000..67e2edcfed67
--- /dev/null
+++ b/net-print/cups/files/0001-cups-tls-gnutls.c-Use-always-GNUTLS_SHUT_WR.patch
@@ -0,0 +1,55 @@
+From bdb1ca45454d90410031c4c2054005a995f76180 Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Wed, 6 Apr 2022 15:04:45 +0200
+Subject: [PATCH] cups/tls-gnutls.c: Use always GNUTLS_SHUT_WR
+
+The current mode for `gnutls_bye()` in client use cases strictly
+follows TLS v1.2 standard, which in this particular part says:
+
+```
+Unless some other fatal alert has been transmitted, each party is
+required to send a close_notify alert before closing the write
+side of the connection.  The other party MUST respond with a
+close_notify alert of its own and close down the connection immediately,
+discarding any pending writes.  It is not required for the initiator
+of the close to wait for the responding close_notify alert before
+closing the read side of the connection.
+```
+
+and waits for the other side of TLS connection to confirm the close.
+
+Unfortunately it can undesired for reasons:
+- we support switching of TLS versions in CUPS, and this mode strictly
+  follows TLS v1.2 - so for older version this behavior is not expected
+  and can cause delays
+- even some TLS v1.2 implementations (like Windows Server 2016) don't
+  comply TLS v1.2 behavior even if it says it does - in that case,
+  encrypted printing takes 30s till HTTP timeout is reached, because the
+  other side didn't send confirmation
+- AFAIU openssl's SSL_shutdown() doesn't make this TLS v1.2 difference,
+  so we could end up with two TLS implementations in CUPS which will
+  behave differently
+
+Since the standard defines that waiting for confirmation is not required
+and due the problems above, I would propose using GNUTLS_SHUT_WR mode
+regardless of HTTP mode.
+---
+ cups/tls-gnutls.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cups/tls-gnutls.c b/cups/tls-gnutls.c
+index c55995b2b..f87b4f4df 100644
+--- a/cups/tls-gnutls.c
++++ b/cups/tls-gnutls.c
+@@ -1667,7 +1667,7 @@ _httpTLSStop(http_t *http)		/* I - Connection to server */
+   int	error;				/* Error code */
+ 
+ 
+-  error = gnutls_bye(http->tls, http->mode == _HTTP_MODE_CLIENT ? GNUTLS_SHUT_RDWR : GNUTLS_SHUT_WR);
++  error = gnutls_bye(http->tls, GNUTLS_SHUT_WR);
+   if (error != GNUTLS_E_SUCCESS)
+     _cupsSetError(IPP_STATUS_ERROR_INTERNAL, gnutls_strerror(errno), 0);
+ 
+-- 
+2.35.1
+

diff --git a/net-print/cups/files/cups-2.4.1-nostrip.patch b/net-print/cups/files/cups-2.4.1-nostrip.patch
new file mode 100644
index 000000000000..5862ce178255
--- /dev/null
+++ b/net-print/cups/files/cups-2.4.1-nostrip.patch
@@ -0,0 +1,11 @@
+--- a/config-scripts/cups-compiler.m4	2022-01-27 12:11:42.000000000 +0100
++++ b/config-scripts/cups-compiler.m4	2022-05-01 11:24:58.855033882 +0200
+@@ -30,8 +30,6 @@
+ dnl For debugging, keep symbols, otherwise strip them...
+ AS_IF([test x$enable_debug = xyes -a "x$OPTIM" = x], [
+     OPTIM="-g"
+-], [
+-    INSTALL_STRIP="-s"
+ ])
+ 
+ dnl Debug printfs can slow things down, so provide a separate option for that

diff --git a/net-print/cups/files/cups-2.4.1-resolve-uri.patch b/net-print/cups/files/cups-2.4.1-resolve-uri.patch
new file mode 100644
index 000000000000..e138e20dec14
--- /dev/null
+++ b/net-print/cups/files/cups-2.4.1-resolve-uri.patch
@@ -0,0 +1,31 @@
+diff -up cups-2.4.1/scheduler/ipp.c.resolve-uri cups-2.4.1/scheduler/ipp.c
+--- cups-2.4.1/scheduler/ipp.c.resolve-uri	2022-03-04 08:13:13.712346134 +0100
++++ cups-2.4.1/scheduler/ipp.c	2022-03-04 08:17:17.486819820 +0100
+@@ -5271,6 +5271,7 @@ create_local_bg_thread(
+ 		userpass[256],		/* User:pass */
+ 		host[256],		/* Hostname */
+ 		resource[1024],		/* Resource path */
++		uri[1024],		/* Resolved URI, if needed */
+ 		line[1024];		/* Line from PPD */
+   int		port;			/* Port number */
+   http_encryption_t encryption;		/* Type of encryption to use */
+@@ -5292,6 +5293,19 @@ create_local_bg_thread(
+ 
+   cupsdLogMessage(CUPSD_LOG_DEBUG, "%s: Generating PPD file from \"%s\"...", printer->name, printer->device_uri);
+ 
++  if (strstr(printer->device_uri, "._tcp"))
++  {
++    cupsdLogMessage(CUPSD_LOG_DEBUG2, "%s: Resolving mDNS URI \"%s\".", printer->name, printer->device_uri);
++
++    if (!_httpResolveURI(printer->device_uri, uri, sizeof(uri), _HTTP_RESOLVE_DEFAULT, NULL, NULL))
++    {
++      cupsdLogMessage(CUPSD_LOG_ERROR, "%s: Couldn't resolve mDNS URI \"%s\".", printer->name, printer->device_uri);
++      return (NULL);
++    }
++
++    printer->device_uri = uri;
++  }
++
+   if (httpSeparateURI(HTTP_URI_CODING_ALL, printer->device_uri, scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_STATUS_OK)
+   {
+     cupsdLogMessage(CUPSD_LOG_ERROR, "%s: Bad device URI \"%s\".", printer->name, printer->device_uri);

diff --git a/net-print/cups/files/cups-2.4.1-user-AR.patch b/net-print/cups/files/cups-2.4.1-user-AR.patch
new file mode 100644
index 000000000000..edbecd6ed9fa
--- /dev/null
+++ b/net-print/cups/files/cups-2.4.1-user-AR.patch
@@ -0,0 +1,21 @@
+--- a/config-scripts/cups-common.m4
++++ b/config-scripts/cups-common.m4
+@@ -39,15 +39,15 @@
+ AC_PROG_CPP
+ AC_PROG_CXX
+ AC_PROG_RANLIB
+-AC_PATH_PROG([AR], [ar])
++AC_CHECK_TOOL([AR], [ar])
+ AC_PATH_PROG([CHMOD], [chmod])
+ AC_PATH_PROG([GZIPPROG], [gzip])
+ AC_MSG_CHECKING([for install-sh script])
+ INSTALL="`pwd`/install-sh"
+ AC_SUBST([INSTALL])
+ AC_MSG_RESULT([using $INSTALL])
+-AC_PATH_PROG([LD], [ld])
+-AC_PATH_PROG([LN], [ln])
++AC_CHECK_TOOL([LD], [ld])
++AC_CHECK_TOOL([LN], [ln])
+ AC_PATH_PROG([MKDIR], [mkdir])
+ AC_PATH_PROG([MV], [mv])
+ AC_PATH_PROG([RM], [rm])


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2022-05-28  4:26 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-05-28  4:26 UTC (permalink / raw
  To: gentoo-commits

commit:     66e451177a6d28cfa24a3fdcdeaac7e8196c19fc
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May 28 04:25:21 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 28 04:25:44 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=66e45117

net-print/cups: add 2.4.2

While at it, cleanup a bunch of obsolete seds and such. Checked upstream
changes to ensure they really are obsolete.

Bug: https://bugs.gentoo.org/847625
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-print/cups/Manifest                            |  1 +
 .../cups/{cups-9999.ebuild => cups-2.4.2.ebuild}   | 57 ++++++++++------------
 net-print/cups/cups-9999.ebuild                    | 57 ++++++++++------------
 .../files/cups-2.4.2-no-fortify-override.patch     | 18 +++++++
 4 files changed, 69 insertions(+), 64 deletions(-)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index 0dc21ac8d17e..70e6ff821ff8 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,2 +1,3 @@
 DIST cups-2.3.3op2-source.tar.gz 7993205 BLAKE2B 8c115b91ec185a4820578561aaf681238280b22b5c68b68c484ffbd0fa3c4ec1beb4d426e3f0e33192e32bce78aa8b7f50ed6799732a467fa9e75c34787057ee SHA512 db27dd6fb616bd7ad895b2bdf4ea7b010501358a50dc8f2e7e29558d1cfc088a572b1b35ac512654d3ed410c84df87dc34ca636533a4499117253915d4763117
 DIST cups-2.4.1-source.tar.gz 8113914 BLAKE2B 690d9d92f9bc84c2bb360699191cd67e1489ffc3ab219376dfc1a8795379950c95bf58c2033a0dbd2918262c5d104e21e31c4585cb35d229b0fac6cf4967bfd7 SHA512 74e83728fcc3baf709176442b26711250fd4d4ede1e81e35b02a5607711067e28cd5a05d5bc3337953f6b2236c5a429b13f3a7f1218a08a2d3c30a8c9b0d96fd
+DIST cups-2.4.2-source.tar.gz 8128785 BLAKE2B 97053feb502d4fdc28810b806000b6c84a6795d5adcec0789e73e5477d5802d46a99381366d16219f627166df088f6decde5c144bd0c38b5745815dc1e426bc5 SHA512 07474643bffe11c79b3226b70d28f1bb803dc19daa10711938cea303feacdcce3945ba8ff0334d94fdd5922ea7d6bf37a28c1ea62cce8ce946c2f90a0faf002f

diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-2.4.2.ebuild
similarity index 84%
copy from net-print/cups/cups-9999.ebuild
copy to net-print/cups/cups-2.4.2.ebuild
index bd33925c49a8..11e9e6c732a6 100644
--- a/net-print/cups/cups-9999.ebuild
+++ b/net-print/cups/cups-2.4.2.ebuild
@@ -2,6 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
+
 inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs
 
 MY_PV="${PV/_beta/b}"
@@ -11,13 +12,13 @@ MY_P="${PN}-${MY_PV}"
 
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
-#	EGIT_REPO_URI="https://github.com/apple/cups.git"
+	#EGIT_REPO_URI="https://github.com/apple/cups.git"
 	EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
 	[[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
 else
-#	SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
+	#SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
 	SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
-	if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then
+	if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
 		KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
 	fi
 fi
@@ -29,7 +30,7 @@ LICENSE="Apache-2.0"
 SLOT="0"
 IUSE="acl dbus debug kerberos pam selinux +ssl static-libs systemd usb X xinetd zeroconf"
 
-# upstream includes an interactive test which is a nono for gentoo
+# Upstream includes an interactive test which is a nono for Gentoo
 RESTRICT="test"
 
 BDEPEND="
@@ -67,6 +68,7 @@ PDEPEND=">=net-print/cups-filters-1.0.43"
 PATCHES=(
 	"${FILESDIR}/${PN}-2.4.1-nostrip.patch"
 	"${FILESDIR}/${PN}-2.4.1-user-AR.patch"
+	"${FILESDIR}/${PN}-2.4.2-no-fortify-override.patch"
 )
 
 MULTILIB_CHOST_TOOLS=(
@@ -82,7 +84,7 @@ pkg_setup() {
 			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; this should now work in most cases (bug 501122)
+			# Recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug #501122)
 			if use usb; then
 				if linux_chkconfig_present USB_PRINTER; then
 					elog "Your USB printers will be managed via libusb. In case you run into problems, "
@@ -91,7 +93,6 @@ pkg_setup() {
 					elog "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."
@@ -111,29 +112,21 @@ pkg_setup() {
 src_prepare() {
 	default
 
-	# Remove ".SILENT" rule for verbose output (bug 524338).
+	# Remove ".SILENT" rule for verbose output (bug #524338).
 	sed 's#^.SILENT:##g' -i Makedefs.in || die
 
-	# Fix install-sh, posix sh does not have 'function'.
-	sed 's#function gzipcp#gzipcp()#g' -i install-sh || die
-
-	# Do not add -Werror even for live ebuilds
-	sed '/WARNING_OPTIONS/s@-Werror@@' \
-		-i config-scripts/cups-compiler.m4 || die
-
-	AT_M4DIR=config-scripts eaclocal
-	eautoconf
+	AT_M4DIR="config-scripts" eautoreconf
 
-	# custom Makefiles
+	# Custom Makefiles
 	multilib_copy_sources
 }
 
 multilib_src_configure() {
 	export DSOFLAGS="${LDFLAGS}"
 
-	# explicitly specify compiler wrt bug 524340
+	# Explicitly specify compiler wrt bug #524340
 	#
-	# need to override KRB5CONFIG for proper flags
+	# Need to override KRB5CONFIG for proper flags
 	# https://github.com/apple/cups/issues/4423
 	local myeconfargs=(
 		CC="$(tc-getCC)"
@@ -173,7 +166,7 @@ multilib_src_configure() {
 	)
 
 	# Handle empty LINGUAS properly, bug #771162
-	if [ -n "${LINGUAS+x}" ] ; then
+	if [[ -n "${LINGUAS+x}" ]] ; then
 		myeconfargs+=(
 			--with-languages="${LINGUAS}"
 		)
@@ -185,7 +178,7 @@ multilib_src_configure() {
 		)
 	fi
 
-	# 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:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
 
@@ -195,7 +188,7 @@ multilib_src_configure() {
 	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
 
-	# additional path corrections needed for prefix, see bug 597728
+	# Additional path corrections needed for prefix, see bug #597728
 	sed \
 		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
 		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
@@ -228,14 +221,14 @@ multilib_src_install() {
 multilib_src_install_all() {
 	dodoc {CHANGES,CREDITS,README}.md
 
-	# move the default config file to docs
+	# Move the default config file to docs
 	dodoc "${ED}"/etc/cups/cupsd.conf.default
 	rm "${ED}"/etc/cups/cupsd.conf.default || die
 
-	# clean out cups init scripts
+	# Clean out cups init scripts
 	rm -r "${ED}"/etc/{init.d/cups,rc*} || die
 
-	# install our init script
+	# Install our init script
 	local neededservices=(
 		$(usex zeroconf avahi-daemon '')
 		$(usex dbus dbus '')
@@ -251,16 +244,16 @@ multilib_src_install_all() {
 	fi
 
 	if use xinetd ; then
-		# correct path
+		# 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
+		# 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
+		# Write permission for file owner (root), bug #296221
 		fperms u+w /etc/xinetd.d/cups-lpd
 	else
-		# always configure with --with-xinetd= and clean up later,
+		# Always configure with --with-xinetd= and clean up later,
 		# bug #525604
 		rm -r "${ED}"/etc/xinetd.d || die
 	fi
@@ -271,13 +264,13 @@ multilib_src_install_all() {
 		rm -r "${ED}"/usr/share/applications || die
 	fi
 
-	# create /etc/cups/client.conf, bug #196967 and #266678
+	# Create /etc/cups/client.conf, bug #196967 and bug #266678
 	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
 
-	# the following file is now provided by cups-filters:
+	# The following file is now provided by cups-filter:
 	rm -r "${ED}"/usr/share/cups/banners || die
 
-	# the following are created by the init script
+	# The following are created by the init script
 	rm -r "${ED}"/var/cache || die
 	rm -r "${ED}"/run || die
 

diff --git a/net-print/cups/cups-9999.ebuild b/net-print/cups/cups-9999.ebuild
index bd33925c49a8..11e9e6c732a6 100644
--- a/net-print/cups/cups-9999.ebuild
+++ b/net-print/cups/cups-9999.ebuild
@@ -2,6 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
+
 inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs
 
 MY_PV="${PV/_beta/b}"
@@ -11,13 +12,13 @@ MY_P="${PN}-${MY_PV}"
 
 if [[ ${PV} == *9999 ]]; then
 	inherit git-r3
-#	EGIT_REPO_URI="https://github.com/apple/cups.git"
+	#EGIT_REPO_URI="https://github.com/apple/cups.git"
 	EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
 	[[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
 else
-#	SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
+	#SRC_URI="https://github.com/apple/cups/releases/download/v${MY_PV}/${MY_P}-source.tar.gz"
 	SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
-	if [[ "${PV}" != *_beta* ]] && [[ "${PV}" != *_rc* ]] ; then
+	if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
 		KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
 	fi
 fi
@@ -29,7 +30,7 @@ LICENSE="Apache-2.0"
 SLOT="0"
 IUSE="acl dbus debug kerberos pam selinux +ssl static-libs systemd usb X xinetd zeroconf"
 
-# upstream includes an interactive test which is a nono for gentoo
+# Upstream includes an interactive test which is a nono for Gentoo
 RESTRICT="test"
 
 BDEPEND="
@@ -67,6 +68,7 @@ PDEPEND=">=net-print/cups-filters-1.0.43"
 PATCHES=(
 	"${FILESDIR}/${PN}-2.4.1-nostrip.patch"
 	"${FILESDIR}/${PN}-2.4.1-user-AR.patch"
+	"${FILESDIR}/${PN}-2.4.2-no-fortify-override.patch"
 )
 
 MULTILIB_CHOST_TOOLS=(
@@ -82,7 +84,7 @@ pkg_setup() {
 			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; this should now work in most cases (bug 501122)
+			# Recheck that we don't have usblp to collide with libusb; this should now work in most cases (bug #501122)
 			if use usb; then
 				if linux_chkconfig_present USB_PRINTER; then
 					elog "Your USB printers will be managed via libusb. In case you run into problems, "
@@ -91,7 +93,6 @@ pkg_setup() {
 					elog "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."
@@ -111,29 +112,21 @@ pkg_setup() {
 src_prepare() {
 	default
 
-	# Remove ".SILENT" rule for verbose output (bug 524338).
+	# Remove ".SILENT" rule for verbose output (bug #524338).
 	sed 's#^.SILENT:##g' -i Makedefs.in || die
 
-	# Fix install-sh, posix sh does not have 'function'.
-	sed 's#function gzipcp#gzipcp()#g' -i install-sh || die
-
-	# Do not add -Werror even for live ebuilds
-	sed '/WARNING_OPTIONS/s@-Werror@@' \
-		-i config-scripts/cups-compiler.m4 || die
-
-	AT_M4DIR=config-scripts eaclocal
-	eautoconf
+	AT_M4DIR="config-scripts" eautoreconf
 
-	# custom Makefiles
+	# Custom Makefiles
 	multilib_copy_sources
 }
 
 multilib_src_configure() {
 	export DSOFLAGS="${LDFLAGS}"
 
-	# explicitly specify compiler wrt bug 524340
+	# Explicitly specify compiler wrt bug #524340
 	#
-	# need to override KRB5CONFIG for proper flags
+	# Need to override KRB5CONFIG for proper flags
 	# https://github.com/apple/cups/issues/4423
 	local myeconfargs=(
 		CC="$(tc-getCC)"
@@ -173,7 +166,7 @@ multilib_src_configure() {
 	)
 
 	# Handle empty LINGUAS properly, bug #771162
-	if [ -n "${LINGUAS+x}" ] ; then
+	if [[ -n "${LINGUAS+x}" ]] ; then
 		myeconfargs+=(
 			--with-languages="${LINGUAS}"
 		)
@@ -185,7 +178,7 @@ multilib_src_configure() {
 		)
 	fi
 
-	# 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:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
 
@@ -195,7 +188,7 @@ multilib_src_configure() {
 	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
 
-	# additional path corrections needed for prefix, see bug 597728
+	# Additional path corrections needed for prefix, see bug #597728
 	sed \
 		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
 		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
@@ -228,14 +221,14 @@ multilib_src_install() {
 multilib_src_install_all() {
 	dodoc {CHANGES,CREDITS,README}.md
 
-	# move the default config file to docs
+	# Move the default config file to docs
 	dodoc "${ED}"/etc/cups/cupsd.conf.default
 	rm "${ED}"/etc/cups/cupsd.conf.default || die
 
-	# clean out cups init scripts
+	# Clean out cups init scripts
 	rm -r "${ED}"/etc/{init.d/cups,rc*} || die
 
-	# install our init script
+	# Install our init script
 	local neededservices=(
 		$(usex zeroconf avahi-daemon '')
 		$(usex dbus dbus '')
@@ -251,16 +244,16 @@ multilib_src_install_all() {
 	fi
 
 	if use xinetd ; then
-		# correct path
+		# 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
+		# 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
+		# Write permission for file owner (root), bug #296221
 		fperms u+w /etc/xinetd.d/cups-lpd
 	else
-		# always configure with --with-xinetd= and clean up later,
+		# Always configure with --with-xinetd= and clean up later,
 		# bug #525604
 		rm -r "${ED}"/etc/xinetd.d || die
 	fi
@@ -271,13 +264,13 @@ multilib_src_install_all() {
 		rm -r "${ED}"/usr/share/applications || die
 	fi
 
-	# create /etc/cups/client.conf, bug #196967 and #266678
+	# Create /etc/cups/client.conf, bug #196967 and bug #266678
 	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
 
-	# the following file is now provided by cups-filters:
+	# The following file is now provided by cups-filter:
 	rm -r "${ED}"/usr/share/cups/banners || die
 
-	# the following are created by the init script
+	# The following are created by the init script
 	rm -r "${ED}"/var/cache || die
 	rm -r "${ED}"/run || die
 

diff --git a/net-print/cups/files/cups-2.4.2-no-fortify-override.patch b/net-print/cups/files/cups-2.4.2-no-fortify-override.patch
new file mode 100644
index 000000000000..e9153ce2f082
--- /dev/null
+++ b/net-print/cups/files/cups-2.4.2-no-fortify-override.patch
@@ -0,0 +1,18 @@
+Gentoo already sets -D_FORTIFY_SOURCE=2 by default in GCC (patched in), so
+we need to avoid doing this in packages to avoid redefinition errors if
+we try to upgrade to e.g. =3.
+
+So, no effect on users, but important to stop issues w/ F_S=3.
+--- a/config-scripts/cups-compiler.m4
++++ b/config-scripts/cups-compiler.m4
+@@ -106,8 +106,8 @@ AS_IF([test -n "$GCC"], [
+     ], [
+ 	# Otherwise use the Fortify enhancements to catch any unbounded
+ 	# string operations...
+-	CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
+-	CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
++	CFLAGS="$CFLAGS"
++	CXXFLAGS="$CXXFLAGS"
+     ])
+ 
+     # Default optimization options...


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2022-09-06  5:23 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-09-06  5:23 UTC (permalink / raw
  To: gentoo-commits

commit:     b667ed65a318f25f39bfc40708c0b604936f10c8
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Sep  6 05:22:47 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Sep  6 05:23:02 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b667ed65

net-print/cups: backpot fix for OpenSSL w/ intermediate certs

Thanks to Chewi for pointing it out.

Bug: https://github.com/OpenPrinting/cups/issues/465
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-print/cups/cups-2.4.2-r3.ebuild                | 321 +++++++++++++++++++++
 .../cups-2.4.2-openssl-intermediate-certs.patch    |  20 ++
 2 files changed, 341 insertions(+)

diff --git a/net-print/cups/cups-2.4.2-r3.ebuild b/net-print/cups/cups-2.4.2-r3.ebuild
new file mode 100644
index 000000000000..82540f1cfc59
--- /dev/null
+++ b/net-print/cups/cups-2.4.2-r3.ebuild
@@ -0,0 +1,321 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs
+
+MY_PV="${PV/_beta/b}"
+MY_PV="${MY_PV/_rc/rc}"
+MY_PV="${MY_PV/_p/op}"
+MY_P="${PN}-${MY_PV}"
+
+if [[ ${PV} == *9999 ]] ; then
+	inherit git-r3
+	EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
+	[[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
+else
+	SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
+	if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
+		KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+	fi
+fi
+
+DESCRIPTION="The Common Unix Printing System"
+HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="acl dbus debug kerberos openssl pam selinux +ssl static-libs systemd test usb X xinetd zeroconf"
+
+# As of 2.4.2, they don't actually seem to be interactive (they pass some flags
+# by default to input for us), but they fail on some greyscale issue w/ poppler?
+RESTRICT="!test? ( test ) test"
+
+BDEPEND="
+	acct-group/lp
+	acct-group/lpadmin
+	virtual/pkgconfig
+"
+DEPEND="
+	app-text/libpaper
+	sys-libs/zlib
+	acl? (
+		kernel_linux? (
+			sys-apps/acl
+			sys-apps/attr
+		)
+	)
+	dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
+	kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
+	pam? ( sys-libs/pam )
+	!pam? ( virtual/libcrypt:= )
+	ssl? (
+		!openssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] )
+		openssl? ( dev-libs/openssl:=[${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[dbus,${MULTILIB_USEDEP}] )
+"
+RDEPEND="${DEPEND}
+	acct-group/lp
+	acct-group/lpadmin
+	selinux? ( sec-policy/selinux-cups )
+"
+PDEPEND=">=net-print/cups-filters-1.0.43"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.4.1-nostrip.patch
+	"${FILESDIR}"/${PN}-2.4.1-user-AR.patch
+	"${FILESDIR}"/${PN}-2.4.2-no-fortify-override.patch
+	"${FILESDIR}"/${P}-openssl-intermediate-certs.patch
+)
+
+MULTILIB_CHOST_TOOLS=(
+	/usr/bin/cups-config
+)
+
+S="${WORKDIR}/${MY_P}"
+
+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; this should now work in most cases (bug #501122)
+			if use usb; then
+				if linux_chkconfig_present USB_PRINTER; then
+					elog "Your USB printers will be managed via libusb. In case you run into problems, "
+					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
+					elog "usblp kernel module."
+					elog "Alternatively, just disable the usb useflag for cups (your printer will still work)."
+				fi
+			else
+				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() {
+	default
+
+	# Remove ".SILENT" rule for verbose output (bug #524338).
+	sed 's#^.SILENT:##g' -i Makedefs.in || die
+
+	AT_M4DIR="config-scripts" eautoreconf
+
+	# Custom Makefiles
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	export DSOFLAGS="${LDFLAGS}"
+
+	# Explicitly specify compiler wrt bug #524340
+	#
+	# Need to override KRB5CONFIG for proper flags
+	# https://github.com/apple/cups/issues/4423
+	local myeconfargs=(
+		CC="$(tc-getCC)"
+		CXX="$(tc-getCXX)"
+		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
+		--libdir="${EPREFIX}"/usr/$(get_libdir)
+		--localstatedir="${EPREFIX}"/var
+		# Follow Fedora permission setting
+		--with-cupsd-file-perm=0755
+		--with-exe-file-perm=755
+		--with-log-file-perm=0640
+		# Used by Debian, also prevents printers from getting
+		# disabled and users not knowing how to re-enable them
+		--with-error-policy=retry-job
+		# Used in Debian and Fedora
+		--enable-sync-on-close
+		#
+		--with-rundir="${EPREFIX}"/run/cups
+		--with-pkgconfpath="${EPREFIX}"/usr/$(get_libdir)/pkgconfig
+		--with-cups-user=lp
+		--with-cups-group=lp
+		--with-docdir="${EPREFIX}"/usr/share/cups/html
+		# See bug #863221 for adding root
+		--with-system-groups="root lpadmin"
+		--with-xinetd="${EPREFIX}"/etc/xinetd.d
+		$(multilib_native_use_enable acl)
+		$(use_enable dbus)
+		$(use_enable debug)
+		$(use_enable debug debug-guards)
+		$(use_enable debug debug-printfs)
+		$(use_enable kerberos gssapi)
+		$(multilib_native_use_enable pam)
+		$(use_enable static-libs static)
+		$(use_enable test unit-tests)
+		# USE="ssl" => gnutls
+		# USE="ssl openssl" => openssl
+		$(use_with ssl tls $(usex openssl openssl gnutls))
+		$(use_with systemd ondemand systemd)
+		$(multilib_native_use_enable usb libusb)
+		$(use_with zeroconf dnssd avahi)
+		$(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper)
+	)
+
+	# Handle empty LINGUAS properly, bug #771162
+	if [[ -n "${LINGUAS+x}" ]] ; then
+		myeconfargs+=(
+			--with-languages="${LINGUAS}"
+		)
+	fi
+
+	if tc-is-static-only; then
+		myeconfargs+=(
+			--disable-shared
+		)
+	fi
+
+	# Install in /usr/libexec always, instead of using /usr/lib/cups, as that
+	# makes more sense when facing multilib support.
+	sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
+
+	# Don't use the libtool build
+	# https://bugs.gentoo.org/843638
+	# https://github.com/OpenPrinting/cups/pull/394
+	unset LIBTOOL
+
+	econf "${myeconfargs[@]}"
+
+	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
+
+	# Additional path corrections needed for prefix, see bug #597728
+	sed \
+		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
+		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
+		-e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \
+		-e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \
+		-i Makedefs || die
+}
+
+multilib_src_compile() {
+	if multilib_is_native_abi; then
+		default
+	else
+		emake libs
+	fi
+}
+
+multilib_src_test() {
+	# Avoid using /tmp
+	export CUPS_TESTBASE="${T}"/cups-tests
+
+	mkdir "${T}"/cups-tests || die
+
+	# We only build some of CUPS for multilib, so can't run the tests.
+	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}.md
+
+	# Move the default config file to docs
+	dodoc "${ED}"/etc/cups/cupsd.conf.default
+	rm "${ED}"/etc/cups/cupsd.conf.default || die
+
+	# Clean out cups init scripts
+	rm -r "${ED}"/etc/{init.d/cups,rc*} || die
+
+	# Install our init script
+	local neededservices=(
+		$(usex zeroconf avahi-daemon '')
+		$(usex dbus dbus '')
+	)
+	[[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}"
+	cp "${FILESDIR}"/cupsd.init.d-r4 "${T}"/cupsd || die
+	sed -i -e "s/@neededservices@/${neededservices}/" "${T}"/cupsd || die
+	doinitd "${T}"/cupsd
+
+	if use pam ; then
+		rm "${ED}"/etc/pam.d/${PN} || die
+		pamd_mimic_system cups auth account
+	fi
+
+	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
+	else
+		# Always configure with --with-xinetd= and clean up later,
+		# bug #525604
+		rm -r "${ED}"/etc/xinetd.d || die
+	fi
+
+	keepdir /etc/cups/{interfaces,ppd,ssl}
+
+	if ! use X ; then
+		rm -r "${ED}"/usr/share/applications || die
+	fi
+
+	# Create /etc/cups/client.conf, bug #196967 and bug #266678
+	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
+
+	# The following file is now provided by cups-filter:
+	rm -r "${ED}"/usr/share/cups/banners || die
+
+	# The following are created by the init script
+	rm -r "${ED}"/var/cache || die
+	rm -r "${ED}"/run || die
+
+	keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp
+}
+
+pkg_postinst() {
+	xdg_pkg_postinst
+	local v
+
+	for v in ${REPLACING_VERSIONS}; do
+		if ! ver_test ${v} -ge 2.2.2-r2 ; then
+			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"
+			break
+		fi
+	done
+
+	for v in ${REPLACING_VERSIONS}; do
+		elog
+		elog "For information about installing a printer and general cups setup"
+		elog "take a look at: https://wiki.gentoo.org/wiki/Printing"
+		break
+	done
+
+	optfeature_header "CUPS may need installing the following for certain features to work:"
+	use zeroconf && optfeature "local hostname resolution using a hostname.local naming scheme" sys-auth/nss-mdns
+}

diff --git a/net-print/cups/files/cups-2.4.2-openssl-intermediate-certs.patch b/net-print/cups/files/cups-2.4.2-openssl-intermediate-certs.patch
new file mode 100644
index 000000000000..4ae1d7a9625c
--- /dev/null
+++ b/net-print/cups/files/cups-2.4.2-openssl-intermediate-certs.patch
@@ -0,0 +1,20 @@
+https://github.com/OpenPrinting/cups/issues/465
+https://github.com/OpenPrinting/cups/commit/cd84d7fde692237af4996d4a0e985a3eb4a293f0
+
+From: Michael R Sweet <michael.r.sweet@gmail.com>
+Date: Mon, 5 Sep 2022 09:20:03 -0400
+Subject: [PATCH] The OpenSSL code path wasn't loading the full certificate
+ chain (Issue #465)
+
+--- a/cups/tls-openssl.c
++++ b/cups/tls-openssl.c
+@@ -1055,7 +1055,7 @@ _httpTLSStart(http_t *http)		// I - Connection to server
+     }
+ 
+     SSL_CTX_use_PrivateKey_file(context, keyfile, SSL_FILETYPE_PEM);
+-    SSL_CTX_use_certificate_file(context, crtfile, SSL_FILETYPE_PEM);
++    SSL_CTX_use_certificate_chain_file(context, crtfile);
+   }
+ 
+   // Set TLS options...
+


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/
@ 2023-09-27  4:20 Sam James
  0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2023-09-27  4:20 UTC (permalink / raw
  To: gentoo-commits

commit:     eabfd29399b97d885388cea671349c85f19e5b35
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 27 04:19:23 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Sep 27 04:19:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eabfd293

net-print/cups: drop 2.4.2-r7, 2.4.4, 2.4.5

Bug: https://bugs.gentoo.org/907675
Bug: https://bugs.gentoo.org/909018
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-print/cups/Manifest                            |   3 -
 net-print/cups/cups-2.4.2-r7.ebuild                | 325 ---------------------
 net-print/cups/cups-2.4.4.ebuild                   | 315 --------------------
 net-print/cups/cups-2.4.5.ebuild                   | 315 --------------------
 .../files/cups-2.4.2-no-fortify-override.patch     |  18 --
 .../cups-2.4.2-openssl-intermediate-certs.patch    |  20 --
 .../cups/files/cups-2.4.2-scheduler-ipp.patch      |  36 ---
 net-print/cups/files/cups-resolve-local.patch      |  97 ------
 8 files changed, 1129 deletions(-)

diff --git a/net-print/cups/Manifest b/net-print/cups/Manifest
index 52c116f8ff79..ec197c098c16 100644
--- a/net-print/cups/Manifest
+++ b/net-print/cups/Manifest
@@ -1,5 +1,2 @@
-DIST cups-2.4.2-source.tar.gz 8128785 BLAKE2B 97053feb502d4fdc28810b806000b6c84a6795d5adcec0789e73e5477d5802d46a99381366d16219f627166df088f6decde5c144bd0c38b5745815dc1e426bc5 SHA512 07474643bffe11c79b3226b70d28f1bb803dc19daa10711938cea303feacdcce3945ba8ff0334d94fdd5922ea7d6bf37a28c1ea62cce8ce946c2f90a0faf002f
-DIST cups-2.4.4-source.tar.gz 8135056 BLAKE2B 888ebf4630c08a200248ef1472374a002712b4c817f2e16c04c30b3c2e5842bc38656a976b1dd24eb0eec0630cb84b97d48339dca034f2e19fc2a6fc6ec58c7f SHA512 861b7d8e92b5ff2c2f693464f417ce1c22da74508acbfb2cb6a889154d4673f4b3f4dd87c53f8539a01b603d66546ebc6c121b88d483746e2f180d587ff3c675
-DIST cups-2.4.5-source.tar.gz 8133310 BLAKE2B 03921be99081bd0e345100406d2f266581dd7db36e7a1fd45ebc0e9f72642f5d77b5d6a76c0845757b111e27afb9bcbe4dfa5ae785f3fe5e092c45d75700b637 SHA512 ffa37468f28c95bd10db45739d1d442c21f9575f5b36543284f0821bae5d78167228543d7714b1a37c5701d31953e97ebd35cfdc8ec915894bce688431291701
 DIST cups-2.4.6-source.tar.gz 8135135 BLAKE2B 4e61112ddaa46f20b1cfcb8f523dd07ba7d82604b9857754b288a2a9c5bc50ce242cfa119867347e4696818dc2eb505cf7fff1f9a0634e314edb2500395b83e4 SHA512 eb748680a748f599e4826c17054a24259d190e6c8e8339f6a7a37ee2a3f4c3fd1829e856b25a854cfdbee1b51279c70a0e847f6142225b8b68f1cd10c4ce4ce4
 DIST cups-2.4.7-source.tar.gz 8134809 BLAKE2B d81de62cff37c576ef8fb125b97568c2d86602cec6151d7030552fad421d7bc77a5df1e860d5ac5a241e739cc0d1fe5fcac44b8451ad2fc4dc675cf74fd41382 SHA512 914b574ff6d85de9f3471528b52d4a436c484c441f47651846e1bdfa00aec26774efd416ff466216d2bccf468f8a797b1e0d666b5c82abc87e77550ce8b00d39

diff --git a/net-print/cups/cups-2.4.2-r7.ebuild b/net-print/cups/cups-2.4.2-r7.ebuild
deleted file mode 100644
index 50a2154fb462..000000000000
--- a/net-print/cups/cups-2.4.2-r7.ebuild
+++ /dev/null
@@ -1,325 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs
-
-MY_PV="${PV/_beta/b}"
-MY_PV="${MY_PV/_rc/rc}"
-MY_PV="${MY_PV/_p/op}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == *9999 ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
-	[[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
-else
-	SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
-	if [[ ${PV} != *_beta* ]] && [[ ${PV} != *_rc* ]] ; then
-		KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-	fi
-fi
-
-DESCRIPTION="The Common Unix Printing System"
-HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="acl dbus debug kerberos openssl pam selinux +ssl static-libs systemd test usb X xinetd zeroconf"
-
-# As of 2.4.2, they don't actually seem to be interactive (they pass some flags
-# by default to input for us), but they fail on some greyscale issue w/ poppler?
-RESTRICT="!test? ( test ) test"
-
-BDEPEND="
-	acct-group/lp
-	acct-group/lpadmin
-	virtual/pkgconfig
-"
-DEPEND="
-	app-text/libpaper:=
-	sys-libs/zlib
-	acl? (
-		kernel_linux? (
-			sys-apps/acl
-			sys-apps/attr
-		)
-	)
-	dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
-	kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
-	pam? ( sys-libs/pam )
-	!pam? ( virtual/libcrypt:= )
-	ssl? (
-		!openssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] )
-		openssl? ( dev-libs/openssl:=[${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[dbus,${MULTILIB_USEDEP}] )
-"
-RDEPEND="${DEPEND}
-	acct-group/lp
-	acct-group/lpadmin
-	selinux? ( sec-policy/selinux-cups )
-"
-PDEPEND=">=net-print/cups-filters-1.0.43"
-
-PATCHES=(
-	"${FILESDIR}"/${PN}-2.4.1-nostrip.patch
-	"${FILESDIR}"/${PN}-2.4.1-user-AR.patch
-	"${FILESDIR}"/${PN}-2.4.2-no-fortify-override.patch
-	"${FILESDIR}"/${P}-openssl-intermediate-certs.patch
-
-	# From Fedora
-	"${FILESDIR}"/${PN}-2.4.2-scheduler-ipp.patch
-	"${FILESDIR}"/${PN}-resolve-local.patch
-)
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/cups-config
-)
-
-S="${WORKDIR}/${MY_P}"
-
-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; this should now work in most cases (bug #501122)
-			if use usb; then
-				if linux_chkconfig_present USB_PRINTER; then
-					elog "Your USB printers will be managed via libusb. In case you run into problems, "
-					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
-					elog "usblp kernel module."
-					elog "Alternatively, just disable the usb useflag for cups (your printer will still work)."
-				fi
-			else
-				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() {
-	default
-
-	# Remove ".SILENT" rule for verbose output (bug #524338).
-	sed 's#^.SILENT:##g' -i Makedefs.in || die
-
-	AT_M4DIR="config-scripts" eautoreconf
-
-	# Custom Makefiles
-	multilib_copy_sources
-}
-
-multilib_src_configure() {
-	export DSOFLAGS="${LDFLAGS}"
-
-	# Explicitly specify compiler wrt bug #524340
-	#
-	# Need to override KRB5CONFIG for proper flags
-	# https://github.com/apple/cups/issues/4423
-	local myeconfargs=(
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
-		--libdir="${EPREFIX}"/usr/$(get_libdir)
-		--localstatedir="${EPREFIX}"/var
-		# Follow Fedora permission setting
-		--with-cupsd-file-perm=0755
-		--with-exe-file-perm=755
-		--with-log-file-perm=0640
-		# Used by Debian, also prevents printers from getting
-		# disabled and users not knowing how to re-enable them
-		--with-error-policy=retry-job
-		# Used in Debian and Fedora
-		--enable-sync-on-close
-		#
-		--with-rundir="${EPREFIX}"/run/cups
-		--with-pkgconfpath="${EPREFIX}"/usr/$(get_libdir)/pkgconfig
-		--with-cups-user=lp
-		--with-cups-group=lp
-		--with-docdir="${EPREFIX}"/usr/share/cups/html
-		# See bug #863221 for adding root
-		--with-system-groups="root lpadmin"
-		--with-xinetd="${EPREFIX}"/etc/xinetd.d
-		$(multilib_native_use_enable acl)
-		$(use_enable dbus)
-		$(use_enable debug)
-		$(use_enable debug debug-guards)
-		$(use_enable debug debug-printfs)
-		$(use_enable kerberos gssapi)
-		$(multilib_native_use_enable pam)
-		$(use_enable static-libs static)
-		$(use_enable test unit-tests)
-		# USE="ssl" => gnutls
-		# USE="ssl openssl" => openssl
-		$(use_with ssl tls $(usex openssl openssl gnutls))
-		$(use_with systemd ondemand systemd)
-		$(multilib_native_use_enable usb libusb)
-		$(use_with zeroconf dnssd avahi)
-		$(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper)
-	)
-
-	# Handle empty LINGUAS properly, bug #771162
-	if [[ -n "${LINGUAS+x}" ]] ; then
-		myeconfargs+=(
-			--with-languages="${LINGUAS}"
-		)
-	fi
-
-	if tc-is-static-only; then
-		myeconfargs+=(
-			--disable-shared
-		)
-	fi
-
-	# Install in /usr/libexec always, instead of using /usr/lib/cups, as that
-	# makes more sense when facing multilib support.
-	sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
-
-	# Don't use the libtool build
-	# https://bugs.gentoo.org/843638
-	# https://github.com/OpenPrinting/cups/pull/394
-	unset LIBTOOL
-
-	econf "${myeconfargs[@]}"
-
-	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
-
-	# Additional path corrections needed for prefix, see bug #597728
-	sed \
-		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
-		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
-		-e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \
-		-e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \
-		-i Makedefs || die
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		default
-	else
-		emake libs
-	fi
-}
-
-multilib_src_test() {
-	# Avoid using /tmp
-	export CUPS_TESTBASE="${T}"/cups-tests
-
-	mkdir "${T}"/cups-tests || die
-
-	# We only build some of CUPS for multilib, so can't run the tests.
-	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}.md
-
-	# Move the default config file to docs
-	dodoc "${ED}"/etc/cups/cupsd.conf.default
-	rm "${ED}"/etc/cups/cupsd.conf.default || die
-
-	# Clean out cups init scripts
-	rm -r "${ED}"/etc/{init.d/cups,rc*} || die
-
-	# Install our init script
-	local neededservices=(
-		$(usex zeroconf avahi-daemon '')
-		$(usex dbus dbus '')
-	)
-	[[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}"
-	cp "${FILESDIR}"/cupsd.init.d-r4 "${T}"/cupsd || die
-	sed -i -e "s/@neededservices@/${neededservices}/" "${T}"/cupsd || die
-	doinitd "${T}"/cupsd
-
-	if use pam ; then
-		rm "${ED}"/etc/pam.d/${PN} || die
-		pamd_mimic_system cups auth account
-	fi
-
-	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
-	else
-		# Always configure with --with-xinetd= and clean up later,
-		# bug #525604
-		rm -r "${ED}"/etc/xinetd.d || die
-	fi
-
-	keepdir /etc/cups/{interfaces,ppd,ssl}
-
-	if ! use X ; then
-		rm -r "${ED}"/usr/share/applications || die
-	fi
-
-	# Create /etc/cups/client.conf, bug #196967 and bug #266678
-	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
-
-	# The following file is now provided by cups-filter:
-	rm -r "${ED}"/usr/share/cups/banners || die
-
-	# The following are created by the init script
-	rm -r "${ED}"/var/cache || die
-	rm -r "${ED}"/run || die
-
-	keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	local v
-
-	for v in ${REPLACING_VERSIONS}; do
-		if ! ver_test ${v} -ge 2.2.2-r2 ; then
-			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"
-			break
-		fi
-	done
-
-	for v in ${REPLACING_VERSIONS}; do
-		elog
-		elog "For information about installing a printer and general cups setup"
-		elog "take a look at: https://wiki.gentoo.org/wiki/Printing"
-		break
-	done
-
-	optfeature_header "CUPS may need installing the following for certain features to work:"
-	use zeroconf && optfeature "local hostname resolution using a hostname.local naming scheme" sys-auth/nss-mdns
-}

diff --git a/net-print/cups/cups-2.4.4.ebuild b/net-print/cups/cups-2.4.4.ebuild
deleted file mode 100644
index 5f2bed2a1d4b..000000000000
--- a/net-print/cups/cups-2.4.4.ebuild
+++ /dev/null
@@ -1,315 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs
-
-MY_PV="${PV/_beta/b}"
-MY_PV="${MY_PV/_rc/rc}"
-MY_PV="${MY_PV/_p/op}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == *9999 ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
-	[[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
-else
-	SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
-	if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then
-		KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-	fi
-fi
-
-S="${WORKDIR}/${MY_P}"
-
-DESCRIPTION="The Common Unix Printing System"
-HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="acl dbus debug kerberos openssl pam selinux +ssl static-libs systemd test usb X xinetd zeroconf"
-
-# As of 2.4.2, they don't actually seem to be interactive (they pass some flags
-# by default to input for us), but they fail on some greyscale issue w/ poppler?
-RESTRICT="!test? ( test ) test"
-
-BDEPEND="
-	acct-group/lp
-	acct-group/lpadmin
-	virtual/pkgconfig
-"
-DEPEND="
-	app-text/libpaper:=
-	sys-libs/zlib
-	acl? (
-		kernel_linux? (
-			sys-apps/acl
-			sys-apps/attr
-		)
-	)
-	dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
-	kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
-	pam? ( sys-libs/pam )
-	!pam? ( virtual/libcrypt:= )
-	ssl? (
-		!openssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] )
-		openssl? ( dev-libs/openssl:=[${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[dbus,${MULTILIB_USEDEP}] )
-"
-RDEPEND="
-	${DEPEND}
-	acct-group/lp
-	acct-group/lpadmin
-	selinux? ( sec-policy/selinux-cups )
-"
-PDEPEND=">=net-print/cups-filters-1.0.43"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.4.1-nostrip.patch"
-	"${FILESDIR}/${PN}-2.4.1-user-AR.patch"
-)
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/cups-config
-)
-
-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; this should now work in most cases (bug #501122)
-			if use usb; then
-				if linux_chkconfig_present USB_PRINTER; then
-					elog "Your USB printers will be managed via libusb. In case you run into problems, "
-					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
-					elog "usblp kernel module."
-					elog "Alternatively, just disable the usb useflag for cups (your printer will still work)."
-				fi
-			else
-				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() {
-	default
-
-	# Remove ".SILENT" rule for verbose output (bug #524338).
-	sed 's#^.SILENT:##g' -i Makedefs.in || die
-
-	AT_M4DIR="config-scripts" eautoreconf
-
-	# Custom Makefiles
-	multilib_copy_sources
-}
-
-multilib_src_configure() {
-	export DSOFLAGS="${LDFLAGS}"
-
-	# Explicitly specify compiler wrt bug #524340
-	#
-	# Need to override KRB5CONFIG for proper flags
-	# https://github.com/apple/cups/issues/4423
-	local myeconfargs=(
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
-		--libdir="${EPREFIX}"/usr/$(get_libdir)
-		--localstatedir="${EPREFIX}"/var
-		# Follow Fedora permission setting
-		--with-cupsd-file-perm=0755
-		--with-exe-file-perm=755
-		--with-log-file-perm=0640
-		# Used by Debian, also prevents printers from getting
-		# disabled and users not knowing how to re-enable them
-		--with-error-policy=retry-job
-		# Used in Debian and Fedora
-		--enable-sync-on-close
-		#
-		--with-rundir="${EPREFIX}"/run/cups
-		--with-pkgconfpath="${EPREFIX}"/usr/$(get_libdir)/pkgconfig
-		--with-cups-user=lp
-		--with-cups-group=lp
-		--with-docdir="${EPREFIX}"/usr/share/cups/html
-		# See bug #863221 for adding root
-		--with-system-groups="root lpadmin"
-		--with-xinetd="${EPREFIX}"/etc/xinetd.d
-		$(multilib_native_use_enable acl)
-		$(use_enable dbus)
-		$(use_enable debug)
-		$(use_enable debug debug-guards)
-		$(use_enable debug debug-printfs)
-		$(use_enable kerberos gssapi)
-		$(multilib_native_use_enable pam)
-		$(use_enable static-libs static)
-		$(use_enable test unit-tests)
-		# USE="ssl" => gnutls
-		# USE="ssl openssl" => openssl
-		$(use_with ssl tls $(usex openssl openssl gnutls))
-		$(use_with systemd ondemand systemd)
-		$(multilib_native_use_enable usb libusb)
-		$(use_with zeroconf dnssd avahi)
-		$(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper)
-	)
-
-	# Handle empty LINGUAS properly, bug #771162
-	if [[ -n "${LINGUAS+x}" ]] ; then
-		myeconfargs+=(
-			--with-languages="${LINGUAS}"
-		)
-	fi
-
-	if tc-is-static-only; then
-		myeconfargs+=(
-			--disable-shared
-		)
-	fi
-
-	# Install in /usr/libexec always, instead of using /usr/lib/cups, as that
-	# makes more sense when facing multilib support.
-	sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
-
-	econf "${myeconfargs[@]}"
-
-	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
-
-	# Additional path corrections needed for prefix, see bug #597728
-	sed \
-		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
-		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
-		-e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \
-		-e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \
-		-i Makedefs || die
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		default
-	else
-		emake libs
-	fi
-}
-
-multilib_src_test() {
-	# Avoid using /tmp
-	export CUPS_TESTBASE="${T}"/cups-tests
-
-	mkdir "${T}"/cups-tests || die
-
-	# We only build some of CUPS for multilib, so can't run the tests.
-	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}.md
-
-	# Move the default config file to docs
-	dodoc "${ED}"/etc/cups/cupsd.conf.default
-	rm "${ED}"/etc/cups/cupsd.conf.default || die
-
-	# Clean out cups init scripts
-	rm -r "${ED}"/etc/{init.d/cups,rc*} || die
-
-	# Install our init script
-	local neededservices=(
-		$(usex zeroconf avahi-daemon '')
-		$(usex dbus dbus '')
-	)
-	[[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}"
-	cp "${FILESDIR}"/cupsd.init.d-r4 "${T}"/cupsd || die
-	sed -i -e "s/@neededservices@/${neededservices}/" "${T}"/cupsd || die
-	doinitd "${T}"/cupsd
-
-	if use pam ; then
-		rm "${ED}"/etc/pam.d/${PN} || die
-		pamd_mimic_system cups auth account
-	fi
-
-	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
-	else
-		# Always configure with --with-xinetd= and clean up later,
-		# bug #525604
-		rm -r "${ED}"/etc/xinetd.d || die
-	fi
-
-	keepdir /etc/cups/{interfaces,ppd,ssl}
-
-	if ! use X ; then
-		rm -r "${ED}"/usr/share/applications || die
-	fi
-
-	# Create /etc/cups/client.conf, bug #196967 and bug #266678
-	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
-
-	# The following file is now provided by cups-filter:
-	rm -r "${ED}"/usr/share/cups/banners || die
-
-	# The following are created by the init script
-	rm -r "${ED}"/var/cache || die
-	rm -r "${ED}"/run || die
-
-	keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	local v
-
-	for v in ${REPLACING_VERSIONS}; do
-		if ! ver_test ${v} -ge 2.2.2-r2 ; then
-			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"
-			break
-		fi
-	done
-
-	for v in ${REPLACING_VERSIONS}; do
-		elog
-		elog "For information about installing a printer and general cups setup"
-		elog "take a look at: https://wiki.gentoo.org/wiki/Printing"
-		break
-	done
-
-	optfeature_header "CUPS may need installing the following for certain features to work:"
-	use zeroconf && optfeature "local hostname resolution using a hostname.local naming scheme" sys-auth/nss-mdns
-}

diff --git a/net-print/cups/cups-2.4.5.ebuild b/net-print/cups/cups-2.4.5.ebuild
deleted file mode 100644
index 5f2bed2a1d4b..000000000000
--- a/net-print/cups/cups-2.4.5.ebuild
+++ /dev/null
@@ -1,315 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools linux-info xdg multilib-minimal optfeature pam toolchain-funcs
-
-MY_PV="${PV/_beta/b}"
-MY_PV="${MY_PV/_rc/rc}"
-MY_PV="${MY_PV/_p/op}"
-MY_P="${PN}-${MY_PV}"
-
-if [[ ${PV} == *9999 ]] ; then
-	inherit git-r3
-	EGIT_REPO_URI="https://github.com/OpenPrinting/cups.git"
-	[[ ${PV} != 9999 ]] && EGIT_BRANCH=branch-${PV/.9999}
-else
-	SRC_URI="https://github.com/OpenPrinting/cups/releases/download/v${MY_PV}/cups-${MY_PV}-source.tar.gz"
-	if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then
-		KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv ~s390 sparc x86"
-	fi
-fi
-
-S="${WORKDIR}/${MY_P}"
-
-DESCRIPTION="The Common Unix Printing System"
-HOMEPAGE="https://www.cups.org/ https://github.com/OpenPrinting/cups"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-IUSE="acl dbus debug kerberos openssl pam selinux +ssl static-libs systemd test usb X xinetd zeroconf"
-
-# As of 2.4.2, they don't actually seem to be interactive (they pass some flags
-# by default to input for us), but they fail on some greyscale issue w/ poppler?
-RESTRICT="!test? ( test ) test"
-
-BDEPEND="
-	acct-group/lp
-	acct-group/lpadmin
-	virtual/pkgconfig
-"
-DEPEND="
-	app-text/libpaper:=
-	sys-libs/zlib
-	acl? (
-		kernel_linux? (
-			sys-apps/acl
-			sys-apps/attr
-		)
-	)
-	dbus? ( >=sys-apps/dbus-1.6.18-r1[${MULTILIB_USEDEP}] )
-	kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] )
-	pam? ( sys-libs/pam )
-	!pam? ( virtual/libcrypt:= )
-	ssl? (
-		!openssl? ( >=net-libs/gnutls-2.12.23-r6:0=[${MULTILIB_USEDEP}] )
-		openssl? ( dev-libs/openssl:=[${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[dbus,${MULTILIB_USEDEP}] )
-"
-RDEPEND="
-	${DEPEND}
-	acct-group/lp
-	acct-group/lpadmin
-	selinux? ( sec-policy/selinux-cups )
-"
-PDEPEND=">=net-print/cups-filters-1.0.43"
-
-PATCHES=(
-	"${FILESDIR}/${PN}-2.4.1-nostrip.patch"
-	"${FILESDIR}/${PN}-2.4.1-user-AR.patch"
-)
-
-MULTILIB_CHOST_TOOLS=(
-	/usr/bin/cups-config
-)
-
-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; this should now work in most cases (bug #501122)
-			if use usb; then
-				if linux_chkconfig_present USB_PRINTER; then
-					elog "Your USB printers will be managed via libusb. In case you run into problems, "
-					elog "please try disabling USB_PRINTER support in your kernel or blacklisting the"
-					elog "usblp kernel module."
-					elog "Alternatively, just disable the usb useflag for cups (your printer will still work)."
-				fi
-			else
-				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() {
-	default
-
-	# Remove ".SILENT" rule for verbose output (bug #524338).
-	sed 's#^.SILENT:##g' -i Makedefs.in || die
-
-	AT_M4DIR="config-scripts" eautoreconf
-
-	# Custom Makefiles
-	multilib_copy_sources
-}
-
-multilib_src_configure() {
-	export DSOFLAGS="${LDFLAGS}"
-
-	# Explicitly specify compiler wrt bug #524340
-	#
-	# Need to override KRB5CONFIG for proper flags
-	# https://github.com/apple/cups/issues/4423
-	local myeconfargs=(
-		CC="$(tc-getCC)"
-		CXX="$(tc-getCXX)"
-		KRB5CONFIG="${EPREFIX}"/usr/bin/${CHOST}-krb5-config
-		--libdir="${EPREFIX}"/usr/$(get_libdir)
-		--localstatedir="${EPREFIX}"/var
-		# Follow Fedora permission setting
-		--with-cupsd-file-perm=0755
-		--with-exe-file-perm=755
-		--with-log-file-perm=0640
-		# Used by Debian, also prevents printers from getting
-		# disabled and users not knowing how to re-enable them
-		--with-error-policy=retry-job
-		# Used in Debian and Fedora
-		--enable-sync-on-close
-		#
-		--with-rundir="${EPREFIX}"/run/cups
-		--with-pkgconfpath="${EPREFIX}"/usr/$(get_libdir)/pkgconfig
-		--with-cups-user=lp
-		--with-cups-group=lp
-		--with-docdir="${EPREFIX}"/usr/share/cups/html
-		# See bug #863221 for adding root
-		--with-system-groups="root lpadmin"
-		--with-xinetd="${EPREFIX}"/etc/xinetd.d
-		$(multilib_native_use_enable acl)
-		$(use_enable dbus)
-		$(use_enable debug)
-		$(use_enable debug debug-guards)
-		$(use_enable debug debug-printfs)
-		$(use_enable kerberos gssapi)
-		$(multilib_native_use_enable pam)
-		$(use_enable static-libs static)
-		$(use_enable test unit-tests)
-		# USE="ssl" => gnutls
-		# USE="ssl openssl" => openssl
-		$(use_with ssl tls $(usex openssl openssl gnutls))
-		$(use_with systemd ondemand systemd)
-		$(multilib_native_use_enable usb libusb)
-		$(use_with zeroconf dnssd avahi)
-		$(multilib_is_native_abi && echo --enable-libpaper || echo --disable-libpaper)
-	)
-
-	# Handle empty LINGUAS properly, bug #771162
-	if [[ -n "${LINGUAS+x}" ]] ; then
-		myeconfargs+=(
-			--with-languages="${LINGUAS}"
-		)
-	fi
-
-	if tc-is-static-only; then
-		myeconfargs+=(
-			--disable-shared
-		)
-	fi
-
-	# Install in /usr/libexec always, instead of using /usr/lib/cups, as that
-	# makes more sense when facing multilib support.
-	sed -i -e 's:CUPS_SERVERBIN="$exec_prefix/lib/cups":CUPS_SERVERBIN="$exec_prefix/libexec/cups":g' configure ||die
-
-	econf "${myeconfargs[@]}"
-
-	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
-
-	# Additional path corrections needed for prefix, see bug #597728
-	sed \
-		-e "s:ICONDIR.*:ICONDIR = ${EPREFIX}/usr/share/icons:" \
-		-e "s:INITDIR.*:INITDIR = ${EPREFIX}/etc:" \
-		-e "s:DBUSDIR.*:DBUSDIR = ${EPREFIX}/etc/dbus-1:" \
-		-e "s:MENUDIR.*:MENUDIR = ${EPREFIX}/usr/share/applications:" \
-		-i Makedefs || die
-}
-
-multilib_src_compile() {
-	if multilib_is_native_abi; then
-		default
-	else
-		emake libs
-	fi
-}
-
-multilib_src_test() {
-	# Avoid using /tmp
-	export CUPS_TESTBASE="${T}"/cups-tests
-
-	mkdir "${T}"/cups-tests || die
-
-	# We only build some of CUPS for multilib, so can't run the tests.
-	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}.md
-
-	# Move the default config file to docs
-	dodoc "${ED}"/etc/cups/cupsd.conf.default
-	rm "${ED}"/etc/cups/cupsd.conf.default || die
-
-	# Clean out cups init scripts
-	rm -r "${ED}"/etc/{init.d/cups,rc*} || die
-
-	# Install our init script
-	local neededservices=(
-		$(usex zeroconf avahi-daemon '')
-		$(usex dbus dbus '')
-	)
-	[[ -n ${neededservices[@]} ]] && neededservices="need ${neededservices[@]}"
-	cp "${FILESDIR}"/cupsd.init.d-r4 "${T}"/cupsd || die
-	sed -i -e "s/@neededservices@/${neededservices}/" "${T}"/cupsd || die
-	doinitd "${T}"/cupsd
-
-	if use pam ; then
-		rm "${ED}"/etc/pam.d/${PN} || die
-		pamd_mimic_system cups auth account
-	fi
-
-	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
-	else
-		# Always configure with --with-xinetd= and clean up later,
-		# bug #525604
-		rm -r "${ED}"/etc/xinetd.d || die
-	fi
-
-	keepdir /etc/cups/{interfaces,ppd,ssl}
-
-	if ! use X ; then
-		rm -r "${ED}"/usr/share/applications || die
-	fi
-
-	# Create /etc/cups/client.conf, bug #196967 and bug #266678
-	echo "ServerName ${EPREFIX}/run/cups/cups.sock" >> "${ED}"/etc/cups/client.conf
-
-	# The following file is now provided by cups-filter:
-	rm -r "${ED}"/usr/share/cups/banners || die
-
-	# The following are created by the init script
-	rm -r "${ED}"/var/cache || die
-	rm -r "${ED}"/run || die
-
-	keepdir /usr/libexec/cups/driver /usr/share/cups/{model,profiles} /var/log/cups /var/spool/cups/tmp
-}
-
-pkg_postinst() {
-	xdg_pkg_postinst
-	local v
-
-	for v in ${REPLACING_VERSIONS}; do
-		if ! ver_test ${v} -ge 2.2.2-r2 ; then
-			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"
-			break
-		fi
-	done
-
-	for v in ${REPLACING_VERSIONS}; do
-		elog
-		elog "For information about installing a printer and general cups setup"
-		elog "take a look at: https://wiki.gentoo.org/wiki/Printing"
-		break
-	done
-
-	optfeature_header "CUPS may need installing the following for certain features to work:"
-	use zeroconf && optfeature "local hostname resolution using a hostname.local naming scheme" sys-auth/nss-mdns
-}

diff --git a/net-print/cups/files/cups-2.4.2-no-fortify-override.patch b/net-print/cups/files/cups-2.4.2-no-fortify-override.patch
deleted file mode 100644
index e9153ce2f082..000000000000
--- a/net-print/cups/files/cups-2.4.2-no-fortify-override.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Gentoo already sets -D_FORTIFY_SOURCE=2 by default in GCC (patched in), so
-we need to avoid doing this in packages to avoid redefinition errors if
-we try to upgrade to e.g. =3.
-
-So, no effect on users, but important to stop issues w/ F_S=3.
---- a/config-scripts/cups-compiler.m4
-+++ b/config-scripts/cups-compiler.m4
-@@ -106,8 +106,8 @@ AS_IF([test -n "$GCC"], [
-     ], [
- 	# Otherwise use the Fortify enhancements to catch any unbounded
- 	# string operations...
--	CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
--	CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2"
-+	CFLAGS="$CFLAGS"
-+	CXXFLAGS="$CXXFLAGS"
-     ])
- 
-     # Default optimization options...

diff --git a/net-print/cups/files/cups-2.4.2-openssl-intermediate-certs.patch b/net-print/cups/files/cups-2.4.2-openssl-intermediate-certs.patch
deleted file mode 100644
index 4ae1d7a9625c..000000000000
--- a/net-print/cups/files/cups-2.4.2-openssl-intermediate-certs.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-https://github.com/OpenPrinting/cups/issues/465
-https://github.com/OpenPrinting/cups/commit/cd84d7fde692237af4996d4a0e985a3eb4a293f0
-
-From: Michael R Sweet <michael.r.sweet@gmail.com>
-Date: Mon, 5 Sep 2022 09:20:03 -0400
-Subject: [PATCH] The OpenSSL code path wasn't loading the full certificate
- chain (Issue #465)
-
---- a/cups/tls-openssl.c
-+++ b/cups/tls-openssl.c
-@@ -1055,7 +1055,7 @@ _httpTLSStart(http_t *http)		// I - Connection to server
-     }
- 
-     SSL_CTX_use_PrivateKey_file(context, keyfile, SSL_FILETYPE_PEM);
--    SSL_CTX_use_certificate_file(context, crtfile, SSL_FILETYPE_PEM);
-+    SSL_CTX_use_certificate_chain_file(context, crtfile);
-   }
- 
-   // Set TLS options...
-

diff --git a/net-print/cups/files/cups-2.4.2-scheduler-ipp.patch b/net-print/cups/files/cups-2.4.2-scheduler-ipp.patch
deleted file mode 100644
index 54147c60de96..000000000000
--- a/net-print/cups/files/cups-2.4.2-scheduler-ipp.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 020609ad9eb84ab5a4c602ff604b2f208a6cdb8d Mon Sep 17 00:00:00 2001
-From: Zdenek Dohnal <zdohnal@redhat.com>
-Date: Wed, 22 Jun 2022 09:23:45 +0200
-Subject: [PATCH] scheduler/ipp.c: Allocate device_uri via cupsdSetString()
-
-If a driverless printer has .local in its URI, we resolve the
-URI and save the resolved one as new device URI. The problem was that
-a local pointer was assigned to the structure which is passed to the
-function as parameter, so the pointer became invalid once the execution
-left the create_local_bg_thread() function.
-
-We need to allocate the device URI via cupsdSetString() - the string is
-then freed when the printer is deleted or cupsd shuts down.
-
-Fixes #419.
----
- CHANGES.md      | 1 +
- scheduler/ipp.c | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/scheduler/ipp.c b/scheduler/ipp.c
-index 3a849bdb5..b722712f6 100644
---- a/scheduler/ipp.c
-+++ b/scheduler/ipp.c
-@@ -5307,7 +5307,7 @@ create_local_bg_thread(
-       return (NULL);
-     }
- 
--    printer->device_uri = uri;
-+    cupsdSetString(&printer->device_uri, uri);
-   }
- 
-   if (httpSeparateURI(HTTP_URI_CODING_ALL, printer->device_uri, scheme, sizeof(scheme), userpass, sizeof(userpass), host, sizeof(host), &port, resource, sizeof(resource)) < HTTP_URI_STATUS_OK)
--- 
-2.37.1
-

diff --git a/net-print/cups/files/cups-resolve-local.patch b/net-print/cups/files/cups-resolve-local.patch
deleted file mode 100644
index bc6c96a98211..000000000000
--- a/net-print/cups/files/cups-resolve-local.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-diff --git a/scheduler/ipp.c b/scheduler/ipp.c
-index 9984b79..dd85173 100644
---- a/scheduler/ipp.c
-+++ b/scheduler/ipp.c
-@@ -5898,6 +5898,11 @@ create_local_printer(
- 		*nameptr,		/* Pointer into name */
- 		uri[1024];		/* printer-uri-supported value */
-   const char	*ptr;			/* Pointer into attribute value */
-+  char		scheme[HTTP_MAX_URI],	/* Scheme portion of URI */
-+		userpass[HTTP_MAX_URI],	/* Username portion of URI */
-+		host[HTTP_MAX_URI],	/* Host portion of URI */
-+		resource[HTTP_MAX_URI];	/* Resource portion of URI */
-+  int		port;			/* Port portion of URI */
- 
- 
-  /*
-@@ -5961,6 +5966,13 @@ create_local_printer(
- 
-     return;
-   }
-+  ptr = ippGetString(device_uri, 0, NULL);
-+  if (!ptr || !ptr[0])
-+  {
-+    send_ipp_status(con, IPP_STATUS_ERROR_BAD_REQUEST, _("Attribute \"%s\" has empty value."), "device-uri");
-+
-+    return;
-+  }
- 
-   printer_geo_location = ippFindAttribute(con->request, "printer-geo-location", IPP_TAG_URI);
-   printer_info         = ippFindAttribute(con->request, "printer-info", IPP_TAG_TEXT);
-@@ -5989,7 +6001,65 @@ create_local_printer(
-   printer->shared    = 0;
-   printer->temporary = 1;
- 
--  cupsdSetDeviceURI(printer, ippGetString(device_uri, 0, NULL));
-+ /*
-+  * Check device URI if it has the same hostname as we have, if so, replace
-+  * the hostname by localhost. This way we assure that local-only services
-+  * like ipp-usb or Printer Applications always work.
-+  *
-+  * When comparing our hostname with the one in the device URI,
-+  * consider names with or without trailing dot ('.') the same. Also
-+  * compare case-insensitively.
-+  */
-+
-+#ifdef HAVE_DNSSD
-+  if (DNSSDHostName)
-+    nameptr = DNSSDHostName;
-+  else
-+#endif
-+  if (ServerName)
-+    nameptr = ServerName;
-+  else
-+    nameptr = NULL;
-+
-+  if (nameptr)
-+  {
-+    int host_len,
-+        server_name_len;
-+
-+    /* Get host name of device URI */
-+    httpSeparateURI(HTTP_URI_CODING_ALL, ptr,
-+		    scheme, sizeof(scheme), userpass, sizeof(userpass), host,
-+		    sizeof(host), &port, resource, sizeof(resource));
-+
-+    /* Take trailing dot out of comparison */
-+    host_len = strlen(host);
-+    if (host_len > 1 && host[host_len - 1] == '.')
-+      host_len --;
-+
-+    server_name_len = strlen(nameptr);
-+    if (server_name_len > 1 && nameptr[server_name_len - 1] == '.')
-+      server_name_len --;
-+
-+   /*
-+    * If we have no DNSSDHostName but only a ServerName (if we are not
-+    * sharing printers, Browsing = Off) the ServerName has no ".local"
-+    * but the requested device URI has. Take this into account.
-+    */
-+
-+    if (nameptr == ServerName && host_len >= 6 && (server_name_len < 6 || strcmp(nameptr + server_name_len - 6, ".local") != 0) && strcmp(host + host_len - 6, ".local") == 0)
-+      host_len -= 6;
-+
-+    if (host_len == server_name_len && strncasecmp(host, nameptr, host_len) == 0)
-+      ptr = "localhost";
-+    else
-+      ptr = host;
-+
-+    httpAssembleURI(HTTP_URI_CODING_ALL, uri, sizeof(uri), scheme, userpass,
-+		    ptr, port, resource);
-+    cupsdSetDeviceURI(printer, uri);
-+  }
-+  else
-+    cupsdSetDeviceURI(printer, ptr);
- 
-   if (printer_geo_location)
-     cupsdSetString(&printer->geo_location, ippGetString(printer_geo_location, 0, NULL));


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-09-27  4:21 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-03  7:56 [gentoo-commits] repo/gentoo:master commit in: net-print/cups/files/, net-print/cups/ Lars Wendler
  -- strict thread matches above, loose matches on Subject: below --
2023-09-27  4:20 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-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
2017-02-15  0:42 Andreas Hüttel
2016-12-29 18:52 Lars Wendler
2016-06-15  7:37 Lars Wendler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox