mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] scripts/migrate: use env to find sed
@ 2011-09-30  7:33 Andreas Bießmann
  2011-10-04 13:26 ` Michael Olbrich
  2011-10-05 16:54 ` [ptxdist] [PATCH v2] scripts/migrate: use autotools to insert working sed Andreas Bießmann
  0 siblings, 2 replies; 12+ messages in thread
From: Andreas Bießmann @ 2011-09-30  7:33 UTC (permalink / raw)
  To: ptxdist; +Cc: Andreas Bießmann

Some systems do not provide /bin/sed (e.g. OS X), use env to find sed in
$PATH.

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
This is a straight forward solution. Another solution is to preprocess the
scripts in installation phase and insert the values find by configure. This
could be necessary for handling e.g. gnu style argument splitting with '--' and
special configurations. For me the gnu coreutils will have a 'g' before the tool
(gchmod, gchown, ...) cause fink is installing it this way. I guess some other
BSD users may have some similar problems. But currently there is no framework to
pre-process some files in scripts directory. So here is the question, how could
we handle this?
I can think of some '*.in' files with special markers. They could be found by
simple globbing in installation phase. Any other solutions?

 scripts/migrate/migrate_platform |    2 +-
 scripts/migrate/migrate_ptx      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/migrate/migrate_platform b/scripts/migrate/migrate_platform
index 22a58e4..80b3b04 100755
--- a/scripts/migrate/migrate_platform
+++ b/scripts/migrate/migrate_platform
@@ -1,4 +1,4 @@
-#!/bin/sed -f
+#!/usr/bin/env sed -f
 
 #
 # from   : ptxdist-1.99.20
diff --git a/scripts/migrate/migrate_ptx b/scripts/migrate/migrate_ptx
index 896959a..78691b3 100755
--- a/scripts/migrate/migrate_ptx
+++ b/scripts/migrate/migrate_ptx
@@ -1,4 +1,4 @@
-#!/bin/sed -f
+#!/usr/bin/env sed -f
 
 #
 # from   : ptxdist-1.99.10
-- 
1.7.6.1


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ptxdist] [PATCH] scripts/migrate: use env to find sed
  2011-09-30  7:33 [ptxdist] [PATCH] scripts/migrate: use env to find sed Andreas Bießmann
@ 2011-10-04 13:26 ` Michael Olbrich
  2011-10-05 16:54 ` [ptxdist] [PATCH v2] scripts/migrate: use autotools to insert working sed Andreas Bießmann
  1 sibling, 0 replies; 12+ messages in thread
From: Michael Olbrich @ 2011-10-04 13:26 UTC (permalink / raw)
  To: ptxdist

Hi,

On Fri, Sep 30, 2011 at 09:33:57AM +0200, Andreas Bießmann wrote:
> Some systems do not provide /bin/sed (e.g. OS X), use env to find sed in
> $PATH.

but on Linux this results in:

/usr/bin/env: sed -f: No such file or directory
error: error occured during migration

It seems, adding extra arguments here is not portable.

Michael


> Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
> ---
> This is a straight forward solution. Another solution is to preprocess the
> scripts in installation phase and insert the values find by configure. This
> could be necessary for handling e.g. gnu style argument splitting with '--' and
> special configurations. For me the gnu coreutils will have a 'g' before the tool
> (gchmod, gchown, ...) cause fink is installing it this way. I guess some other
> BSD users may have some similar problems. But currently there is no framework to
> pre-process some files in scripts directory. So here is the question, how could
> we handle this?
> I can think of some '*.in' files with special markers. They could be found by
> simple globbing in installation phase. Any other solutions?
> 
>  scripts/migrate/migrate_platform |    2 +-
>  scripts/migrate/migrate_ptx      |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/migrate/migrate_platform b/scripts/migrate/migrate_platform
> index 22a58e4..80b3b04 100755
> --- a/scripts/migrate/migrate_platform
> +++ b/scripts/migrate/migrate_platform
> @@ -1,4 +1,4 @@
> -#!/bin/sed -f
> +#!/usr/bin/env sed -f
>  
>  #
>  # from   : ptxdist-1.99.20
> diff --git a/scripts/migrate/migrate_ptx b/scripts/migrate/migrate_ptx
> index 896959a..78691b3 100755
> --- a/scripts/migrate/migrate_ptx
> +++ b/scripts/migrate/migrate_ptx
> @@ -1,4 +1,4 @@
> -#!/bin/sed -f
> +#!/usr/bin/env sed -f
>  
>  #
>  # from   : ptxdist-1.99.10
> -- 
> 1.7.6.1
> 
> 
> -- 
> 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-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [ptxdist] [PATCH v2] scripts/migrate: use autotools to insert working sed
  2011-09-30  7:33 [ptxdist] [PATCH] scripts/migrate: use env to find sed Andreas Bießmann
  2011-10-04 13:26 ` Michael Olbrich
@ 2011-10-05 16:54 ` Andreas Bießmann
  2011-10-10 16:04   ` [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_* Michael Olbrich
  1 sibling, 1 reply; 12+ messages in thread
From: Andreas Bießmann @ 2011-10-05 16:54 UTC (permalink / raw)
  To: ptxdist; +Cc: Andreas Bießmann

Some systems do not provide /bin/sed (e.g. OS X), use autotools to
insert working sed version in migration scripts.

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
---
 .gitignore                          |    3 +
 Makefile.in                         |    2 +
 configure.ac                        |   11 +++
 scripts/migrate/migrate_platform    |   19 -----
 scripts/migrate/migrate_platform.in |   19 +++++
 scripts/migrate/migrate_ptx         |  147 -----------------------------------
 scripts/migrate/migrate_ptx.in      |  147 +++++++++++++++++++++++++++++++++++
 7 files changed, 182 insertions(+), 166 deletions(-)
 delete mode 100755 scripts/migrate/migrate_platform
 create mode 100644 scripts/migrate/migrate_platform.in
 delete mode 100755 scripts/migrate/migrate_ptx
 create mode 100644 scripts/migrate/migrate_ptx.in

diff --git a/.gitignore b/.gitignore
index 2548524..28f0be0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,6 @@ scripts/kconfig/zconf.hash.c
 scripts/kconfig/zconf.tab.c
 scripts/kconfig/*.o
 scripts/kconfig/lxdialog/*.o
+
+scripts/migrate/migrate_platform
+scripts/migrate/migrate_ptx
diff --git a/Makefile.in b/Makefile.in
index 5ee1383..124dfde 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -89,6 +89,8 @@ dist: dirty-check
 	md5sum "${project}.tar.bz2" > "${project}.tar.bz2.md5"
 
 distclean: clean
+	rm -fr scripts/migrate/migrate_platform
+	rm -fr scripts/migrate/migrate_ptx
 	rm -fr Makefile
 	rm -fr build-stamp
 	rm -fr config.log config.status autom4te.cache
diff --git a/configure.ac b/configure.ac
index 7a34e7a..44616df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -420,6 +420,17 @@ AC_MSG_RESULT([])
 AC_CONFIG_FILES( \
 	Makefile \
 )
+
+# preprocess some scripts to insert correct tools
+AC_CONFIG_FILES( \
+	[scripts/migrate/migrate_platform], \
+	[chmod +x scripts/migrate/migrate_platform] \
+)
+AC_CONFIG_FILES( \
+	[scripts/migrate/migrate_ptx], \
+	[chmod +x scripts/migrate/migrate_ptx] \
+)
+
 AC_OUTPUT
 AC_MSG_RESULT([])
 
diff --git a/scripts/migrate/migrate_platform b/scripts/migrate/migrate_platform
deleted file mode 100755
index 22a58e4..0000000
--- a/scripts/migrate/migrate_platform
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sed -f
-
-#
-# from   : ptxdist-1.99.20
-# to     : ptxdist-1.99.21
-# symbol : PTXCONF_COMPILER_PREFIX_UBOOT -> PTXCONF_COMPILER_PREFIX_BOOTLOADER
-# reason : more generic special compiler handling
-#
-s/^\(\(# \)\?PTXCONF\)_COMPILER_PREFIX_UBOOT\(.*$\)/\1_COMPILER_PREFIX_BOOTLOADER\3/
-
-#
-# from   : ptxdist-2010.05.2
-# to     : ptxdist-2010.06.0
-# symbol : IMAGE_UBI_VOLUME_SIZE -> IMAGE_UBI_ROOT_VOL_SIZE
-# symbol : IMAGE_UBIFS_MAX_LEB_COUNT -> IMAGE_UBIFS_ROOT_MAX_LEB_COUNT
-# reason : changes in ubi image generation, we are going to have more than one volumes
-#
-s/^\(\(# \)\?PTXCONF\)_IMAGE_UBI_VOLUME_SIZE\(.*$\)/\1_IMAGE_UBI_ROOT_VOL_SIZE\3/
-s/^\(\(# \)\?PTXCONF\)_IMAGE_UBIFS_MAX_LEB_COUNT\(.*$\)/\1_IMAGE_UBIFS_ROOT_MAX_LEB_COUNT\3/
diff --git a/scripts/migrate/migrate_platform.in b/scripts/migrate/migrate_platform.in
new file mode 100644
index 0000000..39c44d7
--- /dev/null
+++ b/scripts/migrate/migrate_platform.in
@@ -0,0 +1,19 @@
+#!@SED@ -f
+
+#
+# from   : ptxdist-1.99.20
+# to     : ptxdist-1.99.21
+# symbol : PTXCONF_COMPILER_PREFIX_UBOOT -> PTXCONF_COMPILER_PREFIX_BOOTLOADER
+# reason : more generic special compiler handling
+#
+s/^\(\(# \)\?PTXCONF\)_COMPILER_PREFIX_UBOOT\(.*$\)/\1_COMPILER_PREFIX_BOOTLOADER\3/
+
+#
+# from   : ptxdist-2010.05.2
+# to     : ptxdist-2010.06.0
+# symbol : IMAGE_UBI_VOLUME_SIZE -> IMAGE_UBI_ROOT_VOL_SIZE
+# symbol : IMAGE_UBIFS_MAX_LEB_COUNT -> IMAGE_UBIFS_ROOT_MAX_LEB_COUNT
+# reason : changes in ubi image generation, we are going to have more than one volumes
+#
+s/^\(\(# \)\?PTXCONF\)_IMAGE_UBI_VOLUME_SIZE\(.*$\)/\1_IMAGE_UBI_ROOT_VOL_SIZE\3/
+s/^\(\(# \)\?PTXCONF\)_IMAGE_UBIFS_MAX_LEB_COUNT\(.*$\)/\1_IMAGE_UBIFS_ROOT_MAX_LEB_COUNT\3/
diff --git a/scripts/migrate/migrate_ptx b/scripts/migrate/migrate_ptx
deleted file mode 100755
index 896959a..0000000
--- a/scripts/migrate/migrate_ptx
+++ /dev/null
@@ -1,147 +0,0 @@
-#!/bin/sed -f
-
-#
-# from   : ptxdist-1.99.10
-# to     : ptxdist-1.99.11
-# symbol : PTXCONF_BB_CONFIG_* -> PTXCONF_BUSYBOX_*
-# reason : consolidation of busybox config names
-#
-s/^\(\(# \)\?PTXCONF\)_BB_CONFIG_\(.*$\)/\1_BUSYBOX_\3/
-
-#
-# from   : ptxdist-1.99.10
-# to     : ptxdist-1.99.11
-# symbol : PTXCONF_BUSYBOX_FEATURE_GUNZIP_UNCOMPRESS	-> PTXCONF_BUSYBOX_FEATURE_SEAMLESS_Z
-# symbol : PTXCONF_BUSYBOX_FEATURE_TAR_GZIP		-> PTXCONF_BUSYBOX_FEATURE_SEAMLESS_GZ
-# symbol : PTXCONF_BUSYBOX_FEATURE_TAR_BZIP2		-> PTXCONF_BUSYBOX_FEATURE_SEAMLESS_BZ2
-# symbol : PTXCONF_BUSYBOX_FEATURE_TAR_LZMA		-> PTXCONF_BUSYBOX_FEATURE_SEAMLESS_LZMA
-# symbol : PTXCONF_BUSYBOX_FEATURE_TAR_COMPRESS		-> PTXCONF_BUSYBOX_FEATURE_SEAMLESS_Z
-# symbol : PTXCONF_BUSYBOX_FEATURE_DF_INODE		-> PTXCONF_BUSYBOX_FEATURE_DF_FANCY
-# symbol : PTXCONF_BUSYBOX_FEATURE_UNARCHIVE_TAPE	-> (gone)
-# symbol : PTXCONF_BUSYBOX_DEBUG_INIT			-> (gone)
-# symbol : PTXCONF_BUSYBOX_FETCHMAIL			-> (gone)
-# reason : update busybox: 1.10.4 -> 1.13.2
-#
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_GUNZIP_UNCOMPRESS\(.*$\)/\1_FEATURE_SEAMLESS_Z\3/
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_TAR_GZIP\(.*$\)/\1_FEATURE_SEAMLESS_GZ\3/
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_TAR_BZIP2\(.*$\)/\1_FEATURE_SEAMLESS_BZ2\3/
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_TAR_LZMA\(.*$\)/\1_FEATURE_SEAMLESS_LZMA\3/
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_TAR_COMPRESS\(.*$\)/\1_FEATURE_SEAMLESS_Z\3/
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_DF_INODE\(.*$\)/\1_FEATURE_DF_FANCY\3/
-
-#
-# from   : ptxdist-1.99.10
-# to     : ptxdist-1.99.11
-# symbol : PTXCONF_ROOTFS_UDEV__DEFAULT_RULES	-> PTXCONF_UDEV__DEFAULT_RULES
-# symbol : PTXCONF_ROOTFS_ETC_UDEV__CONF	-> PTXCONF_UDEV__ETC_CONF
-#
-s/^\(\(# \)\?PTXCONF_\)ROOTFS_UDEV__DEFAULT_RULES\(.*$\)/\1UDEV__DEFAULT_RULES\3/
-s/^\(\(# \)\?PTXCONF_\)ROOTFS_ETC_UDEV__CONF\(.*$\)/\1UDEV__ETC_CONF\3/
-
-#
-# from	 : ptxdist-1.99.19
-# to	 : ptxdist-1.99.20
-# symbol : BUSYBOX_GETOPT_LONG	-> BUSYBOX_LONG_OPTS
-# reason : update busybox 1.13.2 -> 1.15.2
-#
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_GETOPT_LONG\(.*$\)/\1_LONG_OPTS\3/
-
-#
-# from   : ptxdist-2010.01.0
-# to     : ptxdist-2010.02.0
-# symbol : BZIP2__*	-> BZIP2_*
-# reason : cleanup
-#
-s/^\(\(# \)\?PTXCONF_BZIP2_\)_\(.*$\)/\1\3/
-
-#
-# from   : ptxdist-2010.01.0
-# to     : ptxdist-2010.02.0
-# symbol : UDEV__*	-> UDEV_*
-# reason : cleanup
-#
-s/^\(\(# \)\?PTXCONF_UDEV_\)_\(.*$\)/\1\3/
-
-#
-# from   : ptxdist-2010.03.0
-# to     : ptxdist-2010.04.0
-# symbol : BUSYBOX_APP_DHCPRELAY -> BUSYBOX_DHCPRELAY
-# symbol : BUSYBOX_APP_DUMPLEASES -> BUSYBOX_DUMPLEASES
-# symbol : BUSYBOX_APP_UDHCPC -> BUSYBOX_UDHCPC
-# symbol : BUSYBOX_APP_UDHCPD -> BUSYBOX_UDHCPD
-# reason : update busybox 1.15.3-> 1.16.1
-#
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_APP_DHCPRELAY\(.*$\)/\1_DHCPRELAY\3/
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_APP_DUMPLEASES\(.*$\)/\1_DUMPLEASES\3/
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_APP_UDHCPC\(.*$\)/\1_UDHCPC\3/
-s/^\(\(# \)\?PTXCONF_BUSYBOX\)_APP_UDHCPD\(.*$\)/\1_UDHCPD\3/
-
-#
-# from   : ptxdist-2010.04.0
-# to     : ptxdist-2010.05.0
-# symbol : LIBPCRE__*			-> LIBPCRE_
-# reason : consolidation of config symbols
-#
-s/^\(\(# \)\?PTXCONF_LIBPCRE_\)_\(.*$\)/\1\3/
-
-#
-# from   : ptxdist-2010.04.0
-# to     : ptxdist-2010.05.0
-# symbol : INETUTILS_SYSLOGD_STARTSRCIPT	-> INETUTILS_SYSLOGD_STARTSCRIPT
-# reason : typo
-#
-s/^\(\(# \)\?PTXCONF_INETUTILS_SYSLOGD\)\(_STARTSRCIPT$\)/\1_STARTSCRIPT/
-
-#
-# from   : ptxdist-2010.05.0
-# to     : ptxdist-2010.06.0
-# symbol : GLIB__*			-> GLIB_
-# reason : consolidation of config symbols
-#
-s/^\(\(# \)\?PTXCONF_GLIB_\)_\(.*$\)/\1\3/
-
-#
-# symbol : SUDO__SENDMAIL		-> SUDO_USE_SENDMAIL
-# symbol : SUDO__ETC_SUDOERS		-> SUDO_INSTALL_ETC_SUDOERS
-# reason : consolidation of config symbols
-#
-s/^\(\(# \)\?PTXCONF_SUDO_\)_\(SENDMAIL\)/\1USE_\3/
-s/^\(\(# \)\?PTXCONF_SUDO_\)_\(ETC_SUDOERS\)/\1INSTALL_\3/
-
-#
-# symbol : UDEV_EXTRA_MODEM_MODESWITCH	-> UDEV_EXTRA_MOBILE_ACTION_MODESWITCH
-# reason : upstream name changed
-#
-s/^\(\(# \)\?PTXCONF_UDEV_EXTRA_\)MODEM\(_MODESWITCH.*$\)/\1MOBILE_ACTION\3/
-
-#
-# symbol : INITMETHOD_BBINIT_LINK_*	-> *_BBINIT_LINK
-# reason : move rc.d links to the package with the init script
-#
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_ACPID/\1ACPID_BBINIT_LINK/
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_\(INETD\|SYSLOGD\)\(.*\)$/\1BUSYBOX_\3_BBINIT_LINK\4\n\1INETUTILS_\3_BBINIT_LINK\4/
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_NFSD/\1NFSUTILS_NFSD_BBINIT_LINK/
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_NTP\>/\1NTP_NTPD_BBINIT_LINK/
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_NTPC\>/\1NTP_NTPC_BBINIT_LINK/
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_RSYNCD\(.*\)$/\1RSYNC_BBINIT_LINK\3\n\1RSYNC3_BBINIT_LINK\3/
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_SMARTD/\1SMARTMONTOOLS_BBINIT_LINK/
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_SYSLOG_NG/\1SYSLOGNG_BBINIT_LINK/
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_TELNETD\(.*\)$/\1UTELNETD_BBINIT_LINK\3\n\1BUSYBOX_TELNETD_BBINIT_LINK\3/
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_\(CROND\|HWCLOCK\|TELNETD\)/\1BUSYBOX_\3_BBINIT_LINK/
-s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_\(ALSA_UTILS\|APACHE2\|AT\|CHRONY\|CONNMAN\|CVS\|DBUS\|DIBBLER_[A-Z]*\|DNSMASQ\|DROPBEAR\|FAKE_OVERLAYFS\|LIGHTTPD\|LVM2\|MYSQL\|NTPCLIENT\|OPENSSH\|PORTMAP\|PPPD\|PROFTPD\|PUREFTPD\|RC_ONCE\|SAMBA\|SPLASHUTILS\|THTTPD\|UDEV\)/\1\3_BBINIT_LINK/
-
-#
-# symbol : PTXCONF_BLUEZ_LIBS -> PTXCONF_BLUEZ
-# reason : upstream merged bluez-libs + bluez-utils -> bluez
-#          PTXCONF_BLUEZ_UTILS is unchanged
-#
-s/^\(\(# \)\?PTXCONF_BLUEZ\)_LIBS/\1/
-
-#
-# from   : ptxdist-2011.01.0
-# to     : ptxdist-2011.02.0
-# symbol : OWFS__*			-> OWFS_
-# reason : consolidation of config symbols
-#
-s/^\(\(# \)\?PTXCONF_OWFS_\)_\(.*$\)/\1\3/
-
diff --git a/scripts/migrate/migrate_ptx.in b/scripts/migrate/migrate_ptx.in
new file mode 100644
index 0000000..157403a
--- /dev/null
+++ b/scripts/migrate/migrate_ptx.in
@@ -0,0 +1,147 @@
+#!@SED@ -f
+
+#
+# from   : ptxdist-1.99.10
+# to     : ptxdist-1.99.11
+# symbol : PTXCONF_BB_CONFIG_* -> PTXCONF_BUSYBOX_*
+# reason : consolidation of busybox config names
+#
+s/^\(\(# \)\?PTXCONF\)_BB_CONFIG_\(.*$\)/\1_BUSYBOX_\3/
+
+#
+# from   : ptxdist-1.99.10
+# to     : ptxdist-1.99.11
+# symbol : PTXCONF_BUSYBOX_FEATURE_GUNZIP_UNCOMPRESS	-> PTXCONF_BUSYBOX_FEATURE_SEAMLESS_Z
+# symbol : PTXCONF_BUSYBOX_FEATURE_TAR_GZIP		-> PTXCONF_BUSYBOX_FEATURE_SEAMLESS_GZ
+# symbol : PTXCONF_BUSYBOX_FEATURE_TAR_BZIP2		-> PTXCONF_BUSYBOX_FEATURE_SEAMLESS_BZ2
+# symbol : PTXCONF_BUSYBOX_FEATURE_TAR_LZMA		-> PTXCONF_BUSYBOX_FEATURE_SEAMLESS_LZMA
+# symbol : PTXCONF_BUSYBOX_FEATURE_TAR_COMPRESS		-> PTXCONF_BUSYBOX_FEATURE_SEAMLESS_Z
+# symbol : PTXCONF_BUSYBOX_FEATURE_DF_INODE		-> PTXCONF_BUSYBOX_FEATURE_DF_FANCY
+# symbol : PTXCONF_BUSYBOX_FEATURE_UNARCHIVE_TAPE	-> (gone)
+# symbol : PTXCONF_BUSYBOX_DEBUG_INIT			-> (gone)
+# symbol : PTXCONF_BUSYBOX_FETCHMAIL			-> (gone)
+# reason : update busybox: 1.10.4 -> 1.13.2
+#
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_GUNZIP_UNCOMPRESS\(.*$\)/\1_FEATURE_SEAMLESS_Z\3/
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_TAR_GZIP\(.*$\)/\1_FEATURE_SEAMLESS_GZ\3/
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_TAR_BZIP2\(.*$\)/\1_FEATURE_SEAMLESS_BZ2\3/
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_TAR_LZMA\(.*$\)/\1_FEATURE_SEAMLESS_LZMA\3/
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_TAR_COMPRESS\(.*$\)/\1_FEATURE_SEAMLESS_Z\3/
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_FEATURE_DF_INODE\(.*$\)/\1_FEATURE_DF_FANCY\3/
+
+#
+# from   : ptxdist-1.99.10
+# to     : ptxdist-1.99.11
+# symbol : PTXCONF_ROOTFS_UDEV__DEFAULT_RULES	-> PTXCONF_UDEV__DEFAULT_RULES
+# symbol : PTXCONF_ROOTFS_ETC_UDEV__CONF	-> PTXCONF_UDEV__ETC_CONF
+#
+s/^\(\(# \)\?PTXCONF_\)ROOTFS_UDEV__DEFAULT_RULES\(.*$\)/\1UDEV__DEFAULT_RULES\3/
+s/^\(\(# \)\?PTXCONF_\)ROOTFS_ETC_UDEV__CONF\(.*$\)/\1UDEV__ETC_CONF\3/
+
+#
+# from	 : ptxdist-1.99.19
+# to	 : ptxdist-1.99.20
+# symbol : BUSYBOX_GETOPT_LONG	-> BUSYBOX_LONG_OPTS
+# reason : update busybox 1.13.2 -> 1.15.2
+#
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_GETOPT_LONG\(.*$\)/\1_LONG_OPTS\3/
+
+#
+# from   : ptxdist-2010.01.0
+# to     : ptxdist-2010.02.0
+# symbol : BZIP2__*	-> BZIP2_*
+# reason : cleanup
+#
+s/^\(\(# \)\?PTXCONF_BZIP2_\)_\(.*$\)/\1\3/
+
+#
+# from   : ptxdist-2010.01.0
+# to     : ptxdist-2010.02.0
+# symbol : UDEV__*	-> UDEV_*
+# reason : cleanup
+#
+s/^\(\(# \)\?PTXCONF_UDEV_\)_\(.*$\)/\1\3/
+
+#
+# from   : ptxdist-2010.03.0
+# to     : ptxdist-2010.04.0
+# symbol : BUSYBOX_APP_DHCPRELAY -> BUSYBOX_DHCPRELAY
+# symbol : BUSYBOX_APP_DUMPLEASES -> BUSYBOX_DUMPLEASES
+# symbol : BUSYBOX_APP_UDHCPC -> BUSYBOX_UDHCPC
+# symbol : BUSYBOX_APP_UDHCPD -> BUSYBOX_UDHCPD
+# reason : update busybox 1.15.3-> 1.16.1
+#
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_APP_DHCPRELAY\(.*$\)/\1_DHCPRELAY\3/
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_APP_DUMPLEASES\(.*$\)/\1_DUMPLEASES\3/
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_APP_UDHCPC\(.*$\)/\1_UDHCPC\3/
+s/^\(\(# \)\?PTXCONF_BUSYBOX\)_APP_UDHCPD\(.*$\)/\1_UDHCPD\3/
+
+#
+# from   : ptxdist-2010.04.0
+# to     : ptxdist-2010.05.0
+# symbol : LIBPCRE__*			-> LIBPCRE_
+# reason : consolidation of config symbols
+#
+s/^\(\(# \)\?PTXCONF_LIBPCRE_\)_\(.*$\)/\1\3/
+
+#
+# from   : ptxdist-2010.04.0
+# to     : ptxdist-2010.05.0
+# symbol : INETUTILS_SYSLOGD_STARTSRCIPT	-> INETUTILS_SYSLOGD_STARTSCRIPT
+# reason : typo
+#
+s/^\(\(# \)\?PTXCONF_INETUTILS_SYSLOGD\)\(_STARTSRCIPT$\)/\1_STARTSCRIPT/
+
+#
+# from   : ptxdist-2010.05.0
+# to     : ptxdist-2010.06.0
+# symbol : GLIB__*			-> GLIB_
+# reason : consolidation of config symbols
+#
+s/^\(\(# \)\?PTXCONF_GLIB_\)_\(.*$\)/\1\3/
+
+#
+# symbol : SUDO__SENDMAIL		-> SUDO_USE_SENDMAIL
+# symbol : SUDO__ETC_SUDOERS		-> SUDO_INSTALL_ETC_SUDOERS
+# reason : consolidation of config symbols
+#
+s/^\(\(# \)\?PTXCONF_SUDO_\)_\(SENDMAIL\)/\1USE_\3/
+s/^\(\(# \)\?PTXCONF_SUDO_\)_\(ETC_SUDOERS\)/\1INSTALL_\3/
+
+#
+# symbol : UDEV_EXTRA_MODEM_MODESWITCH	-> UDEV_EXTRA_MOBILE_ACTION_MODESWITCH
+# reason : upstream name changed
+#
+s/^\(\(# \)\?PTXCONF_UDEV_EXTRA_\)MODEM\(_MODESWITCH.*$\)/\1MOBILE_ACTION\3/
+
+#
+# symbol : INITMETHOD_BBINIT_LINK_*	-> *_BBINIT_LINK
+# reason : move rc.d links to the package with the init script
+#
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_ACPID/\1ACPID_BBINIT_LINK/
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_\(INETD\|SYSLOGD\)\(.*\)$/\1BUSYBOX_\3_BBINIT_LINK\4\n\1INETUTILS_\3_BBINIT_LINK\4/
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_NFSD/\1NFSUTILS_NFSD_BBINIT_LINK/
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_NTP\>/\1NTP_NTPD_BBINIT_LINK/
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_NTPC\>/\1NTP_NTPC_BBINIT_LINK/
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_RSYNCD\(.*\)$/\1RSYNC_BBINIT_LINK\3\n\1RSYNC3_BBINIT_LINK\3/
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_SMARTD/\1SMARTMONTOOLS_BBINIT_LINK/
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_SYSLOG_NG/\1SYSLOGNG_BBINIT_LINK/
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_TELNETD\(.*\)$/\1UTELNETD_BBINIT_LINK\3\n\1BUSYBOX_TELNETD_BBINIT_LINK\3/
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_\(CROND\|HWCLOCK\|TELNETD\)/\1BUSYBOX_\3_BBINIT_LINK/
+s/^\(\(# \)\?PTXCONF_\)INITMETHOD_BBINIT_LINK_\(ALSA_UTILS\|APACHE2\|AT\|CHRONY\|CONNMAN\|CVS\|DBUS\|DIBBLER_[A-Z]*\|DNSMASQ\|DROPBEAR\|FAKE_OVERLAYFS\|LIGHTTPD\|LVM2\|MYSQL\|NTPCLIENT\|OPENSSH\|PORTMAP\|PPPD\|PROFTPD\|PUREFTPD\|RC_ONCE\|SAMBA\|SPLASHUTILS\|THTTPD\|UDEV\)/\1\3_BBINIT_LINK/
+
+#
+# symbol : PTXCONF_BLUEZ_LIBS -> PTXCONF_BLUEZ
+# reason : upstream merged bluez-libs + bluez-utils -> bluez
+#          PTXCONF_BLUEZ_UTILS is unchanged
+#
+s/^\(\(# \)\?PTXCONF_BLUEZ\)_LIBS/\1/
+
+#
+# from   : ptxdist-2011.01.0
+# to     : ptxdist-2011.02.0
+# symbol : OWFS__*			-> OWFS_
+# reason : consolidation of config symbols
+#
+s/^\(\(# \)\?PTXCONF_OWFS_\)_\(.*$\)/\1\3/
+
-- 
1.7.6.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*
  2011-10-05 16:54 ` [ptxdist] [PATCH v2] scripts/migrate: use autotools to insert working sed Andreas Bießmann
@ 2011-10-10 16:04   ` Michael Olbrich
  2011-10-11 10:16     ` andreas
  0 siblings, 1 reply; 12+ messages in thread
From: Michael Olbrich @ 2011-10-10 16:04 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich

this fixes migrate on systems where sed is not in /bin/ (e.g. OS X).

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---

Hi,

what about this? It's less invasive than using autoconf.

mol

 scripts/libptxdist.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/libptxdist.sh b/scripts/libptxdist.sh
index 48dbd64..4385566 100644
--- a/scripts/libptxdist.sh
+++ b/scripts/libptxdist.sh
@@ -156,12 +156,12 @@ ptxd_kconfig_migrate() {
 	local part="${1}"
 	local assistent="${PTX_MIGRATEDIR}/migrate_${part}"
 
-	if [ \! -x "${assistent}" ]; then
+	if [ \! -f "${assistent}" ]; then
 		return 0
 	fi
 
 	cp -- ".config" ".config.old" || return
-	"${assistent}" ".config.old" > ".config"
+	sed -f "${assistent}" ".config.old" > ".config"
 	retval=$?
 
 	if [ $retval -ne 0 ]; then
-- 
1.7.6.3


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*
  2011-10-10 16:04   ` [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_* Michael Olbrich
@ 2011-10-11 10:16     ` andreas
  2011-10-14 14:04       ` Michael Olbrich
  0 siblings, 1 reply; 12+ messages in thread
From: andreas @ 2011-10-11 10:16 UTC (permalink / raw)
  To: ptxdist

Dear Michael,

On Mon, 10 Oct 2011 18:04:56 +0200, Michael Olbrich wrote:
> this fixes migrate on systems where sed is not in /bin/ (e.g. OS X).
>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> ---
>
> Hi,
>
> what about this? It's less invasive than using autoconf.

Well, your solution fixes my problem with sed in shebang.
But how about wrong sed in path? Or some other problems mentioned
previously ([1], [2]).

I see two solutions here:
  a) fix the surrounding/environment to match always the needs of 
ptxdist
  b) fix ptxdist to use specific environment

a) seems easy to the ptxdist developers cause everyone using ptxdist 
needs
to take care about his environment. That would include setting special 
PATH,
write wrapper scripts or even forking ptxdist [1]. That could be really
frustrating and scare off some users.

b) seems easy to the users of pxdist, cause the configure/build/install
of ptxdist takes care about correct versions of tools.

I tend to vote for b) here. We do not want to scare off users but we do 
want a
reliable, repeatable build process with easy to use interface.
We even do it like this currently (e.g. 'configure --with-python=...'). 
But the
tools found by configure are not taken into account when using ptxdist 
[2].

Another solution compared to yours and my 'PATCH v2' could be some 
configuration-file
which is written in installation phase and provide the environment for 
ptxdist.
This could have another benefit, we can easily change the configuration 
for ptxdist
at run-time without modifying a lot of installed scripts. I imagine ...

---8<---
~# ptxdist PTX_PYTHON=/whereever/i/installed/my/cool/python go
--->8---

So another poll here ;). We have

  a) the full autotools pre-processing of several scripts/rules ... 
files
     ('PATCH v2' solution)
  b) some (tbd) configuration file which could be sourced by ptxdist and 
provide
     the environment for all the scripts/make-file snippets a.s.o
  c) your solution (fix for sed with wrong path in sheebang)

I would like to force a discussion now cause I have a bunch of patches 
on stack
using the same approach as a) to fix the chmod problem mentioned in [1] 
and [3]. It
would be great if we could get some conclusion soon so I could prepare 
my patchset.

There is one other point for me that would prefer the a) solution. We 
(sh|c)ould use
more of the autotools foo to have a cleaner install directory (e.g. why 
installing all
the files necessary to build the kconfig tools?).

best regards

Andreas Bießmann

[1] http://www.mail-archive.com/ptxdist@pengutronix.de/msg01899.html
[2] http://www.mail-archive.com/ptxdist@pengutronix.de/msg04264.html
[3] 
http://git.pengutronix.de/?p=mkl/ptxdist.git;a=commitdiff;h=f6479b400b402815db9c74980557a492eaf26fe3

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*
  2011-10-11 10:16     ` andreas
@ 2011-10-14 14:04       ` Michael Olbrich
  2011-10-14 15:03         ` Bernhard Walle
  2011-10-17  6:54         ` Andreas Bießmann
  0 siblings, 2 replies; 12+ messages in thread
From: Michael Olbrich @ 2011-10-14 14:04 UTC (permalink / raw)
  To: ptxdist

Hi,

On Tue, Oct 11, 2011 at 12:16:09PM +0200, andreas@biessmann.de wrote:
> On Mon, 10 Oct 2011 18:04:56 +0200, Michael Olbrich wrote:
> >this fixes migrate on systems where sed is not in /bin/ (e.g. OS X).
> >
> >Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> >---
> >
> >Hi,
> >
> >what about this? It's less invasive than using autoconf.
> 
> Well, your solution fixes my problem with sed in shebang.
> But how about wrong sed in path? Or some other problems mentioned
> previously ([1], [2]).
> 
> I see two solutions here:
>  a) fix the surrounding/environment to match always the needs of
> ptxdist
>  b) fix ptxdist to use specific environment
> 
> a) seems easy to the ptxdist developers cause everyone using ptxdist
> needs
> to take care about his environment. That would include setting
> special PATH,
> write wrapper scripts or even forking ptxdist [1]. That could be really
> frustrating and scare off some users.
> 
> b) seems easy to the users of pxdist, cause the configure/build/install
> of ptxdist takes care about correct versions of tools.
> 
> I tend to vote for b) here. We do not want to scare off users but we
> do want a
> reliable, repeatable build process with easy to use interface.
> We even do it like this currently (e.g. 'configure
> --with-python=...'). But the
> tools found by configure are not taken into account when using
> ptxdist [2].
> 
> Another solution compared to yours and my 'PATCH v2' could be some
> configuration-file
> which is written in installation phase and provide the environment
> for ptxdist.
> This could have another benefit, we can easily change the
> configuration for ptxdist
> at run-time without modifying a lot of installed scripts. I imagine ...
> 
> ---8<---
> ~# ptxdist PTX_PYTHON=/whereever/i/installed/my/cool/python go
> --->8---
> 
> So another poll here ;). We have
> 
>  a) the full autotools pre-processing of several scripts/rules ...
> files
>     ('PATCH v2' solution)
>  b) some (tbd) configuration file which could be sourced by ptxdist
> and provide
>     the environment for all the scripts/make-file snippets a.s.o
>  c) your solution (fix for sed with wrong path in sheebang)
> 
> I would like to force a discussion now cause I have a bunch of
> patches on stack
> using the same approach as a) to fix the chmod problem mentioned in
> [1] and [3]. It
> would be great if we could get some conclusion soon so I could
> prepare my patchset.

I've been thinking about this for some time. I don't like preprocessing a
lot of files, because that makes developing ptxdist a pain. What I've
considered, but not implemented (no time so far) is the following:

create scripts/ptxdist_tools.sh.in that is preprocessed with autoconf the
stuff like this:
[...]
export PTXDIST_PYTHON="@PYTHON@"
export PTXDIST_SED="@SED@"
[...]

I think it should be sourced right before scripts/ptxdist_vars.sh.
Then use "${PTXDIST_PYTHON}", "${PTXDIST_SED}" everywhere. This way we get
the tools detected by configure without preprocessing a lot of files. Do
you think this can handle all the Problems you have?
However, making sure everything is using the correct tools will not be
easy. Replacing the calls in ptxdist is easy, but there are many packages
that call these tools directly, so they must be patched.
So far I've not had the time to even start this, but I'd be happy to apply
such patches.
I'll apply my patch for now. We can change 'sed' to '${PTXDIST_SED}' again
later.

Hmmm, I just had another idea: How about fixing the environment in ptxdist:

mkdir <TMP_BIN>/
ln -s @PYTHON@ <TMP_BIN>/python
ln -s @SED@ <TMP_BIN>/sed
[...]
export PATH=<TMP_BIN>:$PATH
[...]

just do this as early as possible in ptxdist and PATH will provide the
correct tools. Do you think that could work?

> There is one other point for me that would prefer the a) solution.
> We (sh|c)ould use
> more of the autotools foo to have a cleaner install directory (e.g.
> why installing all
> the files necessary to build the kconfig tools?).

Because it's easier and doesn't hurt? :-) Send patches...

Regards,
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-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*
  2011-10-14 14:04       ` Michael Olbrich
@ 2011-10-14 15:03         ` Bernhard Walle
  2011-10-17  7:06           ` Andreas Bießmann
  2011-10-17  6:54         ` Andreas Bießmann
  1 sibling, 1 reply; 12+ messages in thread
From: Bernhard Walle @ 2011-10-14 15:03 UTC (permalink / raw)
  To: ptxdist

Hi,

* Michael Olbrich <m.olbrich@pengutronix.de> [2011-10-14 16:04]:
> Hmmm, I just had another idea: How about fixing the environment in ptxdist:
> 
> mkdir <TMP_BIN>/
> ln -s @PYTHON@ <TMP_BIN>/python
> ln -s @SED@ <TMP_BIN>/sed
> [...]
> export PATH=<TMP_BIN>:$PATH
> [...]
> 
> just do this as early as possible in ptxdist and PATH will provide the
> correct tools. Do you think that could work?

That's what I'm doing in the Arch Linux ptxdist package [1]. Arch Linux
has /usr/bin/python pointing to /usr/bin/python3 instead of python2.
There's a configure flag for ptxdist and Python, but that doesn't work.

I sent a patch [2], but even that patch doesn't fix everything (there's
still some ipkg problem). Because I was too lazy I changed it that way
(modifying PATH).

I'm doing 

----- 8< --------
export PATH=$(dirname $(readlink -f "$0")):$PATH
----- >8 --------

which inclues /usr/lib/ptxdist-2011.xx.y/bin into $PATH and that works.
It's not really nice, but I think it's better than patching lots of
tools. And having scripts as executable programs is IMO still better
than having to call the interpreter manually (which is necessary with
your $PTXDIST_SED approach.


Regards,
Bernhard

[1] http://aur.archlinux.org/packages.php?ID=49649
[2] http://www.mail-archive.com/ptxdist@pengutronix.de/msg04264.html

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*
  2011-10-14 14:04       ` Michael Olbrich
  2011-10-14 15:03         ` Bernhard Walle
@ 2011-10-17  6:54         ` Andreas Bießmann
  2011-10-17  7:10           ` Andreas Bießmann
  1 sibling, 1 reply; 12+ messages in thread
From: Andreas Bießmann @ 2011-10-17  6:54 UTC (permalink / raw)
  To: ptxdist

Dear Michael,

On Fri, 14 Oct 2011 16:04:34 +0200, Michael Olbrich wrote:
> Hi,
>
> On Tue, Oct 11, 2011 at 12:16:09PM +0200, andreas@biessmann.de wrote:
>> On Mon, 10 Oct 2011 18:04:56 +0200, Michael Olbrich wrote:

<snip>

> I've been thinking about this for some time. I don't like 
> preprocessing a
> lot of files, because that makes developing ptxdist a pain. What I've
> considered, but not implemented (no time so far) is the following:
>
> create scripts/ptxdist_tools.sh.in that is preprocessed with autoconf 
> the
> stuff like this:
> [...]
> export PTXDIST_PYTHON="@PYTHON@"
> export PTXDIST_SED="@SED@"
> [...]
>
> I think it should be sourced right before scripts/ptxdist_vars.sh.
> Then use "${PTXDIST_PYTHON}", "${PTXDIST_SED}" everywhere. This way 
> we get
> the tools detected by configure without preprocessing a lot of files. 
> Do
> you think this can handle all the Problems you have?

Yes it will ...

> However, making sure everything is using the correct tools will not 
> be
> easy. Replacing the calls in ptxdist is easy, but there are many 
> packages
> that call these tools directly, so they must be patched.

But I also see your objections and therefore favour your second 
suggestion.

> So far I've not had the time to even start this, but I'd be happy to 
> apply
> such patches.
> I'll apply my patch for now. We can change 'sed' to '${PTXDIST_SED}' 
> again
> later.

That is ok for me, at least it will fix my problem with migration 
scripts.

> Hmmm, I just had another idea: How about fixing the environment in 
> ptxdist:
>
> mkdir <TMP_BIN>/
> ln -s @PYTHON@ <TMP_BIN>/python
> ln -s @SED@ <TMP_BIN>/sed
> [...]
> export PATH=<TMP_BIN>:$PATH
> [...]
>
> just do this as early as possible in ptxdist and PATH will provide 
> the
> correct tools. Do you think that could work?

Yes I think so. It should be done while installing the 
scripts/rules/a.s.o and 'export PATH=<TMP_BIN>:$PATH' should be added to 
ptxdist_vars.sh.
So how about naming <TMP_BIN> $PTXDIST_BIN and placing it at 
${PTXDIST_TOPDIR}/bin? If that is ok I will provide patches to get 
ptxdist working on OS X these days.

>> There is one other point for me that would prefer the a) solution.
>> We (sh|c)ould use
>> more of the autotools foo to have a cleaner install directory (e.g.
>> why installing all
>> the files necessary to build the kconfig tools?).
>
> Because it's easier and doesn't hurt? :-) Send patches...

Will do.

best regards

Andreas Bießmann


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*
  2011-10-14 15:03         ` Bernhard Walle
@ 2011-10-17  7:06           ` Andreas Bießmann
  2011-10-17 10:45             ` Bernhard Walle
  0 siblings, 1 reply; 12+ messages in thread
From: Andreas Bießmann @ 2011-10-17  7:06 UTC (permalink / raw)
  To: ptxdist

Dear Bernhard,

On Fri, 14 Oct 2011 17:03:43 +0200, Bernhard Walle wrote:
> Hi,
>
> * Michael Olbrich <m.olbrich@pengutronix.de> [2011-10-14 16:04]:
>> Hmmm, I just had another idea: How about fixing the environment in 
>> ptxdist:
>>
>> mkdir <TMP_BIN>/
>> ln -s @PYTHON@ <TMP_BIN>/python
>> ln -s @SED@ <TMP_BIN>/sed
>> [...]
>> export PATH=<TMP_BIN>:$PATH
>> [...]
>>
>> just do this as early as possible in ptxdist and PATH will provide 
>> the
>> correct tools. Do you think that could work?
>
> That's what I'm doing in the Arch Linux ptxdist package [1]. Arch 
> Linux
> has /usr/bin/python pointing to /usr/bin/python3 instead of python2.
> There's a configure flag for ptxdist and Python, but that doesn't 
> work.
>
> I sent a patch [2], but even that patch doesn't fix everything 
> (there's
> still some ipkg problem). Because I was too lazy I changed it that 
> way
> (modifying PATH).
>
> I'm doing
>
> ----- 8< --------
> export PATH=$(dirname $(readlink -f "$0")):$PATH
> ----- >8 --------
>
> which inclues /usr/lib/ptxdist-2011.xx.y/bin into $PATH and that 
> works.

Seems to me the best solution for our problem. I think the current 
discussion is leading to some PTXDIST_BINDIR directory with links to the 
respective tools.

> It's not really nice, but I think it's better than patching lots of
> tools. And having scripts as executable programs is IMO still better
> than having to call the interpreter manually (which is necessary with
> your $PTXDIST_SED approach.

But how should we handle a script's sheebang? If we require the 
scripts/migrate tools to be executable scripts we need to preprocess the 
scripts to adopt the sheebang to e.g. $PTXDIST_BINDIR. I think it is 
much more portable to have the shell scripts kall the interpreter with 
the respective configuration, e.g. $PTXDIST_BINDIR/sed -f 
scripts/migrate/migrate_platform.

> Regards,
> Bernhard
>
> [1] http://aur.archlinux.org/packages.php?ID=49649
> [2] http://www.mail-archive.com/ptxdist@pengutronix.de/msg04264.html

best regards

Andreas Bießmann

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*
  2011-10-17  6:54         ` Andreas Bießmann
@ 2011-10-17  7:10           ` Andreas Bießmann
  0 siblings, 0 replies; 12+ messages in thread
From: Andreas Bießmann @ 2011-10-17  7:10 UTC (permalink / raw)
  To: ptxdist

On Mon, 17 Oct 2011 08:54:04 +0200, Andreas Bießmann wrote:
> Dear Michael,
>
> On Fri, 14 Oct 2011 16:04:34 +0200, Michael Olbrich wrote:
>> Hi,
>>
>> On Tue, Oct 11, 2011 at 12:16:09PM +0200, andreas@biessmann.de 
>> wrote:
>>> On Mon, 10 Oct 2011 18:04:56 +0200, Michael Olbrich wrote:

<snip>

> So how about naming <TMP_BIN> $PTXDIST_BIN and placing it at
> ${PTXDIST_TOPDIR}/bin? If that is ok I will provide patches to get
> ptxdist working on OS X these days.

Ok, PTXDIST_BIN is already assigned (should really check before sending 
...). So how about PTSXIDST_TMPBIN/_BINDIR/... or renaming the 
PTXDIST_BIN in url_check plugins to some other name.

best regards

Andreas Bießmann

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*
  2011-10-17  7:06           ` Andreas Bießmann
@ 2011-10-17 10:45             ` Bernhard Walle
  2011-10-17 12:53               ` Michael Olbrich
  0 siblings, 1 reply; 12+ messages in thread
From: Bernhard Walle @ 2011-10-17 10:45 UTC (permalink / raw)
  To: ptxdist

* Andreas Bießmann <andreas@biessmann.de> [2011-10-17 09:06]:
> 
> >It's not really nice, but I think it's better than patching lots of
> >tools. And having scripts as executable programs is IMO still better
> >than having to call the interpreter manually (which is necessary with
> >your $PTXDIST_SED approach.
> 
> But how should we handle a script's sheebang? If we require the
> scripts/migrate tools to be executable scripts we need to preprocess
> the scripts to adopt the sheebang to e.g. $PTXDIST_BINDIR. I think
> it is much more portable to have the shell scripts kall the
> interpreter with the respective configuration, e.g.
> $PTXDIST_BINDIR/sed -f scripts/migrate/migrate_platform.

sed is the only exception I know that requires an argument.
#!/usr/bin/env perl, #!/usr/bin/env python, #!/usr/bin/env ruby works.


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_*
  2011-10-17 10:45             ` Bernhard Walle
@ 2011-10-17 12:53               ` Michael Olbrich
  0 siblings, 0 replies; 12+ messages in thread
From: Michael Olbrich @ 2011-10-17 12:53 UTC (permalink / raw)
  To: ptxdist

On Mon, Oct 17, 2011 at 12:45:26PM +0200, Bernhard Walle wrote:
> * Andreas Bießmann <andreas@biessmann.de> [2011-10-17 09:06]:
> > 
> > >It's not really nice, but I think it's better than patching lots of
> > >tools. And having scripts as executable programs is IMO still better
> > >than having to call the interpreter manually (which is necessary with
> > >your $PTXDIST_SED approach.
> > 
> > But how should we handle a script's sheebang? If we require the
> > scripts/migrate tools to be executable scripts we need to preprocess
> > the scripts to adopt the sheebang to e.g. $PTXDIST_BINDIR. I think
> > it is much more portable to have the shell scripts kall the
> > interpreter with the respective configuration, e.g.
> > $PTXDIST_BINDIR/sed -f scripts/migrate/migrate_platform.
> 
> sed is the only exception I know that requires an argument.
> #!/usr/bin/env perl, #!/usr/bin/env python, #!/usr/bin/env ruby works.

Well, awk as well, but as long as it's in ptxdist itself, that's not a
problem. We can call the program directly and let the shell do the rest.
I'm more concerned about scripts called in various packages. And sed and
awk are rarely called via a shebang.

Regards,
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-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-10-17 12:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-30  7:33 [ptxdist] [PATCH] scripts/migrate: use env to find sed Andreas Bießmann
2011-10-04 13:26 ` Michael Olbrich
2011-10-05 16:54 ` [ptxdist] [PATCH v2] scripts/migrate: use autotools to insert working sed Andreas Bießmann
2011-10-10 16:04   ` [ptxdist] [PATCH] libptxdist: explicitly use sed to run migrate_* Michael Olbrich
2011-10-11 10:16     ` andreas
2011-10-14 14:04       ` Michael Olbrich
2011-10-14 15:03         ` Bernhard Walle
2011-10-17  7:06           ` Andreas Bießmann
2011-10-17 10:45             ` Bernhard Walle
2011-10-17 12:53               ` Michael Olbrich
2011-10-17  6:54         ` Andreas Bießmann
2011-10-17  7:10           ` Andreas Bießmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox