Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Should we have a global server flag?
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  

Do you think client-server flags are a good idea?
Yes.
69%
 69%  [ 39 ]
No.
21%
 21%  [ 12 ]
WTF?
8%
 8%  [ 5 ]
Total Votes : 56

Author Message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Wed Dec 20, 2006 5:18 am    Post subject: Should we have a global server flag? Reply with quote

Was: Which pkgs need client/server flags?
Can we get suggestions for pkgs that need client-server flags? The idea would be to have 2 new flags representing client and server side builds of stuff like mySQL, samba, LDAP, kerberos and so on.

Further, if you have a pkg that currently builds with minimal and is not one you would want to be split into client and server can you list that too?

See this topic for background, and if you want to discuss the merits of the case; this thread should just be for pkg suggestions. Can we try not to get into a row. Ta.

edit: add bg topic
edit: this is now just a poll on whether we should have a global server flag (see below.)


Last edited by steveL on Sat Mar 10, 2007 1:28 am; edited 1 time in total
Back to top
View user's profile Send private message
BarBaar
n00b
n00b


Joined: 19 Dec 2006
Posts: 7

PostPosted: Wed Dec 20, 2006 9:58 am    Post subject: Reply with quote

You already mentioned the most important ones, I believe:

- MySQL
- OpenLDAP
- Kerberos
- Samba..

DHCP could be another one, but there already is a dhcp and dhcpcd package.
Back to top
View user's profile Send private message
Conan
Guru
Guru


Joined: 02 Nov 2004
Posts: 360

PostPosted: Wed Dec 20, 2006 3:45 pm    Post subject: Reply with quote

There have beena number of discussions about this
clicky
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Mon Jan 01, 2007 5:23 am    Post subject: Reply with quote

Conan wrote:
There have beena number of discussions about this
clicky

Thanks for the thread, I hadn't seen that one. It seems there's support from devs for the idea, although how that will translate into ebuilds is anyone's guess. They did say some ebuilds are using the flags already.

edit: tired
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Sat Mar 10, 2007 1:26 am    Post subject: Reply with quote

There's been a bit more discussion about this, so i thought i'd bump this; can anyone who has a view please express it?

For the people who voted wtf? the question is about pkgs like database servers or samba, a windows networking server. For many of us we want to install just the client-side in order to access these services, but the counter-position is that we should just build everything. (God knows why.) Seven packages in the tree use a local server flag including cvs. euse -i is your friend ;)

I guess one problem might be where neither is specified, which to my mind would default to client, as people who want to build the server side typically know they do. An alternative would be simply to have the server flag as these pkgs do (which means no flag defaults to client-side.) That I think would be cool.

So changing it slightly, who's in favour of a global server flag which users can set for specific pkgs as required?
Back to top
View user's profile Send private message
dev-zero
Developer
Developer


Joined: 07 Mar 2007
Posts: 6
Location: Zürich

PostPosted: Wed Mar 14, 2007 8:23 pm    Post subject: Why I voted "no" Reply with quote

Hi everyone

While I think that we need a solution there, the server/client USE-flag is in my opinion not the right solution. Not now and not if we finally get USE-based dependencies, I'd rather propose a sane splitting of packages (don't worry, I won't propose a -dev,-header,-common,-client,-server structure :-) )

Rather than talking about introducing global USE-flags, we should discuss the different USE-cases and try to implement the most common ones.

For example:
Use-Case 1: The user installs kde and since he knows that he has to be able to browse samba-shares he sets the samba USE-flag.
Use-Case 2: The user builds binary packages for 300 machines where all of them need samba-support in kde and gnome and the users of two machines need the server as well.
Use-Case 3: The user builds a small home-server with samba shares.

UC-1 tells us to introduce a server USE-flag. But UC-2 rather implies to have seperate packages, namely: samba and samba-server. UC-3 implies either a serveronly USE-flag or the same as UC-2.
Result: To implement the USE-cases, splitting samba into two packages seems to be the way.
And this is also what I'm going to try in the next two weeks :-)

Cheers,
dev-zero
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Thu Mar 15, 2007 10:56 am    Post subject: Re: Why I voted "no" Reply with quote

dev-zero wrote:
While I think that we need a solution there, the server/client USE-flag is in my opinion not the right solution. Not now and not if we finally get USE-based dependencies, I'd rather propose a sane splitting of packages (don't worry, I won't propose a -dev,-header,-common,-client,-server structure :-) )
Hey, glad to know the devs haven't all gone awol and still have some time for us usrs.
Quote:
Rather than talking about introducing global USE-flags, we should discuss the different USE-cases and try to implement the most common ones.

For example:
Use-Case 1: The user installs kde and since he knows that he has to be able to browse samba-shares he sets the samba USE-flag.
Use-Case 2: The user builds binary packages for 300 machines where all of them need samba-support in kde and gnome and the users of two machines need the server as well.
Use-Case 3: The user builds a small home-server with samba shares.

UC-1 tells us to introduce a server USE-flag. But UC-2 rather implies to have seperate packages, namely: samba and samba-server. UC-3 implies either a serveronly USE-flag or the same as UC-2.
Result: To implement the USE-cases, splitting samba into two packages seems to be the way.
And this is also what I'm going to try in the next two weeks :-)

Um before you do any of that with samba, maybe you could look at this topic which seems to be saying we only need to compile two files in order to have a samba client.

wrt to Use-Cases, 1 and 3 are normal usrs; in 1 the usr wouldn't use a server flag, in 3 she would for the samba pkg. In case 2 the usr who is in fact a sysadmin for a fairly large org, would build the normal set with samba USE flag and no server flag to distribute to the 300 usrs as binaries. The 2 other usrs could simply build their own with the server flag or the admin could do it as binaries. What's the issue?
Back to top
View user's profile Send private message
dev-zero
Developer
Developer


Joined: 07 Mar 2007
Posts: 6
Location: Zürich

PostPosted: Thu Mar 15, 2007 11:50 am    Post subject: Re: Why I voted "no" Reply with quote

Hi steveL

Do you mind to spellcheck before posting next time? (if I'm not wrong, "/usr" is not a short version of "user" but a short version of "*nix system resources")

steveL wrote:
dev-zero wrote:
While I think that we need a solution there, the server/client USE-flag is in my opinion not the right solution. Not now and not if we finally get USE-based dependencies, I'd rather propose a sane splitting of packages (don't worry, I won't propose a -dev,-header,-common,-client,-server structure :-) )
Hey, glad to know the devs haven't all gone awol and still have some time for us usrs.
Quote:
Rather than talking about introducing global USE-flags, we should discuss the different USE-cases and try to implement the most common ones.

For example:
Use-Case 1: The user installs kde and since he knows that he has to be able to browse samba-shares he sets the samba USE-flag.
Use-Case 2: The user builds binary packages for 300 machines where all of them need samba-support in kde and gnome and the users of two machines need the server as well.
Use-Case 3: The user builds a small home-server with samba shares.

UC-1 tells us to introduce a server USE-flag. But UC-2 rather implies to have seperate packages, namely: samba and samba-server. UC-3 implies either a serveronly USE-flag or the same as UC-2.
Result: To implement the USE-cases, splitting samba into two packages seems to be the way.
And this is also what I'm going to try in the next two weeks :-)

Um before you do any of that with samba, maybe you could look at this topic which seems to be saying we only need to compile two files in order to have a samba client.

This is only an app to "tell" the kernel how to mount a volume using the cifs-module. But I'm talking about smbclient which needs a bit more than two files.
Quote:


wrt to Use-Cases, 1 and 3 are normal usrs; in 1 the usr wouldn't use a server flag, in 3 she would for the samba pkg. In case 2 the usr who is in fact a sysadmin for a fairly large org, would build the normal set with samba USE flag and no server flag to distribute to the 300 usrs as binaries. The 2 other usrs could simply build their own with the server flag or the admin could do it as binaries. What's the issue?


UC-1 can be solved with a server USE-flag, but that means the user has to recompile the complete libraries and the client-apps and if he doesn't want that he has to decide while building kde whether he wants to run a server or not which will probably lead to the situation where many users have the server USE-flag set "just in case".
For UC-2: The admin would have to provide a second binpkg-repository where the samba-package is compiled with the server USE-flag because the binary package name doesn't (and also can't) depend on the USE-flags. And it makes it therefore impossible to update those two machines automatically anymore because every update with the binpkg-repo generated for the other 298 machines would overwrite it (remember: this is only an example for samba which applies to other packages as well, for example postgresql).
The point of UC-3 is that the user would probably like to build the server but not the client nor the libraries because of space-constraints (the system with the apps could be on a small flash-disk while the real storage device is attached via USB).

