Re: Best practice for cleaning autotools-generated files?
On Thu, Mar 17, 2011 at 03:32:05PM +0800, Paul Wise wrote:
> On Thu, Mar 17, 2011 at 3:15 PM, Andreas Tille <andreas@an3as.eu> wrote:
>
> > Would you consider the existence of autotools autogenerated files inside
> > an upstream source a valid reason to rebuild upstream source in a
> > get-orig-source target?
>
> I would consider autotools generated files (Makefile.in, configure,
> etc) in an orig.tar.gz to be normal for an upstream project with a
> build system based on autotools. Indeed, if such projects had a
> tarball without those things I would consider it abnormal. I usually
> wouldn't consider rebuilding a tarball to remove such files.
Sorry, I was not precise. I also regard Makefile.in and configure (and
files which are used by configure to run properly) as useful in an
upstream tarball. However, files like config.log etc. should be cleaned
up.
> > More generally: Would you consider it a valid reason for rebuilding
> > upstream source if upstream forgot to `make (dist)clean`?
>
> Not sure what you are asking here. If upstream didn't use `make dist`
> or `make distcheck` and that caused a problem I would contact upstream
> and educate them about how to generate tarballs from autotools-based
> projects.
I mean cases were the process:
tar -xzf *.orig.tar.gz
cd <upstream-dir>
make clean (or make distclean whatever is used)
leads to a different directory layout than it is provided in the
tarball. For sure I would try to contact upstream but this does not
always work (dead upstream, unresponsive upstream).
Simply rebuilding the cleaned source as orig.tar.gz would be a quite
simple way to handle issues like this.
> > In several cases the answer "yes" to both questions would have saved me
> > a certain amount of time because I cared about "purists complaining that
> > debian/rules clean does not restore whatever crap was there upstream".
>
> I don't think `debian/rules clean` was ever supposed to restore stuff
> in orig.tar.gz, as long as debian/rules build regenerates it. So I
> wouldn't bother caring about such folks.
If you try to build the source twice in a row you get a diff to the
original tarball. This should be avoided.
Kind regards
Andreas.
--
http://fam-tille.de
Reply to: