From: Ed Bartosh <ed.bartosh@linux.intel.com>
To: Kristian Amlie <kristian.amlie@mender.io>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: Contents of non-rootfs partitions
Date: Thu, 24 Nov 2016 15:23:15 +0200 [thread overview]
Message-ID: <20161124132315.GA14497@linux.intel.com> (raw)
In-Reply-To: <fa1edaed-1498-160e-2015-8b7882c04877@mender.io>
On Thu, Nov 24, 2016 at 08:38:46AM +0100, Kristian Amlie wrote:
> On 24/11/16 07:15, Ulrich Ölmann wrote:
> > Hi,
> >
> > On Wed, Nov 23, 2016 at 04:56:56PM +0100, Patrick Ohly wrote:
> >> On Wed, 2016-11-23 at 15:22 +0200, Ed Bartosh wrote:
> >>> On Wed, Nov 23, 2016 at 02:08:28PM +0100, Kristian Amlie wrote:
> >>>> On 23/11/16 13:08, Ed Bartosh wrote:
> >>>>> On Tue, Nov 22, 2016 at 12:54:52PM +0100, Kristian Amlie wrote:
> >>>>> [...]
> >>>>> This can be done by extending existing rootfs plugin. It should be able
> >>>>> to do 2 things:
> >>>>>
> >>>>> - populate content of one rootfs directory to the partition. We can
> >>>>> extend syntax of --rootfs-dir parameter to specify optional directory path to use
> >>>>>
> >>>>> - exclude rootfs directories when populating partitions. I'd propose to
> >>>>> introduce --exclude-dirs wks parser option to handle this.
> >>>>>
> >>>>> Example of wks file with proposed new options:
> >>>>> part / --source rootfs --rootfs-dir=core-image-minimal --ondisk sda --fstype=ext4 --label root --align 1024 --exclude-dirs data --exclude-dirs home
> >>>>> part /data --source rootfs --rootfs-dir=core-image-minimal:/home --ondisk sda --fstype=ext4 --label data --align 1024
> >>>>> part /home --source rootfs --rootfs-dir=core-image-minimal:/data --ondisk sda --fstype=ext4 --label data --align 1024
> >>>>>
> >>>>> Does this make sense?
> >>>>
> >>>> Looks good. The only thing I would question is that, in the interest of
> >>>> reducing redundancy, maybe we should omit --exclude-dirs and have wic
> >>>> figure this out by combining all the entries, since "--exclude-dirs
> >>>> <dir>" and the corresponding "part <dir>" will almost always come in
> >>>> pairs. Possibly we could mark the "/" partition with one single
> >>>> --no-overlapping-dirs to force wic to make this consideration. Or do you
> >>>> think that's too magical?
> >>>>
> >>> Tt's quite implicit from my point of view. However, if people like it we
> >>> can implement it this way.
> >>
> >> I prefer the explicit --exclude-dirs. It's less surprising and perhaps
> >> there are usages for having the same content in different partitions
> >> (redundancy, factory reset, etc.).
> >>
> >> Excluding only the directory content but not the actual directory is
> >> indeed a good point. I'm a bit undecided. When excluding only the
> >> directory content, there's no way of building a rootfs without that
> >> mount point, if that's desired. OTOH, when excluding also the directory,
> >> the data would have to be staged under a different path in the rootfs
> >> and the mount point would have to be a separate, empty directory.
> >>
> >> I'm leaning towards excluding the directory content and keeping the
> >> directory.
> >
> > what about having both possibilities by leaning against the syntax that rsync
> > uses to specify if a whole source directory or only it's contents shall be
> > synced to some destination site (see [1])?
> >
> > In analogy to this to exclude only the contents of the directory named 'data'
> > you would use
> >
> > --exclude-dirs data/
> >
> > but to additionally exclude the dir itself as well it would read
> >
> > --exclude-dirs data
>
> This is creative, but ultimately too unintuitive IMHO. Rsync is the only
> tool which uses this syntax AFAIK, and it's a constant source of
> confusion, especially when mixed with cp or similar commands.
>
Would this way be less intuitive?
--exclude-path data/*
--exclude-path data
We can go even further with it allowing any level of directories:
--exclude-path data/tmp/*
--exclude-path data/db/tmp
...
--
Regards,
Ed
next prev parent reply other threads:[~2016-11-24 13:23 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-22 9:05 Contents of non-rootfs partitions Kristian Amlie
[not found] ` <CA+4=imZLMh7di712mejxQ6qgsDSXiCOJJDbUY99YC9DoCrqrmQ@mail.gmail.com>
2016-11-22 9:54 ` Kristian Amlie
2016-11-22 11:10 ` Patrick Ohly
2016-11-22 11:54 ` Kristian Amlie
2016-11-23 8:40 ` Enrico Joerns
2016-11-23 9:04 ` Kristian Amlie
2016-11-23 9:24 ` Maciej Borzęcki
2016-11-23 10:12 ` Enrico Joerns
2016-11-23 11:03 ` Maciej Borzęcki
2016-11-23 12:08 ` Ed Bartosh
2016-11-23 13:08 ` Kristian Amlie
2016-11-23 13:22 ` Ed Bartosh
2016-11-23 13:51 ` Maciej Borzęcki
2016-11-23 14:10 ` Ed Bartosh
2016-11-23 15:56 ` Patrick Ohly
2016-11-24 6:15 ` Ulrich Ölmann
2016-11-24 7:38 ` Patrick Ohly
2016-11-24 7:38 ` Kristian Amlie
2016-11-24 13:23 ` Ed Bartosh [this message]
2016-11-24 14:43 ` Kristian Amlie
2016-11-24 14:51 ` Ed Bartosh
2016-11-24 15:24 ` Patrick Ohly
2016-11-24 15:52 ` Kristian Amlie
2016-11-24 15:28 ` Andreas Oberritter
2016-11-24 15:51 ` Kristian Amlie
2016-11-24 16:21 ` Patrick Ohly
2016-11-24 16:40 ` Kristian Amlie
2016-11-23 13:44 ` Ed Bartosh
2016-11-23 14:20 ` Kristian Amlie
2016-11-22 23:45 ` Khem Raj
2016-11-23 7:13 ` Kristian Amlie
2016-11-23 7:26 ` Khem Raj
2016-11-23 9:01 ` Kristian Amlie
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=20161124132315.GA14497@linux.intel.com \
--to=ed.bartosh@linux.intel.com \
--cc=kristian.amlie@mender.io \
--cc=openembedded-core@lists.openembedded.org \
/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