Hi,
> > I have a problem that I sometimes encounter: I want to use a stage3
> > archive as the basic for a
> > BuildStream project. Some of those tar files contain `dev` devices (/dev/*
> > mainly), and I can
> > therefore not open them with BuildStream, since I am not root and
> > therefore don't have enough
> > permissions for this.
Having faced similar problems myself, I'd be also in favor of having a
nicer fix for this issue.
> > I'd therefore suggest two things:
> >
> > - Add a `exclude-dev-nodes` option to `tar` to allow filtering out those
> > special files
> > - Make this option true by default, since I think that is the default
> > expectation in BuildStream?
I wonder if there's another way to look at this problem, from the lens
of filtering files provided by sources. That is, allowing project
authors a way to include and exclude sub-directories/files in a
generic way. This can be useful in some other scenarios as well. For
example, when one wants to stage only a part of a monorepo.
Such a functionality could be implemented in core without requiring
any participation from the plugins. In terms of UX, this would be
similar to the other generic source option we have, which is the
`directory` attribute. And, in terms of behavior, it'll be similar to
the functionality provided by the filter element. I could imagine the
syntax being something like:
sources:
- kind: local
path: path/to/directory
include:
- *
exclude:
- /dev
Since I've come across similar situations where I wanted to only stage
part of a source, I'm biased towards having it solved in core in a
generic way. And perhaps that is scope creep. So, I'd be curious to
hear what others think of this idea.
Cheers,
Chandan