LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 11-16-2006, 02:48 AM   #1
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Rep: Reputation: 30
Can I Make make Believe Root Is a Different Directory?


I'm using Slackware and everynow and then I get a package that is particularly annoying to install. Some do not provide install options even like python scripts, imake and smake (or they provide options but finding out the right one to use is difficult). What would be nice is to fool make that it is running as root, but be able to direct all the files it creates to a directory for packaging. Checkinstall works 98% of the time, but sometimes you need to do things the hardway. Does anyone know how to create an environment like this? Thanks.
 
Old 11-16-2006, 08:18 PM   #2
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,490

Rep: Reputation: Disabled
Have you tried chroot?
 
Old 11-17-2006, 04:32 AM   #3
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Original Poster
Rep: Reputation: 30
That could be done, but how would I give the application access to all the packages it needs to look for.
 
Old 11-17-2006, 06:02 AM   #4
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 366

Rep: Reputation: 94
I'm not sure if I get you right, but I think "DESTDIR" is what you want.
Just make sure you have writing rights for the source and destination directory. Say destination is "usr/src/package-a" then just type
Quote:
"make install DESTDIR=/usr/src/package-a"
then all things get installed in that directory. makepkg can then make a package of it, which you can install just as usual with installpkg.
My experience that it works often, but DESTDIR has to be defined in the Makefile, otherwise it does exactly nothing. But such packages are rare.

Last edited by ppr:kut; 11-17-2006 at 06:03 AM.
 
Old 11-18-2006, 05:48 AM   #5
binarybob0001
Member
 
Registered: Dec 2004
Distribution: Debian Wheezy
Posts: 441

Original Poster
Rep: Reputation: 30
I made this post for the rare packages. My last experience with this was bin utils. I needed to patch mount to handle AES encrypted loopback devices. I used the DESTDIR variable. I made my package and installed it. Sure enough, 10 hours of work became 20 hours of work. What's needed is a good program to monitor the file system so that all the newly created files, symlinks and chmod's can be gathered into one place for an install script to be made and a package. Checkinstall has failed me numerous times due to something called a recursive install whatever that is.
 
Old 11-20-2006, 04:33 AM   #6
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 366

Rep: Reputation: 94
OK, now I get what you want!
I haven't done such things before, but I just try and take the chroot thing a step further. If you want to use chroot, i guess that there need to be no files in the chrooted environment, because otherwise it wouldn't make sense. Libraries and other files, needed to be read, could be made accesible if you mount the original root somewhere in the new one, for example /mnt/root-old. Then just change the $PATH-variable would make them accesible.
If you search for something similar to checkinstall, try protopkg. Haven't tried it so far, but i know that it uses not installwatch, which is the base for checkinstall.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
make from an child directory. ashlesha Linux - General 2 07-19-2006 08:47 PM
Cannot 'make' in madwifi directory Katlyn Linux - Software 11 03-11-2006 04:44 AM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 11:02 AM
How to make rule for make install and make uninstall melinda_sayang Programming 1 06-14-2004 06:58 AM
make dep,make clean,make bzImage problem Babba Linux - Newbie 2 01-08-2003 04:49 AM


All times are GMT -5. The time now is 11:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration