[opensuse-packaging] Which dependencies should I set?
![](https://seccdn.libravatar.org/avatar/e76779f0629280df6d2dfce07e4e1600.jpg?s=120&d=mm&r=g)
Hello, I have an interesting question: Which dependencies should I set for Postfixadmin? (package is postfixadmin-svn in home:cboltz, specfile is attached for easier access) Short summary: - Postfixadmin is a PHP web interface, used for administration of virtual domains in postfix - it can use MySQL and PostgreSQL as database Now to the dependency problems: - php-mysql and/or php-pgsql? One of them is always unused, but you never know which one in advance (from RPM's POV) - Should I require MySQL and/or PostgreSQL? You never know which one is used, and accessing the database on another machine is also possible, so technically none of them is really needed. - Should I require Postfix? Sure, Postfixadmin is used to administrate it, but it's the same as with MySQL: It could run on another machine. Postfixadmin also comes with a vacation script, which needs a user "vacation" and some additions to the postfix config. - should I create the user "vacation" in %pre? - if yes, should I delete it again in %preun? How to avoid this on package updates? - is it a good idea to add some lines to /etc/postfix/master.cf auto- matically ("grep vacation master.cf || cat some_lines >> master.cf") or should I let this to the user? Other packaging questions: - setup.php is installed by the package, but needs to be deleted to make Postfixadmin work. Is there any special trick how to handle this in RPM? - any other comments on the specfile are also welcome ;-) I'm quite sure there is no "perfect" solution for the above questions, but some hints about good practise would be welcome. Regards, Christian Boltz -- There are no bugs expected after Beta3, that's why it is called RC. [Jan Engelhardt]
![](https://seccdn.libravatar.org/avatar/6be99853e4fc9af95698fa1b78439c8d.jpg?s=120&d=mm&r=g)
Christian Boltz escribió:
Now to the dependency problems: - php-mysql and/or php-pgsql? One of them is always unused, but you never know which one in advance (from RPM's POV)
There is something missing, that is more a bug than anything else.. php-pgsql and php.mysql should Provides: php-database-support or something, please open a bug report and assign it to me in order to avoid it getting lost.
- Should I require MySQL and/or PostgreSQL? You never know which one is used, and accessing the database on another machine is also possible, so technically none of them is really needed.
Neither of those.
- Should I require Postfix? Sure, Postfixadmin is used to administrate it, but it's the same as with MySQL: It could run on another machine.
PHP requires an smtp_daemon but as you say the server to be administered can reside in other machine..
- setup.php is installed by the package, but needs to be deleted to make Postfixadmin work. Is there any special trick how to handle this in RPM?
Should setup.php be ex3ecuted manually by the user in order to configure the sth ? if so, the deleting of the file is up to the user. -- "The only thing that interferes with my learning is my education." - Albert Einstein Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/6be99853e4fc9af95698fa1b78439c8d.jpg?s=120&d=mm&r=g)
Christian Boltz escribió:
Now to the dependency problems: - php-mysql and/or php-pgsql? One of them is always unused, but you never know which one in advance (from RPM's POV)
There is something missing, that is more a bug than anything else.. php-pgsql and php.mysql should Provides: php-database-support or something, please open a bug report and assign it to me in order to avoid it getting lost.
- Should I require MySQL and/or PostgreSQL? You never know which one is used, and accessing the database on another machine is also possible, so technically none of them is really needed.
Neither of those.
- Should I require Postfix? Sure, Postfixadmin is used to administrate it, but it's the same as with MySQL: It could run on another machine.
PHP requires an smtp_daemon but as you say the server to be administered can reside in other machine..
- setup.php is installed by the package, but needs to be deleted to make Postfixadmin work. Is there any special trick how to handle this in RPM?
Should setup.php be ex3ecuted manually by the user in order to configure sth ? if so, the deleting of the file is up to the user. -- "The only thing that interferes with my learning is my education." - Albert Einstein Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/84ee0bcf221e4fb2b4741908022b82fb.jpg?s=120&d=mm&r=g)
On Tuesday 04 December 2007 23:42:32 wrote Christian Boltz:
Hello,
I have an interesting question: Which dependencies should I set for Postfixadmin? (package is postfixadmin-svn in home:cboltz, specfile is attached for easier access)
Short summary: - Postfixadmin is a PHP web interface, used for administration of virtual domains in postfix - it can use MySQL and PostgreSQL as database
Now to the dependency problems: - php-mysql and/or php-pgsql? One of them is always unused, but you never know which one in advance (from RPM's POV) - Should I require MySQL and/or PostgreSQL? You never know which one is used, and accessing the database on another machine is also possible, so technically none of them is really needed. - Should I require Postfix? Sure, Postfixadmin is used to administrate it, but it's the same as with MySQL: It could run on another machine.
I would go with Recommends: in this case. Installing with YaST/zypper would install them, but you can deinstall the packages without breaking dependencies.
Postfixadmin also comes with a vacation script, which needs a user "vacation" and some additions to the postfix config.
- should I create the user "vacation" in %pre? - if yes, should I delete it again in %preun? How to avoid this on package updates?
- is it a good idea to add some lines to /etc/postfix/master.cf auto- matically ("grep vacation master.cf || cat some_lines >> master.cf") or should I let this to the user?
Other packaging questions:
- setup.php is installed by the package, but needs to be deleted to make Postfixadmin work. Is there any special trick how to handle this in RPM?
- any other comments on the specfile are also welcome ;-)
I'm quite sure there is no "perfect" solution for the above questions, but some hints about good practise would be welcome.
Regards,
Christian Boltz
-- Adrian Schroeter SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) email: adrian@suse.de --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/e76779f0629280df6d2dfce07e4e1600.jpg?s=120&d=mm&r=g)
Hello, thanks for all the suggestions. on Mittwoch, 5. Dezember 2007, Adrian Schröter wrote: [...]
I would go with Recommends: in this case. Installing with YaST/zypper would install them, but you can deinstall the packages without breaking dependencies.
That's what I'll do. (and Requires: php_any_db for suse_version > 1030 - thanks Cristian for adding this.) However there's the problem left that Recommends: is not supported by other distributions (according to some failed build logs ;-) I'm afraid those will get packages without proper dependencies, to avoid that unused packages have to be installed. @darix: Yes, technically subpackages are the best solution. But creating them just to have "or" dependencies is not worth it IMHO. Is there a feature request open to allow "Requires: foo OR bar"? Regards, Christian Boltz -- Was hat ein Revolver mit Windows 98 gemeinsam? Solange sie nicht geladen sind, sind sie harmlos. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/6be99853e4fc9af95698fa1b78439c8d.jpg?s=120&d=mm&r=g)
Christian Boltz escribió:
- php-mysql and/or php-pgsql? One of them is always unused, but you never know which one in advance (from RPM's POV)
Both now provides php_any_db virtual package. -- "The only thing that interferes with my learning is my education." - Albert Einstein Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/036efc5132b2df24eac525839eef1038.jpg?s=120&d=mm&r=g)
On Donnerstag, 6. Dezember 2007 03:48:17 Cristian Rodríguez wrote:
Christian Boltz escribió:
- php-mysql and/or php-pgsql? One of them is always unused, but you never know which one in advance (from RPM's POV)
Both now provides php_any_db virtual package.
This is one step - but what about the databases themselves? Currently MySQL provides mysql, PostGreSQL provides postgresql - what should a package recommend, which runs with both databases? As these two are the most supported databases in the open source world, we should perhaps also think about a virtual provides for this two at least. Whats the minimal SQL standard both support? Perhaps we can add a virtual provides like "Provides: SQL2" or "Provides: SQL-92" - so an application with a generic SQL interface just have to require a SQL-92 compatible database... Regards, Lars --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/a98f4fcfba592494dddc221040727b31.jpg?s=120&d=mm&r=g)
On 2007-12-06 12:27:32 +0100, Lars Vogdt wrote:
On Donnerstag, 6. Dezember 2007 03:48:17 Cristian Rodríguez wrote:
Christian Boltz escribió:
- php-mysql and/or php-pgsql? One of them is always unused, but you never know which one in advance (from RPM's POV)
Both now provides php_any_db virtual package.
This is one step - but what about the databases themselves? Currently MySQL provides mysql, PostGreSQL provides postgresql - what should a package recommend, which runs with both databases?
As these two are the most supported databases in the open source world, we should perhaps also think about a virtual provides for this two at least.
Whats the minimal SQL standard both support? Perhaps we can add a virtual provides like "Provides: SQL2" or "Provides: SQL-92" - so an application with a generic SQL interface just have to require a SQL-92 compatible database...
package: postfixadmin-mysql Requires: php5-mysql Requires: postfixadmin-php Recommends: mysql package: postfixadmin-pgsql Requires: php5-pgsql Requires: postfixadmin-php Recommends: postgresql-server package: postfixadmin-php Recommends: postfix mod_php_any if you really want you can add a "Provides: postfixadmin_backend" and add an empty postfixadmin package that requires postfixadmin_backend. just my 2 cents darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/6be99853e4fc9af95698fa1b78439c8d.jpg?s=120&d=mm&r=g)
Lars Vogdt escribió:
As these two are the most supported databases in the open source world, we should perhaps also think about a virtual provides for this two at least.
That's the way that will be used in openSUSE 11 ;)
Whats the minimal SQL standard both support? Perhaps we can add a virtual provides like "Provides: SQL2" or "Provides: SQL-92" - so an application with a generic SQL interface just have to require a SQL-92 compatible database...
not very useful in the particular case, since the condition is not the used SQL standard but about what particualr PHP driver the application supports.. -- "The only thing that interferes with my learning is my education." - Albert Einstein Cristian Rodríguez R. Platform/OpenSUSE - Core Services SUSE LINUX Products GmbH Research & Development http://www.opensuse.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
![](https://seccdn.libravatar.org/avatar/541f0424df99fb299635f2b0c46454b0.jpg?s=120&d=mm&r=g)
Christian Boltz wrote:
Hello,
I have an interesting question: Which dependencies should I set for Postfixadmin? (package is postfixadmin-svn in home:cboltz, specfile is attached for easier access)
Short summary: - Postfixadmin is a PHP web interface, used for administration of virtual domains in postfix - it can use MySQL and PostgreSQL as database
Now to the dependency problems: - php-mysql and/or php-pgsql? One of them is always unused, but you never know which one in advance (from RPM's POV) - Should I require MySQL and/or PostgreSQL? You never know which one is used, and accessing the database on another machine is also possible, so technically none of them is really needed. - Should I require Postfix? Sure, Postfixadmin is used to administrate it, but it's the same as with MySQL: It could run on another machine.
Hmm, wouldn't that be a nice use-case for patterns / YMPs? ;-) http://en.opensuse.org/Build_Service_Tutorial#Create_Patterns Michal --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (6)
-
Adrian Schröter
-
Christian Boltz
-
Cristian Rodríguez
-
Lars Vogdt
-
Marcus Rueckert
-
Michal Marek