[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: policy violation and bug reports. - some resolution?



On Wed, 25 Feb 1998, Adrian Bridgett wrote:

> On Tue, Feb 24, 1998 at 10:22:51PM +0100, Christian Schwarz wrote:
> > 
> > Let me just comment on one clear question I've seen in the discussion:
> > Should game's score files be tagged as conffile? I think the answer is
> > clear: `no'. 
> 
> Another check for lintian :-)  - everything in /var/lib/games is a score
> file on my machine, and I'll bet most are conffiles and in the .deb -
> certainly all of my packages are.

Good idea.

> It would be nice to have something in the packaging manual spelling out how
> to handle high-score files properly.

Good point. I think section 4.9 of the policy manual is the right place
for this. If we have a consensus about the comments below, I'll prepare a
policy change.

> Does this look correct?
> 
>   - don't include the file at all or mark it as a conffile
>   - in the postinst, touch the file and set it's permission like this:

I think score files should never be marked as conffile. Score files are
`data' files, not `configuration' files. With that, the package should
provide an initial version of that file, but never replace it during
package upgrades. (With that, the package may not include this file
directly in the package tree.)

However, if the file format of the score file has changed, the postinst
script should handle replacing the old file (or probably converting
it to the new format--if necessary) after querying the sysadmin.

> #!/bin/sh -e
> HS=/var/lib/games/package.score
> touch $HS
> chown root games $HS
> chmod 0664 $HS
> 
>   - make the program setuid in the .deb file. Additionally, put this in the
> postinst:

No, games should not be `setuid', but `setgid games' only.

> #!/bin/sh -e
> if [ -x /usr/sbin/suidregister ]; then
>    suidregister -s package /usr/games/program root games 2755
> else
> 
> and in the postrm:
> #!/bin/sh -e 
> if [ -x /usr/sbin/suidregister ]; then
>    suidunregister -s package /usr/games/program root games 2755
> else

Note, that suidmanager is not officially approved. Thus, policy can't
mention it in examples.

>   - in the postrm, if it is called with "purge", delete the high-score file:
> 
> #!/bin/sh -e
> case "$1" in
>         purge) rm /var/lib/games/package.score;;
> esac
> 
> This will teach me to package games rather than something more productive!

;-)

I think it's sufficient if the policy states that score files should not
be marked as conffiles and should not be included in the package tree.
These files have to be installed somewhere else (perhaps
/usr/lib/games/foo) and copied to the score file location if it's not
already present.

BTW, in one of my last mails on this subject I said that CFGF which are
not managed by dpkg's CF mechnism could be managed by the package
maintainer scripts (postinst, etc.): one simply doesn't include the file
in the package and `creates' it via the postinst script. 

A few people have misinterpreted this (I guess that was my fault). Such
files need _not_ be included in the postinst file as uuencoded file or
something like that. It's sufficient to include this file `somewhere else'
than the usual file location (e.g., /path/file.dpkg-orig or similar) and
copy this file to the usual location (/path/file) or delete it--depending
on if there were any changes.


Thanks,

Chris

--                 Christian Schwarz
                    schwarz@monet.m.isar.de, schwarz@schwarz-online.com,
Don't know Perl?     schwarz@debian.org, schwarz@mathematik.tu-muenchen.de
      
Visit                  PGP-fp: 8F 61 EB 6D CF 23 CA D7  34 05 14 5C C8 DC 22 BA
http://www.perl.com     http://fatman.mathematik.tu-muenchen.de/~schwarz/


Reply to: