Re: [ptxdist] [PATCH v2 7/7] cups-filters: new package: additional filters and backends for CUPS

2017-09-30 Thread Michael Olbrich
On Wed, Sep 27, 2017 at 02:22:22PM +0200, Roland Hieber wrote:
> Upstream is very responsive, merged my patches and made a new release
> while I was still packaging the old one :) Release frequency is high,
> with 5 point releases in September alone, mostly small fixes.
> 
> Signed-off-by: Roland Hieber 
> ---
> 
> Notes:
> changes in v1 -> v2:
>  - kconfig changes due to poppler float/fixed simplification
>  - version bump 1.16.6 -> 1.17.7 (they release fast!)
>  - remove unneeded code
> 
>  rules/cups-filters.in   | 67 +++
>  rules/cups-filters.make | 94 
> +
>  2 files changed, 161 insertions(+)
>  create mode 100644 rules/cups-filters.in
>  create mode 100644 rules/cups-filters.make
> 
> diff --git a/rules/cups-filters.in b/rules/cups-filters.in
> new file mode 100644
> index 0..09652443f
> --- /dev/null
> +++ b/rules/cups-filters.in
> @@ -0,0 +1,67 @@
> +## SECTION=applications
> +
> +menuconfig CUPS_FILTERS
> + tristate
> + prompt "cups-filters  "
> +
> + select LIBC_DL
> + select HOST_CUPS
> + select CUPS
> + select GLIB
> + select ZLIB
> + select LCMS
> + select FREETYPE
> + select FONTCONFIG
> + select QPDF
> +
> + # Note: configure does not check for these poppler options:
> + select POPPLER  if CUPS_FILTERS_POPPLER
> + select POPPLER_BIN  if CUPS_FILTERS_POPPLER # for pdftops
> + select POPPLER_CPP  if CUPS_FILTERS_POPPLER
> + select POPPLER_CMS  if CUPS_FILTERS_POPPLER
> + select POPPLER_SPLASH   if CUPS_FILTERS_POPPLER
> + select POPPLER_XPDF if CUPS_FILTERS_POPPLER
> +
> + select LIBJPEG  if CUPS_FILTERS_JPEG
> + select LIBPNG   if CUPS_FILTERS_PNG
> +
> + help
> +   cups-filters contains backends, filters, and other software that
> +   was once part of the core CUPS distribution but is no longer
> +   maintained by Apple Inc. In addition it contains additional filters
> +   and software developed independently of Apple, especially filters for
> +   the PDF-centric printing workflow introduced by OpenPrinting and a
> +   daemon to browse Bonjour broadcasts of remote CUPS printers and makes
> +   these printers available locally.
> +
> +if CUPS_FILTERS
> +
> +config CUPS_FILTERS_POPPLER
> + bool "build with poppler support"
> + help
> +   Build with poppler support, needed for pdfto* filters and banners.
> +
> +comment "poppler support will not build with POPPLER_SPLASH_FIXED!"
> + depends on (POPPLER_SPLASH_FIXED && CUPS_FILTERS_POPPLER)
> +
> +config CUPS_FILTERS_IMAGEFILTERS
> + bool "build image filters"
> + help
> +   Build imagetopdf and imagetoraster filters
> +
> +config CUPS_FILTERS_JPEG
> + bool "with JPEG support"
> + depends on CUPS_FILTERS_IMAGEFILTERS
> + default y
> + help
> +   Enable JPEG support in image filters
> +
> +config CUPS_FILTERS_PNG
> + bool "with PNG support"
> + depends on CUPS_FILTERS_IMAGEFILTERS
> + default y
> + help
> +   Enable PNG support in image filters
> +
> +endif
> +# vim: ft=kconfig ts=8 noet tw=80
> diff --git a/rules/cups-filters.make b/rules/cups-filters.make
> new file mode 100644
> index 0..0f19d6c11
> --- /dev/null
> +++ b/rules/cups-filters.make
> @@ -0,0 +1,94 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Roland Hieber 
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_CUPS_FILTERS) += cups-filters
> +
> +#
> +# Paths and names
> +#
> +CUPS_FILTERS_VERSION := 1.17.7
> +CUPS_FILTERS_MD5 := 015caac191e9520abb7cde2fb9ce5961
> +CUPS_FILTERS := cups-filters-$(CUPS_FILTERS_VERSION)
> +CUPS_FILTERS_SUFFIX  := tar.xz
> +CUPS_FILTERS_URL := 
> http://openprinting.org/download/cups-filters/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
> +CUPS_FILTERS_SOURCE  := $(SRCDIR)/$(CUPS_FILTERS).$(CUPS_FILTERS_SUFFIX)
> +CUPS_FILTERS_DIR := $(BUILDDIR)/$(CUPS_FILTERS)
> +CUPS_FILTERS_LICENSE := GPL-2.0 AND GPL-2.0+ AND GPL-3.0 AND GPL-3.0+ AND 
> LGPL-2 AND LGPL-2.1+ AND MIT AND BSD-4-clause
> +
> +# 
> 
> +# Prepare
> +# 
> 
> +
> +#
> +# autoconf
> +#
> +# We have to set --exec-prefix and --libdir, otherwise the libs end up in
> +# ${prefix}/lib64 due to broken autoconf magic, which is not what we want.
> +#
> +CUPS_FILTERS_CONF_TOOL   := autoconf
> +CUPS_FILTERS_CONF_OPT:= \
> + $(CROSS_AUTOCONF_USR) \
> + 

Re: [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools

2017-09-30 Thread Michael Olbrich
On Wed, Sep 27, 2017 at 02:22:21PM +0200, Roland Hieber wrote:
> Most printer drivers compile model-specific PPDs from a generic schema
> during the build process, using ppdc, the PPD compiler. ppdc must be
> able to find CUPS' internal include files, which are architecture-
> independent and can be used from sysroot-host.
> 
> Unfortunately, the CUPS build system is rather inflexible, so we have to
> build the whole core distribution to get a working ppdc.
> 
> Signed-off-by: Roland Hieber 
> ---
> 
> Notes:
> changes in v1 -> v2:
>  - remove unused code in host-cups.make
>  - compile ppdc in compile stage, not in install stage
>  - use @$(call compile) and $(call install), not $(MAKE) directly
>  - use --exec-prefix=/ and --libdir=/lib/ to get rid of LD_LIBRARY_PATH
>  - set CUPS_DATADIR in sysroot-cross wrapper, so an additional include 
> path is
>no longer needed, and ppdc also doesn't look for files on the host file
>system!
>  - make clean stage more silent
> 
>  rules/host-cups.in   |   7 
>  rules/host-cups.make | 114 
> +++
>  2 files changed, 121 insertions(+)
>  create mode 100644 rules/host-cups.in
>  create mode 100644 rules/host-cups.make
> 
> diff --git a/rules/host-cups.in b/rules/host-cups.in
> new file mode 100644
> index 0..45edccada
> --- /dev/null
> +++ b/rules/host-cups.in
> @@ -0,0 +1,7 @@
> +## SECTION=hosttools_noprompt
> +
> +config HOST_CUPS
> + tristate
> + default ALLYES
> +
> +# vim: ft=kconfig ts=8 noet tw=80
> diff --git a/rules/host-cups.make b/rules/host-cups.make
> new file mode 100644
> index 0..5dd88e47b
> --- /dev/null
> +++ b/rules/host-cups.make
> @@ -0,0 +1,114 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Roland Hieber 
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +HOST_PACKAGES-$(PTXCONF_HOST_CUPS) += host-cups
> +
> +# 
> 
> +# Prepare
> +# 
> 
> +
> +#
> +# autoconf
> +#
> +# The --with-* options are only used to specify strings, --without-* does
> +# nothing. So we're omitting them here. The only exception is
> +# --with-components=core, which we are setting to only builds libcups* 
> (which is
> +# needed by ppdc).
> +#
> +# We have to set --exec-prefix and --libdir, otherwise the libs end up in
> +# ${prefix}/lib64, which is not what we want.
> +#
> +HOST_CUPS_CONF_TOOL  := autoconf
> +HOST_CUPS_CONF_OPT   := \
> + $(HOST_AUTOCONF) \
> + --exec-prefix=/ \
> + --libdir=/lib/ \

same as with cups.

> + --disable-mallinfo \
> + --disable-libpaper \
> + --disable-libusb \
> + --disable-tcp-wrappers \
> + --disable-acl \
> + --disable-dbus \
> + --disable-libtool-unsupported \
> + --disable-debug \
> + --disable-debug-guards \
> + --disable-debug-printfs \
> + --disable-unit-tests \
> + --disable-relro \
> + --disable-gssapi \
> + --disable-threads \
> + --disable-ssl \
> + --disable-cdsassl \
> + --disable-gnutls \
> + --disable-pam \
> + --disable-largefile \
> + --disable-avahi \
> + --disable-dnssd \
> + --disable-launchd \
> + --disable-systemd \
> + --disable-upstart \
> + --disable-page-logging \
> + --disable-browsing \
> + --disable-default-shared \
> + --disable-raw-printing \
> + --disable-webif \
> + --with-components=core
> +
> +# 
> 
> +# Compile
> +# 
> 
> +
> +$(STATEDIR)/host-cups.compile:
> + @$(call targetinfo)
> + @$(call world/compile, HOST_CUPS)
> + @# ppdc isn't built by --with-components=core
> + @$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc)
> + @$(call touch)
> +
> +# 
> 
> +# Install
> +# 
> 
> +
> +HOST_CUPS_MAKE_ENV := \
> + DSTROOT=$(HOST_CUPS_PKGDIR)
> +
> +$(STATEDIR)/host-cups.install:
> + @$(call targetinfo)
> + @$(call world/install, HOST_CUPS)
> + @# ppdc isn't included in --with-components=core
> + @$(call install, HOST_CUPS, ${HOST_CUPS_DIR}/ppdc)
> + @$(call touch)
> +
> +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc
> +$(STATEDIR)/host-cups.install.post:
> + @$(call targetinfo)
> + @$(call world/install.post, HOST_CUPS)
> +
> + ( \
> + echo '#!/bin/sh'; \
> + echo 

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(-)
> +

Re: [ptxdist] [PATCH v2 4/7] poppler: version bump 0.18.0 -> 0.59.0

2017-09-30 Thread Michael Olbrich
On Wed, Sep 27, 2017 at 02:22:19PM +0200, Roland Hieber wrote:
> This is quite a version bump, spanning six years of poppler development.
> Upstream now provides data for rendering cyrillic languages in the
> package poppler-data, but this dependency is only detected at compile
> time, so make sure the build order is right.
> 
> Some applications require the old xpdf headers, the CPP wrapper or CMYK
> support, so make these configure options selectable. Same for the Splash
> backend, which can now also be built with single precision or
> fixed-point arithmetic. PNG and JPEG support is no longer broken,
> poppler now also includes an internal DCT decoder. The GTK dependency
> has been dropped (or was it even necessary in the first place?)
> 
> Don't wonder about --disable-relocatable, it only applies to Windows.
> 
> poppler allows using zlib to uncompress flate streams, but with the
> warning that this is "not totally safe", so I disabled it.
> 
> Additionally, poppler could benefit from packaging libopenjpeg and
> libtiff in ptxdist for parsing embedded JPEG2000 or TIFF in PDFs.

An option marked broken with a comment about the missing library would be
nice. We have stuff like this in gstreamer too.

> Likewise, libnss could be packaged for PDF signature support. Also

I've some libnss rules somewhere that need to be cleaned up a bit, if
you're interrested :-).

> there is the option to build a Qt5 wrapper, but I don't have a good way
> to test this, so it is currently disabled.

Just build tested is ok to start with.

> Signed-off-by: Roland Hieber 
> ---
> 
> Notes:
> changes in v1 -> v2:
>  - version bump to 0.59.0, includes our 0.57.0 patches from v1
>  - bring back old vim modeline
>  - simplify single-precision/fixed-point logic
> 
>  rules/poppler.in   | 88 
> ++
>  rules/poppler.make | 51 ++-
>  2 files changed, 106 insertions(+), 33 deletions(-)
> 
> diff --git a/rules/poppler.in b/rules/poppler.in
> index b107dc7a5..af0306493 100644
> --- a/rules/poppler.in
> +++ b/rules/poppler.in
> @@ -4,18 +4,21 @@ menuconfig POPPLER
>   tristate
>   prompt "poppler   "
>   select FONTCONFIG
> + select FREETYPE
>   select HOST_GETTEXT
> - select GLIB if POPPLER_GLIB
> - select LIBPNG   if POPPLER_PNG
> - select LIBJPEG  if POPPLER_JPEG
> - select CAIROif POPPLER_CAIRO
> - select GTK  if POPPLER_SPLASH && POPPLER_GLIB
> - select ZLIB if POPPLER_ZLIB
> - select LIBCURL  if POPPLER_CURL
> - select LCMS if POPPLER_CMS
> - select QT4  if POPPLER_QT4
> - select QT4_BUILD_GUIif POPPLER_QT4
> - select QT4_BUILD_XMLif POPPLER_QT4
> + select POPPLER_DATA if POPPLER_WITH_DATA
> + select GLIB if POPPLER_GLIB
> + select LIBPNG   if POPPLER_PNG
> + select LIBJPEG  if POPPLER_JPEG
> + select CAIROif POPPLER_CAIRO
> + select CAIRO_FREETYPE   if POPPLER_CAIRO
> + select ZLIB if POPPLER_ZLIB
> + select LIBCURL  if POPPLER_CURL
> + select LCMS if POPPLER_CMS
> + select QT4  if POPPLER_QT4
> + select QT4_BUILD_GUIif POPPLER_QT4
> + select QT4_BUILD_XMLif POPPLER_QT4
> + select QT4_BUILD_QTESTLIB   if POPPLER_QT4
>   help
> Poppler is a PDF rendering library based on the xpdf-3.0 code base.
>  
> @@ -29,6 +32,35 @@ config POPPLER_BIN
> pdffonts, pdfimages, pdfinfo, pdftoabw, pdftohtml, pdftoppm, pdftops,
> pdftotext.
>  
> +config POPPLER_XPDF
> + bool
> + prompt "install unsupported xpdf headers"
> + help
> +   Install XPDF headers for software that still depends on them.
> +   Normally, this option should not be needed.
> +
> +config POPPLER_BUILD_DEBUG
> + bool
> + prompt "enable poppler debug build"
> + help
> +   Build with debug information and without optimization. You probably
> +   don't want this in a production system.

What kind of debugging does this enable? Makefiles can easily be hacked for
development and we have a global options for debugging symbols.
Don't add package specific debug options unless there are use-cases to have
it enabled in production system. E.g. gstreamer has an option like this.

Michael

> +config POPPLER_WITH_DATA
> + bool
> + prompt "install poppler-data"
> + help
> +   poppler-data contains the encoding files which enable poppler to
> +   correctly render CJK and Cyrillic.
> +
> +config POPPLER_CMYK
> + bool
> + prompt "enable poppler CMYK raster support"
> +
> +config POPPLER_CPP
> + bool
> + prompt "enable poppler cpp wrapper"
> +
>  

Re: [ptxdist] [PATCH v2 1/7] libpaper: new package: system-wide papersize configuration

2017-09-30 Thread Michael Olbrich
On Wed, Sep 27, 2017 at 02:22:16PM +0200, Roland Hieber wrote:
> Signed-off-by: Roland Hieber 
> ---
> 
> Notes:
> changes in v1 -> v2:
>  - include list of known paper sizes in kconfig help
>  - use snapshot.debian.org URL for future stability
>  - properly use patches/autogen.sh instead of calling autoreconf in the
>prepare stage
> 
>  patches/libpaper-1.1.24+nmu5/autogen.sh |  2 +
>  rules/libpaper.in   | 38 ++
>  rules/libpaper.make | 69 
> +
>  3 files changed, 109 insertions(+)
>  create mode 100755 patches/libpaper-1.1.24+nmu5/autogen.sh
>  create mode 100644 rules/libpaper.in
>  create mode 100644 rules/libpaper.make
> 
> diff --git a/patches/libpaper-1.1.24+nmu5/autogen.sh 
> b/patches/libpaper-1.1.24+nmu5/autogen.sh
> new file mode 100755
> index 0..5d4c48990
> --- /dev/null
> +++ b/patches/libpaper-1.1.24+nmu5/autogen.sh
> @@ -0,0 +1,2 @@
> +#!/bin/sh
> +exec autoreconf --install
> diff --git a/rules/libpaper.in b/rules/libpaper.in
> new file mode 100644
> index 0..b70c1000b
> --- /dev/null
> +++ b/rules/libpaper.in
> @@ -0,0 +1,38 @@
> +## SECTION=multimedia_libs
> +
> +menuconfig LIBPAPER
> + tristate
> + prompt "libpaper  "
> + select HOST_AUTOTOOLS_AUTOCONF
> + select HOST_AUTOTOOLS_LIBTOOL
> + help
> +   System-wide paper size configuration
> +
> +if LIBPAPER
> +
> +config LIBPAPER_SIZE
> + string "default fallback paper size"
> + default "letter"
> + help
> +   Paper size that is used if nothing else is specified in
> +   /etc/papersize. Currently libpaper knows about the following formats:
> +
> +   10x14 11x17 Comm10 DL Monarch a0 a1 a10 a2 a3 a4 a5 a6 a7 a8 a9 archA
> +   archB archC archD archE b0 b1 b10 b2 b3 b4 b5 b6 b7 b8 b9 c2 c3 c4 c5
> +   c6 c7 c8 csheet dsheet esheet executive flsa flse folio halfexecutive
> +   halfletter ledger legal letter note quarto statement tabloid
> +
> +config LIBPAPER_PAPERCONFIG
> + bool "install paperconfig"
> + help
> +   Install the paperconfig tool which sets the default paper size of the
> +   system
> +
> +config LIBPAPER_PAPERCONF
> + bool "install paperconf"
> + help
> +   Install the paperconf tool which prints information about a specific
> +   paper size
> +
> +endif
> +# vim: ft=kconfig ts=8 noet tw=80
> diff --git a/rules/libpaper.make b/rules/libpaper.make
> new file mode 100644
> index 0..6107841f0
> --- /dev/null
> +++ b/rules/libpaper.make
> @@ -0,0 +1,69 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Roland Hieber 
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBPAPER) += libpaper
> +
> +#
> +# Paths and names
> +#
> +# libpaper seems to be maintained only as a Debian package, therefore the
> +# unusual versioning.
> +#
> +LIBPAPER_VERSION := 1.1.24+nmu5
> +LIBPAPER_MD5 := 38bc55688c0fc5544edaa5a951a45fbd
> +LIBPAPER := libpaper-$(LIBPAPER_VERSION)
> +LIBPAPER_SUFFIX  := tar.gz
> +LIBPAPER_URL := 
> http://snapshot.debian.org/archive/debian-debug/20161113T151229Z/pool/main/libp/libpaper/libpaper_$(LIBPAPER_VERSION).$(LIBPAPER_SUFFIX)
> +LIBPAPER_SOURCE  := $(SRCDIR)/$(LIBPAPER).$(LIBPAPER_SUFFIX)
> +LIBPAPER_DIR := $(BUILDDIR)/$(LIBPAPER)
> +LIBPAPER_LICENSE := GPL-2.0
> +
> +# 
> 
> +# Prepare
> +# 
> 
> +
> +LIBPAPER_CONF_ENV:= \
> + $(CROSS_ENV) \
> + PAPERSIZE=$(PTXCONF_LIBPAPER_SIZE)
> +#
> +# autoconf
> +#
> +LIBPAPER_CONF_TOOL := autoconf
> +#
> +# 
> 
> +# Target-Install
> +# 
> 
> +
> +$(STATEDIR)/libpaper.targetinstall:
> + @$(call targetinfo)
> +
> + @$(call install_init, libpaper)
> + @$(call install_fixup, libpaper,PRIORITY,optional)
> + @$(call install_fixup, libpaper,SECTION,base)
> + @$(call install_fixup, libpaper,AUTHOR,"Roland Hieber 
> ")
> + @$(call install_fixup, libpaper,DESCRIPTION,missing)
> +
> + @$(call install_lib, libpaper, 0, 0, 0755, libpaper)
> +
> +ifeq ($(PTXCONF_LIBPAPER_PAPERCONFIG),y)

ifdef PTXCONF_LIBPAPER_PAPERCONFIG

> + @$(call install_copy, libpaper, 0, 0, 755, -, /usr/sbin/paperconfig)
> +endif
> +ifeq ($(PTXCONF_LIBPAPER_PAPERCONF),y)

same here.

Michael

> + @$(call install_copy, libpaper, 0, 0, 755, -, /usr/bin/paperconf)
> +endif
> +
> +

Re: [ptxdist] [PATCH v2 6/7] host-cups: new package: CUPS host tools

2017-09-30 Thread Michael Olbrich
On Wed, Sep 27, 2017 at 11:40:38PM +0200, Roland Hieber wrote:
> On 27.09.2017 14:22, Roland Hieber wrote:
> [...]
> > diff --git a/rules/host-cups.make b/rules/host-cups.make
> > new file mode 100644
> > index 0..5dd88e47b
> > --- /dev/null
> > +++ b/rules/host-cups.make
> > @@ -0,0 +1,114 @@
> > +# -*-makefile-*-
> > +#
> > +# Copyright (C) 2017 by Roland Hieber 
> > +#
> > +# See CREDITS for details about who has contributed to this project.
> > +#
> > +# For further information about the PTXdist project and license conditions
> > +# see the README file.
> > +#
> > +
> > +#
> > +# We provide this package
> > +#
> > +HOST_PACKAGES-$(PTXCONF_HOST_CUPS) += host-cups
> > +
> > +# 
> > 
> > +# Prepare
> > +# 
> > 
> > +
> > +#
> > +# autoconf
> > +#
> > +# The --with-* options are only used to specify strings, --without-* does
> > +# nothing. So we're omitting them here. The only exception is
> > +# --with-components=core, which we are setting to only builds libcups* 
> > (which is
> > +# needed by ppdc).
> > +#
> > +# We have to set --exec-prefix and --libdir, otherwise the libs end up in
> > +# ${prefix}/lib64, which is not what we want.
> > +#
> > +HOST_CUPS_CONF_TOOL:= autoconf
> > +HOST_CUPS_CONF_OPT := \
> > +   $(HOST_AUTOCONF) \
> > +   --exec-prefix=/ \
> > +   --libdir=/lib/ \
> > +   --disable-mallinfo \
> > +   --disable-libpaper \
> > +   --disable-libusb \
> > +   --disable-tcp-wrappers \
> > +   --disable-acl \
> > +   --disable-dbus \
> > +   --disable-libtool-unsupported \
> > +   --disable-debug \
> > +   --disable-debug-guards \
> > +   --disable-debug-printfs \
> > +   --disable-unit-tests \
> > +   --disable-relro \
> > +   --disable-gssapi \
> > +   --disable-threads \
> > +   --disable-ssl \
> > +   --disable-cdsassl \
> > +   --disable-gnutls \
> > +   --disable-pam \
> > +   --disable-largefile \
> > +   --disable-avahi \
> > +   --disable-dnssd \
> > +   --disable-launchd \
> > +   --disable-systemd \
> > +   --disable-upstart \
> > +   --disable-page-logging \
> > +   --disable-browsing \
> > +   --disable-default-shared \
> > +   --disable-raw-printing \
> > +   --disable-webif \
> > +   --with-components=core
> > +
> > +# 
> > 
> > +# Compile
> > +# 
> > 
> > +
> > +$(STATEDIR)/host-cups.compile:
> > +   @$(call targetinfo)
> > +   @$(call world/compile, HOST_CUPS)
> > +   @# ppdc isn't built by --with-components=core
> > +   @$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc)
> > +   @$(call touch)
> > +
> > +# 
> > 
> > +# Install
> > +# 
> > 
> > +
> > +HOST_CUPS_MAKE_ENV := \
> > +   DSTROOT=$(HOST_CUPS_PKGDIR)
> > +
> > +$(STATEDIR)/host-cups.install:
> > +   @$(call targetinfo)
> > +   @$(call world/install, HOST_CUPS)
> > +   @# ppdc isn't included in --with-components=core
> > +   @$(call install, HOST_CUPS, ${HOST_CUPS_DIR}/ppdc)
> 
> Strange, this single call seems to delete already installed files. I've
> guarded this line with a
> 
>   find ${HOST_CUPS_PKGDIR}/share/
>   @$(call install, HOST_CUPS, ${HOST_CUPS_DIR}/ppdc)
>   find ${HOST_CUPS_PKGDIR}/share/
> 
> and the first call shows files which are all missing in the second call.
> But it works like intended if I replace this line with
> 
>   @$(call compile, HOST_CUPS, -C ${HOST_CUPS_DIR}/ppdc install)
> 
> (like suggested by mol last month). Any hints what's going on here, so I
> can fix this in v3?

world/install and install both delete _PKGDIR. This is to make sure
that the directory does not contain old files, e.g. after a config change
triggered a new prepare/compile/install run.
Things like install_tree depend on this.

Michael

> > +   @$(call touch)
> > +
> > +CROSS_PPDC = $(PTXDIST_SYSROOT_CROSS)/bin/ppdc
> > +$(STATEDIR)/host-cups.install.post:
> > +   @$(call targetinfo)
> > +   @$(call world/install.post, HOST_CUPS)
> > +
> > +   ( \
> > +   echo '#!/bin/sh'; \
> > +   echo 'CUPS_DATADIR=$(PTXDIST_SYSROOT_HOST)/share/cups 
> > $(PTXDIST_SYSROOT_HOST)/bin/ppdc "$$@"'; \
> > +   ) > $(CROSS_PPDC)
> > +   chmod +x $(CROSS_PPDC)
> > +
> > +   @$(call touch)
> > +
> > +# 
> > 
> > +# Clean
> > +# 
> > 
> > +
> > +$(STATEDIR)/host-cups.clean:
> > +   @$(call targetinfo)
> > +   @$(call clean_pkg, HOST_CUPS)
> > +   @rm -vf $(CROSS_PPDC)
> > +
> > +# vim: ft=make ts=8 tw=80
> > 
> 
> 
> -- 
> Pengutronix e.K.  | Roland 

Re: [ptxdist] [PATCH 2/2] wvdial: Add package

2017-09-30 Thread Michael Olbrich
On Fri, Sep 29, 2017 at 03:52:02PM +0200, Sascha Hauer wrote:
> Back in the good old days wvdial was used to easily connect
> a modem to the internet without having to write chat scripts
> manually. Some people still use modems, so add support for
> wvdial to ptxdist.
> 
> The original wvdial uses a homebrew build system not suitable
> for cross compilation, so we replace it with autoconf/automake.
> 
> Signed-off-by: Sascha Hauer 
> ---
>  patches/wvdial-1.61/0001-remove-build-files.patch  | 552 
> +
>  .../0002-Add-autoconf-automake-files.patch | 292 +++
>  patches/wvdial-1.61/autogen.sh |  27 +
>  patches/wvdial-1.61/series |   2 +
>  rules/wvdial.in|  32 ++
>  rules/wvdial.make  |  69 +++
>  6 files changed, 974 insertions(+)
>  create mode 100644 patches/wvdial-1.61/0001-remove-build-files.patch
>  create mode 100644 patches/wvdial-1.61/0002-Add-autoconf-automake-files.patch
>  create mode 100755 patches/wvdial-1.61/autogen.sh
>  create mode 100644 patches/wvdial-1.61/series
>  create mode 100644 rules/wvdial.in
>  create mode 100644 rules/wvdial.make
> 
> diff --git a/patches/wvdial-1.61/0001-remove-build-files.patch 
> b/patches/wvdial-1.61/0001-remove-build-files.patch
> new file mode 100644
> index 0..6c561c08e
> --- /dev/null
> +++ b/patches/wvdial-1.61/0001-remove-build-files.patch
> @@ -0,0 +1,552 @@
> +From 451b4b47aca6c7e6e2daaf1e6941b327f8a6efbe Mon Sep 17 00:00:00 2001
> +From: Sascha Hauer 
> +Date: Fri, 29 Sep 2017 09:04:00 +0200
> +Subject: [PATCH 1/2] remove build files
> +
> +Signed-off-by: Sascha Hauer 
> +---
> + Makefile.in|  74 
> + config.defaults.mk |  35 
> + configure  |  13 ---
> + gen-cc |  26 --
> + wvrules-posix.mk   |  96 -
> + wvrules.mk | 248 
> -
> + 6 files changed, 492 deletions(-)
> + delete mode 100644 Makefile.in
> + delete mode 100644 config.defaults.mk
> + delete mode 100755 configure
> + delete mode 100755 gen-cc
> + delete mode 100644 wvrules-posix.mk
> + delete mode 100644 wvrules.mk
> +
> +diff --git a/Makefile.in b/Makefile.in
> +deleted file mode 100644
> +index ebe8c94..000
> +--- a/Makefile.in
>  /dev/null
> +@@ -1,74 +0,0 @@
> +-WVPACKAGE_NAME=@PACKAGE_NAME@
> +-WVPACKAGE_STRING=@PACKAGE_STRING@
> +-WVPACKAGE_TARNAME=@PACKAGE_TARNAME@
> +-WVPACKAGE_VERSION=@PACKAGE_VERSION@
> +-
> +-prefix=/usr/local
> +-WVSTREAMS_INC=
> +-WVSTREAMS_LIB=
> +-WVSTREAMS_BIN=$(prefix)/bin
> +-WVSTREAMS_SRC=.
> +-
> +-PC_CFLAGS=$(shell pkg-config --cflags libwvstreams)
> +-ifeq ($(PC_CFLAGS),)
> +- $(error WvStreams does not appear to be installed)
> +-endif
> +-CPPFLAGS+=$(PC_CFLAGS)
> +-
> +-PC_LIBS=$(shell pkg-config --libs libwvstreams)
> +-ifeq ($(PC_LIBS),)
> +- $(error WvStreams does not appear to be installed)
> +-endif
> +-LIBS+=$(PC_LIBS)
> +-
> +-BINDIR=${prefix}/bin
> +-MANDIR=${prefix}/share/man
> +-PPPDIR=/etc/ppp/peers
> +-
> +-include wvrules.mk
> +-
> +-default: all papchaptest
> +-all: wvdial.a wvdial wvdialconf pppmon
> +-
> +-wvdial.a: wvdialer.o wvmodemscan.o wvpapchap.o wvdialbrain.o \
> +-wvdialmon.o
> +-
> +-wvdial wvdialconf papchaptest pppmon: \
> +-  LDFLAGS+=-luniconf -lwvstreams -lwvutils -lwvbase
> +-
> +-wvdial wvdialconf papchaptest pppmon: wvdial.a
> +-
> +-install-bin: all
> +-[ -d ${BINDIR}  ] || install -d ${BINDIR}
> +-[ -d ${PPPDIR}  ] || install -d ${PPPDIR}
> +-install -m 0755 wvdial wvdialconf ${BINDIR}
> +-cp ppp.provider ${PPPDIR}/wvdial
> +-cp ppp.provider-pipe ${PPPDIR}/wvdial-pipe
> +-
> +-install-man:
> +-[ -d ${MANDIR}/man1 ] || install -d ${MANDIR}/man1
> +-[ -d ${MANDIR}/man5 ] || install -d ${MANDIR}/man5
> +-install -m 0644 wvdial.1 wvdialconf.1 ${MANDIR}/man1
> +-install -m 0644 wvdial.conf.5 ${MANDIR}/man5
> +-
> +-install: install-bin install-man
> +-
> +-uninstall-bin:
> +-rm -f ${BINDIR}/wvdial ${BINDIR}/wvdialconf
> +-rm -f ${PPPDIR}/wvdial
> +-rm -f ${PPPDIR}/wvdial-pipe
> +-
> +-uninstall-man:
> +-rm -f ${MANDIR}/man1/wvdial.1 ${MANDIR}/man1/wvdialconf.1
> +-rm -f ${MANDIR}/man5/wvdial.conf.5
> +-
> +-uninstall: uninstall-bin uninstall-man
> +-
> +-clean:
> +-rm -f wvdial wvdialconf wvdialmon papchaptest pppmon
> +-
> +-distclean:
> +-rm -f version.h Makefile
> +-
> +-.PHONY: clean all install-bin install-man install uninstall-bin 
> uninstall-man \
> +-uninstall
> +diff --git a/config.defaults.mk b/config.defaults.mk
> +deleted file mode 100644
> +index 1210f10..000
> +--- a/config.defaults.mk
>  /dev/null
> +@@ -1,35 +0,0 @@
> +-COMPILER_STANDARD=posix
> +-EXEEXT=
> +-INSTALL=/usr/bin/install -c
> +-INSTALL_DATA=${INSTALL} -m 644
> +-INSTALL_PROGRAM=${INSTALL}
> 

Re: [ptxdist] [PATCH] iptables: fix large file support

2017-09-30 Thread Michael Olbrich
On Thu, Sep 28, 2017 at 11:00:43AM +0200, Juergen Borleis wrote:
> The configure script handles the "--*-largefile" parameter badly. It
> defaults to large file support if not given and always disables largefile
> support if given (and it doesn't matter if 'enable' or 'disable' was used)

IPTABLES_CFLAGS:= -D_FILE_OFFSET_BITS=64

Should be removed, right?

The version bump should be noted in the commit messsage.

> Signed-off-by: Juergen Borleis 
> ---
>  ...d-xtables-config-parser.h-to-BUILT_SOURCE.patch | 34 
> --

Is this no longer needed? If so, add a comment.

Michael

>  patches/iptables-1.6.0/series  |  4 ---
>  ...fine-macros-if-large-file-feature-is-enab.patch | 28 ++
>  .../{iptables-1.6.0 => iptables-1.6.1}/autogen.sh  |  0
>  patches/iptables-1.6.1/series  |  4 +++
>  rules/iptables.make|  4 +--
>  6 files changed, 34 insertions(+), 40 deletions(-)
>  delete mode 100644 
> patches/iptables-1.6.0/0001-iptables-add-xtables-config-parser.h-to-BUILT_SOURCE.patch
>  delete mode 100644 patches/iptables-1.6.0/series
>  create mode 100644 
> patches/iptables-1.6.1/0001-iptables-define-macros-if-large-file-feature-is-enab.patch
>  rename patches/{iptables-1.6.0 => iptables-1.6.1}/autogen.sh (100%)
>  create mode 100644 patches/iptables-1.6.1/series
> 
> diff --git 
> a/patches/iptables-1.6.0/0001-iptables-add-xtables-config-parser.h-to-BUILT_SOURCE.patch
>  
> b/patches/iptables-1.6.0/0001-iptables-add-xtables-config-parser.h-to-BUILT_SOURCE.patch
> deleted file mode 100644
> index 20dab363c..0
> --- 
> a/patches/iptables-1.6.0/0001-iptables-add-xtables-config-parser.h-to-BUILT_SOURCE.patch
> +++ /dev/null
> @@ -1,34 +0,0 @@
> -From: Gustavo Zacarias 
> -Date: Wed, 30 Dec 2015 14:51:30 -0300
> -Subject: [PATCH] iptables: add xtables-config-parser.h to BUILT_SOURCES
> -
> -Otherwise other sources that use it might be built before it's ready leading
> -to build failure, for example by iptables/nft.c
> -
> -Signed-off-by: Gustavo Zacarias 
> -Signed-off-by: Pablo Neira Ayuso 
> 
> - iptables/Makefile.am | 3 +++
> - 1 file changed, 3 insertions(+)
> -
> -diff --git a/iptables/Makefile.am b/iptables/Makefile.am
> -index 3c0faa5a54df..c3eb8a81a445 100644
>  a/iptables/Makefile.am
> -+++ b/iptables/Makefile.am
> -@@ -4,6 +4,8 @@ AM_CFLAGS= ${regular_CFLAGS}
> - AM_CPPFLAGS  = ${regular_CPPFLAGS} -I${top_builddir}/include 
> -I${top_srcdir}/include ${kinclude_CPPFLAGS} ${libmnl_CFLAGS} 
> ${libnftnl_CFLAGS} ${libnetfilter_conntrack_CFLAGS}
> - AM_YFLAGS = -d
> - 
> -+BUILT_SOURCES =
> -+
> - xtables_multi_SOURCES  = xtables-multi.c iptables-xml.c
> - xtables_multi_CFLAGS   = ${AM_CFLAGS}
> - xtables_multi_LDADD= ../extensions/libext.a
> -@@ -27,6 +29,7 @@ xtables_multi_LDADD   += ../libxtables/libxtables.la -lm
> - 
> - # nftables compatibility layer
> - if ENABLE_NFTABLES
> -+BUILT_SOURCES += xtables-config-parser.h
> - xtables_compat_multi_SOURCES  = xtables-compat-multi.c iptables-xml.c
> - xtables_compat_multi_CFLAGS   = ${AM_CFLAGS}
> - xtables_compat_multi_LDADD= ../extensions/libext.a 
> ../extensions/libext_ebt.a
> diff --git a/patches/iptables-1.6.0/series b/patches/iptables-1.6.0/series
> deleted file mode 100644
> index 5237a6efd..0
> --- a/patches/iptables-1.6.0/series
> +++ /dev/null
> @@ -1,4 +0,0 @@
> -# generated by git-ptx-patches
> -#tag:base --start-number 1
> -0001-iptables-add-xtables-config-parser.h-to-BUILT_SOURCE.patch
> -# e834e669cfa6ff965112ccc3771de5a0  - git-ptx-patches magic
> diff --git 
> a/patches/iptables-1.6.1/0001-iptables-define-macros-if-large-file-feature-is-enab.patch
>  
> b/patches/iptables-1.6.1/0001-iptables-define-macros-if-large-file-feature-is-enab.patch
> new file mode 100644
> index 0..857e3e7e1
> --- /dev/null
> +++ 
> b/patches/iptables-1.6.1/0001-iptables-define-macros-if-large-file-feature-is-enab.patch
> @@ -0,0 +1,28 @@
> +From: Juergen Borleis 
> +Date: Fri, 25 Aug 2017 14:31:45 +0200
> +Subject: [PATCH] iptables: define macros if large file feature is enabled
> +
> +Currently the feature is enabled by default, but always disabled when
> +the large file parameter is defined.
> +
> +Signed-off-by: Juergen Borleis 
> +---
> + configure.ac | 5 +++--
> + 1 file changed, 3 insertions(+), 2 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index eda7871405b3..30445d7deda8 100644
> +--- a/configure.ac
>  b/configure.ac
> +@@ -42,8 +42,9 @@ AC_ARG_ENABLE([ipv6],
> + AC_ARG_ENABLE([largefile],
> + AS_HELP_STRING([--disable-largefile], [Do not build largefile support]),
> + [enable_largefile="$enableval"],
> +-[enable_largefile="yes";
> +-largefile_cppflags='-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES 
> -D_FILE_OFFSET_BITS=64'])
> ++