All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Improve tar check if bsdtar is installed
@ 2014-05-30 15:44 Heiko Abraham
  2014-05-30 17:16 ` Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Heiko Abraham @ 2014-05-30 15:44 UTC (permalink / raw)
  To: buildroot

If bsdtar is installed, fix script error for tar version detection.
Set tar version to 'invalid' to trigger rebuild of 'host-tar'.
---
 support/dependencies/check-host-tar.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh
index 2cfc2b3..b5818f0 100755
--- a/support/dependencies/check-host-tar.sh
+++ b/support/dependencies/check-host-tar.sh
@@ -14,10 +14,18 @@ fi
 # Output of 'tar --version' examples:
 # tar (GNU tar) 1.15.1
 # tar (GNU tar) 1.25
+# bsdtar 2.8.3 - libarchive 2.8.3
 version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'`
 major=`echo "$version" | cut -d. -f1`
 minor=`echo "$version" | cut -d. -f2`
 bugfix=`echo "$version" | cut -d. -f3`
+version_bsd=`$tar --version | grep 'bsdtar'`
+if [ ! -z "${version_bsd}" ] ; then 
+  # mark as invalid tar version
+  major=1
+  minor=14
+  bugfix=1
+fi
 
 # Minimal version = 1.17 (previous versions do not correctly unpack archives
 # containing hard-links if the --strip-components option is used).
-- 
1.8.5.2 (Apple Git-48)

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

* [Buildroot] [PATCH] Improve tar check if bsdtar is installed
  2014-05-30 15:44 [Buildroot] [PATCH] Improve tar check if bsdtar is installed Heiko Abraham
@ 2014-05-30 17:16 ` Yann E. MORIN
  2014-05-30 17:40   ` Heiko Abraham
  2014-05-30 18:24 ` Thomas De Schampheleire
  2014-05-30 22:10 ` [Buildroot] [PATCH v2] " Heiko Abraham
  2 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2014-05-30 17:16 UTC (permalink / raw)
  To: buildroot

Heiko, All,

On 2014-05-30 17:44 +0200, Heiko Abraham spake thusly:
> If bsdtar is installed, fix script error for tar version detection.
> Set tar version to 'invalid' to trigger rebuild of 'host-tar'.
> ---
>  support/dependencies/check-host-tar.sh | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh
> index 2cfc2b3..b5818f0 100755
> --- a/support/dependencies/check-host-tar.sh
> +++ b/support/dependencies/check-host-tar.sh
> @@ -14,10 +14,18 @@ fi
>  # Output of 'tar --version' examples:
>  # tar (GNU tar) 1.15.1
>  # tar (GNU tar) 1.25
> +# bsdtar 2.8.3 - libarchive 2.8.3
>  version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'`
>  major=`echo "$version" | cut -d. -f1`
>  minor=`echo "$version" | cut -d. -f2`
>  bugfix=`echo "$version" | cut -d. -f3`
> +version_bsd=`$tar --version | grep 'bsdtar'`
> +if [ ! -z "${version_bsd}" ] ; then 

if [ -n "${version_bsd}" ]; then

> +  # mark as invalid tar version
> +  major=1
> +  minor=14
> +  bugfix=1

Any reason you used 1.14.1? To be obvious that this is an invalid
version, I'd have set it to something like:
    major=0
    minor=0

Alternatively, since our minimal supported version is 1.17, I'd have
used something like:
    major=1
    minor=16

And, no need to set bugfix, it;s not used in the check.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] Improve tar check if bsdtar is installed
  2014-05-30 17:16 ` Yann E. MORIN
@ 2014-05-30 17:40   ` Heiko Abraham
  2014-05-30 17:48     ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Heiko Abraham @ 2014-05-30 17:40 UTC (permalink / raw)
  To: buildroot

Dear Yann,

Am 30.05.2014 um 19:16 schrieb Yann E. MORIN <yann.morin.1998@free.fr>:
> On 2014-05-30 17:44 +0200, Heiko Abraham spake thusly:
>> ...
> if [ -n "${version_bsd}" ]; then
>> +  # mark as invalid tar version
>> +  major=1
>> +  minor=14
>> +  bugfix=1
> 
> Any reason you used 1.14.1? To be obvious that this is an invalid
> version, I'd have set it to something like:
>    major=0
>    minor=0

yes, we can should version 1.16.0 instead version 1.14.1.  This may be better.
With this suggestion I will prepare a new patch.

Thanks,
Heiko

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

* [Buildroot] [PATCH] Improve tar check if bsdtar is installed
  2014-05-30 17:40   ` Heiko Abraham
@ 2014-05-30 17:48     ` Yann E. MORIN
  0 siblings, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-05-30 17:48 UTC (permalink / raw)
  To: buildroot

Heiko, All,

On 2014-05-30 19:40 +0200, Heiko Abraham spake thusly:
> Am 30.05.2014 um 19:16 schrieb Yann E. MORIN <yann.morin.1998@free.fr>:
> > On 2014-05-30 17:44 +0200, Heiko Abraham spake thusly:
> >> ...
> > if [ -n "${version_bsd}" ]; then
> >> +  # mark as invalid tar version
> >> +  major=1
> >> +  minor=14
> >> +  bugfix=1
> > 
> > Any reason you used 1.14.1? To be obvious that this is an invalid
> > version, I'd have set it to something like:
> >    major=0
> >    minor=0
> 
> yes, we can should version 1.16.0 instead version 1.14.1.  This may be better.
> With this suggestion I will prepare a new patch.

I think using 0.0 is even better: it is clearly an invalid version.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] Improve tar check if bsdtar is installed
  2014-05-30 15:44 [Buildroot] [PATCH] Improve tar check if bsdtar is installed Heiko Abraham
  2014-05-30 17:16 ` Yann E. MORIN
@ 2014-05-30 18:24 ` Thomas De Schampheleire
  2014-05-30 22:10 ` [Buildroot] [PATCH v2] " Heiko Abraham
  2 siblings, 0 replies; 8+ messages in thread
From: Thomas De Schampheleire @ 2014-05-30 18:24 UTC (permalink / raw)
  To: buildroot

Heiko Abraham <abrahamh@web.de> schreef:
>If bsdtar is installed, fix script error for tar version detection.
>Set tar version to 'invalid' to trigger rebuild of 'host-tar'.
>---
> support/dependencies/check-host-tar.sh | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
>diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh
>index 2cfc2b3..b5818f0 100755
>--- a/support/dependencies/check-host-tar.sh
>+++ b/support/dependencies/check-host-tar.sh
>@@ -14,10 +14,18 @@ fi
> # Output of 'tar --version' examples:
> # tar (GNU tar) 1.15.1
> # tar (GNU tar) 1.25
>+# bsdtar 2.8.3 - libarchive 2.8.3
> version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'`
> major=`echo "$version" | cut -d. -f1`
> minor=`echo "$version" | cut -d. -f2`
> bugfix=`echo "$version" | cut -d. -f3`
>+version_bsd=`$tar --version | grep 'bsdtar'`
>+if [ ! -z "${version_bsd}" ] ; then 
>+  # mark as invalid tar version
>+  major=1
>+  minor=14
>+  bugfix=1
>+fi

Could you clarify what the problem is with bsdtar and add this as a comment in the patch?

Also, the magic 1.14.1 is pretty odd, you could just as well take 0.0.0

Best regards,
Thomas

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

* [Buildroot] [PATCH v2] Improve tar check if bsdtar is installed
  2014-05-30 15:44 [Buildroot] [PATCH] Improve tar check if bsdtar is installed Heiko Abraham
  2014-05-30 17:16 ` Yann E. MORIN
  2014-05-30 18:24 ` Thomas De Schampheleire
@ 2014-05-30 22:10 ` Heiko Abraham
  2014-05-30 22:18   ` Yann E. MORIN
  2014-05-31  7:40   ` Peter Korsgaard
  2 siblings, 2 replies; 8+ messages in thread
From: Heiko Abraham @ 2014-05-30 22:10 UTC (permalink / raw)
  To: buildroot

If bsdtar is installed, fix script error for tar version detection.

bsdtar not provide all expected command line (long) options
like "--hard-dereference". To ensure compatibly mark version
of tar as 'invalid' and trigger rebuild of 'host-tar'.

Signed-off-by: Heiko Abraham <abrahamh@web.de>
---
 support/dependencies/check-host-tar.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh
index 2cfc2b3..932d3c4 100755
--- a/support/dependencies/check-host-tar.sh
+++ b/support/dependencies/check-host-tar.sh
@@ -14,10 +14,17 @@ fi
 # Output of 'tar --version' examples:
 # tar (GNU tar) 1.15.1
 # tar (GNU tar) 1.25
+# bsdtar 2.8.3 - libarchive 2.8.3
 version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'`
 major=`echo "$version" | cut -d. -f1`
 minor=`echo "$version" | cut -d. -f2`
 bugfix=`echo "$version" | cut -d. -f3`
+version_bsd=`$tar --version | grep 'bsdtar'`
+if [ ! -z "${version_bsd}" ] ; then 
+  # mark as invalid version - not all command line options are available
+  major=0
+  minor=0
+fi
 
 # Minimal version = 1.17 (previous versions do not correctly unpack archives
 # containing hard-links if the --strip-components option is used).
-- 
1.8.5.2 (Apple Git-48)

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

* [Buildroot] [PATCH v2] Improve tar check if bsdtar is installed
  2014-05-30 22:10 ` [Buildroot] [PATCH v2] " Heiko Abraham
@ 2014-05-30 22:18   ` Yann E. MORIN
  2014-05-31  7:40   ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Yann E. MORIN @ 2014-05-30 22:18 UTC (permalink / raw)
  To: buildroot

Heiko, All,

On 2014-05-31 00:10 +0200, Heiko Abraham spake thusly:
> If bsdtar is installed, fix script error for tar version detection.
> 
> bsdtar not provide all expected command line (long) options

bsdtar _does_ not provide [...]

> like "--hard-dereference". To ensure compatibly mark version
> of tar as 'invalid' and trigger rebuild of 'host-tar'.
> 
> Signed-off-by: Heiko Abraham <abrahamh@web.de>

Except for the minor nit in the commit log, which can be fixed by
Peter when he commits:

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  support/dependencies/check-host-tar.sh | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/support/dependencies/check-host-tar.sh b/support/dependencies/check-host-tar.sh
> index 2cfc2b3..932d3c4 100755
> --- a/support/dependencies/check-host-tar.sh
> +++ b/support/dependencies/check-host-tar.sh
> @@ -14,10 +14,17 @@ fi
>  # Output of 'tar --version' examples:
>  # tar (GNU tar) 1.15.1
>  # tar (GNU tar) 1.25
> +# bsdtar 2.8.3 - libarchive 2.8.3
>  version=`$tar --version | head -n 1 | sed 's/^.*\s\([0-9]\+\.\S\+\).*$/\1/'`
>  major=`echo "$version" | cut -d. -f1`
>  minor=`echo "$version" | cut -d. -f2`
>  bugfix=`echo "$version" | cut -d. -f3`
> +version_bsd=`$tar --version | grep 'bsdtar'`
> +if [ ! -z "${version_bsd}" ] ; then 
> +  # mark as invalid version - not all command line options are available
> +  major=0
> +  minor=0
> +fi
>  
>  # Minimal version = 1.17 (previous versions do not correctly unpack archives
>  # containing hard-links if the --strip-components option is used).
> -- 
> 1.8.5.2 (Apple Git-48)
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH v2] Improve tar check if bsdtar is installed
  2014-05-30 22:10 ` [Buildroot] [PATCH v2] " Heiko Abraham
  2014-05-30 22:18   ` Yann E. MORIN
@ 2014-05-31  7:40   ` Peter Korsgaard
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Korsgaard @ 2014-05-31  7:40 UTC (permalink / raw)
  To: buildroot

>>>>> "Heiko" == Heiko Abraham <abrahamh@web.de> writes:

 > If bsdtar is installed, fix script error for tar version detection.
 > bsdtar not provide all expected command line (long) options
 > like "--hard-dereference". To ensure compatibly mark version
 > of tar as 'invalid' and trigger rebuild of 'host-tar'.

 > Signed-off-by: Heiko Abraham <abrahamh@web.de>

Committed to next, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2014-05-31  7:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-30 15:44 [Buildroot] [PATCH] Improve tar check if bsdtar is installed Heiko Abraham
2014-05-30 17:16 ` Yann E. MORIN
2014-05-30 17:40   ` Heiko Abraham
2014-05-30 17:48     ` Yann E. MORIN
2014-05-30 18:24 ` Thomas De Schampheleire
2014-05-30 22:10 ` [Buildroot] [PATCH v2] " Heiko Abraham
2014-05-30 22:18   ` Yann E. MORIN
2014-05-31  7:40   ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.