Re: [ptxdist] [PATCH] glibc: install ldconfig and create ld.so.cache

2016-09-07 Thread Michael Olbrich
On Wed, Sep 07, 2016 at 11:40:03PM +0200, Clemens Gruber wrote:
> Add an option to install the ldconfig binary from the toolchain and
> another one to enable the generation of /etc/ld.so.cache at first boot
> with a rc-once.d script.
> Use only the new format, which is supported since glibc 2.2 from the
> year 2000.

Can you add a /etc/ld.so.conf as well? On my debian this only contains
'include /etc/ld.so.conf.d/*.conf'. It would be great if we can do that
to. Then other packages can provide files there.

Juergen: You had some other version of this somewhere. Can you take a look
at this? I think you had some extra paths for Qt, right?

Michael

> Signed-off-by: Clemens Gruber 
> ---
>  projectroot/etc/rc.once.d/ldconfig |  6 ++
>  rules/glibc.in | 17 +
>  rules/glibc.make   |  9 +
>  3 files changed, 32 insertions(+)
>  create mode 100644 projectroot/etc/rc.once.d/ldconfig
> 
> diff --git a/projectroot/etc/rc.once.d/ldconfig 
> b/projectroot/etc/rc.once.d/ldconfig
> new file mode 100644
> index 000..d5461a7
> --- /dev/null
> +++ b/projectroot/etc/rc.once.d/ldconfig
> @@ -0,0 +1,6 @@
> +#!/bin/sh
> +
> +PATH=/sbin:/bin:/usr/sbin:/usr/bin
> +
> +echo "Creating dynamic linker cache..."
> +ldconfig --format=new -X
> diff --git a/rules/glibc.in b/rules/glibc.in
> index 2f2fb09..662f0aa 100644
> --- a/rules/glibc.in
> +++ b/rules/glibc.in
> @@ -172,6 +172,23 @@ config GLIBC_NSL
> nis(+)
>  
>  
> +config GLIBC_LDCONFIG
> + bool
> + prompt "Install ldconfig"
> + help
> +   ldconfig creates a shared library cache, which reduces the number
> +   of library locations, the loader needs to check, significantly and
> +   therefore improves launch times for programs.
> +
> +config GLIBC_LDCONFIG_RC_ONCE
> + bool
> + prompt "Create /etc/ld.so.cache"
> + depends on GLIBC_LDCONFIG
> + help
> +   The ld.so.cache is generated once at first boot. If you update your
> +   libraries later on at runtime, you have to make sure to update the
> +   cache as well. See /etc/rc.once.d/ldconfig
> +
>  config GLIBC_I18N_BIN_LOCALE
>   bool
>   prompt "Install locale"
> diff --git a/rules/glibc.make b/rules/glibc.make
> index ab2c4b6..e5ede0d 100644
> --- a/rules/glibc.make
> +++ b/rules/glibc.make
> @@ -124,6 +124,15 @@ ifdef PTXCONF_GLIBC_GCONV_ZH
>   @$(call install_copy_toolchain_lib, glibc, gconv/GB18030.so)
>  endif
>  
> +ifdef PTXCONF_GLIBC_LDCONFIG
> + @$(call install_copy, glibc, 0, 0, 0755, \
> + $(PTXDIST_SYSROOT_TOOLCHAIN)/sbin/ldconfig, /sbin/ldconfig)
> +endif
> +
> +ifdef PTXCONF_GLIBC_LDCONFIG_RC_ONCE
> + @$(call install_alternative, glibc, 0, 0, 0755, /etc/rc.once.d/ldconfig)
> +endif
> +
>  ifdef PTXCONF_GLIBC_I18N_BIN_LOCALE
>   @$(call install_copy_toolchain_usr, glibc, bin/locale)
>  endif
> -- 
> 2.9.3
> 
> 
> ___
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
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] ibrdtn: add packaging rules for IBR-DTN and dtndht

2016-09-07 Thread Michael Olbrich
On Thu, Sep 08, 2016 at 03:07:27AM +0200, Roland Hieber wrote:
> On 07.09.2016 15:48, Michael Olbrich wrote:
> >> +menuconfig IBRDTND
> >> +  tristate
> >> +  prompt "ibrdtnd   "
> >> +  select IBRDTN
> >> +  select LIBC_M
> >> +  select LIBDAEMONif IBRDTND_ENABLE_DAEMON
> >> +  select DTNDHT   if IBRDTND_ENABLE_DTNDHT
> >> +  select IBRCOMMON_WITH_OPENSSL   if IBRDTND_WITH_TLS
> > 
> > This looks wrong. If IBRCOMMON is needed then you must select the toplevel
> > symbol as well.
> 
> Right, thanks. IBRCOMMON is already selected indirectly by selecting
> IBRDTN, but I have now also added it here for clarification.
> 
> >> +# 
> >> 
> >> +# Target-Install
> >> +# 
> >> 
> >> +
> >> +$(STATEDIR)/ibrdtnd.targetinstall:
> >> +  @$(call targetinfo)
> >> +
> >> +  @$(call install_init, ibrdtnd)
> >> +  @$(call install_fixup, ibrdtnd,PRIORITY,optional)
> >> +  @$(call install_fixup, ibrdtnd,SECTION,base)
> >> +  @$(call install_fixup, ibrdtnd,AUTHOR,"Roland Hieber 
> >> ")
> >> +  @$(call install_fixup, ibrdtnd,DESCRIPTION,missing)
> >> +
> >> +  @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/sbin/dtnd)
> >> +  @$(call install_alternative, ibrdtnd, 0, 0, 0644, /etc/ibrdtnd.conf)
> >> +
> >> +ifdef PTXCONF_IBRDTND_WITH_TLS
> >> +  @$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/bin/ibrdtn-genkey.sh)
> >> +  @mkdir -p ${ROOTDIR}/etc/ibrdtn/bpsec ${ROOTDIR}/etc/ibrdtn/certs
> > 
> > No, you nned to do this to create a directory:
> > 
> > @$(call install_copy, ibrdtnd, 0, 0, 0755, /etc/ibrdtn/certs)
> > 
> > Michael
> 
> Yes right, this was already noted by Robert Schwebel, I have already
> edited it in my local working copy, and will send an updated patch once
> the key generation in /etc/rc.once is working.  But unfortunately there
> are currently things of higher priorities for me, so this will probably
> still take a while :-/

I know the feeling. I have a lot of 'not quite ready for mainline' patches
lying around for various other projects. And a few for ptxdist as well...

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] ibrdtn: add packaging rules for IBR-DTN and dtndht

2016-09-07 Thread Roland Hieber
On 07.09.2016 15:48, Michael Olbrich wrote:
>> +menuconfig IBRDTND
>> +tristate
>> +prompt "ibrdtnd   "
>> +select IBRDTN
>> +select LIBC_M
>> +select LIBDAEMONif IBRDTND_ENABLE_DAEMON
>> +select DTNDHT   if IBRDTND_ENABLE_DTNDHT
>> +select IBRCOMMON_WITH_OPENSSL   if IBRDTND_WITH_TLS
> 
> This looks wrong. If IBRCOMMON is needed then you must select the toplevel
> symbol as well.

Right, thanks. IBRCOMMON is already selected indirectly by selecting
IBRDTN, but I have now also added it here for clarification.

>> +# 
>> 
>> +# Target-Install
>> +# 
>> 
>> +
>> +$(STATEDIR)/ibrdtnd.targetinstall:
>> +@$(call targetinfo)
>> +
>> +@$(call install_init, ibrdtnd)
>> +@$(call install_fixup, ibrdtnd,PRIORITY,optional)
>> +@$(call install_fixup, ibrdtnd,SECTION,base)
>> +@$(call install_fixup, ibrdtnd,AUTHOR,"Roland Hieber 
>> ")
>> +@$(call install_fixup, ibrdtnd,DESCRIPTION,missing)
>> +
>> +@$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/sbin/dtnd)
>> +@$(call install_alternative, ibrdtnd, 0, 0, 0644, /etc/ibrdtnd.conf)
>> +
>> +ifdef PTXCONF_IBRDTND_WITH_TLS
>> +@$(call install_copy, ibrdtnd, 0, 0, 0755, -, /usr/bin/ibrdtn-genkey.sh)
>> +@mkdir -p ${ROOTDIR}/etc/ibrdtn/bpsec ${ROOTDIR}/etc/ibrdtn/certs
> 
> No, you nned to do this to create a directory:
> 
>   @$(call install_copy, ibrdtnd, 0, 0, 0755, /etc/ibrdtn/certs)
> 
> Michael

