From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Clayton Shotwell <clayton.shotwell@rockwellcollins.com>
Cc: Clayton Shotwell <clayton.shotwell@collins.com>,
Matt Weber <matthew.weber@collins.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] support/download/post-process-helpers: adjust for older coreutils versions
Date: Fri, 11 Feb 2022 18:12:13 +0100 [thread overview]
Message-ID: <20220211171213.GD3752867@scaer> (raw)
In-Reply-To: <20220210232327.119488-1-clayton.shotwell@rockwellcollins.com>
Clayton, All,
On 2022-02-10 17:23 -0600, Clayton Shotwell spake thusly:
> From: Clayton Shotwell <clayton.shotwell@collins.com>
>
> Ran into an issue with the post_process_unpack function using "head -z"
> on a RHEL box which is using an older version or coreutils. The "-z"
> flag was added in coreutils v8.25 but my IT managed RHEL box is only
> using v8.22. The fix I have implemented relies on the null terminated
> list and sed to remove the first null character and everthing
> afterwards.
coreutils v8.25 were released 2016-01-20, more than 6 years ago now, and
v8.22 were released 2013-12-13, more than eight years ago.
That is sad that you have to use an up-to-date Buildroot (even one that
is not even yet released!) with such an old system... :-/
> Signed-off-by: Clayton Shotwell <clayton.shotwell@collins.com>
> ---
> support/download/helpers | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/support/download/helpers b/support/download/helpers
> index ab31e27..90a7d6c 100755
> --- a/support/download/helpers
> +++ b/support/download/helpers
> @@ -79,7 +79,7 @@ post_process_unpack() {
>
> mkdir "${dest}"
> tar -C "${dest}" --strip-components=1 -xzf "${tarball}"
> - one_file="$(find "${dest}" -type f -print0 |LC_ALL=C sort -z |head -z -n1 |tr -d "\0")"
> + one_file="$(find "${dest}" -type f -print0 |LC_ALL=C sort -z |sed 's/\x0.*//')"
As far as I know, hexa needs two digits to represent a byte, so \x00
http://sed.sourceforge.net/grabbag/tutorials/sedfaq.txt
4.2. How do I represent control-codes or nonprintable characters?
Several versions of sed support the notation \xHH, where "HH" are
two hex digits, 00-FF [...]
So I fixed that, and applied to master, with a rewokred commit log,
thanks.
Regards,
Yann E. MORIN.
> touch -r "${one_file}" "${dest}.timestamp"
> }
>
> --
> 1.8.3.1
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2022-02-11 17:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-10 23:23 [Buildroot] [PATCH] support/download/post-process-helpers: adjust for older coreutils versions Clayton Shotwell
2022-02-11 17:12 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220211171213.GD3752867@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=clayton.shotwell@collins.com \
--cc=clayton.shotwell@rockwellcollins.com \
--cc=matthew.weber@collins.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.