[ptxdist] [PATCH] mosquitto: Add new package

2017-11-01 Thread Alexander Dahl
This adds basic support for the mosquitto package from
https://mosquitto.org/ – a MQTT message broker, library, and two simple
publisher/subscriber clients.

The package so far does the build, you can use the C/C++ libraries, and
clients and broker binary can be installed to the target. There's no
additional stuff like init script or systemd service file for the broker
yet.

Signed-off-by: Alexander Dahl 
---
 rules/mosquitto.in   | 36 +
 rules/mosquitto.make | 88 
 2 files changed, 124 insertions(+)
 create mode 100644 rules/mosquitto.in
 create mode 100644 rules/mosquitto.make

diff --git a/rules/mosquitto.in b/rules/mosquitto.in
new file mode 100644
index 00..d7eb813c17
--- /dev/null
+++ b/rules/mosquitto.in
@@ -0,0 +1,36 @@
+## SECTION=networking
+
+menuconfig MOSQUITTO
+   tristate
+   prompt "mosquitto "
+   select OPENSSL  if MOSQUITTO_TLS
+   select C_ARES   if MOSQUITTO_SRV
+   select LIBUUID  if MOSQUITTO_UUID
+   help
+ Open source MQTT message broker, library, and client.
+
+if MOSQUITTO
+
+config MOSQUITTO_BROKER
+   bool
+   prompt "Broker"
+
+config MOSQUITTO_CLIENTS
+   bool
+   prompt "Clients"
+
+config MOSQUITTO_TLS
+   bool
+   prompt "TLS support"
+
+config MOSQUITTO_SRV
+   bool
+   prompt "SRV lookup support"
+
+config MOSQUITTO_UUID
+   bool
+   prompt "UUID as client id"
+
+endif
+
+# vim: ft=kconfig noet tw=72
diff --git a/rules/mosquitto.make b/rules/mosquitto.make
new file mode 100644
index 00..4372fc0a04
--- /dev/null
+++ b/rules/mosquitto.make
@@ -0,0 +1,88 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Alexander Dahl 
+#
+# 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_MOSQUITTO) += mosquitto
+
+#
+# Paths and names
+#
+MOSQUITTO_VERSION  := 1.4.14
+MOSQUITTO_MD5  := 6b0966e93f118bc71ad7b61600a6c2d3
+MOSQUITTO  := mosquitto-$(MOSQUITTO_VERSION)
+MOSQUITTO_SUFFIX   := tar.gz
+MOSQUITTO_URL  := 
https://mosquitto.org/files/source/$(MOSQUITTO).$(MOSQUITTO_SUFFIX)
+MOSQUITTO_SOURCE   := $(SRCDIR)/$(MOSQUITTO).$(MOSQUITTO_SUFFIX)
+MOSQUITTO_DIR  := $(BUILDDIR)/$(MOSQUITTO)
+# "Eclipse Distribution License - v 1.0" is in fact BSD-3-Clause
+MOSQUITTO_LICENSE  := EPL-1.0 AND BSD-3-Clause
+MOSQUITTO_LICENSE_FILES:= 
file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \
+   file://edl-v10;md5=c09f121939f063aeb5235972be8c722c
+
+# 
+# Prepare
+# 
+
+MOSQUITTO_CONF_TOOL:= NO
+MOSQUITTO_MAKE_ENV := $(CROSS_ENV)
+MOSQUITTO_MAKE_OPT := \
+   UNAME=Linux \
+   prefix=/usr \
+   WITH_WRAP=no \
+   WITH_TLS=$(call ptx/ifdef, PTXCONF_MOSQUITTO_TLS, yes, no) \
+   WITH_TLS_PSK=$(call ptx/ifdef, PTXCONF_MOSQUITTO_TLS, yes, no) \
+   WITH_THREADING=yes \
+   WITH_BRIDGE=yes \
+   WITH_PERSISTENCE=yes \
+   WITH_MEMORY_TRACKING=yes \
+   WITH_SYS_TREE=yes \
+   WITH_SRV=$(call ptx/ifdef, PTXCONF_MOSQUITTO_SRV, yes, no) \
+   WITH_UUID=$(call ptx/ifdef, PTXCONF_MOSQUITTO_UUID, yes, no) \
+   WITH_WEBSOCKETS=no \
+   WITH_EC=yes \
+   WITH_DOCS=no \
+   WITH_SOCKS=yes \
+   WITH_ADNS=no
+MOSQUITTO_INSTALL_OPT  := \
+   $(MOSQUITTO_MAKE_OPT) \
+   install
+
+# 
+# Target-Install
+# 
+
+$(STATEDIR)/mosquitto.targetinstall:
+   @$(call targetinfo)
+
+   @$(call install_init, mosquitto)
+   @$(call install_fixup, mosquitto,PRIORITY,optional)
+   @$(call install_fixup, mosquitto,SECTION,base)
+   @$(call install_fixup, mosquitto,AUTHOR,"Alexander Dahl 
")
+   @$(call install_fixup, mosquitto,DESCRIPTION,missing)
+
+   @$(call install_lib, mosquitto, 0, 0, 0644, libmosquitto)
+   @$(call install_lib, mosquitto, 0, 0, 0644, libmosquittopp)
+
+ifdef PTXCONF_MOSQUITTO_CLIENTS
+   @$(call install_copy, mosquitto, 0, 0, 0755, -, /usr/bin/mosquitto_pub)
+   @$(call install_copy, mosquitto, 0, 0, 0755, -, /usr/bin/mosquitto_sub)
+endif
+
+ifdef PTXCONF_MOSQUITTO_BROKER
+   @$(call install_copy, mosquitto, 0, 0, 0755, -, /usr/sbin/mosquitto)
+endif
+
+   @$(call install_finish, mosquitto)
+
+   @$(call touch)
+
+# vim: ft=make noet ts=8 sw=8
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] Linker error on ArchLinux

2017-11-01 Thread Michael Olbrich
Hi,

On Mon, Oct 30, 2017 at 10:11:25PM +0100, Clemens Gruber wrote:
> On Fri, Oct 27, 2017 at 02:39:19PM +0200, Michael Olbrich wrote:
> > On Thu, Oct 26, 2017 at 07:09:23PM +0200, Clemens Gruber wrote:
> > > when building PTXdist 2017.10.0 on current ArchLinux, a linker error 
> > > occurs:
> > > /usr/bin/ld: lxdialog/checklist.o: undefined reference to symbol 'acs_map'
> > > /usr/lib/libtinfo.so.6: error adding symbols: DSO missing from commandline
> > > 
> > > This occured after ArchLinux updated binutils to 2.29.1-1 and ncurses to
> > > 6.0+20170902-2.
> > 
> > Strange. I have binutils 2.29.1-6 and ncurses 6.0+20170902-1 here on Debian
> > and it works just fine :-/. But:
> > 
> > $ cat /usr/lib/x86_64-linux-gnu/libncurses.so
> > INPUT(libncurses.so.5 -ltinfo)
> > 
> > I guess this is different for you...
> 
> Yes:
> $ cat /usr/lib/libncurses.so
> INPUT(-lncursesw)
> 
> > 
> > > I could work around it by adding -ltinfo to LDFLAGS in the PTXdist
> > > Makefile.
> > 
> > We have some complex stuff in configure.ac to detect the curses library.
> > Maybe we should just require ncurses and use pkg-config.
> 
> Yes, pkg-config would have caught it:
> $ pkg-config --libs ncurses
> -lncursesw -ltinfo
> 
> I noticed in the meantime, that the package maintainer made a commit, which
> fixes the problem too:
> https://git.archlinux.org/svntogit/packages.git/commit/?h=packages/ncurses=987faeb8442d44e76a7a58642e8e6432eb220c25

Ok, so it's no longer urgent. I still think we don't need to support
anything other than ncurses here, so I'd be happy to take a patch that
cleans this up and uses pkg-config.

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de

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

2017-11-01 Thread Michael Olbrich
On Wed, Oct 25, 2017 at 08:35:10PM +0200, Roland Hieber wrote:
> On 30.09.2017 14:00, Michael Olbrich wrote:
> > 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
> >> +# 
> 

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

2017-11-01 Thread Michael Olbrich
On Wed, Oct 25, 2017 at 10:57:45PM +0200, Roland Hieber wrote:
> Signed-off-by: Roland Hieber 
> ---
> 
> Notes:
> changes in v2 -> v3:
>  - libpaper.make: ifeq -> ifdef
> 
>  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

These dependencies are not necessary. The fact that autogen.sh exist
handles this implicitly.

Michael

> + 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..c3bf16b0a
> --- /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)
> +
> +ifdef PTXCONF_LIBPAPER_PAPERCONFIG
> + @$(call install_copy, libpaper, 0, 0, 755, -, /usr/sbin/paperconfig)
> +endif
> +ifdef PTXCONF_LIBPAPER_PAPERCONF
> + @$(call install_copy, libpaper, 0, 0, 755, -, /usr/bin/paperconf)
> +endif
> +
> + @$(call install_finish, libpaper)
> +
> + @$(call touch)
> +
> +# vim: ft=make ts=8 noet tw=80
> -- 
> 2.11.0
> 
> 
> 

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

2017-11-01 Thread Michael Olbrich
On Tue, Oct 31, 2017 at 11:31:45PM +0100, Roland Hieber wrote:
> On 27.10.2017 19:54, Michael Olbrich wrote:
> > On Wed, Oct 25, 2017 at 10:57:49PM +0200, Roland Hieber wrote:
> >> diff --git a/rules/cups.in b/rules/cups.in
> >> new file mode 100644
> >> index 0..13b7142d6
> >> --- /dev/null
> >> +++ b/rules/cups.in
> >> @@ -0,0 +1,113 @@
> >> +## SECTION=applications
> >> +
> >> +menuconfig CUPS
> >> +  tristate
> >> +  prompt "cups  "
> >> +
> >> +  select ROOTFS_VAR_LOG
> >> +  select ROOTFS_VAR_RUN
> >> +  select LIBC_M
> >> +  select LIBC_CRYPT
> >> +  select ZLIB
> >> +
> >> +  select LIBC_PTHREAD if CUPS_THREADING
> >> +  select SYSTEMD  if CUPS_SYSTEMD_UNIT
> >> +  select LIBPAPER if CUPS_LIBPAPER
> >> +  select LIBUSB   if CUPS_LIBUSB
> >> +  select DBUS if CUPS_DBUS
> >> +  select GNUTLS   if CUPS_SSL
> >> +  select AVAHIif CUPS_AVAHI
> >> +  select AVAHI_LIBAVAHI_CLIENTif CUPS_AVAHI
> >> +  select ORACLE_JAVA7_JRE if CUPS_JAVA
> > 
> > This is not good. ORACLE_JAVA7_JRE is the x86-only binary packages.
> > Just add a comment to the help text, that some java is needed.
> > 
> >> +  select PERL if CUPS_PERL
> >> +  select PHP5 if CUPS_PHP
> >> +  select PYTHON   if CUPS_PYTHON
> > 
> > Is python2 the only option or could python3 be used as well?
> 
> Python 3 is possible. But I have to pass the path to the executable to
> CUPS' configure, so I would need to reconfigure CUPS if anything of
> PYTHON || PYTHON3 || PYTHON3_SYMLINK changes. Is there a way to ensure
> this? Same for PHP5_CGI || PHP5_CLI.

If really works with both, then I'd say, make it a choice (2/3/no) and
/usr/bin/python{2,3} explicitly.

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de