Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Jérôme Pouiller" <jezz@sysmic.org>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 09/15] fakedate: new package
Date: Tue, 22 Nov 2016 11:59:53 +0100	[thread overview]
Message-ID: <4522057.1MXXz9PRdM@sagittea> (raw)
In-Reply-To: <838b8e0f-1848-4f5b-c5cd-c8338c3324ff@mind.be>

Hello Arnoult,

On Saturday 19 November 2016 14:26:40 Arnout Vandecappelle wrote:
> 
> On 19-11-16 14:06, J?r?me Pouiller wrote:
> > On Saturday 19 November 2016 11:21:39 Arnout Vandecappelle wrote:
> >> On 18-11-16 10:10, J?r?me Pouiller wrote:
> > [...]
> >>> +    for i in "$@"; do
> >>> +        case $i in
> >>> +        -d|-[!-]*d|--date=*|-f|-[!-]*f|--file=*)
> >>
> >>  We use [^-] everywhere else.
> > 
> > It seems this syntax is a bashism. From glob(7): "POSIX has declared
> > the effect of a wildcard pattern "[^...]" to be undefined" (and I
> > confirm it does not work with dash)
> > 
> >>  Note that this pattern will also match something
> >> like -rfrood, i.e. --reference=frood. Fixing that becomes tricky without regexp.
> > 
> > hmmm... yes, it matches -rfrood (and it is what we want), but it does not
> > match --reference=frood, isn't?
> 
>  -rfrood and --reference=frood are the same thing, so no, we don't want it to
> match -rfrood.
> 
> 
> >>  Anyway, the -d option doesn't really need to be checked. 'date -d foo -d bar'
> >> will ignore the first -d, so things work OK. It's just that you get the spurious
> >> warning. So we could limit to checking -f, and limit to -f|--file=*). In that
> >> case, if someone passes something like -uf we'll get an error and the build will
> >> most likely terminate, so that particular error can be fixed.
> > 
> > You are right. However, since it may produce unexpected situation, I
> > prefer to identify precisely the cases where fakedate is used. 
> 
>  I would also prefer that, but I don't think it's possible without relying on
> regex. This could work:
> 
> if echo "$i" | grep -qE '^-([urI]*d|-date|[urI]*f|-file)'; then

From manual page, only option -u and -R do not take arguments. In add, we
also have to inhibit fakedate is --reference (or -r) is detected. So, I
think that the expression should be:

   '^-([uR]*d|-date|[uR]*f|-file|[uR]*r|--reference)'


-- 
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr

  parent reply	other threads:[~2016-11-22 10:59 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18  9:10 [Buildroot] [PATCH v2 00/15] Reproducible builds Jérôme Pouiller
2016-11-18  9:10 ` [Buildroot] [PATCH v2 01/15] reproducibility: generate SOURCE_DATE_EPOCH Jérôme Pouiller
2016-11-18 11:33   ` Thomas Petazzoni
2016-11-18 13:48     ` Jérôme Pouiller
2016-11-19  8:51     ` Arnout Vandecappelle
2016-11-19  9:51       ` Thomas Petazzoni
2016-11-19 10:01         ` Arnout Vandecappelle
2016-11-19  8:40   ` Arnout Vandecappelle
2016-11-18  9:10 ` [Buildroot] [PATCH v2 02/15] reproducible: fix DATE/TIME macros in toolchain-wrapper Jérôme Pouiller
2016-11-18 11:37   ` Thomas Petazzoni
2016-11-18 13:46     ` Jérôme Pouiller
2016-11-18  9:10 ` [Buildroot] [PATCH v2 03/15] reproducible: add '-n' to gzip invocations Jérôme Pouiller
2016-11-18 11:38   ` Thomas Petazzoni
2016-11-19  9:02   ` Arnout Vandecappelle
2016-11-19 13:49     ` Jérôme Pouiller
2016-11-18  9:10 ` [Buildroot] [PATCH v2 04/15] fs/tar: make results reproducible Jérôme Pouiller
2016-11-18 11:40   ` Thomas Petazzoni
2016-11-18 13:02     ` Jérôme Pouiller
2016-11-18 13:29       ` Thomas Petazzoni
2016-11-18 13:44         ` Jérôme Pouiller
2016-11-18 21:28           ` Thomas Petazzoni
2016-11-19  8:33             ` Arnout Vandecappelle
2016-11-19 13:56             ` Jérôme Pouiller
2016-11-19  9:12   ` Arnout Vandecappelle
2016-11-19 13:59     ` Jérôme Pouiller
2016-11-18  9:10 ` [Buildroot] [PATCH v2 05/15] reproducibility/linux: override build timestamp Jérôme Pouiller
2016-11-18 11:40   ` Thomas Petazzoni
2016-11-19 13:53     ` Jérôme Pouiller
2016-11-19 16:10       ` Arnout Vandecappelle
2016-11-18  9:10 ` [Buildroot] [PATCH v2 06/15] reproducibility/linux: inhibit build-id Jérôme Pouiller
2016-11-19  9:31   ` Arnout Vandecappelle
2016-11-19 14:04     ` Jérôme Pouiller
2016-11-18  9:10 ` [Buildroot] [PATCH v2 07/15] reproducibility/busybox: disable build timestamps Jérôme Pouiller
2016-11-18 11:41   ` Thomas Petazzoni
2016-11-19  9:32   ` Arnout Vandecappelle
2016-11-19  9:33   ` Arnout Vandecappelle
2016-11-18  9:10 ` [Buildroot] [PATCH v2 08/15] reproducible: lock modification times in $TARGET_DIR Jérôme Pouiller
2016-11-18 11:43   ` Thomas Petazzoni
2016-11-19  9:39   ` Arnout Vandecappelle
2016-11-18  9:10 ` [Buildroot] [PATCH v2 09/15] fakedate: new package Jérôme Pouiller
2016-11-18 11:48   ` Thomas Petazzoni
2016-11-19 13:24     ` Jérôme Pouiller
2016-11-19 10:21   ` Arnout Vandecappelle
2016-11-19 13:06     ` Jérôme Pouiller
2016-11-19 13:26       ` Arnout Vandecappelle
2016-11-19 13:38         ` Jérôme Pouiller
2016-11-22 10:59         ` Jérôme Pouiller [this message]
2016-11-18  9:10 ` [Buildroot] [PATCH v2 10/15] reproducible: enable fakedate Jérôme Pouiller
2016-11-18 11:49   ` Thomas Petazzoni
2016-11-18 13:53     ` Jérôme Pouiller
2016-11-19 10:22       ` Arnout Vandecappelle
2016-11-18  9:10 ` [Buildroot] [PATCH v2 11/15] python2: generate reproducible .pyc Jérôme Pouiller
2016-11-19 10:41   ` Arnout Vandecappelle
2016-11-19 12:35     ` Arnout Vandecappelle
2016-11-18  9:10 ` [Buildroot] [PATCH v2 12/15] python3: " Jérôme Pouiller
2016-11-18  9:10 ` [Buildroot] [PATCH v2 13/15] python2: remove full path from .pyc Jérôme Pouiller
2016-11-19 12:38   ` Arnout Vandecappelle
2016-11-18  9:10 ` [Buildroot] [PATCH v2 14/15] python3: " Jérôme Pouiller
2016-11-19 12:39   ` Arnout Vandecappelle
2016-11-18  9:10 ` [Buildroot] [PATCH v2 15/15] reproducible: improve help text Jérôme Pouiller
2016-11-19 12:45   ` Arnout Vandecappelle

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=4522057.1MXXz9PRdM@sagittea \
    --to=jezz@sysmic.org \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox