All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/7] Cups revamp
@ 2020-06-24 20:43 Angelo Compagnucci
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 1/7] package/cups-filters: fix cups-browsed service Angelo Compagnucci
                   ` (7 more replies)
  0 siblings, 8 replies; 20+ messages in thread
From: Angelo Compagnucci @ 2020-06-24 20:43 UTC (permalink / raw)
  To: buildroot

s series fixes various nitpicks we found using cups and do some
bumps.

Changelog:
v1->v2:
* Adding missing patch "Add lp user as default cups user" 
v1->v2:
* Fixes to Signed-of
* Decoupling service file fixing from bumps
* Better explaining backported patches

Angelo Compagnucci (7):
  package/cups-filters: fix cups-browsed service
  package/cups-filters: bump to version 1.27.5
  package/cups: fix cups service
  package/cups: bump to version 2.3.3
  package/cups: Add lp user as default cups user
  package/cups: Add udev rules to assign usb printers group to lp
  package/cups: adding python support

 package/cups-filters/S82cups-browsed          | 48 +++++++++++++++++++
 package/cups-filters/cups-filters.hash        |  2 +-
 package/cups-filters/cups-filters.mk          | 15 +++++-
 ...move-man-from-BUILDDIRS-in-configure.patch |  8 ++--
 package/cups/0002-Do-not-use-genstrings.patch | 14 +++---
 ...0004-Remove-PIE-flags-from-the-build.patch |  8 ++--
 package/cups/70-usb-printers.rules            |  3 ++
 package/cups/S81cupsd                         | 48 +++++++++++++++++++
 package/cups/cups.hash                        |  2 +-
 package/cups/cups.mk                          | 37 +++++++++++++-
 10 files changed, 167 insertions(+), 18 deletions(-)
 create mode 100644 package/cups-filters/S82cups-browsed
 create mode 100644 package/cups/70-usb-printers.rules
 create mode 100644 package/cups/S81cupsd

-- 
2.25.1

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

* [Buildroot] [PATCH v3 1/7] package/cups-filters: fix cups-browsed service
  2020-06-24 20:43 [Buildroot] [PATCH v3 0/7] Cups revamp Angelo Compagnucci
@ 2020-06-24 20:43 ` Angelo Compagnucci
  2020-06-29 21:10   ` Thomas Petazzoni
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 2/7] package/cups-filters: bump to version 1.27.5 Angelo Compagnucci
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Angelo Compagnucci @ 2020-06-24 20:43 UTC (permalink / raw)
  To: buildroot

cups-browsed service is compiled and installed by the package,
but the corresponding services file were not installed for
systemv and systemd.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 package/cups-filters/S82cups-browsed | 48 ++++++++++++++++++++++++++++
 package/cups-filters/cups-filters.mk | 13 +++++++-
 2 files changed, 60 insertions(+), 1 deletion(-)
 create mode 100644 package/cups-filters/S82cups-browsed

diff --git a/package/cups-filters/S82cups-browsed b/package/cups-filters/S82cups-browsed
new file mode 100644
index 0000000000..08909c7f98
--- /dev/null
+++ b/package/cups-filters/S82cups-browsed
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+DAEMON="cups-browsed"
+PIDFILE="/var/run/$DAEMON.pid"
+
+start() {
+	printf 'Starting %s: ' "$DAEMON"
+	# shellcheck disable=SC2086 # we need the word splitting
+	start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \
+		-- -c /etc/cups/cups-browsed.conf
+	status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+stop() {
+	printf 'Stopping %s: ' "$DAEMON"
+	start-stop-daemon -K -q -p "$PIDFILE"
+	status=$?
+	if [ "$status" -eq 0 ]; then
+		rm -f "$PIDFILE"
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+restart() {
+	stop
+	sleep 1
+	start
+}
+
+case "$1" in
+	start|stop|restart)
+		"$1";;
+	reload)
+		# Restart, since there is no true "reload" feature.
+		restart;;
+	*)
+		echo "Usage: $0 {start|stop|restart|reload}"
+		exit 1
+esac
diff --git a/package/cups-filters/cups-filters.mk b/package/cups-filters/cups-filters.mk
index 1f17018bc5..0a2622b87b 100644
--- a/package/cups-filters/cups-filters.mk
+++ b/package/cups-filters/cups-filters.mk
@@ -19,7 +19,8 @@ CUPS_FILTERS_CONF_OPTS = \
 	--with-cups-config=$(STAGING_DIR)/usr/bin/cups-config \
 	--with-sysroot=$(STAGING_DIR) \
 	--with-pdftops=pdftops \
-	--with-jpeg
+	--with-jpeg \
+	--with-rcdir=no
 
 ifeq ($(BR2_PACKAGE_LIBPNG),y)
 CUPS_FILTERS_CONF_OPTS += --with-png
@@ -71,4 +72,14 @@ else
 CUPS_FILTERS_CONF_OPTS += --disable-poppler
 endif
 
+define CUPS_FILTERS_INSTALL_INIT_SYSV
+	$(INSTALL) -D -m 0755 package/cups-filters/S82cups-browsed \
+		$(TARGET_DIR)/etc/init.d/S82cups-browsed
+endef
+
+define CUPS_FILTERS_INSTALL_INIT_SYSTEMD
+	$(INSTALL) -D -m 0755 $(@D)/utils/cups-browsed.service \
+		$(TARGET_DIR)/usr/lib/systemd/system/cups-browsed.service
+endef
+
 $(eval $(autotools-package))
-- 
2.25.1

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

* [Buildroot] [PATCH v3 2/7] package/cups-filters: bump to version 1.27.5
  2020-06-24 20:43 [Buildroot] [PATCH v3 0/7] Cups revamp Angelo Compagnucci
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 1/7] package/cups-filters: fix cups-browsed service Angelo Compagnucci
@ 2020-06-24 20:43 ` Angelo Compagnucci
  2020-06-29 21:10   ` Thomas Petazzoni
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 3/7] package/cups: fix cups service Angelo Compagnucci
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Angelo Compagnucci @ 2020-06-24 20:43 UTC (permalink / raw)
  To: buildroot

This patch bumps cups-filters to version 1.27.5.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 package/cups-filters/cups-filters.hash | 2 +-
 package/cups-filters/cups-filters.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/cups-filters/cups-filters.hash b/package/cups-filters/cups-filters.hash
index 9e24abe393..61cb42a438 100644
--- a/package/cups-filters/cups-filters.hash
+++ b/package/cups-filters/cups-filters.hash
@@ -1,3 +1,3 @@
 # Locally computed:
-sha256 ff8679fcd0c31c25d229262c7ad100ba161ef6b2aa455a2df673dd74ef93f488  cups-filters-1.26.0.tar.gz
+sha256 08e4081ce50ce2e620af6e950bdcf64cea2ab4c81ab3c5ea05da25d82ad62db6  cups-filters-1.27.5.tar.gz
 sha256 527463af65312372111804589a9624f4c52813e253062ae351e75af5003f317f  COPYING
diff --git a/package/cups-filters/cups-filters.mk b/package/cups-filters/cups-filters.mk
index 0a2622b87b..c622fb68af 100644
--- a/package/cups-filters/cups-filters.mk
+++ b/package/cups-filters/cups-filters.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-CUPS_FILTERS_VERSION = 1.26.0
+CUPS_FILTERS_VERSION = 1.27.5
 CUPS_FILTERS_SITE = http://openprinting.org/download/cups-filters
 CUPS_FILTERS_LICENSE = GPL-2.0, GPL-2.0+, GPL-3.0, GPL-3.0+, LGPL-2, LGPL-2.1+, MIT, BSD-4-Clause
 CUPS_FILTERS_LICENSE_FILES = COPYING
-- 
2.25.1

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

* [Buildroot] [PATCH v3 3/7] package/cups: fix cups service
  2020-06-24 20:43 [Buildroot] [PATCH v3 0/7] Cups revamp Angelo Compagnucci
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 1/7] package/cups-filters: fix cups-browsed service Angelo Compagnucci
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 2/7] package/cups-filters: bump to version 1.27.5 Angelo Compagnucci
@ 2020-06-24 20:43 ` Angelo Compagnucci
  2020-08-04 21:38   ` Thomas Petazzoni
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 4/7] package/cups: bump to version 2.3.3 Angelo Compagnucci
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Angelo Compagnucci @ 2020-06-24 20:43 UTC (permalink / raw)
  To: buildroot

Cups service for systemv was erroneously installed in /etc/rcX.d and
therefore not working.
This patch adds also a buildroot style systemv init script instead of
using the example provided by the package.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 package/cups/S81cupsd | 48 +++++++++++++++++++++++++++++++++++++++++++
 package/cups/cups.mk  |  9 +++++++-
 2 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100644 package/cups/S81cupsd

diff --git a/package/cups/S81cupsd b/package/cups/S81cupsd
new file mode 100644
index 0000000000..13b43ded5e
--- /dev/null
+++ b/package/cups/S81cupsd
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+DAEMON="cupsd"
+PIDFILE="/var/run/$DAEMON.pid"
+
+start() {
+	printf 'Starting %s: ' "$DAEMON"
+	# shellcheck disable=SC2086 # we need the word splitting
+	start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \
+		-- -C /etc/cups/cupsd.conf -s /etc/cups/cups-files
+	status=$?
+	if [ "$status" -eq 0 ]; then
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+stop() {
+	printf 'Stopping %s: ' "$DAEMON"
+	start-stop-daemon -K -q -p "$PIDFILE"
+	status=$?
+	if [ "$status" -eq 0 ]; then
+		rm -f "$PIDFILE"
+		echo "OK"
+	else
+		echo "FAIL"
+	fi
+	return "$status"
+}
+
+restart() {
+	stop
+	sleep 1
+	start
+}
+
+case "$1" in
+	start|stop|restart)
+		"$1";;
+	reload)
+		# Restart, since there is no true "reload" feature.
+		restart;;
+	*)
+		echo "Usage: $0 {start|stop|restart|reload}"
+		exit 1
+esac
diff --git a/package/cups/cups.mk b/package/cups/cups.mk
index 18f01d8484..cff198b06a 100644
--- a/package/cups/cups.mk
+++ b/package/cups/cups.mk
@@ -21,7 +21,8 @@ CUPS_CONF_OPTS = \
 	--with-docdir=/usr/share/cups/doc-root \
 	--disable-gssapi \
 	--disable-pam \
-	--libdir=/usr/lib
+	--libdir=/usr/lib \
+	--with-rcdir=no
 CUPS_CONFIG_SCRIPTS = cups-config
 CUPS_DEPENDENCIES = \
 	host-autoconf \
@@ -71,4 +72,10 @@ else
 CUPS_CONF_OPTS += --disable-avahi
 endif
 
+define CUPS_INSTALL_INIT_SYSV
+	$(RM) $(TARGET_DIR)/etc/init.d/cups
+	$(INSTALL) -D -m 0755 package/cups/S81cupsd \
+		$(TARGET_DIR)/etc/init.d/S81cupsd
+endef
+
 $(eval $(autotools-package))
-- 
2.25.1

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

* [Buildroot] [PATCH v3 4/7] package/cups: bump to version 2.3.3
  2020-06-24 20:43 [Buildroot] [PATCH v3 0/7] Cups revamp Angelo Compagnucci
                   ` (2 preceding siblings ...)
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 3/7] package/cups: fix cups service Angelo Compagnucci
@ 2020-06-24 20:43 ` Angelo Compagnucci
  2020-07-25  0:02   ` Adam Duskett
  2020-08-04 21:38   ` Thomas Petazzoni
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 5/7] package/cups: Add lp user as default cups user Angelo Compagnucci
                   ` (3 subsequent siblings)
  7 siblings, 2 replies; 20+ messages in thread
From: Angelo Compagnucci @ 2020-06-24 20:43 UTC (permalink / raw)
  To: buildroot

This patch bumps cups to version 2.3.3.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 ...01-Remove-man-from-BUILDDIRS-in-configure.patch |  8 +++++---
 package/cups/0002-Do-not-use-genstrings.patch      | 14 ++++++++------
 .../0004-Remove-PIE-flags-from-the-build.patch     |  8 +++++---
 package/cups/cups.hash                             |  2 +-
 package/cups/cups.mk                               |  2 +-
 5 files changed, 20 insertions(+), 14 deletions(-)

diff --git a/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch b/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch
index b1ab7cbace..7fcf7133c8 100644
--- a/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch
+++ b/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch
@@ -6,15 +6,17 @@ Subject: [PATCH] Remove man from BUILDDIRS in configure
 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
 [Fabrice: updated for 2.3.0]
 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Michael: updated for 2.3.3]
+Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
 ---
  config-scripts/cups-common.m4 | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4
-index fbba715..77d0f5c 100644
+index a460a73..d427acb 100644
 --- a/config-scripts/cups-common.m4
 +++ b/config-scripts/cups-common.m4
-@@ -446,7 +446,7 @@ AC_ARG_WITH(components, [  --with-components       set components to build:
+@@ -434,7 +434,7 @@ LIBHEADERSPRIV="\$(COREHEADERSPRIV) \$(DRIVERHEADERSPRIV)"
  
  case "$COMPONENTS" in
  	all)
@@ -24,5 +26,5 @@ index fbba715..77d0f5c 100644
  
  	core)
 -- 
-2.8.1
+2.17.1
 
diff --git a/package/cups/0002-Do-not-use-genstrings.patch b/package/cups/0002-Do-not-use-genstrings.patch
index b3566b8b15..c7d6735b5f 100644
--- a/package/cups/0002-Do-not-use-genstrings.patch
+++ b/package/cups/0002-Do-not-use-genstrings.patch
@@ -16,23 +16,25 @@ genstrings call.]
 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 [Fabrice: updated for 2.3.0]
 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Michael: updated for 2.3.3]
+Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
 ---
  ppdc/Makefile | 2 --
  1 file changed, 2 deletions(-)
 
 diff --git a/ppdc/Makefile b/ppdc/Makefile
-index 68bf6b2..d57a0c9 100644
+index 32e2e0b..7b18879 100644
 --- a/ppdc/Makefile
 +++ b/ppdc/Makefile
-@@ -242,8 +242,6 @@ genstrings:		genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \
-	$(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o genstrings genstrings.o \
-		libcupsppdc.a $(LINKCUPSSTATIC)
-	$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
+@@ -186,8 +186,6 @@ genstrings:		genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \
+ 	$(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o genstrings genstrings.o \
+ 		libcupsppdc.a $(LINKCUPSSTATIC)
+ 	$(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
 -	echo Generating localization strings...
 -	./genstrings >sample.c
  
  
  #
 -- 
-2.6.4
+2.17.1
 
diff --git a/package/cups/0004-Remove-PIE-flags-from-the-build.patch b/package/cups/0004-Remove-PIE-flags-from-the-build.patch
index 8401e133e9..c2765dff09 100644
--- a/package/cups/0004-Remove-PIE-flags-from-the-build.patch
+++ b/package/cups/0004-Remove-PIE-flags-from-the-build.patch
@@ -13,15 +13,17 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
 [Fabrice: updated for 2.3.0]
 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Michael: updated for 2.3.3]
+Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
 ---
  Makedefs.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/Makedefs.in b/Makedefs.in
-index 3afef0a..299b297 100644
+index 5f1d32f..d669ea8 100644
 --- a/Makedefs.in
 +++ b/Makedefs.in
-@@ -148,7 +148,7 @@ IPPFIND_BIN	=	@IPPFIND_BIN@
+@@ -155,7 +155,7 @@ ALL_CXXFLAGS	=	-I.. -D_CUPS_SOURCE $(CXXFLAGS) \
  			$(ONDEMANDFLAGS) $(OPTIONS)
  ALL_DSOFLAGS	=	-L../cups @ARCHFLAGS@ @RELROFLAGS@ $(DSOFLAGS) $(OPTIM)
  ALL_LDFLAGS	=	-L../cups @LDARCHFLAGS@ @RELROFLAGS@ $(LDFLAGS)  \
@@ -31,5 +33,5 @@ index 3afef0a..299b297 100644
  ARFLAGS		=	@ARFLAGS@
  BACKLIBS	=	@BACKLIBS@
 -- 
-2.7.4
+2.17.1
 
diff --git a/package/cups/cups.hash b/package/cups/cups.hash
index 8f037c6420..2eb289e209 100644
--- a/package/cups/cups.hash
+++ b/package/cups/cups.hash
@@ -1,4 +1,4 @@
 # Locally calculated:
-sha256 1bca9d89507e3f68cbc84482fe46ae8d5333af5bc2b9061347b2007182ac77ce  cups-2.3.1-source.tar.gz
+sha256 261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee  cups-2.3.3-source.tar.gz
 sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
 sha256 a5d616e6322a9cb1a971e18765025edfca4f3cd9c0eafc32d6d2eb4b8c8787b5  NOTICE
diff --git a/package/cups/cups.mk b/package/cups/cups.mk
index cff198b06a..acd8c2066b 100644
--- a/package/cups/cups.mk
+++ b/package/cups/cups.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-CUPS_VERSION = 2.3.1
+CUPS_VERSION = 2.3.3
 CUPS_SOURCE = cups-$(CUPS_VERSION)-source.tar.gz
 CUPS_SITE = https://github.com/apple/cups/releases/download/v$(CUPS_VERSION)
 CUPS_LICENSE = Apache-2.0 with GPL-2.0/LGPL-2.0 exception
-- 
2.25.1

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

* [Buildroot] [PATCH v3 5/7] package/cups: Add lp user as default cups user
  2020-06-24 20:43 [Buildroot] [PATCH v3 0/7] Cups revamp Angelo Compagnucci
                   ` (3 preceding siblings ...)
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 4/7] package/cups: bump to version 2.3.3 Angelo Compagnucci
@ 2020-06-24 20:43 ` Angelo Compagnucci
  2020-09-02 21:06   ` Arnout Vandecappelle
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 6/7] package/cups: Add udev rules to assign usb printers group to lp Angelo Compagnucci
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 20+ messages in thread
From: Angelo Compagnucci @ 2020-06-24 20:43 UTC (permalink / raw)
  To: buildroot

This patch is a backport from the rockchip tree.

Author: Jeffy Chen <jeffy.chen@rock-chips.com>
Date:   Tue Nov 13 18:25:34 2018 +0800

    package: cups: Add lp user as default cups user

    Change-Id: Ic7434fe0a7b41b86b5b8b097fa29dd9718e29aa5
    Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>

User lp is necessary for running the cups spooler.
Groups lpadmin grants administrative privileges to users.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 package/cups/cups.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/package/cups/cups.mk b/package/cups/cups.mk
index acd8c2066b..e86374b027 100644
--- a/package/cups/cups.mk
+++ b/package/cups/cups.mk
@@ -22,6 +22,9 @@ CUPS_CONF_OPTS = \
 	--disable-gssapi \
 	--disable-pam \
 	--libdir=/usr/lib \
+	--with-cups-user=lp \
+	--with-cups-group=lp \
+	--with-system-groups="lpadmin sys root" \
 	--with-rcdir=no
 CUPS_CONFIG_SCRIPTS = cups-config
 CUPS_DEPENDENCIES = \
@@ -78,4 +81,11 @@ define CUPS_INSTALL_INIT_SYSV
 		$(TARGET_DIR)/etc/init.d/S81cupsd
 endef
 
+# lp user is needed to run cups spooler
+# lpadmin group membership grants administrative privileges
+define CUPS_USERS
+	lp -1 lp -1 * /var/spool/lpd /bin/false - lp
+	- - lpadmin -1 * - - - Printers admin group.
+endef
+
 $(eval $(autotools-package))
-- 
2.25.1

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

* [Buildroot] [PATCH v3 6/7] package/cups: Add udev rules to assign usb printers group to lp
  2020-06-24 20:43 [Buildroot] [PATCH v3 0/7] Cups revamp Angelo Compagnucci
                   ` (4 preceding siblings ...)
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 5/7] package/cups: Add lp user as default cups user Angelo Compagnucci
@ 2020-06-24 20:43 ` Angelo Compagnucci
  2020-09-02 21:07   ` Arnout Vandecappelle
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 7/7] package/cups: adding python support Angelo Compagnucci
  2020-07-25  0:01 ` [Buildroot] [PATCH v3 0/7] Cups revamp Adam Duskett
  7 siblings, 1 reply; 20+ messages in thread
From: Angelo Compagnucci @ 2020-06-24 20:43 UTC (permalink / raw)
  To: buildroot

This patch is based on patch from the rockchip tree:

commit c8a337593660f27379c30248a11bf08dc8712113
Author: Jeffy Chen <jeffy.chen@rock-chips.com>
Date:   Tue Nov 13 18:59:43 2018 +0800

    package: cups: Add udev rules to assign usb printers' group to lp

    Change-Id: Ieae17deaa7d3623e1f0e1cc826871f1719d98d88
    Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>

but removes a hardcoded device usb vendor/id and keps only the usb
printer class.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 package/cups/70-usb-printers.rules | 3 +++
 package/cups/cups.mk               | 9 +++++++++
 2 files changed, 12 insertions(+)
 create mode 100644 package/cups/70-usb-printers.rules

diff --git a/package/cups/70-usb-printers.rules b/package/cups/70-usb-printers.rules
new file mode 100644
index 0000000000..67e7f5e938
--- /dev/null
+++ b/package/cups/70-usb-printers.rules
@@ -0,0 +1,3 @@
+# Allow USB printers in the lp group
+# Match rules converted from usblp.c driver's usblp_ids
+ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="07", ATTR{bInterfaceSubClass}=="01", GROUP="lp"
diff --git a/package/cups/cups.mk b/package/cups/cups.mk
index e86374b027..805a80e854 100644
--- a/package/cups/cups.mk
+++ b/package/cups/cups.mk
@@ -75,6 +75,15 @@ else
 CUPS_CONF_OPTS += --disable-avahi
 endif
 
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
+define CUPS_INSTALL_UDEV_RULES
+	$(INSTALL) -D -m 0644 package/cups/70-usb-printers.rules \
+		$(TARGET_DIR)/lib/udev/rules.d/70-usb-printers.rules
+endef
+
+CUPS_POST_INSTALL_TARGET_HOOKS += CUPS_INSTALL_UDEV_RULES
+endif
+
 define CUPS_INSTALL_INIT_SYSV
 	$(RM) $(TARGET_DIR)/etc/init.d/cups
 	$(INSTALL) -D -m 0755 package/cups/S81cupsd \
-- 
2.25.1

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

* [Buildroot] [PATCH v3 7/7] package/cups: adding python support
  2020-06-24 20:43 [Buildroot] [PATCH v3 0/7] Cups revamp Angelo Compagnucci
                   ` (5 preceding siblings ...)
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 6/7] package/cups: Add udev rules to assign usb printers group to lp Angelo Compagnucci
@ 2020-06-24 20:43 ` Angelo Compagnucci
  2020-09-02 21:07   ` Arnout Vandecappelle
  2020-07-25  0:01 ` [Buildroot] [PATCH v3 0/7] Cups revamp Adam Duskett
  7 siblings, 1 reply; 20+ messages in thread
From: Angelo Compagnucci @ 2020-06-24 20:43 UTC (permalink / raw)
  To: buildroot

Enables python support if python is available.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
---
 package/cups/cups.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/cups/cups.mk b/package/cups/cups.mk
index 805a80e854..67baaf82f9 100644
--- a/package/cups/cups.mk
+++ b/package/cups/cups.mk
@@ -75,6 +75,13 @@ else
 CUPS_CONF_OPTS += --disable-avahi
 endif
 
+ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
+CUPS_CONF_OPTS += --with-python
+CUPS_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3)
+else
+CUPS_CONF_OPTS += --without-python
+endif
+
 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 define CUPS_INSTALL_UDEV_RULES
 	$(INSTALL) -D -m 0644 package/cups/70-usb-printers.rules \
-- 
2.25.1

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

* [Buildroot] [PATCH v3 1/7] package/cups-filters: fix cups-browsed service
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 1/7] package/cups-filters: fix cups-browsed service Angelo Compagnucci
@ 2020-06-29 21:10   ` Thomas Petazzoni
  0 siblings, 0 replies; 20+ messages in thread
From: Thomas Petazzoni @ 2020-06-29 21:10 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 24 Jun 2020 22:43:41 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> cups-browsed service is compiled and installed by the package,
> but the corresponding services file were not installed for
> systemv and systemd.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>

I've applied, after tweaking a bit the commit title and commit log, as
well as after replacing --with-rcdir=no by --without-rcdir, as we use
the --without-XYZ in Buildroot in general.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v3 2/7] package/cups-filters: bump to version 1.27.5
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 2/7] package/cups-filters: bump to version 1.27.5 Angelo Compagnucci
@ 2020-06-29 21:10   ` Thomas Petazzoni
  0 siblings, 0 replies; 20+ messages in thread
From: Thomas Petazzoni @ 2020-06-29 21:10 UTC (permalink / raw)
  To: buildroot

On Wed, 24 Jun 2020 22:43:42 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> This patch bumps cups-filters to version 1.27.5.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
>  package/cups-filters/cups-filters.hash | 2 +-
>  package/cups-filters/cups-filters.mk   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v3 0/7] Cups revamp
  2020-06-24 20:43 [Buildroot] [PATCH v3 0/7] Cups revamp Angelo Compagnucci
                   ` (6 preceding siblings ...)
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 7/7] package/cups: adding python support Angelo Compagnucci
@ 2020-07-25  0:01 ` Adam Duskett
  7 siblings, 0 replies; 20+ messages in thread
From: Adam Duskett @ 2020-07-25  0:01 UTC (permalink / raw)
  To: buildroot

All;

The cups bump in this series also fixes CVE-2020-3898 and
CVE-2019-8842, and as such
should be considered a security patch as well.

With that being said, I tested the changes and they all work as expected.

Tested-by: Adam Duskett <ADuskett@gmail.com>

On Wed, Jun 24, 2020 at 1:44 PM Angelo Compagnucci
<angelo@amarulasolutions.com> wrote:
>
> s series fixes various nitpicks we found using cups and do some
> bumps.
>
> Changelog:
> v1->v2:
> * Adding missing patch "Add lp user as default cups user"
> v1->v2:
> * Fixes to Signed-of
> * Decoupling service file fixing from bumps
> * Better explaining backported patches
>
> Angelo Compagnucci (7):
>   package/cups-filters: fix cups-browsed service
>   package/cups-filters: bump to version 1.27.5
>   package/cups: fix cups service
>   package/cups: bump to version 2.3.3
>   package/cups: Add lp user as default cups user
>   package/cups: Add udev rules to assign usb printers group to lp
>   package/cups: adding python support
>
>  package/cups-filters/S82cups-browsed          | 48 +++++++++++++++++++
>  package/cups-filters/cups-filters.hash        |  2 +-
>  package/cups-filters/cups-filters.mk          | 15 +++++-
>  ...move-man-from-BUILDDIRS-in-configure.patch |  8 ++--
>  package/cups/0002-Do-not-use-genstrings.patch | 14 +++---
>  ...0004-Remove-PIE-flags-from-the-build.patch |  8 ++--
>  package/cups/70-usb-printers.rules            |  3 ++
>  package/cups/S81cupsd                         | 48 +++++++++++++++++++
>  package/cups/cups.hash                        |  2 +-
>  package/cups/cups.mk                          | 37 +++++++++++++-
>  10 files changed, 167 insertions(+), 18 deletions(-)
>  create mode 100644 package/cups-filters/S82cups-browsed
>  create mode 100644 package/cups/70-usb-printers.rules
>  create mode 100644 package/cups/S81cupsd
>
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 4/7] package/cups: bump to version 2.3.3
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 4/7] package/cups: bump to version 2.3.3 Angelo Compagnucci
@ 2020-07-25  0:02   ` Adam Duskett
  2020-08-04 21:38   ` Thomas Petazzoni
  1 sibling, 0 replies; 20+ messages in thread
From: Adam Duskett @ 2020-07-25  0:02 UTC (permalink / raw)
  To: buildroot

All;

This version bump fixes CVE-2020-3898 and CVE-2019-8842, so this
should be considered
a security fix.

I tested the whole series and it works as expected!

Tested-by: Adam Duskett <aduskett@gmail.com>

On Wed, Jun 24, 2020 at 1:44 PM Angelo Compagnucci
<angelo@amarulasolutions.com> wrote:
>
> This patch bumps cups to version 2.3.3.
>
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
>  ...01-Remove-man-from-BUILDDIRS-in-configure.patch |  8 +++++---
>  package/cups/0002-Do-not-use-genstrings.patch      | 14 ++++++++------
>  .../0004-Remove-PIE-flags-from-the-build.patch     |  8 +++++---
>  package/cups/cups.hash                             |  2 +-
>  package/cups/cups.mk                               |  2 +-
>  5 files changed, 20 insertions(+), 14 deletions(-)
>
> diff --git a/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch b/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch
> index b1ab7cbace..7fcf7133c8 100644
> --- a/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch
> +++ b/package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch
> @@ -6,15 +6,17 @@ Subject: [PATCH] Remove man from BUILDDIRS in configure
>  Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
>  [Fabrice: updated for 2.3.0]
>  Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Michael: updated for 2.3.3]
> +Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
>  ---
>   config-scripts/cups-common.m4 | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
>  diff --git a/config-scripts/cups-common.m4 b/config-scripts/cups-common.m4
> -index fbba715..77d0f5c 100644
> +index a460a73..d427acb 100644
>  --- a/config-scripts/cups-common.m4
>  +++ b/config-scripts/cups-common.m4
> -@@ -446,7 +446,7 @@ AC_ARG_WITH(components, [  --with-components       set components to build:
> +@@ -434,7 +434,7 @@ LIBHEADERSPRIV="\$(COREHEADERSPRIV) \$(DRIVERHEADERSPRIV)"
>
>   case "$COMPONENTS" in
>         all)
> @@ -24,5 +26,5 @@ index fbba715..77d0f5c 100644
>
>         core)
>  --
> -2.8.1
> +2.17.1
>
> diff --git a/package/cups/0002-Do-not-use-genstrings.patch b/package/cups/0002-Do-not-use-genstrings.patch
> index b3566b8b15..c7d6735b5f 100644
> --- a/package/cups/0002-Do-not-use-genstrings.patch
> +++ b/package/cups/0002-Do-not-use-genstrings.patch
> @@ -16,23 +16,25 @@ genstrings call.]
>  Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>  [Fabrice: updated for 2.3.0]
>  Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Michael: updated for 2.3.3]
> +Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
>  ---
>   ppdc/Makefile | 2 --
>   1 file changed, 2 deletions(-)
>
>  diff --git a/ppdc/Makefile b/ppdc/Makefile
> -index 68bf6b2..d57a0c9 100644
> +index 32e2e0b..7b18879 100644
>  --- a/ppdc/Makefile
>  +++ b/ppdc/Makefile
> -@@ -242,8 +242,6 @@ genstrings:                genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \
> -       $(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o genstrings genstrings.o \
> -               libcupsppdc.a $(LINKCUPSSTATIC)
> -       $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
> +@@ -186,8 +186,6 @@ genstrings:                genstrings.o libcupsppdc.a ../cups/$(LIBCUPSSTATIC) \
> +       $(LD_CXX) $(ARCHFLAGS) $(ALL_LDFLAGS) -o genstrings genstrings.o \
> +               libcupsppdc.a $(LINKCUPSSTATIC)
> +       $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@
>  -      echo Generating localization strings...
>  -      ./genstrings >sample.c
>
>
>   #
>  --
> -2.6.4
> +2.17.1
>
> diff --git a/package/cups/0004-Remove-PIE-flags-from-the-build.patch b/package/cups/0004-Remove-PIE-flags-from-the-build.patch
> index 8401e133e9..c2765dff09 100644
> --- a/package/cups/0004-Remove-PIE-flags-from-the-build.patch
> +++ b/package/cups/0004-Remove-PIE-flags-from-the-build.patch
> @@ -13,15 +13,17 @@ Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>  Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com>
>  [Fabrice: updated for 2.3.0]
>  Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Michael: updated for 2.3.3]
> +Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
>  ---
>   Makedefs.in | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
>  diff --git a/Makedefs.in b/Makedefs.in
> -index 3afef0a..299b297 100644
> +index 5f1d32f..d669ea8 100644
>  --- a/Makedefs.in
>  +++ b/Makedefs.in
> -@@ -148,7 +148,7 @@ IPPFIND_BIN        =       @IPPFIND_BIN@
> +@@ -155,7 +155,7 @@ ALL_CXXFLAGS       =       -I.. -D_CUPS_SOURCE $(CXXFLAGS) \
>                         $(ONDEMANDFLAGS) $(OPTIONS)
>   ALL_DSOFLAGS  =       -L../cups @ARCHFLAGS@ @RELROFLAGS@ $(DSOFLAGS) $(OPTIM)
>   ALL_LDFLAGS   =       -L../cups @LDARCHFLAGS@ @RELROFLAGS@ $(LDFLAGS)  \
> @@ -31,5 +33,5 @@ index 3afef0a..299b297 100644
>   ARFLAGS               =       @ARFLAGS@
>   BACKLIBS      =       @BACKLIBS@
>  --
> -2.7.4
> +2.17.1
>
> diff --git a/package/cups/cups.hash b/package/cups/cups.hash
> index 8f037c6420..2eb289e209 100644
> --- a/package/cups/cups.hash
> +++ b/package/cups/cups.hash
> @@ -1,4 +1,4 @@
>  # Locally calculated:
> -sha256 1bca9d89507e3f68cbc84482fe46ae8d5333af5bc2b9061347b2007182ac77ce  cups-2.3.1-source.tar.gz
> +sha256 261fd948bce8647b6d5cb2a1784f0c24cc52b5c4e827b71d726020bcc502f3ee  cups-2.3.3-source.tar.gz
>  sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
>  sha256 a5d616e6322a9cb1a971e18765025edfca4f3cd9c0eafc32d6d2eb4b8c8787b5  NOTICE
> diff --git a/package/cups/cups.mk b/package/cups/cups.mk
> index cff198b06a..acd8c2066b 100644
> --- a/package/cups/cups.mk
> +++ b/package/cups/cups.mk
> @@ -4,7 +4,7 @@
>  #
>  ################################################################################
>
> -CUPS_VERSION = 2.3.1
> +CUPS_VERSION = 2.3.3
>  CUPS_SOURCE = cups-$(CUPS_VERSION)-source.tar.gz
>  CUPS_SITE = https://github.com/apple/cups/releases/download/v$(CUPS_VERSION)
>  CUPS_LICENSE = Apache-2.0 with GPL-2.0/LGPL-2.0 exception
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v3 3/7] package/cups: fix cups service
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 3/7] package/cups: fix cups service Angelo Compagnucci
@ 2020-08-04 21:38   ` Thomas Petazzoni
  0 siblings, 0 replies; 20+ messages in thread
