Cups revamp
v2 cover Cups revamp
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
Signature · 1 line
2.25.1
PATCH v2 1/7 package/dejavu: Install dejavu fonts in staging dir
From: Michael Trimarchi <[email protected]>
The dejavu font is used by cups-filters and needs to be installed in staging directory.
--- package/dejavu/dejavu.mk | 9 +++++++++ 1 file changed, 9 insertions(+)
package/dejavu/dejavu.mk +9 -0
@@ -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 \
Signature · 1 line
2.25.1
PATCH v2 1/7 package/dejavu: Install dejavu fonts in staging dir
Hello Angelo,
Quoted 7 lines · On Fri, 19 Jun 2020 16:57:13 +0200 Angelo Compagnucci…
From: Michael Trimarchi <[email protected]>
The dejavu font is used by cups-filters and needs to be installed in staging directory.
Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Angelo Compagnucci <[email protected]>
The question is why should we do this just for the DejaVu fonts ? And not other font packages ?
package/dejavu/dejavu.mk define DEJAVU_FONTCONFIG_CONF_INSTALL_CMDS · line 64
Quoted 11 lines
package/dejavu/dejavu.mk +8
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 1/7 package/dejavu: Install dejavu fonts in staging dir
Hi
Quoted 8 lines · Thomas Petazzoni
Hello Angelo,
Quoted 2 lines · On Fri, 19 Jun 2020 16:57:13 +0200 Angelo Compagnucci…
From: Michael Trimarchi <[email protected]>
Quoted 8 lines
Quoted 5 lines
The dejavu font is used by cups-filters and needs to be installed in staging directory.
Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Angelo Compagnucci <[email protected]>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
Quoted 22 lines
package/dejavu/dejavu.mk define DEJAVU_FONTCONFIG_CONF_INSTALL_CMDS · line 64
Quoted 12 lines
package/dejavu/dejavu.mk +8
-0+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
Signature · 4 lines
| Michael Nazzareno Trimarchi Amarula Solutions BV | | COO - Founder Cruquiuskade 47 | | +31(0)851119172 Amsterdam 1018 AM NL | | [`as] http://www.amarulasolutions.com |
PATCH v2 2/7 package/cups-filters: bump to version 1.27.5
In reply to Angelo CompagnucciThis patch bumps cups-filters to version 1.27.5.
While bumping, fixing also the missing installation for the service files for cups-browsed.
--- 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
package/cups-filters/Config.in +3 -0
@@ -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
package/cups-filters/S82cups-browsed new file +23 -0
@@ -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
package/cups-filters/cups-filters.hash +1 -1
@@ -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
package/cups-filters/cups-filters.mk +17 -3
@@ -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))
Signature · 1 line
2.25.1
PATCH v2 2/7 package/cups-filters: bump to version 1.27.5
Quoted 6 lines · On Fri, 19 Jun 2020 16:57:14 +0200 Angelo Compagnucci…
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 <[email protected]>Signed-off-by Angelo Compagnucci <[email protected]>
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.
package/cups-filters/Config.in config BR2_PACKAGE_CUPS_FILTERS · line 13
Quoted 11 lines
package/cups-filters/Config.in +3
-0@@ -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 ?
package/cups-filters/Config.in config BR2_PACKAGE_CUPS_FILTERS
Quoted 12 lines
package/cups-filters/Config.in +12
-0+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.
package/cups-filters/Config.in CUPS_FILTERS_CONF_OPTS = \ · line 23
Quoted 12 lines
package/cups-filters/Config.in +3
-2-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 \
package/cups-filters/Config.in CUPS_FILTERS_CONF_OPTS = \ · line 24
Quoted 1 line
package/cups-filters/Config.in +1
-0+ --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).
package/cups-filters/Config.in CUPS_FILTERS_CONF_OPTS = \ · line 25
Quoted 1 line
package/cups-filters/Config.in +1
-0+ --with-test-font-path=$(STAGING_DIR)/usr/share/fonts/dejavu/DejaVuSans.ttf
So, what is this used for exactly ?
package/cups-filters/Config.in else · line 78
Quoted 9 lines
package/cups-filters/Config.in +2
-0ifeq ($(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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 2/7 package/cups-filters: bump to version 1.27.5
Hi Thomas
Quoted 8 lines · Thomas Petazzoni
Quoted 4 lines · On Fri, 19 Jun 2020 16:57:14 +0200 Angelo Compagnucci…
This patch bumps cups-filters to version 1.27.5.
While bumping, fixing also the missing installation for the service files for cups-browsed.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Angelo Compagnucci <[email protected]>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
Quoted 83 lines
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.
package/cups-filters/Config.in config BR2_PACKAGE_CUPS_FILTERS · line 13
Quoted 11 lines
package/cups-filters/Config.in +3
-0@@ -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_SERIFWhy DejaVu specifically, and not any other font ?
package/cups-filters/Config.in config BR2_PACKAGE_CUPS_FILTERS
Quoted 12 lines
package/cups-filters/Config.in +12
-0+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.
package/cups-filters/Config.in CUPS_FILTERS_CONF_OPTS = \ · line 23
Quoted 12 lines
package/cups-filters/Config.in +3
-2-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 \package/cups-filters/Config.in CUPS_FILTERS_CONF_OPTS = \ · line 24
Quoted 1 line
package/cups-filters/Config.in +1
-0+ --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).
package/cups-filters/Config.in CUPS_FILTERS_CONF_OPTS = \ · line 25
Quoted 1 line
package/cups-filters/Config.in +1
-0+ --with-test-font-path=$(STAGING_DIR)/usr/share/fonts/dejavu/DejaVuSans.ttfSo, what is this used for exactly ?
package/cups-filters/Config.in else · line 78
Quoted 9 lines
package/cups-filters/Config.in +2
-0ifeq ($(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-browsedShouldn'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
Signature · 4 lines
| Michael Nazzareno Trimarchi Amarula Solutions BV | | COO - Founder Cruquiuskade 47 | | +31(0)851119172 Amsterdam 1018 AM NL | | [`as] http://www.amarulasolutions.com |
PATCH v2 2/7 package/cups-filters: bump to version 1.27.5
Quoted 6 lines · On Sat, 20 Jun 2020 22:42:10 +0200 Michael Nazzareno Trimarchi…
Quoted 3 lines
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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 3/7 package/cups: bump to version 2.3.3
In reply to Angelo CompagnucciThis 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.
--- ...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
package/cups/0001-Remove-man-from-BUILDDIRS-in-configure.patch +5 -3
@@ -6,15 +6,17 @@ Subject: [PATCH] Remove man from BUILDDIRS in configure Signed-off-by: Bernd Kuhls <[email protected]> [Fabrice: updated for 2.3.0] Signed-off-by: Fabrice Fontaine <[email protected]> +[Michael: updated for 2.3.3] +Signed-off-by: Michael Trimarchi <[email protected]> --- 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
package/cups/0002-Do-not-use-genstrings.patch +8 -6
@@ -16,23 +16,25 @@ genstrings call.] Signed-off-by: Thomas Petazzoni <[email protected]> [Fabrice: updated for 2.3.0] Signed-off-by: Fabrice Fontaine <[email protected]> +[Michael: updated for 2.3.3] +Signed-off-by: Michael Trimarchi <[email protected]> --- 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
package/cups/0004-Remove-PIE-flags-from-the-build.patch +5 -3
@@ -13,15 +13,17 @@ Signed-off-by: Thomas Petazzoni <[email protected]> Signed-off-by: Olivier Schonken <[email protected]> [Fabrice: updated for 2.3.0] Signed-off-by: Fabrice Fontaine <[email protected]> +[Michael: updated for 2.3.3] +Signed-off-by: Michael Trimarchi <[email protected]> --- 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
package/cups/S81cupsd new file +23 -0
@@ -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
package/cups/cups.hash +1 -1
@@ -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
package/cups/cups.mk +9 -2
@@ -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))
Signature · 1 line
2.25.1
PATCH v2 3/7 package/cups: bump to version 2.3.3
Hello Angelo,
Quoted 5 lines · On Fri, 19 Jun 2020 16:57:15 +0200 Angelo Compagnucci…
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.ddirectory.
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.
Quoted 2 lines
Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Angelo Compagnucci <[email protected]>
Same issue as PATCH 2/7 about author/SoB.
package/cups/S81cupsd
Quoted 5 lines
package/cups/S81cupsd new file +0
-0
Please take inspiration from package/busybox/S01syslogd.
package/cups/S81cupsd CUPS_CONF_OPTS = \ · line 25
Quoted 12 lines
package/cups/S81cupsd new file +3
-2-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
package/cups/S81cupsd CUPS_CONF_OPTS = \ · line 27
Quoted 2 lines
package/cups/S81cupsd new file +2
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 3/7 package/cups: bump to version 2.3.3
Quoted 15 lines · Thomas Petazzoni
Hello Angelo,
Quoted 5 lines · On Fri, 19 Jun 2020 16:57:15 +0200 Angelo Compagnucci…
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.ddirectory.
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:
Quoted 7 lines
- 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.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Angelo Compagnucci <[email protected]>Same issue as PATCH 2/7 about author/SoB.
Quoted 8 lines
package/cups/S81cupsd
Quoted 5 lines
package/cups/S81cupsd new file +0
-0Please take inspiration from package/busybox/S01syslogd.
Will do.
Quoted 16 lines
package/cups/S81cupsd
Quoted 4 lines
package/cups/S81cupsd new file +1
-1-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)
package/cups/S81cupsd CUPS_CONF_OPTS = \ · line 25
Quoted 8 lines
CUPS_LICENSE= Apache-2.0 with GPL-2.0/LGPL-2.0 exceptionpackage/cups/S81cupsd new file +2
-1@@ -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
Quoted 6 lines
package/cups/S81cupsd CUPS_CONF_OPTS = \ · line 27
Quoted 2 lines
package/cups/S81cupsd new file +2
-0+define CUPS_INSTALL_INIT_SYSV + @$(RM) $(TARGET_DIR)/etc/init.d/cupsThis 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.
Quoted 9 lines
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>
PATCH v2 3/7 package/cups: bump to version 2.3.3
Quoted 7 lines · On Sat, 20 Jun 2020 22:48:55 +0200 Angelo Compagnucci…
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?
Quoted 9 lines
Quoted 6 lines
package/cups/cups.mk else · line 76
Quoted 2 lines
package/cups/cups.mk +2
-0+define CUPS_INSTALL_INIT_SYSV + @$(RM) $(TARGET_DIR)/etc/init.d/cupsThis 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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 3/7 package/cups: bump to version 2.3.3
Il sab 20 giu 2020, 22:55 Thomas Petazzoni <[email protected]> ha scritto:
Quoted 8 lines
Quoted 5 lines · On Sat, 20 Jun 2020 22:48:55 +0200 Angelo Compagnucci…
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,
Quoted 8 lines
so
Quoted 1 line
I don't think the patch should be splitted because the bump really
requires
Quoted 1 line
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.
Quoted 14 lines
Quoted 9 lines
Quoted 6 lines
package/cups/cups.mk else · line 76
Quoted 2 lines
package/cups/cups.mk +2
-0+define CUPS_INSTALL_INIT_SYSV + @$(RM) $(TARGET_DIR)/etc/init.d/cupsThis 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!
Quoted 10 lines
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>
PATCH v2 3/7 package/cups: bump to version 2.3.3
Hello,
Quoted 4 lines · On Sat, 20 Jun 2020 23:53:12 +0200 Angelo Compagnucci…
Quoted 2 lines
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.
Quoted 2 lines
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".
Quoted 3 lines
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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 4/7 package/cups: Add lp user as default cups user
In reply to Angelo CompagnucciThis patch is a backport from the rockchip tree.
Author: Jeffy Chen <[email protected]> Date: Tue Nov 13 18:25:34 2018 +0800
package: cups: Add lp user as default cups user
but fixes the CUPS_USERS table.
--- package/cups/cups.mk | 8 ++++++++ 1 file changed, 8 insertions(+)
package/cups/cups.mk +8 -0
@@ -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))
Signature · 1 line
2.25.1
PATCH v2 4/7 package/cups: Add lp user as default cups user
Hello,
Quoted 1 line · On Fri, 19 Jun 2020 16:57:16 +0200 Angelo Compagnucci…
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.
package/cups/cups.mk CUPS_CONF_OPTS = \ · line 27
Quoted 11 lines
package/cups/cups.mk +3
-0@@ -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?
package/cups/cups.mk define CUPS_INSTALL_INIT_SYSV · line 86
Quoted 10 lines
package/cups/cups.mk +3
-0--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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 5/7 package/cups: Add udev rules to assign usb printers group to lp
In reply to Angelo CompagnucciThis patch is based on patch from the rockchip tree:
commit c8a337593660f27379c30248a11bf08dc8712113
Author: Jeffy Chen <[email protected]> Date: Tue Nov 13 18:59:43 2018 +0800
package: cups: Add udev rules to assign usb printers' group to lp
--- 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
package/cups/70-usb-printers.rules new file +4 -0
@@ -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"
package/cups/cups.mk +9 -0
@@ -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 \
Signature · 1 line
2.25.1
PATCH v2 5/7 package/cups: Add udev rules to assign usb printers group to lp
Hello Angelo,
Quoted 23 lines · On Fri, 19 Jun 2020 16:57:17 +0200 Angelo Compagnucci…
commit
c8a337593660f27379c30248a11bf08dc8712113Author: Jeffy Chen <[email protected]> Date: Tue Nov 13 18:59:43 2018 +0800package: cups: Add udev rules to assign usb printers' group to lp
Change-Id Ieae17deaa7d3623e1f0e1cc826871f1719d98d88Signed-off-by Jeffy Chen <[email protected]>Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Angelo Compagnucci <[email protected]>--- 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.rulespackage/cups/70-usb-printers.rules new file +0
-0
package/cups/70-usb-printers.rules line 3
Quoted 3 lines
package/cups/70-usb-printers.rules new file +3
-0@@ -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.
package/cups/70-usb-printers.rules line 4
Quoted 1 line
package/cups/70-usb-printers.rules new file +1
-0+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
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 6/7 package/cups: adding python support
In reply to Angelo CompagnucciEnables python support if python is available.
--- package/cups/cups.mk | 7 +++++++ 1 file changed, 7 insertions(+)
package/cups/cups.mk +7 -0
@@ -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 \
Signature · 1 line
2.25.1
PATCH v2 7/7 package/qt5: Enable cups support when BR2_PACKAGE_CUPS
In reply to Angelo CompagnucciFrom: Michael Trimarchi <[email protected]>
Cups support in QT should be enable if CUPS is available system wide.
--- package/qt5/qt5base/qt5base.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
package/qt5/qt5base/qt5base.mk +7 -1
@@ -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)
Signature · 1 line
2.25.1
Thomas Petazzoni
AppliedPATCH v2 7/7 package/qt5: Enable cups support when BR2_PACKAGE_CUPS
Quoted 9 lines · On Fri, 19 Jun 2020 16:57:19 +0200 Angelo Compagnucci…
From: Michael Trimarchi <[email protected]>
Cups support in QT should be enable if CUPS is available system wide.
Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Angelo Compagnucci <[email protected]>--- package/qt5/qt5base/qt5base.mk | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com