# three questiong about system maintain?



## fender0107401 (Nov 20, 2009)

Sorry about the thread name, I can't find a proper name fot it. 

question 1: how to build the system without lib32?

from the kernel config file:


> options         COMPAT_IA32             # Compatible with i386 binaries



and in the installation process:

sysinstall->config->distribution->



> [ ]  lib32     32-bit runtime compatibility libraries



but when make buildworld and make installworld I still get lib32, how to avoid? can we set something in make.conf to aboid it? and without lib32 is safe?

question 2:

I kown "/usr/src" is for the system(kernel and userland) source, but when I make buildworld or make buidlkernel, where the system conpile source file, is all the compilation occured in "/usr/obj"? and the compilation result is also stored in "/usr/obj"?

quetion 3 how to restore the whole system file's permission? Is there some basic guilde or rule about the system file initial permissing?


----------



## fronclynne (Nov 21, 2009)

*find can do some stuff, too*


`# echo "WITHOUT_LIB32=" >> /etc/src.conf`
If I understand your question correctly: the sources are in /usr/src/, the object files that build[world|kernel] creates are stored in /usr/obj/, so yes?
Oy!  chown(1) & chmod(1) (especially with the -R flag) will change things around all you want.  What exactly did you need changed & to what?


----------



## hedwards (Nov 21, 2009)

fronclynne said:
			
		

> [*]Oy!  chown(1) & chmod(1) (especially with the -R flag) will change things around all you want.  What exactly did you need changed & to what?[/list]


Heh, to the OP, if that's what you're doing, it'd probably be wise to run mtree to store the permissions before hand, just so you can undo most or all of it if you want to later.


----------



## fender0107401 (Nov 21, 2009)

fronclynne said:
			
		

> `# echo "WITHOUT_LIB32=" >> /etc/src.conf`
> If I understand your question correctly: the sources are in /usr/src/, the object files that build[world|kernel] creates are stored in /usr/obj/, so yes?
> Oy!  chown(1) & chmod(1) (especially with the -R flag) will change things around all you want.  What exactly did you need changed & to what?



1.

WITHOUT_LIB32= or WITHOUT_LIB32=yes ?

2.

Yes, your understanding is right.

I want use tar to backup /usr/src.

After install freebsd I always rebuild everything then backup everything with dump. I want backup the system source file with tar and then use it somewhere else. You know "make update" always need time.

3.

I know how to change file permission, in fact I mean if I run chmod several times and want to restore the permission to it's initial value bur I forgot the initial value, in this circumstances how to restore all the file permissiong to the inital value just like a fresh installed system.



			
				hedwards said:
			
		

> Heh, to the OP, if that's what you're doing, it'd probably be wise to run mtree to store the permissions before hand, just so you can undo most or all of it if you want to later.



Seems that is what I need.


----------



## DutchDaemon (Nov 21, 2009)

fender0107401 said:
			
		

> WITHOUT_LIB32= or WITHOUT_LIB32=yes ?



Doesn't matter in this case. The variable needs to _exist_, whether it has a value or not. In fact "WITHOUT_LIB32=banana" or even "no" would do the exact same thing.


----------



## fender0107401 (Nov 21, 2009)

DutchDaemon said:
			
		

> Doesn't matter in this case. The variable needs to _exist_, whether it has a value or not. In fact "WITHOUT_LIB32=banana" or even "no" would do the exact same thing.



I got. :e


----------



## fronclynne (Nov 21, 2009)

fender0107401 said:
			
		

> I want use tar to backup /usr/src.
> 
> After install freebsd I always rebuild everything then backup everything with dump. I want backup the system source file with tar and then use it somewhere else. You know "make update" always need time.


I see.  If you want to reuse your already built object files you need to have a /usr/src/ that matches.  You're probably best off tarring both /usr/src/ & /usr/obj/.  Also, definitely make sure that /etc/make.conf & /etc/src.conf are the same between object tree reuses.



> I mean if I run chmod several times and want to restore the permission to it's initial value bur I forgot the initial value, in this circumstances how to restore all the file permissiong to the inital value just like a fresh installed system.



Difficult if you don't have the mtree output.  I believe the installworld target sets everything that it touches to the same default as a freshly installed system.  But other parts of the filesystem need their own handling.  There are some files in /etc/mtree/ which cover parts (most?) of the base system.  And some (gnome is the only one I find here) ports have their own in /usr/local/etc/mtree/.


----------

