Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/7] Cups revamp
@ 2020-06-19 14:57 Angelo Compagnucci
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 1/7] package/dejavu: Install dejavu fonts in staging dir Angelo Compagnucci
                   ` (6 more replies)
  0 siblings, 7 replies; 21+ messages in thread
From: Angelo Compagnucci @ 2020-06-19 14:57 UTC (permalink / raw)
  To: buildroot

This 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" 

Angelo Compagnucci (5):
  package/cups-filters: bump to version 1.27.5
  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

Michael Trimarchi (2):
  package/dejavu: Install dejavu fonts in staging dir
  package/qt5: Enable cups support when BR2_PACKAGE_CUPS

 package/cups-filters/Config.in                |  3 ++
 package/cups-filters/S82cups-browsed          | 23 ++++++++++++
 package/cups-filters/cups-filters.hash        |  2 +-
 package/cups-filters/cups-filters.mk          | 20 +++++++++--
 ...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            |  4 +++
 package/cups/S81cupsd                         | 23 ++++++++++++
 package/cups/cups.hash                        |  2 +-
 package/cups/cups.mk                          | 35 +++++++++++++++++--
 package/dejavu/dejavu.mk                      |  9 +++++
 package/qt5/qt5base/qt5base.mk                |  8 ++++-
 13 files changed, 139 insertions(+), 20 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] 21+ messages in thread

* [Buildroot] [PATCH v2 1/7] package/dejavu: Install dejavu fonts in staging dir
  2020-06-19 14:57 [Buildroot] [PATCH v2 0/7] Cups revamp Angelo Compagnucci
@ 2020-06-19 14:57 ` Angelo Compagnucci
  2020-06-20 20:29   ` Thomas Petazzoni
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 2/7] package/cups-filters: bump to version 1.27.5 Angelo Compagnucci
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 21+ messages in thread
From: Angelo Compagnucci @ 2020-06-19 14:57 UTC (permalink / raw)
  To: buildroot

From: Michael Trimarchi <michael@amarulasolutions.com>

The dejavu font is used by cups-filters and needs to be
installed in staging directory.

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

diff --git a/package/dejavu/dejavu.mk b/package/dejavu/dejavu.mk
index 9b57f0992e..be3d91f179 100644
--- a/package/dejavu/dejavu.mk
+++ b/package/dejavu/dejavu.mk
@@ -11,6 +11,7 @@ DEJAVU_LICENSE_FILES = LICENSE
 
 DEJAVU_FONTS_INSTALL =
 DEJAVU_FONTCONFIG_CONF_INSTALL =
+DEJAVU_INSTALL_STAGING = YES
 
 ifeq ($(BR2_PACKAGE_DEJAVU_MONO),y)
 DEJAVU_FONTS_INSTALL += DejaVuSansMono*.ttf
@@ -50,6 +51,14 @@ define DEJAVU_FONTCONFIG_CONF_INSTALL_CMDS
 endef
 endif
 
+define DEJAVU_INSTALL_STAGING_CMDS
+	mkdir -p $(STAGING_DIR)/usr/share/fonts/dejavu/
+	for i in $(DEJAVU_FONTS_INSTALL) ; do \
+		$(INSTALL) -m 0644 $(@D)/ttf/$$i \
+			$(STAGING_DIR)/usr/share/fonts/dejavu/ || exit 1 ; \
+	done
+endef
+
 define DEJAVU_INSTALL_TARGET_CMDS
 	mkdir -p $(TARGET_DIR)/usr/share/fonts/dejavu/
 	for i in $(DEJAVU_FONTS_INSTALL) ; do \
-- 
2.25.1

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

* [Buildroot] [PATCH v2 2/7] package/cups-filters: bump to version 1.27.5
  2020-06-19 14:57 [Buildroot] [PATCH v2 0/7] Cups revamp Angelo Compagnucci
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 1/7] package/dejavu: Install dejavu fonts in staging dir Angelo Compagnucci
@ 2020-06-19 14:57 ` Angelo Compagnucci
  2020-06-20 20:33   ` Thomas Petazzoni
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 3/7] package/cups: bump to version 2.3.3 Angelo Compagnucci
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 21+ messages in thread
From: Angelo Compagnucci @ 2020-06-19 14:57 UTC (permalink / raw)
  To: buildroot

This patch bumps cups-filters to version 1.27.5.
While bumping, fixing also the missing installation for the service files
for cups-browsed.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 package/cups-filters/Config.in         |  3 +++
 package/cups-filters/S82cups-browsed   | 23 +++++++++++++++++++++++
 package/cups-filters/cups-filters.hash |  2 +-
 package/cups-filters/cups-filters.mk   | 20 +++++++++++++++++---
 4 files changed, 44 insertions(+), 4 deletions(-)
 create mode 100644 package/cups-filters/S82cups-browsed

diff --git a/package/cups-filters/Config.in b/package/cups-filters/Config.in
index 9e4e37ca6b..26e8d4aa06 100644
--- a/package/cups-filters/Config.in
+++ b/package/cups-filters/Config.in
@@ -8,6 +8,9 @@ config BR2_PACKAGE_CUPS_FILTERS
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_PACKAGE_CUPS
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
+	select BR2_PACKAGE_DEJAVU
+	select BR2_PACKAGE_DEJAVU_SANS
+	select BR2_PACKAGE_DEJAVU_SERIF
 	select BR2_PACKAGE_JPEG
 	select BR2_PACKAGE_FONTCONFIG
 	select BR2_PACKAGE_FREETYPE
diff --git a/package/cups-filters/S82cups-browsed b/package/cups-filters/S82cups-browsed
new file mode 100644
index 0000000000..c73ff1fbfa
--- /dev/null
+++ b/package/cups-filters/S82cups-browsed
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+case "$1" in
+	start)
+		printf "Starting cups-browsed: "
+		start-stop-daemon -S -q -m -p /var/run/cups-browsed.pid \
+			-b -x cups-browsed -- -c /etc/cups/cups-browsed.conf
+		[ $? = 0 ] && echo "OK" || echo "FAIL"
+		;;
+	stop)
+		printf "Stopping cups-browsed: "
+		start-stop-daemon -K -q -p /var/run/cups-browsed.pid
+		[ $? = 0 ] && echo "OK" || echo "FAIL"
+		;;
+	restart)
+		"$0" stop
+		sleep 1
+		"$0" start
+		;;
+	*)
+		echo "Usage: $0 {start|stop|restart}"
+		;;
+esac
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 1f17018bc5..20d4c68995 100644
--- a/package/cups-filters/cups-filters.mk
+++ b/package/cups-filters/cups-filters.mk
@@ -4,12 +4,12 @@
 #
 ################################################################################
 
-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
 
-CUPS_FILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg
+CUPS_FILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg dejavu
 
 CUPS_FILTERS_CONF_OPTS = \
 	--disable-mutool \
@@ -19,7 +19,10 @@ 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 \
+	--with-fontdir=$(STAGING_DIR)/usr/share/fonts/ \
+	--with-test-font-path=$(STAGING_DIR)/usr/share/fonts/dejavu/DejaVuSans.ttf
 
 ifeq ($(BR2_PACKAGE_LIBPNG),y)
 CUPS_FILTERS_CONF_OPTS += --with-png
@@ -71,4 +74,15 @@ else
 CUPS_FILTERS_CONF_OPTS += --disable-poppler
 endif
 
+define CUPS_FILTERS_INSTALL_INIT_SYSV
+	@$(RM) $(TARGET_DIR)/etc/init.d/cups-browsed
+	$(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] 21+ messages in thread

* [Buildroot] [PATCH v2 3/7] package/cups: bump to version 2.3.3
  2020-06-19 14:57 [Buildroot] [PATCH v2 0/7] Cups revamp Angelo Compagnucci
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 1/7] package/dejavu: Install dejavu fonts in staging dir Angelo Compagnucci
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 2/7] package/cups-filters: bump to version 1.27.5 Angelo Compagnucci
@ 2020-06-19 14:57 ` Angelo Compagnucci
  2020-06-20 20:35   ` Thomas Petazzoni
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 4/7] package/cups: Add lp user as default cups user Angelo Compagnucci
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 21+ messages in thread
From: Angelo Compagnucci @ 2020-06-19 14:57 UTC (permalink / raw)
  To: buildroot

This patch bumps cups to version 2.3.3.
While bumping, fixing also the wrong installation of service files:
the rcdir was left to the default value, that means installing the
service files into the /etc/rcX.d directory.
Adding also a simplified systemv service file for loading cupsd.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 ...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/S81cupsd                         | 23 +++++++++++++++++++
 package/cups/cups.hash                        |  2 +-
 package/cups/cups.mk                          | 11 +++++++--
 6 files changed, 51 insertions(+), 15 deletions(-)
 create mode 100644 package/cups/S81cupsd

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/S81cupsd b/package/cups/S81cupsd
new file mode 100644
index 0000000000..f527d55f1e
--- /dev/null
+++ b/package/cups/S81cupsd
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+case "$1" in
+	start)
+		printf "Starting cupsd: "
+		start-stop-daemon -S -q -m -p /var/run/cupsd.pid \
+			-b -x cupsd -- -C /etc/cups/cupsd.conf -s /etc/cups/cups-files
+		[ $? = 0 ] && echo "OK" || echo "FAIL"
+		;;
+	stop)
+		printf "Stopping cupsd: "
+		start-stop-daemon -K -q -p /var/run/cupsd.pid
+		[ $? = 0 ] && echo "OK" || echo "FAIL"
+		;;
+	restart)
+		"$0" stop
+		sleep 1
+		"$0" start
+		;;
+	*)
+		echo "Usage: $0 {start|stop|restart}"
+		;;
+esac
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 18f01d8484..461e0d9143 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
@@ -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] 21+ messages in thread

* [Buildroot] [PATCH v2 4/7] package/cups: Add lp user as default cups user
  2020-06-19 14:57 [Buildroot] [PATCH v2 0/7] Cups revamp Angelo Compagnucci
                   ` (2 preceding siblings ...)
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 3/7] package/cups: bump to version 2.3.3 Angelo Compagnucci
@ 2020-06-19 14:57 ` Angelo Compagnucci
  2020-06-20 20:37   ` Thomas Petazzoni
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 5/7] package/cups: Add udev rules to assign usb printers group to lp Angelo Compagnucci
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 21+ messages in thread
From: Angelo Compagnucci @ 2020-06-19 14:57 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>

but fixes the CUPS_USERS table.

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

diff --git a/package/cups/cups.mk b/package/cups/cups.mk
index 461e0d9143..40fe210c94 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,9 @@ define CUPS_INSTALL_INIT_SYSV
 		$(TARGET_DIR)/etc/init.d/S81cupsd
 endef
 
+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] 21+ messages in thread

* [Buildroot] [PATCH v2 5/7] package/cups: Add udev rules to assign usb printers group to lp
  2020-06-19 14:57 [Buildroot] [PATCH v2 0/7] Cups revamp Angelo Compagnucci
                   ` (3 preceding siblings ...)
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 4/7] package/cups: Add lp user as default cups user Angelo Compagnucci
@ 2020-06-19 14:57 ` Angelo Compagnucci
  2020-06-20 20:39   ` Thomas Petazzoni
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 6/7] package/cups: adding python support Angelo Compagnucci
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 7/7] package/qt5: Enable cups support when BR2_PACKAGE_CUPS Angelo Compagnucci
  6 siblings, 1 reply; 21+ messages in thread
From: Angelo Compagnucci @ 2020-06-19 14:57 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>

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
---
 package/cups/70-usb-printers.rules | 4 ++++
 package/cups/cups.mk               | 9 +++++++++
 2 files changed, 13 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..537645523d
--- /dev/null
+++ b/package/cups/70-usb-printers.rules
@@ -0,0 +1,4 @@
+# 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"
+ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0202", GROUP="lp"
diff --git a/package/cups/cups.mk b/package/cups/cups.mk
index 40fe210c94..617b402969 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] 21+ messages in thread

* [Buildroot] [PATCH v2 6/7] package/cups: adding python support
  2020-06-19 14:57 [Buildroot] [PATCH v2 0/7] Cups revamp Angelo Compagnucci
                   ` (4 preceding siblings ...)
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 5/7] package/cups: Add udev rules to assign usb printers group to lp Angelo Compagnucci
@ 2020-06-19 14:57 ` Angelo Compagnucci
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 7/7] package/qt5: Enable cups support when BR2_PACKAGE_CUPS Angelo Compagnucci
  6 siblings, 0 replies; 21+ messages in thread
From: Angelo Compagnucci @ 2020-06-19 14:57 UTC (permalink / raw)
  To: buildroot

Enables python support if python is available.

Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Angelo Compagnucci <angelo@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 617b402969..67690b61c4 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] 21+ messages in thread

* [Buildroot] [PATCH v2 7/7] package/qt5: Enable cups support when BR2_PACKAGE_CUPS
  2020-06-19 14:57 [Buildroot] [PATCH v2 0/7] Cups revamp Angelo Compagnucci
                   ` (5 preceding siblings ...)
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 6/7] package/cups: adding python support Angelo Compagnucci
@ 2020-06-19 14:57 ` Angelo Compagnucci
  2020-06-20 20:47   ` Thomas Petazzoni
  6 siblings, 1 reply; 21+ messages in thread
From: Angelo Compagnucci @ 2020-06-19 14:57 UTC (permalink / raw)
  To: buildroot

From: Michael Trimarchi <michael@amarulasolutions.com>

Cups support in QT should be enable if CUPS is available system wide.

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

diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index 42d77306cc..c6b459a0e1 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -23,7 +23,6 @@ QT5BASE_INSTALL_STAGING = YES
 #     feature enabled
 QT5BASE_CONFIGURE_OPTS += \
 	-optimized-qmake \
-	-no-cups \
 	-no-iconv \
 	-system-zlib \
 	-system-pcre \
@@ -108,6 +107,13 @@ ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 QT5BASE_DEPENDENCIES += udev
 endif
 
+ifeq ($(BR2_PACKAGE_CUPS), y)
+QT5BASE_DEPENDENCIES += cups
+QT5BASE_CONFIGURE_OPTS += -cups
+else
+QT5BASE_CONFIGURE_OPTS += -no-cups
+endif
+
 # Qt5 SQL Plugins
 ifeq ($(BR2_PACKAGE_QT5BASE_SQL),y)
 ifeq ($(BR2_PACKAGE_QT5BASE_MYSQL),y)
-- 
2.25.1

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

* [Buildroot] [PATCH v2 1/7] package/dejavu: Install dejavu fonts in staging dir
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 1/7] package/dejavu: Install dejavu fonts in staging dir Angelo Compagnucci
@ 2020-06-20 20:29   ` Thomas Petazzoni
  2020-06-20 20:37     ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Petazzoni @ 2020-06-20 20:29 UTC (permalink / raw)
  To: buildroot

Hello Angelo,

On Fri, 19 Jun 2020 16:57:13 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> From: Michael Trimarchi <michael@amarulasolutions.com>
> 
> The dejavu font is used by cups-filters and needs to be
> installed in staging directory.
> 
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>

The question is why should we do this just for the DejaVu fonts ? And
not other font packages ?

> +define DEJAVU_INSTALL_STAGING_CMDS
> +	mkdir -p $(STAGING_DIR)/usr/share/fonts/dejavu/
> +	for i in $(DEJAVU_FONTS_INSTALL) ; do \
> +		$(INSTALL) -m 0644 $(@D)/ttf/$$i \
> +			$(STAGING_DIR)/usr/share/fonts/dejavu/ || exit 1 ; \
> +	done
> +endef
> +
>  define DEJAVU_INSTALL_TARGET_CMDS
>  	mkdir -p $(TARGET_DIR)/usr/share/fonts/dejavu/
>  	for i in $(DEJAVU_FONTS_INSTALL) ; do \

We could factorize things a bit between staging/target installation,
and perhaps use a make "foreach" loop (if that works). But really these
are minor details, the main question is: why DejaVu specifically.

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

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

* [Buildroot] [PATCH v2 2/7] package/cups-filters: bump to version 1.27.5
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 2/7] package/cups-filters: bump to version 1.27.5 Angelo Compagnucci
@ 2020-06-20 20:33   ` Thomas Petazzoni
  2020-06-20 20:42     ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Petazzoni @ 2020-06-20 20:33 UTC (permalink / raw)
  To: buildroot

On Fri, 19 Jun 2020 16:57:14 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> This patch bumps cups-filters to version 1.27.5.
> While bumping, fixing also the missing installation for the service files
> for cups-browsed.
> 
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>

If Michael is the first SoB, then he is the author of the patch, and we
should have his From: line, like it appears for PATCH 1/7. Otherwise,
if you (Angelo) are the author, your SoB should appear first.

The next comment is: are you sure the service files / init script are
related to the version bump ? They seem to be unrelated to the version
bump. Could you clarify that ? Keep in mind that we want one logical
change per commit.

> diff --git a/package/cups-filters/Config.in b/package/cups-filters/Config.in
> index 9e4e37ca6b..26e8d4aa06 100644
> --- a/package/cups-filters/Config.in
> +++ b/package/cups-filters/Config.in
> @@ -8,6 +8,9 @@ config BR2_PACKAGE_CUPS_FILTERS
>  	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
>  	depends on BR2_PACKAGE_CUPS
>  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
> +	select BR2_PACKAGE_DEJAVU
> +	select BR2_PACKAGE_DEJAVU_SANS
> +	select BR2_PACKAGE_DEJAVU_SERIF

Why DejaVu specifically, and not any other font ?


> +case "$1" in
> +	start)
> +		printf "Starting cups-browsed: "
> +		start-stop-daemon -S -q -m -p /var/run/cups-browsed.pid \
> +			-b -x cups-browsed -- -c /etc/cups/cups-browsed.conf
> +		[ $? = 0 ] && echo "OK" || echo "FAIL"
> +		;;
> +	stop)
> +		printf "Stopping cups-browsed: "
> +		start-stop-daemon -K -q -p /var/run/cups-browsed.pid
> +		[ $? = 0 ] && echo "OK" || echo "FAIL"
> +		;;

Please use package/busybox/S01syslodg as a template for new init
script. We try to increase the consistency between init scripts.


> -CUPS_FILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg
> +CUPS_FILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg dejavu
>  
>  CUPS_FILTERS_CONF_OPTS = \
>  	--disable-mutool \
> @@ -19,7 +19,10 @@ 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 \

	--without-rcdir \

> +	--with-fontdir=$(STAGING_DIR)/usr/share/fonts/ \

How is this path used ? Only at build time ? Or also on the target (in
which case it would be wrong).

> +	--with-test-font-path=$(STAGING_DIR)/usr/share/fonts/dejavu/DejaVuSans.ttf

So, what is this used for exactly ?

>  
>  ifeq ($(BR2_PACKAGE_LIBPNG),y)
>  CUPS_FILTERS_CONF_OPTS += --with-png
> @@ -71,4 +74,15 @@ else
>  CUPS_FILTERS_CONF_OPTS += --disable-poppler
>  endif
>  
> +define CUPS_FILTERS_INSTALL_INIT_SYSV
> +	@$(RM) $(TARGET_DIR)/etc/init.d/cups-browsed

Shouldn't this be removed unconditionally, i.e even in the systemd case?

Also, drop the @ at the beginning of the line.

Thanks!

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

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

* [Buildroot] [PATCH v2 3/7] package/cups: bump to version 2.3.3
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 3/7] package/cups: bump to version 2.3.3 Angelo Compagnucci
@ 2020-06-20 20:35   ` Thomas Petazzoni
  2020-06-20 20:48     ` Angelo Compagnucci
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Petazzoni @ 2020-06-20 20:35 UTC (permalink / raw)
  To: buildroot

Hello Angelo,

On Fri, 19 Jun 2020 16:57:15 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> This patch bumps cups to version 2.3.3.
> While bumping, fixing also the wrong installation of service files:
> the rcdir was left to the default value, that means installing the
> service files into the /etc/rcX.d directory.
> Adding also a simplified systemv service file for loading cupsd.

Again, this seems to be mixing up different changes together in the
same commit. If I understand correctly what you're saying, you should
have at least three different commits:

 - Fix the rcdir value, due to which the systemd service file was not
   installed at the right place.

 - Provide and install an init script

 - Bump the version.

> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>

Same issue as PATCH 2/7 about author/SoB.


> diff --git a/package/cups/S81cupsd b/package/cups/S81cupsd
> new file mode 100644
> index 0000000000..f527d55f1e
> --- /dev/null
> +++ b/package/cups/S81cupsd

Please take inspiration from package/busybox/S01syslogd.

> -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
> @@ -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

	--without-rcdir

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

This should also be done in the systemd case I believe, and should not
have the @.

Thanks!

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

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

* [Buildroot] [PATCH v2 1/7] package/dejavu: Install dejavu fonts in staging dir
  2020-06-20 20:29   ` Thomas Petazzoni
@ 2020-06-20 20:37     ` Michael Nazzareno Trimarchi
  0 siblings, 0 replies; 21+ messages in thread
From: Michael Nazzareno Trimarchi @ 2020-06-20 20:37 UTC (permalink / raw)
  To: buildroot

Hi

On Sat, Jun 20, 2020 at 10:29 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello Angelo,
>
> On Fri, 19 Jun 2020 16:57:13 +0200
> Angelo Compagnucci <angelo@amarulasolutions.com> wrote:
>
> > From: Michael Trimarchi <michael@amarulasolutions.com>
> >
> > The dejavu font is used by cups-filters and needs to be
> > installed in staging directory.
> >
> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
>
> The question is why should we do this just for the DejaVu fonts ? And
> not other font packages ?

Ok, optional can be created a patch to remove this dependency that is used
to compile tests.

Michael

>
> > +define DEJAVU_INSTALL_STAGING_CMDS
> > +     mkdir -p $(STAGING_DIR)/usr/share/fonts/dejavu/
> > +     for i in $(DEJAVU_FONTS_INSTALL) ; do \
> > +             $(INSTALL) -m 0644 $(@D)/ttf/$$i \
> > +                     $(STAGING_DIR)/usr/share/fonts/dejavu/ || exit 1 ; \
> > +     done
> > +endef
> > +
> >  define DEJAVU_INSTALL_TARGET_CMDS
> >       mkdir -p $(TARGET_DIR)/usr/share/fonts/dejavu/
> >       for i in $(DEJAVU_FONTS_INSTALL) ; do \
>
> We could factorize things a bit between staging/target installation,
> and perhaps use a make "foreach" loop (if that works). But really these
> are minor details, the main question is: why DejaVu specifically.
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com



-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |

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

* [Buildroot] [PATCH v2 4/7] package/cups: Add lp user as default cups user
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 4/7] package/cups: Add lp user as default cups user Angelo Compagnucci
@ 2020-06-20 20:37   ` Thomas Petazzoni
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Petazzoni @ 2020-06-20 20:37 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 19 Jun 2020 16:57:16 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> This patch is a backport from the rockchip tree.

Good idea to try to bring back into Buildroot changes made in other
forks! However, it would be nice to have a better commit log that
explains why these changes are needed, i.e what is the visible issue
without this fix.

> diff --git a/package/cups/cups.mk b/package/cups/cups.mk
> index 461e0d9143..40fe210c94 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" \

What is this --with-system-groups option doing?

>  	--with-rcdir=no
>  CUPS_CONFIG_SCRIPTS = cups-config
>  CUPS_DEPENDENCIES = \
> @@ -78,4 +81,9 @@ define CUPS_INSTALL_INIT_SYSV
>  		$(TARGET_DIR)/etc/init.d/S81cupsd
>  endef
>  
> +define CUPS_USERS
> +	lp -1 lp -1 * /var/spool/lpd /bin/false - lp
> +	- - lpadmin -1 * - - - Printers admin group.

So we need both a "lp" group and a "lpadmin" group ?

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

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

* [Buildroot] [PATCH v2 5/7] package/cups: Add udev rules to assign usb printers group to lp
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 5/7] package/cups: Add udev rules to assign usb printers group to lp Angelo Compagnucci
@ 2020-06-20 20:39   ` Thomas Petazzoni
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Petazzoni @ 2020-06-20 20:39 UTC (permalink / raw)
  To: buildroot

Hello Angelo,

On Fri, 19 Jun 2020 16:57:17 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> 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>
> 
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> ---
>  package/cups/70-usb-printers.rules | 4 ++++
>  package/cups/cups.mk               | 9 +++++++++
>  2 files changed, 13 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..537645523d
> --- /dev/null
> +++ b/package/cups/70-usb-printers.rules
> @@ -0,0 +1,4 @@
> +# 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"

This first rule makes sense, i.e it's based on the interface
class/subclass.

> +ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0202", GROUP="lp"

But this one looks weird. Why do we care specifically about the printer
of vendor id 04b8 and product id 0202, and not some random other
printer ?

I suppose if you're adding this udev rules file it's because cups
doesn't provide one that we could use as-is ?

Thanks!

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

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

* [Buildroot] [PATCH v2 2/7] package/cups-filters: bump to version 1.27.5
  2020-06-20 20:33   ` Thomas Petazzoni
@ 2020-06-20 20:42     ` Michael Nazzareno Trimarchi
  2020-06-20 20:53       ` Thomas Petazzoni
  0 siblings, 1 reply; 21+ messages in thread
From: Michael Nazzareno Trimarchi @ 2020-06-20 20:42 UTC (permalink / raw)
  To: buildroot

Hi Thomas

On Sat, Jun 20, 2020 at 10:33 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Fri, 19 Jun 2020 16:57:14 +0200
> Angelo Compagnucci <angelo@amarulasolutions.com> wrote:
>
> > This patch bumps cups-filters to version 1.27.5.
> > While bumping, fixing also the missing installation for the service files
> > for cups-browsed.
> >
> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
>
> If Michael is the first SoB, then he is the author of the patch, and we
> should have his From: line, like it appears for PATCH 1/7. Otherwise,
> if you (Angelo) are the author, your SoB should appear first.

Angelo has kept some patches I made on some industrial product I'm working on.
I ask him to make them properly, because I don't have time to clean up them.

Michael

>
> The next comment is: are you sure the service files / init script are
> related to the version bump ? They seem to be unrelated to the version
> bump. Could you clarify that ? Keep in mind that we want one logical
> change per commit.
>
> > diff --git a/package/cups-filters/Config.in b/package/cups-filters/Config.in
> > index 9e4e37ca6b..26e8d4aa06 100644
> > --- a/package/cups-filters/Config.in
> > +++ b/package/cups-filters/Config.in
> > @@ -8,6 +8,9 @@ config BR2_PACKAGE_CUPS_FILTERS
> >       depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
> >       depends on BR2_PACKAGE_CUPS
> >       depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11
> > +     select BR2_PACKAGE_DEJAVU
> > +     select BR2_PACKAGE_DEJAVU_SANS
> > +     select BR2_PACKAGE_DEJAVU_SERIF
>
> Why DejaVu specifically, and not any other font ?
>
>
> > +case "$1" in
> > +     start)
> > +             printf "Starting cups-browsed: "
> > +             start-stop-daemon -S -q -m -p /var/run/cups-browsed.pid \
> > +                     -b -x cups-browsed -- -c /etc/cups/cups-browsed.conf
> > +             [ $? = 0 ] && echo "OK" || echo "FAIL"
> > +             ;;
> > +     stop)
> > +             printf "Stopping cups-browsed: "
> > +             start-stop-daemon -K -q -p /var/run/cups-browsed.pid
> > +             [ $? = 0 ] && echo "OK" || echo "FAIL"
> > +             ;;
>
> Please use package/busybox/S01syslodg as a template for new init
> script. We try to increase the consistency between init scripts.
>
>
> > -CUPS_FILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg
> > +CUPS_FILTERS_DEPENDENCIES = cups libglib2 lcms2 qpdf fontconfig freetype jpeg dejavu
> >
> >  CUPS_FILTERS_CONF_OPTS = \
> >       --disable-mutool \
> > @@ -19,7 +19,10 @@ 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 \
>
>         --without-rcdir \
>
> > +     --with-fontdir=$(STAGING_DIR)/usr/share/fonts/ \
>
> How is this path used ? Only at build time ? Or also on the target (in
> which case it would be wrong).
>
> > +     --with-test-font-path=$(STAGING_DIR)/usr/share/fonts/dejavu/DejaVuSans.ttf
>
> So, what is this used for exactly ?
>
> >
> >  ifeq ($(BR2_PACKAGE_LIBPNG),y)
> >  CUPS_FILTERS_CONF_OPTS += --with-png
> > @@ -71,4 +74,15 @@ else
> >  CUPS_FILTERS_CONF_OPTS += --disable-poppler
> >  endif
> >
> > +define CUPS_FILTERS_INSTALL_INIT_SYSV
> > +     @$(RM) $(TARGET_DIR)/etc/init.d/cups-browsed
>
> Shouldn't this be removed unconditionally, i.e even in the systemd case?
>
> Also, drop the @ at the beginning of the line.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com



-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |

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

* [Buildroot] [PATCH v2 7/7] package/qt5: Enable cups support when BR2_PACKAGE_CUPS
  2020-06-19 14:57 ` [Buildroot] [PATCH v2 7/7] package/qt5: Enable cups support when BR2_PACKAGE_CUPS Angelo Compagnucci
@ 2020-06-20 20:47   ` Thomas Petazzoni
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Petazzoni @ 2020-06-20 20:47 UTC (permalink / raw)
  To: buildroot

On Fri, 19 Jun 2020 16:57:19 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> From: Michael Trimarchi <michael@amarulasolutions.com>
> 
> Cups support in QT should be enable if CUPS is available system wide.
> 
> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
> ---
>  package/qt5/qt5base/qt5base.mk | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Applied to master, thanks.

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

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

* [Buildroot] [PATCH v2 3/7] package/cups: bump to version 2.3.3
  2020-06-20 20:35   ` Thomas Petazzoni
@ 2020-06-20 20:48     ` Angelo Compagnucci
  2020-06-20 20:55       ` Thomas Petazzoni
  0 siblings, 1 reply; 21+ messages in thread
From: Angelo Compagnucci @ 2020-06-20 20:48 UTC (permalink / raw)
  To: buildroot

On Sat, Jun 20, 2020 at 10:35 PM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello Angelo,
>
> On Fri, 19 Jun 2020 16:57:15 +0200
> Angelo Compagnucci <angelo@amarulasolutions.com> wrote:
>
> > This patch bumps cups to version 2.3.3.
> > While bumping, fixing also the wrong installation of service files:
> > the rcdir was left to the default value, that means installing the
> > service files into the /etc/rcX.d directory.
> > Adding also a simplified systemv service file for loading cupsd.
>
> Again, this seems to be mixing up different changes together in the
> same commit. If I understand correctly what you're saying, you should
> have at least three different commits:
>
>  - Fix the rcdir value, due to which the systemd service file was not
>    installed at the right place.
>
>  - Provide and install an init script
>
>  - Bump the version.
>

It's really that important to split it? No problem to do that, but this
package installs a service and the way it is doing in the new version is
the one proposed in the patch. The old version could have been different,
I've not checked btw.
Anyway, having this is required to have the service correctly installed, so
I don't think the patch should be splitted because the bump really requires
it.
Probably the commit message could be better explaining this.


> > Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
> > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
>
> Same issue as PATCH 2/7 about author/SoB.
>
>
> > diff --git a/package/cups/S81cupsd b/package/cups/S81cupsd
> > new file mode 100644
> > index 0000000000..f527d55f1e
> > --- /dev/null
> > +++ b/package/cups/S81cupsd
>
> Please take inspiration from package/busybox/S01syslogd.
>

Will do.


> > -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
> > @@ -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
>
>         --without-rcdir
>
> > +define CUPS_INSTALL_INIT_SYSV
> > +     @$(RM) $(TARGET_DIR)/etc/init.d/cups
>
> This should also be done in the systemd case I believe, and should not
> have the @.
>

Not for systemd, cause the package installs the .service file and not the
systemv related ones.


>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200620/e867f725/attachment.html>

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

* [Buildroot] [PATCH v2 2/7] package/cups-filters: bump to version 1.27.5
  2020-06-20 20:42     ` Michael Nazzareno Trimarchi
@ 2020-06-20 20:53       ` Thomas Petazzoni
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Petazzoni @ 2020-06-20 20:53 UTC (permalink / raw)
  To: buildroot

On Sat, 20 Jun 2020 22:42:10 +0200
Michael Nazzareno Trimarchi <michael@amarulasolutions.com> wrote:

> > If Michael is the first SoB, then he is the author of the patch, and we
> > should have his From: line, like it appears for PATCH 1/7. Otherwise,
> > if you (Angelo) are the author, your SoB should appear first.  
> 
> Angelo has kept some patches I made on some industrial product I'm working on.
> I ask him to make them properly, because I don't have time to clean up them.

Then, you should be the author of those commits, which will lead git to
automatically add a "From:" field with your name/e-mail in the e-mail
being sent. It's just a matter of Angelo making sure that the commit
author remains set to your name/email when rebasing/reworking the
patches.

Thanks!

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

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

* [Buildroot] [PATCH v2 3/7] package/cups: bump to version 2.3.3
  2020-06-20 20:48     ` Angelo Compagnucci
@ 2020-06-20 20:55       ` Thomas Petazzoni
  2020-06-20 21:53         ` Angelo Compagnucci
  0 siblings, 1 reply; 21+ messages in thread
From: Thomas Petazzoni @ 2020-06-20 20:55 UTC (permalink / raw)
  To: buildroot

On Sat, 20 Jun 2020 22:48:55 +0200
Angelo Compagnucci <angelo@amarulasolutions.com> wrote:

> It's really that important to split it? No problem to do that, but this
> package installs a service and the way it is doing in the new version is
> the one proposed in the patch. The old version could have been different,
> I've not checked btw.
> Anyway, having this is required to have the service correctly installed, so
> I don't think the patch should be splitted because the bump really requires
> it.

How is this related to the bump? Is it the version bump that adds the
service file? Or did it already exist before the bump?

> > > +define CUPS_INSTALL_INIT_SYSV
> > > +     @$(RM) $(TARGET_DIR)/etc/init.d/cups  
> >
> > This should also be done in the systemd case I believe, and should not
> > have the @.
> >  
> 
> Not for systemd, cause the package installs the .service file and not the
> systemv related ones.

OK, I see: when --enable-systemd is used to build cups, it doesn't
install its own init script. Makes sense. Thanks for explaining this
aspect!

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

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

* [Buildroot] [PATCH v2 3/7] package/cups: bump to version 2.3.3
  2020-06-20 20:55       ` Thomas Petazzoni
@ 2020-06-20 21:53         ` Angelo Compagnucci
  2020-06-21 12:10           ` Thomas Petazzoni
  0 siblings, 1 reply; 21+ messages in thread
From: Angelo Compagnucci @ 2020-06-20 21:53 UTC (permalink / raw)
  To: buildroot

Il sab 20 giu 2020, 22:55 Thomas Petazzoni <thomas.petazzoni@bootlin.com>
ha scritto:

> On Sat, 20 Jun 2020 22:48:55 +0200
> Angelo Compagnucci <angelo@amarulasolutions.com> wrote:
>
> > It's really that important to split it? No problem to do that, but this
> > package installs a service and the way it is doing in the new version is
> > the one proposed in the patch. The old version could have been different,
> > I've not checked btw.
> > Anyway, having this is required to have the service correctly installed,
> so
> > I don't think the patch should be splitted because the bump really
> requires
> > it.
>
> How is this related to the bump? Is it the version bump that adds the
> service file? Or did it already exist before the bump?
>

Cups is a service and a service without an init script is useless.

So, to have the new version working it needs the rcdir change and the
systemv script. Systemd script is instead fine.

If you are asking me to even fix the older version I can do that, but I'm
doing a bump and fixing at the same time because either the bump will not
work.



> > > > +define CUPS_INSTALL_INIT_SYSV
> > > > +     @$(RM) $(TARGET_DIR)/etc/init.d/cups
> > >
> > > This should also be done in the systemd case I believe, and should not
> > > have the @.
> > >
> >
> > Not for systemd, cause the package installs the .service file and not the
> > systemv related ones.
>
> OK, I see: when --enable-systemd is used to build cups, it doesn't
> install its own init script. Makes sense. Thanks for explaining this
> aspect!
>
> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200620/4e5b9534/attachment.html>

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

* [Buildroot] [PATCH v2 3/7] package/cups: bump to version 2.3.3
  2020-06-20 21:53         ` Angelo Compagnucci
@ 2020-06-21 12:10           ` Thomas Petazzoni
  0 siblings, 0 replies; 21+ messages in thread
From: Thomas Petazzoni @ 2020-06-21 12:10 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 20 Jun 2020 23:53:12 +0200
Angelo Compagnucci <angelo.compagnucci@gmail.com> wrote:

> > How is this related to the bump? Is it the version bump that adds the
> > service file? Or did it already exist before the bump?
> 
> Cups is a service and a service without an init script is useless.

Absolutely, and this is already true today, independently from your
version bump.

> So, to have the new version working it needs the rcdir change and the
> systemv script. Systemd script is instead fine.

But I guess this is also true not just for the "new version", but also
for the "current version".

> If you are asking me to even fix the older version I can do that, but I'm
> doing a bump and fixing at the same time because either the bump will not
> work.

The two things are independent, they should be addressed separately.

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

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

end of thread, other threads:[~2020-06-21 12:10 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-19 14:57 [Buildroot] [PATCH v2 0/7] Cups revamp Angelo Compagnucci
2020-06-19 14:57 ` [Buildroot] [PATCH v2 1/7] package/dejavu: Install dejavu fonts in staging dir Angelo Compagnucci
2020-06-20 20:29   ` Thomas Petazzoni
2020-06-20 20:37     ` Michael Nazzareno Trimarchi
2020-06-19 14:57 ` [Buildroot] [PATCH v2 2/7] package/cups-filters: bump to version 1.27.5 Angelo Compagnucci
2020-06-20 20:33   ` Thomas Petazzoni
2020-06-20 20:42     ` Michael Nazzareno Trimarchi
2020-06-20 20:53       ` Thomas Petazzoni
2020-06-19 14:57 ` [Buildroot] [PATCH v2 3/7] package/cups: bump to version 2.3.3 Angelo Compagnucci
2020-06-20 20:35   ` Thomas Petazzoni
2020-06-20 20:48     ` Angelo Compagnucci
2020-06-20 20:55       ` Thomas Petazzoni
2020-06-20 21:53         ` Angelo Compagnucci
2020-06-21 12:10           ` Thomas Petazzoni
2020-06-19 14:57 ` [Buildroot] [PATCH v2 4/7] package/cups: Add lp user as default cups user Angelo Compagnucci
2020-06-20 20:37   ` Thomas Petazzoni
2020-06-19 14:57 ` [Buildroot] [PATCH v2 5/7] package/cups: Add udev rules to assign usb printers group to lp Angelo Compagnucci
2020-06-20 20:39   ` Thomas Petazzoni
2020-06-19 14:57 ` [Buildroot] [PATCH v2 6/7] package/cups: adding python support Angelo Compagnucci
2020-06-19 14:57 ` [Buildroot] [PATCH v2 7/7] package/qt5: Enable cups support when BR2_PACKAGE_CUPS Angelo Compagnucci
2020-06-20 20:47   ` Thomas Petazzoni

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