Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#12258 - dopewars: wrong permission on /var/games

Attached to Project: Arch Linux
Opened by Eric Belanger (Snowman) - Thursday, 27 November 2008, 20:11 GMT
Last edited by Thayer Williams (thayer) - Friday, 28 November 2008, 15:30 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Thayer Williams (thayer)
Architecture All
Severity Medium
Priority Normal
Reported Version None
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

/var/games permissions should be 775 as set by filesystem package, not 755:

pacman output:
warning: directory permissions differ on var/games/
filesystem: 775 package: 755
This task depends upon

Closed by  Thayer Williams (thayer)
Friday, 28 November 2008, 15:30 GMT
Reason for closing:  Implemented
Comment by Thayer Williams (thayer) - Thursday, 27 November 2008, 21:14 GMT
This caught me by surprise as well, so I checked a number of other games that drop data in /var/games and they reported the same message...so I assumed it was normal.
Comment by Eric Belanger (Snowman) - Thursday, 27 November 2008, 21:48 GMT
File bug reports against these other games. When pacman gives this warning, check the filesystem PKGBUILD to see what permission it gives to the directory.
Comment by Jan de Groot (JGC) - Thursday, 27 November 2008, 22:57 GMT
Note that the dopewars executable should be setgid games:

root:games, 2755 permissions. The score files in /var/games should be owned by root:games also and should be mode 664. This makes sure games can write their hiscores while gamers can't cheat using a texteditor if they don't have root.
Comment by Thayer Williams (thayer) - Thursday, 27 November 2008, 23:04 GMT
*ugh* that's not all that wrong...I just noticed a flaw in setting --localstatedir=$pkgdir/var/games

The score file's default location is hard-coded so I'm going to have to take a closer look at this when I have some more time this afternoon.
Comment by Eric Belanger (Snowman) - Thursday, 27 November 2008, 23:42 GMT
you might want to use --localstatedir=/var/games instead unless that doesn't work. Same change for --mandir. Use DESTDIR in the make install line if it support it.
Comment by Thayer Williams (thayer) - Thursday, 27 November 2008, 23:46 GMT
It doesn't unfortunately. The only workaround I can see is to patch the configure file to hardcode the localstatedir as /var/games. Could I be missing something more obvious?

Fortunately, mandir does work as expected..err nevermind, man doesn't work either.
Comment by Thayer Williams (thayer) - Friday, 28 November 2008, 01:02 GMT
OK, I think it's all fixed up. Thanks for the info, Jan I've corrected the ownership and perms. Eric, DESTDIR did the trick for the paths though I still had to sed the /var/games path.
Comment by Eric Belanger (Snowman) - Friday, 28 November 2008, 01:14 GMT
the install file is missing from svn. I'll check out the /var/games path issue.
Comment by Eric Belanger (Snowman) - Friday, 28 November 2008, 02:02 GMT
I think I fixed it. I'm not able to test because of missing .install file. Make sure it's aware that the score file is in /var/games. Changes:
$ diff -Naur ../repos/extra-i686/PKGBUILD PKGBUILD
--- ../repos/extra-i686/PKGBUILD 2008-11-27 20:14:58.750555937 -0500
+++ PKGBUILD 2008-11-27 21:00:31.186950908 -0500
@@ -18,10 +18,7 @@
build() {
cd $srcdir/$pkgname-$pkgver

- # score path is hardwired so we must set to /var/games
- sed -i 's|${prefix}/var|/var/games|' configure || return 1
-
- ./configure --prefix=/usr || return 1
+ ./configure --prefix=/usr --localstatedir=/var/games --mandir=/usr/share/man || return 1
make || return 1
make DESTDIR=$pkgdir install || return 1

@@ -32,9 +29,9 @@
rm -r $pkgdir/usr/share/gnome

# set appropriate permissions and destinations
- mv $pkgdir/usr/man $pkgdir/usr/share
chown root:games $pkgdir/usr/bin/dopewars
chmod 2755 $pkgdir/usr/bin/dopewars
+ chown root:games $pkgdir/var/games
chmod 775 $pkgdir/var/games

# Handle the scores file creation in the install script
Comment by Thayer Williams (thayer) - Friday, 28 November 2008, 02:11 GMT
Thanks Eric, it looks like we were working on it at the same time. Good grief, I think it's finally fixed.

I just committed it in truck and pushed the changes to the 686 repo. Want me to do the same for x86_64?
Comment by Eric Belanger (Snowman) - Friday, 28 November 2008, 02:31 GMT
Can you build for x86_64 now? If yes, sure go ahead.
Comment by Thayer Williams (thayer) - Friday, 28 November 2008, 02:45 GMT
I cannot unfortunately, so I guess that wouldn't make much sense...that's what I get for doing this stuff on the final weekend of school--everything is bass ackwards.
Comment by Eric Belanger (Snowman) - Friday, 28 November 2008, 03:20 GMT
In that case, don't push any changes for x86_64. That will cause a mismatch between the PKGBUILD in abs and the package in the repo. And you risk messing up the db. I'll do the update tomorrow.
Comment by Eric Belanger (Snowman) - Friday, 28 November 2008, 15:23 GMT
x86_64 package done. Close this bug whenever you want.

Loading...