On Wed, Nov 24, 2010 at 03:58:26PM +0100, Lennart Poettering wrote:
> On Wed, 24.11.10 03:02, Toshio Kuratomi (a.bad...@gmail.com) wrote:
> 
> > > > Imho there should be a packaging guideline to make it clear what needs
> > > > to be done in which cases. E.g. when to %ghost files and when not.
> > > 
> > > I guess extending the guidelines with a line or two about this is a good 
> > > idea.
> > > 
> > I see you've already filed some bugs but in the future it would be best to
> > get the packaging guidelines worked out before you do that.  Most notably
> > because it seems like you're going to have to now file an update to all of
> > those bugs due to:
> 
> I don't think this will be necessary since only a small subset of
> services will need this treatment. 
> 
> I have mentioned it a couple of times, but I will do so here again:
> OpenSUSE and Ubuntu have been shipping their systems like this since
> quite some time, as do we apparently with the stateless stuff. Most
> software has already been fixed to properly create those subdirs on its
> own. That's why adding tmpfiles drop-ins will be necessary only in
> exceptions.
> 
Except that you're arguing over whether we should do this at all and I'm
just saying that your implementation is flawed.

> > > Hmm, it has been suggested that we should make it possible to create
> > > these dirs in the .spec files by invoking the systemd-tmpfiles tool
> > > directly from the scriptlets. I guess we should add a nice interface for
> > > that. In the meantime it should be sufficient to simply place th right
> > > "mkdir -p -m ..." in the scriptlet. Of course it would be desirable if
> > > we have a single place where the dirs to create are encoded.
> > >
> > A question I'd have when looking over a proposed packaging guideline would
> > be: why %ghost the directories?  Why not include the directories as normal
> > but add the tmpfiles.d step in addition?
> 
> Well, because rpm has introduced %ghost for cases like this, and everybody
> else uses it for that.
> 
%ghost is definitely suitable for files but I'm not so sure it's suitable
for directories.  It certainly leads to more complex spec files to use
%ghost on the directory for really no gain that I'm aware of.  %ghost does
%two things with a file:  It tells rpm that it doesn't need to install the
file.  It tells rpm to not track the contents of the file while still
tracking the permissions and ownerhsip of the file.  With directories that
are created by systemd at boottime, we still have to create the directories at
install time somehow using so using rpm's standard method of file
installation seems less complex then tesching everyone to put mkdir into
their spec files.  With directories, we do not have content that changes,
only permissions and ownership so that reason for using %ghost also doesn't
seem to make a difference.

SUSe may have realized that too as they stopped %ghosting the /var/run/httpd
directory (but I can't see the bug that is referenced there ( 498490 ) so
I don't know for sure.  OTOH, they didn't make the change across their
packageset as avahi still has the directory %ghosted.

-Toshio

Attachment: pgpSYLwfDcMcx.pgp
Description: PGP signature

-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to