Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Apr 2014 15:24:39 +0000
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        Bryan Drewery <bdrewery@FreeBSD.org>
Cc:        Mathieu Arnold <mat@FreeBSD.org>, svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org, Adam Weinberger <adamw@adamw.org>
Subject:   Re: svn commit: r348866 - head/ports-mgmt/poudriere-devel
Message-ID:  <20140409152439.GA45878@FreeBSD.org>
In-Reply-To: <5336CFEF.5080400@FreeBSD.org>
References:  <201403231540.s2NFeBjV061182@svn.freebsd.org> <9753239EA269BEFE3D11835F@atuin.in.mat.cc> <532F08B7.8010602@FreeBSD.org> <79C5E9B2B1255838D240E362@atuin.in.mat.cc> <532F09E2.6090309@FreeBSD.org> <BA78CE46-49AC-4895-8EEA-973DADA0F8DB@adamw.org> <532F23DD.5020008@FreeBSD.org> <893AE220-E1DA-4F3A-93E1-D7820B3C5FC4@adamw.org> <5336CFEF.5080400@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Mar 29, 2014 at 08:51:43AM -0500, Bryan Drewery wrote:
> On 3/23/2014 1:31 PM, Adam Weinberger wrote:
> > On 23 Mar 2014, at 14:11, Bryan Drewery wrote:
> >> Sorry but the stagedir cannot have orphans in it, it's not intended for
> >> that. It's intended to make leftovers impossible and allow packaging as
> >> non-root. Leaving untracked files in there is a big red flag that your
> >> package is missing something. You must handle them either by not
> >> installing them or by removing them.

It's a complicated issue.  Let's step aside for a second from the assumption
that "stagedir cannot have orphans in it, it's not intended for that"; it is
a moot point.

Before staging, we often had to "fix" vendor install routines, e.g. by using
REINPLACE_ARGS= -i '' to ensure that no unwanted files are going into what's
being installed (and packaged); another example is trimming of useless docs,
extra copies of GPL boilerplates, etc.

One can value staging because it allows non-root packaging, and removes the
necessity of spamming $PREFIX in order to get a package.  Others (and Adam,
if I read correctly, shares this opinion) treat $STAGEDIR as a "purgatory",
from where good and useful bits are taken into what'll make a final package,
leaving all the crap behind.

I must say this is a hugely convenient thing.  Unless it takes some insane
dependencies or something, it allows one to dump whatever vendor wants into
$STAGEDIR and then cherry-pick what's actually needed.  This helps to write
cleaner Makefiles with less hacks.  It helps to offload sub-packaging to a
later stage.  Build everything, then take what's needed based on pkg-plist.
There are no orphans anymore, at least nothing unlisted gets installed for
our end-users.

But it also creates problems; if you forgot to update pkg-plist when new
version of your port is released, newly added files won't make it into the
package.  As Bryan correctly points out, tinderbox right now does not warn
about this; that's why I have to retest everything with NO_STAGE=yes before
committing.

> >> People are missing this point. You must keep the stagedir clean if you
> >> want to pass poudriere testing.

Now, keeping in mind all of the above, I don't think that this is a right
positioning.  Poudriere testing should help us find the bugs, not preventing
useful features of staging to be used.

> > The ability to dramatically simply a port's Makefile and let simple
> > plist %%OPTIONS%% figure out the rest is an incredibly powerful, useful,
> > and advantageous thing. I am having trouble understanding why we should
> > give it all up so "to pass poudriere testing." Ports work perfectly
> > right now. They install exactly what we intend them to install, and it
> > works perfectly for users.

I agree here.

> > If poudriere is unhappy, then it seems to me that the problem is with
> > poudriere.

Not as much here though.  Automated tools like tinderbox or poudriere are
helping a lot, and simply removing any checks for $stagedir leftovers seems
unwise.  What we need is a smart solution, e.g. ability to ignore certain
files/directories based on a glob (*.bak, COPYING*, or ${WRKSRC}.tmp/), akin
to .(hg|cvs|git)ignore or something.

> I am working to merge the poudriere and check-orphans script into
> check-orphans, enable in tinderbox, and also cleanup EXAMPLES/DOCS
> false-positives with check-orphans.
> 
> I also have work in progress for a way to mark files as explicitly
> ignored so they stop showing in orphans.

Please, go for it!  Given that NO_STAGE support will be gone sooner or
later, I won't be able to use this hack to test for orphans with tinderbox.
I'd love to see something what will allow me to cherry-pick files from the
$stagedir, at the same time helping me to make sure I'm not leaving some
important bits out.  (And yes, I don't like automated PLISTs.)

./danfe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140409152439.GA45878>