Mailinglist Archive: opensuse-packaging (129 mails)

< Previous Next >
[opensuse-packaging] Re: Use of generics in "requires" statements?
On Wed, 29 Apr 2015 01:04, Greg Freemyer wrote:


My SR to add a couple of generic "Requires:" to the wordpress spec
file has been rejected because they are generic:

My re-opened SR was also rejected.

Can someone explain to my why the use of

Requires: httpd
Requires: mod_php_any

is wrong. I know the below will also work, but I don't see why we
should be restrictive

Requires: apache2
Requires: apache2-mod_php5

That is unless wordpress is strictly a apache2 based tool, but I can't
imagine that is true.

fyi: In the SR Eric did say:

"httpd only for other than opensuse."

I don't understand that since apache2, lighttpd and nginx all provide
httpd in their opebnsuse packages.

He also said
"zypper se php_mod_any" show "package not found"

That is true, but "zypper se" doesn't search for generic provides so
that logic would invalidate all use of generic requires.

Foreword: I'm no guru, god, or any other "last-instance", but
on a few things, I can shed a little light on:

First: the package apache2 provides "apache2", "httpd" and "http_daemon"

Second: the main package php5 provides sub-packages:
apache2-mod_php5: Provides: "mod_php_any", "php-session"
fastcgi: Provides: "php-cgi", "php-fastcgi", "php-session"

Third: if using zypper to search, do it right:
zypper search --provides {requirement}

so here you "require" either:

for openSUSE / SLE:
"apache2" and "apache2-mod_php5"

and for Fedora / Redhat:
"httpd" and "mod_php_any"

with a constuct of:

%if 0%{?suse_version}
Requires: apache2
Requires: apache2-mod_php5
Requires: httpd
Requires: mod_php_any

or you go full generic, any http server, any php server modul:
"http_daemon" and "php-session"

Requires: http_daemon
Requires: php-session

choose your poison, YMMV.

- Yamaban

To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-packaging+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups