coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: add basic package management for 'install'


From: Joao Luis Meloni Assirati
Subject: Re: Patch: add basic package management for 'install'
Date: Fri, 29 Jul 2016 15:00:01 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.1.0

Hi Pádraig,

thank you for your considerations.

Em 29-07-2016 07:31, Pádraig Brady escreveu:

Interesting. Thanks for the careful proposal.

My first though was that since install(1) needs to be given
a list of files or directories to create and doesn't recurse into
source directories, that all info required to uninstall is available
and therefore `make uninstall` is the correct way to do it
(which may also do other things than just remove(2)).

The problem with `make uninstall` is twofold: the provider of the software must implement it and one must keep the sources to be able to use it.

Also, by creating lists of installed files, one can at any moment decide to which source some file file belongs, which is useful for many other thins besides uninstallalation.

I also thought that one could leverage --verbose to get
the same functionality, though that is awkward and
one would have to deal with quoting etc.

wrt quoting you've have to be careful with '\n' in filenames
(maybe from a malicious `make install`) that could induce
an unintended unlink() in a subsequent processing of the list file.
You'd probably still quote in that case.

Also I don't like the list file management within install(1).
If we were to do this I'd just output the list of created files/dirs.
Perhaps with an interface like:
   install --verbose=manifest > install.list

The implementation of this would not differ very much to the code I proposed, the only difference being not opening a file but writing to stdout. But to use a feature like this in legacy makefiles, or makefiles whose creator did no bother to create the install.list, one would have to edit the makefile. This is troublesome and error prone.

With my proposal, if the makefile uses install(1), one just `export INSTALL_LIST=install.list` before `make install` with no modification of makefiles or installation scripts even if install is called with no special options inside the makefile.

With the above caveats I'm 50:50 on supporting this
due to lack of generality.

Have you considered managing the installed list in a more
abstract way, like with `checkinstall` to auto create packages,
or using GNU stow to manage the list with symlinks.

My concern is not about makefiles I create, where I can use such ideas, but others. In short, I wish to be able do administer /usr/local with a multitude of third party software installed by just keeping a collection of standard lists of installed files in, say, /usr/local/install.

thanks,
Pádraig

Thank you,
João Luis.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]