mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] use ^_ as separator in perms files
Date: Fri, 29 Jul 2016 09:39:09 +0200	[thread overview]
Message-ID: <20160729073909.GK31919@pengutronix.de> (raw)
In-Reply-To: <20160728231204.GA4086@localhost.localdomain>

On Fri, Jul 29, 2016 at 01:12:04AM +0200, Ladislav Michl wrote:
> On Wed, Jul 27, 2016 at 12:59:39PM +0200, Michael Olbrich wrote:
> > On Mon, Jul 18, 2016 at 01:22:17PM +0200, Ladislav Michl wrote:
> > > Change separator to allow ':' in filenames.
> > 
> > I like it in general. But I think we should explicitly error out if we come
> > across an old command file (NF == 1). And tell the user to run "ptxdist
> > clean root" or something like that.
> [snip]
> 
> Do you mean something like this (untested):

I think it needs to be added to ptxd_dopermissions as well. I think the
stuff below is called first, but it's optional. Maybe some funtion:

ptxd_check_obsolete_perm() {
    if ! grep -q -P "\x1F" "${@}" ; then
	ptxd_bailout "obsolete perm file detected, please run 'ptxdist clean root'"
    fi
}

And call it from both. And note the '-P'. Otherwise the \x is not
interpreted.

Michael

> diff --git a/scripts/lib/ptxd_make_image_fix_permissions.sh b/scripts/lib/ptxd_make_image_fix_permissions.sh
> index c1cfdba..d4bf6b0 100644
> --- a/scripts/lib/ptxd_make_image_fix_permissions.sh
> +++ b/scripts/lib/ptxd_make_image_fix_permissions.sh
> @@ -34,6 +34,11 @@ ptxd_make_image_fix_permissions_check() {
>      local ifs_orig="${IFS}"
>      IFS="\x1F"
>  
> +    # previous PTXdist versions used ":" as a separator
> +    if ! grep -q "${IFS}" "${ptxd_reply_perm_files[@]}"; then
> +       ptxd_bailout "obsolete perm file detected, please run 'ptxdist clean root'"
> +    fi
> +
>      # just care about dev-nodes, for now
>      egrep -h "^[n]${IFS}" "${ptxd_reply_perm_files[@]}" |
>      while read kind file uid_should gid_should prm_should type major_should minor_should; do
> 
> _______________________________________________
> 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

  reply	other threads:[~2016-07-29  7:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 11:22 Ladislav Michl
2016-07-27 10:59 ` Michael Olbrich
2016-07-28 23:12   ` Ladislav Michl
2016-07-29  7:39     ` Michael Olbrich [this message]
2016-07-31 21:10       ` [ptxdist] [PATCH v2] " Ladislav Michl
2016-08-03 10:23         ` Ladislav Michl
2016-08-04  6:51           ` Michael Olbrich
2016-08-15 14:10             ` Ladislav Michl
2016-08-15 14:54               ` Michael Olbrich
2016-08-15 16:21                 ` Ladislav Michl

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=20160729073909.GK31919@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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