From: Thomas Petazzoni @ 2020-08-04 21:38 UTC (permalink / raw)
  To: buildroot

Hello Angelo,

On Wed, 24 Jun 2020 22:43:43 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> Cups service for systemv was erroneously installed in /etc/rcX.d and
> therefore not working.
> This patch adds also a buildroot style systemv init script instead of
> using the example provided by the package.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>

Thanks, I have applied, after some changes. See below.

> +start() {
> +	printf 'Starting %s: ' "$DAEMON"
> +	# shellcheck disable=SC2086 # we need the word splitting
> +	start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \

I don't know how this was tested: cupsd is installed in /usr/sbin/, not
in /sbin/. Or perhaps you had a merged /usr and so you didn't notice ?

> +	--libdir=/usr/lib \
> +	--with-rcdir=no

Changed to:

	--without-rcdir

I looked at the code and tested it, and it works as expected.

> +define CUPS_INSTALL_INIT_SYSV
> +	$(RM) $(TARGET_DIR)/etc/init.d/cups

This is not needed: --without-rcdir ensures it is not installed. So I
dropped this line.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v3 4/7] package/cups: bump to version 2.3.3
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 4/7] package/cups: bump to version 2.3.3 Angelo Compagnucci
  2020-07-25  0:02   ` Adam Duskett
@ 2020-08-04 21:38   ` Thomas Petazzoni
  2020-09-05  8:14     ` Peter Korsgaard
  1 sibling, 1 reply; 20+ messages in thread
From: Thomas Petazzoni @ 2020-08-04 21:38 UTC (permalink / raw)
  To: buildroot

On Wed, 24 Jun 2020 22:43:44 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> This patch bumps cups to version 2.3.3.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
>  ...01-Remove-man-from-BUILDDIRS-in-configure.patch |  8 +++++---
>  package/cups/0002-Do-not-use-genstrings.patch      | 14 ++++++++------
>  .../0004-Remove-PIE-flags-from-the-build.patch     |  8 +++++---
>  package/cups/cups.hash                             |  2 +-
>  package/cups/cups.mk                               |  2 +-
>  5 files changed, 20 insertions(+), 14 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v3 5/7] package/cups: Add lp user as default cups user
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 5/7] package/cups: Add lp user as default cups user Angelo Compagnucci
@ 2020-09-02 21:06   ` Arnout Vandecappelle
  2020-09-05  8:04     ` Peter Korsgaard
  0 siblings, 1 reply; 20+ messages in thread
From: Arnout Vandecappelle @ 2020-09-02 21:06 UTC (permalink / raw)
  To: buildroot



On 24/06/2020 22:43, Angelo Compagnucci wrote:
> This patch is a backport from the rockchip tree.
> 
> Author: Jeffy Chen <jeffy.chen@rock-chips.com>
> Date:   Tue Nov 13 18:25:34 2018 +0800
> 
>     package: cups: Add lp user as default cups user
> 
>     Change-Id: Ic7434fe0a7b41b86b5b8b097fa29dd9718e29aa5
>     Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> 
> User lp is necessary for running the cups spooler.
> Groups lpadmin grants administrative privileges to users.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>

 Applied to master, thanks.

 Regards,
 Arnout

> ---
>  package/cups/cups.mk | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/package/cups/cups.mk b/package/cups/cups.mk
> index acd8c2066b..e86374b027 100644
> --- a/package/cups/cups.mk
> +++ b/package/cups/cups.mk
> @@ -22,6 +22,9 @@ CUPS_CONF_OPTS = \
>  	--disable-gssapi \
>  	--disable-pam \
>  	--libdir=/usr/lib \
> +	--with-cups-user=lp \
> +	--with-cups-group=lp \
> +	--with-system-groups="lpadmin sys root" \
>  	--with-rcdir=no
>  CUPS_CONFIG_SCRIPTS = cups-config
>  CUPS_DEPENDENCIES = \
> @@ -78,4 +81,11 @@ define CUPS_INSTALL_INIT_SYSV
>  		$(TARGET_DIR)/etc/init.d/S81cupsd
>  endef
>  
> +# lp user is needed to run cups spooler
> +# lpadmin group membership grants administrative privileges
> +define CUPS_USERS
> +	lp -1 lp -1 * /var/spool/lpd /bin/false - lp
> +	- - lpadmin -1 * - - - Printers admin group.
> +endef
> +
>  $(eval $(autotools-package))
> 

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

* [Buildroot] [PATCH v3 6/7] package/cups: Add udev rules to assign usb printers group to lp
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 6/7] package/cups: Add udev rules to assign usb printers group to lp Angelo Compagnucci
@ 2020-09-02 21:07   ` Arnout Vandecappelle
  2020-09-05  8:05     ` Peter Korsgaard
  0 siblings, 1 reply; 20+ messages in thread
From: Arnout Vandecappelle @ 2020-09-02 21:07 UTC (permalink / raw)
  To: buildroot



On 24/06/2020 22:43, Angelo Compagnucci wrote:
> This patch is based on patch from the rockchip tree:
> 
> commit c8a337593660f27379c30248a11bf08dc8712113
> Author: Jeffy Chen <jeffy.chen@rock-chips.com>
> Date:   Tue Nov 13 18:59:43 2018 +0800
> 
>     package: cups: Add udev rules to assign usb printers' group to lp
> 
>     Change-Id: Ieae17deaa7d3623e1f0e1cc826871f1719d98d88
>     Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> 
> but removes a hardcoded device usb vendor/id and keps only the usb
> printer class.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>

 Applied to master, thanks.

 Regards,
 Arnout

> ---
>  package/cups/70-usb-printers.rules | 3 +++
>  package/cups/cups.mk               | 9 +++++++++
>  2 files changed, 12 insertions(+)
>  create mode 100644 package/cups/70-usb-printers.rules
> 
> diff --git a/package/cups/70-usb-printers.rules b/package/cups/70-usb-printers.rules
> new file mode 100644
> index 0000000000..67e7f5e938
> --- /dev/null
> +++ b/package/cups/70-usb-printers.rules
> @@ -0,0 +1,3 @@
> +# Allow USB printers in the lp group
> +# Match rules converted from usblp.c driver's usblp_ids
> +ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="07", ATTR{bInterfaceSubClass}=="01", GROUP="lp"
> diff --git a/package/cups/cups.mk b/package/cups/cups.mk
> index e86374b027..805a80e854 100644
> --- a/package/cups/cups.mk
> +++ b/package/cups/cups.mk
> @@ -75,6 +75,15 @@ else
>  CUPS_CONF_OPTS += --disable-avahi
>  endif
>  
> +ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
> +define CUPS_INSTALL_UDEV_RULES
> +	$(INSTALL) -D -m 0644 package/cups/70-usb-printers.rules \
> +		$(TARGET_DIR)/lib/udev/rules.d/70-usb-printers.rules
> +endef
> +
> +CUPS_POST_INSTALL_TARGET_HOOKS += CUPS_INSTALL_UDEV_RULES
> +endif
> +
>  define CUPS_INSTALL_INIT_SYSV
>  	$(RM) $(TARGET_DIR)/etc/init.d/cups
>  	$(INSTALL) -D -m 0755 package/cups/S81cupsd \
> 

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

* [Buildroot] [PATCH v3 7/7] package/cups: adding python support
  2020-06-24 20:43 ` [Buildroot] [PATCH v3 7/7] package/cups: adding python support Angelo Compagnucci
@ 2020-09-02 21:07   ` Arnout Vandecappelle
  0 siblings, 0 replies; 20+ messages in thread
From: Arnout Vandecappelle @ 2020-09-02 21:07 UTC (permalink / raw)
  To: buildroot



On 24/06/2020 22:43, Angelo Compagnucci wrote:
> Enables python support if python is available.
> 
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> ---
>  package/cups/cups.mk | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/package/cups/cups.mk b/package/cups/cups.mk
> index 805a80e854..67baaf82f9 100644
> --- a/package/cups/cups.mk
> +++ b/package/cups/cups.mk
> @@ -75,6 +75,13 @@ else
>  CUPS_CONF_OPTS += --disable-avahi
>  endif
>  
> +ifeq ($(BR2_PACKAGE_PYTHON)$(BR2_PACKAGE_PYTHON3),y)
> +CUPS_CONF_OPTS += --with-python
> +CUPS_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3)
> +else
> +CUPS_CONF_OPTS += --without-python
> +endif

 configure doesn't know this option, and I couldn't find any reference to python
in the cups 2.3.3 source tree. So I marked this path as rejected.

 Regards,
 Arnout

> +
>  ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
>  define CUPS_INSTALL_UDEV_RULES
>  	$(INSTALL) -D -m 0644 package/cups/70-usb-printers.rules \
> 

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

* [Buildroot] [PATCH v3 5/7] package/cups: Add lp user as default cups user
  2020-09-02 21:06   ` Arnout Vandecappelle
@ 2020-09-05  8:04     ` Peter Korsgaard
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Korsgaard @ 2020-09-05  8:04 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 > On 24/06/2020 22:43, Angelo Compagnucci wrote:
 >> This patch is a backport from the rockchip tree.
 >> 
 >> Author: Jeffy Chen <jeffy.chen@rock-chips.com>
 >> Date:   Tue Nov 13 18:25:34 2018 +0800
 >> 
 >> package: cups: Add lp user as default cups user
 >> 
 >> Change-Id: Ic7434fe0a7b41b86b5b8b097fa29dd9718e29aa5
 >> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
 >> 
 >> User lp is necessary for running the cups spooler.
 >> Groups lpadmin grants administrative privileges to users.
 >> 
 >> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>

Committed to 2020.02.x, 2020.05.x and 2020.08.x, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v3 6/7] package/cups: Add udev rules to assign usb printers group to lp
  2020-09-02 21:07   ` Arnout Vandecappelle
@ 2020-09-05  8:05     ` Peter Korsgaard
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Korsgaard @ 2020-09-05  8:05 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

 > On 24/06/2020 22:43, Angelo Compagnucci wrote:
 >> This patch is based on patch from the rockchip tree:
 >> 
 >> commit c8a337593660f27379c30248a11bf08dc8712113
 >> Author: Jeffy Chen <jeffy.chen@rock-chips.com>
 >> Date:   Tue Nov 13 18:59:43 2018 +0800
 >> 
 >> package: cups: Add udev rules to assign usb printers' group to lp
 >> 
 >> Change-Id: Ieae17deaa7d3623e1f0e1cc826871f1719d98d88
 >> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
 >> 
 >> but removes a hardcoded device usb vendor/id and keps only the usb
 >> printer class.
 >> 
 >> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
 >> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>

Committed to 2020.02.x, 2020.08.x and 2020.08.x, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v3 4/7] package/cups: bump to version 2.3.3
  2020-08-04 21:38   ` Thomas Petazzoni
@ 2020-09-05  8:14     ` Peter Korsgaard
  0 siblings, 0 replies; 20+ messages in thread
From: Peter Korsgaard @ 2020-09-05  8:14 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > On Wed, 24 Jun 2020 22:43:44 +0200
 > Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

 >> This patch bumps cups to version 2.3.3.
 >> 
 >> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
 >> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
 >> ---
 >> ...01-Remove-man-from-BUILDDIRS-in-configure.patch |  8 +++++---
 >> package/cups/0002-Do-not-use-genstrings.patch      | 14 ++++++++------
 >> .../0004-Remove-PIE-flags-from-the-build.patch     |  8 +++++---
 >> package/cups/cups.hash                             |  2 +-
 >> package/cups/cups.mk                               |  2 +-
 >> 5 files changed, 20 insertions(+), 14 deletions(-)

Committed to 2020.02.x and 2020.05.x after updating the commit message
to clarify that this is a security bump, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2020-09-05  8:14 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-24 20:43 [Buildroot] [PATCH v3 0/7] Cups revamp Angelo Compagnucci
2020-06-24 20:43 ` [Buildroot] [PATCH v3 1/7] package/cups-filters: fix cups-browsed service Angelo Compagnucci
2020-06-29 21:10   ` Thomas Petazzoni
2020-06-24 20:43 ` [Buildroot] [PATCH v3 2/7] package/cups-filters: bump to version 1.27.5 Angelo Compagnucci
2020-06-29 21:10   ` Thomas Petazzoni
2020-06-24 20:43 ` [Buildroot] [PATCH v3 3/7] package/cups: fix cups service Angelo Compagnucci
2020-08-04 21:38   ` Thomas Petazzoni
2020-06-24 20:43 ` [Buildroot] [PATCH v3 4/7] package/cups: bump to version 2.3.3 Angelo Compagnucci
2020-07-25  0:02   ` Adam Duskett
2020-08-04 21:38   ` Thomas Petazzoni
2020-09-05  8:14     ` Peter Korsgaard
2020-06-24 20:43 ` [Buildroot] [PATCH v3 5/7] package/cups: Add lp user as default cups user Angelo Compagnucci
2020-09-02 21:06   ` Arnout Vandecappelle
2020-09-05  8:04     ` Peter Korsgaard
2020-06-24 20:43 ` [Buildroot] [PATCH v3 6/7] package/cups: Add udev rules to assign usb printers group to lp Angelo Compagnucci
2020-09-02 21:07   ` Arnout Vandecappelle
2020-09-05  8:05     ` Peter Korsgaard
2020-06-24 20:43 ` [Buildroot] [PATCH v3 7/7] package/cups: adding python support Angelo Compagnucci
2020-09-02 21:07   ` Arnout Vandecappelle
2020-07-25  0:01 ` [Buildroot] [PATCH v3 0/7] Cups revamp Adam Duskett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.