Of course they should (IMO), the subject is just for catching your attention.
But prominent rpm persona think otherwise - Jeff Johnson considers rpm owning its own /etc/rpm/config file wrong and even questions that there exists a convention of packages owning their config files.
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=204606
Isn't this handled in some guidelines? If not shouldn't it?
On Sat, 2006-09-02 at 18:03 +0200, Axel Thimm wrote:
Isn't this handled in some guidelines? If not shouldn't it?
I thought we had a rule about creating files in %post or whatnot and not owning them. I could be wrong, but I check for that when I review packages. IMHO any file a package creates on the file system at install time should be owned or ghosted by that package.
On Sat, Sep 02, 2006 at 12:05:51PM -0400, Jesse Keating wrote:
On Sat, 2006-09-02 at 18:03 +0200, Axel Thimm wrote:
Isn't this handled in some guidelines? If not shouldn't it?
I thought we had a rule about creating files in %post or whatnot and not owning them. I could be wrong, but I check for that when I review packages. IMHO any file a package creates on the file system at install time should be owned or ghosted by that package.
The file is not created by %post. Currently it is created by anaconda, which is a remnant of old times (a safety measure of making sure rpm behaves multilib).
The target would be for anaconda to not have to touch /etc/rpm/config at all leaving it completely to the user's discretion. But still that file is unowned.
On Sat, 2006-09-02 at 18:14 +0200, Axel Thimm wrote:
The file is not created by %post. Currently it is created by anaconda, which is a remnant of old times (a safety measure of making sure rpm behaves multilib).
The target would be for anaconda to not have to touch /etc/rpm/config at all leaving it completely to the user's discretion. But still that file is unowned.
If anaconda creates it, and nothing else owns it, anaconda should become the owner, or it should be packaged up by rpm. If anaconda doesn't touch it, then it shouldn't be packaged at all. It would be like the user created files in /etc/httpd/conf.d/ or any other such thing. /etc isn't rpm's playground alone, there could be many files in there not owned by a package once the system is used for a while.
On Sat, 2 Sep 2006, Jesse Keating wrote:
On Sat, 2006-09-02 at 18:03 +0200, Axel Thimm wrote:
Isn't this handled in some guidelines? If not shouldn't it?
I thought we had a rule about creating files in %post or whatnot and not owning them. I could be wrong, but I check for that when I review packages. IMHO any file a package creates on the file system at install time should be owned or ghosted by that package.
I argued for such a rule, but others pointed out examples where this is not always/generally a good idea, so the proposal did not have the support to pass.
-- Rex
On Sat, 2006-09-02 at 12:14 -0500, Rex Dieter wrote:
On Sat, 2 Sep 2006, Jesse Keating wrote:
On Sat, 2006-09-02 at 18:03 +0200, Axel Thimm wrote:
Isn't this handled in some guidelines? If not shouldn't it?
I thought we had a rule about creating files in %post or whatnot and not owning them. I could be wrong, but I check for that when I review packages. IMHO any file a package creates on the file system at install time should be owned or ghosted by that package.
I argued for such a rule, but others pointed out examples where this is not always/generally a good idea, so the proposal did not have the support to pass.
I'd be interested in seeing examples of cases where creating files in %post that are not owned by %files would be wanted. I can't think of any.
~spot
On Sun, Sep 03, 2006 at 08:45:06PM -0500, Tom 'spot' Callaway wrote:
I'd be interested in seeing examples of cases where creating files in %post that are not owned by %files would be wanted. I can't think of any.
With httpd we auto-generate a unique SSL certificate in %post (/etc/pki/tls/localhost.crt et al; some other packages are similar IIRC). I don't think it would be correct to have those generated files %files-owned by the package in any way.
joe
On Mon, 2006-09-04 at 14:40 +0100, Joe Orton wrote:
With httpd we auto-generate a unique SSL certificate in %post (/etc/pki/tls/localhost.crt et al; some other packages are similar IIRC). I don't think it would be correct to have those generated files %files-owned by the package in any way.
Shouldn't this be done the first time the service is started? The same install could be cloned many times over (xen) and your unique identifier will be invalid. This is why ssh generates its keys the first time the service is started.
On Mon, 2006-09-04 at 09:44 -0400, Jesse Keating wrote:
On Mon, 2006-09-04 at 14:40 +0100, Joe Orton wrote:
With httpd we auto-generate a unique SSL certificate in %post (/etc/pki/tls/localhost.crt et al; some other packages are similar IIRC). I don't think it would be correct to have those generated files %files-owned by the package in any way.
Shouldn't this be done the first time the service is started? The same install could be cloned many times over (xen) and your unique identifier will be invalid. This is why ssh generates its keys the first time the service is started.
Actually, the reason sshd generates its keys the first time is because it made a significant difference on 31-bit s390 install time with Red Hat Linux 7.1 on zSeries.
Jeremy
On Mon, 2006-09-04 at 14:22 -0400, Jeremy Katz wrote:
Actually, the reason sshd generates its keys the first time is because it made a significant difference on 31-bit s390 install time with Red Hat Linux 7.1 on zSeries.
Ah. But a neat side effect is that cloned systems don't get the same ssh keys (:
On Mon, Sep 04, 2006 at 02:40:16PM +0100, Joe Orton wrote:
On Sun, Sep 03, 2006 at 08:45:06PM -0500, Tom 'spot' Callaway wrote:
I'd be interested in seeing examples of cases where creating files in %post that are not owned by %files would be wanted. I can't think of any.
With httpd we auto-generate a unique SSL certificate in %post (/etc/pki/tls/localhost.crt et al; some other packages are similar IIRC). I don't think it would be correct to have those generated files %files-owned by the package in any way.
I wouldn't consider certificates config files anyway. although one should think about ownership over them, too. What's wrong with %ghost %config(noreplace) them? Upgrades won't touch them.
On Mon, Sep 04, 2006 at 03:47:43PM +0200, Axel Thimm wrote:
On Mon, Sep 04, 2006 at 02:40:16PM +0100, Joe Orton wrote:
On Sun, Sep 03, 2006 at 08:45:06PM -0500, Tom 'spot' Callaway wrote:
I'd be interested in seeing examples of cases where creating files in %post that are not owned by %files would be wanted. I can't think of any.
With httpd we auto-generate a unique SSL certificate in %post (/etc/pki/tls/localhost.crt et al; some other packages are similar IIRC). I don't think it would be correct to have those generated files %files-owned by the package in any way.
I wouldn't consider certificates config files anyway. although one should think about ownership over them, too. What's wrong with %ghost %config(noreplace) them? Upgrades won't touch them.
I don't know how a ghosted noreplace file would be handled actually. Would an --erase always remove such a file? That is not really desirable.
Jesse: yes, generating the files at first invocation would be a good idea. But I don't think it makes a difference *when* the file is generated w.r.t. the question of whether the package should own it though.
joe
On Mon, Sep 04, 2006 at 02:55:25PM +0100, Joe Orton wrote:
On Mon, Sep 04, 2006 at 03:47:43PM +0200, Axel Thimm wrote:
On Mon, Sep 04, 2006 at 02:40:16PM +0100, Joe Orton wrote:
On Sun, Sep 03, 2006 at 08:45:06PM -0500, Tom 'spot' Callaway wrote:
I'd be interested in seeing examples of cases where creating files in %post that are not owned by %files would be wanted. I can't think of any.
With httpd we auto-generate a unique SSL certificate in %post (/etc/pki/tls/localhost.crt et al; some other packages are similar IIRC). I don't think it would be correct to have those generated files %files-owned by the package in any way.
I wouldn't consider certificates config files anyway. although one should think about ownership over them, too. What's wrong with %ghost %config(noreplace) them? Upgrades won't touch them.
I don't know how a ghosted noreplace file would be handled actually. Would an --erase always remove such a file? That is not really desirable.
I'm not sure, if it does, then don't %ghost it. The drawback of not ghosting would be a phony empty /etc/pki/tls/localhost.crt.rpmnew. But this could be removed in the same %post operation that generates the contents for /etc/pki/tls/localhost.crt.
E.g.
%install ... touch %{buildroot}%{mycert} ...
%post rm -f %{mycert}.rpmnew if ... ... > %{mycert} fi
%files ... %config(noreplace) %{mycert}
On Sat, Sep 02, 2006 at 12:14:49PM -0500, Rex Dieter wrote:
On Sat, 2 Sep 2006, Jesse Keating wrote:
On Sat, 2006-09-02 at 18:03 +0200, Axel Thimm wrote:
Isn't this handled in some guidelines? If not shouldn't it?
I thought we had a rule about creating files in %post or whatnot and not owning them. I could be wrong, but I check for that when I review packages. IMHO any file a package creates on the file system at install time should be owned or ghosted by that package.
I argued for such a rule, but others pointed out examples where this is not always/generally a good idea, so the proposal did not have the support to pass.
Were the examples for certificate/ssh keys only? I don't really meant these with "config files". Are there any arguments against owning config files but certifcates/ssh keys?
On Mon, 2006-09-04 at 16:00 +0200, Axel Thimm wrote:
On Sat, Sep 02, 2006 at 12:14:49PM -0500, Rex Dieter wrote:
I argued for such a rule, but others pointed out examples where this is not always/generally a good idea, so the proposal did not have the support to pass.
Were the examples for certificate/ssh keys only? I don't really meant these with "config files". Are there any arguments against owning config files but certifcates/ssh keys?
I don't recall anything except certificates. The log of that meeting is here: http://www.fedoraproject.org/wiki/Packaging/IRCLog20060727
Relevant timeframe: (09:33:08) - (09:59:24)
-Toshio
On Mon, Sep 04, 2006 at 10:59:55PM -0700, Toshio Kuratomi wrote:
On Mon, 2006-09-04 at 16:00 +0200, Axel Thimm wrote:
On Sat, Sep 02, 2006 at 12:14:49PM -0500, Rex Dieter wrote:
I argued for such a rule, but others pointed out examples where this is not always/generally a good idea, so the proposal did not have the support to pass.
Were the examples for certificate/ssh keys only? I don't really meant these with "config files". Are there any arguments against owning config files but certifcates/ssh keys?
I don't recall anything except certificates. The log of that meeting is here: http://www.fedoraproject.org/wiki/Packaging/IRCLog20060727
Relevant timeframe: (09:33:08) - (09:59:24)
Thanks!
There isn't much in there which hasn't been said in this thread, I think. It's mostly about not wanting to accidentially remove certificates or other sensitive auto-generated key material and that can be handled fine (see my reply to Joe).
And it also didn't fail on passing, it failed on available time in the session - looks like most people were not rejecting the idea of having config files (or other generated files) owned by the package, if it doesn't do harm.
packaging@lists.fedoraproject.org