[opensuse-packaging] BuildRequires OR %dir

Hello, i have a question to packaging. Problem is. I have a dir or file which is under a directory from other package. I can now BuildRequires: OtherPackage OR i can include %dir in spec. Example: New file foo is under /srv/www/htdocs/newfile. /srv/www/htdocs belongs to package apache2. And newfile belongs to new package. In spec i can now insert BuildRequires: apache2 OR I insert %dir /srv/www/htdocs (It's only an example) I prefered BuildRequires because the dir /srv/www/htdocs belongs to apache, not to newpackage. But what is the preferred solution? What is the right way for openSUSE packaging style guides. I hope someone from openSUSE itself can help me. Sorry. I want not the opinion or surmise from 'normal' packager. I want a answer from top. A answer if it exists a standard from SUSE self. I hope you understand what i want. :-) Regards Eric -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Sat, Jan 12, Eric Schirra wrote:
Does your package require apache2 or does it work with any web server? If it works with any web server, BuildRequires is plain wrong and you have to add %dir. If it only and exclusivly works with apache2, you have a Requires to apache2 anyways?
I want a answer from top. A answer if it exists a standard from SUSE self.
This depends on your package, not on a standard. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Saturday 2019-01-12 11:12, Eric Schirra wrote:
In most cases, %dir. It is a bit impractical to check if any other of the 10000 packages already has the directory, let alone that the requirement is actually meaningful. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

Am Samstag, 12. Januar 2019, 11:54:57 CET schrieb Jan Engelhardt:
First. Thank you for your answer. And, apache was only an example. With other packages there are more lines which i must insert for such problem. And why should i put many lines with %dir when i can put only one line with BuildRequires? And the dirs belongs definitely, in my example, to apache. You can see that with rpmlint immediately, if the error message is gone. Or differently asked. Do I have to use "%dir"? Or may I also use BuildRequires? Regards Eric -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Saturday 2019-01-12 12:20, Eric Schirra wrote:
I would be careful with such pompous statements: 17:48 a4:~ » rpm -qf /srv/www/htdocs/ filesystem-15.5-26.1.x86_64
Or differently asked. Do I have to use "%dir"? Or may I also use BuildRequires?
See https://lists.opensuse.org/opensuse-packaging/2019-01/msg00011.html -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

Am Samstag, 12. Januar 2019, 17:50:04 CET schrieb Jan Engelhardt:
I have say this was an example! Other example: rpm -qf /usr/share/polkit-1/actions yast2-country-4.0.23-lp150.2.6.1.x86_64 systemd-234-lp150.20.9.1.x86_64 firewalld-0.5.5-lp150.2.18.1.noarch gsmartcontrol-1.1.3-lp150.2.14.x86_64 polkit-0.114-lp150.2.6.1.x86_64 Why does /usr/share/polkit-1/actions own four packages? What rights does the path have in the respective package? Actually /usr/share/polkit-1/actions belongs to polkit? Only the policy files may belong to other packages. Right? Without polkit installtion you do not need the whole path. Not /usr/share/polkit-1/actions. And not the policy files below. (Ohne das polkit Paket, kann man mit dem Pfad nichts mehr anfangen. Er ist nutzlos. Man muss also immer auch polkit installiert haben, wenn meine eine policy benötigt.) Right? In my opinion, it is more logical, in this case, /usr/share/polkit-1/actions to polkit. Polkit pretends the directory-name and the rights and so on. All others packages must follow dir from polkit. Regards Eric -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Sunday 2019-01-13 11:38, Eric Schirra wrote:
Because yast2-country does not depend on polkit (and there is no good reason for it to do so). The package owns the dir so it gets removed when yast2-country is removed on a polkit-less system.
What rights does the path have in the respective package?
"The same". -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Sat, Jan 12, Eric Schirra wrote:
Because the filelist is important for installing/de-installing the package, not for runtime. Assume your package BuildRequires apache2, but as it only requires a web server, not especially apache2, it would also work with nginx. 1. the directories would not be owned by any package 2. de-installation of the package would not remove the directory 3. in worst case, RPM creates the directories with wrong permissions and your application will not work. As written, as long as your package does not require apache2, a BuildRequires for apache2 to fool the rpmlint scripts is plain wrong. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

Am Sonntag, 13. Januar 2019, 08:56:34 CET schrieb Thorsten Kukuk:
As written, as long as your package does not require apache2, a BuildRequires for apache2 to fool the rpmlint scripts is plain wrong.
Hello Thorsten, I do not want to do anything different to do it differently. But I do not just want to do something just because one or the other says so. Or because it has always been done that way. I want to do it because I can agree, because the arguments were good and they convinced me. I think you german. Right? Can you please explain me all this in German per email? I don't want do Regards Eric -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

On Sun, Jan 13, Eric Schirra wrote:
You did read my initial comments above which you quoted? I think if you would have done it, this questions are all answered. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & MicroOS SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Eric Schirra
-
Jan Engelhardt
-
Thorsten Kukuk