[opensuse-buildservice] Requiring a generic webserver
Hello, I'm starting to learn OBS and for that I'm trying to package a program that requires a webserver to be installed. I've looked at a sample spec file from a Fedora RPM and it simply solves the problem by specifying: Requires: webserver So I'm wondering, is this possible in OBS/OpenSUSE? Is 'webserver' a meta-package that let's the user choose between the available webservers? (apache, cherokee,...) BTW, it happens the same with the dependency "smtp-daemon" in this fedora rpm I'm mentioning. And I recently asked a question on IRC about this, but related to database engines so, if this is supported, can I do something similar for requiring mysql OR postgresql? (As I've been told that rpm doesn't support this out of the box; I wonder if we should advocate for a RFE upstream about a new "packageor()" keyword.) Thanks in advance, Andrés -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2008-08-29 18:00:57 +0200, "Andrés G. Aragoneses" wrote:
Hello, I'm starting to learn OBS and for that I'm trying to package a program that requires a webserver to be installed. I've looked at a sample spec file from a Fedora RPM and it simply solves the problem by specifying:
Requires: webserver
So I'm wondering, is this possible in OBS/OpenSUSE? Is 'webserver' a meta-package that let's the user choose between the available webservers? (apache, cherokee,...)
You could use httpd or http_daemon (at least apache2 provides these, although not all webservers (like lighttpd) have it).
BTW, it happens the same with the dependency "smtp-daemon" in this fedora rpm I'm mentioning. Yes smtp-daemon is available on suse too.
And I recently asked a question on IRC about this, but related to database engines so, if this is supported, can I do something similar for requiring mysql OR postgresql? (As I've been told that rpm doesn't support this out of the box; I wonder if we should advocate for a RFE upstream about a new "packageor()" keyword.)
You might want to use "Suggests" or "Recommends". Marcus --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Marcus Hüwe escribió:
You might want to use "Suggests" or "Recommends".
Be aware. "Suggests" does nothing ;P -- "A computer is like an Old Testament god, with a lot of rules and no mercy. " Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/
Cristian Rodríguez wrote:
Marcus Hüwe escribió:
You might want to use "Suggests" or "Recommends".
Be aware. "Suggests" does nothing ;P
I was going to ask the difference between those two, so, is that the difference? Suggests is just useless? Where is all this documented? Andrés -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
On 2008-08-30 14:30:28 +0200, "Andrés G. Aragoneses" wrote:
Cristian Rodríguez wrote:
Marcus Hüwe escribió:
You might want to use "Suggests" or "Recommends".
Be aware. "Suggests" does nothing ;P
I was going to ask the difference between those two, so, is that the difference? Suggests is just useless? Where is all this documented?
Have a look at http://en.opensuse.org/Software_Management/Dependencies#Weak_dependencies Marcus --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Marcus Hüwe wrote:
On 2008-08-30 14:30:28 +0200, "Andrés G. Aragoneses" wrote:
Cristian Rodríguez wrote:
Marcus Hüwe escribió:
You might want to use "Suggests" or "Recommends". Be aware. "Suggests" does nothing ;P
I was going to ask the difference between those two, so, is that the difference? Suggests is just useless? Where is all this documented?
Have a look at http://en.opensuse.org/Software_Management/Dependencies#Weak_dependencies
Thanks, that's what I needed. The problem about using Recommends in this case is that if I recommend both postgresql and mysql, it can happen that both are installed. Isn't there a better way for "dual dependencies" like this? If not, is this already discussed upstream in the RPM community? Any RFE already filed there? Thanks, Andrés -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hi Andres,
So I'm wondering, is this possible in OBS/OpenSUSE? Is 'webserver' a meta-package that let's the user choose between the available webservers? (apache, cherokee,...)
I guess, the most widely used http-daemon might be "apache2", so you might add apache as you webserver. but keep in mind that SLED does not support "apache2", use "lighttpd" instead.
BTW, it happens the same with the dependency "smtp-daemon" in this fedora rpm I'm mentioning. And I recently asked a question on IRC about this, but related to database engines so, if this is supported, can I do something similar for requiring mysql OR postgresql? (As I've been told that rpm doesn't support this out of the box; I wonder if we should advocate for a RFE upstream about a new "packageor()" keyword.)
I am not very sure about what do you want? smtp-daemon or database? "postfix" would be a good choice for smtp-daemon and "mysql" is OK for database. :) regards. --- Ray Wang (王磊) PRC Beijing Linux R&D Engineer Novell Software (Beijing) Ltd http://www.novell.com --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Hey Ray! Ray Wang wrote:
Hi Andres,
So I'm wondering, is this possible in OBS/OpenSUSE? Is 'webserver' a meta-package that let's the user choose between the available webservers? (apache, cherokee,...)
I guess, the most widely used http-daemon might be "apache2", so you might add apache as you webserver. but keep in mind that SLED does not support "apache2", use "lighttpd" instead.
Mmm, apache2 is not present in SLED?? Well, I guess then that my package will only be available in SLES and Opensuse... (indeed, it's server side software so...)
BTW, it happens the same with the dependency "smtp-daemon" in this fedora rpm I'm mentioning. And I recently asked a question on IRC about this, but related to database engines so, if this is supported, can I do something similar for requiring mysql OR postgresql? (As I've been told that rpm doesn't support this out of the box; I wonder if we should advocate for a RFE upstream about a new "packageor()" keyword.)
I am not very sure about what do you want? smtp-daemon or database? "postfix" would be a good choice for smtp-daemon and "mysql" is OK for database.
But this is the thing I want to avoid: I don't want to select a preference of mine, the user should select. Andrés -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Andrés G. Aragoneses escribió:
can I do something similar for requiring mysql OR postgresql?
It can be done, however remeber that database servers may reside in a different machine as well. -- "A computer is like an Old Testament god, with a lot of rules and no mercy. " Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/
Cristian Rodríguez wrote:
Andrés G. Aragoneses escribió:
can I do something similar for requiring mysql OR postgresql?
It can be done, however remeber that database servers may reside in a different machine as well.
Good point - the package shouldn't require the database _server_, but the client library. Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michal Marek wrote:
Cristian Rodríguez wrote:
Andrés G. Aragoneses escribió:
can I do something similar for requiring mysql OR postgresql? It can be done, however remeber that database servers may reside in a different machine as well.
However, I was expecting that most people that would use RPM for installing the package will be interested in a kind of "default install". For distributed installs in which you want the DB engine in other host it's more usual for the people to do a manual installation because they will need to tweak the configuration. My typical use case for this RPM is: install it, and run out of the box. And that implies that, either if mysql or postgresql are used, my RPM will be in charge of creating the initial database. And that is less doable for the "DB in other host" approach because it would require asking some questions to the user 'a-la wizard' in the moment of RPM installation, and IIRC this is not supported, right? (The only system I've seen that asks you configuration questions when installing packages is apt-get.)
Good point - the package shouldn't require the database _server_, but the client library.
But, as I've explained my targets above, my ideal RPM would consist of one that obligues you to install one of these packages as a strong dependency: a) mysql b) posgresql And, if (a) is selected, also have a sub-dependency to perl-DBD-mysql. If (b) is selected, have a sub-dependency to perl-DBD-Pg. Is that doable with current RPM technology and/or OpenSuseBuildService? Thanks, Andrés -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Andrés G. Aragoneses escribió:
my RPM will be in charge of creating the initial database.
huh, good luck with that :) And that is less
doable for the "DB in other host" approach because it would require asking some questions to the user 'a-la wizard' in the moment of RPM installation, and IIRC this is not supported, right?
Right. (The only system
I've seen that asks you configuration questions when installing packages is apt-get.)
do you mean debconf right ?
But, as I've explained my targets above, my ideal RPM would consist of one that obligues you to install one of these packages as a strong dependency:
a) mysql b) posgresql
And, if (a) is selected, also have a sub-dependency to perl-DBD-mysql. If (b) is selected, have a sub-dependency to perl-DBD-Pg.
Is that doable with current RPM technology and/or OpenSuseBuildService?
according to my knowledge, no, you cant. -- "A computer is like an Old Testament god, with a lot of rules and no mercy. " Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/
Hello, on Montag, 1. September 2008, Cristian Rodríguez wrote: ... [hard-require mysql _or_ posgresql]
And, if (a) is selected, also have a sub-dependency to perl-DBD-mysql. If (b) is selected, have a sub-dependency to perl-DBD-Pg.
Is that doable with current RPM technology and/or OpenSuseBuildService?
according to my knowledge, no, you cant.
You probably can, with some tricks ;-) Method 1: Create two patterns (yourpackage-mysql and yourpackage-posgresql) which require the needed packages Method 2: Create subpackages yourpackage-mysql and yourpackage-postresql. Both should provide yourpackage-database, which should be required in your main package. (The nice thing about this: you could put the config file in the database specific package so that the correct database is preconfigured.) That said: I'm not sure if this is really worth the effort. Decide yourself ;-) Regards, Christian Boltz -- Linux wurde nur möglich, weil 20 Jahre Betriessystemforschung sorgfältig studiert, analysiert, diskutiert und verworfen wurden. [Ingo Molnar auf linux-kernel] --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Andrés G. Aragoneses wrote:
BTW, it happens the same with the dependency "smtp-daemon" in this fedora rpm I'm mentioning. And I recently asked a question on IRC about this, but related to database engines so, if this is supported, can I do something similar for requiring mysql OR postgresql?
smtp_daemon and http_daemon work for mail and web servers. It would be trivial to add Provides: sql_database to mysql and postgresql, but do packages that "need either MySQL or PostgreSQL" really work out of the box with both servers? If I install your package and mysql, will it just work if I remove mysql and install postgres without reconfiguring anything? Unlike web and mail servers, database servers are so much different, because only the query language is kind of standardized, not the network protocol (if any), client library APIs or commandline tools. That's why there's no virtual provides for that. Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
Michal Marek wrote:
Andrés G. Aragoneses wrote:
BTW, it happens the same with the dependency "smtp-daemon" in this fedora rpm I'm mentioning. And I recently asked a question on IRC about this, but related to database engines so, if this is supported, can I do something similar for requiring mysql OR postgresql?
smtp_daemon and http_daemon work for mail and web servers. It would be trivial to add Provides: sql_database to mysql and postgresql, but do
However, for my concrete needs this wouldn't be enough, because I guess that other non-supported DB-engine would provide "sql_database" as well, and then the package won't work for that cases. So the only solution I guess would be to use "Provides: mysql_or_postgresql" in both MySQL and PostgreSQL packages, right? But I guess that's not something that's going to be included upstream, because it would open the door to a lot of "dual dependency" requests from other package maintainers, right?
packages that "need either MySQL or PostgreSQL" really work out of the box with both servers? If I install your package and mysql, will it just work if I remove mysql and install postgres without reconfiguring anything?
Mmmm, good point! Suppose it's possible for my RPM to stablish this dual-dependency to mysql||postgresql. When installed for the first time, the RPM would create the initial database on the db-engine selected. But, let's say someone chose mysql, could my RPM detect when someone uninstalls mysql and posgresql in order to replicate the tables into a similar DB? I guess this is a fairly complicated scenario. Not to mention that I don't know how I should handle the scenario when both mysql and postgresql are installed prior to installing my RPM, how could the package manager ask the user the DB-engine to use (as opposed to asking the DB-engine to install, as mentioned earlier)?
Unlike web and mail servers, database servers are so much different, because only the query language is kind of standardized, not the network protocol (if any), client library APIs or commandline tools. That's why there's no virtual provides for that.
--------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org
participants (6)
-
"Andrés G. Aragoneses"
-
Christian Boltz
-
Cristian Rodríguez
-
Marcus Hüwe
-
Michal Marek
-
Ray Wang