Re: [ptxdist] Check for specific libc version

2016-01-21 Thread Ladislav Michl
On Mon, Sep 28, 2015 at 12:29:02PM +0200, Michael Olbrich wrote:
> On Tue, Aug 18, 2015 at 12:30:41PM +0200, Ladislav Michl wrote:
[...]
> > This problem has side effect: as it seems the only variable used from
> > Versions.make is PTXDIST_FULLVERSION composed from PTXDIST_VERSION_FULL and
> > PTXCONF_PROJECT_VERSION where PTXCONF_PROJECT_VERSION is dumped anyway,
> > what about:
> 
> Be careful with making such statements. We have many cases where variables
> names are generated like this:
> 
> base  :=GCC
> version_var   :=$(base)_VERSION
> major :=$($(version_var)_MAJOR)
> 
> This example is completely fabricated, but I think you can see how just
> searching for the variable names is not enough.
> 
> In this case, I think the variables aren't used, but I'll need to review
> the code carefully before applying such a patch.

Gentle ping... I'm still holding this patch in my tree and built quite few
projects with it. So, here it is again for your consideration

From: Ladislav Michl 
Date: Tue, 18 Aug 2015 12:18:13 +0200
Subject: [PATCH] Remove unused Version.make

Signed-off-by: Ladislav Michl 
---
 rules/post/dump.make   |  2 +-
 rules/pre/Version.make | 27 ---
 2 files changed, 1 insertion(+), 28 deletions(-)
 delete mode 100644 rules/pre/Version.make

diff --git a/rules/post/dump.make b/rules/post/dump.make
index 9931ee4..bba46d7 100644
--- a/rules/post/dump.make
+++ b/rules/post/dump.make
@@ -26,7 +26,7 @@ M2B_DUMP_VARIABLES := \
PTXCONF_CONFIGFILE_VERSION \
PTXCONFIG PTXCONF_SYSROOT_TARGET PTXCONF_PROJECT 
PTXCONF_PROJECT_VERSION \
PTXDIST_WORKSPACE PTXDIST_TOPDIR \
-   PTXDIST PTXDIST_FULLVERSION \
+   PTXDIST PTXDIST_VERSION_FULL \
RULESDIR SCRIPTSDIR STATEDIR SYSROOT WORKDIR \
PACKAGES- PACKAGES-y PACKAGES-m
 
diff --git a/rules/pre/Version.make b/rules/pre/Version.make
deleted file mode 100644
index 5ebc827..000
--- a/rules/pre/Version.make
+++ /dev/null
@@ -1,27 +0,0 @@
-# -*-makefile-*-
-#
-# Copyright (C) 2003 by Marc Kleine-Budde 
-#   (C) 2008 by Wolfram Sang 
-#
-# 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.
-#
-
-GCC_VERSION:= $(call remove_quotes,$(PTXCONF_CROSSCHAIN_CHECK))
-_version_temp  := $(subst ., ,$(GCC_VERSION))
-GCC_VERSION_MAJOR  := $(word 1,$(_version_temp))
-GCC_VERSION_MINOR  := $(word 2,$(_version_temp))
-GCC_VERSION_MICRO  := $(word 3,$(_version_temp))
-
-GLIBC_VERSION  := $(call remove_quotes,$(PTXCONF_GLIBC_VERSION))
-_version_temp  := $(subst ., ,$(GLIBC_VERSION))
-GLIBC_VERSION_MAJOR:= $(word 1,$(_version_temp))
-GLIBC_VERSION_MINOR:= $(word 2,$(_version_temp))
-GLIBC_VERSION_MICRO:= $(word 3,$(_version_temp))
-
-PTXDIST_FULLVERSION:= $(call 
remove_quotes,ptxdist-$(PTXDIST_VERSION_FULL)$(PTXCONF_PROJECT_VERSION))
-_version_temp  :=
-
-# vim: syntax=make
-- 
2.1.4


___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH] openssh: bump version to 7.1p2

2016-01-21 Thread Michael Olbrich
On Thu, Jan 21, 2016 at 01:05:16AM +0100, Clemens Gruber wrote:
> Contains important security fixes for a client vulnerability, leaking
> private client user keys to a malicious server.
> 
> Changelog: http://www.openssh.com/txt/release-7.1p2
> 
> Signed-off-by: Clemens Gruber 

Thanks, applied.

Michael

> ---
>  rules/openssh.make | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rules/openssh.make b/rules/openssh.make
> index 3764ea6..5de481e 100644
> --- a/rules/openssh.make
> +++ b/rules/openssh.make
> @@ -17,8 +17,8 @@ PACKAGES-$(PTXCONF_OPENSSH) += openssh
>  #
>  # Paths and names
>  #
> -OPENSSH_VERSION  := 7.1p1
> -OPENSSH_MD5  := 8709736bc8a8c253bc4eeb4829888ca5
> +OPENSSH_VERSION  := 7.1p2
> +OPENSSH_MD5  := 4d8547670e2a220d5ef805ad9e47acf2
>  OPENSSH  := openssh-$(OPENSSH_VERSION)
>  OPENSSH_SUFFIX   := tar.gz
>  OPENSSH_URL  := \
> -- 
> 2.7.0
> 
> 
> ___
> 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] usb_modeswitch: version bump 2.2.1 -> 2.3.0

2016-01-21 Thread Ladislav Michl
Also update help to match official description.

Signed-off-by: Ladislav Michl 
---
 rules/usb-modeswitch.in   | 3 ++-
 rules/usb-modeswitch.make | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/rules/usb-modeswitch.in b/rules/usb-modeswitch.in
index 555d8a7..aaefd86 100644
--- a/rules/usb-modeswitch.in
+++ b/rules/usb-modeswitch.in
@@ -5,6 +5,7 @@ config USB_MODESWITCH
prompt "usb-modeswitch"
select LIBUSB
help
- Activating switchable USB devices on Linux.
+ USB_ModeSwitch is (surprise!) a mode switching tool
+ for controlling 'multi-mode' USB devices.
 
 # vim: set sw=8 ts=8 noet ft=kconfig:
diff --git a/rules/usb-modeswitch.make b/rules/usb-modeswitch.make
index d6a0a82..4ebf0e8 100644
--- a/rules/usb-modeswitch.make
+++ b/rules/usb-modeswitch.make
@@ -16,8 +16,8 @@ PACKAGES-$(PTXCONF_USB_MODESWITCH) += usb-modeswitch
 #
 # Paths and names
 #
-USB_MODESWITCH_VERSION := 2.2.1
-USB_MODESWITCH_MD5 := 46cd7fa937655ab2df616c1d5dfb121e
+USB_MODESWITCH_VERSION := 2.3.0
+USB_MODESWITCH_MD5 := 7faf7dccd50b3ca8aaa16fcb5bf0dc2f
 USB_MODESWITCH := usb-modeswitch-$(USB_MODESWITCH_VERSION)
 USB_MODESWITCH_SUFFIX  := tar.bz2
 USB_MODESWITCH_URL := 
http://www.draisberghof.de/usb_modeswitch/$(USB_MODESWITCH).$(USB_MODESWITCH_SUFFIX)
-- 
2.1.4


___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] Semicolon in filenames

2016-01-21 Thread Ladislav Michl
Now I'm going to be honest. Previous patch 'Add usb-modeswitch-data package'
break things - 'ptxdist images' fails as ':' is used as delimiter in perms file.
Patch bellow escapes semicolon on producer side, anyone cares about consumer?

ladis

diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh 
b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 5ba404e..8e6664b 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -209,6 +209,7 @@ install directory:
 
 install -m "${mod_nfs}" -d "${ndirs[@]/%/${dir}}" &&
 install -m "${mod}" -o "${usr}" -g "${grp}" -d "${pdirs[@]/%/${dir}}" &&
+dir="$(echo ${dir} | sed -e 's/[:]/\\:/g')" &&
 
 echo "f:${dir}:${usr}:${grp}:${mod}" >> "${pkg_xpkg_perms}" ||
 ptxd_install_error "install_dir failed!"
@@ -343,6 +344,9 @@ Usually, just remove the 6th parameter and everything works 
fine.
 # now change to requested user and group
 chown "${usr}:${grp}" "${pdirs[@]/%/${dst}}" &&
 
+# escape semicolon
+dst="$(echo ${dst} | sed -e 's/[:]/\\:/g')" &&
+
 echo "f:${dst}:${usr}:${grp}:${mod}" >> "${pkg_xpkg_perms}"
 }
 export -f ptxd_install_file_impl
@@ -413,6 +417,7 @@ install device node:
mknod -m "${mod}" "${d}" "${type}" ${major} ${minor} || return
 done &&
 chown "${usr}:${grp}" "${pdirs[@]/%/${dst}}" &&
+dst="$(echo ${dst} | sed -e 's/[:]/\\:/g')" &&
 
 echo "n:${dst}:${usr}:${grp}:${mod}:${type}:${major}:${minor}" >> 
"${pkg_xpkg_perms}"
 }

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH] Add usb-modeswitch-data package

2016-01-21 Thread Ladislav Michl
Signed-off-by: Ladislav Michl 
---
 rules/usb-modeswitch-data.in   | 10 ++
 rules/usb-modeswitch-data.make | 76 ++
 2 files changed, 86 insertions(+)
 create mode 100644 rules/usb-modeswitch-data.in
 create mode 100644 rules/usb-modeswitch-data.make

diff --git a/rules/usb-modeswitch-data.in b/rules/usb-modeswitch-data.in
new file mode 100644
index 000..ffaacda
--- /dev/null
+++ b/rules/usb-modeswitch-data.in
@@ -0,0 +1,10 @@
+## SECTION=shell_and_console
+
+config USB_MODESWITCH_DATA
+   tristate
+   prompt "usb-modeswitch-data"
+   depends on USB_MODESWITCH && UDEV
+   help
+ Device database and udev rules file for USB_ModeSwitch.
+
+# vim: set sw=8 ts=8 noet ft=kconfig:
diff --git a/rules/usb-modeswitch-data.make b/rules/usb-modeswitch-data.make
new file mode 100644
index 000..7b43f0f
--- /dev/null
+++ b/rules/usb-modeswitch-data.make
@@ -0,0 +1,76 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Ladislav Michl 
+#
+# 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_USB_MODESWITCH_DATA) += usb-modeswitch-data
+
+#
+# Paths and names
+#
+USB_MODESWITCH_DATA_VERSION:= 20160112
+USB_MODESWITCH_DATA_MD5:= 040d11138fc0a61b980d704ac3b4547f
+USB_MODESWITCH_DATA:= 
usb-modeswitch-data-$(USB_MODESWITCH_DATA_VERSION)
+USB_MODESWITCH_DATA_SUFFIX := tar.bz2
+USB_MODESWITCH_DATA_URL:= 
http://www.draisberghof.de/usb_modeswitch/$(USB_MODESWITCH_DATA).$(USB_MODESWITCH_DATA_SUFFIX)
+USB_MODESWITCH_DATA_SOURCE := 
$(SRCDIR)/$(USB_MODESWITCH_DATA).$(USB_MODESWITCH_DATA_SUFFIX)
+USB_MODESWITCH_DATA_DIR:= $(BUILDDIR)/$(USB_MODESWITCH_DATA)
+USB_MODESWITCH_DATA_LICENSE:= GPL-2.0
+
+# 
+# Nothing to Prepare
+# 
+$(STATEDIR)/usb-modeswitch-data.prepare:
+   @$(call targetinfo)
+   @$(call touch)
+
+# 
+# Nothing to Compile
+# 
+$(STATEDIR)/usb-modeswitch-data.compile:
+   @$(call targetinfo)
+   @$(call touch)
+
+# 
+# Nothing to Install
+# 
+$(STATEDIR)/usb-modeswitch-data.install:
+   @$(call targetinfo)
+   @$(call touch)
+
+# 
+# Target-Install
+# 
+$(STATEDIR)/usb-modeswitch-data.targetinstall:
+   @$(call targetinfo)
+
+   @$(call install_init, usb-modeswitch-data)
+   @$(call install_fixup, usb-modeswitch-data,PRIORITY,optional)
+   @$(call install_fixup, usb-modeswitch-data,SECTION,base)
+   @$(call install_fixup, usb-modeswitch-data,AUTHOR,"Ladislav Michl 
")
+   @$(call install_fixup, usb-modeswitch-data,DESCRIPTION,missing)
+
+   @$(call install_copy, usb-modeswitch-data, 0, 0, 0644, \
+   $(USB_MODESWITCH_DATA_DIR)/40-usb_modeswitch.rules, \
+/etc/udev/rules.d/40-usb_modeswitch.rules)
+
+   @find $(USB_MODESWITCH_DATA_DIR)/usb_modeswitch.d -type f -printf 
'%f\n' | \
+   while read file; do \
+   $(call install_copy, usb-modeswitch-data, 0, 0, 0644, \
+   $(USB_MODESWITCH_DATA_DIR)/usb_modeswitch.d/$$file, \
+   /usr/share/usb_modeswitch/$$file) \
+   done
+
+   @$(call install_finish, usb-modeswitch-data)
+
+   @$(call touch)
+
+# vim: syntax=make
-- 
2.1.4


___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] Semicolon in filenames

2016-01-21 Thread Uwe Kleine-König
Hello,

On Fri, Jan 22, 2016 at 01:31:37AM +0100, Ladislav Michl wrote:
> Now I'm going to be honest. Previous patch 'Add usb-modeswitch-data package'
> break things - 'ptxdist images' fails as ':' is used as delimiter in perms 
> file.
> Patch bellow escapes semicolon on producer side, anyone cares about consumer?
> 
>   ladis
> 
> diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh 
> b/scripts/lib/ptxd_make_xpkg_pkg.sh
> index 5ba404e..8e6664b 100644
> --- a/scripts/lib/ptxd_make_xpkg_pkg.sh
> +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
> @@ -209,6 +209,7 @@ install directory:
>  
>  install -m "${mod_nfs}" -d "${ndirs[@]/%/${dir}}" &&
>  install -m "${mod}" -o "${usr}" -g "${grp}" -d "${pdirs[@]/%/${dir}}" &&
> +dir="$(echo ${dir} | sed -e 's/[:]/\\:/g')" &&

why do you need the brackets? Doesn't s/:/\\:/g have the same effect?

As this is a bash script I assume you might save a few forks by using:

${dir//:/\\:}

(untested) instead.

>  
>  echo "f:${dir}:${usr}:${grp}:${mod}" >> "${pkg_xpkg_perms}" ||
>  ptxd_install_error "install_dir failed!"
> @@ -343,6 +344,9 @@ Usually, just remove the 6th parameter and everything 
> works fine.
>  # now change to requested user and group
>  chown "${usr}:${grp}" "${pdirs[@]/%/${dst}}" &&
>  
> +# escape semicolon

semicolon?

> +dst="$(echo ${dst} | sed -e 's/[:]/\\:/g')" &&
> +
>  echo "f:${dst}:${usr}:${grp}:${mod}" >> "${pkg_xpkg_perms}"
>  }
>  export -f ptxd_install_file_impl
> @@ -413,6 +417,7 @@ install device node:
>   mknod -m "${mod}" "${d}" "${type}" ${major} ${minor} || return
>  done &&
>  chown "${usr}:${grp}" "${pdirs[@]/%/${dst}}" &&
> +dst="$(echo ${dst} | sed -e 's/[:]/\\:/g')" &&
>  
>  echo "n:${dst}:${usr}:${grp}:${mod}:${type}:${major}:${minor}" >> 
> "${pkg_xpkg_perms}"
>  }

Best regards
Uwe

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

___
ptxdist mailing list
ptxdist@pengutronix.de