public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Y. Ts'o" <tytso@mit.edu>
To: Amir Goldstein <amir73il@gmail.com>
Cc: fstests <fstests@vger.kernel.org>
Subject: Re: [PATCH][xfstests-bld] build-all: fix acl tools build
Date: Sat, 21 Sep 2019 17:35:27 -0400	[thread overview]
Message-ID: <20190921213527.GA14146@mit.edu> (raw)
In-Reply-To: <CAOQ4uxjL7Ce+bnSuo8hxy8oEpz10FxF+9=jK7awoDAqLaW=k-g@mail.gmail.com>

On Sat, Sep 21, 2019 at 06:37:05PM +0300, Amir Goldstein wrote:
> There is one issue with update builds that has been bothering me forever
> and has to do with xfstests and xfsprogs build, so while we are on fstests
> list I will mention that and maybe you can advise.
> 
> Unlike do-all, do-update does 'make' without 'configure', but when
> configure.ac changes, and that happens every xfsprogs release,
> xfsprogs as well as xfstests Makefile runs an unsolicited ./configure
> without all the config parameters that were used for the first
> xfstests-bld build and then build fails.

I rarely use do-update these days, now that have ccache configured for
my build chroots.  The primary case where I use it is when making
minor changes to xfstests (e.g., changing some source file in
xfstests/src which requires a recompile).  I used to use it when
updating or creating a new test, but now we have "{kvm,gce}-xfstests
--update-xfstests-tar" which is even faster.

If anything happens which requires configure to be run, I just use
"./do-all" and be done with it.  After all, i'm not doing all that
often.

The reason why the Makefiles in xfstests and xfsprogs are running an
unsolicity ./configure without all the config parameter can be fixed.
An example of how to do this can be found in e2fsprogs, where in the
MCONFIG.in file we have these lines:

$(top_srcdir)/configure: $(top_srcdir)/configure.ac
	cd $(top_srcdir) && autoheader && autoconf

$(top_builddir)/config.status: $(top_srcdir)/configure
	cd $(top_builddir); ./config.status --recheck

$(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status
	cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status

and we have similar lines for all files generated by configure, for
example:

Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \
		$(DEP_MAKEFILE) $(top_builddir)/config.status
	cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status

The basic idea is that when configure.ac changes, we build configure,
and then we have config.status in the build tree depend on configure
--- and we use config.status --recheck to rerun the configure script
with all of the existing configure script options.  We then similarly
use dependencies on config.status to rebuild all of the generated
files.

Whether or not it's worth it to set up a similar system for xfsprogs
and xfstests, and whether their respective maintainers would accept a
change is a different question.

I suppose you could try to teach the build-all script in xfstests-bld
when xfsprogs and xfstests might do an automatic run of ./configure in
build-all --update mode, and in that case (and only that case, since
the goal is to make --update be fast), have it run "./config.status
--recheck ; ./config.status".

It's not clear to me it's worth it, since I don't pull updates of
xfstests from upstream more than every week or two, and a full build
only takes around 12 minutes.  And for the much more common case where
I'm tweaking a test or creating a new test, "--update-xfstests-tar" is
sufficient, and even faster than rebuilding a new KVM image using
./do-update.

Cheers,

						- Ted

      reply	other threads:[~2019-09-21 21:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20 18:48 [PATCH][xfstests-bld] build-all: fix acl tools build Amir Goldstein
2019-09-20 18:51 ` Amir Goldstein
2019-09-20 23:41   ` Theodore Y. Ts'o
2019-09-21 14:13 ` Theodore Y. Ts'o
2019-09-21 15:37   ` Amir Goldstein
2019-09-21 21:35     ` Theodore Y. Ts'o [this message]

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=20190921213527.GA14146@mit.edu \
    --to=tytso@mit.edu \
    --cc=amir73il@gmail.com \
    --cc=fstests@vger.kernel.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