[opensuse-packaging] Recommends tag
Hi all, I have a package which builds fine for all SUSE targets in OBS, but fails for Redhat-like distributions with the following error: error: line 68: Unknown tag: Recommends: procmail I seem to understand that Redhat's rpm does not support the "Recommends" tag, is that right? I would like to know what is the proper way to deal with this. I could not find anything related to this topic in the packager's guidelines. The first thing I would try is: %if 0%{?suse_version} > 0 Recommends: procmail %endif Is that the right approach? Or is there a different tag I should use for non-SUSE targets? Either way, I am surprised that OBS does not handle this all by itself, as this seems to be a fairly generic problem. Thanks, -- Jean Delvare SUSE L3 Support -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Dienstag, 4. November 2014, 11:54:32 wrote Jean Delvare:
Hi all,
I have a package which builds fine for all SUSE targets in OBS, but fails for Redhat-like distributions with the following error:
error: line 68: Unknown tag: Recommends: procmail
I seem to understand that Redhat's rpm does not support the "Recommends" tag, is that right? I would like to know what is the
right. except you use latest upstream rpm on redhat.
proper way to deal with this. I could not find anything related to this topic in the packager's guidelines.
The first thing I would try is:
%if 0%{?suse_version} > 0 Recommends: procmail %endif
Is that the right approach? Or is there a different tag I should use for non-SUSE targets?
looks good to me.
Either way, I am surprised that OBS does not handle this all by itself, as this seems to be a fairly generic problem.
but what should the build script do? Just drop the line? Others want to have it as Require instead, since the default is to install it... -- Adrian Schroeter email: adrian@suse.de SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Adrian, Thanks for the quick reply. On Tue, 04 Nov 2014 11:57:30 +0100, Adrian Schröter wrote:
On Dienstag, 4. November 2014, 11:54:32 wrote Jean Delvare:
Hi all,
I have a package which builds fine for all SUSE targets in OBS, but fails for Redhat-like distributions with the following error:
error: line 68: Unknown tag: Recommends: procmail
I seem to understand that Redhat's rpm does not support the "Recommends" tag, is that right? I would like to know what is the
right. except you use latest upstream rpm on redhat.
proper way to deal with this. I could not find anything related to this topic in the packager's guidelines.
The first thing I would try is:
%if 0%{?suse_version} > 0 Recommends: procmail %endif
Is that the right approach? Or is there a different tag I should use for non-SUSE targets?
looks good to me.
Great, I'll do that then. I've documented it at: https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends
Either way, I am surprised that OBS does not handle this all by itself, as this seems to be a fairly generic problem.
but what should the build script do? Just drop the line? Others want to have it as Require instead, since the default is to install it...
Either drop the line or replace it with a Require, yes. Both are equally valid and I don't really care which option we pick: it'll be much better than failing the build as we do right now. -- Jean Delvare SUSE L3 Support -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Dienstag, 4. November 2014, 13:22:31 wrote Jean Delvare:
Hi Adrian,
Thanks for the quick reply.
On Tue, 04 Nov 2014 11:57:30 +0100, Adrian Schröter wrote:
On Dienstag, 4. November 2014, 11:54:32 wrote Jean Delvare: ..
Either way, I am surprised that OBS does not handle this all by itself, as this seems to be a fairly generic problem.
but what should the build script do? Just drop the line? Others want to have it as Require instead, since the default is to install it...
Either drop the line or replace it with a Require, yes. Both are equally valid and I don't really care which option we pick: it'll be much better than failing the build as we do right now.
actually no, that way is aware of the problem and can decide which of the ways to go... -- Adrian Schroeter email: adrian@suse.de SUSE LINUX GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, On Nov 4 13:22 Jean Delvare wrote (excerpt):
I've documented it at: https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends
According to "Detect a distribution flavor for special code" at https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto %if 0%{?suse_version} should be sufficient. Furthermore I enhanced https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends with %if 0%{?suse_version} Recommends: foo %else Requires: foo %endif Of course that results a merciless Requires for all non-SUSE build targets regardless of the distribution version (meta condition) and regardless if RPM supports Recommends (actual condition). Something like %if 0%{?rpm_supports_recommends} Recommends: foo %else Requires: foo %endif would be nice and additionally such code would be self-explanatory. Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tuesday 2014-11-04 14:32, Johannes Meixner wrote:
Furthermore I enhanced https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends with
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
Of course that results a merciless Requires for all non-SUSE build targets regardless of the distribution version (meta condition) and regardless if RPM supports Recommends (actual condition).
Since a Recommends is not a Require, the !suse branch should not contain _anything_. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, 2014-11-04 at 14:34 +0100, Jan Engelhardt wrote:
On Tuesday 2014-11-04 14:32, Johannes Meixner wrote:
Furthermore I enhanced https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends with
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
Of course that results a merciless Requires for all non-SUSE build targets regardless of the distribution version (meta condition) and regardless if RPM supports Recommends (actual condition).
Since a Recommends is not a Require, the !suse branch should not contain _anything_.
That's debatable.. on a default openSUSE installation, the packages would be installed... so the packager really might say: better to have it - remove it if you know what you do. It really depends on what experience you want to give the user on a default setup. -- Dimstar / Dominique Leuenberger <dimstar@opensuse.org> -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Dimstar / Dominique Leuenberger <dimstar@opensuse.org> writes:
On Tue, 2014-11-04 at 14:34 +0100, Jan Engelhardt wrote:
On Tuesday 2014-11-04 14:32, Johannes Meixner wrote:
Furthermore I enhanced https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends with
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
Of course that results a merciless Requires for all non-SUSE build targets regardless of the distribution version (meta condition) and regardless if RPM supports Recommends (actual condition).
Since a Recommends is not a Require, the !suse branch should not contain _anything_.
That's debatable.. on a default openSUSE installation, the packages would be installed... so the packager really might say: better to have it - remove it if you know what you do.
If you replace it with Requires you can no longer remove it without breaking dependencies. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, 2014-11-04 at 14:53 +0100, Andreas Schwab wrote:
Dimstar / Dominique Leuenberger <dimstar@opensuse.org> writes:
On Tue, 2014-11-04 at 14:34 +0100, Jan Engelhardt wrote:
On Tuesday 2014-11-04 14:32, Johannes Meixner wrote:
Furthermore I enhanced https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends with
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
Of course that results a merciless Requires for all non-SUSE build targets regardless of the distribution version (meta condition) and regardless if RPM supports Recommends (actual condition).
Since a Recommends is not a Require, the !suse branch should not contain _anything_.
That's debatable.. on a default openSUSE installation, the packages would be installed... so the packager really might say: better to have it - remove it if you know what you do.
If you replace it with Requires you can no longer remove it without breaking dependencies.
Of course you can't; but if the distro doesn't HAVE the granularity of what WE do, as a packager you have to pick the choice for the user. As such, I think it is MORE in line with the intent of the packager to 'require' the package instead of not having it listed AT ALL in case of Recommends, and remove it in case of Suggests. But, in the end, the current behavior of OBS of FAILING if you use Recommends on those packages is the perfect way to let the packager DO this thinking process. That's why I say simply stripping it would be wrong. Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tuesday 04 of November 2014 14:57:25 Dimstar / Dominique Leuenberger
As such, I think it is MORE in line with the intent of the packager to 'require' the package instead of not having it listed AT ALL in case of Recommends, and remove it in case of Suggests.
I don't think so. IMHO one should only use "Requires:" if the package can't be installed or doesn't work without the other. And in such case, it should be "Requires:" even in our distributions. By using "Requires:" where your package does not actually require the other, you force the users either to install the other package (even if they have absolutely no use and no need for it) or break dependencies. That would be bad and IMHO much worse than not mentioning the other package at all. BtW, setting solver.onlyRequires to true is one of the first things I do after every installation of openSUSE or SLE. And it's exactly because otherwise "Recommends:" dependencies would pull in tons of packages I don't need. So please don't replace "Recommends:" by "Requires:" where there is no strict dependency. Michal Kubeček -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Michal, On Wed, 05 Nov 2014 08:07:04 +0100, Michal Kubecek wrote:
BtW, setting solver.onlyRequires to true is one of the first things I do after every installation of openSUSE or SLE (...) So please don't replace "Recommends:" by "Requires:" where there is no strict dependency.
Please keep in mind that we were really only discussing what to do about Recommends for *non-SUSE* distributions as targets in OBS. Not that I don't like a good passionate debate but some reactions seem somewhat out of proportion if you consider the limited scope of the problem (so small that nobody cared before I asked about it.) So everyone please just relax! :-) -- Jean Delvare SUSE L3 Support -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, On Nov 4 14:53 Andreas Schwab wrote (excerpt):
If you replace it with Requires you can no longer remove it without breaking dependencies.
Of course - that is the meaning of RPM Requires. Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Johannes Meixner <jsmeix@suse.de> writes:
Hello,
On Nov 4 14:53 Andreas Schwab wrote (excerpt):
If you replace it with Requires you can no longer remove it without breaking dependencies.
Of course - that is the meaning of RPM Requires.
Which differs fundamentally from Recommends or Suggests. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello On Nov 4 17:20 Andreas Schwab wrote:
Johannes Meixner <jsmeix@suse.de> writes:
On Nov 4 14:53 Andreas Schwab wrote (excerpt):
If you replace it with Requires you can no longer remove it without breaking dependencies.
Of course - that is the meaning of RPM Requires.
Which differs fundamentally from Recommends or Suggests.
Of course different RPM tags differ. What is your point? Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi, On Tue, 4 Nov 2014, Johannes Meixner wrote:
If you replace it with Requires you can no longer remove it without breaking dependencies.
Of course - that is the meaning of RPM Requires.
Which differs fundamentally from Recommends or Suggests.
Of course different RPM tags differ. What is your point?
What is yours? Ciao, Michael. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, On Nov 4 17:35 Michael Matz wrote (excerpt):
What is yours?
I would like to know what Andreas Schwab means.
From my point of view he only tells things everbody should already know.
Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi, On Tue, 4 Nov 2014, Johannes Meixner wrote:
On Nov 4 17:35 Michael Matz wrote (excerpt):
What is yours?
I would like to know what Andreas Schwab means. From my point of view he only tells things everbody should already know.
Like yourself. His point is that the assertion that Recommends: can and should be replaced by default with Requires: is false. It is false because they aren't equivalent. Neither is it correct to replace it with nothing by default, because that isn't equivalent either. It has to be decided on a case-by-case basis by the packager, therefore the current behaviour (build breakage until the packager changes something) is the only sensible one. Which his _exactly_ what Adrian said in his initial reply to this very thread. Ciao, Michael. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Johannes Meixner <jsmeix@suse.de> writes:
Hello
On Nov 4 17:20 Andreas Schwab wrote:
Johannes Meixner <jsmeix@suse.de> writes:
On Nov 4 14:53 Andreas Schwab wrote (excerpt):
If you replace it with Requires you can no longer remove it without breaking dependencies.
Of course - that is the meaning of RPM Requires.
Which differs fundamentally from Recommends or Suggests.
Of course different RPM tags differ. What is your point?
You cannot just "remove it if you know what you do". Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello Jan, On Nov 4 14:34 Jan Engelhardt wrote (excerpt):
On Tuesday 2014-11-04 14:32, Johannes Meixner wrote:
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
Since a Recommends is not a Require, the !suse branch should not contain _anything_.
Did you read the previous postings in this thread or what do I misunderstand here? Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, On Tue, 04 Nov 2014, Johannes Meixner wrote:
Furthermore I enhanced https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends with
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
What about "Suggests: foo"? IIRC the Suggests-tag has been working for ages. -dnh -- "...you want a .sig with that?" -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tuesday 2014-11-04 15:26, David Haller wrote:
Hello,
On Tue, 04 Nov 2014, Johannes Meixner wrote:
Furthermore I enhanced https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends with
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
What about "Suggests: foo"? IIRC the Suggests-tag has been working for ages.
Upstream rpm only received support for those with 4.12, which all those dusty Redhats from 10 years ago don't have. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, On Nov 4 15:26 David Haller wrote (excerpt):
On Tue, 04 Nov 2014, Johannes Meixner wrote:
Furthermore I enhanced https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends with
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
What about "Suggests: foo"?
As far as I know the same kind of reasoning applies for all weak RPM dependencies, cf. https://en.opensuse.org/Libzypp/Dependencies Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Johannes, On Tue, 4 Nov 2014 14:32:09 +0100 (CET), Johannes Meixner wrote:
On Nov 4 13:22 Jean Delvare wrote (excerpt):
I've documented it at: https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends
According to "Detect a distribution flavor for special code" at https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
%if 0%{?suse_version}
should be sufficient.
You are correct, I came to the same conclusion shortly after posting. I'll update my package accordingly.
Furthermore I enhanced https://en.opensuse.org/openSUSE:Specfile_guidelines#Recommends with
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
Thanks for doing that.
Of course that results a merciless Requires for all non-SUSE build targets regardless of the distribution version (meta condition) and regardless if RPM supports Recommends (actual condition).
Something like
%if 0%{?rpm_supports_recommends} Recommends: foo %else Requires: foo %endif
would be nice and additionally such code would be self-explanatory.
I agree that this would be better, but I don't know how difficult it would be to implement and maintain. -- Jean Delvare SUSE L3 Support -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tuesday 04 of November 2014 14:32:09 Johannes Meixner wrote:
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
Do you have an example where this is a good idea? I.e. where the dependency relation between the packages A an B is not strong enough to use "Requires: B" in openSUSE package of A but is strong enough to justify forcing users of other distributions to either install B or break dependencies? Michal Kubeček -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, On Nov 5 08:13 Michal Kubecek wrote (excerpt):
On Tuesday 04 of November 2014 14:32:09 Johannes Meixner wrote:
%if 0%{?suse_version} Recommends: foo %else Requires: foo %endif
Do you have an example where this is a good idea? I.e. where the dependency relation between the packages A an B is not strong enough to use "Requires: B" in openSUSE package of A but is strong enough to justify forcing users of other distributions to either install B or break dependencies?
If I had to package CUPS for a distribution that does not support weak RPM dependencies, I would have to use "Requires: foo" basically for all what is "Recommends: foo" in cups.spec for SUSE. We had this kind of problem all the time in "the (good?) old times" when SUSE did not yet had support for weak RPM dependencies. Usually we had to use "Requires: foo" for dependency relations that were actually only "Recommends: foo" because otherwise we got bug reports from users that "it does not work" when functionality that is not mandatory but expected to be there was not available because another package "foo" was not (automatically) installed. This means when packaging software for a distribution that does not support weak RPM dependencies, the usual way is "Requires: foo" because it is better to satisfy usual end-user expectations than making experts happy who enjoy to have a mininmal system. I think even nowadays there are still packages in openSUSE where "Requires: foo" is used instead of "Recommends: foo". For an example where "Requires" was falsely requested see https://bugzilla.opensuse.org/show_bug.cgi?id=776080#c38 and my explanation why "Recommends" must be use whenever possible https://bugzilla.opensuse.org/show_bug.cgi?id=776080#c39 https://bugzilla.opensuse.org/show_bug.cgi?id=776080#c40 excerpt: -------------------------------------------------------------------- Keep RPM Requires as small as possible - i.e. only what is really mandatory to let the software run - and specify all what is optional (i.e. what is not really mandatory) as RPM Recommends. -------------------------------------------------------------------- Bottom line: When packaging software for a distribution that does not support weak RPM dependencies, the usual way is "Requires: foo". When packaging software for a distribution that supports weak RPM dependencies, the usual way is "Recommends: foo". Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wednesday 2014-11-05 09:56, Johannes Meixner wrote:
We had this kind of problem all the time in "the (good?) old times" when SUSE did not yet had support for weak RPM dependencies.
Usually we had to use "Requires: foo" for dependency relations that were actually only "Recommends: foo" because otherwise we got bug reports from users that "it does not work" when functionality that is not mandatory but expected to be there was not available because another package "foo" was not (automatically) installed.
This means when packaging software for a distribution that does not support weak RPM dependencies, the usual way is "Requires: foo"
In the "good ol'" days, we had something like a package list that yast would preselect, and you could easily deselect it, too. In that sense, non-SUSE RPM systems of today are much like those good-ol'-day outside-of-yast sessions -- probably not worth changing. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wednesday 05 of November 2014 09:56:04 Johannes Meixner wrote:
Usually we had to use "Requires: foo" for dependency relations that were actually only "Recommends: foo" because otherwise we got bug reports from users that "it does not work" when functionality that is not mandatory but expected to be there was not available because another package "foo" was not (automatically) installed.
This means when packaging software for a distribution that does not support weak RPM dependencies, the usual way is "Requires: foo" because it is better to satisfy usual end-user expectations than making experts happy who enjoy to have a mininmal system.
I'm afraid I can't agree with this. I believe it is much worse to enforce unnecessary strong dependencies, force people to break them and face complications on every update.
I think even nowadays there are still packages in openSUSE where "Requires: foo" is used instead of "Recommends: foo".
IMHO those should be fixed.
For an example where "Requires" was falsely requested see https://bugzilla.opensuse.org/show_bug.cgi?id=776080#c38 and my explanation why "Recommends" must be use whenever possible https://bugzilla.opensuse.org/show_bug.cgi?id=776080#c39 https://bugzilla.opensuse.org/show_bug.cgi?id=776080#c40 excerpt: -------------------------------------------------------------------- Keep RPM Requires as small as possible - i.e. only what is really mandatory to let the software run - and specify all what is optional (i.e. what is not really mandatory) as RPM Recommends. --------------------------------------------------------------------
My point exactly.
Bottom line: When packaging software for a distribution that does not support weak RPM dependencies, the usual way is "Requires: foo".
And this is where we differ. In general, I believe, users should not be punished for learning more and understanding how things work. Feeling something is broken while just a package is missing is something that can be helped with user learning more; having to break invalid strong dependencies can't. And seeing distribution making your life hard only to make life of uninformed users tiny bit easier is really frustrating. Michal Kubeček -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, 2014-11-05 at 10:26 +0100, Michal Kubecek wrote:
My point exactly.
Bottom line: When packaging software for a distribution that does not support weak RPM dependencies, the usual way is "Requires: foo".
And this is where we differ. In general, I believe, users should not be punished for learning more and understanding how things work. Feeling something is broken while just a package is missing is something that can be helped with user learning more; having to break invalid strong dependencies can't. And seeing distribution making your life hard only to make life of uninformed users tiny bit easier is really frustrating.
I would classify this as a perfect way to send inexperienced, new users away. Why? well: if I take distroy xyz, feature abc just works. only on openSUSE it is broken, because they don't get the dependencies are right. Of course, we don't REALLY have the problem on openSUSE anymore, because we DO know weak deps.. but any packager providing stuff for dists without weak deps is responsible for HIMSELF to decide what features he wants to force on the user (just as the packager is also making a good set of assumptions with various configure switches). IF you want to have control over those too maybe look at Gentoo or LFS. A pre-packaged system is likely not the right thing for the explicit flexibility and full control you require at this stage anymore. So, getting back to the original topic of this thread and an answer to the actual question (which was also given by Adrian): failing the build on a dist that does not know weak deps is the only sensible way to handle this. The packager is responsible to make the right decision. He's the only one. Cheers, Dominique -- Dimstar / Dominique Leuenberger <dimstar@opensuse.org> -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, On Nov 5 10:44 Dimstar / Dominique Leuenberger wrote (excerpt):
making a good set of assumptions with various configure switches
And this is where we differ. In general, I believe, users should not be punished for learning more and understanding how things work. Feeling something is broken while just some non-mandatory functionality is not built-in is something that can be helped with user learning more just how to configure and compile it with that functionality which is really easy by just using the openSUSE build service; having built-in non-mandatory functionality can't. And seeing distribution making hackers life hard only to make life of uninformed users tiny bit easier is really frustrating. ;-) Seriously: I assume usually we configure a software to be compiled with very most of its possible functionality but that may cause tons of library packages (or things like X plus its libraries) to be required. If possible we could split the binary RPM into sub-packages and maintain the split (e.g. HPLIP and partially for Ghostscript) or we even have to maintain and keep in sync two source packages (e.g. ghostscript and ghostscript-mini). Both workarounds increase complexity which results more bugs. Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wednesday 05 of November 2014 11:28:11 Johannes Meixner wrote:
Seriously: I assume usually we configure a software to be compiled with very most of its possible functionality but that may cause tons of library packages (or things like X plus its libraries) to be required. If possible we could split the binary RPM into sub-packages and maintain the split (e.g. HPLIP and partially for Ghostscript) or we even have to maintain and keep in sync two source packages (e.g. ghostscript and ghostscript-mini). Both workarounds increase complexity which results more bugs.
I should probably explain that I'm not against packages depending on libraries even if they are only needed of part of the functionality I myself don't use. But the "Recommends:" usually pull in leaf packages that are not really needed to use the software. Hypothetical example: I could imagine a package would recommend a PDF viewer just because it install documentation in PDF format. Real example: I've seen package X recommending X-lang often. That's what I have in mind - in these cases "Requires:" would be straight wrong. Michal Kubeček -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, On Nov 5 12:04 Michal Kubecek wrote (excerpt):
But the "Recommends:" usually pull in leaf packages that are not really needed to use the software.
I think we agree that basically the packager decides what is "really needed to use the software" which means the decision depends on the packager's point of view. Personally I think what is really needed to use the software but what is not mandatory to run the software should be specified as "Recommends" when packaging it for a distribution that supports weak RPM dependencies (so that "Requires" is only used for what is mandatory to run the software).
Hypothetical example: I could imagine a package would recommend a PDF viewer just because it install documentation in PDF format.
Personally I think that should not be specified as "Recommends" but - if at all - as "Suggests" (when packaging it for a distribution that supports weak RPM dependencies). I would never recommend or suggest an editor when a package contains a textual config file or a browser when a package contains a HTML file.
Real example: I've seen package X recommending X-lang often. That's what I have in mind - in these cases "Requires:" would be straight wrong.
Personally I also think in this case when packaging it for a distribution that does not support weak RPM dependencies "Requires: X-lang" is probably wrong. But I think it depends on the usual behaviour of other packages for such a particular distribution. If other packages usually install into /usr/share/locale/ then even "Requires: X-lang" could be the right thing for that particular distribution (that does not support weak RPM dependencies). Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello Michal Kubecek, only an addendum for the fun - not really meaningful nowadays On Nov 5 10:26 Michal Kubecek wrote (excerpt):
On Wednesday 05 of November 2014 09:56:04 Johannes Meixner wrote:
Bottom line: When packaging software for a distribution that does not support weak RPM dependencies, the usual way is "Requires: foo".
And this is where we differ. In general, I believe, users should not be punished for learning more and understanding how things work. Feeling something is broken while just a package is missing is something that can be helped with user learning more; having to break invalid strong dependencies can't. And seeing distribution making your life hard only to make life of uninformed users tiny bit easier is really frustrating.
I assume you meant "making my life hard" because for me it was neither hard nor frustrating. If a time slip happens back to "those (good?) old days", I will re-assign all bug reports about missing packages to you ;-) Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wednesday 05 of November 2014 11:04:09 Johannes Meixner wrote:
I assume you meant "making my life hard" because for me it was neither hard nor frustrating.
I seriously doubt I'm the only one who doesn't want to install all packages that would be pulled in if all "Recommends:" were replaced by "Requires:". I might still be able to find the old package lists from the times when I was using AutoYaST to prepare systems for linux lectures; the lists of packages I had to remove after install even if they were not in the pattern (but some other package pulled them in via "Recommends:") were surprisingly long.
If a time slip happens back to "those (good?) old days", I will re-assign all bug reports about missing packages to you ;-)
Well, if it is so much easier than writing "You need package X installed" (after you already identified that - otherwise you wouldn't know you should reassign to me :-) ) and close as invalid, ... Michal Kubeček -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, Am Mittwoch, 5. November 2014 schrieb Michal Kubecek:
On Wednesday 05 of November 2014 11:04:09 Johannes Meixner wrote:
I assume you meant "making my life hard" because for me it was neither hard nor frustrating.
I seriously doubt I'm the only one who doesn't want to install all packages that would be pulled in if all "Recommends:" were replaced by "Requires:".
I think we basically have two opinions / interests here: a) average users (well, you won't find too many of them on the packaging ML ;-) - they expect things "just work" - they install all recommended packages (or even don't know the difference between Requires and Recommends) - they don't care if this drops in 20 additional packages, some GB on a harddisk or SSD are cheap nowadays - summed up: they don't see a problem with having more packages installed b) experts - they know cases where they don't need a recommended package - they know how to avoid/block the installation of recommended packages using "zypper al", "zypper --no-recommends" or solver.onlyRequires in zypp.conf - they want to reduce their set of packages for some reasons (for example security - if something isn't installed, it can't be exploited) - maybe "because I can" is part of the reason sometimes ;-) The interesting question is - which group do we support more? I strongly vote for "both" ;-) - with a small preference on a) and recommend ;-) people in b) should set solver.onlyRequires in zypp.conf. IMHO this way is good for everybody - it "just works" for average users, and is not really hard for experts. And it's exactly why we have Recommends ;-) That said - I wouldn't say I'm an average user, but usually I install all recommended packages ;-)
I might still be able to find the old package lists from the times when I was using AutoYaST to prepare systems for linux lectures; the lists of packages I had to remove after install even if they were not in the pattern (but some other package pulled them in via "Recommends:") were surprisingly long.
Oh yes, there were (and still are) interesting[tm] dependency chains. Just as an example - I'm running several web and mail servers, and the dependencies force me to have cups-libs installed. Needless to say that those servers will never have a printer attached ;-) cups-libs is needed by ghostscript, and ghostscript is used by Typo3 and other CMS to render PDFs to JPG or PNG files. It's also needed by java-1_7_0-openjdk-headless (which I need for lucene search) and some other packages with interesting dependency chains, but I'm not bored enough to follow them in detail ;-) (Johannes, I know you are the cups maintainer, and I don't want to blame you or anyone else for those dependencies. I just needed an example ;-) Regards, Christian Boltz --
All programs evolve until they can send email. Except Microsoft Exchange. [Richard Letts]
-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hello, perhaps a but off-topic but still matches the idea behind here: On Nov 5 15:03 Christian Boltz wrote (excerpt):
Just as an example - I'm running several web and mail servers, and the dependencies force me to have cups-libs installed. Needless to say that those servers will never have a printer attached ;-)
cups-libs is a library package and whether or not it is required has nothing to do with whether or not a printer is attached or even whether or not a printer should ever be used. A library package is strictly required whenever another package is installed that contains a file that is linked with the library. Required library packages have nothing to do with "Recommends". In contrast if the binary RPM "cups" would be required on a system that has nothing to do with using printers, it would be a real issue. During SLE12 development we had exactly this issue: There Gnome could not be installed without the whole CUPS because gnome-control-center had a hard RPM requirement for cups-pk-helper and cups-pk-helper has a hard RPM requirement for cups. This was fixed in gnome-control-center by lowering 'Requires' to 'Recommends' for cups-pk-helper, see in OBS SUSE:SLE-12:GA/gnome-control-center/gnome-control-center.changes But: --------------------------------------------------------------------------- $ osc cat SUSE:SLE-12:GA gnome-control-center gnome-control-center.spec \ | grep cups-pk-helper Recommends: cups-pk-helper $ osc cat openSUSE:Factory gnome-control-center gnome-control-center.spec \ | grep cups-pk-helper Requires: cups-pk-helper --------------------------------------------------------------------------- It is still present in gnome-control-center in openSUSE:Factory so that I submitted right now https://bugzilla.opensuse.org/show_bug.cgi?id=904047
Johannes, I know you are the cups maintainer, and I don't want to blame you or anyone else for those dependencies. I just needed an example ;-)
There is nothing what I could do as CUPS package maintainer against other software that links with CUPS libraries ;-) Actually other software that has something to do with printing is expected to usually link with CUPS libraries. Kind Regards Johannes Meixner -- SUSE LINUX GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 21284 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (10)
-
Adrian Schröter
-
Andreas Schwab
-
Christian Boltz
-
David Haller
-
Dimstar / Dominique Leuenberger
-
Jan Engelhardt
-
Jean Delvare
-
Johannes Meixner
-
Michael Matz
-
Michal Kubecek