You are not logged in.

#1 2012-12-24 13:42:44

gj
Member
Registered: 2010-11-07
Posts: 19

Software installation tracker

A while ago I wanted to try out a program I found on SourceForge.
I downloaded the source code, ran the configure script with the prefix parameter and built it under a non-root user account:

./configure --prefix=~/testprog
make
make install

During the "make install", it wanted to write a file into /usr/lib/python3.3/site-packages/ but as a non-root user I wasn't allowed.

Now I was thinking, are there any software installation trackers running on Linux ?
I mean a program that monitors the disk changes done by a specific process and writes them to a file or a database.
I remember using such a program running on Windows some years ago, however I can't remember its name anymore.
It was even able to undo all the changes.
Does anyone know of such a program running on Linux ?

Kind regards,

gj

Offline

#2 2012-12-24 13:48:15

ijanos
Member
From: Budapest, Hungary
Registered: 2008-03-30
Posts: 443

Re: Software installation tracker

You will be suprised but such program is called a package manager and you already have one installed: pacman.

Offline

#3 2012-12-24 14:43:05

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Software installation tracker

Or to put it another way - create an Arch package with makepkg, and install it with pacman, after checking the repos and the AUR to make sure your mystery app hasn't already been packaged.

Offline

#4 2012-12-24 15:38:04

gj
Member
Registered: 2010-11-07
Posts: 19

Re: Software installation tracker

I played a bit with pacman and makepkg but I'm not completely convinced.
As a test, I created an empty configure script (chmodded to 755) and a Makefile with these lines:

all:
        echo all >&2

install:
        echo install >&2
        echo 1 > ~/installed

clean:
        echo clean >&2
        rm ~/installed

distclean:
        echo distclean >&2
        rm ~/installed

uninstall:
        echo uninstall >&2
        rm ~/installed

check:
        echo check >&2

So, when "make install" is executed, a file named "installed" will be created in my home directory.
When "make clean" is executed, this "installed" file will be removed.

I created a PKGBUILD file based on the notes of the online manual.
When I run makepkg afterwards, a new package file is created but also the "installed" file.

When I tried to uninstall my package (sudo -s pacman -R mypackage), an error message tells me that my package isn't installed yet.
When I remove the "installed" file manually and I install my new package (sudo -s pacman -U mypackage-1-1-i686.pkg.tar.xz), the package seems to be installed but there is no "installed" file ?

Offline

#5 2012-12-24 19:37:29

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Software installation tracker

There's a very strong likelihood that you're doing it wrong. smile

Personally, I see no need to create pointless test packages when there is so much existing software you could use, but if you insist, paste your test PKGBUILD so we can have a look.

Offline

#6 2012-12-24 19:56:24

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,554
Website

Re: Software installation tracker

The problem is with your makefile.  No sane makefile would install to "~".  It's not even certain that there would be a "~" when it is run.

A good makefile will use the PREFIX or DESTDIR variables.  Even a bad Makefile would only install to directories that are sure to exist - or it would create them before installing to them.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2012-12-25 02:54:05

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,198

Re: Software installation tracker

I rather like GNU stow but it will not deal with issues such as packages which put stuff under /usr even if a different prefix is specified. To rule out problems that way, I only run stow as an unprivileged user and have that user have write access to relevant directories under /usr/local but nothing else (except the user's home directory).

PKGBUILD is probably easier but I like being able to install some stuff without privileges (and I'm sort of used to stow).


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#8 2012-12-25 08:41:02

vmat
Member
Registered: 2011-10-10
Posts: 25

Re: Software installation tracker

http://paco.sourceforge.net/

The usage is simple:
paco -lp package_name make install

Then you can list installed files with "paco -f package_name", remove the package with "paco -r package_name" and even use the gui (written in gtkmm).

Offline

Board footer

Powered by FluxBB