Re: [ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System

2017-10-04 Thread Juergen Borleis
Hi Roland,

On Wednesday 27 September 2017 14:22:20 Roland Hieber wrote:
> [...]
> +ifdef PTXCONF_CUPS_SSL
> + @$(call install_copy, cups, daemon, lp, /etc/cups/ssl/)

This line fails with:

environment: line 22: 0/etc/cups/ssl & ~06000 : division by 0 (error token is 
"etc/cups/ssl & ~06000 ")
Error: install_dir failed!

because the permissions are missing.

Juergen

-- 
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System

2017-09-30 Thread Michael Olbrich
On Wed, Sep 27, 2017 at 02:22:20PM +0200, Roland Hieber wrote:
> If using systemd, CUPS can be started via socket activation or directly,
> in any case it is run as user daemon, group lp. The default spool and
> cache locations were moved to /tmp/cups so we don't need to set up a
> tmpfs for /var/spool/cups and /var/cache/cups.
> 
> sysvinit script is installed from upstream, but untested.
> 
> Some config files are only created by cupsd on the first start and not
> at install time, so we supply reasonable defaults in projectroot/ in
> order to use $(call install_alternative...) on them.
> 
> Signed-off-by: Roland Hieber 
> ---
> 
> Notes:
> changes in v1 -> v2:
>  - move CUPS_BBINIT_LINK into separate .in file
>  - correct license specification
>  - improve scripting languages integration (via configure.ac patch)
>  - change hard php-cli dependency into soft dependency of php-cli or 
> php-cgi
>  - break long lines in cups.make
>  - targetinstall: install links to cupsaccept into /sbin
>  - targetinstall: use user/group names instead of IDs
>  - targetinstall: create config directories with correct permissions
>  - targetinstall: fix permissions for readonly config files
> 
>  ...llow-explicit-disabling-of-Java-PHP-Perl-.patch |  92 
>  ...-remove-leftover-check-for-empty-CUPS_PHP.patch |  29 +++
>  ...e-make-interpreter-detection-more-verbose.patch |  88 
>  patches/cups-2.2.4/autogen.sh  |   7 +
>  patches/cups-2.2.4/series  |   6 +
>  projectroot/etc/cups/classes.conf  |   1 +
>  projectroot/etc/cups/client.conf   |   2 +
>  projectroot/etc/cups/cups-files.conf   |  22 ++
>  projectroot/etc/cups/mailto.conf   |   1 +
>  projectroot/etc/cups/ppd/.createdirectory  |   0
>  projectroot/etc/cups/printers.conf |   1 +
>  projectroot/etc/cups/ssl/.createdirectory  |   0
>  projectroot/etc/printcap   |   3 +
>  projectroot/usr/lib/systemd/system/cups.service|  15 ++
>  projectroot/usr/lib/systemd/system/cups.socket |  14 ++
>  projectroot/usr/lib/tmpfiles.d/cups.conf   |   6 +
>  rules/cups-bbinit.in   |   8 +
>  rules/cups.in  | 140 
>  rules/cups.make| 243 
> +
>  19 files changed, 678 insertions(+)
>  create mode 100644 
> patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
>  create mode 100644 
> patches/cups-2.2.4/0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch
>  create mode 100644 
> patches/cups-2.2.4/0003-configure-make-interpreter-detection-more-verbose.patch
>  create mode 100755 patches/cups-2.2.4/autogen.sh
>  create mode 100644 patches/cups-2.2.4/series
>  create mode 100644 projectroot/etc/cups/classes.conf
>  create mode 100644 projectroot/etc/cups/client.conf
>  create mode 100644 projectroot/etc/cups/cups-files.conf
>  create mode 100644 projectroot/etc/cups/mailto.conf
>  create mode 100644 projectroot/etc/cups/ppd/.createdirectory
>  create mode 100644 projectroot/etc/cups/printers.conf
>  create mode 100644 projectroot/etc/cups/ssl/.createdirectory
>  create mode 100644 projectroot/etc/printcap
>  create mode 100644 projectroot/usr/lib/systemd/system/cups.service
>  create mode 100644 projectroot/usr/lib/systemd/system/cups.socket
>  create mode 100644 projectroot/usr/lib/tmpfiles.d/cups.conf
>  create mode 100644 rules/cups-bbinit.in
>  create mode 100644 rules/cups.in
>  create mode 100644 rules/cups.make
> 
> diff --git 
> a/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
>  
> b/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
> new file mode 100644
> index 0..f110f5aaa
> --- /dev/null
> +++ 
> b/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
> @@ -0,0 +1,92 @@
> +From: Roland Hieber 
> +Date: Mon, 25 Sep 2017 15:00:16 +0200
> +Subject: [PATCH] configure: allow explicit disabling of Java/PHP/Perl/Python
> + support
> +
> +Currently, when configure is called with --with-java or --with-java=,
> +auto-detection is performed. When called with --without-java, HAVE_JAVA
> +is still being defined. This is unfortunate when cross-compiling for
> +embedded systems, we would end up with Java on the host being
> +auto-detected (which is not what we have on the target), or with a wrong
> +HAVE_JAVA define. We need a way to explicitely disable scripting support
> +for all supported languages.
> +
> +Forwarded: https://github.com/apple/cups/pull/5122
> +Signed-off-by: Roland Hieber 
> +---
> + config-scripts/cups-scripting.m4 | 24 
> + 1 file changed, 16 insertions(+), 8 deletions(-)
> +

[ptxdist] [PATCH v2 5/7] cups: new package: Common Unix Printing System

2017-09-27 Thread Roland Hieber
If using systemd, CUPS can be started via socket activation or directly,
in any case it is run as user daemon, group lp. The default spool and
cache locations were moved to /tmp/cups so we don't need to set up a
tmpfs for /var/spool/cups and /var/cache/cups.

sysvinit script is installed from upstream, but untested.

Some config files are only created by cupsd on the first start and not
at install time, so we supply reasonable defaults in projectroot/ in
order to use $(call install_alternative...) on them.

Signed-off-by: Roland Hieber 
---

Notes:
changes in v1 -> v2:
 - move CUPS_BBINIT_LINK into separate .in file
 - correct license specification
 - improve scripting languages integration (via configure.ac patch)
 - change hard php-cli dependency into soft dependency of php-cli or php-cgi
 - break long lines in cups.make
 - targetinstall: install links to cupsaccept into /sbin
 - targetinstall: use user/group names instead of IDs
 - targetinstall: create config directories with correct permissions
 - targetinstall: fix permissions for readonly config files

 ...llow-explicit-disabling-of-Java-PHP-Perl-.patch |  92 
 ...-remove-leftover-check-for-empty-CUPS_PHP.patch |  29 +++
 ...e-make-interpreter-detection-more-verbose.patch |  88 
 patches/cups-2.2.4/autogen.sh  |   7 +
 patches/cups-2.2.4/series  |   6 +
 projectroot/etc/cups/classes.conf  |   1 +
 projectroot/etc/cups/client.conf   |   2 +
 projectroot/etc/cups/cups-files.conf   |  22 ++
 projectroot/etc/cups/mailto.conf   |   1 +
 projectroot/etc/cups/ppd/.createdirectory  |   0
 projectroot/etc/cups/printers.conf |   1 +
 projectroot/etc/cups/ssl/.createdirectory  |   0
 projectroot/etc/printcap   |   3 +
 projectroot/usr/lib/systemd/system/cups.service|  15 ++
 projectroot/usr/lib/systemd/system/cups.socket |  14 ++
 projectroot/usr/lib/tmpfiles.d/cups.conf   |   6 +
 rules/cups-bbinit.in   |   8 +
 rules/cups.in  | 140 
 rules/cups.make| 243 +
 19 files changed, 678 insertions(+)
 create mode 100644 
patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
 create mode 100644 
patches/cups-2.2.4/0002-configure-remove-leftover-check-for-empty-CUPS_PHP.patch
 create mode 100644 
patches/cups-2.2.4/0003-configure-make-interpreter-detection-more-verbose.patch
 create mode 100755 patches/cups-2.2.4/autogen.sh
 create mode 100644 patches/cups-2.2.4/series
 create mode 100644 projectroot/etc/cups/classes.conf
 create mode 100644 projectroot/etc/cups/client.conf
 create mode 100644 projectroot/etc/cups/cups-files.conf
 create mode 100644 projectroot/etc/cups/mailto.conf
 create mode 100644 projectroot/etc/cups/ppd/.createdirectory
 create mode 100644 projectroot/etc/cups/printers.conf
 create mode 100644 projectroot/etc/cups/ssl/.createdirectory
 create mode 100644 projectroot/etc/printcap
 create mode 100644 projectroot/usr/lib/systemd/system/cups.service
 create mode 100644 projectroot/usr/lib/systemd/system/cups.socket
 create mode 100644 projectroot/usr/lib/tmpfiles.d/cups.conf
 create mode 100644 rules/cups-bbinit.in
 create mode 100644 rules/cups.in
 create mode 100644 rules/cups.make

diff --git 
a/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
 
b/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
new file mode 100644
index 0..f110f5aaa
--- /dev/null
+++ 
b/patches/cups-2.2.4/0001-configure-allow-explicit-disabling-of-Java-PHP-Perl-.patch
@@ -0,0 +1,92 @@
+From: Roland Hieber 
+Date: Mon, 25 Sep 2017 15:00:16 +0200
+Subject: [PATCH] configure: allow explicit disabling of Java/PHP/Perl/Python
+ support
+
+Currently, when configure is called with --with-java or --with-java=,
+auto-detection is performed. When called with --without-java, HAVE_JAVA
+is still being defined. This is unfortunate when cross-compiling for
+embedded systems, we would end up with Java on the host being
+auto-detected (which is not what we have on the target), or with a wrong
+HAVE_JAVA define. We need a way to explicitely disable scripting support
+for all supported languages.
+
+Forwarded: https://github.com/apple/cups/pull/5122
+Signed-off-by: Roland Hieber 
+---
+ config-scripts/cups-scripting.m4 | 24 
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/config-scripts/cups-scripting.m4 
b/config-scripts/cups-scripting.m4
+index bff3e9a0505c..137c3be72cb0 100644
+--- a/config-scripts/cups-scripting.m4
 b/config-scripts/cups-scripting.m4
+@@ -14,11 +14,13 @@ dnl
+ dnl Do we have Java?
+