Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] Some games grimoire peculiarities(s?)

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: "Andrew \"ruskie\" Levstik" <ruskie AT mages.ath.cx>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: [SM-Discuss] Some games grimoire peculiarities(s?)
  • Date: Wed, 27 Jul 2005 10:05:55 +0200

OK another annoucment from me.

I have recently added a few functions to the games grimoire FUNCTIONS file
that try to sanitize the installation of games.

Here are the details:

The following function will set the proper permissions on any games related
files in the current dir and subdir. This should be run after installing
any data dirs.

function find_and_scam() {
find ./ -type d | xargs chmod 0750
find ./ -type d | xargs chown root.games
find ./ -type f | xargs chmod 0640
find ./ -type f | xargs chown root.games
}

The following function creates some base dirs regarding a games spell.
This function is being called in the default_pre_install function in the
games grimoire so these dirs should be available in the INSTALL file.

function games_create_base_dirs() {
mkdir -vp ${INSTALL_ROOT}/usr/share/games/${SPELL}
mkdir -vp ${INSTALL_ROOT}/usr/games
mkdir -vp ${INSTALL_ROOT}/var/games
}

This function is called in the default_post_install function in the games
grimoire
it set's the proper permissions on any binary that is installed in /usr/games
And if there is no binary being installed by the spell a message is printed
if the spell is -data then the message can safely be ignored else it should be
reported on that bugzilla url.

function games_make_proper_binary() {
if ( grep -q "usr/games/" $IW_LOG )
then
cat $IW_LOG | cut -f 3 | sort | grep "usr/games/" | xargs -n 1 chmod 0750
cat $IW_LOG | cut -f 3 | sort | grep "usr/games/" | xargs -n 1 chown
root.games
else
message "${QUERY_COLOR}If you see this message and you're not \n \
installing a data spell then report this at the following url: \n \
http://bugs.sourcemage.org/enter_bug.cgi?product=Codex&bug_status=NEW&version=games%20grimoire&comp$
fi
}

The following is also called in the default_post_install function:
rmdir --ignore-fail-on-non-empty ${INSTALL_ROOT}/usr/share/games/${SPELL}

Which would remove the dir if it is empty the other dirs could be used
or not but this tries to make it sane on all systems.

Thank you for your attention and I ask you to try and make proper use of these
functions.

Remember the only callable function is find_and_scam and should only be used
on
data dirs and such.

--
Andrew "ruskie" Levstik
Source Mage GNU/Linux Games grimoire guru

http://ruskie.dtdm.org/blog/



  • [SM-Discuss] Some games grimoire peculiarities(s?), Andrew "ruskie" Levstik, 07/27/2005

Archive powered by MHonArc 2.6.24.

Top of Page