(I have notifications enabled, there's no need to send me a separate message)
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Thu Mar 15, 2007 12:40 pm    Post subject: Re: Why I voted "no" Reply with quote

dev-zero wrote:
Do you mind to spellcheck before posting next time? (if I'm not wrong, "/usr" is not a short version of "user" but a short version of "*nix system resources")
OK. I thought usr (no /) was short for user as in userland; that's what /usr means afaiui- not for programmers (kernel v usr), but for sysadmins. In any case, most projects I have worked on, we just say usr as it saves typing. (If you don't mind, I will continue to use it in my posts for that reason.)
Quote:
steveL wrote:
Um before you do any of that with samba, maybe you could look at this topic which seems to be saying we only need to compile two files in order to have a samba client.

This is only an app to "tell" the kernel how to mount a volume using the cifs-module. But I'm talking about smbclient which needs a bit more than two files.
OK I only have experience of it as a usr, so i wouldn't know exactly what is required.
Quote:
Quote:
wrt to Use-Cases, 1 and 3 are normal usrs; in 1 the usr wouldn't use a server flag, in 3 she would for the samba pkg. In case 2 the usr who is in fact a sysadmin for a fairly large org, would build the normal set with samba USE flag and no server flag to distribute to the 300 usrs as binaries. The 2 other usrs could simply build their own with the server flag or the admin could do it as binaries. What's the issue?


UC-1 can be solved with a server USE-flag, but that means the user has to recompile the complete libraries and the client-apps and if he doesn't want that he has to decide while building kde whether he wants to run a server or not which will probably lead to the situation where many users have the server USE-flag set "just in case".
Leaving samba aside for one sec, as I agree that some might well want to have an AD server on their desktop, and talking about this generally (eg LDAP, KRB, mySQL,cvs etc) I don't see the issue with the default being only to compile client stuff. Someone who wants to run one of these as a server (mySQL is prob'y the most common) can do a little reading, and the pkg could provide an ewarn with a url. I don't understand your point about recompiling the complete libs; most usrs wil be happy with the client-side, and those that want more can recompile. So effectively all those happy with just a client will be saving a shed-load of compile time and space, while those who want more will be doing exactly the same as now.
Quote:
For UC-2: The admin would have to provide a second binpkg-repository where the samba-package is compiled with the server USE-flag because the binary package name doesn't (and also can't) depend on the USE-flags. And it makes it therefore impossible to update those two machines automatically anymore because every update with the binpkg-repo generated for the other 298 machines would overwrite it (remember: this is only an example for samba which applies to other packages as well, for example postgresql).

Before I check that bug, I'd just like to say this is hardly the common case. Supporting it is simply a case of having a different bin repo for server machines which strikes me as a sensible idea, or indeed asking the usr to compile themselves. After all the other 298 ppl would be fine and have much less to download saving on bandwidth and "enhancing the user experience."
Quote:
The point of UC-3 is that the user would probably like to build the server but not the client nor the libraries because of space-constraints (the system with the apps could be on a small flash-disk while the real storage device is attached via USB).
Um sorry, but that's hardly the same as
"The user builds a small home-server with samba shares," which is the more common case of someone with an old 486 or Pentium which while it might have enough hard disk, is not going to have the CPU to run as a ``leet'' desktop. If they want to put it on a flash-disk device, they're not the common case, and can find info on the web themselves.
Quote:
(I have notifications enabled, there's no need to send me a separate message)
Ah sorry ;)
Back to top
View user's profile Send private message
sternklang
Veteran
Veteran


Joined: 10 Sep 2005
Posts: 1641
Location: Somewhere in time and space

PostPosted: Thu Mar 15, 2007 1:35 pm    Post subject: Reply with quote

Given the relatively small number of packages we are talking about and the different server roles on a network, I think it makes more sense to split them into server/client packages if possible.

I can see use cases where you are running a desktop system but want to share files with windows pcs on the network, so need samba server and no other server. Or you need kerberos clients on some machines, SQL clients on some machines, SQL servers on a couple, samba clients on some machines, etc. If you end up having to put "client" and "server" flags for each package in package.use to control this, what advantage do you get over emerging the specific server/client packages each system needs?

The USE flag might be a simple solution for a home network with one clearly defined server doing everything, but for managing a larger business/university network separate packages seem to me to be the way to go.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Thu Mar 15, 2007 2:08 pm    Post subject: Reply with quote

sternklang wrote:
Given the relatively small number of packages we are talking about and the different server roles on a network, I think it makes more sense to split them into server/client packages if possible.

I'm fairly sure this option has been discussed and rejected by the devs.
Quote:
I can see use cases where you are running a desktop system but want to share files with windows pcs on the network, so need samba server and no other server. Or you need kerberos clients on some machines, SQL clients on some machines, SQL servers on a couple, samba clients on some machines, etc. If you end up having to put "client" and "server" flags for each package in package.use to control this, what advantage do you get over emerging the specific server/client packages each system needs?

It's not a question of putting client or server any more; it's now about whether you get client by default and then add server to a specific pkg.
Quote:
The USE flag might be a simple solution for a home network with one clearly defined server doing everything, but for managing a larger business/university network separate packages seem to me to be the way to go.

It'd work on a network with several servers too.
On a large network with lots of clients, you'd probably have a binhost (or waste a load of time ;) Adding another binhost because you have lots of servers would also be a smart move.
Back to top
View user's profile Send private message
sternklang
Veteran
Veteran


Joined: 10 Sep 2005
Posts: 1641
Location: Somewhere in time and space

PostPosted: Sat Mar 17, 2007 1:32 am    Post subject: Reply with quote

steveL wrote:
sternklang wrote:
I can see use cases where you are running a desktop system but want to share files with windows pcs on the network, so need samba server and no other server. Or you need kerberos clients on some machines, SQL clients on some machines, SQL servers on a couple, samba clients on some machines, etc. If you end up having to put "client" and "server" flags for each package in package.use to control this, what advantage do you get over emerging the specific server/client packages each system needs?

It's not a question of putting client or server any more; it's now about whether you get client by default and then add server to a specific pkg.

I don't know why client should be the default -- I think there are no good numbers on desktop vs. server usage for Gentoo, but I have installed and administered it for both. You may or may not be right about separate client/server packages being dismissed by the devs, but it is the approach that makes the most sense to me (when the upstream packages allow this, of course).

steveL wrote:
sternklang wrote:
The USE flag might be a simple solution for a home network with one clearly defined server doing everything, but for managing a larger business/university network separate packages seem to me to be the way to go.

It'd work on a network with several servers too.
On a large network with lots of clients, you'd probably have a binhost (or waste a load of time ;) Adding another binhost because you have lots of servers would also be a smart move.

Actually, that's another argument in favor of separate client/server packages. In your scenario the binhost would have to build the server-only version of a package for some systems, the client-only for others and client/server for still others. I don't think that's even possible on a single binhost, since the actual package would be the same in all three cases but would differ in USE flags. With separate packages, both client and server packages would be built on the binhost but the other hosts would only emerge the binary packages, client, server or both, that was appropriate for their roles on the network.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Sat Mar 17, 2007 11:35 am    Post subject: Reply with quote

sternklang wrote:
steveL wrote:
It's not a question of putting client or server any more; it's now about whether you get client by default and then add server to a specific pkg.

I don't know why client should be the default -- I think there are no good numbers on desktop vs. server usage for Gentoo, but I have installed and administered it for both. You may or may not be right about separate client/server packages being dismissed by the devs, but it is the approach that makes the most sense to me (when the upstream packages allow this, of course).

Well it's just that if you want a server for some reason you typically know that you do. Quickly adding a server flag to package.use and remerging doesn't seem like much to ask of an admin.
I agree that client/server pkg is a natural fit to how the user sees it tho, it's how I think about it too. :)
Quote:
steveL wrote:
It'd work on a network with several servers too.
On a large network with lots of clients, you'd probably have a binhost (or waste a load of time ;) Adding another binhost because you have lots of servers would also be a smart move.

Actually, that's another argument in favor of separate client/server packages. In your scenario the binhost would have to build the server-only version of a package for some systems, the client-only for others and client/server for still others. I don't think that's even possible on a single binhost, since the actual package would be the same in all three cases but would differ in USE flags. With separate packages, both client and server packages would be built on the binhost but the other hosts would only emerge the binary packages, client, server or both, that was appropriate for their roles on the network.

Not quite; in that scenario, I' d have two binhosts, one for desktops, one for servers (if I had that many servers ;) and let the devs just make their own.
edit: fixed quote, sorry.
Back to top
View user's profile Send private message
jesnow
Guru
Guru


