Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477658 - games-action/teeworlds[dedicated]: server init script won't run
Summary: games-action/teeworlds[dedicated]: server init script won't run
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-21 17:22 UTC by rypervenche
Modified: 2014-08-04 11:20 UTC (History)
0 users

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


Attachments
Necessary configuration "storage.cfg" (storage.cfg,62 bytes, text/plain)
2013-09-08 04:02 UTC, rypervenche
Details
New init script (teeworlds,1.01 KB, text/plain)
2013-09-08 04:03 UTC, rypervenche
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rypervenche 2013-07-21 17:22:32 UTC
Hi all,

I am unable to run a teeworlds server using the init script. I believe that this is due to a map not being loaded when the script starts. In the normal Teeworlds package, it is run from the extracted tarball. It expects to find the map in ./data/maps/ from the respective current working directory. Because the maps are put into /usr/share/games/teeworlds/data/maps/ I think that this may be the issue. Unfortunately, the logs don't say anything about this, but when I manually run the binary that's what it points to.

Please let me know if you need any more information about my system or how I have everything set up. Also, my configuration file works just fine when used with an extracted tarball of the game and running it that way. Thanks!

nu ~ # /etc/init.d/teeworlds start
 * Starting TeeWorlds ...                                                                                                       [ ok ]
nu ~ # /etc/init.d/teeworlds status
 * status: crashed

nu ~ # cat /etc/teeworlds/teeworlds_srv.cfg 
# sample Teeworlds server config file
# see http://www.teeworlds.com/?page=docs&wiki=ServerSettings for details
sv_gametype dm
sv_map ctf5
sv_maprotation ctf1 ctf2 ctf3 ctf4 ctf5 ctf6 ctf7 dm1 dm2 dm6 dm7 dm8 dm9
sv_rounds_per_map 10
sv_name ryper
sv_register 1
sv_scorelimit 20
sv_port 8303
sv_bindaddr 123.123.123.123 # Obviously I use my real IP here
sv_rcon_password fakepassword
logfile /var/log/teeworlds.log


nu ~ # emerge --info teeworlds
Portage 2.1.12.2 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.8.13-gentoo-nu x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-3.8.13-gentoo-nu-x86_64-Intel-R-_Atom-TM-_CPU_N2800_@_1.86GHz-with-gentoo-2.2
KiB Mem:     4032440 total,   1215652 free
KiB Swap:    8388600 total,   8350828 free
Timestamp of tree: Fri, 19 Jul 2013 17:45:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5, 3.2.5-r1
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/ ftp://mirror.ovh.net/gentoo-distfiles/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync1.fr.gentoo.org/gentoo-portage"
USE="acl amd64 apache2 bzip2 cjk cli color cracklib crypt cxx dbus dri exif faac ffmpeg flac gdbm geoip gif git gpm hddtemp iconv icu idn imagemagick ios iproute2 ipv6 ithreads jpeg libass libmpeg2 lm_sensors m17n-lib maildir matroska mmx modules mp3 mp4 mpeg mudflap multilib mysql ncurses nls nptl offensive ogg openmp pam pcmcia pcre png postgres python readline session socks5 speex sse sse2 ssh ssl svg tcpd theora threads truetype udev unicode usb vim-syntax vorbis wifi win32codecs x264 xvid zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="proxy proxy_http actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="event" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en fr zh_TW el" NGINX_MODULES_HTTP="access auth_basic autoindex browser charset empty_gif fastcgi geo gzip limit_conn limit_req map memcached proxy referer rewrite scgi split_clients ssi upstream_ip_hash userid uwsgi cache_purge flv geoip gzip_static image_filter lua mp4 perl realip secure_link slowfs_cache stub_status sub upload upload_progress fancyindex" NGINX_MODULES_MAIL="imap smtp" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4 php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON

=================================================================
                        Package Settings
=================================================================

games-action/teeworlds-0.6.1 was built with the following:
USE="dedicated (multilib) -debug" ABI_X86="64"
Comment 1 Elijah "Armageddon" El Lazkani (amd64 AT) 2013-07-21 17:47:49 UTC
Same here, I concur.
Comment 2 rat 2013-07-21 21:24:27 UTC
I also have this issue.
Comment 3 rypervenche 2013-09-06 05:45:01 UTC
This issue is still present in version 0.6.2, still making it impossible to run the teeworlds server.
Comment 4 Julian Ospald 2013-09-06 12:42:59 UTC
suggested fix?
Comment 5 rypervenche 2013-09-08 04:02:35 UTC
Created attachment 358232 [details]
Necessary configuration "storage.cfg"

Must be placed at /usr/share/games/teeworlds/storage.cfg and should probably have the games group.
Comment 6 rypervenche 2013-09-08 04:03:28 UTC
Created attachment 358234 [details]
New init script
Comment 7 rypervenche 2013-09-08 04:06:52 UTC
(In reply to Julian Ospald (hasufell) from comment #4)
> suggested fix?

I have updated the init script and added a storage.cfg file that is necessary for the appropriate variables to be read. The storage.cfg file must be placed in /usr/share/games/teeworlds/ and should probably have at least games as the group ID.

This looks to have fixed the issue with starting and stopping the teeworlds server, however I did notice that the /etc/init.d/teeworlds reload doesn't seem to work for me. I'm not sure if that's a problem on my own end or if it wasn't correctly written. I don't know enough about creating init scripts to be able to tell on that one.

Thanks!
Comment 8 Julian Ospald 2013-09-08 11:15:18 UTC
The only reason for this bug is that the "mapres" folder is not installed for USE="dedicated" and hence the checks in storage.cpp will think there is no $DATADIR.

Is there a reason we don't install mapres?
Comment 9 Julian Ospald 2013-09-08 11:59:54 UTC
mapres is not needed, I will patch storage.cpp
Comment 10 Julian Ospald 2013-09-08 12:32:47 UTC
+*teeworlds-0.6.2-r1 (08 Sep 2013)
+
+  08 Sep 2013; Julian Ospald <hasufell@gentoo.org>
+  +files/0.6.2/04-dedicated.patch, +files/0.6.2/05-cc-cflags.patch,
+  -teeworlds-0.6.2.ebuild, +teeworlds-0.6.2-r1.ebuild:
+  respect CC/CXX, make build log verbose, fix dedicated useflag wrt #477658