Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40979 - new ebuild for PvPGN (new package)
Summary: new ebuild for PvPGN (new package)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Games
URL: http://sourceforge.net/projects/pvpgn/
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2004-02-09 09:18 UTC by Dizzy
Modified: 2004-08-31 21:39 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pvpgn 1.6.2 ebuild v1 (pvpgn-1.tar.gz,4.95 KB, application/x-tar)
2004-04-15 03:47 UTC, Dizzy
Details
pvpgn 1.6.2 v2 ebuild file (pvpgn-1.6.2.ebuild,3.24 KB, text/plain)
2004-04-29 01:03 UTC, Dizzy
Details
RC script for bnetd (using games.eclass) (bnetd.rc,1.02 KB, text/plain)
2004-08-26 05:10 UTC, Dizzy
Details
RC script for d2cs (using games.eclass) (d2cs.rc,1.01 KB, text/plain)
2004-08-26 05:10 UTC, Dizzy
Details
RC script for d2dbs (using games.eclass) (d2dbs.rc,1.02 KB, text/plain)
2004-08-26 05:11 UTC, Dizzy
Details
PvPGN 1.6.4 FHS patch (pvpgn-1.6.4-fhs.patch,10.04 KB, patch)
2004-08-26 05:12 UTC, Dizzy
Details | Diff
PvPGN 1.6.4 ebuild file (using games eclass) (pvpgn-1.6.4.ebuild,2.67 KB, text/plain)
2004-08-26 05:16 UTC, Dizzy
Details
RC script for bnetd (using games.eclass) (bnetd.rc,1.02 KB, text/plain)
2004-08-27 01:38 UTC, Dizzy
Details
RC script for d2cs (using games.eclass) (d2cs.rc,1.00 KB, text/plain)
2004-08-27 01:39 UTC, Dizzy
Details
RC script for d2cs (using games.eclass) (d2cs.rc,1.01 KB, text/plain)
2004-08-27 01:41 UTC, Dizzy
Details
RC script for d2dbs (using games.eclass) (d2dbs.rc,1.02 KB, text/plain)
2004-08-27 01:42 UTC, Dizzy
Details
PvPGN 1.6.4 FHS patch (pvpgn-1.6.4-fhs.patch,10.08 KB, patch)
2004-08-27 01:43 UTC, Dizzy
Details | Diff
PvPGN 1.6.4 ebuild file (using games eclass) (pvpgn-1.6.4.ebuild,2.70 KB, text/plain)
2004-08-27 01:46 UTC, Dizzy
Details
pvpgn-1.6.5.tar.bz2 (pvpgn-1.6.5.tar.bz2,4.12 KB, application/octet-stream)
2004-08-30 21:10 UTC, SpanKY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dizzy 2004-02-09 09:18:54 UTC
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:
Comment 1 SpanKY gentoo-dev 2004-02-09 09:23:14 UTC
if it's good enough for sourceforge it's good enough for me
Comment 2 Dizzy 2004-02-12 04:55:09 UTC
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!
Comment 3 Dizzy 2004-04-15 03:47:52 UTC
Created attachment 29328 [details]
pvpgn 1.6.2 ebuild v1

Ok. This is a first version, works fine here. Please test and report, thanks!
Comment 4 Dizzy 2004-04-21 04:13:48 UTC
Can someone look into this please ?
Comment 5 Chris Gianelloni (RETIRED) gentoo-dev 2004-04-28 19:22:55 UTC
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.

=]
Comment 6 Dizzy 2004-04-29 01:03:41 UTC
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)
Comment 7 Dizzy 2004-08-26 05:10:33 UTC
Created attachment 38236 [details]
RC script for bnetd (using games.eclass)
Comment 8 Dizzy 2004-08-26 05:10:53 UTC
Created attachment 38237 [details]
RC script for d2cs (using games.eclass)
Comment 9 Dizzy 2004-08-26 05:11:18 UTC
Created attachment 38238 [details]
RC script for d2dbs (using games.eclass)
Comment 10 Dizzy 2004-08-26 05:12:00 UTC
Created attachment 38239 [details, diff]
PvPGN 1.6.4 FHS patch
Comment 11 Dizzy 2004-08-26 05:16:24 UTC
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 ?)
Comment 12 Mr. Bones. (RETIRED) gentoo-dev 2004-08-26 12:15:25 UTC
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.
Comment 13 Dizzy 2004-08-27 01:38:53 UTC
Created attachment 38278 [details]
RC script for bnetd (using games.eclass)

Updated path (/usr/games/sbin/bnetd -> /usr/games/bin/bnetd)
Comment 14 Dizzy 2004-08-27 01:39:33 UTC
Created attachment 38279 [details]
RC script for d2cs (using games.eclass)

Updated path (/usr/games/sbin/d2cs -> /usr/games/bin/d2cs)
Comment 15 Dizzy 2004-08-27 01:41:16 UTC
Created attachment 38280 [details]
RC script for d2cs (using games.eclass)

Whoops, sorry about last one, wrong file :-/
Comment 16 Dizzy 2004-08-27 01:42:09 UTC
Created attachment 38281 [details]
RC script for d2dbs (using games.eclass)

Changed path (/usr/games/sbin/d2dbs -> /usr/games/bin/d2dbs).
Comment 17 Dizzy 2004-08-27 01:43:49 UTC
Created attachment 38282 [details, diff]
PvPGN 1.6.4 FHS patch

Updated so run-time configuration files are under $GAMES_STATEDIR.
Comment 18 Dizzy 2004-08-27 01:46:36 UTC
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!
Comment 19 Mr. Bones. (RETIRED) gentoo-dev 2004-08-27 02:33:51 UTC
- 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.
Comment 20 Dizzy 2004-08-30 05:00:09 UTC
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!
Comment 21 SpanKY gentoo-dev 2004-08-30 20:44:00 UTC
is there any reason the FHS patch hasnt been added to the PvPGN cvs ?
Comment 22 SpanKY gentoo-dev 2004-08-30 21:10:06 UTC
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
Comment 23 Dizzy 2004-08-31 00:40:25 UTC
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!
Comment 24 Dizzy 2004-08-31 00:49:37 UTC
Oh and you might add sed to dependencies :)
Comment 25 SpanKY gentoo-dev 2004-08-31 21:36:40 UTC
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
Comment 26 SpanKY gentoo-dev 2004-08-31 21:39:48 UTC
fixed the permission things and added to cvs under games-server