LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-19-2006, 09:42 AM   #16
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 212

Original Poster
Rep: Reputation: 32

My thanks haertig

I have made a couple of partitions, and put a whole extra distro (Mepis/Ubuntu 6.0) on it.
No frills, just for the purpose of getting familiar with compiles without doing too much harm.

"fakeroot" is interesting.

I was looking for command options that allow "pretend" operation to give an opportunity to fix stuff before running the command for real. "make" has these:
Quote:
-n, --just-print, --dry-run, --recon
Don't actually run any commands; just print them.
Hmm..
 
Old 10-19-2006, 12:40 PM   #17
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,116

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Quote:
Originally Posted by odd2k
If I understand this correctly, the "make" step should normally not operate outside the source directory. And because the user normally has full access to said directory, he shouldn't need to be root until he actually calls make install to copy everything out from the source directory on the other parts of the disk. Correct?
Correct (usually). Ignoring those poorly written Makefiles I mentioned previously. There's nothing preventing a Makefile from jumping outside of the source tree during the "make" part and trying to overwrite /etc/password. But that would certainly not be normal (nor acceptable). I ran into a program once that wanted to write outside of the source tree during the configuration step. The developers didn't call it "configure", they used "config" if I remember correctly, but it was at the very beginning of the compilation process where you normally run configure. They at least checked that config was running as root and complained before attempting anything. Of course I saw red flags immediately and didn't run it as root without VERY detailed inspection of what it was doing and WHY it wanted to do it. Turned out it was harmless activity, just poorly written config/make code that didn't follow the normal "rules of the road". I would recommend being suspicious of anything that requires root privileges prior to the installation step.

Many programs allow you to compile and install them totally without root privileges. Often times you have to specify an alternate installation directory however (many default to installing under /usr, /etc, and so on). Usually this installation path override takes the form of an extra "--prefix=..." option to the configure script.
 
Old 10-19-2006, 12:57 PM   #18
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,116

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Quote:
Originally Posted by GTrax
"fakeroot" is interesting.
This command may be Debian-specific. I can't remember. So don't be totally surprised if you find it on your Kubuntu install, but not on SuSE or Mepis. It may not even be installed by default on Kubuntu, if indeed it is a Debian-specific command in the first place.
Quote:
I was looking for command options that allow "pretend" operation
If you really, really want to pretend compile/install, you might look into using unionfs to create an overlay of your entire system. All changes are written to the overlay, not the underlying base system (which you define as readonly when creating the union). Then later you tear down the union and look only at the overlay(s) to see what modifications would have been made to your system. This would qualify as an advanced technique with pretty narrow uses, and I wouldn't call it a standard technique employed by new Linux users (or even longtime users, for that matter!) I think I've only used it once myself. That was to investigate the "root permission required at config step" program I mentioned in my previous post (right above this one). It was easier to setup the union than to delve into the inner workings of the config and make scripts, for that specific debug process.

Last edited by haertig; 10-19-2006 at 12:58 PM.
 
Old 10-19-2006, 03:53 PM   #19
GTrax
Member
 
Registered: Oct 2005
Location: UK
Distribution: Mint
Posts: 212

Original Poster
Rep: Reputation: 32
Quote:
If you really, really want to pretend compile/install, you might look into using unionfs
At my level of knowledge, it was a defensive plan. Now, my two new partitions containing a /home and related / of a Mepis install is a place where I can safely make a real mess with compile mistakes while figuring out how this works.

UNIONFS sounds good, because one can maybe mess about in there without the need for a reboot.
With sda7 and sda8 containing my play-area distro, I even tried this ploy, (pinched from a Gentoo install guide) ..
Code:
# mkdir /mnt/distro2
# mount /dev/sda7 /mnt/distro2
# mount -t proc none /mnt/distro2/proc
# chroot /mnt/distro2 /bin/bash
# env-update
command not found
:| OK - so it failed, but I had hopes I could do "chrooting into another environment" where I could mess about safely. It was maybe not a good plan. I am more of an applications user. To get one installed, I go for the line of least resistance. As a programmer, I am still a total newbie.

The modern Mepis 6.0 is Debian, using the Ubuntu engine. I prefer it because when I have to be root, I like to have straightforward access to graphical tools like KWrite without a permissions configure struggle. Kubuntu requires all commands to be prefaced by "sudo" and a password, (unless you use "sudo su" in a terminal shell).

Its a plain fact that unzipping a source package, then carefully following the generic instructions in the hope you can get it to go without becoming a seasoned script expert, is going to fail quite often. For newbies, its usually the end of the line. Since YAST and YUM stopped working properly in SUSE, my haven is Synaptic in Mepis 6.0
For any other newbies reading this thread, I can recommend..
http://www.linuxcommand.org/index.php
where I have generally ended up for the time being. But I am open to suggestions..
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
First basic question? DBolan Linux - Newbie 5 04-29-2005 03:52 PM
Basic C++ question oulevon Programming 1 02-16-2005 06:55 PM
A really basic question jimscafe Debian 14 01-09-2004 07:44 PM
A really basic question pilotgi Linux - Newbie 10 10-14-2002 05:57 PM
Very Basic Question Terri Linux - Newbie 6 10-17-2001 02:31 AM


All times are GMT -5. The time now is 07:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration