Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
On 11/21/2014 10:08 PM, Mike Gilbert wrote: > On Fri, Nov 21, 2014 at 10:31 AM, hasufell wrote: >> On 11/21/2014 04:10 PM, Tim Harder wrote: >>> On 2014-11-21 09:54, hasufell wrote: There are users who seem to like it and the games team wants to keep it as well, so I don't see a reason to push into that direction. >>> The main thing is that you cannot turn off all the permission stuff in the eclass whether you like it or not. Changing the install variables thing is just for convenience and already possible. >>> >>> If people don't want to use the games eclass, then don't use it. I >>> thought this had already been discussed and mostly ok-ed. >>> >>> I don't see the point of adding circumvention methods if you can just >>> avoid it altogether. >>> >> >> Are you serious? >> >> Instead of creating random competing concepts in one repository we >> should rather enhance configuration options, so that the USER can choose >> what he likes instead of the developer. >> >> I think this is a very bad idea. >> >> If we all decide to drop the eclass, then fine. Until then, users don't >> have any convenient way to have games world-executable without >> overwriting the eclass (which I currently do myself). >> > > It wasn't obvious to me that these were variables intended for > end-user usage. Perhaps you could make this more clear in the > comments? > I've already written a patch for fixing the documentation. The games team suggests to do: GAMES_GROUP=users if you want games world-executable which isn't particularly the same, but close enough I guess?
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
On Fri, Nov 21, 2014 at 10:31 AM, hasufell wrote: > On 11/21/2014 04:10 PM, Tim Harder wrote: >> On 2014-11-21 09:54, hasufell wrote: >>> There are users who seem to like it and the games team wants to keep it >>> as well, so I don't see a reason to push into that direction. >> >>> The main thing is that you cannot turn off all the permission stuff in >>> the eclass whether you like it or not. Changing the install variables >>> thing is just for convenience and already possible. >> >> If people don't want to use the games eclass, then don't use it. I >> thought this had already been discussed and mostly ok-ed. >> >> I don't see the point of adding circumvention methods if you can just >> avoid it altogether. >> > > Are you serious? > > Instead of creating random competing concepts in one repository we > should rather enhance configuration options, so that the USER can choose > what he likes instead of the developer. > > I think this is a very bad idea. > > If we all decide to drop the eclass, then fine. Until then, users don't > have any convenient way to have games world-executable without > overwriting the eclass (which I currently do myself). > It wasn't obvious to me that these were variables intended for end-user usage. Perhaps you could make this more clear in the comments?
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
On 2014-11-21 10:31, hasufell wrote: > Are you serious? > Instead of creating random competing concepts in one repository we > should rather enhance configuration options, so that the USER can choose > what he likes instead of the developer. > I think this is a very bad idea. > If we all decide to drop the eclass, then fine. Until then, users don't > have any convenient way to have games world-executable without > overwriting the eclass (which I currently do myself). Personally I've seen somewhat competing concepts evolve in the tree over the past years, specifically python/ruby eclass (r)evolution springs to mind. Stuff didn't immediately get deprecated in those cases but only after a certain period of burn-in for the newer work. I guess this case is somewhat different in that the outcome is a bit more visible to the average user and people want to remove the thing entirely. If this is a step in that direction fine and maybe this will help spur discussion to get that moving somewhere. Tim pgphhehLmVmBz.pgp Description: PGP signature
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
On 11/21/2014 04:10 PM, Tim Harder wrote: > On 2014-11-21 09:54, hasufell wrote: >> There are users who seem to like it and the games team wants to keep it >> as well, so I don't see a reason to push into that direction. > >> The main thing is that you cannot turn off all the permission stuff in >> the eclass whether you like it or not. Changing the install variables >> thing is just for convenience and already possible. > > If people don't want to use the games eclass, then don't use it. I > thought this had already been discussed and mostly ok-ed. > > I don't see the point of adding circumvention methods if you can just > avoid it altogether. > Are you serious? Instead of creating random competing concepts in one repository we should rather enhance configuration options, so that the USER can choose what he likes instead of the developer. I think this is a very bad idea. If we all decide to drop the eclass, then fine. Until then, users don't have any convenient way to have games world-executable without overwriting the eclass (which I currently do myself).
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
El vie, 21-11-2014 a las 10:10 -0500, Tim Harder escribió: > On 2014-11-21 09:54, hasufell wrote: > > There are users who seem to like it and the games team wants to keep it > > as well, so I don't see a reason to push into that direction. > > > The main thing is that you cannot turn off all the permission stuff in > > the eclass whether you like it or not. Changing the install variables > > thing is just for convenience and already possible. > > If people don't want to use the games eclass, then don't use it. I > thought this had already been discussed and mostly ok-ed. > > I don't see the point of adding circumvention methods if you can just > avoid it altogether. > > Tim Personally I lost the track in all the games.eclass issue... I thought it was going to be dropped finally :/ The problem I see in keeping it and also allow people to not use that one is that we will have some games installed in different places and permissions than others... and that looks really inconsistent to me (I guess people will simply keep adding themselves to games group... but, in that case, what is the purpose of keeping that group and special paths?)
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
On 2014-11-21 09:54, hasufell wrote: > There are users who seem to like it and the games team wants to keep it > as well, so I don't see a reason to push into that direction. > The main thing is that you cannot turn off all the permission stuff in > the eclass whether you like it or not. Changing the install variables > thing is just for convenience and already possible. If people don't want to use the games eclass, then don't use it. I thought this had already been discussed and mostly ok-ed. I don't see the point of adding circumvention methods if you can just avoid it altogether. Tim pgpKweuVpdC43.pgp Description: PGP signature
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
On 11/21/2014 11:04 AM, Pacho Ramos wrote: > El vie, 21-11-2014 a las 11:03 +0100, Pacho Ramos escribió: >> El jue, 20-11-2014 a las 23:04 +0100, Michał Górny escribió: >> [...] >>> Here's how games-r1 would look like. However, now that I think about it, >>> it may be actually useful to commit such an eclass. Otherwise people >>> will keep thinking games.eclass is the way to go. >>> >> >> Why isn't games.eclass deprecated then (like was done with old python >> eclasses) to let people to progressively stop using that at all? >> >> > > I clicked to "send" too fast sorry :S > > I meant that maybe we should simply deprecate it in the way that repoman > will inform people that they need to stop using it ;) > > There are users who seem to like it and the games team wants to keep it as well, so I don't see a reason to push into that direction. The main thing is that you cannot turn off all the permission stuff in the eclass whether you like it or not. Changing the install variables thing is just for convenience and already possible.
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
El vie, 21-11-2014 a las 11:03 +0100, Pacho Ramos escribió: > El jue, 20-11-2014 a las 23:04 +0100, Michał Górny escribió: > [...] > > Here's how games-r1 would look like. However, now that I think about it, > > it may be actually useful to commit such an eclass. Otherwise people > > will keep thinking games.eclass is the way to go. > > > > Why isn't games.eclass deprecated then (like was done with old python > eclasses) to let people to progressively stop using that at all? > > I clicked to "send" too fast sorry :S I meant that maybe we should simply deprecate it in the way that repoman will inform people that they need to stop using it ;)
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
El jue, 20-11-2014 a las 23:04 +0100, Michał Górny escribió: [...] > Here's how games-r1 would look like. However, now that I think about it, > it may be actually useful to commit such an eclass. Otherwise people > will keep thinking games.eclass is the way to go. > Why isn't games.eclass deprecated then (like was done with old python eclasses) to let people to progressively stop using that at all?
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
Dnia 2014-11-20, o godz. 18:49:25 Ulrich Mueller napisał(a): > > On Thu, 20 Nov 2014, hasufell wrote: > > > From: Julian Ospald > > Date: Thu Nov 20 17:04:20 UTC 2014 > > Subject: Allow to disable games permissions wrt #467386 > > > This also removes unnecessary exports of games > > variables. > > Wouldn't it be saner to have a new games-r1.eclass with fixed > permissions, instead of adding such additional bloat to the existing > eclass? Here's how games-r1 would look like. However, now that I think about it, it may be actually useful to commit such an eclass. Otherwise people will keep thinking games.eclass is the way to go. -- Best regards, Michał Górny # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/eclass/games.eclass,v 1.158 2014/07/11 08:21:58 ulm Exp $ # @ECLASS: games-r1.eclass # @MAINTAINER: # mgo...@gentoo.org # @BLURB: eclass to help standarizing game install in Gentoo # @DESCRIPTION: # This is the modern eclass used to standarize games install in Gentoo. # It is intended to replace games.eclass, and should be used in game # ebuilds nowadays. # # However, since games do not need any special rules you are free not to # inherit this eclass if you don't want to. Or inherit it before other # eclasses that export phase functions. : signature.asc Description: PGP signature
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
On 11/20/2014 06:49 PM, Ulrich Mueller wrote: >> On Thu, 20 Nov 2014, hasufell wrote: > >> From: Julian Ospald >> Date: Thu Nov 20 17:04:20 UTC 2014 >> Subject: Allow to disable games permissions wrt #467386 > >> This also removes unnecessary exports of games >> variables. > > Wouldn't it be saner to have a new games-r1.eclass with fixed > permissions, instead of adding such additional bloat to the existing > eclass? > > Ulrich > I don't intend to write another games eclass, I'd rather be interested in removing it altogether. This is just an intermediate solution IMO, for people who don't care about those permissions. If you look at the eclass, then it doesn't do much actual stuff, except for: * applying games permissions * installing files in non-standard locations So, games-r1.eclass would basically be empty.
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
> On Thu, 20 Nov 2014, hasufell wrote: > From: Julian Ospald > Date: Thu Nov 20 17:04:20 UTC 2014 > Subject: Allow to disable games permissions wrt #467386 > This also removes unnecessary exports of games > variables. Wouldn't it be saner to have a new games-r1.eclass with fixed permissions, instead of adding such additional bloat to the existing eclass? Ulrich pgp7gXweSKJP5.pgp Description: PGP signature
Re: [gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
I am running this since ~4 months straight without any problems.
[gentoo-dev] [PATCH] games.eclass: Allow to disable games permissions wrt #467386
From: Julian Ospald Date: Thu Nov 20 17:04:20 UTC 2014 Subject: Allow to disable games permissions wrt #467386 This also removes unnecessary exports of games variables. --- eclass/games.eclass +++ eclass/games.eclass @@ -19,25 +19,46 @@ *) die "no support for EAPI=${EAPI} yet" ;; esac +# Set to 0 to disable file permission modifications. +GAMES_PERMISSIONS=${GAMES_PERMISSIONS:-1} + +# Set to 0 to set the games variables like GAMES_PREFIX to +# match regular ebuilds if you don't want to micromanage them. +GAMES_VARIABLES=${GAMES_VARIABLES:-1} + if [[ ${CATEGORY}/${PN} != "games-misc/games-envd" ]] ; then # environment file RDEPEND="games-misc/games-envd" fi -export GAMES_PREFIX=${GAMES_PREFIX:-/usr/games} -export GAMES_PREFIX_OPT=${GAMES_PREFIX_OPT:-/opt} -export GAMES_DATADIR=${GAMES_DATADIR:-/usr/share/games} -export GAMES_DATADIR_BASE=${GAMES_DATADIR_BASE:-/usr/share} # some packages auto append 'games' -export GAMES_SYSCONFDIR=${GAMES_SYSCONFDIR:-/etc/games} -export GAMES_STATEDIR=${GAMES_STATEDIR:-/var/games} -export GAMES_LOGDIR=${GAMES_LOGDIR:-/var/log/games} -export GAMES_BINDIR=${GAMES_BINDIR:-${GAMES_PREFIX}/bin} -export GAMES_ENVD="90games" +if [[ ${GAMES_VARIABLES} != 1 ]] ; then + GAMES_PREFIX=/usr + GAMES_PREFIX_OPT=/opt + GAMES_DATADIR=/usr/share + GAMES_DATADIR_BASE=/usr/share + GAMES_SYSCONFDIR=/etc + GAMES_STATEDIR=/var/lib + GAMES_LOGDIR=/var/log + GAMES_BINDIR=${GAMES_PREFIX}/bin + GAMES_USER=root + GAMES_USER_DED=root + GAMES_GROUP=root +fi + +GAMES_PREFIX=${GAMES_PREFIX:-/usr/games} +GAMES_PREFIX_OPT=${GAMES_PREFIX_OPT:-/opt} +GAMES_DATADIR=${GAMES_DATADIR:-/usr/share/games} +GAMES_DATADIR_BASE=${GAMES_DATADIR_BASE:-/usr/share} # some packages auto append 'games' +GAMES_SYSCONFDIR=${GAMES_SYSCONFDIR:-/etc/games} +GAMES_STATEDIR=${GAMES_STATEDIR:-/var/games} +GAMES_LOGDIR=${GAMES_LOGDIR:-/var/log/games} +GAMES_BINDIR=${GAMES_BINDIR:-${GAMES_PREFIX}/bin} +GAMES_ENVD="90games" # if you want to use a different user/group than games.games, # just add these two variables to your environment (aka /etc/profile) -export GAMES_USER=${GAMES_USER:-root} -export GAMES_USER_DED=${GAMES_USER_DED:-games} -export GAMES_GROUP=${GAMES_GROUP:-games} +GAMES_USER=${GAMES_USER:-root} +GAMES_USER_DED=${GAMES_USER_DED:-games} +GAMES_GROUP=${GAMES_GROUP:-games} games_get_libdir() { echo ${GAMES_PREFIX}/$(get_libdir) @@ -87,46 +108,56 @@ games_make_wrapper() { gameswrapper ${FUNCNAME/games_} "$@"; } -gamesowners() { chown ${GAMES_USER}:${GAMES_GROUP} "$@"; } -gamesperms() { chmod u+rw,g+r-w,o-rwx "$@"; } +gamesowners() { + if [[ ${GAMES_PERMISSIONS} == 1 ]] ; then + chown ${GAMES_USER}:${GAMES_GROUP} "$@" + fi +} +gamesperms() { + if [[ ${GAMES_PERMISSIONS} == 1 ]] ; then + chmod u+rw,g+r-w,o-rwx "$@"; + fi +} prepgamesdirs() { - local dir f mode - for dir in \ - "${GAMES_PREFIX}" "${GAMES_PREFIX_OPT}" "${GAMES_DATADIR}" \ - "${GAMES_SYSCONFDIR}" "${GAMES_STATEDIR}" "$(games_get_libdir)" \ - "${GAMES_BINDIR}" "$@" - do - [[ ! -d ${D}/${dir} ]] && continue - ( - gamesowners -R "${D}/${dir}" - find "${D}/${dir}" -type d -print0 | xargs -0 chmod 750 - mode=o-rwx,g+r,g-w - [[ ${dir} = ${GAMES_STATEDIR} ]] && mode=o-rwx,g+r - find "${D}/${dir}" -type f -print0 | xargs -0 chmod $mode - - # common trees should not be games owned #264872 - if [[ ${dir} == "${GAMES_PREFIX_OPT}" ]] ; then - fowners root:root "${dir}" - fperms 755 "${dir}" - for d in $(get_libdir) bin ; do - # check if dirs exist to avoid "nonfatal" option - if [[ -e ${D}/${dir}/${d} ]] ; then - fowners root:root "${dir}/${d}" - fperms 755 "${dir}/${d}" - fi - done + if [[ ${GAMES_PERMISSIONS} == 1 ]] ; then + local dir f mode + for dir in \ + "${GAMES_PREFIX}" "${GAMES_PREFIX_OPT}" "${GAMES_DATADIR}" \ + "${GAMES_SYSCONFDIR}" "${GAMES_STATEDIR}" "$(games_get_libdir)" \ + "${GAMES_BINDIR}" "$@" + do + [[ ! -d ${D}/${dir} ]] && continue + ( + gamesowners -R "${D}/${dir}" + find "${D}/${dir}" -type d -print0 | xargs -0 chmod 750 + mode=o-rwx,g+r,g-w +