Hi I would like to ask for some gentoo dev to say if it would be OK for gentoo to include the PvPGN project in its Portage. I will take care and make the ebuild file if time is problem :) I just want to know before I make it so I dont waste my time. PvPGN legal status is "fuzzy" because it is based on a legally disputed bnetd project (now frozen). More informations about bnetd and their Vivendi case you can find here: http://www.eff.org/IP/Emulation/Blizzard_v_bnetd/ http://research.yale.edu/lawmeme/modules.php?name=News&file=article&sid=149 Considering the Debian devs already have bnetd and they agreed to include PvPGN too I believe it wont be a problem for Gentoo ? http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=224163 Thanks! Reproducible: Always Steps to Reproduce:
if it's good enough for sourceforge it's good enough for me
OK, thanks! Now, I already have rpm/deb/tgz binary packages. All this usually create a user/group called pvpgn and run the main server daemon under that. 1. Should I make the same for gentoo ? 2. static config files I should put them in /etc, what about dynamic ones ? (for example ip.ban configurion file can also be altered while server is running by admins connecting to the server) 3. server dynamic data files (like ladders, account files etc) where do they belong on gentoo file system ? 4. the pvpgn package consists of more than one server daemons (bnetd is the main server daemon, then we also have d2cs and d2dbs); I will make /etc/init.d entries for each of these hope thats no problem ? Thanks!
Created attachment 29328 [details] pvpgn 1.6.2 ebuild v1 Ok. This is a first version, works fine here. Please test and report, thanks!
Can someone look into this please ?
1. no, use the games-ded user 2. I would put dynamic in the games' directory, and maybe even the static ones 3. where does the game up them? would /usr/games/share be a good location? I'm not sure on this one 4. you probably need shell scripts for each Also, please don't post binary data in bugzilla. I'm not very interested in this package, but I would be able to help you easily if I were able to actually look at the individual files in the tarball. It also tends to speed up something being added to portage, provided there is a developer willing to maintain it... and with the games team, we co-maintain anything that one of us doesn't specifically take maintainership of, so that isn't much of a worry. I would attach your ebuild/init scripts as plain/text to this bug and hopefully you can stir up a bit more attention to this bug/ebuild. =]
Created attachment 30301 [details] pvpgn 1.6.2 v2 ebuild file Thanks for your answers. I have attached here a modified version of the ebuild file from the archive. I have modified it to use games-ded user (now it inherits games eclass). However please notice this is not a game but a game server. Because of this I wonder if its ok to use egamesconf (thus using $PREFIX /usr/games and installing daemons into /usr/games/sbin, using /etc/games/pvpgn for sysconfdir, using /var/games/pvpgn for statedir etc). The ebuild file attached here does that and I dont think its ok for example because 90games env.d file doesnt export path to /usr/games/sbin. So please take a look at tje ebuild and if possible answer this questions: 1. what should be the prefix ? (for bin and sbin) 2. what should the the statedir root ? (/var/games or /var/lib) 3. what should be the logdir root (/var/log/games or /var/log) 4. that configuration file which modifies while server runs would be ok to the installed in %statedir%/pvpgn/etc ? (%statedir% beeing the one chosed at the (2) question above)
Created attachment 38236 [details] RC script for bnetd (using games.eclass)
Created attachment 38237 [details] RC script for d2cs (using games.eclass)
Created attachment 38238 [details] RC script for d2dbs (using games.eclass)
Created attachment 38239 [details, diff] PvPGN 1.6.4 FHS patch
Created attachment 38240 [details] PvPGN 1.6.4 ebuild file (using games eclass) As requested add all files as text for quicker review. I have updated the ebuild to 1.6.4 PvPGN version. The ebuild uses games.eclass as requested, however I do have some problems/questions with that: 1. configuration files are installed in /etc/games/pvpgn (kinda long path dont you think ?) 2. server binaries are installed in /usr/games/sbin (strange path if you ask me) and env.d/games does not define /usr/games/sbin in path so all must work with full paths 3. there is a runtime modified configuration file, where should that be located ? (curently it's in /etc but that is not very nice as etc must be r/o ?)
The path needs to be changed for the server binaries. It should install them in ${GAMES_BINDIR}. Run-time modified files need to go in ${GAMES_STATEDIR}. ${GAMES_SYSCONFDIR} is a fine place to put the global config files.
Created attachment 38278 [details] RC script for bnetd (using games.eclass) Updated path (/usr/games/sbin/bnetd -> /usr/games/bin/bnetd)
Created attachment 38279 [details] RC script for d2cs (using games.eclass) Updated path (/usr/games/sbin/d2cs -> /usr/games/bin/d2cs)
Created attachment 38280 [details] RC script for d2cs (using games.eclass) Whoops, sorry about last one, wrong file :-/
Created attachment 38281 [details] RC script for d2dbs (using games.eclass) Changed path (/usr/games/sbin/d2dbs -> /usr/games/bin/d2dbs).
Created attachment 38282 [details, diff] PvPGN 1.6.4 FHS patch Updated so run-time configuration files are under $GAMES_STATEDIR.
Created attachment 38283 [details] PvPGN 1.6.4 ebuild file (using games eclass) Updated to pass --sbindir=${GAMES_BINDIR} to egamesconf. Ok, sorry for the mail flood but you guys asked to have files as text ;) Other questions: - the log file(s) should it stay under ${GAMES_STATEDIR} or if not where else ? - how do I get rid of "dedicated" flag (inhireted from games.eclass) because this is a game server only (always dedicated heh) Thanks!
- the log file(s) should it stay under ${GAMES_STATEDIR} or if not where else ? GAMES_STATEDIR is fine - how do I get rid of "dedicated" flag (inhireted from games.eclass) because this is a game server only (always dedicated heh) You don't. It's ok to ignore it.
We just released PvPGN 1.6.5 fixing some more security bugs (stack buffer overflows because of missing user input validation :-/). I dont need to edit any file, just rename pvpgn-1.6.4.ebuild to pvpgn-1.6.5.ebuild and it works just fine (even the FHS patch has no problems because we didnt touched anything that relates to that patch). Another thing, when do you think it will be accepted in portage ? It's been almost 6 months now (yep, I think it was mostly my fault that I didnt updated the files with text version, but even so..). Thanks!
is there any reason the FHS patch hasnt been added to the PvPGN cvs ?
Created attachment 38557 [details] pvpgn-1.6.5.tar.bz2 try this one out root@vapier 0 games-server # tar -jcvf pvpgn-1.6.5.tar.bz2 pvpgn pvpgn/ pvpgn/files/ pvpgn/files/digest-pvpgn-1.6.5 pvpgn/files/init.d.rc pvpgn/files/1.6.5-fhs.patch pvpgn/Manifest pvpgn/pvpgn-1.6.5.ebuild
There is a bug in your ebuild file I think: chown: cannot access `/var/games/pvpgn': No such file or directory chmod: cannot access `/var/games/pvpgn': No such file or directory ${GAMES_STATEDIR}/pvpgn does not exist at the moment of chown/chmod in pkg_postinst(). Anyway, to answer your previous questions: I made that patch some time ago and we kinda got caught with other stuff. There is one problem tho which I think I curently lack the experience to find the right solution but you might help me. We would like to have PvPGN install it's files in 2 ways: - a "/bin, /sbin, /var, /man" structure under given --prefix (which by default should be /usr/local/pvpgn); this is no problem to do it now - but also a "sysconf/etc/pvpgn, statedir/pvpgn, datadir/pvpgn, etc" (mostly for distribution builds like Gentoo) I would like to have PvPGN possible to install in any of this 2 ways. That way we get rid of FHS patch and make distribution builders happy but also we still support the preffered way by many people which install PvPGN from sources (we developers included here). Another thing which we want to "fix" for next release whould be: 1. more documentation (we already have good documentation at sf.net docmanager, we just need it to put it into the package too) 2. add a signal handler (we already did this with SIGQUIT in the development branch) so PvPGN will shutdown immediatly (curently SIGTERM/SIGINT are caught and they initilize the shutdown sequence if there is any server connection can take some time, the time is configurable in bnetd.conf); this signal should be used in RC scripts with "stop" argument Thanks for your time!
Oh and you might add sed to dependencies :)
the chown can be fixed by moving the install up two lines the sed DEPEND is a moot point the directory hierarchy can be tackled easily ... if you know your autotools ;) what i've seen with some packages is they have a '--enable-fhs' configure option ... i'd suggest you take that route with the configure script ... here's a bit of code i just typed up on the fly: AC_MSG_CHECKING(whether to use FHS compliant directory structure) use_fhs_paths="no" AC_ARG_ENABLE(fhs, [ --enable-fhs Install into FHS compliant directories], [ if test "x$enableval" == "xyes" ; then use_fhs_paths="yes" else use_fhs_paths="no" fi ], [use_fhs_paths="no"]) AC_MSG_RESULT($use_fhs_paths) if test "x$use_fhs_paths" == "xyes" ; then # set the paths to the normal stuff else # set the paths to the $prefix/blah nonsense fi
fixed the permission things and added to cvs under games-server