[opensuse-packaging] RPM build error - directories not owned by a package - /etc/modprobe.d
Package installs file into /etc/modprobe.d. This results in error [ 37s] dkms-2.2.0.3-9.1.noarch.rpm: directories not owned by a package: [ 37s] - /etc/modprobe.d I am not sure why - am I supposed to own every intermediate directory? Including /etc? TIA -andrey -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Mon, 2012-12-03 at 21:45 +0400, Andrey Borzenkov wrote:
Package installs file into /etc/modprobe.d. This results in error
[ 37s] dkms-2.2.0.3-9.1.noarch.rpm: directories not owned by a package: [ 37s] - /etc/modprobe.d
I am not sure why - am I supposed to own every intermediate directory? Including /etc?
Each directory must be owned by at least one package... /etc is owned by 'filesystem', a base package, so you don't have to own it. /etc/modprobe.d is not part of the filesystem package. Either you happen to BuildRequire something with it (but cleanly speaking, you should also have to require this then) or you own the directory. The 'goal' is that no package can be uninstalled and leave stale directories behind. so to answer your question: you should add %dir %{_sysconfdir}/modprobe.d in your %files section. Best regards, Dominique -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
В Mon, 03 Dec 2012 18:51:35 +0100 Dimstar / Dominique Leuenberger <dimstar@opensuse.org> пишет:
so to answer your question: you should add %dir %{_sysconfdir}/modprobe.d in your %files section.
Adding BR: module-init-tools seems more appropriate. I definitely do not own this directory. :) Thank you! -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi, On Mon, 3 Dec 2012, Andrey Borzenkov wrote:
В Mon, 03 Dec 2012 18:51:35 +0100 Dimstar / Dominique Leuenberger <dimstar@opensuse.org> пишет:
so to answer your question: you should add %dir %{_sysconfdir}/modprobe.d in your %files section.
Adding BR: module-init-tools seems more appropriate. I definitely do not own this directory. :)
Multiple packages can own a directory. In your case, though, it's really better to simply require module-init-tools (_not_ BuildRequire), because without that package nothing will look at your file in /etc/modprobe.d . BuildRequire ensures the existence only during building which wouldn't help for that. Ciao, Michael.
On Tue, Dec 4, 2012 at 2:34 PM, Michael Matz <matz@suse.de> wrote:
Hi,
On Mon, 3 Dec 2012, Andrey Borzenkov wrote:
В Mon, 03 Dec 2012 18:51:35 +0100 Dimstar / Dominique Leuenberger <dimstar@opensuse.org> пишет:
so to answer your question: you should add %dir %{_sysconfdir}/modprobe.d in your %files section.
Adding BR: module-init-tools seems more appropriate. I definitely do not own this directory. :)
Multiple packages can own a directory. In your case, though, it's really better to simply require module-init-tools (_not_ BuildRequire), because without that package nothing will look at your file in /etc/modprobe.d . BuildRequire ensures the existence only during building which wouldn't help for that.
Upstream dkms.spec has "Requires: modutils" and modutils is provided by module-init-tools. I did not change it (and modutils is Required by mkinitrd as well). So dkms *does* Requre module-init-tools, but it still resulted in error until I added BR. Should it always require package by primary name? I.e. shall I replace "modutils" with "module-init-tools"? Just curious whether this is an error somewhere? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Mon, 3 Dec 2012 18:45, Andrey Borzenkov <arvidjaar@...> wrote:
Package installs file into /etc/modprobe.d. This results in error
[ 37s] dkms-2.2.0.3-9.1.noarch.rpm: directories not owned by a package: [ 37s] - /etc/modprobe.d
I am not sure why - am I supposed to own every intermediate directory? Including /etc?
1. dir /etc is owned by package filesystem dir /etc/modprobe.d is owned by package module-init-tools see "rpm -qf /etc/modprobe.d" as your "dkms" would need parts of module-init-tools (e.g. insmod, modprobe) to work as advertised, a line with: Require: module-init-tools would be your safe bet for a fully working package later. 2. If you are sure you do NOT need any parts of module-init-tools, you can use a line with %dir %{_sysconfdir}/modprobe.d in your %files section, but without module-init-tools the existance of a file in /etc/modprobe.d is questionable for your package. Hope this give the hints you need. -- Yamaban. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (4)
-
Andrey Borzenkov
-
Dimstar / Dominique Leuenberger
-
Michael Matz
-
Yamaban