Excerpt from Linux Cookbook, Part 1
Subject:   Some Corrections
Date:   2004-12-10 10:10:43
From:   Fred_Arnold
Response to: Some Corrections

"Brain dead"? No it isn't. I use almost the same method for generating file lists for source installs, because many makefiles do not include an "uninstall" target, so it saves a lot of time when I want to remove a program. I also exclude mounted network shares. Sometimes I will install everything in a single directory using the --prefix option for ./configure, for an application that I know I'm probably going to test and remove, but that presents its own problems- like program documentation that assumes certain file locations, so you have to spend more time making sure config files and commands reflect the correct filepaths. And it puts files in illogical locations, instead of config files in /etc, logfiles in /var, and so forth.

Package installs really don't pertain to source installs. :)

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Some Corrections
    2004-12-26 02:57:38  trb [View]

    In most cases 'make install DESTDIR=/some/dir' is really the best way to do this. Once you make your list (find /some/dir | sed 's!^/some/dir!!' > file-list), you just 'make install' again and everything goes where it's really supposed to. No muss, no fuss.

    In cases where that doesn't work I can think of all kinds of suboptimal-but-still-better ways to do it besides finding and grepping (twice!) the whole file system, including using a union mount to direct all the newly-installed files to a scratch filesystem or doing one build with './configure --prefix' set to a scratch directory to make your list and then building the package again without the (or with a different) --prefix option.

    There are so many ways of doing this that are quicker, easier, and work better, that I think "brain dead" is a pretty good label in this case.

    Ultimately, of course, if your OS uses package management, it's smarter to just build your own packages and let the helper scripts/apps worry about making a file list. Package management eases system maintenance and upgrading by a huge margin, especially when you have to manage multiple systems.

    Plus in the case of distros like Gentoo and Red Hat (and just about everything else), where you have things like .spec and .ebuild files that script your build process, you're essentially documenting how to build the package while you're actually doing it, forcing you to take a step you should be taking anyway to make upgrading to future versions of the same software as painless as possible.
  • Some Corrections
    2004-12-11 17:51:15  oisinfeeley [View]

    Package installs really don't pertain to source installs. :)

    If the system that you're working on has package-management then it would be easier in the long run to use that system. It's possible to take source files and make your own debs or rpms. This make upgrading, removing etc _much_ easier.

    It's definitely going to be quicker than doing a find, outputing a list, then diffing the list.

    Brain-dead may be a harsh description, so let's call it "sub-optimal" instead.