remembering configure options (was: I DON'T have new mail)
On 11:47 22 Jan 2004, Todd <Freedom_Lover@xxxxxxxxx> wrote:
| Patrick Shanahan wrote:
| > * Todd <Freedom_Lover@xxxxxxxxx> [01-22-04 11:16]:
| >> Patrick Shanahan wrote:
| >>
| >>> At the top of ./config.log, generated each time you perform
| >>> configure.
| >>
| >> Shouldn't that be config.status? That file states at the top:
| >
| > It also exists in config.status, but is much more difficult to see
| > since it is down in the file rather than at the top. config.log is
| > IMNSHO the better option of the two.
|
| Are we looking at different files or am I totally misunderstanding
| what the OP was looking for? (Either is certainly possible.) Now I'm
| mostly just curious since I might be able to learn some new tricks for
| building software here.
|
| I don't see how I could even get the options I passed to configure out
| of the config.log I have from my last build of 1.5.5.1. Whereas in
| config.status, the full command I passed to configure is listed right
| at the top of the file, just 7 lines from the top. The purpose of
| config.status is stated in that file as "Run this file to recreate the
| current configuration" which seems to be exactly what the OP wanted to
| do.
I'll tell you what I do.
Whenever I build something I:
- unpack the source
- cd into it
- run
logbuild
logbuild is a little script that
fires up a fresh terminal
with a new screen session in it
running a shell inside the "script" command
with script configured to log to (roughly)
~/var/log/build/`basename $PWD`-$ARCH-`hostname`-timestamp
and most importantly, the shell's startup has this in it:
trap history 0
so that when I exit the build it recites the command history.
Which then lands in the log.
Look:
[~]amadeus*> cd ~/var/log/build
[log/build]amadeus*> L mutt*
-rw-rw---- 1 cameron cameron 6156 Aug 22 2001
mutt-1.3.21-linux.alpha.linux-alpha-2001-08-22-13:15:40.bz2
-rw-rw---- 1 cameron cameron 11397 Sep 21 2001
mutt-1.3.22-linux.x86.linux-amadeus-2001-09-21-15:51:56.gz
-rw-rw-r-- 1 cameron cameron 13441 Jun 5 2002
mutt-1.4i-rr-initials-quote-nntp-redhat.x86.linux-amadeus-2002-06-05-18:07:40.gz
-rw-rw-r-- 1 cameron cameron 7983 Jun 5 2002
mutt-1.4i-rr-initials-quote-nntp-redhat.x86.linux-amadeus-2002-06-05-18:33:22.gz
-rw-rw-r-- 1 cameron cameron 15375 Jan 6 21:06
mutt-1.5.51-redhat.x86.linux-amadeus-2004-01-06-20:55:42.gz
-rw-rw-r-- 1 cameron cameron 9960 Jun 8 2003
mutt-cvs-2003-06-08-redhat.x86.linux-amadeus-2003-06-08-17:52:59.gz
[log/build]amadeus*> gunzip <
mutt-1.5.51-redhat.x86.linux-amadeus-2004-01-06-20:55:42.gz|tail -30
:[~/tmp/mutt-1.5.51]amadeus*> exit
: 1; umask 2
: 2; ls
: 3; less INSTALL
: 4; aclocal -I m4
: 5; autoheader
: 6; cd m4
: 7; make -f Makefile.am.in
: 8; ..
: 9; automake --foreign
: 10; autoconf
: 11; export PATH=/usr/sbin:$PATH
: 12; rehash
: 13; ./configure --prefix=/opt/mutt-1.5.5.1 --enable-pop
--enable-imap --with-ssl --with-sasl
: 14; make && echo YES
: 15; mkdir /u/syncopt/redhat.x86.linux/HOME/mutt-1.5.5.1
: 16; ln -s /u/syncopt/redhat.x86.linux/HOME/mutt-1.5.5.1 /opt/.
: 17; make install && echo YES
: 18; pwd
: 19; su -
Script done on Tue Jan 6 21:06:01 2004
Now, I run zsh which has a per-shell history (instead of bash's shared
history) so I get a nice clean build history. For bash you'd want to
also arrange a private history file (eg in ./.history) so as to get a
clean history.
But anyway, I get a nice usable log for everything this way. You'll also
notice that that history has the numbers wrapped up so that you can just
cut/paste whole lines instead of aiming at the start of the command. If
you do things that way, which I do sometimes.
The screen stuff is for long running builds (kernels etc) that I might
want to check on from elsewhere later. You may not need it, but since
my script does it, I just don't care.
Sources:
http://cskk.ezoshosting.com/cs/scripts/logbuild
http://cskk.ezoshosting.com/cs/scripts/logscript
Cheers,
--
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/
People have always said, "The customer is always right." Well, he's
*not* always right. Sometimes he's a jerk. Sometimes he demands the
impossible, thinking that the volume of his demands will get him taken
care of. When someone does that, I don't need 'em. I don't want 'em.
We try to find good people, and train them, which is not easy. I want
some jerk pissing my people off and ruining their morale? What *I*
want is to never see him again. And all my customer contact people
know that they are authorized to inform him that they feel he might be
better served elsewhere. - Herb Kelleher, founder of Southwest Airlines