Bug 82584 - kgoldrunner installs data files with hardcoded uid/gid and uses unportable chown to set them.
Summary: kgoldrunner installs data files with hardcoded uid/gid and uses unportable ch...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kgoldrunner
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Ian Wadham
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-31 16:30 UTC by Michael Nottebrock
Modified: 2005-01-22 02:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Nottebrock 2004-05-31 16:30:13 UTC
Version:            (using KDE KDE 3.2.2)
Installed from:    FreeBSD Ports
OS:                FreeBSD

kgoldrunner installs leveldata like this

cd $(DESTDIR)$(gamedatadir) && tar -xf $$pwd/levels.tar ;\
chown -R root.root levels 2> /dev/null || true ;\
chmod 644 levels/* 2> /dev/null || true

This does not work on FreeBSD, which has a POSIX compliant chown and does not understand a period (.) as user/group separator, instead it wants a colon (:).
Comment 1 andy 2004-05-31 17:15:59 UTC
Also, group "root" is not always appropriate, *BSD for example use the group "wheel" instead.
Comment 2 Waldo Bastian 2004-06-04 16:21:26 UTC
Might be easier to store the levels untarred in CVS.
Comment 3 Jakob Schröter 2004-10-10 04:45:15 UTC
CVS commit by schrot: 

fix kgoldrunner bugs #82584 and #83512

CCMAIL: 82584-done@bugs.kde.org
CCMAIL: 83512-done@bugs.kde.org


  M +1 -1      gamedata/Makefile.am   1.13
  M +6 -3      src/kgoldrunner.cpp   1.17
  M +2 -0      src/kgrgame.cpp   1.18


--- kdegames/kgoldrunner/gamedata/Makefile.am  #1.12:1.13
@@ -9,5 +9,5 @@
         pwd=`cd $(srcdir) && pwd` ;\
         cd $(DESTDIR)$(gamedatadir) && tar -xf $$pwd/levels.tar ;\
-        chown -R root.root levels 2> /dev/null || true ;\
+        chown -R root:root levels 2> /dev/null || true ;\
         chmod 644 levels/* 2> /dev/null || true 
 

--- kdegames/kgoldrunner/src/kgoldrunner.cpp  #1.16:1.17
@@ -939,7 +939,10 @@ void KGoldrunner::setKey (KBAction movem
     }
 
-    if (! hero->started)                        // Start when first movement
+    if ( game->getLevel() != 0 )
+    {
+      if (! hero->started )                     // Start when first movement
         game->startPlaying();                   // key is pressed ...
     game->heroAction (movement);
+    }
 }
 

--- kdegames/kgoldrunner/src/kgrgame.cpp  #1.17:1.18
@@ -112,4 +112,6 @@ void KGrGame::startLevel (int startingAt
     if (selectedLevel > 0) {    // If OK, start the selected game and level.
         newGame (selectedLevel, selectedGame);
+    } else {
+      level = 0;
     }
 }


Comment 4 andy 2005-01-17 07:54:15 UTC
"group" is still hardcoded as "root", which does not exist on *BSD
Comment 5 Ian Wadham 2005-01-22 02:11:21 UTC
The bug reporter has devised a workaround, but long-term I plan to change the game-file format, to avoid the use of "tar" and non-standard install, and so this troublesome bit of script will be deleted eventually.