Joined: 26 Apr 2006
Posts: 558

PostPosted: Sun Mar 18, 2007 3:16 am    Post subject: Reply with quote

Let me offer two more user cases:

UC 4: User is in a big organization and has *no* need for a server, as there are servers enough.
UC 5: User is building a small system on a laptop with limited disk capacity, and needs access to files hosted on his desktop.

In keepeing with the spirit of the samba package, you would want to have a full samba install be the default, and offer the USe flag 'samba-client-only' that would only build the client-side binaries.

My $0.02 as a longtime samba user who set up UC 5 by hand last week.

https://forums.gentoo.org/viewtopic-t-544664-highlight-.html

Jon
Back to top
View user's profile Send private message
Drysh
Apprentice
Apprentice


Joined: 06 Apr 2005
Posts: 203
Location: São Paulo, Brazil

PostPosted: Sun Mar 18, 2007 4:58 am    Post subject: Reply with quote

I voted YES, but I'm reconsidering it now. IMHO:

Use flags are for things that affect the system. There is no point in creating a use flag if you have to set it diferently for each package. Consider the following:

You are setting a mix of win and linux systems for an office. You have a machine that will be your file server and will need to access your database server (so: samba server, mysql client). For the database server, you will need mysql server and samba client. For the desktops you will need both clients.

It's much easier to have different packages. It isn't something that will set your system as a whole. You will need to think if you need the server and/or the client for each package.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Sun Mar 18, 2007 5:27 am    Post subject: Reply with quote

Drysh wrote:
Use flags are for things that affect the system. There is no point in creating a use flag if you have to set it diferently for each package.
What about doc then?
While server might be a global flag, it isn't something you'd set for every pkg (unless you only had one server on your network.)
Quote:
You are setting a mix of win and linux systems for an office. You have a machine that will be your file server and will need to access your database server (so: samba server, mysql client). For the database server, you will need mysql server and samba client. For the desktops you will need both clients.

It's much easier to have different packages. It isn't something that will set your system as a whole. You will need to think if you need the server and/or the client for each package.

That's exactly right; if you want a server for a particular reason, think about it and set the flag for that server for the specific machine. So in your scenario, your file server has <cat>/samba server in its package.use, the db server has dev-db/mysql server. That's it, two lines! Every other machine has no use flags (that are relevant to this discussion.) I'd have a binhost (the file server) from which all machines get their client packages, ie all of them. The only machine that wouldn't is the mysql server, and that only for /one/ pkg.

What's the problem with that sol'n?
Back to top
View user's profile Send private message
jesnow
Guru
Guru


Joined: 26 Apr 2006
Posts: 558

PostPosted: Wed Mar 21, 2007 2:01 am    Post subject: Reply with quote

Still the vast majority of machines are either clients or servers. If all you run is servers under linux
then ok, a server flag is useless. But if you have desktop users who are client only (X is a special case) then that flag will lead to a much slimmer system for them.

steveL wrote:
Drysh wrote:
Use flags are for things that affect the system. There is no point in creating a use flag if you have to set it diferently for each package.
What about doc then?
While server might be a global flag, it isn't something you'd set for every pkg (unless you only had one server on your network.)
Quote:
You are setting a mix of win and linux systems for an office. You have a machine that will be your file server and will need to access your database server (so: samba server, mysql client). For the database server, you will need mysql server and samba client. For the desktops you will need both clients.

It's much easier to have different packages. It isn't something that will set your system as a whole. You will need to think if you need the server and/or the client for each package.

That's exactly right; if you want a server for a particular reason, think about it and set the flag for that server for the specific machine. So in your scenario, your file server has <cat>/samba server in its package.use, the db server has dev-db/mysql server. That's it, two lines! Every other machine has no use flags (that are relevant to this discussion.) I'd have a binhost (the file server) from which all machines get their client packages, ie all of them. The only machine that wouldn't is the mysql server, and that only for /one/ pkg.

What's the problem with that sol'n?
Back to top
View user's profile Send private message
Drysh
Apprentice
Apprentice


Joined: 06 Apr 2005
Posts: 203
Location: São Paulo, Brazil

PostPosted: Wed Mar 21, 2007 3:44 am    Post subject: Reply with quote

@steveL - Isn't it easier to have something called samba-server and another package for samba-client? Why would it be a use flag instead of multiple packages if you have to set for each package?

@jesnow - I don't see how. Instead of setting a use flag, you will just have to emerge the right packages.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Wed Mar 21, 2007 4:35 am    Post subject: Reply with quote

Drysh wrote:
@steveL - Isn't it easier to have something called samba-server and another package for samba-client? Why would it be a use flag instead of multiple packages if you have to set for each package?
Not really for a source based distro. As for setting it for multiple packages, you don't have to; you can set the server flag now in make.conf, and seven packages (including vnc and cvs) will then build the actual server part. The point is that most of the time people just want the client, and there's no way to get that with eg samba or kerberos.
Back to top
View user's profile Send private message
Conan
Guru
Guru


Joined: 02 Nov 2004
Posts: 360

PostPosted: Wed Mar 21, 2007 4:58 am    Post subject: Reply with quote

mm, and what about mysql?
In most cases the server is the part that is desired when it is emerged, not just the client.
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Wed Mar 21, 2007 5:34 am    Post subject: Reply with quote

Conan wrote:
mm, and what about mysql?
In most cases the server is the part that is desired when it is emerged, not just the client.
It varies doesn't it? In any case, what's wrong with adding server to package.use for mySQL? I wanted the server, and I knew I did, in the same way that someone installing a server pkg on another distro would.

But I might well have wanted a web server which accesses a mySQL server over the network. The web server in that instance really doesn't need the server part of mySQL.
Back to top
View user's profile Send private message
jesnow
Guru
Guru


Joined: 26 Apr 2006
Posts: 558

PostPosted: Thu Mar 22, 2007 2:59 am    Post subject: Reply with quote

Drysh wrote:
@steveL - Isn't it easier to have something called samba-server and another package for samba-client? Why would it be a use flag instead of multiple packages if you have to set for each package?

@jesnow - I don't see how. Instead of setting a use flag, you will just have to emerge the right packages.


I'd be happy either way -- right now I have to roll it myself by hand, which in the case of samba is not hard:
https://forums.gentoo.org/viewtopic-t-544664-highlight-.html

*but* I'd rather have a native gentoo way of doing it.

Cheers, most respectfully

Jon.
Back to top
View user's profile Send private message
Drysh
Apprentice
Apprentice


Joined: 06 Apr 2005
Posts: 203
Location: São Paulo, Brazil

PostPosted: Thu Mar 22, 2007 7:06 pm    Post subject: Reply with quote

I ran into another problem today:
- I needed a machine that would run as a mysql server part of the time and as a mysql client the rest of it.

Using two separate packages: I could start the server and the client in one runlevel, but just the client in another. So switching the run level I could change a server into a client.

How is it possible with flags? Would every package have an option to select if it is running in server mode or client mode?

I used a similar strategy for apache some time ago (I needed it on server run level only). That made the machine faster while using client run level (well.. Not exactly faster, because I emerged some things that a server won't need, and added to the client run level).
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 4844
Location: The Peanut Gallery

PostPosted: Thu Mar 22, 2007 8:07 pm    Post subject: Reply with quote

Drysh wrote:
Using two separate packages: I could start the server and the client in one runlevel, but just the client in another. So switching the run level I could change a server into a client.

How is it possible with flags? Would every package have an option to select if it is running in server mode or client mode?

I used a similar strategy for apache some time ago (I needed it on server run level only). That made the machine faster while using client run level (well.. Not exactly faster, because I emerged some things that a server won't need, and added to the client run level).

USE flags are not about run-time, but install-time.
Not every package has to use the server flag in any case. It's up to the ebuild maintainer to decide whether they think it's worth it. I'd envisage mySQL built with the server flag to build what it does now, the whole package, which would mean you have both client and server.

As for your use case, when running as client, you don't start a server in any case. So you'd only have mysqld starting in one of the run-levels. The client-side might be a program the user runs to access a server, like the mySQL console.
Back to top
View user's profile Send private message
Drysh
Apprentice
Apprentice


Joined: 06 Apr 2005
Posts: 203
Location: São Paulo, Brazil

PostPosted: Fri Mar 23, 2007 5:37 pm    Post subject: Reply with quote

I know what USE flags are.

My question was, if for runlevel x we need the server, and for runlevel y we need the client, how do we do?

Using two packages, we add the server package in runlevel x and the cleint package in runlevel y.

If we start using use flags, they will be the same package. So, how do I set which behavior I want for each runlevel?

What's the advantage of using USE flags instead of having multiple packages?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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