Re: [ptxdist] [PATCH] libmodbus: adapt help text to the reality

2023-03-10 Thread Juergen Borleis
Am Freitag, dem 10.03.2023 um 12:57 +0100 schrieb Michael Olbrich:
> On Thu, Mar 09, 2023 at 02:29:25PM +0100, Juergen Borleis wrote:
> > Am Donnerstag, dem 09.03.2023 um 14:24 +0100 schrieb Ladislav Michl:
> > > On Thu, Mar 09, 2023 at 10:38:15AM +0100, Alexander Dahl wrote:
> > > > Hei hei,
> > > > 
> > > > Am Thu, Mar 09, 2023 at 10:29:06AM +0100 schrieb Michael Olbrich:
> > > > > On Thu, Mar 09, 2023 at 10:08:50AM +0100, Juergen Borleis wrote:
> > > > > > With change a08638d93d19624cf3c20d033ea8f61b96c43408
> > > > > >   "libmodbus: version bump 2.0.4 -> 3.0.8"
> > > > > > libmodbus changed from 2.x.x to 3.0.x version like libmodbus3 did.
> > > > > > 
> > > > > > And with change a76b31d5b637bc89ca26e7fa81503cbc7632b666
> > > > > >   "libmodbus3: version bump 3.0.6 -> 3.1.4"
> > > > > > libmodbus3 switched to the recent to 3.1.x version.
> > > > > 
> > > > > Hmmm, it feels like there were supposed to be for two packages, one 
> > > > > for
> > > > > version 2.x and one for 3.x, at least it started that way.
> > > > > I don't really know anything about libmodbus. Are the two versions
> > > > > incompatible?
> > > > 
> > > > Yes, 3.0.x and 3.1.x have incompatible APIs and probably ABIs.
> > > > 3.0.x has .so version 5 and 3.1.x has .so version 6, at least to my
> > > > notes and the code trying to distinguish this.
> > > > 
> > > > Greets
> > > > Alex
> > > > 
> > > > > 
> > > > > Ladislav, you touched it last, you did the "2.0.4 -> 3.0.8". Do you 
> > > > > have
> > > > > any insight here?
> > > 
> > > As Alex pointed out above, 2.0.x has incompatible API and was last
> > > touched 12 years ago. I pretty much doubt anything sane currently depends
> > > on it and the truth is I overlooked libmodbus3 while doing update.
> > 
> > It is even more worse: 2.x.x API != 3.0.x API != 3.1.x API 
> 
> I'm tempted to say we just need 3.1.x in PTXdist upstream. Unless updating
> an application from 3.0.x to 3.1.x is difficult, because the API changed
> a lot?

I don't know. I read the documentation and it just pointed out this API
incompatibility. Thus, no idea how difficult it would be to port a user from
3.0.x to 3.1.x.

Jürgen

-- 
Pengutronix e.K.   | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-128  |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917-9|





Re: [ptxdist] [PATCH] libmodbus: adapt help text to the reality

2023-03-09 Thread Juergen Borleis
Am Donnerstag, dem 09.03.2023 um 14:24 +0100 schrieb Ladislav Michl:
> On Thu, Mar 09, 2023 at 10:38:15AM +0100, Alexander Dahl wrote:
> > Hei hei,
> > 
> > Am Thu, Mar 09, 2023 at 10:29:06AM +0100 schrieb Michael Olbrich:
> > > On Thu, Mar 09, 2023 at 10:08:50AM +0100, Juergen Borleis wrote:
> > > > With change a08638d93d19624cf3c20d033ea8f61b96c43408
> > > >   "libmodbus: version bump 2.0.4 -> 3.0.8"
> > > > libmodbus changed from 2.x.x to 3.0.x version like libmodbus3 did.
> > > > 
> > > > And with change a76b31d5b637bc89ca26e7fa81503cbc7632b666
> > > >   "libmodbus3: version bump 3.0.6 -> 3.1.4"
> > > > libmodbus3 switched to the recent to 3.1.x version.
> > > 
> > > Hmmm, it feels like there were supposed to be for two packages, one for
> > > version 2.x and one for 3.x, at least it started that way.
> > > I don't really know anything about libmodbus. Are the two versions
> > > incompatible?
> > 
> > Yes, 3.0.x and 3.1.x have incompatible APIs and probably ABIs.
> > 3.0.x has .so version 5 and 3.1.x has .so version 6, at least to my
> > notes and the code trying to distinguish this.
> > 
> > Greets
> > Alex
> > 
> > > 
> > > Ladislav, you touched it last, you did the "2.0.4 -> 3.0.8". Do you have
> > > any insight here?
> 
> As Alex pointed out above, 2.0.x has incompatible API and was last
> touched 12 years ago. I pretty much doubt anything sane currently depends
> on it and the truth is I overlooked libmodbus3 while doing update.

It is even more worse: 2.x.x API != 3.0.x API != 3.1.x API 

jb

-- 
Pengutronix e.K.   | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-128  |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917-9|





[ptxdist] [PATCH] libmodbus: adapt help text to the reality

2023-03-09 Thread Juergen Borleis
With change a08638d93d19624cf3c20d033ea8f61b96c43408
  "libmodbus: version bump 2.0.4 -> 3.0.8"
libmodbus changed from 2.x.x to 3.0.x version like libmodbus3 did.

And with change a76b31d5b637bc89ca26e7fa81503cbc7632b666
  "libmodbus3: version bump 3.0.6 -> 3.1.4"
libmodbus3 switched to the recent to 3.1.x version.

Signed-off-by: Juergen Borleis 
---
 rules/libmodbus.in  | 4 ++--
 rules/libmodbus3.in | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rules/libmodbus.in b/rules/libmodbus.in
index f4f71fc..89ab189 100644
--- a/rules/libmodbus.in
+++ b/rules/libmodbus.in
@@ -4,7 +4,7 @@ config LIBMODBUS
prompt "libmodbus"
help
  libmodbus is a library that implements the Modbus/RTU protocol
- (TCP and serial).
+ (TCP and serial) (Version 3.0.x).
 
- WWW: https://launchpad.net/libmodbus
+ WWW: https://libmodbus.org/
 
diff --git a/rules/libmodbus3.in b/rules/libmodbus3.in
index 3a950d7..d69a882 100644
--- a/rules/libmodbus3.in
+++ b/rules/libmodbus3.in
@@ -4,7 +4,7 @@ config LIBMODBUS3
prompt "libmodbus3"
help
  libmodbus is a library that implements the Modbus protocol
- (TCP and serial) (Version 3.0.x).
+ (TCP and serial) (Version 3.1.x).
 
- WWW: http://http://libmodbus.org/
+ WWW: https://libmodbus.org/
 
-- 
2.30.2




[ptxdist] [PATCH] udev-legacy: fix source and destination file system path

2022-09-12 Thread Juergen Borleis
The "customized udev rules" are installed via install_alternative_tree and thus,
both paths are "/usr/lib/udev/rules.d".

Reported-by: Joerg Epping 
Signed-off-by: Juergen Borleis 
---
 rules/udev.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/udev.in b/rules/udev.in
index 1fa9a9f..d08ed09 100644
--- a/rules/udev.in
+++ b/rules/udev.in
@@ -96,7 +96,7 @@ config UDEV_LEGACY_CUST_RULES
prompt "install customized udev rules"
help
  This will install the customized udev rules files from
- projectroot/usr/usr/lib/udev/rules.d into /lib/udev/rules.d
+ projectroot/usr/lib/udev/rules.d into /usr/lib/udev/rules.d
 
 config UDEV_LEGACY_LIBUDEV
bool
-- 
2.30.2




[ptxdist] [PATCH v2] stunnel: version bump 5.46 -> 5.65

2022-08-30 Thread Juergen Borleis
The 5.46 crashes with a double free(), seems fixed in 5.65.

Signed-off-by: Juergen Borleis 
---
 rules/stunnel.make | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rules/stunnel.make b/rules/stunnel.make
index eabe229..41518fc 100644
--- a/rules/stunnel.make
+++ b/rules/stunnel.make
@@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_STUNNEL) += stunnel
 #
 # Paths and names
 #
-STUNNEL_VERSION:= 5.46
-STUNNEL_MD5:= 2836e0740d4a16fa489445d969ec0b7d
+STUNNEL_VERSION:= 5.65
+STUNNEL_MD5:= b05d5e07a59eb6c3c0b7d26d1281e5c6
 STUNNEL:= stunnel-$(STUNNEL_VERSION)
 STUNNEL_SUFFIX := tar.gz
 STUNNEL_URL:= \
-- 
2.30.2




Re: [ptxdist] [PATCH 8/8] stunnel: version bump 5.46 -> 5.65

2022-08-30 Thread Juergen Borleis
Am Dienstag, dem 30.08.2022 um 14:54 +0200 schrieb Juergen Borleis:
> The 5.46 crashes with a double free(), seems fixed in 5.65.
> 
> […]


Bad patch. Will sent a V2.

jb

-- 
Pengutronix e.K.   | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-128  |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917-9|





[ptxdist] [PATCH 6/8] php: php5 is gone in favour of php8

2022-08-30 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 projectroot/etc/php5/php.ini | 1337 --
 1 file changed, 1337 deletions(-)
 delete mode 100644 projectroot/etc/php5/php.ini

diff --git a/projectroot/etc/php5/php.ini b/projectroot/etc/php5/php.ini
deleted file mode 100644
index 5a63f43..000
--- a/projectroot/etc/php5/php.ini
+++ /dev/null
@@ -1,1337 +0,0 @@
-[PHP]
-
-;;;
-; About php.ini   ;
-;;;
-; This file controls many aspects of PHP's behavior.  In order for PHP to
-; read it, it must be named 'php.ini'.  PHP looks for it in the current
-; working directory, in the path designated by the environment variable
-; PHPRC, and in the path that was defined in compile time (in that order).
-; Under Windows, the compile-time path is the Windows directory.  The
-; path in which the php.ini file is looked for can be overridden using
-; the -c argument in command line mode.
-;
-; The syntax of the file is extremely simple.  Whitespace and Lines
-; beginning with a semicolon are silently ignored (as you probably guessed).
-; Section headers (e.g. [Foo]) are also silently ignored, even though
-; they might mean something in the future.
-;
-; Directives are specified using the following syntax:
-; directive = value
-; Directive names are *case sensitive* - foo=bar is different from FOO=bar.
-;
-; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
-; of the INI constants (On, Off, True, False, Yes, No and None) or an 
expression
-; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").
-;
-; Expressions in the INI file are limited to bitwise operators and parentheses:
-; |bitwise OR
-; &bitwise AND
-; ~bitwise NOT
-; !boolean NOT
-;
-; Boolean flags can be turned on using the values 1, On, True or Yes.
-; They can be turned off using the values 0, Off, False or No.
-;
-; An empty string can be denoted by simply not writing anything after the equal
-; sign, or by using the None keyword:
-;
-;  foo = ; sets foo to an empty string
-;  foo = none; sets foo to an empty string
-;  foo = "none"  ; sets foo to the string 'none'
-;
-; If you use constants in your value, and these constants belong to a
-; dynamically loaded extension (either a PHP extension or a Zend extension),
-; you may only use these constants *after* the line that loads the extension.
-;
-;
-;;;
-; About this file ;
-;;;
-; This is the recommended, PHP 5-style version of the php.ini-dist file.  It
-; sets some non standard settings, that make PHP more efficient, more secure,
-; and encourage cleaner coding.
-;
-; The price is that with these settings, PHP may be incompatible with some
-; applications, and sometimes, more difficult to develop with.  Using this
-; file is warmly recommended for production sites.  As all of the changes from
-; the standard settings are thoroughly documented, you can go over each one,
-; and decide whether you want to use it or not.
-;
-; For general information about the php.ini file, please consult the 
php.ini-dist
-; file, included in your PHP distribution.
-;
-; This file is different from the php.ini-dist file in the fact that it 
features
-; different values for several directives, in order to improve performance, 
while
-; possibly breaking compatibility with the standard out-of-the-box behavior of
-; PHP.  Please make sure you read what's different, and modify your scripts
-; accordingly, if you decide to use this file instead.
-;
-; - register_long_arrays = Off [Performance]
-; Disables registration of the older (and deprecated) long predefined array
-; variables ($HTTP_*_VARS).  Instead, use the superglobals that were
-; introduced in PHP 4.1.0
-; - display_errors = Off   [Security]
-; With this directive set to off, errors that occur during the execution of
-; scripts will no longer be displayed as a part of the script output, and 
thus,
-; will no longer be exposed to remote users.  With some errors, the error 
message
-; content may expose information about your script, web server, or database
-; server that may be exploitable for hacking.  Production sites should 
have this
-; directive set to off.
-; - log_errors = On[Security]
-; This directive complements the above one.  Any errors that occur during 
the
-; execution of your script will be logged (typically, to your server's 
error log,
-; but can be configured in several ways).  Along with setting 
display_errors to off,
-; this setup gives you the ability to fully understand what may have gone 
wrong,
-; without exposing any sensitive information to remote users.
-; - output_buffering = 4096[Performance]
-; Set a 4KB output buffer.  Enabling output buffering typically results in 
less
-; writes, and sometimes less packets sent on the wire, which can often 
lead to
-; b

[ptxdist] [PATCH 7/8] stunnel: add hidden run-time dependencies

2022-08-30 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/stunnel.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/rules/stunnel.in b/rules/stunnel.in
index b6c552b..dba0e89 100644
--- a/rules/stunnel.in
+++ b/rules/stunnel.in
@@ -3,6 +3,9 @@
 config STUNNEL
tristate
select OPENSSL
+   select LIBC_UTIL
+   select LIBC_PTHREAD
+   select LIBC_CRYPT
prompt "stunnel"
help
  The stunnel program is designed to work as an SSL encryption
-- 
2.30.2




[ptxdist] [PATCH 4/8] dropbear: dependency to busybox's startstop daemon is on-demand only

2022-08-30 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/dropbear.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/dropbear.in b/rules/dropbear.in
index e2945f3..b3e00a0 100644
--- a/rules/dropbear.in
+++ b/rules/dropbear.in
@@ -396,7 +396,7 @@ config DROPBEAR_DROPBEAR
default y
select DROPBEAR_DROPBEAR_KEY
select DROPBEAR_RSA
-   select BUSYBOX_START_STOP_DAEMON if BUSYBOX
+   select BUSYBOX_START_STOP_DAEMON if INITMETHOD_BBINIT
help
  Installs the dropbar server in /usr/sbin/dropbear on the target
 
-- 
2.30.2




[ptxdist] [PATCH 5/8] iproute: fix python3 dependency on demand

2022-08-30 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/iproute2.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rules/iproute2.in b/rules/iproute2.in
index 6507714..0c83741 100644
--- a/rules/iproute2.in
+++ b/rules/iproute2.in
@@ -11,6 +11,7 @@ menuconfig IPROUTE2
select LIBC_PTHREAD if IPROUTE2_ARPD
select LIBC_RESOLV
select LIBMNL   if IPROUTE2_DEVLINK
+   select PYTHON3  if IPROUTE2_ROUTEL && RUNTIME
help
  Networking and traffic control tools
 
@@ -91,6 +92,7 @@ config IPROUTE2_ROUTEL
prompt "routel"
help
  Component of ip route for listing the routing tables
+ This component requires Python3 at run-time
 
 config IPROUTE2_RTACCT
bool
-- 
2.30.2




[ptxdist] [PATCH 1/8] apache2: remove initV artefact

2022-08-30 Thread Juergen Borleis
The corresponding package is gone since commit
 6da485b4940906d50b48da7e6e26e84629cdf142
 "apache2: remove after on year in staging"

Signed-off-by: Juergen Borleis 
---
 projectroot/etc/init.d/apache2 | 44 --
 1 file changed, 44 deletions(-)
 delete mode 100644 projectroot/etc/init.d/apache2

diff --git a/projectroot/etc/init.d/apache2 b/projectroot/etc/init.d/apache2
deleted file mode 100644
index a8cf04f..000
--- a/projectroot/etc/init.d/apache2
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-#
-# /etc/init.d/apache2
-#
-NAME=apache2
-
-#
-# This is an workaround, if the path targets into a ramfs
-#
-mkdir -p @LOGPATH@
-
-case "$1" in
-start)
-   echo -n "Starting $NAME: "
-   if /usr/sbin/apache2 -f @APACHECONFIG@ -k start; then
-   echo "Done"
-   else
-   echo "Failed"
-   fi
-   ;;
-
-stop)
-   echo -n "Stopping $NAME: "
-   if /usr/sbin/apache2 -f @APACHECONFIG@ -k stop; then
-   echo "Done"
-   else
-   echo "Failed"
-   fi
-   ;;
-
-restart)
-   echo -n "Restarting $NAME: "
-   if /usr/sbin/apache2 -f @APACHECONFIG@ -k restart; then
-echo "Done"
-else
-   echo "Failed"
-fi
-;;
-
-*)
-echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
-exit 1
-;;
-esac
-- 
2.30.2




[ptxdist] [PATCH 2/8] openvpn: still allow initV support

2022-08-30 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/openvpn.make | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/rules/openvpn.make b/rules/openvpn.make
index 09dbe0c..3209950 100644
--- a/rules/openvpn.make
+++ b/rules/openvpn.make
@@ -43,8 +43,11 @@ OPENVPN_CONF_ENV := \
IFCONFIG=/usr/sbin/ifconfig \
IPROUTE=/usr/sbin/ip \
NETSTAT=/usr/bin/netstat \
-   ROUTE=/usr/sbin/route \
-   SYSTEMD_ASK_PASSWORD=/usr/bin/systemd-ask-password
+   ROUTE=/usr/sbin/route
+
+ifdef PTXCONF_OPENVPN_SYSTEMD
+OPENVPN_CONF_ENV += SYSTEMD_ASK_PASSWORD=/usr/bin/systemd-ask-password
+endif
 
 #
 # autoconf
-- 
2.30.2




[ptxdist] [PATCH 8/8] stunnel: version bump 5.46 -> 5.65

2022-08-30 Thread Juergen Borleis
The 5.46 crashes with a double free(), seems fixed in 5.65.

Signed-off-by: Juergen Borleis 
---
 rules/stunnel.make | 11 +--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/rules/stunnel.make b/rules/stunnel.make
index eabe229..9a90a20 100644
--- a/rules/stunnel.make
+++ b/rules/stunnel.make
@@ -14,8 +14,8 @@ PACKAGES-$(PTXCONF_STUNNEL) += stunnel
 #
 # Paths and names
 #
-STUNNEL_VERSION:= 5.46
-STUNNEL_MD5:= 2836e0740d4a16fa489445d969ec0b7d
+STUNNEL_VERSION:= 5.65
+STUNNEL_MD5:= b05d5e07a59eb6c3c0b7d26d1281e5c6
 STUNNEL:= stunnel-$(STUNNEL_VERSION)
 STUNNEL_SUFFIX := tar.gz
 STUNNEL_URL:= \
@@ -58,6 +58,13 @@ $(STATEDIR)/stunnel.targetinstall:
 
@$(call install_copy, stunnel, 0, 0, 0755, -, /usr/bin/stunnel)
 
+   # Custom specific adaption
+   @$(call install_copy, stunnel, 0, 0, 0755, /etc/stunnel)
+   @$(call install_alternative, stunnel, 0, 0, 0644, 
/etc/stunnel/stunnel.conf)
+   @$(call install_copy, stunnel, 0, 0, 0600, \
+   
$(ARM9BOARD_COMMON_SRC)/CertificationAuthority/Exported_Certs/benning_adapter_x509_cert_https_without_password.pem,
 \
+   /etc/stunnel/cert.pem)
+
@$(call install_finish, stunnel)
 
@$(call touch)
-- 
2.30.2




[ptxdist] [PATCH 3/8] cryptodev: avoid failures at build-time

2022-08-30 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/cryptodev.make | 1 +
 1 file changed, 1 insertion(+)

diff --git a/rules/cryptodev.make b/rules/cryptodev.make
index 002cad5..5947445 100644
--- a/rules/cryptodev.make
+++ b/rules/cryptodev.make
@@ -23,6 +23,7 @@ CRYPTODEV_URL := \
 CRYPTODEV_SOURCE   := $(SRCDIR)/$(CRYPTODEV).$(CRYPTODEV_SUFFIX)
 CRYPTODEV_DIR  := $(BUILDDIR)/$(CRYPTODEV)
 CRYPTODEV_LICENSE  := GPL-2.0
+CRYPTODEV_DEVPKG   := NO
 
 ifdef PTXCONF_CRYPTODEV
 $(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/cryptodev.targetinstall
-- 
2.30.2




Re: [ptxdist] Loss of speedup for subsequent different -but still similar- images build

2021-09-24 Thread Juergen Borleis
Hi Kevin,

Am Donnerstag, dem 23.09.2021 um 13:02 + schrieb Henzer, Kevin:
> […]
> ./ptxdist go --ptxconfig=configs/config_1 
> --platformconfig=configs/platformconfig   # takes time only the first 
> time, else quite fast
> ./ptxdist images --ptxconfig=configs/ config_1  
> --platformconfig=configs/platformconfig  # quite fast
> 
> ./ptxdist go --ptxconfig=configs/config_2 
> --platformconfig=configs/platformconfig   # quite fast
> ./ptxdist images --ptxconfig=configs/ config_2  
> --platformconfig=configs/platformconfig  # quite fast

What is the difference between 'configs/config_1' and 'configs/config_2'? Maybe
they differ in the setting of some kind of base package and then always all
dependencies must be rebuilt.

jb

-- 
Pengutronix e.K.   | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-128 |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917-9 |


___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


Re: [ptxdist] [PATCH 2/5] php: reanimate PHP as PHP8

2021-08-12 Thread Juergen Borleis
Hi Christian,

Am Donnerstag, den 12.08.2021, 11:15 + schrieb Gieseler, Christian:
> […]
> > --- /dev/null
> > +++ b/rules/php8.in
> > @@ -0,0 +1,72 @@
> > +## SECTION=scripting_languages
> > +# php6 configuration
> This is probably a typo and should be php8 instead of php6.

:-) Ups, yes. I think Michael should fix it while committing the patch (instead
of sending a v2).

jb

-- 
Pengutronix e.K.   | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-128  |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917-9|


___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


[ptxdist] [PATCH 3/5] lighttpd: reenable PHP support via "fast cgi"

2021-08-12 Thread Juergen Borleis
With PHP8 at hand, the lighttpd's "fast cgi" feature can be used again.

Signed-off-by: Juergen Borleis 
---
 rules/lighttpd.in | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/rules/lighttpd.in b/rules/lighttpd.in
index 1f853c7..aecdcc0 100644
--- a/rules/lighttpd.in
+++ b/rules/lighttpd.in
@@ -18,6 +18,7 @@ menuconfig LIGHTTPD
select LIBMEMCACHED if LIGHTTPD_MEMCACHED
select LUA  if LIGHTTPD_LUA
select LUA_INSTALL_LIBLUA   if LIGHTTPD_LUA
+   select PHP8 if LIGHTTPD_MOD_FASTCGI_PHP && RUNTIME
select BUSYBOX_START_STOP_DAEMONif 
LIGHTTPD_STARTSCRIPT
select BUSYBOX_FEATURE_START_STOP_DAEMON_FANCY  if 
LIGHTTPD_STARTSCRIPT
select BUSYBOX_FEATURE_START_STOP_DAEMON_LONG_OPTIONS   if 
LIGHTTPD_STARTSCRIPT
@@ -146,12 +147,14 @@ if LIGHTTPD_MOD_FASTCGI
 
 config LIGHTTPD_MOD_FASTCGI_PHP
bool
-   depends on BROKEN
prompt "setup php handling with fastcgi"
help
  Enables the necessary packages and configuration files
  to enable PHP support in lighttpd
 
+comment "PHP CGI SAPI must be enabled"
+   depends on LIGHTTPD_MOD_FASTCGI_PHP && !PHP8_SAPI_CGI
+
 endif
 
 config LIGHTTPD_MOD_MAGNET
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


[ptxdist] [PATCH 4/5] openvpn: still allow initV support

2021-08-12 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/openvpn.make | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/rules/openvpn.make b/rules/openvpn.make
index 46cca64..d5f2b81 100644
--- a/rules/openvpn.make
+++ b/rules/openvpn.make
@@ -43,8 +43,11 @@ OPENVPN_CONF_ENV := \
IFCONFIG=/usr/sbin/ifconfig \
IPROUTE=/usr/sbin/ip \
NETSTAT=/usr/bin/netstat \
-   ROUTE=/usr/sbin/route \
-   SYSTEMD_ASK_PASSWORD=/usr/bin/systemd-ask-password
+   ROUTE=/usr/sbin/route
+
+ifdef PTXCONF_OPENVPN_SYSTEMD
+OPENVPN_CONF_ENV += SYSTEMD_ASK_PASSWORD=/usr/bin/systemd-ask-password
+endif
 
 #
 # autoconf
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


[ptxdist] [PATCH 5/5] openvpn: version bump 2.4.6 -> 2.5.3

2021-08-12 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/openvpn.make | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/rules/openvpn.make b/rules/openvpn.make
index d5f2b81..0d7e71f 100644
--- a/rules/openvpn.make
+++ b/rules/openvpn.make
@@ -14,11 +14,11 @@ PACKAGES-$(PTXCONF_OPENVPN) += openvpn
 #
 # Paths and names
 #
-OPENVPN_VERSION:= 2.4.6
-OPENVPN_MD5:= 3a1f3f63bdaede443b4df49957df9405
+OPENVPN_VERSION:= 2.5.3
+OPENVPN_MD5:= a51827cd3ac60fae5a7add77a8d3080d
 OPENVPN:= openvpn-$(OPENVPN_VERSION)
 OPENVPN_SUFFIX := tar.xz
-OPENVPN_URL:= 
http://swupdate.openvpn.org/community/releases/$(OPENVPN).$(OPENVPN_SUFFIX)
+OPENVPN_URL:= 
https://swupdate.openvpn.org/community/releases/$(OPENVPN).$(OPENVPN_SUFFIX)
 OPENVPN_SOURCE := $(SRCDIR)/$(OPENVPN).$(OPENVPN_SUFFIX)
 OPENVPN_DIR:= $(BUILDDIR)/$(OPENVPN)
 OPENVPN_LICENSE:= GPL-2.0-only WITH openvpn-openssl-exception 
AND BSD-2-Clause AND BSD-3-Clause
@@ -58,10 +58,8 @@ OPENVPN_CONF_OPT := \
--$(call ptx/endis, PTXCONF_OPENVPN_LZO)-lzo \
--disable-lz4 \
--disable-comp-stub \
-   --enable-crypto \
--enable-ofb-cfb \
--disable-x509-alt-username \
-   --enable-server \
--disable-plugins \
--enable-management \
--disable-pkcs11 \
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


[ptxdist] [PATCH 1/5] apache2: remove initV artefact

2021-08-12 Thread Juergen Borleis
The corresponding package is gone since commit
 6da485b4940906d50b48da7e6e26e84629cdf142
 "apache2: remove after on year in staging"

Signed-off-by: Juergen Borleis 
---
 projectroot/etc/init.d/apache2 | 44 --
 1 file changed, 44 deletions(-)
 delete mode 100644 projectroot/etc/init.d/apache2

diff --git a/projectroot/etc/init.d/apache2 b/projectroot/etc/init.d/apache2
deleted file mode 100644
index a8cf04f..000
--- a/projectroot/etc/init.d/apache2
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/bin/sh
-#
-# /etc/init.d/apache2
-#
-NAME=apache2
-
-#
-# This is an workaround, if the path targets into a ramfs
-#
-mkdir -p @LOGPATH@
-
-case "$1" in
-start)
-   echo -n "Starting $NAME: "
-   if /usr/sbin/apache2 -f @APACHECONFIG@ -k start; then
-   echo "Done"
-   else
-   echo "Failed"
-   fi
-   ;;
-
-stop)
-   echo -n "Stopping $NAME: "
-   if /usr/sbin/apache2 -f @APACHECONFIG@ -k stop; then
-   echo "Done"
-   else
-   echo "Failed"
-   fi
-   ;;
-
-restart)
-   echo -n "Restarting $NAME: "
-   if /usr/sbin/apache2 -f @APACHECONFIG@ -k restart; then
-echo "Done"
-else
-   echo "Failed"
-fi
-;;
-
-*)
-echo "Usage: /etc/init.d/$NAME {start|stop|restart}"
-exit 1
-;;
-esac
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


[ptxdist] [PATCH 2/5] php: reanimate PHP as PHP8

2021-08-12 Thread Juergen Borleis
PHP5 is gone with commit f356f581e17a9474bdc01dbe3907f96558101609
  "php5: remove old package"

Let's try now with PHP8 instead and a minimal feature set due to limited
test options. The remaining features can be extended on demand.

Signed-off-by: Juergen Borleis 
---
 projectroot/etc/{php5 => php8}/php.ini |   0
 rules/php8.in  |  72 +++
 rules/php8.make| 123 +
 3 files changed, 195 insertions(+)
 rename projectroot/etc/{php5 => php8}/php.ini (100%)
 create mode 100644 rules/php8.in
 create mode 100644 rules/php8.make

diff --git a/projectroot/etc/php5/php.ini b/projectroot/etc/php8/php.ini
similarity index 100%
rename from projectroot/etc/php5/php.ini
rename to projectroot/etc/php8/php.ini
diff --git a/rules/php8.in b/rules/php8.in
new file mode 100644
index 000..a3b498e
--- /dev/null
+++ b/rules/php8.in
@@ -0,0 +1,72 @@
+## SECTION=scripting_languages
+# php6 configuration
+
+menuconfig PHP8
+   tristate
+   prompt "php8  "
+   select GLIBC_M
+   help
+ PHP, which stands for "PHP: Hypertext Preprocessor" is a widely-used
+ general-purpose scripting language that is especially suited for web
+ development and can be embedded into HTML.
+
+if PHP8
+
+config PHP8_INI
+   bool
+   prompt "install /etc/php8/php.ini"
+   default y
+   help
+ Installs (if present) the
+ "./projectroot/etc/php8/php.ini" file from your
+ workspace, otherwise a generic one from the ptxdist
+ directory.
+
+# 
+# SAPI Modules (add more on demand)
+# 
+
+choice
+   prompt "SAPI Module"
+   default PHP8_SAPI_NONE
+   help
+ Select one of the SAP (Server Application Programming) Interfaces to
+ be supported at run-time. It is possible to select no SAP interface
+ here, then your PHP supports a command line interface (CLI) only.
+
+config PHP8_SAPI_CGI
+   bool
+   prompt "cgi"
+   help
+ Build standard CGI version of PHP.
+
+config PHP8_SAPI_NONE
+   bool
+   prompt "none"
+   select PHP8_SAPI_CLI
+   help
+ This forces a command line interface variant only.
+
+endchoice
+
+config PHP8_SESSION
+   bool
+   prompt "session support"
+   default y
+   help
+ A session is a way to store information to be used across multiple
+ pages. The information is stored locally only.
+
+config PHP8_SAPI_CLI
+   bool
+   prompt "cli"
+   help
+ Build command line interface (CLI) version of PHP
+
+config PHP8_DEUBG
+   bool
+   prompt "Build debug variant"
+   help
+ Enable this entry to build a debug variant (no optimization)
+
+endif
diff --git a/rules/php8.make b/rules/php8.make
new file mode 100644
index 000..2f0e254
--- /dev/null
+++ b/rules/php8.make
@@ -0,0 +1,123 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2006-2008 by Robert Schwebel
+#       2009, 2012 by Marc Kleine-Budde 
+#   2015 by Bruno Thomsen 
+#   2021 by Juergen Borleis 
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_PHP8) += php8
+
+#
+# Paths and names
+#
+PHP8_VERSION   := 8.0.9
+PHP8_MD5   := 68a8cae879bb66425f6cfb11d94ceb02
+PHP8   := php-$(PHP8_VERSION)
+PHP8_SUFFIX:= tar.xz
+PHP8_SOURCE:= $(SRCDIR)/$(PHP8).$(PHP8_SUFFIX)
+PHP8_DIR   := $(BUILDDIR)/$(PHP8)
+
+#
+# Note: older releases are moved to the 'museum', but the 'de.php.net'
+# response with a HTML file instead of the archive. So, try the 'museum'
+# URL first
+#
+PHP8_URL := \
+   http://museum.php.net/php8/$(PHP8).$(PHP8_SUFFIX) \
+   http://de.php.net/distributions/$(PHP8).$(PHP8_SUFFIX)
+
+# 
+# Prepare
+# 
+
+PHP8_CONF_ENV := \
+   $(CROSS_ENV) \
+   ac_cv_prog_cc_cross=yes \
+   ac_cv_c_bigendian_php=$(call ptx/yesno, PTXCONF_ENDIAN_BIG)
+
+#
+# autoconf
+#
+PHP8_AUTOCONF := \
+   $(CROSS_AUTOCONF_USR) \
+   --with-config-file-path=/etc/php8 \
+   --without-iconv \
+   --disable-phpdbg \
+   --with-libdir=/usr/$(CROSS_LIB_DIR) \
+   --disable-opcache \
+   --disable-zend-signals
+
+# 
+# Network options
+# 
+
+ifndef PTXCONF_GLOBAL_IPV6
+PHP8_AUTOCONF += --disable-ipv6
+endif
+
+# --

Re: [ptxdist] problem configuring python3

2021-06-16 Thread Juergen Borleis
Am Mittwoch, den 16.06.2021, 09:10 -0400 schrieb Jon Ringle:
> […]
> I think your question led to the root cause. It looks like host-python3 was
> pulled from a -dev.tar.gz package since logfile doesn't show the
> prepare/compile stages. The dev package must have been built in a different
> environment that had glibc 2.29

"User error: insert more coffee"? ;-)

Jürgen

-- 
Pengutronix e.K.       | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-128  |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917-9|


___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


Re: [ptxdist] problem configuring python3

2021-06-16 Thread Juergen Borleis
Hi Jon,

Am Mittwoch, den 16.06.2021, 08:05 -0400 schrieb Jon Ringle:
> Am Dienstag, den 15.06.2021, 16:18 +0200 schrieb Michael Olbrich:
> > > […]
> > > I'm not sure why it would be looking for GLIBC_2.29
> > 
> > It seems the used binary libm was linked against a newer version of libc.
> > 
> > Can you please send the output of
> > 
> >  $ readelf -a
> > /src/build/platform-ec1k/sysroot-host/lib/libpython3.7m.so.1.0
> > 
> > and
> > 
> >  $ readelf -a /path/to/the/used/libm.so
> > 
> > 
> jringle@-arm-v5te-linux-gnueabi:~$ cat /usr/lib/x86_64-linux-gnu/libm.so
> /* GNU ld script
> */
> OUTPUT_FORMAT(elf64-x86-64)
> GROUP ( /lib/x86_64-linux-gnu/libm.so.6  AS_NEEDED (
> /usr/lib/x86_64-linux-gnu/libmvec_nonshared.a
> /lib/x86_64-linux-gnu/libmvec.so.1 ) )
> 
> I will attach the output of
> $ readelf -a /src/build/platform-ec1k/sysroot-host/lib/libpython3.7m.so.1.0
> and
> $ readelf -a /lib/x86_64-linux-gnu/libm.so.6
> 
> as they are quite large.

Sure :-)

Its quite confusing. Your 'libm' hasn't any dependency to GLIBC_2.29, but your
'libpython3.7m' has. I had expect these version dependency came in via the
systems libm. Can you repeat the readelf command to your listed 'libmvec.so.1'
and grep for the GLIBC_2.29 text? Something in this chain has exactly this
dependency to GLIBC_2.29.

Jürgen

-- 
Pengutronix e.K.   | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-128  |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917-9|


___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


Re: [ptxdist] problem configuring python3

2021-06-16 Thread Juergen Borleis
Hi Jon,

Am Dienstag, den 15.06.2021, 16:18 +0200 schrieb Michael Olbrich:
> […]
> I'm not sure why it would be looking for GLIBC_2.29

It seems the used binary libm was linked against a newer version of libc.

Can you please send the output of

 $ readelf -a /src/build/platform-ec1k/sysroot-host/lib/libpython3.7m.so.1.0

and

 $ readelf -a /path/to/the/used/libm.so

Jürgen

-- 
Pengutronix e.K.   | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-128  |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917-9|


___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


Re: [ptxdist] Root filesystem creation regression

2020-06-22 Thread Juergen Borleis
Hi Michael,

Michael Olbrich wrote:
> […]
> 'install_tree' is a bit of a special case here. The problem ist, that it
> cannot know, which directories are implicit. So it will always create all
> subdirectories (except the root directory of the tree). So you need to fix
> the permission in the install stage.

I do not want and I do not need to know how "systemd" likes its directories. I 
just want to *add* a file to this directory. And this is how it works if you 
run "make install" in your package for a regular root filesystem: The "install" 
tool just copies a file to this dedicated directory and uses the already 
existing directory (and its permissions) as-is - and everything is fine.
The conflict only happens in PTXdist due to all install stages always install 
into an "empty" filesystem.

jb

-- 
Pengutronix e.K.                       | Juergen Borleis             |
Steuerwalder Str. 21                   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany              | Phone: +49-5121-206917-128  |
Amtsgericht Hildesheim, HRA 2686       | Fax:   +49-5121-206917-9|

___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


[ptxdist] Root filesystem creation regression

2020-06-22 Thread Juergen Borleis
Hi,

since commit 9c0ec1da583f32706372d2a6cefa9a05f77ee8d2
  "ptxd_lib_check_dir_permissions: also check parents for directories"

the "install_tree" macro may create directories which makes this test fail and 
I'm unable to create root filesystems anymore.

The problem pops up if "install_tree" tries to install a file to a directory 
which has different permissions than the usual ones (0775, root:root).

For example: "systemd" sets up the "/usr/share/dbus-1/system-services" with 
permissions 0755. If my own package tries to add another file to this directory 
the corresponding "install" tool in the install stage creates the whole path 
with standard 0755 permissions - because the "filesystem" in the package 
directory (e.g. platform-/packages/) is always empty. In a 
regular root filesystem it works, because the directory structure already 
exists (with the intended permissions), and the "install" tool has to copy the 
file only.

Using "install_tree" in my package in this case creates a conflict for 
the "system-services" directory (0755 versus 0775). I guess it will fail at 
more locations than only "install_tree", if someone adds more and more accurate 
permissions due to security reasons.

jb

-- 
Pengutronix e.K.                       | Juergen Borleis             |
Steuerwalder Str. 21                   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany              | Phone: +49-5121-206917-128  |
Amtsgericht Hildesheim, HRA 2686       | Fax:   +49-5121-206917-9|

___
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to 
ptxdist-requ...@pengutronix.de


[ptxdist] [PATCH] Python handling was changes in the past, so remove a leftover as well

2020-03-30 Thread Juergen Borleis
In commit a1a8045112e06d5b15869c60ce4b70056c020666
  "remove hard dependency on Python2"

the handling of the external Python component was changed and a substitution
removed from configure.ac - but the 'Makefile.in' still uses the PYHTON
symbol and creates a strange softlink now. Remove that.

Signed-off-by: Juergen Borleis 

diff --git a/Makefile.in b/Makefile.in
index 31651db..88a32e7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -65,7 +65,6 @@ environment:
@ln -sf @GNU_dirname@ "$(abs_srcdir)/bin/dirname"
@ln -sf @GNU_readlink@ "$(abs_srcdir)/bin/readlink"
@ln -sf @GNU_sort@ "$(abs_srcdir)/bin/sort"
-   @ln -sf @PYTHON@ "$(abs_srcdir)/bin/python"
@ln -sf @SED@ "$(abs_srcdir)/bin/sed"
@ln -sf @GNU_xargs@ "$(abs_srcdir)/bin/xargs"
@ln -sf @BASH@  "$(abs_srcdir)/bin/bash"

-- 
Pengutronix e.K.                       | Juergen Borleis             |
Steuerwalder Str. 21                   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany              | Phone: +49-5121-206917-5128 |
Amtsgericht Hildesheim, HRA 2686       | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH] alsa-lib: add missing use-case-manager -> mixer dependency

2020-02-25 Thread Juergen Borleis
Hi Phillip,

Am Dienstag, den 25.02.2020, 18:03 +0100 schrieb Philipp Zabel:
> Fixes the following build failure if ALSA_LIB_UCM is enabled but
> ALSA_LIB_MIXER is disabled:
> 
> CCLD libasound.la
>   .../arm-v7a-linux-gnueabihf/bin/ld: ucm/.libs/libucm.a(main.o): in function
> `snd_use_case_parse_selem_id':
>   .../alsa-lib-1.2.1.2/src/ucm/main.c:1968: undefined reference to
> `snd_mixer_selem_id_parse'
> 
> Signed-off-by: Philipp Zabel 
> ---
>  rules/alsa-lib.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/rules/alsa-lib.in b/rules/alsa-lib.in
> index ae859fee376a..23c6c9b1cd1c 100644
> --- a/rules/alsa-lib.in
> +++ b/rules/alsa-lib.in
> @@ -8,6 +8,7 @@ menuconfig ALSA_LIB
>   select LIBC_PTHREAD
>   select LIBC_RT
>   select GCCLIBS_GCC_S
> + select ALSA_LIB_MIXER   if ALSA_LIB_UCM
>   help
> This is the userspace library to the kernel's "Advanced Linux Sound 
> Architecture" feature

And I thought I had test *all* permutations...

Acked-by: Juergen Borleis 

-- 
Pengutronix e.K.   | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-5128 |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |


___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH v5 2/3] host-yarn: new package

2020-02-21 Thread Juergen Borleis
Am Dienstag, den 04.02.2020, 08:53 +0100 schrieb Ulrich Ölmann:
> […]
> diff --git a/rules/host-yarn.make b/rules/host-yarn.make
> new file mode 100644
> index ..16e04c05aee8
> --- /dev/null
> +++ b/rules/host-yarn.make
> @@ -0,0 +1,61 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Juergen Borleis 
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +# 2019-May-05, Daniel Arnold, Updated to yarn 1.15.2
> +# 2020-January-09, Björn Esser, Updated to yarn 1.21.1
> +
> +#
> +# We provide this package
> +#
> +HOST_PACKAGES-$(PTXCONF_HOST_YARN) += host-yarn
> +
> +#
> +# Paths and names
> +#
> +HOST_YARN_VERSION:= 1.21.1
> +HOST_YARN_MD5:= cf49e663e0f56aa15f1740c77354ebe2
> +HOST_YARN:= yarn-$(HOST_YARN_VERSION)
> +HOST_YARN_SUFFIX := js
> +HOST_YARN_URL:= 
> https://github.com/yarnpkg/yarn/releases/download/v$(HOST_YARN_VERSION)/$(HOST_YARN).$(HOST_YARN_SUFFIX)
> +HOST_YARN_SOURCE := $(SRCDIR)/$(HOST_YARN).$(HOST_YARN_SUFFIX)

Don't forget the:

HOST_YARN_LICENSE   := BSD-2-Clause

jb

-- 
Pengutronix e.K.   | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-5128 |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |


___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH v5 1/3] nodejs: version bump 6.9.5 -> 12.14.1 LTS

2020-02-21 Thread Juergen Borleis
Hello Ulrich,

Am Dienstag, den 04.02.2020, 08:53 +0100 schrieb Ulrich Ölmann:
> […]
> diff --git a/rules/nodejs.in b/rules/nodejs.in
> index e4ac11568bcc..6d23f94ef8b7 100644
> --- a/rules/nodejs.in
> +++ b/rules/nodejs.in
> @@ -1,48 +1,20 @@
> -## SECTION=staging
> -## old section:
> -### SECTION=bytecode_engines
> +## SECTION=bytecode_engines
>  
>  menuconfig NODEJS
>   tristate
> - prompt "nodejs"
> + prompt "Node.js   "
>   select HOST_NODEJS
> + select C_ARES
> + select LIBUV
>   select OPENSSL
>   select ZLIB
>   help
> -   evented I/O for V8 javascript
> -
> -   Node.js is a platform built on Chrome's JavaScript runtime
> -   for easily building fast, scalable network
> -   applications. Node.js uses an event-driven, non-blocking I/O
> -   model that makes it lightweight and efficient, perfect for
> -   data-intensive real-time applications that run across
> -   distributed devices.
> -
> -   STAGING: remove in ptxdist-2020.06.0
> -   Old version that need to be updated. Fails to build with gcc >= 7.x.
> -
> -
> -if NODEJS
> -
> -config NODEJS_NPM
> - bool
> - prompt "install npm on target"
> […]

Since you remove all sub-menu entries, you should switch the whole entry from
"menuconfig" to "config" as well.

jb

-- 
Pengutronix e.K.   | Juergen Borleis |
Steuerwalder Str. 21   | https://www.pengutronix.de/ |
31137 Hildesheim, Germany  | Phone: +49-5121-206917-5128 |
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH] iptables: serialize startup service units

2020-01-22 Thread Juergen Borleis
Since iptables-1.8.x the tool complains at run-time if a second instance
holds the shared lock:

   Another app is currently holding the xtables lock. Perhaps you want to use 
the -w option?

If IPv4 and IPv6 is enabled, this concurrent situation can happen and at
the end one of both setups isn't done (first instance wins).

By serializing both service units this concurrent situation cannot occur
and both setups are done as expected.

Signed-off-by: Juergen Borleis 
---
 projectroot/usr/lib/systemd/system/ip6tables.service | 2 ++
 projectroot/usr/lib/systemd/system/iptables.service  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/projectroot/usr/lib/systemd/system/ip6tables.service 
b/projectroot/usr/lib/systemd/system/ip6tables.service
index e842cc197..7cf9ab88b 100644
--- a/projectroot/usr/lib/systemd/system/ip6tables.service
+++ b/projectroot/usr/lib/systemd/system/ip6tables.service
@@ -3,6 +3,8 @@ Description=Packet Filtering Framework
 DefaultDependencies=no
 After=systemd-sysctl.service
 Before=sysinit.target
+# ensure, we are running after IPv4
+After=iptables.service
 ConditionFileNotEmpty=/etc/iptables/rules.v6
 [Service]
 Type=oneshot
diff --git a/projectroot/usr/lib/systemd/system/iptables.service 
b/projectroot/usr/lib/systemd/system/iptables.service
index fa4a8b367..2628e 100644
--- a/projectroot/usr/lib/systemd/system/iptables.service
+++ b/projectroot/usr/lib/systemd/system/iptables.service
@@ -3,6 +3,8 @@ Description=Packet Filtering Framework
 DefaultDependencies=no
 After=systemd-sysctl.service
 Before=sysinit.target
+# ensure, we are running before IPv6
+Before=ip6tables.service
 ConditionFileNotEmpty=/etc/iptables/rules.v4
 [Service]
 Type=oneshot
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 2/3] alsa-libs: honor inter-package dependencies

2019-11-04 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/alsa-lib.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rules/alsa-lib.in b/rules/alsa-lib.in
index edc40e186..ae859fee3 100644
--- a/rules/alsa-lib.in
+++ b/rules/alsa-lib.in
@@ -35,6 +35,7 @@ config ALSA_LIB_READ
 
 config ALSA_LIB_MIXER
bool
+   select ALSA_LIB_PCM
default y
prompt "mixer"
help
@@ -76,6 +77,7 @@ config ALSA_LIB_HWDEP
 
 config ALSA_LIB_SEQ
bool
+   select ALSA_LIB_PCM
default y
prompt "sequencer"
help
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 3/3] alsa-utils: replace dependencies added by accident by the real ones

2019-11-04 Thread Juergen Borleis
These old dependencies do not really exist. It seems so, if one does tests
with libalsa and does not remove the header files from the previous try.
Then the header detection in alsa-utils reports false positives and tries
to build files, where no backend support is available in the current
libalsa.
On the other hand, if one enables an alsa-utils tool and the alsa-lib
headers are missing, the tool gets disabled again silently. It only works,
if all dependencies are correct (like always...).

Signed-off-by: Juergen Borleis 
---
 rules/alsa-utils.in   | 66 ---
 rules/alsa-utils.make | 21 +---
 2 files changed, 76 insertions(+), 11 deletions(-)

diff --git a/rules/alsa-utils.in b/rules/alsa-utils.in
index b6529d75d..0615e73f6 100644
--- a/rules/alsa-utils.in
+++ b/rules/alsa-utils.in
@@ -4,15 +4,17 @@ menuconfig ALSA_UTILS
tristate
prompt "alsa utils"
select ALSA_LIB
-# all tools from this package rely on special parts in the library:
-   select ALSA_LIB_MIXER
-   select ALSA_LIB_PCM
-   select ALSA_LIB_RAWMIDI
-   select ALSA_LIB_SEQ
-   select ALSA_LIB_UCM
+   select ALSA_LIB_UCM if ALSA_UTILS_USE_CASE_MANAGER
+   select ALSA_LIB_RAWMIDI if ALSA_UTILS_RAW_MIDI
+   select ALSA_LIB_MIXER   if ALSA_UTILS_AMIXER || ALSA_UTILS_ALSAMIXER
+   select ALSA_LIB_PCM if ALSA_UTILS_APLAYRECORD || ALSA_UTILS_IECSET 
|| ALSA_UTILS_MIDI || ALSA_UTILS_ALSALOOP
+   select ALSA_LIB_SEQ if ALSA_UTILS_SEQTOOLS || ALSA_UTILS_ACONNECT 
|| ALSA_UTILS_MIDI
+   select LIBC_M   if ALSA_UTILS_ALSALOOP
select LIBC_PTHREAD
select NCURSES  if ALSA_UTILS_ALSAMIXER
select SYSTEMD  if ALSA_UTILS_SYSTEMD_UNIT
+   # to detect where to install its udev rules
+   select UDEV
help
  Some utils to handle the Advanced Linux Sound Architecture.
  With these utils you can control your sound device, for
@@ -44,7 +46,7 @@ config ALSA_UTILS_ALSAMIXER
select NCURSES_MENU
select NCURSES_PANEL
help
- Build the alsamixer tool.
+ Build the console and ncurses based 'alsamixer' tool.
 
 config ALSA_UTILS_ALSALOOP
bool
@@ -53,5 +55,53 @@ config ALSA_UTILS_ALSALOOP
  alsaloop allows create a PCM loopback between a PCM capture
  device and a PCM playback device.
 
-endif
+config ALSA_UTILS_USE_CASE_MANAGER
+   bool
+   prompt "alsaucm"
+   help
+ Command-line tool to use the 'ALSA Use Case Interface'.
 
+config ALSA_UTILS_RAW_MIDI
+   bool
+   prompt "amidi"
+   help
+  Command-line tool to read from and write to ALSA RawMIDI ports.
+
+config ALSA_UTILS_MIDI
+   bool
+   prompt "aplaymidi/arecordmidi"
+   help
+  FIXME
+
+config ALSA_UTILS_AMIXER
+   bool
+   prompt "amixer"
+   help
+  Command-line mixer for ALSA soundcard driver.
+
+config ALSA_UTILS_APLAYRECORD
+   bool
+   prompt "aplay/arecord"
+   help
+  Command-line player and recorder for ALSA soundcard driver.
+
+config ALSA_UTILS_IECSET
+   bool
+   prompt "iecset"
+   help
+  Command-line tool to set or dump IEC958 status bits
+
+config ALSA_UTILS_SEQTOOLS
+   bool
+   prompt "aseqdump/aseqnet"
+   help
+ Installs 'aseqdump' to show events received at an ALSA sequencer port
+ and 'aseqnet' to connect an ALSA sequencer connector over network.
+
+config ALSA_UTILS_ACONNECT
+   bool
+   prompt "aconnect"
+   help
+ ALSA sequencer connection manager
+
+endif
diff --git a/rules/alsa-utils.make b/rules/alsa-utils.make
index 2031f75f8..77151b137 100644
--- a/rules/alsa-utils.make
+++ b/rules/alsa-utils.make
@@ -63,19 +63,34 @@ $(STATEDIR)/alsa-utils.targetinstall:
@$(call install_fixup, alsa-utils, DESCRIPTION, missing)
 
@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/sbin/alsactl)
+ifdef PTXCONF_ALSA_UTILS_RAW_MIDI
@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/amidi)
+endif
+ifdef PTXCONF_ALSA_UTILS_AMIXER
@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/amixer)
+endif
+ifdef PTXCONF_ALSA_UTILS_APLAYRECORD
@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/aplay)
-#  # link arecord aplay
+#  # same utility for recording - only a link is required
@$(call install_link, alsa-utils, aplay, /usr/bin/arecord)
-
+endif
+ifdef PTXCONF_ALSA_UTILS_IECSET
@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/iecset)
+endif
+ifdef PTXCONF_ALSA_UTILS_ACONNECT
@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/aconnect)
+endif
+ifdef PTXCONF_ALSA_UTILS_MIDI
@$(call install_copy, alsa-utils, 0, 0, 0755, -, /usr/bin/aplaymidi)
  

[ptxdist] [PATCH 1/3] alsa-lib: provide a way to limit the PCM modules

2019-11-04 Thread Juergen Borleis
On some platforms it makes sense to limit the available PCM modules to
the really required ones (application specific) or useful ones (hardware
specific). This change enables the user to select specific modules which
will be later on present in the run-time system.

To be backward compatible, the default keyword 'all' will still build all
available PCM modules. The list of available PCM modules is part of the
package's 'configure' help text.

Signed-off-by: Juergen Borleis 
---
 rules/alsa-lib.in   | 13 +
 rules/alsa-lib.make |  8 ++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/rules/alsa-lib.in b/rules/alsa-lib.in
index adba896ac..edc40e186 100644
--- a/rules/alsa-lib.in
+++ b/rules/alsa-lib.in
@@ -47,6 +47,19 @@ config ALSA_LIB_PCM
help
  Disable the PCM component if you do not need it
 
+config ALSA_LIB_PCM_MODULES
+   depends on ALSA_LIB_PCM
+   string
+   prompt "pcm modules"
+   default "all"
+   help
+ You can use the keyword 'all' here for all supported PCM modules or a
+ comma separated list of required module keywords. The list of module
+ keywords is:
+   copy linear route mulaw alaw adpcm rate plug multi shm file null
+   empty share meter hooks lfloat ladspa dmix dshare dsnoop asym
+   iec958 softvol extplug ioplug mmap_emul
+
 config ALSA_LIB_RAWMIDI
bool
default y
diff --git a/rules/alsa-lib.make b/rules/alsa-lib.make
index 3dac61ea5..227a4156e 100644
--- a/rules/alsa-lib.make
+++ b/rules/alsa-lib.make
@@ -62,8 +62,12 @@ ALSA_LIB_CONF_OPT:= \
--with-pthread \
--with-librt \
--with-alsa-devdir=/dev/snd \
-   --with-aload-devdir=/dev \
-   --with-pcm-plugins=all
+   --with-aload-devdir=/dev
+
+ifdef PTXCONF_ALSA_LIB_PCM
+ALSA_LIB_CONF_OPT += \
+   --with-pcm-plugins=$(PTXCONF_ALSA_LIB_PCM_MODULES)
+endif
 
 # 
 # Target-Install
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] OSELAS.Toolchain 2019.09.0 - incorrect install path

2019-09-19 Thread Juergen Borleis
Hi Christoph (hope, this time its correct :) ),

On Thursday 19 September 2019 21:01:30 Rüdiger, Christoph wrote:
> that was the key. For everyone else running into this issue, the command
> to install the toolchain to /opt/OSELAS... is now
>
> ptxdist make install

\o/

> However, ptxdist still checks the existence of /opt/OSELAS.Toolchain...
> at the very beginning of the build. Shouldn't it do that as part of the
> make install step, given that it never touches /opt/ during ptxdist go?

Hmm, seems some old code still remains... Michael?

Cheers,
Jürgen

-- 
Pengutronix e.K.                             | Juergen Borleis             |
Linux Solutions for Science and Industry     | Phone: +49-5121-206917-5128 |
Peiner Str. 6-8, 31137 Hildesheim, Germany   | Fax:   +49-5121-206917- |
Amtsgericht Hildesheim, HRA 2686             | http://www.pengutronix.de/  |

___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] OSELAS.Toolchain 2019.09.0 - incorrect install path

2019-09-19 Thread Juergen Borleis
Hi Rüdiger,

On Thursday 19 September 2019 05:56:48 Rüdiger, Christoph wrote:
> I discovered an issue in the 2019.09.0 OSELAS toolchain where the
> installation does not happen into the correct path at
> /opt/OSELAS.Toolchain-2019.09.0/... What happens instead is that
> everything gets installed into a package in the platform-... directory,
> but the things never make it from there into the /opt/ directory.
>
> I've attached the logfile for building and installing just the
> cross-binutils in a clean OSELAS-2019.09.0 project.
>
> From what I see, ptxdist creates the packages as it usually does, but for
> whatever reason does not install it on the host.
>
> How is this supposed to happen? What is going wrong here?

configure; make; make install… ;)

Due to regular permission issues in "opt/", the install step is now a 
separate step: "ptxdist make install" if I remember correctly.

Refer 00d88a79453255ec56439af359aa3e805f1176dd
   "add make target to install the toolchain"

in the OSELAS.Toolchain repository for details.

Cheers,
Jürgen

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

___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v3 10/10] logrotate: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/logrotate.in | 4 
 1 file changed, 4 insertions(+)

diff --git a/rules/logrotate.in b/rules/logrotate.in
index 202dee573..097804017 100644
--- a/rules/logrotate.in
+++ b/rules/logrotate.in
@@ -5,6 +5,7 @@ menuconfig LOGROTATE
prompt "logrotate "
select LIBPOPT
select ACL if LOGROTATE_ACL
+   select ROOTFS_VAR_LIB   if RUNTIME
help
  The logrotate utility is designed to simplify the
  administration of log files on a system which generates a lot
@@ -14,6 +15,9 @@ menuconfig LOGROTATE
  log file gets to a certain size. Normally, logrotate runs as
  a daily cron job.
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for its run-time information.
+
 if LOGROTATE
 
 config LOGROTATE_ACL
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v3 09/10] nfsutils: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/nfsutils.in   | 5 -
 rules/nfsutils.make | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/rules/nfsutils.in b/rules/nfsutils.in
index bd1052ebb..ef7eb7b98 100644
--- a/rules/nfsutils.in
+++ b/rules/nfsutils.in
@@ -9,11 +9,14 @@ menuconfig NFSUTILS
select RPCBIND  if RUNTIME
select LIBTIRPC if GLOBAL_IPV6
select ROOTFS_PROTOCOLS if NFSUTILS_CLIENT
+   select ROOTFS_VAR_LIB   if RUNTIME
help
  The Sun Network Filesystem (NFS) protocol provides transparent remote
  access to shared files across networks. The NFS protocol is designed
  to be portable across different machines, operating systems, network
  architectures, and transport protocols.
+ Note: this package expects write permissions to '/var/lib/nfs' for
+ its state information.
 
 if NFSUTILS
 
@@ -27,7 +30,7 @@ config NFSUTILS_SERVER
bool
prompt "server"
help
- Install all tools and daemons to run a NFS server.
+ Install all tools and daemons to run an NFS server.
 
 config NFSUTILS_NFSD_STARTSCRIPT
bool
diff --git a/rules/nfsutils.make b/rules/nfsutils.make
index 929f53c72..4ce01c4e3 100644
--- a/rules/nfsutils.make
+++ b/rules/nfsutils.make
@@ -76,7 +76,7 @@ $(STATEDIR)/nfsutils.targetinstall:
@$(call install_fixup, nfsutils,PRIORITY,optional)
@$(call install_fixup, nfsutils,SECTION,base)
@$(call install_fixup, nfsutils,AUTHOR,"Robert Schwebel 
")
-   @$(call install_fixup, nfsutils,DESCRIPTION,missing)
+   @$(call install_fixup, nfsutils,DESCRIPTION,"Network Filesystem 
Support")
 
@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsstat)
@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsiostat)
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v3 08/10] samba: show SysV related menue on demand only

2019-06-28 Thread Juergen Borleis
Installing SysV start scripts makes only sense, if SysV is the startup
method.

Signed-off-by: Juergen Borleis 
---
 rules/samba.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/samba.in b/rules/samba.in
index aeaf90a75..764e1667d 100644
--- a/rules/samba.in
+++ b/rules/samba.in
@@ -69,7 +69,7 @@ config SAMBA_CUPS
 config SAMBA_STARTSCRIPT
bool
default y
-   depends on SAMBA_SERVER
+   depends on SAMBA_SERVER && INITMETHOD_BBINIT
prompt "install /etc/init.d/samba"
 
 config SAMBA_SYSTEMD_UNIT
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v3 07/10] samba: adapt package's '/var/lib' and '/var/cache' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/samba.in | 5 +
 1 file changed, 5 insertions(+)

diff --git a/rules/samba.in b/rules/samba.in
index ec5423661..aeaf90a75 100644
--- a/rules/samba.in
+++ b/rules/samba.in
@@ -19,6 +19,8 @@ menuconfig SAMBA
select READLINE
select SYSTEMD  if SAMBA_SYSTEMD_UNIT
select ZLIB
+   select ROOTFS_VAR_LIB   if RUNTIME
+   select ROOTFS_VAR_CACHE if RUNTIME
help
  Samba is an Open Source/Free Software suite that has, since
  1992, provided file and print services to all manner of
@@ -28,6 +30,9 @@ menuconfig SAMBA
 
  See http://www.samba.org for details.
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' and '/var/cache'.
+
 if SAMBA
 
 config SAMBA_COMMON
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v3 05/10] dnsmasq: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/dnsmasq.in   | 9 ++---
 rules/dnsmasq.make | 5 +++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/rules/dnsmasq.in b/rules/dnsmasq.in
index 65f68f738..aec63dd0f 100644
--- a/rules/dnsmasq.in
+++ b/rules/dnsmasq.in
@@ -5,9 +5,9 @@
 menuconfig DNSMASQ
tristate
prompt "dnsmasq   "
-   select DBUS if DNSMASQ_DBUS
-   select LUA  if DNSMASQ_SCRIPT_LUA
-   select ROOTFS_VAR_LIB
+   select DBUS if DNSMASQ_DBUS
+   select LUA  if DNSMASQ_SCRIPT_LUA
+   select ROOTFS_VAR_LIB   if DNSMASQ_DHCP && RUNTIME
help
  A small caching DNS proxy and DHCP server.
 
@@ -23,6 +23,9 @@ menuconfig DNSMASQ
  Note: In order to make dnsmasq work as DHCP, you have to enable
  the following kernel features: FIXME
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for its leases database (DHCP feature enabled).
+
 if DNSMASQ
 
 comment "build options   ---"
diff --git a/rules/dnsmasq.make b/rules/dnsmasq.make
index 861936329..d9a134cdf 100644
--- a/rules/dnsmasq.make
+++ b/rules/dnsmasq.make
@@ -104,9 +104,10 @@ endif
 
@$(call install_alternative, dnsmasq, 0, 0, 0644, /etc/dnsmasq.conf)
 
-# for the 'dnsmasq.leases' file
+ifdef PTXCONF_DNSMASQ_DHCP
+#  # for the 'dnsmasq.leases' file
@$(call install_copy, dnsmasq, 0, 0, 0755, /var/lib/misc)
-
+endif
@$(call install_finish, dnsmasq)
 
@$(call touch)
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v3 02/10] conman: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/connman.in   | 3 ++-
 rules/connman.make | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/rules/connman.in b/rules/connman.in
index 9d4b1dbd3..3c2eb11a0 100644
--- a/rules/connman.in
+++ b/rules/connman.in
@@ -13,7 +13,8 @@ menuconfig CONNMAN
select DBUS_PYTHON  if CONNMAN_TESTS && RUNTIME
select WPA_SUPPLICANT   if CONNMAN_WIFI && RUNTIME
select WPA_SUPPLICANT_CTRL_IFACE_DBUS   if CONNMAN_WIFI
-   select BUSYBOX_START_STOP_DAEMONif CONNMAN_STARTSCRIPT
+   select BUSYBOX_START_STOP_DAEMONif CONNMAN_STARTSCRIPT && 
RUNTIME
+   select ROOTFS_VAR_LIB   if RUNTIME
prompt "connman   "
help
  The Connection Manager project provides a daemon for
diff --git a/rules/connman.make b/rules/connman.make
index 2f671f7d4..313098d1c 100644
--- a/rules/connman.make
+++ b/rules/connman.make
@@ -167,6 +167,7 @@ ifdef PTXCONF_CONNMAN_POLKIT
 endif
 
 #  # ship settings which enable wired interfaces per default
+   @$(call install_copy, connman, 0, 0, 0755, /var/lib/connman)
@$(call install_alternative, connman, 0, 0, 0600, \
/var/lib/connman/settings)
 
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v3 03/10] networkmanager: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/networkmanager.in | 4 
 1 file changed, 4 insertions(+)

diff --git a/rules/networkmanager.in b/rules/networkmanager.in
index 26e9fff9d..e966aa2c7 100644
--- a/rules/networkmanager.in
+++ b/rules/networkmanager.in
@@ -26,6 +26,7 @@ menuconfig NETWORKMANAGER
select UDEV_LIBUDEV
select WPA_SUPPLICANT   if NETWORKMANAGER_WIRELESS && 
RUNTIME
select WPA_SUPPLICANT_CTRL_IFACE_DBUS   if NETWORKMANAGER_WIRELESS && 
RUNTIME
+   select ROOTFS_VAR_LIB   if RUNTIME
prompt "networkmanager"
help
  NetworkManager is a tool to automate network configuration as far as
@@ -33,6 +34,9 @@ menuconfig NETWORKMANAGER
 
  http://projects.gnome.org/NetworkManager/
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib'.
+
 if NETWORKMANAGER
 
 config NETWORKMANAGER_STARTSCRIPT
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v3 01/10] rootfs: keep /var writable, even if the rootfs is read-only

2019-06-28 Thread Juergen Borleis
Having a read-only root filesystem is always a source of pain and trouble.
Many applications and tools expect to be able to store their state or
caching data or at least their logs somewhere in the filesystem.

The '/var' directory tree has a well known structure according to the
"File System Hierarchy Standard" and is used by all carefully designed
programs. Thus, this change provides a way to have this '/var' directory
tree writable, even if the main root filesystem is mounted read-only. It
uses an overlay filesystem and by default a RAM disk to store changed and
added data to this directory tree in a non persistent manner.

Due to the nature of the overlay filesystem the underlaying files from the
main root filesystem can still be accessed.

This approach requires the overlay filesystem support from the Linux
kernel. In order to use it, the feature CONFIG_OVERLAY_FS must be enabled.

The ugly details to establish the required overlaying filesystem are hidden
behind a "mount helper" for a dummy filesystem (here called 'varoverlayfs').
Thus, a BSP can change the overlaying filesystem by providing its own
'run-varoverlay.mount' in order to restrict the default RAM disk
differently or to switch to a different local storage.

The '/etc/fstab' file gets touched in this change, to enable some already
used RAM disks on demand, to gain backward compatibility if no overlay
approach is used.

Signed-off-by: Juergen Borleis 
---
 doc/daily_work.inc| 101 ++
 projectroot/etc/fstab |   6 +-
 .../lib/systemd/system/run-varoverlayfs.mount |   9 ++
 projectroot/usr/lib/systemd/system/var.mount  |  11 ++
 projectroot/usr/sbin/mount.varoverlayfs   |  11 ++
 rules/rootfs.in   |  66 +++-
 rules/rootfs.make |  19 +++-
 7 files changed, 191 insertions(+), 32 deletions(-)
 create mode 100644 projectroot/usr/lib/systemd/system/run-varoverlayfs.mount
 create mode 100644 projectroot/usr/lib/systemd/system/var.mount
 create mode 100644 projectroot/usr/sbin/mount.varoverlayfs

diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index 74da11953..6f1525aec 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -1371,3 +1371,104 @@ in the build machine's filesystem also for the target 
filesystem image. With
 a different ``umask`` than ``0022`` at build-time this may fail badly at
 run-time with strange erroneous behaviour (for example some daemons with
 regular user permissions cannot acces their own configuration files).
+
+Read Only Filesystem
+
+
+A system can run a read-only root filesystem in order to have a unit which
+can be powered off at any time, without any previous shut down sequence.
+
+But many applications and tools are still expecting a writable filesystem to
+temporarily store some kind of data or logging information for example. All
+these write attempts will fail and thus, the applications and tools will fail,
+too.
+
+According to the *Filesystem Hierarchy Standard 2.3* the directory tree in
+``/var/`` is traditionally writable and its content is persistent across system
+restarts. Thus, this directory tree is used by most applications and tools to
+store their data.
+
+The *Filesystem Hierarchy Standard 2.3* defines the following directories
+below ``/var/``:
+
+- ``cache/``: Application specific cache data
+- ``crash/``: System crash dumps
+- ``lib/``:   Application specific variable state information
+- ``lock/``:  Lock files
+- ``log/``:   Log files and directories
+- ``run/``:   Data relevant to running processes
+- ``spool/``: Application spool data
+- ``tmp/``:   Temporary files preserved between system reboots
+
+Although this writable directory tree is useful and valid for full blown host
+machines, an embedded system can behave differently here: For example a
+requirement can drop the persistency of changed data across reboots and always
+start with empty directories.
+
+Partially RAM Disks
+~~~
+
+This is the default behaviour of PTXdist: it mounts a couple of RAM disks over
+directories in ``/var`` expected to be writable by various applications and
+tools. These RAM disks start always in an empty state and are defined as 
follows:
+
++-+---+
+| mount point | mount options |
++=+===+
+| /var/log| nosuid,nodev,noexec,mode=0755,size=10%|
++-+---+
+| /var/lock   | nosuid,nodev,noexec,mode=0755,size=1M |
++-+---+
+| /var/tmp| nosuid,nod

[ptxdist] [PATCH v3 06/10] mariadb: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/mariadb.in | 4 
 1 file changed, 4 insertions(+)

diff --git a/rules/mariadb.in b/rules/mariadb.in
index b2127ea34..06cf4b9ad 100644
--- a/rules/mariadb.in
+++ b/rules/mariadb.in
@@ -16,10 +16,14 @@ config MARIADB
select NCURSES
select SYSTEMD  if MARIADB_SYSTEMD
select ZLIB
+   select ROOTFS_VAR_LIB   if RUNTIME
prompt "mariadb" if ALLYES
help
  MariaDB, a SQL database engine
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for the database.
+
 if MARIADB
 
 config MARIADB_SYSTEMD
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] '/var/ handling

2019-06-28 Thread Juergen Borleis
This is v3 of the remaining patches changing '/var' handling in PTXdist.

- remaining patches are rebased
- systemd options removed from serice units (now really!)
- overlayfs on '/var' reworked
- documentation adapted

Comments are welcome.



___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v3 04/10] ntp: adapt package's '/var/lib' and '/var/log' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/ntp.in   | 5 +
 rules/ntp.make | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/rules/ntp.in b/rules/ntp.in
index c211c91cd..55bf38b94 100644
--- a/rules/ntp.in
+++ b/rules/ntp.in
@@ -10,10 +10,15 @@ menuconfig NTP
select LIBC_M
select LIBC_RT
select GCCLIBS_GCC_S
+   select ROOTFS_VAR_LIB   if RUNTIME
+   select ROOTFS_VAR_LOG   if RUNTIME
help
  Build the standard NTP Daemon Process and supplementary programs.
  This conflicts with BSD openntpd.
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' and '/var/log'.
+
 # - Compile Options
 
 if NTP
diff --git a/rules/ntp.make b/rules/ntp.make
index 5d51ae4fc..411ad2ecf 100644
--- a/rules/ntp.make
+++ b/rules/ntp.make
@@ -160,7 +160,7 @@ $(STATEDIR)/ntp.targetinstall:
@$(call install_fixup, ntp,PRIORITY,optional)
@$(call install_fixup, ntp,SECTION,base)
@$(call install_fixup, ntp,AUTHOR,"Robert Schwebel")
-   @$(call install_fixup, ntp,DESCRIPTION,missing)
+   @$(call install_fixup, ntp,DESCRIPTION, "Network Time Protocol Daemon")
 
 #  #
 #  # ntpdate
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


Re: [ptxdist] [PATCH v2 01/10] rootfs: keep /var writable, even if the rootfs is read-only

2019-06-28 Thread Juergen Borleis
Please ignore this series :(

Will send v3 immediately.

jb

___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2 08/10] samba: show SysV related menue on demand only

2019-06-28 Thread Juergen Borleis
Installing SysV start scripts makes only sense, if SysV is the startup
method.

Signed-off-by: Juergen Borleis 
---
 rules/samba.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/samba.in b/rules/samba.in
index aeaf90a75..764e1667d 100644
--- a/rules/samba.in
+++ b/rules/samba.in
@@ -69,7 +69,7 @@ config SAMBA_CUPS
 config SAMBA_STARTSCRIPT
bool
default y
-   depends on SAMBA_SERVER
+   depends on SAMBA_SERVER && INITMETHOD_BBINIT
prompt "install /etc/init.d/samba"
 
 config SAMBA_SYSTEMD_UNIT
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2 03/10] networkmanager: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/networkmanager.in | 4 
 1 file changed, 4 insertions(+)

diff --git a/rules/networkmanager.in b/rules/networkmanager.in
index 26e9fff9d..e966aa2c7 100644
--- a/rules/networkmanager.in
+++ b/rules/networkmanager.in
@@ -26,6 +26,7 @@ menuconfig NETWORKMANAGER
select UDEV_LIBUDEV
select WPA_SUPPLICANT   if NETWORKMANAGER_WIRELESS && 
RUNTIME
select WPA_SUPPLICANT_CTRL_IFACE_DBUS   if NETWORKMANAGER_WIRELESS && 
RUNTIME
+   select ROOTFS_VAR_LIB   if RUNTIME
prompt "networkmanager"
help
  NetworkManager is a tool to automate network configuration as far as
@@ -33,6 +34,9 @@ menuconfig NETWORKMANAGER
 
  http://projects.gnome.org/NetworkManager/
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib'.
+
 if NETWORKMANAGER
 
 config NETWORKMANAGER_STARTSCRIPT
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2 09/10] nfsutils: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/nfsutils.in   | 5 -
 rules/nfsutils.make | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/rules/nfsutils.in b/rules/nfsutils.in
index bd1052ebb..ef7eb7b98 100644
--- a/rules/nfsutils.in
+++ b/rules/nfsutils.in
@@ -9,11 +9,14 @@ menuconfig NFSUTILS
select RPCBIND  if RUNTIME
select LIBTIRPC if GLOBAL_IPV6
select ROOTFS_PROTOCOLS if NFSUTILS_CLIENT
+   select ROOTFS_VAR_LIB   if RUNTIME
help
  The Sun Network Filesystem (NFS) protocol provides transparent remote
  access to shared files across networks. The NFS protocol is designed
  to be portable across different machines, operating systems, network
  architectures, and transport protocols.
+ Note: this package expects write permissions to '/var/lib/nfs' for
+ its state information.
 
 if NFSUTILS
 
@@ -27,7 +30,7 @@ config NFSUTILS_SERVER
bool
prompt "server"
help
- Install all tools and daemons to run a NFS server.
+ Install all tools and daemons to run an NFS server.
 
 config NFSUTILS_NFSD_STARTSCRIPT
bool
diff --git a/rules/nfsutils.make b/rules/nfsutils.make
index 929f53c72..4ce01c4e3 100644
--- a/rules/nfsutils.make
+++ b/rules/nfsutils.make
@@ -76,7 +76,7 @@ $(STATEDIR)/nfsutils.targetinstall:
@$(call install_fixup, nfsutils,PRIORITY,optional)
@$(call install_fixup, nfsutils,SECTION,base)
@$(call install_fixup, nfsutils,AUTHOR,"Robert Schwebel 
")
-   @$(call install_fixup, nfsutils,DESCRIPTION,missing)
+   @$(call install_fixup, nfsutils,DESCRIPTION,"Network Filesystem 
Support")
 
@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsstat)
@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsiostat)
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2 04/10] ntp: adapt package's '/var/lib' and '/var/log' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/ntp.in   | 5 +
 rules/ntp.make | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/rules/ntp.in b/rules/ntp.in
index c211c91cd..55bf38b94 100644
--- a/rules/ntp.in
+++ b/rules/ntp.in
@@ -10,10 +10,15 @@ menuconfig NTP
select LIBC_M
select LIBC_RT
select GCCLIBS_GCC_S
+   select ROOTFS_VAR_LIB   if RUNTIME
+   select ROOTFS_VAR_LOG   if RUNTIME
help
  Build the standard NTP Daemon Process and supplementary programs.
  This conflicts with BSD openntpd.
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' and '/var/log'.
+
 # - Compile Options
 
 if NTP
diff --git a/rules/ntp.make b/rules/ntp.make
index 5d51ae4fc..411ad2ecf 100644
--- a/rules/ntp.make
+++ b/rules/ntp.make
@@ -160,7 +160,7 @@ $(STATEDIR)/ntp.targetinstall:
@$(call install_fixup, ntp,PRIORITY,optional)
@$(call install_fixup, ntp,SECTION,base)
@$(call install_fixup, ntp,AUTHOR,"Robert Schwebel")
-   @$(call install_fixup, ntp,DESCRIPTION,missing)
+   @$(call install_fixup, ntp,DESCRIPTION, "Network Time Protocol Daemon")
 
 #  #
 #  # ntpdate
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2 01/10] rootfs: keep /var writable, even if the rootfs is read-only

2019-06-28 Thread Juergen Borleis
Having a read-only root filesystem is always a source of pain and trouble.
Many applications and tools expect to be able to store their state or
caching data or at least their logs somewhere in the filesystem.

The '/var' directory tree has a well known structure according to the
"File System Hierarchy Standard" and is used by all carefully designed
programs. Thus, this change provides a way to have this '/var' directory
tree writable, even if the main root filesystem is mounted read-only. It
uses an overlay filesystem and by default a RAM disk to store changed and
added data to this directory tree in a non persistent manner.

Due to the nature of the overlay filesystem the underlaying files from the
main root filesystem can still be accessed.

This approach requires the overlay filesystem support from the Linux
kernel. In order to use it, the feature CONFIG_OVERLAY_FS must be enabled.

The ugly details to establish the required overlaying filesystem are hidden
behind a "mount helper" for a dummy filesystem (here called 'varoverlayfs').
Thus, a BSP can change the overlaying filesystem by providing its own
'run-varoverlay.mount' in order to restrict the default RAM disk
differently or to switch to a different local storage.

The '/etc/fstab' file gets touched in this change, to enable some already
used RAM disks on demand, to gain backward compatibility if no overlay
approach is used.

Signed-off-by: Juergen Borleis 
---
 doc/daily_work.inc| 101 ++
 projectroot/etc/fstab |   6 +-
 .../lib/systemd/system/run-varoverlayfs.mount |   9 ++
 projectroot/usr/lib/systemd/system/var.mount  |  11 ++
 projectroot/usr/sbin/mount.varoverlayfs   |  11 ++
 rules/rootfs.in   |  66 +++-
 rules/rootfs.make |  19 +++-
 7 files changed, 191 insertions(+), 32 deletions(-)
 create mode 100644 projectroot/usr/lib/systemd/system/run-varoverlayfs.mount
 create mode 100644 projectroot/usr/lib/systemd/system/var.mount
 create mode 100644 projectroot/usr/sbin/mount.varoverlayfs

diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index 74da11953..6f1525aec 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -1371,3 +1371,104 @@ in the build machine's filesystem also for the target 
filesystem image. With
 a different ``umask`` than ``0022`` at build-time this may fail badly at
 run-time with strange erroneous behaviour (for example some daemons with
 regular user permissions cannot acces their own configuration files).
+
+Read Only Filesystem
+
+
+A system can run a read-only root filesystem in order to have a unit which
+can be powered off at any time, without any previous shut down sequence.
+
+But many applications and tools are still expecting a writable filesystem to
+temporarily store some kind of data or logging information for example. All
+these write attempts will fail and thus, the applications and tools will fail,
+too.
+
+According to the *Filesystem Hierarchy Standard 2.3* the directory tree in
+``/var/`` is traditionally writable and its content is persistent across system
+restarts. Thus, this directory tree is used by most applications and tools to
+store their data.
+
+The *Filesystem Hierarchy Standard 2.3* defines the following directories
+below ``/var/``:
+
+- ``cache/``: Application specific cache data
+- ``crash/``: System crash dumps
+- ``lib/``:   Application specific variable state information
+- ``lock/``:  Lock files
+- ``log/``:   Log files and directories
+- ``run/``:   Data relevant to running processes
+- ``spool/``: Application spool data
+- ``tmp/``:   Temporary files preserved between system reboots
+
+Although this writable directory tree is useful and valid for full blown host
+machines, an embedded system can behave differently here: For example a
+requirement can drop the persistency of changed data across reboots and always
+start with empty directories.
+
+Partially RAM Disks
+~~~
+
+This is the default behaviour of PTXdist: it mounts a couple of RAM disks over
+directories in ``/var`` expected to be writable by various applications and
+tools. These RAM disks start always in an empty state and are defined as 
follows:
+
++-+---+
+| mount point | mount options |
++=+===+
+| /var/log| nosuid,nodev,noexec,mode=0755,size=10%|
++-+---+
+| /var/lock   | nosuid,nodev,noexec,mode=0755,size=1M |
++-+---+
+| /var/tmp| nosuid,nod

[ptxdist] [PATCH v2 07/10] samba: adapt package's '/var/lib' and '/var/cache' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 ...ate-expected-directories-at-run-time.patch | 38 +++
 patches/samba-4.9.5/series|  4 ++
 rules/samba.in|  5 +++
 3 files changed, 47 insertions(+)
 create mode 100644 
patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch
 create mode 100644 patches/samba-4.9.5/series

diff --git 
a/patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch
 
b/patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch
new file mode 100644
index 0..8569e0737
--- /dev/null
+++ 
b/patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch
@@ -0,0 +1,38 @@
+From: Juergen Borleis 
+Date: Tue, 4 Jun 2019 20:24:15 +0200
+Subject: [PATCH] Lets systemd create expected directories at run-time
+
+'samba' requires '/var/lib/samba' and '/var/cache/samba'.
+
+Signed-off-by: Juergen Borleis 
+---
+ packaging/systemd/nmb.service.in | 2 ++
+ packaging/systemd/smb.service.in | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/packaging/systemd/nmb.service.in 
b/packaging/systemd/nmb.service.in
+index a30812320c05..c9373d2ba0a6 100644
+--- a/packaging/systemd/nmb.service.in
 b/packaging/systemd/nmb.service.in
+@@ -8,6 +8,8 @@ After=network.target network-online.target
+ Type=notify
+ NotifyAccess=all
+ PIDFile=@PIDDIR@/nmbd.pid
++StateDirectory=samba
++CacheDirectory=samba
+ EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba
+ ExecStart=@SBINDIR@/nmbd --foreground --no-process-group $NMBDOPTIONS
+ ExecReload=/bin/kill -HUP $MAINPID
+diff --git a/packaging/systemd/smb.service.in 
b/packaging/systemd/smb.service.in
+index 18912ef0e98f..76aedfa20337 100644
+--- a/packaging/systemd/smb.service.in
 b/packaging/systemd/smb.service.in
+@@ -9,6 +9,8 @@ Type=notify
+ NotifyAccess=all
+ PIDFile=@PIDDIR@/smbd.pid
+ LimitNOFILE=16384
++StateDirectory=samba
++CacheDirectory=samba
+ EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba
+ ExecStart=@SBINDIR@/smbd --foreground --no-process-group $SMBDOPTIONS
+ ExecReload=/bin/kill -HUP $MAINPID
diff --git a/patches/samba-4.9.5/series b/patches/samba-4.9.5/series
new file mode 100644
index 0..b2dcdc0a4
--- /dev/null
+++ b/patches/samba-4.9.5/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Lets-systemd-create-expected-directories-at-run-time.patch
+# 2d2f83b2911fe3f43bff610738827040  - git-ptx-patches magic
diff --git a/rules/samba.in b/rules/samba.in
index ec5423661..aeaf90a75 100644
--- a/rules/samba.in
+++ b/rules/samba.in
@@ -19,6 +19,8 @@ menuconfig SAMBA
select READLINE
select SYSTEMD  if SAMBA_SYSTEMD_UNIT
select ZLIB
+   select ROOTFS_VAR_LIB   if RUNTIME
+   select ROOTFS_VAR_CACHE if RUNTIME
help
  Samba is an Open Source/Free Software suite that has, since
  1992, provided file and print services to all manner of
@@ -28,6 +30,9 @@ menuconfig SAMBA
 
  See http://www.samba.org for details.
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' and '/var/cache'.
+
 if SAMBA
 
 config SAMBA_COMMON
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2 10/10] logrotate: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/logrotate.in | 4 
 1 file changed, 4 insertions(+)

diff --git a/rules/logrotate.in b/rules/logrotate.in
index 202dee573..097804017 100644
--- a/rules/logrotate.in
+++ b/rules/logrotate.in
@@ -5,6 +5,7 @@ menuconfig LOGROTATE
prompt "logrotate "
select LIBPOPT
select ACL if LOGROTATE_ACL
+   select ROOTFS_VAR_LIB   if RUNTIME
help
  The logrotate utility is designed to simplify the
  administration of log files on a system which generates a lot
@@ -14,6 +15,9 @@ menuconfig LOGROTATE
  log file gets to a certain size. Normally, logrotate runs as
  a daily cron job.
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for its run-time information.
+
 if LOGROTATE
 
 config LOGROTATE_ACL
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2 06/10] mariadb: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/mariadb.in | 4 
 1 file changed, 4 insertions(+)

diff --git a/rules/mariadb.in b/rules/mariadb.in
index b2127ea34..06cf4b9ad 100644
--- a/rules/mariadb.in
+++ b/rules/mariadb.in
@@ -16,10 +16,14 @@ config MARIADB
select NCURSES
select SYSTEMD  if MARIADB_SYSTEMD
select ZLIB
+   select ROOTFS_VAR_LIB   if RUNTIME
prompt "mariadb" if ALLYES
help
  MariaDB, a SQL database engine
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for the database.
+
 if MARIADB
 
 config MARIADB_SYSTEMD
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2 02/10] conman: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/connman.in   | 3 ++-
 rules/connman.make | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/rules/connman.in b/rules/connman.in
index 9d4b1dbd3..3c2eb11a0 100644
--- a/rules/connman.in
+++ b/rules/connman.in
@@ -13,7 +13,8 @@ menuconfig CONNMAN
select DBUS_PYTHON  if CONNMAN_TESTS && RUNTIME
select WPA_SUPPLICANT   if CONNMAN_WIFI && RUNTIME
select WPA_SUPPLICANT_CTRL_IFACE_DBUS   if CONNMAN_WIFI
-   select BUSYBOX_START_STOP_DAEMONif CONNMAN_STARTSCRIPT
+   select BUSYBOX_START_STOP_DAEMONif CONNMAN_STARTSCRIPT && 
RUNTIME
+   select ROOTFS_VAR_LIB   if RUNTIME
prompt "connman   "
help
  The Connection Manager project provides a daemon for
diff --git a/rules/connman.make b/rules/connman.make
index 2f671f7d4..313098d1c 100644
--- a/rules/connman.make
+++ b/rules/connman.make
@@ -167,6 +167,7 @@ ifdef PTXCONF_CONNMAN_POLKIT
 endif
 
 #  # ship settings which enable wired interfaces per default
+   @$(call install_copy, connman, 0, 0, 0755, /var/lib/connman)
@$(call install_alternative, connman, 0, 0, 0600, \
/var/lib/connman/settings)
 
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH v2 05/10] dnsmasq: adapt package's '/var/lib' requirements

2019-06-28 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/dnsmasq.in   | 9 ++---
 rules/dnsmasq.make | 5 +++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/rules/dnsmasq.in b/rules/dnsmasq.in
index 65f68f738..aec63dd0f 100644
--- a/rules/dnsmasq.in
+++ b/rules/dnsmasq.in
@@ -5,9 +5,9 @@
 menuconfig DNSMASQ
tristate
prompt "dnsmasq   "
-   select DBUS if DNSMASQ_DBUS
-   select LUA  if DNSMASQ_SCRIPT_LUA
-   select ROOTFS_VAR_LIB
+   select DBUS if DNSMASQ_DBUS
+   select LUA  if DNSMASQ_SCRIPT_LUA
+   select ROOTFS_VAR_LIB   if DNSMASQ_DHCP && RUNTIME
help
  A small caching DNS proxy and DHCP server.
 
@@ -23,6 +23,9 @@ menuconfig DNSMASQ
  Note: In order to make dnsmasq work as DHCP, you have to enable
  the following kernel features: FIXME
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for its leases database (DHCP feature enabled).
+
 if DNSMASQ
 
 comment "build options   ---"
diff --git a/rules/dnsmasq.make b/rules/dnsmasq.make
index 861936329..d9a134cdf 100644
--- a/rules/dnsmasq.make
+++ b/rules/dnsmasq.make
@@ -104,9 +104,10 @@ endif
 
@$(call install_alternative, dnsmasq, 0, 0, 0644, /etc/dnsmasq.conf)
 
-# for the 'dnsmasq.leases' file
+ifdef PTXCONF_DNSMASQ_DHCP
+#  # for the 'dnsmasq.leases' file
@$(call install_copy, dnsmasq, 0, 0, 0755, /var/lib/misc)
-
+endif
@$(call install_finish, dnsmasq)
 
@$(call touch)
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de


[ptxdist] [PATCH 12/20] polkit: adapt package's '/var/lib' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/polkit.in | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/rules/polkit.in b/rules/polkit.in
index ef7b1fae2..97b81e0c8 100644
--- a/rules/polkit.in
+++ b/rules/polkit.in
@@ -10,12 +10,16 @@ menuconfig POLKIT
select GLIB
select DBUS_GLIB
select EGGDBUS
-   select SYSTEMD if POLKIT_SYSTEMD
-   select SYSTEMD_LOGIND if POLKIT_SYSTEMD
+   select SYSTEMD  if POLKIT_SYSTEMD
+   select SYSTEMD_LOGIND   if POLKIT_SYSTEMD
+   select ROOTFS_VAR_LIB   if RUNTIME
help
  PolicyKit offers an infrastructure for security policies for
  dbus applications.
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for its run-time information.
+
 if POLKIT
 
 config POLKIT_SYSTEMD
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 03/20] rootfs: '/var' is a mandatory directory according to FHS

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/fake-overlayfs.in|  4 
 rules/initmethod-bbinit.in |  1 -
 rules/rootfs.in| 12 ++--
 rules/rootfs.make  |  2 --
 4 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/rules/fake-overlayfs.in b/rules/fake-overlayfs.in
index c328bc0fb..2469ddfad 100644
--- a/rules/fake-overlayfs.in
+++ b/rules/fake-overlayfs.in
@@ -18,23 +18,19 @@ comment "Copy the content of these directories"
 
 config FAKE_OVERLAYFS_VAR
bool "/var"
-   select ROOTFS_VAR   if ROOTFS
 
 if !FAKE_OVERLAYFS_VAR
 
 config FAKE_OVERLAYFS_VAR_LIB
bool "/var/lib"
-   select ROOTFS_VAR   if ROOTFS
select ROOTFS_VAR_LIB   if ROOTFS
 
 config FAKE_OVERLAYFS_VAR_TMP
bool "/var/tmp"
-   select ROOTFS_VAR   if ROOTFS
select ROOTFS_VAR_TMP   if ROOTFS
 
 config FAKE_OVERLAYFS_VAR_CACHE
bool "/var/cache"
-   select ROOTFS_VAR   if ROOTFS
select ROOTFS_VAR_CACHE if ROOTFS
 
 endif
diff --git a/rules/initmethod-bbinit.in b/rules/initmethod-bbinit.in
index 383add59f..e0b3be178 100644
--- a/rules/initmethod-bbinit.in
+++ b/rules/initmethod-bbinit.in
@@ -33,7 +33,6 @@ config INITMETHOD_BBINIT_ETC_INITD_NETWORKING
 config INITMETHOD_BBINIT_ETC_INITD_RT_SET_BANDWIDTH
bool
prompt "install /etc/init.d/rt-set-bandwidth"
-   select ROOTFS_VAR
select ROOTFS_VAR_RUN
default y
help
diff --git a/rules/rootfs.in b/rules/rootfs.in
index d844f825e..3ea4bde60 100644
--- a/rules/rootfs.in
+++ b/rules/rootfs.in
@@ -169,15 +169,7 @@ config ROOTFS_TMP
  Create a /tmp directory in the root filesystem.
  You should say yes here.
 
-config ROOTFS_VAR
-   bool
-   prompt "/var"
-   default y
-   help
- Create a /var directory in the root filesystem.
- You should say yes here.
-
-if ROOTFS_VAR
+menu "/var"
 
 config ROOTFS_VAR_OVERLAYFS
bool
@@ -256,7 +248,7 @@ config ROOTFS_VAR_TMP
  system reboots. Say 'y' here to ensure a '/var/tmp' directory is
  available at run-time.
 
-endif # ROOTFS_VAR
+endmenu
 endif # ROOTFS
 
 # 
diff --git a/rules/rootfs.make b/rules/rootfs.make
index 8f0c61f52..8183d0288 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -96,9 +96,7 @@ endif
 ifdef PTXCONF_ROOTFS_TMP
@$(call install_copy, rootfs, 0, 0, 1777, /tmp)
 endif
-ifdef PTXCONF_ROOTFS_VAR
@$(call install_copy, rootfs, 0, 0, 0755, /var)
-endif
 ifdef PTXCONF_ROOTFS_VAR_LOG
@$(call install_copy, rootfs, 0, 0, 0755, /var/log)
 endif
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 20/20] Update and sync autotools based package templates

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/templates/src-autoconf-lib/Makefile.am  |   2 +-
 rules/templates/src-autoconf-lib/configure.ac |  35 +--
 rules/templates/src-autoconf-prog/Makefile.am |   3 +-
 .../templates/src-autoconf-prog/configure.ac  | 110 +++-
 .../src-autoconf-proglib/Makefile.am  |   2 +-
 .../src-autoconf-proglib/configure.ac | 100 ++-
 .../template-m4-macros/attributes.m4  |   2 +-
 .../template-m4-macros/ax_armv7_detection.m4  |   8 +-
 ...mv4_detection.m4 => ax_armv8_detection.m4} |  60 ++--
 rules/templates/template-m4-macros/pkg.m4 | 256 +-
 rules/templates/template-src-autoconf-make|  37 +--
 11 files changed, 448 insertions(+), 167 deletions(-)
 rename rules/templates/template-m4-macros/{ax_armv4_detection.m4 => 
ax_armv8_detection.m4} (62%)

diff --git a/rules/templates/src-autoconf-lib/Makefile.am 
b/rules/templates/src-autoconf-lib/Makefile.am
index ae223891a..771b45454 100644
--- a/rules/templates/src-autoconf-lib/Makefile.am
+++ b/rules/templates/src-autoconf-lib/Makefile.am
@@ -28,10 +28,10 @@ EXTRA_DIST = \
autogen.sh \
m4/attributes.m4 \
m4/ptx.m4 \
-   m4/ax_armv4_detection.m4 \
m4/ax_armv5_detection.m4 \
m4/ax_armv6_detection.m4 \
m4/ax_armv7_detection.m4 \
+   m4/ax_armv8_detection.m4 \
m4/ax_floating_point.m4 \
m4/ax_code_coverage.m4 \
m4/pkg.m4 \
diff --git a/rules/templates/src-autoconf-lib/configure.ac 
b/rules/templates/src-autoconf-lib/configure.ac
index 24d0cb189..f062e6be5 100644
--- a/rules/templates/src-autoconf-lib/configure.ac
+++ b/rules/templates/src-autoconf-lib/configure.ac
@@ -14,9 +14,15 @@ AM_SILENT_RULES([yes])
 # TODO If you don't want the default installation path to be '/usr/local' 
change it here
 # AC_PREFIX_DEFAULT()
 
-# TODO If possible, enable extensions to Posix
+# If possible, enable extensions to Posix
 AC_USE_SYSTEM_EXTENSIONS
 
+# support LFS
+AC_SYS_LARGEFILE
+
+AM_MAINTAINER_MODE
+AM_INIT_AUTOMAKE([foreign no-exeext dist-xz silent-rules subdir-objects])
+
 #
 # libtool library versioning stuff
 #
@@ -31,13 +37,10 @@ AC_SUBST(LT_CURRENT)
 AC_SUBST(LT_REVISION)
 AC_SUBST(LT_AGE)
 
-AM_MAINTAINER_MODE
-AM_INIT_AUTOMAKE([foreign no-exeext dist-xz silent-rules subdir-objects])
-
 #
 # Checks for programs.
 #
-AC_PROG_CC
+AC_PROG_CC_C99
 
 #
 # TODO to only build the static library uncomment the following line
@@ -120,15 +123,16 @@ PTX_LIBRARY_CHECKS
 # specific architectures.
 
 #AS_IF([test x${host_cpu} = "xarm"],
-#  [AX_DETECT_ARMV4([enable_arm4=yes], [enable_arm4=no])
-#  AX_DETECT_ARMV5([enable_arm5=yes], [enable_arm5=no])
+#  [AX_DETECT_ARMV5([enable_arm5=yes], [enable_arm5=no])
 #  AX_DETECT_ARMV6([enable_arm6=yes], [enable_arm6=no])
 #  AX_DETECT_ARMV7([enable_arm7=yes], [enable_arm7=no])
+#  AX_DETECT_ARMV8([enable_arm8=yes], [enable_arm8=no])
 #
 #  AS_IF([test x${enable_arm4} = "xyes"], [AC_MSG_NOTICE([ARMv4 target])])
 #  AS_IF([test x${enable_arm5} = "xyes"], [AC_MSG_NOTICE([ARMv5 target])])
 #  AS_IF([test x${enable_arm6} = "xyes"], [AC_MSG_NOTICE([ARMv6 target])])
-#  AS_IF([test x${enable_arm7} = "xyes"], [AC_MSG_NOTICE([ARMv7 
target])])])
+#  AS_IF([test x${enable_arm7} = "xyes"], [AC_MSG_NOTICE([ARMv7 target])])
+#  AS_IF([test x${enable_arm8} = "xyes"], [AC_MSG_NOTICE([ARMv8 
target])])])
 
 # -- use all the settings 
 
@@ -177,14 +181,17 @@ AC_MSG_RESULT([
 Target CPU:${host_cpu}
 Target OS: ${host_os}
 
-   Detected options:
+   User options:
--
-CPPFLAGS:  ${CPPFLAGS}
 CFLAGS:${CFLAGS}
+CPPFLAGS:  ${CPPFLAGS}
 LDFLAGS:   ${LDFLAGS}
+
+   Detected options:
+   --
 Debug: ${enable_debug}
 Hidden symbols ${enable_hide}
-Coverage:  ${enable_coverage}
+Coverage:  ${enable_code_coverage}
CPPFLAGS:   ${CODE_COVERAGE_CPPFLAGS}
CFLAGS: ${CODE_COVERAGE_CFLAGS}
LDFLAGS:${CODE_COVERAGE_LDFLAGS}
@@ -193,12 +200,6 @@ AC_MSG_RESULT([
 Private libs:  ${LIBS}
 Use abort():   ${enable_abort}
 
-   User options:
-   --
-CFLAGS:${CFLAGS}
-CPPFLAGS:  ${CPPFLAGS}
-LDFLAGS:   ${LDFLAGS}
-
Install options:
--
 prefix:${prefix}
diff --git a/rules/templates/src-autoconf-prog/Makefile.am 
b/rul

[ptxdist] [PATCH 15/20] systemd: adapt package's '/var/lib' and '/var/cache' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/systemd.in | 5 +
 1 file changed, 5 insertions(+)

diff --git a/rules/systemd.in b/rules/systemd.in
index c6b8848f4..5ce43b99c 100644
--- a/rules/systemd.in
+++ b/rules/systemd.in
@@ -30,6 +30,8 @@ menuconfig SYSTEMD
select ROOTFS_DEV
select LIBBLKID
select HOST_SYSTEMD if SYSTEMD_UDEV_HWDB
+   select ROOTFS_VAR_LIB   if RUNTIME
+   select ROOTFS_VAR_CACHE if RUNTIME
prompt "systemd   "
help
  systemd is a system and session manager for Linux, compatible with 
SysV
@@ -43,6 +45,9 @@ menuconfig SYSTEMD
 
  http://www.freedesktop.org/wiki/Software/systemd
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' and '/var/cache' for its run-time information.
+
 if SYSTEMD
 
 comment "D-Bus is needed for the enabled features"
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 05/20] networkmanager: adapt package's '/var/lib' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 .../usr/lib/systemd/system/NetworkManager-unmanage.service| 1 +
 projectroot/usr/lib/systemd/system/NetworkManager.service | 1 +
 rules/networkmanager.in   | 4 
 3 files changed, 6 insertions(+)

diff --git a/projectroot/usr/lib/systemd/system/NetworkManager-unmanage.service 
b/projectroot/usr/lib/systemd/system/NetworkManager-unmanage.service
index 180af2992..fd11686ba 100644
--- a/projectroot/usr/lib/systemd/system/NetworkManager-unmanage.service
+++ b/projectroot/usr/lib/systemd/system/NetworkManager-unmanage.service
@@ -7,6 +7,7 @@ ConditionPathExists=!/var/run/NetworkManager.conf
 [Service]
 Type=oneshot
 ExecStart=/usr/lib/init/nm-unmanage.sh
+StateDirectory=NetworkManager
 
 [Install]
 WantedBy=NetworkManager.service
diff --git a/projectroot/usr/lib/systemd/system/NetworkManager.service 
b/projectroot/usr/lib/systemd/system/NetworkManager.service
index 7c56d8e24..45973692d 100644
--- a/projectroot/usr/lib/systemd/system/NetworkManager.service
+++ b/projectroot/usr/lib/systemd/system/NetworkManager.service
@@ -21,6 +21,7 @@ CapabilityBoundingSet=CAP_NET_ADMIN CAP_DAC_OVERRIDE 
CAP_NET_RAW CAP_NET_BIND_SE
 
 ProtectSystem=true
 ProtectHome=read-only
+StateDirectory=NetworkManager
 
 [Install]
 WantedBy=multi-user.target
diff --git a/rules/networkmanager.in b/rules/networkmanager.in
index 26e9fff9d..e966aa2c7 100644
--- a/rules/networkmanager.in
+++ b/rules/networkmanager.in
@@ -26,6 +26,7 @@ menuconfig NETWORKMANAGER
select UDEV_LIBUDEV
select WPA_SUPPLICANT   if NETWORKMANAGER_WIRELESS && 
RUNTIME
select WPA_SUPPLICANT_CTRL_IFACE_DBUS   if NETWORKMANAGER_WIRELESS && 
RUNTIME
+   select ROOTFS_VAR_LIB   if RUNTIME
prompt "networkmanager"
help
  NetworkManager is a tool to automate network configuration as far as
@@ -33,6 +34,9 @@ menuconfig NETWORKMANAGER
 
  http://projects.gnome.org/NetworkManager/
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib'.
+
 if NETWORKMANAGER
 
 config NETWORKMANAGER_STARTSCRIPT
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 06/20] ntp: adapt package's '/var/lib' and '/var/log' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 projectroot/usr/lib/systemd/system/ntpd.service | 2 ++
 rules/ntp.in| 5 +
 rules/ntp.make  | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/projectroot/usr/lib/systemd/system/ntpd.service 
b/projectroot/usr/lib/systemd/system/ntpd.service
index 64fce1cb7..917456339 100644
--- a/projectroot/usr/lib/systemd/system/ntpd.service
+++ b/projectroot/usr/lib/systemd/system/ntpd.service
@@ -3,6 +3,8 @@ Description=ntpd
 
 [Service]
 ExecStart=/usr/sbin/ntpd -n -c /etc/ntp-server.conf
+StateDirectory=ntp
+LogsDirectory=ntpstats
 
 [Install]
 WantedBy=multi-user.target
diff --git a/rules/ntp.in b/rules/ntp.in
index c211c91cd..55bf38b94 100644
--- a/rules/ntp.in
+++ b/rules/ntp.in
@@ -10,10 +10,15 @@ menuconfig NTP
select LIBC_M
select LIBC_RT
select GCCLIBS_GCC_S
+   select ROOTFS_VAR_LIB   if RUNTIME
+   select ROOTFS_VAR_LOG   if RUNTIME
help
  Build the standard NTP Daemon Process and supplementary programs.
  This conflicts with BSD openntpd.
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' and '/var/log'.
+
 # - Compile Options
 
 if NTP
diff --git a/rules/ntp.make b/rules/ntp.make
index 5d51ae4fc..411ad2ecf 100644
--- a/rules/ntp.make
+++ b/rules/ntp.make
@@ -160,7 +160,7 @@ $(STATEDIR)/ntp.targetinstall:
@$(call install_fixup, ntp,PRIORITY,optional)
@$(call install_fixup, ntp,SECTION,base)
@$(call install_fixup, ntp,AUTHOR,"Robert Schwebel")
-   @$(call install_fixup, ntp,DESCRIPTION,missing)
+   @$(call install_fixup, ntp,DESCRIPTION, "Network Time Protocol Daemon")
 
 #  #
 #  # ntpdate
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 10/20] mariadb: adapt package's '/var/lib' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 projectroot/usr/lib/systemd/system/mariadb-init.service | 2 +-
 projectroot/usr/lib/systemd/system/mariadb.service  | 1 +
 rules/mariadb.in| 4 
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/projectroot/usr/lib/systemd/system/mariadb-init.service 
b/projectroot/usr/lib/systemd/system/mariadb-init.service
index af18afa0a..71e37b658 100644
--- a/projectroot/usr/lib/systemd/system/mariadb-init.service
+++ b/projectroot/usr/lib/systemd/system/mariadb-init.service
@@ -21,7 +21,6 @@
 
 [Unit]
 Description=MariaDB Server Initialization Service
-RequiresMountsFor=/var/lib/mysql
 ConditionPathExists=!/var/lib/mysql/data
 
 [Service]
@@ -29,6 +28,7 @@ User=root
 Group=root
 Type=oneshot
 RemainAfterExit=yes
+StateDirectory=mysql
 
 ExecStart=/bin/chown -R mysql:mysql /var/lib/mysql
 ExecStart=/bin/chmod 0755 /var/lib/mysql
diff --git a/projectroot/usr/lib/systemd/system/mariadb.service 
b/projectroot/usr/lib/systemd/system/mariadb.service
index 120bfefe6..5d00d9119 100644
--- a/projectroot/usr/lib/systemd/system/mariadb.service
+++ b/projectroot/usr/lib/systemd/system/mariadb.service
@@ -7,6 +7,7 @@ After=mariadb-init.service
 User=mysql
 Group=mysql
 PrivateDevices=true
+StateDirectory=mysql
 
 ExecStart=/usr/bin/mysqld
 
diff --git a/rules/mariadb.in b/rules/mariadb.in
index b2127ea34..06cf4b9ad 100644
--- a/rules/mariadb.in
+++ b/rules/mariadb.in
@@ -16,10 +16,14 @@ config MARIADB
select NCURSES
select SYSTEMD  if MARIADB_SYSTEMD
select ZLIB
+   select ROOTFS_VAR_LIB   if RUNTIME
prompt "mariadb" if ALLYES
help
  MariaDB, a SQL database engine
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for the database.
+
 if MARIADB
 
 config MARIADB_SYSTEMD
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 09/20] dnsmasq: adapt package's '/var/lib' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 projectroot/usr/lib/systemd/system/dnsmasq.service | 2 ++
 rules/dnsmasq.in   | 9 ++---
 rules/dnsmasq.make | 5 +++--
 3 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/projectroot/usr/lib/systemd/system/dnsmasq.service 
b/projectroot/usr/lib/systemd/system/dnsmasq.service
index c663e018c..2da3a7250 100644
--- a/projectroot/usr/lib/systemd/system/dnsmasq.service
+++ b/projectroot/usr/lib/systemd/system/dnsmasq.service
@@ -6,6 +6,8 @@ ExecStart=/usr/sbin/dnsmasq --pid-file=/run/dnsmasq.pid
 ExecReload=/bin/kill -HUP $MAINPID
 Type=forking
 PIDFile=/run/dnsmasq.pid
+# for the 'dnsmasq.leases' file
+StateDirectory=misc
 
 [Install]
 WantedBy=network.target
diff --git a/rules/dnsmasq.in b/rules/dnsmasq.in
index 65f68f738..aec63dd0f 100644
--- a/rules/dnsmasq.in
+++ b/rules/dnsmasq.in
@@ -5,9 +5,9 @@
 menuconfig DNSMASQ
tristate
prompt "dnsmasq   "
-   select DBUS if DNSMASQ_DBUS
-   select LUA  if DNSMASQ_SCRIPT_LUA
-   select ROOTFS_VAR_LIB
+   select DBUS if DNSMASQ_DBUS
+   select LUA  if DNSMASQ_SCRIPT_LUA
+   select ROOTFS_VAR_LIB   if DNSMASQ_DHCP && RUNTIME
help
  A small caching DNS proxy and DHCP server.
 
@@ -23,6 +23,9 @@ menuconfig DNSMASQ
  Note: In order to make dnsmasq work as DHCP, you have to enable
  the following kernel features: FIXME
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for its leases database (DHCP feature enabled).
+
 if DNSMASQ
 
 comment "build options   ---"
diff --git a/rules/dnsmasq.make b/rules/dnsmasq.make
index 861936329..d9a134cdf 100644
--- a/rules/dnsmasq.make
+++ b/rules/dnsmasq.make
@@ -104,9 +104,10 @@ endif
 
@$(call install_alternative, dnsmasq, 0, 0, 0644, /etc/dnsmasq.conf)
 
-# for the 'dnsmasq.leases' file
+ifdef PTXCONF_DNSMASQ_DHCP
+#  # for the 'dnsmasq.leases' file
@$(call install_copy, dnsmasq, 0, 0, 0755, /var/lib/misc)
-
+endif
@$(call install_finish, dnsmasq)
 
@$(call touch)
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 19/20] dbus: adapt run-time socket path

2019-06-05 Thread Juergen Borleis
'dbus' defaults to '/var/run' to establish its socket and thus, 'systemd'
complains:

  /usr/lib/systemd/system/dbus.socket:4: ListenStream= references a path
  below legacy directory /var/run/, updating
  /var/run/dbus/system_bus_socket → /run/dbus/system_bus_socket;
  please update the unit file accordingly.

This change let the socket now defaults to '/run' instead.

Signed-off-by: Juergen Borleis 
---
 rules/dbus.make | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/rules/dbus.make b/rules/dbus.make
index 1458df957..da2135aef 100644
--- a/rules/dbus.make
+++ b/rules/dbus.make
@@ -42,6 +42,7 @@ DBUS_CONF_ENV := \
 DBUS_CONF_TOOL := autoconf
 DBUS_CONF_OPT  := \
$(CROSS_AUTOCONF_USR) \
+   --runstatedir=/run \
--enable-silent-rules \
--disable-developer \
--disable-debug \
@@ -74,6 +75,7 @@ DBUS_CONF_OPT := \
--disable-relocation \
--disable-stats \
--$(call ptx/endis, PTXCONF_DBUS_SYSTEMD)-user-session \
+   --with-system-socket=/run/dbus/system_bus_socket \
--with-dbus-user=messagebus \
--without-valgrind \
--$(call ptx/wwo, PTXCONF_DBUS_X)-x$(call 
ptx/ifdef,PTXCONF_DBUS_X,=$(SYSROOT)/usr,) \
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 04/20] conman: adapt package's '/var/lib' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 projectroot/usr/lib/systemd/system/connman-ignore.service | 1 +
 projectroot/usr/lib/systemd/system/connman.service| 1 +
 rules/connman.in  | 3 ++-
 rules/connman.make| 1 +
 4 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/projectroot/usr/lib/systemd/system/connman-ignore.service 
b/projectroot/usr/lib/systemd/system/connman-ignore.service
index b31df07fb..df52faaed 100644
--- a/projectroot/usr/lib/systemd/system/connman-ignore.service
+++ b/projectroot/usr/lib/systemd/system/connman-ignore.service
@@ -7,6 +7,7 @@ ConditionPathExists=!/run/connman-ignore
 Type=oneshot
 RemainAfterExit=yes
 ExecStart=/usr/lib/systemd/connman-ignore
+StateDirectory=conman
 
 [Install]
 WantedBy=connman.service
diff --git a/projectroot/usr/lib/systemd/system/connman.service 
b/projectroot/usr/lib/systemd/system/connman.service
index 4353276b5..c7fc639d6 100644
--- a/projectroot/usr/lib/systemd/system/connman.service
+++ b/projectroot/usr/lib/systemd/system/connman.service
@@ -10,6 +10,7 @@ Restart=on-failure
 EnvironmentFile=-/run/connman-ignore
 ExecStart=/usr/sbin/connmand -n $CONNMAN_IGNORE_OPTS
 StandardOutput=null
+StateDirectory=conman
 
 [Install]
 WantedBy=multi-user.target
diff --git a/rules/connman.in b/rules/connman.in
index 9d4b1dbd3..3c2eb11a0 100644
--- a/rules/connman.in
+++ b/rules/connman.in
@@ -13,7 +13,8 @@ menuconfig CONNMAN
select DBUS_PYTHON  if CONNMAN_TESTS && RUNTIME
select WPA_SUPPLICANT   if CONNMAN_WIFI && RUNTIME
select WPA_SUPPLICANT_CTRL_IFACE_DBUS   if CONNMAN_WIFI
-   select BUSYBOX_START_STOP_DAEMONif CONNMAN_STARTSCRIPT
+   select BUSYBOX_START_STOP_DAEMONif CONNMAN_STARTSCRIPT && 
RUNTIME
+   select ROOTFS_VAR_LIB   if RUNTIME
prompt "connman   "
help
  The Connection Manager project provides a daemon for
diff --git a/rules/connman.make b/rules/connman.make
index 2f671f7d4..313098d1c 100644
--- a/rules/connman.make
+++ b/rules/connman.make
@@ -167,6 +167,7 @@ ifdef PTXCONF_CONNMAN_POLKIT
 endif
 
 #  # ship settings which enable wired interfaces per default
+   @$(call install_copy, connman, 0, 0, 0755, /var/lib/connman)
@$(call install_alternative, connman, 0, 0, 0600, \
/var/lib/connman/settings)
 
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 14/20] logrotate: adapt package's '/var/lib' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 projectroot/usr/lib/systemd/system/logrotate.service | 1 +
 rules/logrotate.in   | 4 
 2 files changed, 5 insertions(+)

diff --git a/projectroot/usr/lib/systemd/system/logrotate.service 
b/projectroot/usr/lib/systemd/system/logrotate.service
index 722eb85de..40f2a7608 100644
--- a/projectroot/usr/lib/systemd/system/logrotate.service
+++ b/projectroot/usr/lib/systemd/system/logrotate.service
@@ -2,4 +2,5 @@
 Description=logrotate
 
 [Service]
+StateDirectory=logrotate
 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf
diff --git a/rules/logrotate.in b/rules/logrotate.in
index 202dee573..097804017 100644
--- a/rules/logrotate.in
+++ b/rules/logrotate.in
@@ -5,6 +5,7 @@ menuconfig LOGROTATE
prompt "logrotate "
select LIBPOPT
select ACL if LOGROTATE_ACL
+   select ROOTFS_VAR_LIB   if RUNTIME
help
  The logrotate utility is designed to simplify the
  administration of log files on a system which generates a lot
@@ -14,6 +15,9 @@ menuconfig LOGROTATE
  log file gets to a certain size. Normally, logrotate runs as
  a daily cron job.
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' for its run-time information.
+
 if LOGROTATE
 
 config LOGROTATE_ACL
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 13/20] nfsutils: adapt package's '/var/lib' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/nfsutils.in   | 12 +---
 rules/nfsutils.make |  2 +-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/rules/nfsutils.in b/rules/nfsutils.in
index bd1052ebb..ed62b6d08 100644
--- a/rules/nfsutils.in
+++ b/rules/nfsutils.in
@@ -9,11 +9,15 @@ menuconfig NFSUTILS
select RPCBIND  if RUNTIME
select LIBTIRPC if GLOBAL_IPV6
select ROOTFS_PROTOCOLS if NFSUTILS_CLIENT
+   select ROOTFS_VAR_LIB   if RUNTIME
+   select SYSTEMD  if RUNTIME && NFSUTILS_SYSTEMD_UNIT
help
  The Sun Network Filesystem (NFS) protocol provides transparent remote
  access to shared files across networks. The NFS protocol is designed
  to be portable across different machines, operating systems, network
  architectures, and transport protocols.
+ Note: this package expects write permissions to '/var/lib/nfs' for
+ its state information.
 
 if NFSUTILS
 
@@ -27,18 +31,20 @@ config NFSUTILS_SERVER
bool
prompt "server"
help
- Install all tools and daemons to run a NFS server.
+ Install all tools and daemons to run an NFS server.
 
 config NFSUTILS_NFSD_STARTSCRIPT
bool
-   depends on NFSUTILS_SERVER
+   depends on NFSUTILS_SERVER && !INITMETHOD_SYSTEMD
default y
prompt "install /etc/init.d/nfsd"
 
 config NFSUTILS_SYSTEMD_UNIT
bool
default y
-   depends on SYSTEMD
+   depends on INITMETHOD_SYSTEMD
prompt "install systemd unit files"
+   help
+ Install all systemd related unit files to run the 'nfsutils'.
 
 endif
diff --git a/rules/nfsutils.make b/rules/nfsutils.make
index 929f53c72..4ce01c4e3 100644
--- a/rules/nfsutils.make
+++ b/rules/nfsutils.make
@@ -76,7 +76,7 @@ $(STATEDIR)/nfsutils.targetinstall:
@$(call install_fixup, nfsutils,PRIORITY,optional)
@$(call install_fixup, nfsutils,SECTION,base)
@$(call install_fixup, nfsutils,AUTHOR,"Robert Schwebel 
")
-   @$(call install_fixup, nfsutils,DESCRIPTION,missing)
+   @$(call install_fixup, nfsutils,DESCRIPTION,"Network Filesystem 
Support")
 
@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsstat)
@$(call install_copy, nfsutils, 0, 0, 0755, -, /usr/sbin/nfsiostat)
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 08/20] dnsmasq: clean up rule file

2019-06-05 Thread Juergen Borleis
The 'n' feature is autodetected in the meantime...

Signed-off-by: Juergen Borleis 
---
 rules/dnsmasq.make | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/rules/dnsmasq.make b/rules/dnsmasq.make
index 113392f02..861936329 100644
--- a/rules/dnsmasq.make
+++ b/rules/dnsmasq.make
@@ -81,12 +81,12 @@ $(STATEDIR)/dnsmasq.targetinstall:
@$(call install_copy, dnsmasq, 0, 0, 0755, -, /usr/sbin/dnsmasq)
 
 ifdef PTXCONF_DNSMASQ_INETD
-   @$(call install_alternative, dnsmasq, 0, 0, 0644, 
/etc/inetd.conf.d/dnsmasq, n)
+   @$(call install_alternative, dnsmasq, 0, 0, 0644, 
/etc/inetd.conf.d/dnsmasq)
 endif
 
 ifdef PTXCONF_INITMETHOD_BBINIT
 ifdef PTXCONF_DNSMASQ_STARTSCRIPT
-   @$(call install_alternative, dnsmasq, 0, 0, 0755, /etc/init.d/dnsmasq, 
n)
+   @$(call install_alternative, dnsmasq, 0, 0, 0755, /etc/init.d/dnsmasq)
 
 ifneq ($(call remove_quotes,$(PTXCONF_DNSMASQ_BBINIT_LINK)),)
@$(call install_link, dnsmasq, \
@@ -102,7 +102,7 @@ ifdef PTXCONF_DNSMASQ_SYSTEMD_UNIT
/usr/lib/systemd/system/network.target.wants/dnsmasq.service)
 endif
 
-   @$(call install_alternative, dnsmasq, 0, 0, 0644, /etc/dnsmasq.conf, n)
+   @$(call install_alternative, dnsmasq, 0, 0, 0644, /etc/dnsmasq.conf)
 
 # for the 'dnsmasq.leases' file
@$(call install_copy, dnsmasq, 0, 0, 0755, /var/lib/misc)
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 16/20] sysstat: adapt package's '/var/log' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 rules/sysstat.in | 4 
 1 file changed, 4 insertions(+)

diff --git a/rules/sysstat.in b/rules/sysstat.in
index 2c6e02d85..ff1f152df 100644
--- a/rules/sysstat.in
+++ b/rules/sysstat.in
@@ -4,6 +4,7 @@ config SYSSTAT
tristate
prompt "sysstat"
select GCCLIBS_GCC_S
+   select ROOTFS_VAR_LOG   if RUNTIME
help
  sar, iostat and mpstat - system performance tools for Linux
 
@@ -23,3 +24,6 @@ config SYSSTAT
  others. Both UP and SMP machines are fully supported.
 
  Homepage: http://pagesperso-orange.fr/sebastien.godard/
+
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/log'.
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 18/20] opkg: move opkg-database to a read-only location

2019-06-05 Thread Juergen Borleis
The directory tree in '/var/lib' might not be persistent and thus,
not in sync with the root filesystem. In this case it's required
to store the opkg database at a location which has a fixed
relation to the root filesystem's content it describes.

This change moves the opkg's database to a read-only location in
'/usr/share/opkg', which is then always in sync with the root
filesystem's content.

This changed opkg configuration works since commit
   a691341deb33077b9d5ede5fe349ee6b3fb99be1
 "ptxd_make_image_extract_xpkg_files: use ptxd_get_alternative to find 
opkg.conf"

Signed-off-by: Juergen Borleis 
---
 doc/daily_work.inc | 3 +--
 projectroot/etc/opkg/opkg.conf | 7 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index 470c14f93..58cf69f49 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -1426,8 +1426,7 @@ This is a very simple and optimistic approach and works 
for surprisingly many us
 cases. But some applications expect a writable ``/var/lib`` and will fail due
 to this setup. Using an additional RAM disk for ``/var/lib`` might not help in
 this use case, because it will bury all build-time generated data already 
present
-in this directory tree (``opkg`` package information for example or other
-packages pre-defined configuration files).
+in this directory tree (package pre-defined configuration files for example).
 
 Overlay RAM Disk
 
diff --git a/projectroot/etc/opkg/opkg.conf b/projectroot/etc/opkg/opkg.conf
index 3ba17115b..67a64838f 100644
--- a/projectroot/etc/opkg/opkg.conf
+++ b/projectroot/etc/opkg/opkg.conf
@@ -6,7 +6,12 @@
 @SRC@
 
 dest   root/
-option lock_file /var/lock/opkg.lock
+option lock_file /run/lock/opkg.lock
+
+# move away the ipkg database from the default "/var/lib/opkg" to a r/o 
location
+option lists_dir /usr/share/opkg/lists
+option status_file /usr/share/opkg/status
+option info_dir /usr/share/opkg/info
 
 arch   @ARCH@  10
 arch   all 1
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 02/20] rootfs: keep '/var/tmp' permissions in sync with 'systemd'

2019-06-05 Thread Juergen Borleis
This avoids 'systemd' warnings at run-time if a read-only filesystem is
in use.

Signed-off-by: Juergen Borleis 
---
 rules/rootfs.make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/rootfs.make b/rules/rootfs.make
index 21250e775..8f0c61f52 100644
--- a/rules/rootfs.make
+++ b/rules/rootfs.make
@@ -121,7 +121,7 @@ ifdef PTXCONF_ROOTFS_VAR_SPOOL_CRON
@$(call install_copy, rootfs, 0, 0, 0755, /var/spool/cron)
 endif
 ifdef PTXCONF_ROOTFS_VAR_TMP
-   @$(call install_copy, rootfs, 0, 0, 0755, /var/tmp)
+   @$(call install_copy, rootfs, 0, 0, 01777, /var/tmp)
 endif
 ifdef PTXCONF_ROOTFS_VAR_OVERLAYFS
@$(call install_alternative, rootfs, 0, 0, 0644, 
/usr/lib/systemd/system/run-varoverlayfs.mount)
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 01/20] rootfs: keep /var writable, even if the rootfs is read-only

2019-06-05 Thread Juergen Borleis
Having a read-only root filesystem is always a source of pain and trouble.
Many applications and tools expect to be able to store their state or
caching data or at least their logs somewhere in the filesystem.

The '/var' directory tree has a well known structure according to the
"File System Hierarchy Standard" and is used by all carefully designed
programs. Thus, this change provides a way to have this '/var' directory
tree writable, even if the main root filesystem is mounted read-only. It
uses an overlay filesystem and by default a RAM disk to store changed and
added data to this directory tree in a non persistent manner.

Due to the nature of the overlay filesystem the underlaying files from the
main root filesystem can still be accessed.

This approach requires the overlay filesystem support from the Linux
kernel. In order to use it, the feature CONFIG_OVERLAY_FS must be enabled.

The ugly details to establish the required overlaying filesystem are hidden
behind a "mount helper" for a dummy filesystem (here called 'varoverlayfs').
Thus, a BSP can change the overlaying filesystem by providing its own
'run-varoverlay.mount' in order to restrict the default RAM disk
differently or to switch to a different local storage.

The '/etc/fstab' file gets touched in this change, to enable some already
used RAM disks on demand, to gain backward compatibility if no overlay
approach is used.

Signed-off-by: Juergen Borleis 
---
 doc/daily_work.inc| 97 +++
 projectroot/etc/fstab |  6 +-
 .../lib/systemd/system/run-varoverlayfs.mount | 10 ++
 projectroot/usr/lib/systemd/system/var.mount  | 10 ++
 projectroot/usr/sbin/mount.varoverlayfs   | 11 +++
 rules/rootfs.in   | 58 ++-
 rules/rootfs.make | 19 +++-
 7 files changed, 180 insertions(+), 31 deletions(-)
 create mode 100644 projectroot/usr/lib/systemd/system/run-varoverlayfs.mount
 create mode 100644 projectroot/usr/lib/systemd/system/var.mount
 create mode 100644 projectroot/usr/sbin/mount.varoverlayfs

diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index 74da11953..470c14f93 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -1371,3 +1371,100 @@ in the build machine's filesystem also for the target 
filesystem image. With
 a different ``umask`` than ``0022`` at build-time this may fail badly at
 run-time with strange erroneous behaviour (for example some daemons with
 regular user permissions cannot acces their own configuration files).
+
+Read Only Filesystem
+
+
+A system can run a read-only root filesystem in order to have a unit which
+can be powered off at any time, without any previous shut down sequence.
+
+But many applications and tools are still expecting a writable filesystem to
+temporarily store some kind of data or logging information for example. All
+these write attempts will fail and thus, the applications and tools will fail,
+too.
+
+According to the *Filesystem Hierarchy Standard 2.3* the directory tree in
+``/var/`` is traditionally writable and its content is persistent across system
+restarts. Thus, this directory tree is used by most applications and tools to
+store their data.
+
+The *Filesystem Hierarchy Standard 2.3* defines the following directories
+below ``/var/``:
+
+- ``cache/``: Application specific cache data
+- ``crash/``: System crash dumps
+- ``lib/``:   Application specific variable state information
+- ``lock/``:  Lock files
+- ``log/``:   Log files and directories
+- ``run/``:   Data relevant to running processes
+- ``spool/``: Application spool data
+- ``tmp/``:   Temporary files preserved between system reboots
+
+Although this writable directory tree is useful and valid for full blown host
+machines, an embedded system can behave differently here: For example a
+requirement can drop the persistency of changed data across reboots and always
+start with empty directories.
+
+Partially RAM Disks
+~~~
+
+This is the default behaviour of PTXdist: it mounts a couple of RAM disks over
+directories in ``/var`` expected to be writable by various applications and
+tools. These RAM disks start always in an empty state and are defined as 
follows:
+
++-+---+
+| mount point | mount options |
++=+===+
+| /var/log| nosuid,nodev,noexec,mode=0755,size=10%|
++-+---+
+| /var/lock   | nosuid,nodev,noexec,mode=0755,size=1M |
++-+---+
+| /var/tmp| nosuid,nod

[ptxdist] [PATCH 11/20] samba: adapt package's '/var/lib' and '/var/cache' requirements

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 ...ate-expected-directories-at-run-time.patch | 38 +++
 patches/samba-4.9.5/series|  4 ++
 rules/samba.in|  9 -
 3 files changed, 49 insertions(+), 2 deletions(-)
 create mode 100644 
patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch
 create mode 100644 patches/samba-4.9.5/series

diff --git 
a/patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch
 
b/patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch
new file mode 100644
index 0..8569e0737
--- /dev/null
+++ 
b/patches/samba-4.9.5/0001-Lets-systemd-create-expected-directories-at-run-time.patch
@@ -0,0 +1,38 @@
+From: Juergen Borleis 
+Date: Tue, 4 Jun 2019 20:24:15 +0200
+Subject: [PATCH] Lets systemd create expected directories at run-time
+
+'samba' requires '/var/lib/samba' and '/var/cache/samba'.
+
+Signed-off-by: Juergen Borleis 
+---
+ packaging/systemd/nmb.service.in | 2 ++
+ packaging/systemd/smb.service.in | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/packaging/systemd/nmb.service.in 
b/packaging/systemd/nmb.service.in
+index a30812320c05..c9373d2ba0a6 100644
+--- a/packaging/systemd/nmb.service.in
 b/packaging/systemd/nmb.service.in
+@@ -8,6 +8,8 @@ After=network.target network-online.target
+ Type=notify
+ NotifyAccess=all
+ PIDFile=@PIDDIR@/nmbd.pid
++StateDirectory=samba
++CacheDirectory=samba
+ EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba
+ ExecStart=@SBINDIR@/nmbd --foreground --no-process-group $NMBDOPTIONS
+ ExecReload=/bin/kill -HUP $MAINPID
+diff --git a/packaging/systemd/smb.service.in 
b/packaging/systemd/smb.service.in
+index 18912ef0e98f..76aedfa20337 100644
+--- a/packaging/systemd/smb.service.in
 b/packaging/systemd/smb.service.in
+@@ -9,6 +9,8 @@ Type=notify
+ NotifyAccess=all
+ PIDFile=@PIDDIR@/smbd.pid
+ LimitNOFILE=16384
++StateDirectory=samba
++CacheDirectory=samba
+ EnvironmentFile=-@SYSCONFDIR@/sysconfig/samba
+ ExecStart=@SBINDIR@/smbd --foreground --no-process-group $SMBDOPTIONS
+ ExecReload=/bin/kill -HUP $MAINPID
diff --git a/patches/samba-4.9.5/series b/patches/samba-4.9.5/series
new file mode 100644
index 0..b2dcdc0a4
--- /dev/null
+++ b/patches/samba-4.9.5/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Lets-systemd-create-expected-directories-at-run-time.patch
+# 2d2f83b2911fe3f43bff610738827040  - git-ptx-patches magic
diff --git a/rules/samba.in b/rules/samba.in
index ec5423661..822a9758a 100644
--- a/rules/samba.in
+++ b/rules/samba.in
@@ -17,8 +17,10 @@ menuconfig SAMBA
select LIBCAP
select LIBPOPT
select READLINE
-   select SYSTEMD  if SAMBA_SYSTEMD_UNIT
+   select SYSTEMD  if SAMBA_SYSTEMD_UNIT && RUNTIME
select ZLIB
+   select ROOTFS_VAR_LIB   if RUNTIME
+   select ROOTFS_VAR_CACHE if RUNTIME
help
  Samba is an Open Source/Free Software suite that has, since
  1992, provided file and print services to all manner of
@@ -28,6 +30,9 @@ menuconfig SAMBA
 
  See http://www.samba.org for details.
 
+ Note: on a read-only root filesystem this package still requires a
+ writable '/var/lib' and '/var/cache'.
+
 if SAMBA
 
 config SAMBA_COMMON
@@ -64,7 +69,7 @@ config SAMBA_CUPS
 config SAMBA_STARTSCRIPT
bool
default y
-   depends on SAMBA_SERVER
+   depends on SAMBA_SERVER && !INITMETHOD_SYSTEMD
prompt "install /etc/init.d/samba"
 
 config SAMBA_SYSTEMD_UNIT
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] More collected changes

2019-06-05 Thread Juergen Borleis
The first two changes are V2 after honoring the comments, all the remaining
changes are V1 and most of them are related to the "overlay RAM disk feature
on /var" introduced in the first change.

The last change in this list updates and fixes the autotools based templates.

Comments are welcome.

Juergen



___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 07/20] dnsmasq: version bump 2.79 -> 2.80

2019-06-05 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 ...the-pkg-config-file-is-lua-no-lua5.2.patch |   4 +-
 patches/{dnsmasq-2.79 => dnsmasq-2.80}/series |   0
 projectroot/etc/dnsmasq.conf  | 275 ++
 rules/dnsmasq.in  |   3 +-
 rules/dnsmasq.make|   8 +-
 5 files changed, 232 insertions(+), 58 deletions(-)
 rename patches/{dnsmasq-2.79 => 
dnsmasq-2.80}/0001-the-pkg-config-file-is-lua-no-lua5.2.patch (93%)
 rename patches/{dnsmasq-2.79 => dnsmasq-2.80}/series (100%)

diff --git 
a/patches/dnsmasq-2.79/0001-the-pkg-config-file-is-lua-no-lua5.2.patch 
b/patches/dnsmasq-2.80/0001-the-pkg-config-file-is-lua-no-lua5.2.patch
similarity index 93%
rename from patches/dnsmasq-2.79/0001-the-pkg-config-file-is-lua-no-lua5.2.patch
rename to patches/dnsmasq-2.80/0001-the-pkg-config-file-is-lua-no-lua5.2.patch
index 42fe46a88..a30a5755f 100644
--- a/patches/dnsmasq-2.79/0001-the-pkg-config-file-is-lua-no-lua5.2.patch
+++ b/patches/dnsmasq-2.80/0001-the-pkg-config-file-is-lua-no-lua5.2.patch
@@ -8,10 +8,10 @@ Signed-off-by: Michael Olbrich 
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index 73ea23e11d07..1dba188f9c30 100644
+index e71cf86908d3..c4945c0b44e8 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -59,8 +59,8 @@ idn2_cflags =   `echo $(COPTS) | $(top)/bld/pkg-wrapper 
HAVE_LIBIDN2 $(PKG_CONFI
+@@ -60,8 +60,8 @@ idn2_cflags =   `echo $(COPTS) | $(top)/bld/pkg-wrapper 
HAVE_LIBIDN2 $(PKG_CONFI
  idn2_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 
$(PKG_CONFIG) --libs libidn2`
  ct_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK 
$(PKG_CONFIG) --cflags libnetfilter_conntrack`
  ct_libs =   `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK 
$(PKG_CONFIG) --libs libnetfilter_conntrack`
diff --git a/patches/dnsmasq-2.79/series b/patches/dnsmasq-2.80/series
similarity index 100%
rename from patches/dnsmasq-2.79/series
rename to patches/dnsmasq-2.80/series
diff --git a/projectroot/etc/dnsmasq.conf b/projectroot/etc/dnsmasq.conf
index 1856481d1..8548b43ed 100644
--- a/projectroot/etc/dnsmasq.conf
+++ b/projectroot/etc/dnsmasq.conf
@@ -4,17 +4,34 @@
 # as the long options legal on the command line. See
 # "/usr/sbin/dnsmasq --help" or "man 8 dnsmasq" for details.
 
+# Listen on this specific port instead of the standard DNS port
+# (53). Setting this to zero completely disables DNS function,
+# leaving only DHCP and/or TFTP.
+#port=5353
+
 # The following two options make you a better netizen, since they
 # tell dnsmasq to filter out queries which the public DNS cannot
 # answer, and which load the servers (especially the root servers)
-# uneccessarily. If you have a dial-on-demand link they also stop
-# these requests from bringing up the link uneccessarily.
+# unnecessarily. If you have a dial-on-demand link they also stop
+# these requests from bringing up the link unnecessarily.
 
 # Never forward plain names (without a dot or domain part)
 #domain-needed
 # Never forward addresses in the non-routed address spaces.
 #bogus-priv
 
+# Uncomment these to enable DNSSEC validation and caching:
+# (Requires dnsmasq to be built with DNSSEC option.)
+#conf-file=%%PREFIX%%/share/dnsmasq/trust-anchors.conf
+#dnssec
+
+# Replies which are not DNSSEC signed may be legitimate, because the domain
+# is unsigned, or may be forgeries. Setting this option tells dnsmasq to
+# check that an unsigned reply is OK, by finding a secure proof that a DS
+# record somewhere between the root and the domain does not exist.
+# The cost of setting this is that even queries in unsigned domains will need
+# one or more extra DNS queries to verify.
+#dnssec-check-unsigned
 
 # Uncomment this to filter useless windows-originated DNS requests
 # which can trigger dial-on-demand links needlessly.
@@ -57,21 +74,25 @@
 #local=/localnet/
 
 # Add domains which you want to force to an IP address here.
-# The example below send any host in doubleclick.net to a local
-# webserver.
-#address=/doubleclick.net/127.0.0.1
+# The example below send any host in double-click.net to a local
+# web-server.
+#address=/double-click.net/127.0.0.1
 
 # --address (and --server) work with IPv6 addresses too.
 #address=/www.thekelleys.org.uk/fe80::20d:60ff:fe36:f83
 
+# Add the IPs of all queries to yahoo.com, google.com, and their
+# subdomains to the vpn and search ipsets:
+#ipset=/yahoo.com/google.com/vpn,search
+
 # You can control how dnsmasq talks to a server: this forces
 # queries to 10.1.2.3 to be routed via eth1
-# --server=10.1.2.3@eth1
+# server=10.1.2.3@eth1
 
 # and this sets the source (ie local) address used to talk to
-# 10.1.2.3 to 192.168.1.1 port 55 (there must be a interface with that
+# 10.1.2.3 to 192.168.1.1 port 55 (there must be an interface with that
 # IP on the machine, obviously).
-# --server=10.1.2.3@192.168.1.1#55
+# server=10.1.2.3@192.168.1.1#55
 
 # If y

[ptxdist] [PATCH 1/2] sepolgen: move to staging

2019-06-04 Thread Juergen Borleis
From: Juergen Borleis 

Old version that needs to be updated. At most the URL fails.

Signed-off-by: Juergen Borleis 
---
 rules/sepolgen.in | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/rules/sepolgen.in b/rules/sepolgen.in
index 9077d1beb..2a992c0b4 100644
--- a/rules/sepolgen.in
+++ b/rules/sepolgen.in
@@ -1,4 +1,6 @@
-## SECTION=selinux
+## SECTION=staging
+## old section:
+### SECTION=selinux
 
 config SEPOLGEN
tristate
@@ -22,3 +24,6 @@ config SEPOLGEN
  parsing SELinux related messages as produced by the audit
  system. It has facilities for generating policy based on
  required access.
+
+ STAGING: remove in ptxdist-2020.06.0
+ Old version that needs to be updated. At most the URL fails.
-- 
2.20.1


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] rootfs: keep /var writable, even if the rootfs is read-only

2019-06-04 Thread Juergen Borleis
Having a read-only root filesystem is always a source of pain and trouble.
Many applications and tools expect to be able to store their state or
caching data or at least their logs somewhere in the filesystem.

The '/var' directory tree has a well known structure according to the
"File System Hierarchy Standard" and is used by all carefully designed
programs. Thus, this change provides a way to have this '/var' directory
tree writable, even if the main root filesystem is mounted read-only. It
uses an overlay filesystem and by default a RAM disk to store changed and
added data to this directory tree in a non persistent manner.

Due to the nature of the overlay filesystem the underlaying files from the
main root filesystem can still be accessed.

This approach requires the overlay filesystem support from the Linux
kernel. In order to use it, the feature CONFIG_OVERLAY_FS must be enabled.

A BSP can change the overlaying filesystem by providing its own
'run-varoverlay.mount' in order to restrict the used RAM disk differently
or switch to a different local storage.

Signed-off-by: Juergen Borleis 
---
 doc/daily_work.inc| 97 +++
 projectroot/etc/fstab |  6 +-
 .../lib/systemd/system/run-varoverlayfs.mount | 10 ++
 projectroot/usr/lib/systemd/system/var.mount  |  9 ++
 projectroot/usr/sbin/mount.varoverlayfs   | 11 +++
 rules/rootfs.in   | 15 +++
 rules/rootfs.make | 23 -
 7 files changed, 164 insertions(+), 7 deletions(-)
 create mode 100644 projectroot/usr/lib/systemd/system/run-varoverlayfs.mount
 create mode 100644 projectroot/usr/lib/systemd/system/var.mount
 create mode 100644 projectroot/usr/sbin/mount.varoverlayfs

diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index 74da11953..093f069bf 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -1371,3 +1371,100 @@ in the build machine's filesystem also for the target 
filesystem image. With
 a different ``umask`` than ``0022`` at build-time this may fail badly at
 run-time with strange erroneous behaviour (for example some daemons with
 regular user permissions cannot acces their own configuration files).
+
+Read Only Filesystem
+
+
+A system can run a read-only root filesystem in order to have a unit which
+can be powered off at any time, without any previous shutting down sequence.
+
+But many applications and tools are still expecting a writable filesystem to
+temporarely store some kind of data or logging information for example. All
+these write attempts will fail and thus, the applications and tools will fail,
+too.
+
+According to the *Filesystem Hierarchy Standard 2.3* the directory tree in
+'/var/' is traditionally writable and its content is persistent across system
+restarts. Thus, this directory tree is used by most applications and tools to
+store their data.
+
+The *Filesystem Hierarchy Standard 2.3* defines the following directories
+below '/var':
+
+- 'cache/': Application specific cache data
+- 'crash/': System crash dumps
+- 'lib/':   Application specific variable state information
+- 'lock/':  Lock files
+- 'log/':   Log files and directories
+- 'run/':   Data relevant to run processes
+- 'spool/': Application spool data
+- 'tmp/':   Temporary files preserved between system reboots
+
+Since this writable directory tree is useful and valid for full blown host
+machines, an embedded system can behave differently here: For example the
+requirement can drop the persistency of changed data across reboots and always
+start with empty directories.
+
+Partially RAM Disks
+~~~
+
+This is the default behaviour of PTXdist: it mounts a couple of RAM disks over
+directories in ``/var`` expected to be writable by various applications and
+tools. These RAM disks start alway in an empty state and are defined as 
follows:
+
++-+---+
+| mount point | mount options |
++=+===+
+| /var/log| nosuid,nodev,noexec,mode=0755,size=10%|
++-+---+
+| /var/lock   | nosuid,nodev,noexec,mode=0755,size=1M |
++-+---+
+| /var/tmp| nosuid,nodev,mode=1777,size=20%   |
++-+---+
+
+This is a very simple and optimistic approach and works for surprisingly many 
use
+cases. But some applications expect a writable ``/var/lib`` and will fail due
+to this setup. Using an additional RAM disk for ``/var/lib`` might not help in
+this use case, because it will bury at build-time generated data alread

Re: [ptxdist] setting default root password

2019-05-23 Thread Juergen Borleis
Hi Ramesh,

On Thursday 23 May 2019 09:01:38 Ramesh Rayanki wrote:
>How to set the default root password as non empty while building bsp
> using ptxdist ? Currently, it uses empty password.

Provide a ready-to-use "shadow" file in "projectroot/etc/shadow" which 
contains the encrypted password. You can start with a copy of the PTXdist 
variant and add the password manually to it.

Regards,
Jürgen

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

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] Autoconf directives not invoking g++ compiler

2019-05-15 Thread Juergen Borleis
Hi Patrick,

On Monday 13 May 2019 18:19:28 Patrick Murray wrote:
> I've tried many thing to get this package to build C and C++ code , but
> to no avail.

It seems the library template needs an update. It doesn't work as expected 
anymore.

Regards,
Jürgen

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

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] Autoconf directives not invoking g++ compiler

2019-05-13 Thread Juergen Borleis
On Monday 13 May 2019 11:45:09 Patrick Murray wrote:
> I tried renamed libpsc.c to libpsc.cpp ( and .ccx) , no difference in the
> outcome,  running ./configure fails and so does the ptxdist libpsc
> compile.
>
> Question , in a autotools library package are you only allowed either c
> file or c++ file ?

You can have as much source file languages like you want.

> dak@CNU35294ZR:/opt/PHYTEC_BSPs/BSP-Phytec-phyFLEX-i.MX6-PD13.2.4/local_s
>rc/libpsc$ ./configure configure: error: cannot find sources (libpsc.c) in

Did you adapt the line AC_CONFIG_SRCDIR(...) line? This entry must point to 
an existing file (no matter what file).

Regards,
Jürgen

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

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] Autoconf directives not invoking g++ compiler

2019-05-13 Thread Juergen Borleis
On Monday 13 May 2019 11:17:37 Myself wrote:
> [...]
> Name all your source files *.cpp and you are done.

Maybe *.cxx is better or *.cc

Regards,
Jürgen

-- 
Pengutronix e.K.                             | Juergen Borleis             |
Industrial Linux Solutions                   | http://www.pengutronix.de/  |
___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] Autoconf directives not invoking g++ compiler

2019-05-13 Thread Juergen Borleis
Hi Patrick,

On Monday 13 May 2019 11:02:57 Patrick Murray wrote:
> [...]
> 41:AC_LANG=C++ 

Hmm, why do you set this?

All you want is to compile some C++ code. What you need and what the 
autotools should ensure is a C++ compiler.

So, the 'AC_PROG_CXX' will find a useable C++ compiler for you.

Name all your source files *.cpp and you are done.

Regards,
Jürgen

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

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] Fwd: Re: configure: error: cannot run C compiled programs

2019-04-12 Thread Juergen Borleis
Hi Pat,

> I apologise for mailing you direct , but from this link
>
> https://www.ptxdist.org/pages/support.html
>
> It's not clear how querys are submitted.

just subscribe to the list (by sending an email with the subject "subscribe" 
to ) and then send the message itself to 
the list via  :)

--  Forwarded Message  --
I have installed ptxdist version 2019.03.1 onto a new Ubuntu host and I have 
tried to migrate my i.MX6 ptxdist (last used with version 2012.03.0 ) , but
I am getting this build-host error  with gcc and pkg-configure

gcc version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)
configure:3445: $? = 0
configure:3434: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.

I searched the support history but could see in 2015 someon had the same 
issue, but there was Resolution posted. I would appreciate your guidance.

Kinds regards
Pat

p.s. I have attached the config.log
---

Cheers,
Juergen

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


config.log
Description: config.log
___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] qt5: version bump 5.12.1 -> 5.12.2

2019-03-26 Thread Juergen Borleis
Hi Florian,

On Monday 25 March 2019 15:45:47 Baeuerle, Florian wrote:
> ---
>  rules/qt5.make | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/rules/qt5.make b/rules/qt5.make
> index 26f88aac4..02c040afa 100644
> --- a/rules/qt5.make
> +++ b/rules/qt5.make
> @@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_QT5) += qt5
>  #
>  # Paths and names
>  #
> -QT5_VERSION  := 5.12.1
> -QT5_MD5  := 6a37466c8c40e87d4a19c3f286ec2542
> +QT5_VERSION  := 5.12.2
> +QT5_MD5  := 99c2eb46e533371798b4ca2d1458e065
>  QT5  := qt-everywhere-src-$(QT5_VERSION)
>  QT5_SUFFIX   := tar.xz
>  QT5_URL  := \

And the corresponding patches in "patches/qt-everywhere-src-5.12.1/"?

Cheers,
Juergen

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

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 3/3] doc: improve the suboption name scheme description

2019-02-22 Thread Juergen Borleis
Signed-off-by: Juergen Borleis 
---
 doc/dev_manual.rst | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index 523ecde28..e17aa9b1b 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -881,9 +881,10 @@ add on demand to the ``configure`` parameters:
 
 endif
 
-.. note:: To extend the base name by a suboption name as a trailing
-  component gives PTXdist the ability to detect a change in the package’s
-  settings to force its rebuild.
+.. important:: Always follow the rule to extend the base name by a suboption
+  name as the trailing part of the variable name. This gives PTXdist the 
ability
+  to detect a change in the package’s settings (via menuconfig) to force its
+  rebuild on demand.
 
 To make usage of the new menu entries, we must check them in the rule
 file and add the correct parameters:
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 2/3] doc: follow the rule to use breaking lines

2019-02-22 Thread Juergen Borleis
Synchronize the examples.

Signed-off-by: Juergen Borleis 
---
 doc/dev_manual.rst | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index 10091c76c..523ecde28 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -812,9 +812,10 @@ in this line and supplement this expression as follows:
 
 .. code-block:: make
 
-FOO_CONF_OPT := $(CROSS_AUTOCONF_USR) \
-   --enable-debug \
-   --with-bar
+FOO_CONF_OPT := \
+$(CROSS_AUTOCONF_USR) \
+--enable-debug \
+--with-bar
 
 .. note:: We recommend to use this format with each parameter on a line of
  its own. This format is easier to read and a diff shows more exactly any
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 1/3] doc: mention dedicated PTXdist macros to be used in rule files

2019-02-22 Thread Juergen Borleis
In order to simplify rule files, it's worth to use more of the provided
rule file option macros PTXdist already provides. Show only this optimized
example and remove the previous version from the old days.

Signed-off-by: Juergen Borleis 
---
 doc/dev_manual.rst | 40 +---
 1 file changed, 9 insertions(+), 31 deletions(-)

diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index f0c2e00ee..10091c76c 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -892,24 +892,18 @@ file and add the correct parameters:
 #
 # autoconf
 #
-FOO_CONF_OPT := $(CROSS_AUTOCONF_USR)
-
-ifdef PTXCONF_FOO_DEBUG
-FOO_CONF_OPT += --enable-debug
-else
-FOO_CONF_OPT += --disable-debug
-endif
-
-ifdef PTXCONF_FOO_BAR
-FOO_CONF_OPT += --with-bar
-else
-FOO_CONF_OPT += --without-bar
-endif
+FOO_CONF_OPT := \
+$(CROSS_AUTOCONF_USR) \
+--$(call ptx/endis, PTXCONF_FOO_DEBUG)-debug \
+--$(call ptx/wwo, PTXCONF_FOO_BAR)-bar
 
-.. important:: Please note the trailing ``PTXCONF_`` for each define. While 
Kconfig is
+.. important:: Please note the leading ``PTXCONF_`` for each define. While 
Kconfig is
   using ``FOO_BAR``, the rule file must use ``PTXCONF_FOO_BAR`` instead.
 
-It is a good practice to add both settings, e.g. ``--disable-debug``
+.. note:: Refer :ref:`Rule File Macro Reference ` for further
+   details about these special kind of option macros (e.g. ``ptx/...``).
+
+It is a good practice to always add both settings, e.g. ``--disable-debug``
 even if this is the default case. Sometimes ``configure`` tries to guess
 something and the binary result might differ depending on the build
 order. For example some kind of package would also build some X related
@@ -950,22 +944,6 @@ In this example, many configure options from libsigrok 
(marked with ``+``)
 are not yet present in ``LIBSIGROK_CONF_OPT`` and must be added, possibly also
 by providing more dynamic options in the package definition.
 
-Since every optional parameter adds four lines of code to the rule
-files, PTXdist provides some shortcuts to handle it. Refer to section
-:ref:`param_macros` for further details.
-
-With these special macros in use, the file content shown above looks
-much simpler:
-
-.. code-block:: make
-
-#
-# autoconf
-#
-FOO_CONF_OPT := $(CROSS_AUTOCONF_USR) \
-   $(call ptx/endis, PTXCONF_FOO_DEBUG)-debug \
-   $(call ptx/wwo, PTXCONF_FOO_BAR)-bar
-
 If some parts of a package are built on demand only, they must also be
 installed on demand only. Besides the *prepare* stage, we also must
 modify our *targetinstall* stage:
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH v2] doc: mention dedicated PTXdist macros to be used in rule files

2019-02-22 Thread Juergen Borleis
On Friday 22 February 2019 12:57:05 Myself wrote:
> In order to simplify rule files, it's worth to use more of the provided
> rule file option macros PTXdist already provides.
>
> Signed-off-by: Juergen Borleis 
> ---
>  doc/dev_manual.rst | 22 --
>  1 file changed, 8 insertions(+), 14 deletions(-)
>
> diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
> index f0c2e00ee..effafa6e0 100644
> --- a/doc/dev_manual.rst
> +++ b/doc/dev_manual.rst
> @@ -892,23 +892,17 @@ file and add the correct parameters:
>  #
>  # autoconf
>  #
> -FOO_CONF_OPT := $(CROSS_AUTOCONF_USR)
> -
> -ifdef PTXCONF_FOO_DEBUG
> -FOO_CONF_OPT += --enable-debug
> -else
> -FOO_CONF_OPT += --disable-debug
> -endif
> -
> -ifdef PTXCONF_FOO_BAR
> -FOO_CONF_OPT += --with-bar
> -else
> -FOO_CONF_OPT += --without-bar
> -endif
> +FOO_CONF_OPT := \
> +$(CROSS_AUTOCONF_USR) \
> +--$(call ptx/endis, PTXCONF_FOO_DEBUG)-debug \
> +--$(call ptx/wwo, PTXCONF_FOO_BAR)-bar
>
> -.. important:: Please note the trailing ``PTXCONF_`` for each define.
> While Kconfig is +.. important:: Please note the leading ``PTXCONF_`` for
> each define. While Kconfig is using ``FOO_BAR``, the rule file must use
> ``PTXCONF_FOO_BAR`` instead.
>
> +.. note:: Refer :ref:`Rule File Macro Reference ` for
> further +   details about these special kind of option macros (e.g.
> ``ptx/...``). +
>  It is a good practice to add both settings, e.g. ``--disable-debug``
>  even if this is the default case. Sometimes ``configure`` tries to guess
>  something and the binary result might differ depending on the build

Please do not apply. The same text can be found a few lines below.

jb

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

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH v2] doc: mention dedicated PTXdist macros to be used in rule files

2019-02-22 Thread Juergen Borleis
In order to simplify rule files, it's worth to use more of the provided
rule file option macros PTXdist already provides.

Signed-off-by: Juergen Borleis 
---
 doc/dev_manual.rst | 22 --
 1 file changed, 8 insertions(+), 14 deletions(-)

diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index f0c2e00ee..effafa6e0 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -892,23 +892,17 @@ file and add the correct parameters:
 #
 # autoconf
 #
-FOO_CONF_OPT := $(CROSS_AUTOCONF_USR)
-
-ifdef PTXCONF_FOO_DEBUG
-FOO_CONF_OPT += --enable-debug
-else
-FOO_CONF_OPT += --disable-debug
-endif
-
-ifdef PTXCONF_FOO_BAR
-FOO_CONF_OPT += --with-bar
-else
-FOO_CONF_OPT += --without-bar
-endif
+FOO_CONF_OPT := \
+$(CROSS_AUTOCONF_USR) \
+--$(call ptx/endis, PTXCONF_FOO_DEBUG)-debug \
+--$(call ptx/wwo, PTXCONF_FOO_BAR)-bar
 
-.. important:: Please note the trailing ``PTXCONF_`` for each define. While 
Kconfig is
+.. important:: Please note the leading ``PTXCONF_`` for each define. While 
Kconfig is
   using ``FOO_BAR``, the rule file must use ``PTXCONF_FOO_BAR`` instead.
 
+.. note:: Refer :ref:`Rule File Macro Reference ` for further
+   details about these special kind of option macros (e.g. ``ptx/...``).
+
 It is a good practice to add both settings, e.g. ``--disable-debug``
 even if this is the default case. Sometimes ``configure`` tries to guess
 something and the binary result might differ depending on the build
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] doc: mention dedicated PTXdist macros to be used in rule files

2019-02-22 Thread Juergen Borleis
Hi Michael,

On Friday 22 February 2019 12:42:47 Michael Olbrich wrote:
> > In order to simplify rule files, it's worth to use more of the provided
> > rule file macros PTXdist already provides.
> >
> > Signed-off-by: Juergen Borleis 
> > ---
> >  doc/dev_manual.rst | 17 +
> >  1 file changed, 17 insertions(+)
> >
> > diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
> > index f0c2e00ee..984e91cd4 100644
> > --- a/doc/dev_manual.rst
> > +++ b/doc/dev_manual.rst
> > @@ -909,6 +909,23 @@ file and add the correct parameters:
> >  .. important:: Please note the trailing ``PTXCONF_`` for each define.
> > While Kconfig is
>
> Not about your change, but I think 'trailing' is the wrong word here.
> Maybe something with 'prefix'? Other ideas?

Arrgh, "leading" I meant... m(

Will send a V2.

jb

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

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] doc: mention dedicated PTXdist macros to be used in rule files

2019-02-22 Thread Juergen Borleis
In order to simplify rule files, it's worth to use more of the provided
rule file macros PTXdist already provides.

Signed-off-by: Juergen Borleis 
---
 doc/dev_manual.rst | 17 +
 1 file changed, 17 insertions(+)

diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index f0c2e00ee..984e91cd4 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -909,6 +909,23 @@ file and add the correct parameters:
 .. important:: Please note the trailing ``PTXCONF_`` for each define. While 
Kconfig is
   using ``FOO_BAR``, the rule file must use ``PTXCONF_FOO_BAR`` instead.
 
+This kind of rule file style is sometimes error prone and hard to read. There
+is a simpler way available to handle these build-time options. PTXdist
+provides some macros to unify and simplify creating these options on demand.
+Using these macros makes the rule file looks like instead:
+
+.. code-block:: make
+
+#
+# autoconf
+#
+FOO_CONF_OPT := $(CROSS_AUTOCONF_USR) \
+--$(call ptx/endis, PTXCONF_FOO_DEBUG)-debug \
+--$(call ptx/wwo, PTXCONF_FOO_BAR)-bar
+
+Refer :ref:`Rule File Macro Reference ` for further details about
+these kind of macros.
+
 It is a good practice to add both settings, e.g. ``--disable-debug``
 even if this is the default case. Sometimes ``configure`` tries to guess
 something and the binary result might differ depending on the build
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 1/4] doc: BUILDTIME versus RUNTIME

2019-02-22 Thread Juergen Borleis
Describe the difference of some detailed dependency descriptions in
Kconfig menufiles.

Signed-off-by: Juergen Borleis 
---
 doc/daily_work.inc | 58 ++
 doc/dev_manual.rst |  5 +
 2 files changed, 63 insertions(+)

diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index 5708903db..e4260e448 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -1297,3 +1297,61 @@ non-interactive user, e.g. a different application.
should use the **LGPL license for both parts** from the beginning. Else
you may cannot move source code in such a way, because it would require a
license change for this specific piece of source code (to be pedantic!).
+
+.. _external_dependencies_variants:
+
+Controling Package Dependencies in more Detail
+--
+
+In section :ref:`external_dependencies` a simple method is shown how to define
+an external package dependency a particular package can have in order to build
+it.
+
+Implicit Dependencies
+~
+
+For the simple dependency definition PTXdist adds internally a dependency
+to the *install* stage of the defined external dependency (or to a different
+package to use PTXdist glossary).
+
+We must keep this in mind, because there are packages out there, which don't
+install anything in their *install* stage. They install something in their
+*targetinstall* stage instead. In this case even if the dependency is defined
+like shown in :ref:`external_dependencies`, building the particular package may
+fail depending on the build order.
+
+To avoid this, an explicit ``make`` style dependency must be added to the rule
+file. If the *compile* stage of package ``foo`` has a dependency to package
+``bar``'s *targetinstall* stage just add the following lines to your rule file:
+
+.. code-block:: make
+
+   $(STATEDIR)/foo.compile: $(STATEDIR)/bar.targetinstall
+
+Build-Time only Dependency
+~~
+
+Sometimes packages have a compile-time dependency to a different package, but
+can live without its content at run-time. An example can be a static library
+which is linked at compile-time and not required as a separate package at
+run-time. Another example is making use of this detailed dependency can make
+developer's life easier when using individual package lists for dedicated
+image files. Think about a development image and a production image which 
should
+be built at the same time but should contain a different packages list each
+(refer :ref:`multi_image_individual_root_filesystems` for details).
+
+Marking a menu file based dependency with ``if BUILDTIME`` limits the 
dependency
+to compile-time only. In this case its possible to have the package in one
+image's list, but not its dependency.
+
+Run-Time only Dependency
+
+
+The other way round is ``if RUNTIME``. This forces the dependency package is
+part of the final image as well, but PTXdist can improve its build-time job by
+reordering package's build.
+A use case for this run-time dependency can be a package which just installs a
+shell script. This shell script makes use of some shell commands which must be
+present at run-time and thus depends on a package which provides these shell
+commands. But these shell commands are not required to build the shell script
+itself. In this case PTXdist can build both packages independently.
diff --git a/doc/dev_manual.rst b/doc/dev_manual.rst
index a14e64b0f..f0c2e00ee 100644
--- a/doc/dev_manual.rst
+++ b/doc/dev_manual.rst
@@ -992,6 +992,8 @@ as expected:
 Whenever we change a *FOO* related menu entry, PTXdist should detect it
 and re-build the package when a new build is started.
 
+.. _external_dependencies:
+
 Managing External Compile Time Dependencies
 ^^^
 
@@ -1035,6 +1037,9 @@ file looks like:
 
 PTXdist now builds the *zlib* first and our new package thereafter.
 
+Refer :ref:`external_dependencies_variants` for more specific dependency
+description.
+
 Managing External Compile Time Dependencies on Demand
 ^
 
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 2/4] doc: follow 'proselint' and improve the text

2019-02-22 Thread Juergen Borleis
Follow the hints of the nice tool 'proselint'...

Signed-off-by: Juergen Borleis 
---
 doc/daily_work.inc  | 2 +-
 doc/ref_manual.rst  | 4 ++--
 doc/user_manual.inc | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index e4260e448..3fc894106 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -356,7 +356,7 @@ Using available CPU Cores
 ~
 
 PTXdist uses all available CPU cores when building a project by default.
-But there are some exceptions:
+There are some exceptions:
 
 -  the prepare stage of all autotools build system based packages can
use only one CPU core. This is due to the fact, the running
diff --git a/doc/ref_manual.rst b/doc/ref_manual.rst
index 96274ac97..69f7fdee8 100644
--- a/doc/ref_manual.rst
+++ b/doc/ref_manual.rst
@@ -556,7 +556,7 @@ Usage:
 
 This macro is very similar to ``world/compile``. The only differences is
 that is uses the specified ``build arguments`` instead of
-``_MAKE_OPT``.  This is usefull if ``make`` needs to be called more
+``_MAKE_OPT``. This is usefull if ``make`` needs to be called more
 than once in the compile stage.
 
 world/execute, execute
@@ -622,7 +622,7 @@ The  parameter can be:
   parameter in this case to locate the file to copy from. 
   The  is uses a path relative to the :ref:`package install
   directory`. This only works if the package uses the default
-  or a similar *install* stage.  For our *foo* example used source file is
+  or a similar *install* stage. For our *foo* example used source file is
   ``/packages/foo-1.1.0/``.
 
 The  parameter can be:
diff --git a/doc/user_manual.inc b/doc/user_manual.inc
index 9f78f5b46..0a4e4b34c 100644
--- a/doc/user_manual.inc
+++ b/doc/user_manual.inc
@@ -314,7 +314,7 @@ Next we will build the BSP to show some of PTXdist’s main 
features.
 Selecting a Userland Configuration
 ~~
 
-First of all we have to select a userland configuration. This step
+First we have to select a userland configuration. This step
 defines what kind of applications will be built for the hardware
 platform. The |ptxdistBSPName| project comes
 with a predefined configuration we select in the following step:
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 3/4] doc: describe a strange behaviour and its solution

2019-02-22 Thread Juergen Borleis
Using a unusual 'umask' leads to a strange erroneous behaviour. This was
reported on the PTXdist mailing list.

Signed-off-by: Juergen Borleis 
---
 doc/daily_work.inc | 16 
 doc/ref_manual.rst |  2 ++
 2 files changed, 18 insertions(+)

diff --git a/doc/daily_work.inc b/doc/daily_work.inc
index 3fc894106..74da11953 100644
--- a/doc/daily_work.inc
+++ b/doc/daily_work.inc
@@ -1355,3 +1355,19 @@ shell script. This shell script makes use of some shell 
commands which must be
 present at run-time and thus depends on a package which provides these shell
 commands. But these shell commands are not required to build the shell script
 itself. In this case PTXdist can build both packages independently.
+
+``umask`` Pitfall
+-
+
+When using PTXdist keep in mind it requires some 'always expected' permissions
+to do its job (this does not include root permissions!). But it includes some
+permissions related to file permission masks.
+
+PTXdist requires a ``umask`` of ``0022`` to be able to create files accessible
+by regular users. This is important at build-time, since it propagates to the
+generated target filesystem images as well. For example the ``install_tree``
+macro (refer :ref:`install_tree,reference`) uses the file permissions it finds
+in the build machine's filesystem also for the target filesystem image. With
+a different ``umask`` than ``0022`` at build-time this may fail badly at
+run-time with strange erroneous behaviour (for example some daemons with
+regular user permissions cannot acces their own configuration files).
diff --git a/doc/ref_manual.rst b/doc/ref_manual.rst
index 69f7fdee8..e2be86060 100644
--- a/doc/ref_manual.rst
+++ b/doc/ref_manual.rst
@@ -681,6 +681,8 @@ Copy a file from the package install directory to the root 
filesystem:
 
  $(call install_copy, foo, 0, 0, 0755, -, /usr/bin/foo)
 
+.. _install_tree,reference:
+
 install_tree
 
 
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH 4/4] doc: fix missing step to setup a Python virtualenv

2019-02-22 Thread Juergen Borleis
In order to build the PTXdist documentation a virtualenv is a useful
helper. This change mentions its correct setup.

Signed-off-by: Juergen Borleis 
---
 doc/including_bsp_doc.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/including_bsp_doc.inc b/doc/including_bsp_doc.inc
index cfccc45b4..d4abcd8ea 100644
--- a/doc/including_bsp_doc.inc
+++ b/doc/including_bsp_doc.inc
@@ -32,6 +32,7 @@ when not globally present in the host system.
 .. code-block:: text
 
$ pip3 install --upgrade --user pip virtualenv
+   $ virtualenv -p python3 env
$ source env/bin/activate
$ pip3 install sphinx
$ pip3 install sphinx_rtd_theme
-- 
2.11.0


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] ima-evm-utils: version bump to 1.1

2019-02-22 Thread Juergen Borleis
This version bump also adds support for openssl-1.1.x.

Signed-off-by: Juergen Borleis 
---
 ...ove-file-at-it-s-autogenerated-by-autotoo.patch |   0
 ...2-Makefile.am-rename-INCLUDES-AM_CPPFLAGS.patch |   0
 ...tl-find-add-missing-closedir-dir-on-error.patch |   6 +-
 ...-add-missing-error-handling-and-propagate.patch |   6 +-
 ...d-fallback-definitions-for-XATTR_NAME_IMA.patch |   2 +-
 ...maevm-use-EVP_MAX_MD_SIZE-for-hash-size-i.patch |  20 ++--
 ...se-SHA_DIGEST_LENGTH-instead-of-open-codi.patch |   8 +-
 ...mctl-add-parameter-e-to-set-evm-hash-algo.patch |  50 +-
 ...add-support-for-offline-image-preparation.patch | 110 ++---
 ...ot-account-.-and-.-for-directory-hash-gen.patch |   4 +-
 .../0011-HACK-don-t-generate-man-page.patch|   0
 .../0012-Fix-warning-for-non-debug-use-case.patch  |  28 ++
 .../autogen.sh |   0
 .../series |   3 +-
 rules/ima-evm-utils.make   |   6 +-
 15 files changed, 136 insertions(+), 107 deletions(-)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0001-INSTALL-remove-file-at-it-s-autogenerated-by-autotoo.patch
 (100%)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0002-Makefile.am-rename-INCLUDES-AM_CPPFLAGS.patch (100%)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0003-evmctl-find-add-missing-closedir-dir-on-error.patch 
(79%)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0004-evmctl-find-add-missing-error-handling-and-propagate.patch
 (87%)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0005-evmctl-add-fallback-definitions-for-XATTR_NAME_IMA.patch
 (94%)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0006-evmctl-libimaevm-use-EVP_MAX_MD_SIZE-for-hash-size-i.patch
 (76%)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0007-libimaevm-use-SHA_DIGEST_LENGTH-instead-of-open-codi.patch
 (77%)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0008-evmctl-add-parameter-e-to-set-evm-hash-algo.patch (69%)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0009-evmctl-add-support-for-offline-image-preparation.patch 
(68%)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0010-evmctl-Do-not-account-.-and-.-for-directory-hash-gen.patch
 (89%)
 rename patches/{ima-evm-utils-1.0 => 
ima-evm-utils-1.1}/0011-HACK-don-t-generate-man-page.patch (100%)
 create mode 100644 
patches/ima-evm-utils-1.1/0012-Fix-warning-for-non-debug-use-case.patch
 rename patches/{ima-evm-utils-1.0 => ima-evm-utils-1.1}/autogen.sh (100%)
 rename patches/{ima-evm-utils-1.0 => ima-evm-utils-1.1}/series (86%)

diff --git 
a/patches/ima-evm-utils-1.0/0001-INSTALL-remove-file-at-it-s-autogenerated-by-autotoo.patch
 
b/patches/ima-evm-utils-1.1/0001-INSTALL-remove-file-at-it-s-autogenerated-by-autotoo.patch
similarity index 100%
rename from 
patches/ima-evm-utils-1.0/0001-INSTALL-remove-file-at-it-s-autogenerated-by-autotoo.patch
rename to 
patches/ima-evm-utils-1.1/0001-INSTALL-remove-file-at-it-s-autogenerated-by-autotoo.patch
diff --git 
a/patches/ima-evm-utils-1.0/0002-Makefile.am-rename-INCLUDES-AM_CPPFLAGS.patch 
b/patches/ima-evm-utils-1.1/0002-Makefile.am-rename-INCLUDES-AM_CPPFLAGS.patch
similarity index 100%
rename from 
patches/ima-evm-utils-1.0/0002-Makefile.am-rename-INCLUDES-AM_CPPFLAGS.patch
rename to 
patches/ima-evm-utils-1.1/0002-Makefile.am-rename-INCLUDES-AM_CPPFLAGS.patch
diff --git 
a/patches/ima-evm-utils-1.0/0003-evmctl-find-add-missing-closedir-dir-on-error.patch
 
b/patches/ima-evm-utils-1.1/0003-evmctl-find-add-missing-closedir-dir-on-error.patch
similarity index 79%
rename from 
patches/ima-evm-utils-1.0/0003-evmctl-find-add-missing-closedir-dir-on-error.patch
rename to 
patches/ima-evm-utils-1.1/0003-evmctl-find-add-missing-closedir-dir-on-error.patch
index 77e9f5fc6..4b1c84584 100644
--- 
a/patches/ima-evm-utils-1.0/0003-evmctl-find-add-missing-closedir-dir-on-error.patch
+++ 
b/patches/ima-evm-utils-1.1/0003-evmctl-find-add-missing-closedir-dir-on-error.patch
@@ -10,10 +10,10 @@ Signed-off-by: Marc Kleine-Budde 
  1 file changed, 2 insertions(+)
 
 diff --git a/src/evmctl.c b/src/evmctl.c
-index c20cbfe80ab6..19f5f3bc87b0 100644
+index 2ffee786865b..20eccfa93b2b 100644
 --- a/src/evmctl.c
 +++ b/src/evmctl.c
-@@ -1092,6 +1092,7 @@ static int find(const char *path, int dts, find_cb_t 
func)
+@@ -1229,6 +1229,7 @@ static int find(const char *path, int dts, find_cb_t 
func)
  
if (fchdir(dirfd(dir))) {
log_err("Failed to chdir %s\n", path);
@@ -21,7 +21,7 @@ index c20cbfe80ab6..19f5f3bc87b0 100644
return -1;
}
  
-@@ -1107,6 +1108,7 @@ static int find(const char *path, int dts, find_cb_t 
func)
+@@ -1244,6 +1245,7 @@ static int find(const char *path, int dts, find_cb_t 
func)
  
if (chdir("..")) {
log_err("Failed to c

Re: [ptxdist] Append Make Options to Compile Stage of Rule File

2019-02-18 Thread Juergen Borleis
Hi You Wen,

On Monday 18 February 2019 11:29:31 Chin You Wen (WMSC-HW) wrote:
> I tried that and also with some variations such as "CFLAGS+=-Wno-error"
> but nothing changes in the compiler output. I am compiling for
> Phycore-AM335x SOM, if that matters.

Okay, without:


target: libsepol.compile


make[1]: Entering directory '[...]/platform-v7a/build-target/libsepol_2.8'
make -C src
make[2]: Entering directory '[...]/platform-v7a/build-target/libsepol_2.8/src'
arm-v7a-linux-gnueabihf-gcc -Werror -Wall -W -Wundef -Wshadow 
-Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include 
-fPIC -c -o assertion.o assertion.c
arm-v7a-linux-gnueabihf-gcc -Werror -Wall -W -Wundef -Wshadow 
-Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include 
-fPIC -c -o avrule_block.o avrule_block.c
[...]
arm-v7a-linux-gnueabihf-gcc -Werror -Wall -W -Wundef -Wshadow 
-Wmissing-format-attribute -O2 -I. -I../include -D_GNU_SOURCE -I../cil/include 
-fPIC -c -o mls.o mls.c
In file included from ibpkeys.c:4:0:
ibpkeys.c: In function 'sepol_ibpkey_query':
ibpkeys.c:179:14: error: format '%lx' expects argument of type 'long unsigned 
int', but argument 4 has type 'uint64_t {aka long long unsigned int}' 
[-Werror=format=]
debug.h:36:330: note: in definition of macro 'msg_write'
ibpkeys.c:179:2: note: in expansion of macro 'ERR'
ibpkeys.c: In function 'sepol_ibpkey_modify':
ibpkeys.c:206:14: error: format '%lx' expects argument of type 'long unsigned 
int', but argument 4 has type 'uint64_t {aka long long unsigned int}' 
[-Werror=format=]
debug.h:36:330: note: in definition of macro 'msg_write'
ibpkeys.c:206:2: note: in expansion of macro 'ERR'
cc1: all warnings being treated as errors
ICECC[25965] 2019-02-18 11:38:50: Compiled on 10.1.0.69
Makefile:76: recipe for target 'ibpkeys.o' failed

And with

LIBSEPOL_MAKE_OPT := \
"CFLAGS=-Wno-error=shadow"

in the libsepol.make rule file:


target: libsepol.compile


make[1]: Entering directory '[...]/platform-v7a/build-target/libsepol_2.8'
make -C src
make[2]: Entering directory '[...]/platform-v7a/build-target/libsepol_2.8/src'
arm-v7a-linux-gnueabihf-gcc -Wno-error=shadow -I. -I../include -D_GNU_SOURCE 
-I../cil/include -fPIC -c -o assertion.o assertion.c
arm-v7a-linux-gnueabihf-gcc -Wno-error=shadow -I. -I../include -D_GNU_SOURCE 
-I../cil/include -fPIC -c -o avrule_block.o avrule_block.c
arm-v7a-linux-gnueabihf-gcc -Wno-error=shadow -I. -I../include -D_GNU_SOURCE 
-I../cil/include -fPIC -c -o avtab.o avtab.c
arm-v7a-linux-gnueabihf-gcc -Wno-error=shadow -I. -I../include -D_GNU_SOURCE 
-I../cil/include -fPIC -c -o boolean_record.o boolean_record.c
[...]
arm-v7a-linux-gnueabihf-ar rcs libsepol.a assertion.o avrule_block.o avtab.o 
boolean_record.o booleans.o conditional.o constraint.o context.o 
context_record.o debug.o ebitmap.o expand.o genbools.o genusers.o handle.o 
hashtab.o hierarchy.o ibendport_record.o ibendports.o ibpkey_record.o ibpkeys.o 
iface_record.o 
interfaces.o kernel_to_cil.o kernel_to_common.o kernel_to_conf.o link.o mls.o 
module.o module_to_cil.o node_record.o nodes.o polcaps.o policydb.o 
policydb_convert.o policydb_public.o port_record.o ports.o roles.o services.o 
sidtab.o symtab.o user_record.o users.o util.o 
write.o ../cil/src/cil.o ../cil/src/cil_binary.o ../cil/src/cil_build_ast.o 
../cil/src/cil_copy_ast.o ../cil/src/cil_find.o ../cil/src/cil_fqn.o 
../cil/src/cil_lexer.o ../cil/src/cil_list.o ../cil/src/cil_log.o 
../cil/src/cil_mem.o ../cil/src/cil_parser.o ../cil/src/cil_policy.o 
../cil/src/cil_post.o ../cil/src/cil_reset_ast.o ../cil/src/cil_resolve_ast.o 
../cil/src/cil_stack.o ../cil/src/cil_strpool.o ../cil/src/cil_symtab.o 
../cil/src/cil_tree.o ../cil/src/cil_verify.o
arm-v7a-linux-gnueabihf-ranlib libsepol.a
ln -sf libsepol.so.1 libsepol.so
make[2]: Leaving directory '[...]/platform-v7a/build-target/libsepol_2.8/src'
make -C utils
make[2]: Entering directory '[...]/platform-v7a/build-target/libsepol_2.8/utils'
arm-v7a-linux-gnueabihf-gcc -Wno-error=shadow -I../include  -L../src  chkcon.c  
-lsepol -o chkcon
make[2]: Leaving directory '[...]/platform-v7a/build-target/libsepol_2.8/utils'
make[1]: Leaving directory '[...]/platform-v7a/build-target/libsepol_2.8'
finished target libsepol.compile

It works as expected (and removes all options from the Makefile, which isn't
a good idea). Maybe this would be better:

LIBSEPOL_MAKE_OPT := \
CFLAGS="-Wall -Wextra -W -Wundef -Wshadow 
-Wmissing-format-attribute -O2"

Regards,
Jürgen

BTW: You should fix the warnings. They are serious.

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

___
ptxdist mailing list
ptxdist@pengutronix.de

  1   2   3   >