FS#24610 - Remove extraneous files from git repo and clean autotools use.

Attached to Project: Pacman
Opened by Nathan Phillip Brink (ohnobinki) - Tuesday, 07 June 2011, 02:41 GMT
Last edited by Allan McRae (Allan) - Friday, 14 December 2012, 04:05 GMT
Task Type Bug Report
Category General
Status Closed
Assigned To Dan McGee (toofishes)
Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version git
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Summary and Info:

There are a bunch of files currently committed directly into pacman's VCS which don't belong there, such as config.guess, config.sub, Makefile.in.in and m4 files from gettext, libcurl.m4, and libtool, etc. Having these extraneous files produces junk upon running `git diff', making looking for bugs in the buildsystem more annoying. Also, anyone cloning the VCS of a project should have the tools and packages installed to be able to do a fresh `autoreconf -vfi' in the clone -- so there is no need for these autogenerated/autocopied files to be shipped.

Attached are two patches which do some such cleanup ready for `git am'.
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 14 December 2012, 04:05 GMT
Reason for closing:  Deferred
Additional comments about closing:  We patch ltmain.sh to make --as-needed work - will implement once fixed upstream
Comment by Dan McGee (toofishes) - Tuesday, 07 June 2011, 16:11 GMT
1. I've never ever seen these files show up in git-diff - does only running autoreconf do that?
2. What system are you running on so we can get a better idea of what we're looking at here? If I can run things in a VM that would be awesome.
3. echo "You need to install net-misc/curl to get libcurl.m4." is a bit odd to me, assuming every os has some magic net-misc/ package group. You need curl to get libcurl.m4, which should be obvious to most, so I'm not sure why this single library is getting called out.

Allan, I know you own the bible on autotools now so feel free to chip in- we have changed the way we do this several times and I've still yet to figure out what the correct answer is to including/not including these files.
Comment by Dave Reisner (falconindy) - Tuesday, 07 June 2011, 20:05 GMT
I don't see the problem with this, nor have I ever seen the garbage you mention on git-diff. I suspect that you're not running autogen.sh and just wandering off on your own instead. Not to mention that 'net-misc/curl' sounds like gentoo crap that doesn't belong in our code base.

While it's true that you _could_ rely on the target system to have these files on hand, you're then opening yourself up to differences in versioning that might cause a different breed of trouble for folks building from git. libtool and autohell is self contained in this manner, and we can confidently distribute a known good build system intact with the source. curl upstream even recommends distributing their m4 file with your source code.
Comment by Allan McRae (Allan) - Saturday, 11 June 2011, 09:12 GMT
The autotools book seems to indicate not to include config.sub and config.guess (but they obviously get pulled in when making the release). But saying that... glibc, binutils and gcc all have that in their source tree.
Comment by Allan McRae (Allan) - Sunday, 12 June 2011, 04:32 GMT
The more I read the autotools bible, the more I agree that this change is the way to go. Our autogen.sh script is a poor mans autoreconf.
Comment by Allan McRae (Allan) - Wednesday, 15 June 2011, 09:16 GMT
Adjusted patch and follow-up on my autotools branch:
http://projects.archlinux.org/users/allan/pacman.git/log/?h=autotools

I will be doing further work on all the autotools stuff before I think this should be merged.
Comment by Dan McGee (toofishes) - Wednesday, 15 June 2011, 14:36 GMT
1. A ton of projects have an autogen.sh script; even if it is doing the wrong thing I'd say make it a one-liner calling autoreconf.
2. Testing this on a system *without* some of these packages is essential- e.g. no gettext, no libcurl. I have the feeling it is going to fail spectacularly.
Comment by Allan McRae (Allan) - Thursday, 16 June 2011, 08:56 GMT
Agreed on on both points. There is far more to be done here...
Comment by Allan McRae (Allan) - Monday, 07 November 2011, 02:18 GMT
Note there is a good reason we can not do this at the moment: libtool and --as-needed requires us to use a patched ltmain.sh. I know it should be fixed in upstream libtool but they have know about this since at least 2006 so I am not holding my breath.

Loading...