Changes to the BUILD and INSTALL scripts (Men-At-Work)

Auke Kok auke at foo-projects.org
Thu Jan 26 19:11:05 CET 2012


On Thu, Jan 26, 2012 at 08:52:13PM +0900, Dave Brown wrote:
> On Wed, Jan 25, 2012 at 02:11:18PM -0800, Auke Kok wrote:
> > On Wed, Jan 25, 2012 at 07:27:45AM -0500, Dennis Veatch wrote:
> > > Well alright then. Did I miss some background conversations :)
> > 
> > perhaps, but likely not - I haven't been around brainstorming in #lunar
> > exactly much
> > 
> > > I think I can see where you are going with this to a point but missing what is 
> > > to be gained; aside from some obvious things. Like simplifying the BUILD 
> > > scripts to only perform configure and make.
> > > 
> > > Beyond that I will assume this is a subset of some other changes you have in 
> > > mind.
> > 
> > Simplification is not actually the goal, and I don't think that this step
> > actually simplifies things much, as right now one could have an empty BUILD
> > file sitting around, something we didn't have before.
> 
> Why not just do exactly what we do with other optional files--just
> delete it?  If something has a GNU-autoconf default build, just delete
> the BUILD file altogether and let the default handle it.

Some packages don't compile anything, they just provide a bunch of files.
Those packages will have an empty BUILD.

Anything that has autotools obviously don't need that, and BUILD can be removed.

> > So, back to what this will give us:
> > 
> > 
> > sandboxed installation: We can now use fakeroot-ng or similar to not actually
> > install files into the live system, but into a sandbox. This will allow us
> > to actually prevent system files from being overwritten, complain if this
> > happens, and it will also make upgrades much more safe!
> 
> I have a use case for this!  emacs and ctags have a stupid conflict--the
> "ctags" binary.  There's no mechanism within the emacs build, short of
> patching the Makefile, to install ctags as anything other than ctags.
> 
> Stick it in a sandbox, though, and you can have a PRE_INSTALL script
> that digs into the sandbox, renames "ctags" to "etags", and removes the
> whole conflict.

somewhat. The goal is to be able to do this in the INSTALL section. e.g.
have INSTALL run 'default_install', but then mv /usr/bin/ctags /usr/bin/etags.

Since you're not really installing on the real system, you can move stuff around
after `make install` without penalty - nothing will be in the way.

What's more of an issue to me immediately is to close the disaster scenario,
where something fails after the previous version of a package was already
removed:

# lin glibc
-- BUILD runs ok
-- lrm --upgrade glibc
-- INSTALL runs, but fails

Now you don't have glibc installed.

We can work around this with sustained and all that, like we did until now,
but realistically it's not ever going to prevent breakage as much as changing
the scenario around so that it goes like this:

# lin glibc
-- BUILD runs ok
-- INSTALL fails
-- lrm --upgrade never runs in the first place

This part *requires* some form of DESTDIR/fakeroot install method.

The code is almost there though, now :)

Auke


More information about the Lunar-dev mailing list