[GRLUG] Files in make install

Nathan Phillip Brink binki at gentoo.org
Fri Oct 10 18:44:59 EDT 2014


On Fri, Oct 10, 2014 at 04:49:41PM -0500, L. V. Lammert wrote:
> Trying to do create a copy of a current system by pushing all of the
> executables into a reposity, and then install based on pulling from the
> repository on the 'clone', but I cannot figure out how to show the actual
> files that are installed.
> 
> Found make install --dry-run, but it does not show files being installed,
> only, apparently, steps in the process:
> 
> # make --dry-run install
> cd ./base && make install
> make[1]: Entering directory '/usr/src/nagioscore/base'
> make install-basic
> make[2]: Entering directory '/usr/src/nagioscore/base'
> /usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
> /usr/bin/install -c -m 774 -o nagios -g nagios nagios
> /usr/local/nagios/bin
> /usr/bin/install -c -m 774 -o nagios -g nagios nagiostats
> /usr/local/nagios/bin
> make[2]: Leaving directory '/usr/src/nagioscore/base'
> make strip-post-install
> ...
> 
> Is there a better way to see actual files that would be installed?
> 
> 	Thanks!
> 
> 	Lee

Not sure what you’re trying to do. By “current system” do you mean
nagios-core? Looks like that supports the “make DESTDIR="${D}"
install” pattern, so to preview the files it would install you could
create a temporary directory, run install (without dry-run), and then
just examine the directory:

$ make DESTDIR="${PWD}"/destdir install
cd ./base && make install
make[1]: Entering directory `/tmp/nagios/base'
make install-basic
…
$ find destdir -print
destdir
destdir/tmp
destdir/tmp/nagios-prefix
destdir/tmp/nagios-prefix/var
destdir/tmp/nagios-prefix/var/spool
destdir/tmp/nagios-prefix/var/spool/checkresults
…

To ignore folders, of course, just add “-type f” before “-print”.

Only other thing I can think of would be to try to replace the install
command that make is invoking with something that would echo out where
the file would be installed to on STDOUT. But that’d be work and you’d
need to override the path to the install command probably at
./configure time. Distribution package management systems often rely
on DESTDIR or something like fakeroot to trap the files that “make
install” is copying to the system so that these files can be packaged
up, so this is probably closest to the behavior you’re interested in.

-- 
binki

Look out for missing or extraneous apostrophes!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://shinobu.grlug.org/pipermail/grlug/attachments/20141010/64798ad8/attachment-0001.pgp>


More information about the grlug mailing list