Subject: game score files in a package
To: None <firstname.lastname@example.org>
From: Simon Burge <email@example.com>
Date: 12/02/1998 16:20:15
What's the best way of putting a score file in a package?
In a nutshell, the game doesn't create the score file, and I've got the
game setgid so only it can change the score file.
If I add it to the PLIST, pkg_delete complains because it's md5
doesn't match, but I can still get rid of it by adding an "@unexec rm
-f <score-file>" at the bottom of the PLIST. One idea is to add a
pkg/DEINSTALL script that zero'ed out the file so that the md5 matches.
I couldn't see a why of telling pkg_delete "don't worry if this file has
Another problem is that the score file is mode 664 (and the game sgid to
the "games" group). In the pkg tar file, the file is mode 664, but when
the package gets extracted by pkg_add it comes out mode 644. A ktrace
shows that file get's extracted (or at least processed) twice, first
time mode 664 and second time mode 644, but it's not exactly obvious at
first glance exactly what pkg_add is doing internally. I guess I could
add a pkg/INSTALL script that simply chmod's the score file.
Looking at existing packages hasn't helped me so far...