Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USE variable question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Athernigy
n00b
n00b


Joined: 30 Mar 2005
Posts: 25

PostPosted: Wed Mar 30, 2005 3:47 pm    Post subject: USE variable question Reply with quote

If I am understanding correctly, USE var is for manpages?

If above is correct, how can I do so that no manpages are installed?
Do I need to add a minus infront of all possible variables and put it in the 'USE="..."' variable?

Thank you.
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2969

PostPosted: Wed Mar 30, 2005 3:50 pm    Post subject: Re: USE variable question Reply with quote

Athernigy wrote:
If I am understanding correctly, USE var is for manpages?

No.
Athernigy wrote:
If above is correct, how can I do so that no manpages are installed?

You can't. Why would you do such a thing?!
Back to top
View user's profile Send private message
Athernigy
n00b
n00b


Joined: 30 Mar 2005
Posts: 25

PostPosted: Wed Mar 30, 2005 3:53 pm    Post subject: Reply with quote

What is USE variable for then?

I don't want manpages because there is no reason to waste disk space on a server. All manpages are available online anyways.

I don't think I am understanding what the USE variable is for???

Thanks.
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2969

PostPosted: Wed Mar 30, 2005 3:57 pm    Post subject: Reply with quote

Athernigy wrote:
What is USE variable for then?

It is for controlling which optional parts of a program to include during installation.

Only 100% optional features of a program can be controlled with USE flags.
Athernigy wrote:
I don't want manpages because there is no reason to waste disk space on a server. All manpages are available online anyways.

You mean, you know all the command line options for emerge (THE most important program that you will have on your system) by heart, and what they are used for? That man page is not available online.

If you want to conserve disk space, just choose what to install very carefully. Also, use as few USE flags as possible to minimise program linkage to unnecessary libraries. And do not use genkernel if possible, compile the kernel manually and select only the options that you really need.

If you are setting up a webserver, you may be interested in the discussion on "what USE flags to use?" here: https://forums.gentoo.org/viewtopic-t-316212.html
Back to top
View user's profile Send private message
Athernigy
n00b
n00b


Joined: 30 Mar 2005
Posts: 25

PostPosted: Wed Mar 30, 2005 4:14 pm    Post subject: Reply with quote

"It is for controlling which optional parts of a program to include during installation.

Only 100% optional features of a program can be controlled with USE flags. "

Yes, this is what it said in the manual also, but how does it work exactly?

Looking in /usr/portage/profiles/use.desc all the tags in there seem to be for some sort of support. If this isn't for manpages, what support is it for?

Are all of these installed by default? If I wrote USE tag, does it assume no support for all packages or all support or some. I guess I wanna figure out what is best method of customizing. Do I need to add a - infront of all items I don't want, and put the names of the items I do want?

First doc for 'man emerge' on google:
http://gentoo-wiki.com/MAN_emerge

Also, if anything I can store manpages on a personal laptop. I still don't think there is any reason to have anything but the bare minimum on a server.
Back to top
View user's profile Send private message
falcon_za
Tux's lil' helper
Tux's lil' helper


Joined: 31 Aug 2004
Posts: 136
Location: Nara - Japan

PostPosted: Wed Mar 30, 2005 4:16 pm    Post subject: Reply with quote

Let's say first things first. I will say very obvious things, but since I am not sure where you got it wrong, and what your knowledge level, better go from the begginning.

USE variable has an influence on how a program is compiled (ie: translated from human written/readable program to computer executable program). In some case, the original developper planned different possibilities for compilations, different options. if you compile this way, you will have support for feature A, if you compile that way, you wont. Sometimes, the developper didn't put any options, and there is only one way to build the program.

When there are options, USE flag is the way to tell the gentoo software installer (portage, via the command emerge) that which one you want to compile in. it may also have an influence on the dependecies, ie: what must be installed in addition to you program to let it work properly.

for example, a music player could be sensitive to the use flag "mp3" if it is there, it will install an mp3 decoder, and compile in such a way it can use it. If you know you won't need mp3, you can set -mp3, and it will remove this optional support. but if you install an mp3 encodin software, it won't pay attention to the useflag mp3, because for it, is it a core functionality, not an option.

Some use flags are defined for a large range of software (support for gnome, kde, X, dvd, ipv6....), some are specific to one package (activate/disactivate the mail client in mozzila, for instance)

by seting some use flags and unsetting others, you can specify to a quite fine level what kind of functionality you want your system to support. by unsetting everything you know you wont need, you get a system with less unneeded software install, thus saving disk space, possibly some speed. It is also nice to note that if there is a security bug in something you don't need, you can more easily let it out of you system thank to use flags.

Most binary distros compile with maximum options activated, so you won't miss anything, but this leed to a more-than-you-need system, with all the space waste and security risks implied.

I hope I have been clear enough, and not too dumb.

About having man pages on a server or not, I'd say keep them. they are not that big, they are not a program, so there is no security risk, they don't comsume processor unless you read them, and they might come in handy. your internet connexion my be down for a while. maybe by your fault. How to fix it if you don't have the doc? but if you really don't want them you can allway manualy remove the directory where they are stored. Not that i would do it, but you can.


Last edited by falcon_za on Wed Mar 30, 2005 4:22 pm; edited 1 time in total
Back to top
View user's profile Send private message
Athernigy
n00b
n00b


Joined: 30 Mar 2005
Posts: 25

PostPosted: Wed Mar 30, 2005 4:19 pm    Post subject: Reply with quote

"If you want to conserve disk space, just choose what to install very carefully. Also, use as few USE flags as possible to minimise program linkage to unnecessary libraries. And do not use genkernel if possible, compile the kernel manually and select only the options that you really need."

I am trying to figure out how I can start with a clean state, where there are no USE Flags ... and maybe I can add on to that?

I don't think I am explaining myself well enough ...


"If you are setting up a webserver, you may be interested in the discussion on "what USE flags to use?" here: https://forums.gentoo.org/viewtopic-t-316212.html"


Not that simple, because I am setting up a few machines. Some will have apache ... some wont, some will have postgre some wont.

I'd rather get a good understanding of what it is and how it works then use a generic version.
Back to top
View user's profile Send private message
Athernigy
n00b
n00b


Joined: 30 Mar 2005
Posts: 25

PostPosted: Wed Mar 30, 2005 4:29 pm    Post subject: Reply with quote

falcon_za wrote:
Let's say first things first. I will say very obvious things, but since I am not sure where you got it wrong, and what your knowledge level, better go from the begginning.

USE variable has an influence on how a program is compiled (ie: translated from human written/readable program to computer executable program). In some case, the original developper planned different possibilities for compilations, different options. if you compile this way, you will have support for feature A, if you compile that way, you wont. Sometimes, the developper didn't put any options, and there is only one way to build the program.

When there are options, USE flag is the way to tell the gentoo software installer (portage, via the command emerge) that which one you want to compile in. it may also have an influence on the dependecies, ie: what must be installed in addition to you program to let it work properly.

for example, a music player could be sensitive to the use flag "mp3" if it is there, it will install an mp3 decoder, and compile in such a way it can use it. If you know you won't need mp3, you can set -mp3, and it will remove this optional support. but if you install an mp3 encodin software, it won't pay attention to the useflag mp3, because for it, is it a core functionality, not an option.

Some use flags are defined for a large range of software (support for gnome, kde, X, dvd, ipv6....), some are specific to one package (activate/disactivate the mail client in mozzila, for instance)

by seting some use flags and unsetting others, you can specify to a quite fine level what kind of functionality you want your system to support. by unsetting everything you know you wont need, you get a system with less unneeded software install, thus saving disk space, possibly some speed. It is also nice to note that if there is a security bug in something you don't need, you can more easily let it out of you system thank to use flags.

Most binary distros compile with maximum options activated, so you won't miss anything, but this leed to a more-than-you-need system, with all the space waste and security risks implied.

I hope I have been clear enough, and not too dumb.

About having man pages on a server or not, I'd say keep them. they are not that big, they are not a program, so there is no security risk, they don't comsume processor unless you read them, and they might come in handy. your internet connexion my be down for a while. maybe by your fault. How to fix it if you don't have the doc? but if you really don't want them you can allway manualy remove the directory where they are stored. Not that i would do it, but you can.


Thanks, but I don't think I am asking my question the right way.

What kind of support does a USE flag control? Just manpages or what else?

Why does all this need to be set before the kernel install? Can the USE flag be changed after the initial install of gentoo for future 'emerge'?

Thank you.
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2969

PostPosted: Wed Mar 30, 2005 5:07 pm    Post subject: Reply with quote

Athernigy wrote:
What kind of support does a USE flag control? Just manpages or what else?

Why are you so infatuated with getting rid of manpages on a server? Why not Readmes, and info docs while you're at it?

To be precise, why do you think man pages are the ONLY things on earth that take up disk space? Don't the program executables take up hundreds and even thousands of times more space than the man pages? Should we get rid of these as well? :P

Moral of the story is that all programs will install documentation, and that includes not just man pages.

Back to your question. AFAIK, most USE flags control the features that are compiled directly into the program executable itself. You are free to argue whether manpages are compiled into the program, but common sense would say otherwise. :P

Also, no USE flag I know of will let you turn off installing manpages for the most popularly used programs, apache and mysql included.
Athernigy wrote:
Can the USE flag be changed after the initial install of gentoo for future 'emerge'?

You can reinstall a program with new USE flags by passing the --newuse option to emerge.

Also, in the future, please use the [quote="some person"] ... [/quote] BBCode tags to quote any other person's posts. Not using these tags makes your posts hard to read, to say the least.
Back to top
View user's profile Send private message
Athernigy
n00b
n00b


Joined: 30 Mar 2005
Posts: 25

PostPosted: Wed Mar 30, 2005 5:43 pm    Post subject: Reply with quote

kimchi_sg wrote:
Athernigy wrote:
What kind of support does a USE flag control? Just manpages or what else?

Why are you so infatuated with getting rid of manpages on a server? Why not Readmes, and info docs while you're at it?

To be precise, why do you think man pages are the ONLY things on earth that take up disk space? Don't the program executables take up hundreds and even thousands of times more space than the man pages? Should we get rid of these as well? :P


I figured there was an easy option to get rid of manpages through the USE flag, wasn't this the whole point? I'll gladly disable more things if there is a global way to do so.
The program executables are essential for the program to run, the manpages aren't.

Why is this turning into a thread about "manpages are good or bad"? This was never my intention ...

kimchi_sg wrote:

Moral of the story is that all programs will install documentation, and that includes not just man pages.

OKAY, but you said USE flags are for support. I guess this is non-manpage support?

kimchi_sg wrote:

Back to your question. AFAIK, most USE flags control the features that are compiled directly into the program executable itself. You are free to argue whether manpages are compiled into the program, but common sense would say otherwise. :P

When did I ever say a manpage should be compiled inside a program?

kimchi_sg wrote:

Also, no USE flag I know of will let you turn off installing manpages for the most popularly used programs, apache and mysql included.

OKAY, then what does apache support or mysql support mean in the USE tags? What kind of support is this. Can you give an exact example.

-------

This whole thing turned into a differen't conversation. Why does my idea of a server setup matter, and why are we even discussing this???

I just asked a simple question and I still haven't recieved an answer, all I am getting is confrontational attidute . You are just rewording the gentoo installation manual. I've read this already. Can someone explain what kind of support we are talking about here? Maybe it isn't even manpages, fine ... F that ... I just wanna know exactly what it includes.

From the mp3 example above, let's say we are installing a media player of some sort. What sorts of files will be installed with mp3 and what will be installed with -mp3?
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2969

PostPosted: Wed Mar 30, 2005 5:55 pm    Post subject: Reply with quote

Athernigy wrote:
From the mp3 example above, let's say we are installing a media player of some sort. What sorts of files will be installed with mp3 and what will be installed with -mp3?

I cannot say exactly. It depends on the package.

But it seems you have got the word "support" associated - wrongly - with manpages and documentation. This is not at all what the Handbook has in mind. The word "support" as Gentoo uses it refers to the optional capabilities or features of the program itself, in other words, what it can do, what hardware it can recognise (if it is a hardware-related USE flag), what other programs are linked into the program at compile time, etc.

Back to the example you've raised. If a media player has the mp3 USE flag, enabling this flag may download extra mp3 codecs and compile the player so that it can play mp3s with these codecs. Not having that USE flag would simply not download and compile these extra mp3 codecs into the player program, and the program would most likely not be able to play mp3s at all. In other words, the mp3 capability of the player is crippled without the mp3 USE flag.
Back to top
View user's profile Send private message
Athernigy
n00b
n00b


Joined: 30 Mar 2005
Posts: 25

PostPosted: Wed Mar 30, 2005 6:00 pm    Post subject: Reply with quote

kimchi_sg wrote:
Athernigy wrote:
From the mp3 example above, let's say we are installing a media player of some sort. What sorts of files will be installed with mp3 and what will be installed with -mp3?

I cannot say exactly. It depends on the package.

But it seems you have got the word "support" associated - wrongly - with manpages and documentation. This is not at all what the Handbook has in mind. The word "support" as Gentoo uses it refers to the optional capabilities or features of the program itself, in other words, what it can do, what hardware it can recognise (if it is a hardware-related USE flag), what other programs are linked into the program at compile time, etc.

Back to the example you've raised. If a media player has the mp3 USE flag, enabling this flag may download extra mp3 codecs and compile the player so that it can play mp3s with these codecs. Not having that USE flag would simply not download and compile these extra mp3 codecs into the player program, and the program would most likely not be able to play mp3s at all. In other words, the mp3 capability of the player is crippled without the mp3 USE flag.


THANKS!!! That's all I wanted to know. I guess I wasn't wording myself correctly.

One more question, in stage1 install, would modifying the USE variable and running --pretend show me what packages are going to be installed? I did a test install without a USE flag, and 99 packages were installed, I don't think I need all of this.
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2969

PostPosted: Wed Mar 30, 2005 6:08 pm    Post subject: Reply with quote

Athernigy wrote:
One more question, in stage1 install, would modifying the USE variable and running --pretend show me what packages are going to be installed? I did a test install without a USE flag,

"Install"? Using what command?
Athernigy wrote:
and 99 packages were installed, I don't think I need all of this.

And I don't think you will get a working system if you removed any of these.

If that command was emerge -e system, it specifies to install all the packages in the system profile - a set of packages determined by the Gentoo developers to be absolutely vital for any system running on a particular processor architecture (eg, x86, mips, sparc architectures). These packages are, as I've said, essential for your system to operate properly. Please follow the Handbook (online version preferably) carefully as you install - it will duly inform you when those packages that are really, truly, surely and definitely optional are to be considered for emerging.
Back to top
View user's profile Send private message
Athernigy
n00b
n00b


Joined: 30 Mar 2005
Posts: 25

PostPosted: Wed Mar 30, 2005 6:16 pm    Post subject: Reply with quote

Okay, so the USE flag will only be used strictly after the installation of gentoo is complete? (ie. meaning it isn't used within the installation of any parts of gentoo, the kernel, etc.)
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2969

PostPosted: Wed Mar 30, 2005 6:28 pm    Post subject: Reply with quote

Athernigy wrote:
Okay, so the USE flag will only be used strictly after the installation of gentoo is complete?

Just what are you referring to by "installation of Gentoo"?

Officially your installation of Gentoo does not end until after your first reboot. :roll:

Regarding USE flags usage:
The USE flag comes into effect anytime Portage is used - basically, every time that you use the emerge or ebuild commands.
Athernigy wrote:
(ie. meaning it isn't used within the installation of any parts of gentoo, the kernel, etc.)

Again, what "parts of Gentoo" are you referring to?

The USE flag (and anything else in make.conf, for that matter) are not used for compiling tasks which are not started by Portage. That includes the compiling of the kernel.
Back to top
View user's profile Send private message
Athernigy
n00b
n00b


Joined: 30 Mar 2005
Posts: 25

PostPosted: Thu Mar 31, 2005 4:37 am    Post subject: Reply with quote

Thx.

Do I need to explicitly turn each USE flag on or off? Meaning do I have to do mp3 or -mp3 (and so on for each flag)? ... or are some flags set by default, how can I find out which is set as what?
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2969

PostPosted: Thu Mar 31, 2005 4:59 am    Post subject: Reply with quote

Athernigy wrote:
are some flags set by default,

Yes.
Athernigy wrote:
how can I find out which is set as what?

Code:
emerge --info

This command will not show USE flags stored in package.use, though.
Back to top
View user's profile Send private message
tuam
l33t
l33t


Joined: 04 May 2004
Posts: 765
Location: CGN, Germany

PostPosted: Thu Mar 31, 2005 7:10 am    Post subject: Reply with quote

Athernigy wrote:
Do I need to explicitly turn each USE flag on or off? Meaning do I have to do mp3 or -mp3 (and so on for each flag)? ... or are some flags set by default, how can I find out which is set as what?


The defaults are set in "make.defaults" (see Gentoo Handbook).

You can turn off all flags with -*

However this will leave you with an unusable login prompt, because the "PAM" flag is required. :?

FF,

Daniel
Back to top
View user's profile Send private message
wjholden
l33t
l33t


Joined: 01 Mar 2004
Posts: 826
Location: Augusta, GA

PostPosted: Thu Mar 31, 2005 7:25 am    Post subject: Reply with quote

kimchi_sg wrote:
Athernigy wrote:
One more question, in stage1 install, would modifying the USE variable and running --pretend show me what packages are going to be installed? I did a test install without a USE flag,

"Install"? Using what command?
Hehe I hear you can install Gentoo with three commands...
Back to top
View user's profile Send private message
kimchi_sg
Advocate
Advocate


Joined: 26 Nov 2004
Posts: 2969

PostPosted: Thu Mar 31, 2005 8:35 am    Post subject: Reply with quote

destuxor wrote:
kimchi_sg wrote:
Athernigy wrote:
One more question, in stage1 install, would modifying the USE variable and running --pretend show me what packages are going to be installed? I did a test install without a USE flag,

"Install"? Using what command?
Hehe I hear you can install Gentoo with three commands...

:lol: :lol: :lol: :lol: :lol: :lol: :lol: :lol:

But I don't think that was what the OP had in mind. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum