Re: [ptxdist] [PATCH] setlocalversion: only use tags actually on current branch

2018-12-12 Thread Denis OSTERLAND
Hi

Am Donnerstag, den 13.12.2018, 08:29 +0100 schrieb Uwe Kleine-König:
> On Wed, Dec 12, 2018 at 09:14:52AM +, Denis OSTERLAND wrote:
> > 
> > Consider following situation:
> > 
> >    tag C
> >  v
> >  A---B---C topic
> > / \
> >    D---E---F---G---H master
> >    ^
> >  tag E
> > 
> > PTXDIST_BSP_AUTOVERSION at commit G will be E-2-g,
> > but at commit H it will be C-3-g.
> At H I'd expect C-1-g.
> 
> I think in general using --first-parent is wrong. It's only in some
> workflows (i.e. when there is a single person that does "mainline
> merges") where the first parent is special.
This is result of discussion with Michael Olbrich.

> 
> > 
> > With --first-parent it will be E-3-g.
> > This is more intuitive result,
> > especially when more than just one branch gets merged.
> > 
> > Signed-off-by: Denis Osterland 
> > ---
> >  scripts/kernel/setlocalversion | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/scripts/kernel/setlocalversion b/scripts/kernel/setlocalversion
> > index 3feb87dce..7eaaaf413 100755
> > --- a/scripts/kernel/setlocalversion
> > +++ b/scripts/kernel/setlocalversion
> > @@ -55,12 +55,12 @@ if head=`git ${git_abbrev} rev-parse --verify --short 
> > HEAD 2>/dev/null`; then
> >  
> >     # If we are at a tagged commit (like "ptxdist-2010.05.0"), we
> >     # print it here
> > -   if atag="`git describe --exact-match 2>/dev/null`"; then
> > +   if atag="`git describe --first-parent --exact-match 2>/dev/null`"; then
> With --exact-match --first-parent is a noop, isn't it?
You are right.

> 
> > 
> >     echo "$atag" | awk -F- '{printf("%s", $(NF))}'
> unrelated to this patch: if atag is "ELWMS-1.0-rc17" the result here is
> "rc17", isn't it?
You are right.
This behavior is untouched.
Tag "ELWMS-1.0_rc17" would give "1.0_rc17".

This is obviously missing in my posted custom rule and I have to add it to add 
it.
Thanks for the hint.

> 
> Best regards
> Uwe
> 

Regards Denis

Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail 
enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten 
haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung 
und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail 
contains confidential and/or legally protected information. Please inform us if 
you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, 
disclosure, alteration, distribution and/or publication of this e-mail is 
strictly prohibited. 
___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] setlocalversion: only use tags actually on current branch

2018-12-12 Thread Uwe Kleine-König
On Wed, Dec 12, 2018 at 09:14:52AM +, Denis OSTERLAND wrote:
> Consider following situation:
> 
>tag C
>  v
>  A---B---C topic
> / \
>D---E---F---G---H master
>^
>  tag E
> 
> PTXDIST_BSP_AUTOVERSION at commit G will be E-2-g,
> but at commit H it will be C-3-g.

At H I'd expect C-1-g.

I think in general using --first-parent is wrong. It's only in some
workflows (i.e. when there is a single person that does "mainline
merges") where the first parent is special.

> With --first-parent it will be E-3-g.
> This is more intuitive result,
> especially when more than just one branch gets merged.
> 
> Signed-off-by: Denis Osterland 
> ---
>  scripts/kernel/setlocalversion | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/kernel/setlocalversion b/scripts/kernel/setlocalversion
> index 3feb87dce..7eaaaf413 100755
> --- a/scripts/kernel/setlocalversion
> +++ b/scripts/kernel/setlocalversion
> @@ -55,12 +55,12 @@ if head=`git ${git_abbrev} rev-parse --verify --short 
> HEAD 2>/dev/null`; then
>  
>   # If we are at a tagged commit (like "ptxdist-2010.05.0"), we
>   # print it here
> - if atag="`git describe --exact-match 2>/dev/null`"; then
> + if atag="`git describe --first-parent --exact-match 2>/dev/null`"; then

With --exact-match --first-parent is a noop, isn't it?

>   echo "$atag" | awk -F- '{printf("%s", $(NF))}'

unrelated to this patch: if atag is "ELWMS-1.0-rc17" the result here is
"rc17", isn't it?

Best regards
Uwe

-- 
Pengutronix e.K.   | Uwe Kleine-König|
Industrial Linux Solutions | http://www.pengutronix.de/  |

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] setlocalversion: only use tags actually on current branch

2018-12-12 Thread Denis OSTERLAND
Hi,

Am Mittwoch, den 12.12.2018, 15:53 +0100 schrieb Michael Olbrich:
> Hi,
> 
> On Wed, Dec 12, 2018 at 02:35:45PM +, Denis OSTERLAND wrote:
> > 
> > Am Mittwoch, den 12.12.2018, 14:51 +0100 schrieb Michael Olbrich:
> > > 
> > > On Wed, Dec 12, 2018 at 09:14:52AM +, Denis OSTERLAND wrote:
> > > > 
> > > > 
> > > > Consider following situation:
> > > > 
> > > >    tag C
> > > >  v
> > > >  A---B---C topic
> > > > / \
> > > >    D---E---F---G---H master
> > > >    ^
> > > >  tag E
> > > > 
> > > > PTXDIST_BSP_AUTOVERSION at commit G will be E-2-g,
> > > > but at commit H it will be C-3-g.
> > > > With --first-parent it will be E-3-g.
> > > > This is more intuitive result,
> > > > especially when more than just one branch gets merged.
> > > Nack. This only works with explicit merges. If multiple people update the
> > > branch with git pull/push, then the first parent may not be the upstream
> > > commit and the correct tag may be missed.
> > I am not sure if I got the point here.
> > 
> > Is this your concern:
> >                            tag C
> >  v
> >  A---B---C origin/master
> > / \
> >    D---E---F---G---H master
> > 
> > and now when pushing master to origin C becomes invisible.
> Exactly, and that is not acceptable in general.
Okay.
We do "git rebase origin/master" before push, but in general you are right this 
is possible.

> 
> > 
> > > 
> > > In your example above consider 'C' the HEAD of the local master branch
> > > before a pull/push. Then the first parent of 'H' is 'C'. And a if 'F' is
> > > the tag, then it is ignored.
> > The branches are equal, so of course yes.
> > 
> > If I got you right:
> > 
> >               tag C
> >                 v
> >         A---B---C---H topic
> >        /           /
> >   D---E---F---G master
> >           ^
> >         tag F
> > 
> > At G it is F-1-g.
> > At H it is C-3-g and C-1-g with --first-parent.
> > 
> > Seems to be correct behavior to me.
> I'm not sure what your point is here.
I guess I got you wrong here. Your paragraph also applies to above example.

> 
> Michael
> 

I found a simple to do it in my BSP:

diff --git a/configs/ptxconfig b/configs/ptxconfig
index f59c6ea..15ce835 100644
--- a/configs/ptxconfig
+++ b/configs/ptxconfig
@@ -61,7 +61,7 @@ PTXCONF_WEBUI=y
 #
 PTXCONF_PROJECT_VENDOR="Diehl Connectivity Solutions GmbH"
 PTXCONF_PROJECT="Jelica"
-PTXCONF_PROJECT_VERSION="-${PTXDIST_BSP_AUTOVERSION}"
+PTXCONF_PROJECT_VERSION="-${BSP_AUTOVERSION}"
 
 #
 # 
diff --git a/rules/autoversion.make b/rules/autoversion.make
new file mode 100644
index 000..971f762
--- /dev/null
+++ b/rules/autoversion.make
@@ -0,0 +1,13 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Denis Osterland 
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+BSP_AUTOVERSION=$(shell git describe --first-parent --dirty)
+
+# vim: syntax=make

Regards Denis

Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail 
enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten 
haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung 
und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail 
contains confidential and/or legally protected information. Please inform us if 
you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, 
disclosure, alteration, distribution and/or publication of this e-mail is 
strictly prohibited. 
___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [ANNOUNCE] PTXdist 2018.12.0 released

2018-12-12 Thread Michael Olbrich
Hi,

I'm happy to announce that I've just released ptxdist-2018.12.0.
There are no big changes this time. There are quite a few fixes for the
layer/kconfig code, so if you use that then updating is recommended.
The new --progress options works in combination with --quiet. With this,
the output contains the finished/total number of build stages for the
current PTXdist run. This is rather untested, so the total number may be
incorrect or calculating it may fail.
The rest is the usual mix of new packages, version bumps and bugfixes.
Some of that happend in preparation for OpenSSL 1.1.x and gcc 8.x.

Thanks to all contributors and - as always - the shortlog below.

Enjoy,
Michael Olbrich


Alexander Dahl (4):
  Fix typos in KConfig files (.in rules)
  lighttpd: Add license file hash
  lighttpd: After version bump cleanup
  lighttpd: Install mod_openssl if SSL is selected

Clemens Gruber (3):
  nginx: version bump 1.14.0 -> 1.14.1
  libgpiod: version bump 1.1.1 -> 1.2
  systemd: add upstream patch for CVE-2018-15688

Gavin Schenk (1):
  fbv: Fix missing section entry

Guillermo Rodríguez (4):
  classpath: Fix building with OpenJDK 1.8
  u-boot: Add support for SPL for non-OMAP CPUs
  classpath: Fix for building with OpenJDK-1.8 (again)
  classpath: Fix building when default locale is not UTF-8

Hubert Feurstein (2):
  gnupg: add install option for gpg-agent
  gnupg: add compression algorithms support

Jan Luebbe (1):
  wpa_supplicant: fix typo in prompt for wpa_passphrase

Ladislav Michl (1):
  networkmanager: version bump 1.14.2 -> 1.14.4

Lucas Stach (4):
  speex: version bump 1.2rc1 -> 1.2
  sbc: new package
  mmc-utils: version bump 2016-06-07 -> 2018-03-27
  linuxptp: fix build with new kernel headers

Michael Grzeschik (4):
  libkcapi: add new rule
  sdl2: version bump to 2.0.9
  sdl2-image: version bump to 2.0.4
  sdl2-mixer: version bump to 2.0.4

Michael Olbrich (91):
  barebox: cleanup rule to use more default stages
  template-barebox: cleanup rule
  ptxd_make_world_init: reset SOURCE_DATE_EPOCH for local-src packages
  ptxd_make_world_init: define variables for more reproducible kbuild 
packages
  kernel: cleanup rule
  define and use PTXDIST_BUILD_TIMESTAMP
  ptxd_install_file: improve debug handling
  ptxd_install_replace_figlet: don't confuse debug highlighting with log 
output
  nss: version bump 3.37 -> 3.40
  gnutls: remove unnecessary dependency
  iperf3: version bump 3.2 -> 3.6
  libcurl: version bump 7.52.1 -> 7.62.0
  lighttpd: version bump 1.4.45 -> 1.4.51
  openntpd: fix dependency
  openssh: version bump 7.6p1 -> 7.9p1
  host-nss: don't force 64bit on 32bit hosts
  ptxd_kconfig_update_config: don't save the config if it wasn't modified
  ptxd_kconfig_update_config: don't use -nt or -ot
  ptxdist: run the trap handler before executing the correct ptxdist for 
--auto-version
  ptxd_kconfig: make sure the stamp file is always generated
  ptxd_kconfig_find_config: fail for mode=run if no config is found
  ptxd_kconfig: don't overwrite confdir
  ptxd_get_path_filtered: define new helper function
  ptxdist: ignore /dev/null symlinks when looking for config files
  ptxd_make_world_compile: escape pkg_make_opt argument for 'compile'
  host-fontconfig: add missing dependency
  xkeyboard-config: version bump 2.23.1 -> 2.25
  xcb-proto: version bump 1.10 -> 1.13
  libxcb: version bump 1.10 -> 1.13.1
  freetype: version bump 2.8 -> 2.9.1
  fontconfig: version bump 2.12.5 -> 2.13.1
  xorg-lib-x11: version bump 1.6.2 -> 1.6.7
  crda: don't use builtin keys
  hostapd/wpa_supplicant: add security and ssl fixes
  host-libp11: version bump 0.4.0 -> 0.4.9
  ptxd_init_*_env: use -B instead of -L
  python: version bump 2.7.13 -> 2.7.15
  mariadb: switch to bundled ssl
  nettle: add option to build with libgmp
  rtmpdump: use gnutls instead of OpenSSL
  openvpn: version bump 2.3.13 -> 2.4.6
  host-qemu: add license information
  systemd: fix nobody group name
  iputils: version bump s20161105 -> s20180629
  arora: move to staging
  mxs-utils: drop old patches
  at91bootstrap2: use generic kconfig helper
  at91bootstrap: blacklist TARGET_HARDEN_STACK
  host-system-python3: fix error message for mako
  host-system-python3: add option for development files
  host-gobject-introspection: needs system python3 development files
  ptxd_make_log: redirect stdin to /dev/null for -q
  ptxd_kconfig_sync_config: improve 'check' error message for package 
configs
  ptxd_make_kconfig: improve oldconfig handling with -q
  dosfstools: fix installing symlinks
  gst-plugins-bad1: define missing symbol
  mc: fix vfs handling and dependencies
  poppler: fix floating point / fixed point handling
  ppp: 

[ptxdist] [PATCH v2 4/4] barebox_mlo: add support for reproducible build

2018-12-12 Thread Baeuerle, Florian
Signed-off-by: Florian Bäuerle 
---
 rules/barebox_mlo.make | 10 +-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/rules/barebox_mlo.make b/rules/barebox_mlo.make
index 368da0e8f..2f1da0ca7 100644
--- a/rules/barebox_mlo.make
+++ b/rules/barebox_mlo.make
@@ -39,7 +39,6 @@ BAREBOX_MLO_WRAPPER_BLACKLIST := \
TARGET_BUILD_ID
 
 BAREBOX_MLO_PATH   := PATH=$(CROSS_PATH)
-BAREBOX_MLO_CONF_ENV   := KCONFIG_NOTIMESTAMP=1
 BAREBOX_MLO_CONF_TOOL  := kconfig
 BAREBOX_MLO_CONF_OPT   := \
V=$(PTXDIST_VERBOSE) \
@@ -49,6 +48,15 @@ BAREBOX_MLO_CONF_OPT := \
 
 BAREBOX_MLO_MAKE_OPT   := $(BAREBOX_MLO_CONF_OPT)
 
+ifndef PTXCONF_SETUP_DISABLE_REPRODUCIBLE
+BAREBOX_MLO_MAKE_ENV := $(BAREBOX_MLO_MAKE_ENV) \
+   SOURCE_DATE_EPOCH="$(SOURCE_DATE_EPOCH)" \
+   KBUILD_BUILD_TIMESTAMP="$(shell date --utc --date 
@$(SOURCE_DATE_EPOCH))" \
+   KBUILD_BUILD_VERSION="0" \
+   KBUILD_BUILD_USER="ptxdist" \
+   KBUILD_BUILD_HOST="ptxdist"
+endif
+
 ifdef PTXCONF_BAREBOX_MLO
 $(BAREBOX_MLO_CONFIG):
@echo
-- 
2.19.2

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH v2 2/4] barebox: depend on HOST_LZOP

2018-12-12 Thread Baeuerle, Florian
The version shipped by ptxdist allows us to override the modification
time in the lzop headers.

Signed-off-by: Florian Bäuerle 
---
 platforms/barebox.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/platforms/barebox.in b/platforms/barebox.in
index 645366e93..46ab32a07 100644
--- a/platforms/barebox.in
+++ b/platforms/barebox.in
@@ -12,7 +12,7 @@ menuconfig BAREBOX
select HOST_LIBUSB if BAREBOX_NEEDS_HOST_LIBUSB
select HOST_OPENSSL if BAREBOX_NEEDS_HOST_OPENSSL
select HOST_IMX_CST if BAREBOX_NEEDS_HOST_IMX_CST
-   select HOST_LZOP if BAREBOX_NEEDS_HOST_LZOP
+   select HOST_LZOP if BAREBOX_NEEDS_HOST_LZOP || 
!SETUP_DISABLE_REPRODUCIBLE
prompt "barebox   "
bool
help
-- 
2.19.2

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH v2 3/4] barebox: add support for reproducible build

2018-12-12 Thread Baeuerle, Florian
Signed-off-by: Florian Bäuerle 
---
 rules/barebox.make | 9 +
 1 file changed, 9 insertions(+)

diff --git a/rules/barebox.make b/rules/barebox.make
index 4018dd697..4e8ffebf9 100644
--- a/rules/barebox.make
+++ b/rules/barebox.make
@@ -47,6 +47,15 @@ BAREBOX_WRAPPER_BLACKLIST := \
 BAREBOX_CONF_OPT := $(call barebox-opts, BAREBOX)
 BAREBOX_MAKE_OPT := $(BAREBOX_CONF_OPT)
 
+ifndef PTXCONF_SETUP_DISABLE_REPRODUCIBLE
+BAREBOX_MAKE_ENV := $(BAREBOX_MAKE_ENV) \
+   SOURCE_DATE_EPOCH="$(SOURCE_DATE_EPOCH)" \
+   KBUILD_BUILD_TIMESTAMP="$(shell date --utc --date 
@$(SOURCE_DATE_EPOCH))" \
+   KBUILD_BUILD_VERSION="0" \
+   KBUILD_BUILD_USER="ptxdist" \
+   KBUILD_BUILD_HOST="ptxdist"
+endif
+
 BAREBOX_TAGS_OPT := TAGS tags cscope
 
 ifdef PTXCONF_BAREBOX
-- 
2.19.2

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH v2 1/4] config/setup: make reproducible builds configurable

2018-12-12 Thread Baeuerle, Florian
Some of ptxdist's packages use SOURCE_DATE_EPOCH to make the build
results predictable. Make this behaviour more configurable via a newly
introduced ptxdist setup options.

By default, this will set SOURCE_DATE_EPOCH to the year and month of the
used OSELAS Toolchain version. If the used toolchain is not an
OSELAS-Toolchain, the PTXdist version is used as a fallback.

Signed-off-by: Florian Bäuerle 
---
 config/setup/Kconfig | 47 ++
 config/setup/ptxdistrc.default   |  5 +++
 scripts/lib/ptxd_lib_reproducible.sh | 49 +++-
 3 files changed, 100 insertions(+), 1 deletion(-)

diff --git a/config/setup/Kconfig b/config/setup/Kconfig
index 990da03a1..10adb970d 100644
--- a/config/setup/Kconfig
+++ b/config/setup/Kconfig
@@ -264,6 +264,53 @@ config SETUP_DISABLE_LOCAL_CHECK
  may fail under certain circumstances.
  Disable this check at your own risk.
 
+config SETUP_DISABLE_REPRODUCIBLE
+   bool
+   prompt "disable reproducible builds"
+   help
+ By default ptxdist will build some packages in a
+ reproducible way by injecting fake timestamps, user and
+ host name into the build.
+
+if !SETUP_DISABLE_REPRODUCIBLE
+
+choice
+   prompt "Fake timestamps source"
+   default SETUP_REPRODUCIBLE_TIMESTAMP_TOOLCHAIN
+
+   config SETUP_REPRODUCIBLE_TIMESTAMP_TOOLCHAIN
+   bool
+   prompt "toolchain version"
+
+   config SETUP_REPRODUCIBLE_TIMESTAMP_PTXDIST
+   bool
+   prompt "ptxdist version"
+
+   config SETUP_REPRODUCIBLE_TIMESTAMP_CUSTOM
+   bool
+   prompt "custom timestamp"
+
+endchoice
+
+config SETUP_REPRODUCIBLE_TIMESTAMP
+   string
+   default "toolchain" if SETUP_REPRODUCIBLE_TIMESTAMP_TOOLCHAIN
+   default "ptxdist" if SETUP_REPRODUCIBLE_TIMESTAMP_PTXDIST
+   default "custom" if SETUP_REPRODUCIBLE_TIMESTAMP_CUSTOM
+
+if SETUP_REPRODUCIBLE_TIMESTAMP_CUSTOM
+
+config SETUP_REPRODUCIBLE_TIMESTAMP_STRING
+   string
+   prompt "Fake timestamp"
+   default "2018-11-01 UTC"
+   help
+ Supply a custom fake timestamp to be injected to the build.
+ The timestamp is passed to 'date --date'.
+
+endif
+endif
+
 config SETUP_ENV_WHITELIST
string "environment variable whitelist (space separated)"
help
diff --git a/config/setup/ptxdistrc.default b/config/setup/ptxdistrc.default
index 397b78eb7..8aa7dcc9a 100644
--- a/config/setup/ptxdistrc.default
+++ b/config/setup/ptxdistrc.default
@@ -61,6 +61,11 @@ PTXCONF_SETUP_JAVA_SDK="/usr/lib/jvm/default-java"
 # Developer Options 
 #
 # PTXCONF_SETUP_DISABLE_LOCAL_CHECK is not set
+# PTXCONF_SETUP_DISABLE_REPRODUCIBLE is not set
+PTXCONF_SETUP_REPRODUCIBLE_TIMESTAMP_TOOLCHAIN=y
+# PTXCONF_SETUP_REPRODUCIBLE_TIMESTAMP_PTXDIST is not set
+# PTXCONF_SETUP_REPRODUCIBLE_TIMESTAMP_CUSTOM is not set
+PTXCONF_SETUP_REPRODUCIBLE_TIMESTAMP="toolchain"
 PTXCONF_SETUP_ENV_WHITELIST=""
 # PTXCONF_SETUP_COMMON_CACHE is not set
 # PTXCONF_SETUP_GEN_DEP_TREE is not set
diff --git a/scripts/lib/ptxd_lib_reproducible.sh 
b/scripts/lib/ptxd_lib_reproducible.sh
index e2e664ba8..98c528ac2 100644
--- a/scripts/lib/ptxd_lib_reproducible.sh
+++ b/scripts/lib/ptxd_lib_reproducible.sh
@@ -8,8 +8,55 @@
 # see the README file.
 #
 
+ptxd_timestamp_ptxdist() {
+ptxd_reply="${PTXDIST_VERSION_YEAR}-${PTXDIST_VERSION_MONTH}-01 UTC"
+}
+
+ptxd_timestamp_toolchain() {
+local oselas_ptxconfig="$(readlink -f "${PTXDIST_TOOLCHAIN}/ptxconfig")"
+
+if [ -e "${oselas_ptxconfig}" ]; then
+local oselas_version="$(source "${oselas_ptxconfig}" && echo 
${PTXCONF_CONFIGFILE_VERSION})"
+local orig_IFS="${IFS}"
+local IFS="."
+set -- ${oselas_version}
+IFS="${orig_IFS}"
+ptxd_reply="${1}-${2}-01 UTC"
+else
+echo "${PTXDIST_LOG_PROMPT}warning: cannot deduce timestamp from 
toolchain, falling back to PTXdist version for reproducible timestamp"
+ptxd_timestamp_ptxdist
+fi
+}
+
+ptxd_timestamp_custom() {
+local ts="${PTXCONF_SETUP_REPRODUCIBLE_TIMESTAMP_STRING}"
+
+if ! date --date "${ts}" > /dev/null 2>&1; then
+echo "${PTXDIST_LOG_PROMPT}warning: '${ts}' is not a valid timestamp, 
falling back to toolchain for reproducible timestamp"
+ptxd_timestamp_toolchain
+else
+ptxd_reply="${ts}"
+fi
+}
+
 ptxd_lib_reproducible() {
-SOURCE_DATE_EPOCH="$(echo $(date 
--date="${PTXDIST_VERSION_YEAR}-${PTXDIST_VERSION_MONTH}-01 UTC" "+%s"))"
+if [ "${PTXCONF_SETUP_DISABLE_REPRODUCIBLE}" = "y" ]; then
+ptxd_timestamp_ptxdist
+else
+case "${PTXCONF_SETUP_REPRODUCIBLE_TIMESTAMP}" in
+"custom")
+ptxd_timestamp_custom
+;;
+"ptxdist")
+ptxd_timestamp_ptxdist
+;;
+*)
+ptxd_timestamp_toolchain
+;;
+

Re: [ptxdist] [PATCH] setlocalversion: only use tags actually on current branch

2018-12-12 Thread Michael Olbrich
Hi,

On Wed, Dec 12, 2018 at 02:35:45PM +, Denis OSTERLAND wrote:
> Am Mittwoch, den 12.12.2018, 14:51 +0100 schrieb Michael Olbrich:
> > On Wed, Dec 12, 2018 at 09:14:52AM +, Denis OSTERLAND wrote:
> > > 
> > > Consider following situation:
> > > 
> > >    tag C
> > >  v
> > >  A---B---C topic
> > > / \
> > >    D---E---F---G---H master
> > >    ^
> > >  tag E
> > > 
> > > PTXDIST_BSP_AUTOVERSION at commit G will be E-2-g,
> > > but at commit H it will be C-3-g.
> > > With --first-parent it will be E-3-g.
> > > This is more intuitive result,
> > > especially when more than just one branch gets merged.
> > Nack. This only works with explicit merges. If multiple people update the
> > branch with git pull/push, then the first parent may not be the upstream
> > commit and the correct tag may be missed.
> I am not sure if I got the point here.
> 
> Is this your concern:
>                            tag C
>  v
>  A---B---C origin/master
> / \
>    D---E---F---G---H master
> 
> and now when pushing master to origin C becomes invisible.

Exactly, and that is not acceptable in general.

> > In your example above consider 'C' the HEAD of the local master branch
> > before a pull/push. Then the first parent of 'H' is 'C'. And a if 'F' is
> > the tag, then it is ignored.
> The branches are equal, so of course yes.
> 
> If I got you right:
> 
>               tag C
>                 v
>         A---B---C---H topic
>        /           /
>   D---E---F---G master
>           ^
>         tag F
> 
> At G it is F-1-g.
> At H it is C-3-g and C-1-g with --first-parent.
> 
> Seems to be correct behavior to me.

I'm not sure what your point is here.

Michael

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

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] setlocalversion: only use tags actually on current branch

2018-12-12 Thread Denis OSTERLAND
Hi,

Am Mittwoch, den 12.12.2018, 14:51 +0100 schrieb Michael Olbrich:
> On Wed, Dec 12, 2018 at 09:14:52AM +, Denis OSTERLAND wrote:
> > 
> > Consider following situation:
> > 
> >    tag C
> >  v
> >  A---B---C topic
> > / \
> >    D---E---F---G---H master
> >    ^
> >  tag E
> > 
> > PTXDIST_BSP_AUTOVERSION at commit G will be E-2-g,
> > but at commit H it will be C-3-g.
> > With --first-parent it will be E-3-g.
> > This is more intuitive result,
> > especially when more than just one branch gets merged.
> Nack. This only works with explicit merges. If multiple people update the
> branch with git pull/push, then the first parent may not be the upstream
> commit and the correct tag may be missed.
I am not sure if I got the point here.

Is this your concern:
                           tag C
 v
 A---B---C origin/master
/ \
   D---E---F---G---H master

and now when pushing master to origin C becomes invisible.

> 
> In your example above consider 'C' the HEAD of the local master branch
> before a pull/push. Then the first parent of 'H' is 'C'. And a if 'F' is
> the tag, then it is ignored.
The branches are equal, so of course yes.

If I got you right:

              tag C
                v
        A---B---C---H topic
       /           /
  D---E---F---G master
          ^
        tag F

At G it is F-1-g.
At H it is C-3-g and C-1-g with --first-parent.

Seems to be correct behavior to me.

> 
> Maybe a patch that allows to overwrite setlocalversion in the BSP?
> 
> Michael

Regards Denis

Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail 
enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten 
haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung 
und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail 
contains confidential and/or legally protected information. Please inform us if 
you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, 
disclosure, alteration, distribution and/or publication of this e-mail is 
strictly prohibited. 
___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] kconfig: fix warnings on format

2018-12-12 Thread Denis OSTERLAND
Hi,

Am Mittwoch, den 12.12.2018, 14:29 +0100 schrieb Michael Olbrich:
> On Wed, Dec 12, 2018 at 10:31:27AM +, Denis OSTERLAND wrote:
> > 
> > Fixes warnings like:
> > conf.c:79:3: warning: format not a string literal and no format arguments 
> > [-Wformat-security]
> >    printf(_("aborted!\n\n"));
> >    ^
> Can you elaborate what triggers this? I don't get this warning here.
> Please add this to the commit message.
Just call make clean all.
Maybe it depends on GCC.
I tested with:
 - gcc (Ubuntu 5.5.0-12ubuntu1~16.04) 5.5.0 20171010
 - gcc (Ubuntu 8.1.0-5ubuntu1~16.04) 8.1.0

> 
> In general, I'd prefer to follow upstream and drop the nls support
> completely, but that won't happen until I update this stuff to the new
> upstream version.
Obviously the better solution.

> 
> Michael

Regards Denis

Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail 
enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten 
haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung 
und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail 
contains confidential and/or legally protected information. Please inform us if 
you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, 
disclosure, alteration, distribution and/or publication of this e-mail is 
strictly prohibited. 
___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] setlocalversion: only use tags actually on current branch

2018-12-12 Thread Michael Olbrich
On Wed, Dec 12, 2018 at 09:14:52AM +, Denis OSTERLAND wrote:
> Consider following situation:
> 
>tag C
>  v
>  A---B---C topic
> / \
>D---E---F---G---H master
>^
>  tag E
> 
> PTXDIST_BSP_AUTOVERSION at commit G will be E-2-g,
> but at commit H it will be C-3-g.
> With --first-parent it will be E-3-g.
> This is more intuitive result,
> especially when more than just one branch gets merged.

Nack. This only works with explicit merges. If multiple people update the
branch with git pull/push, then the first parent may not be the upstream
commit and the correct tag may be missed.

In your example above consider 'C' the HEAD of the local master branch
before a pull/push. Then the first parent of 'H' is 'C'. And a if 'F' is
the tag, then it is ignored.

Maybe a patch that allows to overwrite setlocalversion in the BSP?

Michael

> Signed-off-by: Denis Osterland 
> ---
>  scripts/kernel/setlocalversion | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/kernel/setlocalversion b/scripts/kernel/setlocalversion
> index 3feb87dce..7eaaaf413 100755
> --- a/scripts/kernel/setlocalversion
> +++ b/scripts/kernel/setlocalversion
> @@ -55,12 +55,12 @@ if head=`git ${git_abbrev} rev-parse --verify --short 
> HEAD 2>/dev/null`; then
>  
>   # If we are at a tagged commit (like "ptxdist-2010.05.0"), we
>   # print it here
> - if atag="`git describe --exact-match 2>/dev/null`"; then
> + if atag="`git describe --first-parent --exact-match 2>/dev/null`"; then
>   echo "$atag" | awk -F- '{printf("%s", $(NF))}'
>  
>   # If we are past a tagged commit (like 
> "ptxdist-2010.03.0-130-g3c60777"),
>   # we pretty print it.
> - elif atag="`git ${git_abbrev} describe 2>/dev/null`"; then
> + elif atag="`git ${git_abbrev} describe --first-parent 2>/dev/null`"; 
> then
>   echo "$atag" | awk -F- '{printf("%s-%05d-%s", 
> $(NF-2),$(NF-1),$(NF))}'
>  
>   # If we don't have a tag at all we print .??.?-?-g{commitish}.
> -- 
> 2.19.2
> 
> 
> 
> Diehl Connectivity Solutions GmbH
> Geschäftsführung: Horst Leonberger
> Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
> Nürnberg: HRB 32315
> ___
> 
> Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail 
> enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
> Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten 
> haben. Bitte loeschen Sie in diesem Fall die Nachricht.
> Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung 
> und/oder Publikation dieser E-Mail ist strengstens untersagt.
> The contents of the above mentioned e-mail is not legally binding. This 
> e-mail contains confidential and/or legally protected information. Please 
> inform us if you have received this e-mail by
> mistake and delete it in such a case. Each unauthorized reproduction, 
> disclosure, alteration, distribution and/or publication of this e-mail is 
> strictly prohibited. 
> 
> ___
> ptxdist mailing list
> ptxdist@pengutronix.de

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

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] templates: file: update comments and improve wording

2018-12-12 Thread Michael Olbrich
On Wed, Dec 12, 2018 at 12:29:26AM +0100, Roland Hieber wrote:
> The way of building target packages has changed over the years, and
> SYSROOT_TARGET is no longer filled in the install stage. But all of this
> is also explained in the Reference Manual, so we don't have to duplicate
> that here.
> 
> Also add the definition of @PACKAGE@_DIR at the top, which is used in
> the targetinstall stage later.
> 
> Signed-off-by: Roland Hieber 
> ---
>  rules/templates/template-file-make | 45 ++
>  1 file changed, 9 insertions(+), 36 deletions(-)
> 
> diff --git a/rules/templates/template-file-make 
> b/rules/templates/template-file-make
> index ee2a612ef..4e322a39c 100644
> --- a/rules/templates/template-file-make
> +++ b/rules/templates/template-file-make
> @@ -4,25 +4,27 @@
>  #
>  # See CREDITS for details about who has contributed to this project.
>  #
>  # For further information about the PTXdist project and license conditions
>  # see the README file.
>  #
>  
>  #
>  # We provide this package
>  #
>  PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
>  
> +@PACKAGE@:= @package@
>  @PACKAGE@_VERSION:= @VERSION@
> +@PACKAGE@_DIR:= $(PKGDIR)/$(@PACKAGE@)-$(@PACKAGE@_VERSION)

No, if _DIR is defined then the default compile and install stages are
no longer no-ops. Change the example in targetinstall to
install_alternative.

>  
>  # 
> 
>  # Get
>  # 
> 
>  
>  #$(STATEDIR)/@package@.get:
>  #@$(call targetinfo)
>  #@$(call touch)
>  
>  # 
> 
>  # Extract
>  # 
> 
> @@ -44,72 +46,43 @@ PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
>  # 
> 
>  
>  #$(STATEDIR)/@package@.compile:
>  #@$(call targetinfo)
>  #@$(call touch)
>  
>  # 
> 
>  # Install
>  # 
> 
>  
>  $(STATEDIR)/@package@.install:
>   @$(call targetinfo)
> -
>  #
>  # TODO:
> -# If some of the files are required in root filesystem's build process, 
> install
> -# these files in the install stage. But use proper variables PTXdist supports
> -# to install files, instead of fixed paths. The following variables can be
> -# used:
> -#
> -# - $(PTXDIST_SYSROOT_TARGET) points to a directory tree
> -#   all target relevant libraries and header files are installed to. All
> -#   packages built for the target are searching in this directory tree for
> -#   header and library files. These files are for compile time only, not for
> -#   runtime!
> -#   Paths:
> -#- executables: $(PTXDIST_SYSROOT_TARGET)/bin
> -#- header files: $(PTXDIST_SYSROOT_TARGET)/include
> -#- libraries: $(PTXDIST_SYSROOT_TARGET)/lib
> -#
> -# - $(PTXDIST_SYSROOT_HOST) points to a directory tree all host relevant
> -#   executables, libraries and header files are installed to. All packages
> -#   built for the host are searching in this directory tree for executables,
> -#   header and library files.
> -#   Paths:
> -#- executables: $(PTXDIST_SYSROOT_HOST)/bin
> -#- header files: $(PTXDIST_SYSROOT_HOST)/include
> -#- libraries: $(PTXDIST_SYSROOT_HOST)/lib
> +# If files are needed at compile-time, install those files in the install
> +# stage, but use proper variables instead of fixed paths. See the section
> +# "Variables Reference" in the PTXdist Reference Manual for a list.

I think, this should at least mention _PKGDIR as the target directory.

Michael

>  #
> -# - $(PTXDIST_SYSROOT_CROSS) points to a directory tree all cross relevant
> -#   executables, libraries and header files are installed to. All packages
> -#   built for the host to create data for the target are searching in this
> -#   directory tree for executables, header and library files.
> -#   Paths:
> -#- executables: $(PTXDIST_SYSROOT_CROSS)/bin
> -#- header files: $(PTXDIST_SYSROOT_CROSS)/include
> -#- libraries: $(PTXDIST_SYSROOT_CROSS)/lib
> -#
> -#
> -# If no compile time files are reqired, skip this stage
> +# If no compile-time files are required, skip this stage.
>   @$(call touch)
>  
>  # 
> 
>  # Target-Install
>  # 
> 
>  
>  $(STATEDIR)/@package@.targetinstall:
>   @$(call targetinfo)
>  #
> -# TODO: To build your own package, if this step requires one
> +# TODO: for target packages, install files in the target root file system.
> +# Otherwise, remove this stage.
> +#
>  #@$(call install_init, @package@)
>  #@$(call 

Re: [ptxdist] [PATCH] kconfig: fix warnings on format

2018-12-12 Thread Michael Olbrich
On Wed, Dec 12, 2018 at 10:31:27AM +, Denis OSTERLAND wrote:
> Fixes warnings like:
> conf.c:79:3: warning: format not a string literal and no format arguments 
> [-Wformat-security]
>printf(_("aborted!\n\n"));
>^

Can you elaborate what triggers this? I don't get this warning here.
Please add this to the commit message.

In general, I'd prefer to follow upstream and drop the nls support
completely, but that won't happen until I update this stuff to the new
upstream version.

Michael

> Signed-off-by: Denis Osterland 
> ---
>  scripts/kconfig/lkc.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
> index 91ca126ea..6be5da701 100644
> --- a/scripts/kconfig/lkc.h
> +++ b/scripts/kconfig/lkc.h
> @@ -11,6 +11,8 @@
>  #ifndef KBUILD_NO_NLS
>  # include 
>  #else
> +# include 
> +__attribute_format_arg__(1)
>  static inline const char *gettext(const char *txt) { return txt; }
>  static inline void textdomain(const char *domainname) {}
>  static inline void bindtextdomain(const char *name, const char *dir) {}
> -- 
> 2.19.2
> 
> 
> 
> Diehl Connectivity Solutions GmbH
> Geschäftsführung: Horst Leonberger
> Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
> Nürnberg: HRB 32315
> ___
> 
> Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail 
> enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
> Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten 
> haben. Bitte loeschen Sie in diesem Fall die Nachricht.
> Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung 
> und/oder Publikation dieser E-Mail ist strengstens untersagt.
> The contents of the above mentioned e-mail is not legally binding. This 
> e-mail contains confidential and/or legally protected information. Please 
> inform us if you have received this e-mail by
> mistake and delete it in such a case. Each unauthorized reproduction, 
> disclosure, alteration, distribution and/or publication of this e-mail is 
> strictly prohibited. 
> 
> ___
> ptxdist mailing list
> ptxdist@pengutronix.de

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

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] template-src-linux-driver: Only install driver if selected

2018-12-12 Thread Michael Olbrich
On Wed, Dec 12, 2018 at 10:42:38AM +, Ian Abbott wrote:
> If a local package "foo-mod" for a Linux kernel module is selected by a
> local tristate configuration option PTXCONF_FOO_MOD, then based on the
> template for Linux drivers, it would include the following in its
> foo-mod.make file:
> 
> ifdef PTXCONF_FOO_MOD
> $(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/foo-mod.targetinstall
> endif
> 
> However, this rule will be invoked even if the PTXCONF_FOO_MOD option
> has been configured with the tristate option 'm' and has not been
> changed to 'y' by a selected_collectionconfig.  This causes the Linux
> kernel module to be built and installed unintentionally.  To prevent
> that happening, the above lines in the foo-mod.make file can be changed
> as follows (only the conditional test is changed):
> 
> ifeq ($(PTXCONF_FOO_MOD),y)
> $(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/foo-mod.targetinstall
> endif
> 
> This patch changes the template for Linux driver packages in accordance
> with the above change.

No, this break building if PTXCONF_FOO_MOD=m and no collection is selected.

Untested:

ifneq ($(filter foo-mod,$(PTX_PACKAGES_SELECTED)),)

Michael

> Signed-off-by: Ian Abbott 
> ---
>  rules/templates/template-src-linux-driver-make | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rules/templates/template-src-linux-driver-make 
> b/rules/templates/template-src-linux-driver-make
> index e06a22497..c970c43d6 100644
> --- a/rules/templates/template-src-linux-driver-make
> +++ b/rules/templates/template-src-linux-driver-make
> @@ -22,7 +22,7 @@ PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
>  @PACKAGE@_DIR:= $(BUILDDIR)/$(@PACKAGE@)
>  @PACKAGE@_LICENSE:= unknown
>  
> -ifdef PTXCONF_@PACKAGE@
> +ifeq ($(PTXCONF_@PACKAGE@),y)
>  $(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/@package@.targetinstall
>  endif
>  
> -- 
> 2.19.2
> 
> 
> ___
> ptxdist mailing list
> ptxdist@pengutronix.de

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

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] template-src-linux-driver: Only install driver if selected

2018-12-12 Thread Ian Abbott
If a local package "foo-mod" for a Linux kernel module is selected by a
local tristate configuration option PTXCONF_FOO_MOD, then based on the
template for Linux drivers, it would include the following in its
foo-mod.make file:

ifdef PTXCONF_FOO_MOD
$(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/foo-mod.targetinstall
endif

However, this rule will be invoked even if the PTXCONF_FOO_MOD option
has been configured with the tristate option 'm' and has not been
changed to 'y' by a selected_collectionconfig.  This causes the Linux
kernel module to be built and installed unintentionally.  To prevent
that happening, the above lines in the foo-mod.make file can be changed
as follows (only the conditional test is changed):

ifeq ($(PTXCONF_FOO_MOD),y)
$(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/foo-mod.targetinstall
endif

This patch changes the template for Linux driver packages in accordance
with the above change.

Signed-off-by: Ian Abbott 
---
 rules/templates/template-src-linux-driver-make | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules/templates/template-src-linux-driver-make 
b/rules/templates/template-src-linux-driver-make
index e06a22497..c970c43d6 100644
--- a/rules/templates/template-src-linux-driver-make
+++ b/rules/templates/template-src-linux-driver-make
@@ -22,7 +22,7 @@ PACKAGES-$(PTXCONF_@PACKAGE@) += @package@
 @PACKAGE@_DIR  := $(BUILDDIR)/$(@PACKAGE@)
 @PACKAGE@_LICENSE  := unknown
 
-ifdef PTXCONF_@PACKAGE@
+ifeq ($(PTXCONF_@PACKAGE@),y)
 $(STATEDIR)/kernel.targetinstall.post: $(STATEDIR)/@package@.targetinstall
 endif
 
-- 
2.19.2


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] kconfig: fix warnings on format

2018-12-12 Thread Denis OSTERLAND
Fixes warnings like:
conf.c:79:3: warning: format not a string literal and no format arguments 
[-Wformat-security]
   printf(_("aborted!\n\n"));
   ^

Signed-off-by: Denis Osterland 
---
 scripts/kconfig/lkc.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index 91ca126ea..6be5da701 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -11,6 +11,8 @@
 #ifndef KBUILD_NO_NLS
 # include 
 #else
+# include 
+__attribute_format_arg__(1)
 static inline const char *gettext(const char *txt) { return txt; }
 static inline void textdomain(const char *domainname) {}
 static inline void bindtextdomain(const char *name, const char *dir) {}
-- 
2.19.2



Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail 
enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten 
haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung 
und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail 
contains confidential and/or legally protected information. Please inform us if 
you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, 
disclosure, alteration, distribution and/or publication of this e-mail is 
strictly prohibited. 

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] setlocalversion: only use tags actually on current branch

2018-12-12 Thread Alexander Dahl
Hei hei,

On Wed, Dec 12, 2018 at 09:14:52AM +, Denis OSTERLAND wrote:
> This is more intuitive result,
> especially when more than just one branch gets merged.
> 
> Signed-off-by: Denis Osterland 

Acked-by: Alexander Dahl 

-- 
/"\ ASCII RIBBON | »With the first link, the chain is forged. The first
\ / CAMPAIGN | speech censured, the first thought forbidden, the
 X  AGAINST  | first freedom denied, chains us all irrevocably.«
/ \ HTML MAIL| (Jean-Luc Picard, quoting Judge Aaron Satie)


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

[ptxdist] [PATCH] setlocalversion: only use tags actually on current branch

2018-12-12 Thread Denis OSTERLAND
Consider following situation:

   tag C
 v
 A---B---C topic
/ \
   D---E---F---G---H master
   ^
 tag E

PTXDIST_BSP_AUTOVERSION at commit G will be E-2-g,
but at commit H it will be C-3-g.
With --first-parent it will be E-3-g.
This is more intuitive result,
especially when more than just one branch gets merged.

Signed-off-by: Denis Osterland 
---
 scripts/kernel/setlocalversion | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kernel/setlocalversion b/scripts/kernel/setlocalversion
index 3feb87dce..7eaaaf413 100755
--- a/scripts/kernel/setlocalversion
+++ b/scripts/kernel/setlocalversion
@@ -55,12 +55,12 @@ if head=`git ${git_abbrev} rev-parse --verify --short HEAD 
2>/dev/null`; then
 
# If we are at a tagged commit (like "ptxdist-2010.05.0"), we
# print it here
-   if atag="`git describe --exact-match 2>/dev/null`"; then
+   if atag="`git describe --first-parent --exact-match 2>/dev/null`"; then
echo "$atag" | awk -F- '{printf("%s", $(NF))}'
 
# If we are past a tagged commit (like 
"ptxdist-2010.03.0-130-g3c60777"),
# we pretty print it.
-   elif atag="`git ${git_abbrev} describe 2>/dev/null`"; then
+   elif atag="`git ${git_abbrev} describe --first-parent 2>/dev/null`"; 
then
echo "$atag" | awk -F- '{printf("%s-%05d-%s", 
$(NF-2),$(NF-1),$(NF))}'
 
# If we don't have a tag at all we print .??.?-?-g{commitish}.
-- 
2.19.2



Diehl Connectivity Solutions GmbH
Geschäftsführung: Horst Leonberger
Sitz der Gesellschaft: Nürnberg - Registergericht: Amtsgericht
Nürnberg: HRB 32315
___

Der Inhalt der vorstehenden E-Mail ist nicht rechtlich bindend. Diese E-Mail 
enthaelt vertrauliche und/oder rechtlich geschuetzte Informationen.
Informieren Sie uns bitte, wenn Sie diese E-Mail faelschlicherweise erhalten 
haben. Bitte loeschen Sie in diesem Fall die Nachricht.
Jede unerlaubte Form der Reproduktion, Bekanntgabe, Aenderung, Verteilung 
und/oder Publikation dieser E-Mail ist strengstens untersagt.
The contents of the above mentioned e-mail is not legally binding. This e-mail 
contains confidential and/or legally protected information. Please inform us if 
you have received this e-mail by
mistake and delete it in such a case. Each unauthorized reproduction, 
disclosure, alteration, distribution and/or publication of this e-mail is 
strictly prohibited. 

___
ptxdist mailing list
ptxdist@pengutronix.de