Yes right, this was already noted by Robert Schwebel, I have already
edited it in my local working copy, and will send an updated patch once
the key generation in /etc/rc.once is working.  But unfortunately there
are currently things of higher priorities for me, so this will probably
still take a while :-/

 - Roland



signature.asc
Description: OpenPGP digital signature
___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] glibc: install ldconfig and create ld.so.cache

2016-09-07 Thread Clemens Gruber
Add an option to install the ldconfig binary from the toolchain and
another one to enable the generation of /etc/ld.so.cache at first boot
with a rc-once.d script.
Use only the new format, which is supported since glibc 2.2 from the
year 2000.

Signed-off-by: Clemens Gruber 
---
 projectroot/etc/rc.once.d/ldconfig |  6 ++
 rules/glibc.in | 17 +
 rules/glibc.make   |  9 +
 3 files changed, 32 insertions(+)
 create mode 100644 projectroot/etc/rc.once.d/ldconfig

diff --git a/projectroot/etc/rc.once.d/ldconfig 
b/projectroot/etc/rc.once.d/ldconfig
new file mode 100644
index 000..d5461a7
--- /dev/null
+++ b/projectroot/etc/rc.once.d/ldconfig
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+echo "Creating dynamic linker cache..."
+ldconfig --format=new -X
diff --git a/rules/glibc.in b/rules/glibc.in
index 2f2fb09..662f0aa 100644
--- a/rules/glibc.in
+++ b/rules/glibc.in
@@ -172,6 +172,23 @@ config GLIBC_NSL
  nis(+)
 
 
+config GLIBC_LDCONFIG
+   bool
+   prompt "Install ldconfig"
+   help
+ ldconfig creates a shared library cache, which reduces the number
+ of library locations, the loader needs to check, significantly and
+ therefore improves launch times for programs.
+
+config GLIBC_LDCONFIG_RC_ONCE
+   bool
+   prompt "Create /etc/ld.so.cache"
+   depends on GLIBC_LDCONFIG
+   help
+ The ld.so.cache is generated once at first boot. If you update your
+ libraries later on at runtime, you have to make sure to update the
+ cache as well. See /etc/rc.once.d/ldconfig
+
 config GLIBC_I18N_BIN_LOCALE
bool
prompt "Install locale"
diff --git a/rules/glibc.make b/rules/glibc.make
index ab2c4b6..e5ede0d 100644
--- a/rules/glibc.make
+++ b/rules/glibc.make
@@ -124,6 +124,15 @@ ifdef PTXCONF_GLIBC_GCONV_ZH
@$(call install_copy_toolchain_lib, glibc, gconv/GB18030.so)
 endif
 
+ifdef PTXCONF_GLIBC_LDCONFIG
+   @$(call install_copy, glibc, 0, 0, 0755, \
+   $(PTXDIST_SYSROOT_TOOLCHAIN)/sbin/ldconfig, /sbin/ldconfig)
+endif
+
+ifdef PTXCONF_GLIBC_LDCONFIG_RC_ONCE
+   @$(call install_alternative, glibc, 0, 0, 0755, /etc/rc.once.d/ldconfig)
+endif
+
 ifdef PTXCONF_GLIBC_I18N_BIN_LOCALE
@$(call install_copy_toolchain_usr, glibc, bin/locale)
 endif
-- 
2.9.3


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] sqlite: bump version and remove unused TCL option

2016-09-07 Thread Clemens Gruber
Signed-off-by: Clemens Gruber 
---
 rules/sqlite.in   | 1 -
 rules/sqlite.make | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/rules/sqlite.in b/rules/sqlite.in
index 9e7e94a..1bc0694 100644
--- a/rules/sqlite.in
+++ b/rules/sqlite.in
@@ -5,7 +5,6 @@ menuconfig SQLITE
select LIBC_DL
select LIBC_PTHREAD if SQLITE_THREADSAFE
select GCCLIBS_GCC_S
-   select TCL  if SQLITE_TCL
select READLINE if SQLITE_READLINE
help
  SQLite is a software library that implements a self-contained,
diff --git a/rules/sqlite.make b/rules/sqlite.make
index 79b040c..1efd64d 100644
--- a/rules/sqlite.make
+++ b/rules/sqlite.make
@@ -21,11 +21,11 @@ PACKAGES-$(PTXCONF_SQLITE) += sqlite
 #
 # Paths and names
 #
-SQLITE_VERSION := 313
-SQLITE_MD5 := 4e83f39fa2ffb610ac5ecd36865da6a2
+SQLITE_VERSION := 3140100
+SQLITE_MD5 := 3634a90a3f49541462bcaed3474b2684
 SQLITE := sqlite-autoconf-$(SQLITE_VERSION)
 SQLITE_SUFFIX  := tar.gz
-SQLITE_URL := http://www.sqlite.org/2016/$(SQLITE).$(SQLITE_SUFFIX)
+SQLITE_URL := https://www.sqlite.org/2016/$(SQLITE).$(SQLITE_SUFFIX)
 SQLITE_SOURCE  := $(SRCDIR)/$(SQLITE).$(SQLITE_SUFFIX)
 SQLITE_DIR := $(BUILDDIR)/$(SQLITE)
 SQLITE_LICENSE := public_domain
-- 
2.9.3


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] trivial: typo fatures -> features

2016-09-07 Thread Uwe Kleine-König
---
 rules/systemd.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/systemd.in b/rules/systemd.in
index f4c95036f64c..d826b7b0f366 100644
--- a/rules/systemd.in
+++ b/rules/systemd.in
@@ -43,7 +43,7 @@ menuconfig SYSTEMD
 
 if SYSTEMD
 
-comment "D-Bus is needed for the enabled fatures"
+comment "D-Bus is needed for the enabled features"
depends on SYSTEMD_DBUS && !DBUS
 
 config SYSTEMD_DBUS
-- 
2.8.1


___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH v2] ibrdtn: add packaging rules for IBR-DTN and dtndht

2016-09-07 Thread Michael Olbrich
On Sun, Aug 28, 2016 at 07:32:50AM +0200, Roland Hieber wrote:
> IBR-DTN is a lightweight implementation of the Bundle Protocol (RFC
> 5050), designed for embedded systems like the RouterBoard532A or
> Ubiquiti RouterStation Pro.
> 
> IBR-DTN consists of several upstream tarballs which split its
> functionality into modular parts, namely ibrcommon, ibrdtn, ibrdtnd and
> ibrdtn-tools.  Although they are released at the same time with the same
> version, they are usually packaged separately to provide the modularity
> on the package level.  In order to provide clean and readable Makefiles,
> the upstream naming scheme is adopted here.
> 
> Although dtndht is versioned and released as a separate upstream
> package, it is effectively part of IBR-DTN as it is not really used
> anywhere else, and it's also developed in close contact with IBR-DTN by
> the same authors.  For this reason, I'm including all package rules in a
> single patch.
> 
> The upstream releases includes some functionality which depends on
> software not currently available in ptxdist.  This includes tffs,
> wifip2p and libvmime.  I have included the directives for these
> features, but commented them out, so they can easily be enabled once
> that software gets packaged.
> 
> Signed-off-by: Roland Hieber 
> ---
>  projectroot/lib/systemd/system/ibrdtnd.service | 10 
>  rules/dtndht.in| 30 ++
>  rules/dtndht.make  | 58 
>  rules/ibrcommon.in | 43 +++
>  rules/ibrcommon.make   | 60 
>  rules/ibrdtn-tools.in  | 49 +
>  rules/ibrdtn-tools.make| 71 
>  rules/ibrdtn.in| 32 +++
>  rules/ibrdtn.make  | 58 
>  rules/ibrdtnd.in   | 70 
>  rules/ibrdtnd.make | 76 
> ++
>  11 files changed, 557 insertions(+)
>  create mode 100644 projectroot/lib/systemd/system/ibrdtnd.service
>  create mode 100644 rules/dtndht.in
>  create mode 100644 rules/dtndht.make
>  create mode 100644 rules/ibrcommon.in
>  create mode 100644 rules/ibrcommon.make
>  create mode 100644 rules/ibrdtn-tools.in
>  create mode 100644 rules/ibrdtn-tools.make
>  create mode 100644 rules/ibrdtn.in
>  create mode 100644 rules/ibrdtn.make
>  create mode 100644 rules/ibrdtnd.in
>  create mode 100644 rules/ibrdtnd.make
> 
> diff --git a/projectroot/lib/systemd/system/ibrdtnd.service 
> b/projectroot/lib/systemd/system/ibrdtnd.service
> new file mode 100644
> index 000..bc8bc27
> --- /dev/null
> +++ b/projectroot/lib/systemd/system/ibrdtnd.service
> @@ -0,0 +1,10 @@
> +[Unit]
> +Description=IBR-DTN Bundle Protocol daemon
> +Requires=network.target
> +
> +[Service]
> +ExecStart=/usr/sbin/dtnd -D -c /etc/ibrdtnd.conf
> +Restart=always
> +
> +[Install]
> +WantedBy=multi-user.target
> diff --git a/rules/dtndht.in b/rules/dtndht.in
> new file mode 100644
> index 000..21d6ff1
> --- /dev/null
> +++ b/rules/dtndht.in
> @@ -0,0 +1,30 @@
> +## SECTION=networking
> +
> +menuconfig DTNDHT
> + tristate
> + prompt "dtndht"
> + select OPENSSL  if DTNDHT_WITH_OPENSSL
> + help
> +   DTNDHT is a library providing a fully distributed BitTorrent DHT-based
> +   naming service especially for DTN Bundle Protocol EIDs (RFC 5050).
> +
> +if DTNDHT
> +
> +config DTNDHT_ENABLE_BLACKLIST
> + bool
> + default y
> + prompt "enable blacklist"
> +
> +config DTNDHT_ENABLE_RATING
> + bool
> + default y
> + prompt "enable peer rating"
> +
> +config DTNDHT_WITH_OPENSSL
> + bool
> + default y
> + prompt "use OpenSSL instead of built-in crypto"
> +
> +endif
> +
> +# vim: syntax=kconfig
> diff --git a/rules/dtndht.make b/rules/dtndht.make
> new file mode 100644
> index 000..c47bb62
> --- /dev/null
> +++ b/rules/dtndht.make
> @@ -0,0 +1,58 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2016 by Roland Hieber 
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_DTNDHT) += dtndht
> +
> +#
> +# Paths and names
> +#
> +DTNDHT_VERSION   := 0.2.3
> +DTNDHT_MD5   := 37c33910ac7e760aad4db81724aeb4fb
> +DTNDHT   := dtndht-$(DTNDHT_VERSION)
> +DTNDHT_SUFFIX:= tar.gz
> +DTNDHT_SOURCE:= $(SRCDIR)/$(DTNDHT).$(DTNDHT_SUFFIX)
> +DTNDHT_DIR   := $(BUILDDIR)/$(DTNDHT)
> +DTNDHT_LICENSE   := MIT
> +
> +DTNDHT_URL := \
> + 
> https://www.ibr.cs.tu-bs.de/projects/ibr-dtn/releases/$(DTNDHT).$(DTNDHT_SUFFIX)
> +
> +# 
> 
> +# Prepare
> +# 
> 
> +
> +#
> +# autoconf
> +#
> +DTNDHT_CONF_TOOL := autoconf
> +DT