OpenBSD support thread
OpenBSD support thread
As Z-Man wishes, an extra *BSD thread...
...I moved the content of the other thread to this one, but leaving links for reference.
Hmm, how about having seperate dev sub forums for BSD, Linux, Mac, Windows?
HOWTO: Installing AA 0.2.8.x under OpenBSD 3.8
- Works with 0.2.8.0 and 0.2.8.1 -
Version 0.2.8.2.1 of the dedicated server works out of the box.
Port and packages available for OpenBSD 4.0, ready to install!
...I moved the content of the other thread to this one, but leaving links for reference.
Hmm, how about having seperate dev sub forums for BSD, Linux, Mac, Windows?
HOWTO: Installing AA 0.2.8.x under OpenBSD 3.8
- Works with 0.2.8.0 and 0.2.8.1 -
Version 0.2.8.2.1 of the dedicated server works out of the box.
Port and packages available for OpenBSD 4.0, ready to install!
Last edited by belenus on Sun Jan 21, 2007 3:26 pm, edited 14 times in total.
- bel
Since the new dedicated doesn't work with windows I tried to compile AA 0.2.8.0 under OpenBSD using gmake... works just fine, BUT when I want to start it, I get this message:
Oh and, I did all as "root" so no issue with user rights.
When I start AA from the directory that contains "configure" the server can be started and runs... but I also get this message there:[0] Warning in void FindConfigurationPath(const char*) in tools/tDirectories.cpp:1166 :
[0] Could not determine path to configuration files. Using defaults or command line arguments.
[0]
Internal Error: Internal error in static tLanguage* tLanguage::FindStrict(const tString&) in tools/tLocale.cpp:150 :
Language British English not found.
Please send a Bug report!
Fix for above error:[0] Warning in tString tPathResource::GetWritePath(const char*) const in tools/tDirectories.cpp:454 :
[0] Could not create path to ./resource/automatic/file:///var/db/xmlcatalog. Check your user's rights.
[0] ERROR: Cannot determine path to write resource to.
Well its just fine that it doesn't work out of the installation dir, but maybe it gives you a hint whats wrong...z-man wrote:For the other error, try replacing "file:///etc/xml/catalog" in gParser.cpp with "file:///var/db/xmlcatalog".
Oh and, I did all as "root" so no issue with user rights.
Last edited by belenus on Mon Mar 20, 2006 1:14 pm, edited 2 times in total.
- bel
Could there be a search for bash implemented in configure as you did with SDL and LIBXML2?
At least OpenBSD (and I guess other BSDs too) don't come with bash preinstalled... (bash is needed for gmake install) ...other systems may need it installed first too.
Or remove bash from Makefile...
At least OpenBSD (and I guess other BSDs too) don't come with bash preinstalled... (bash is needed for gmake install) ...other systems may need it installed first too.
Or remove bash from Makefile...
Last edited by belenus on Mon Mar 20, 2006 1:15 pm, edited 2 times in total.
- bel
While trying to get AA running on OpenBSD I worked on the rcd script and found some issue with the way some commands are used... Linux seems more forgiving than BSD in some cases...
in "rcd_startstop" it should be:
the -R what at the end of each line...
...and..., same file:
The "-p" wasnt specified in from of the 'cat...'
Now I get to the point that it complains about not existing PID files... I wonder why they aren't created...
Edit:
OK, I found the reason... some scripts got "#!/bin/sh" and some "#!/bin/bash"
The issue now is that you cannot execute "./rcd_server" from OpenBSDs ksh shell (only with calling "sh rcd_server") if the script got "#!/bin/bash" inside and not "#!/bin/sh"... so the serverstarter script didn't get executed from within rcd_server.
I changed all scripts to using "#!/bin/sh" and replaced the "bash -i" in serverstarter to "sh -i" (doesn't make a difference I guess, correct me when I'm wrong) and now it seems to work... well that is, if the server could be started outside of the build directory
I would so love to see if my script modifications work
in "rcd_startstop" it should be:
Code: Select all
chown -R "$user" $LOGDIR
chown -R "$user" $PIDDIR
chown -R "$user" $VARDIR
...and..., same file:
Code: Select all
renice $niceness_level -p `cat $MAINPIDFILE` > /dev/null
renice $niceness_level -p `cat $STARTERPIDFILE` > /dev/null
Now I get to the point that it complains about not existing PID files... I wonder why they aren't created...
Edit:
OK, I found the reason... some scripts got "#!/bin/sh" and some "#!/bin/bash"
The issue now is that you cannot execute "./rcd_server" from OpenBSDs ksh shell (only with calling "sh rcd_server") if the script got "#!/bin/bash" inside and not "#!/bin/sh"... so the serverstarter script didn't get executed from within rcd_server.
I changed all scripts to using "#!/bin/sh" and replaced the "bash -i" in serverstarter to "sh -i" (doesn't make a difference I guess, correct me when I'm wrong) and now it seems to work... well that is, if the server could be started outside of the build directory

I would so love to see if my script modifications work

I tried both but couldn't see a difference, when I type in "exit" both versions just restart... and btw... it only works without the "./"z-man wrote: Second, write a small wrapper script, something simple likeor the other way round if you want to continue after crashes or fatal exits.Code: Select all
#!/bin/sh while ./armagetronad-dedicated; do true; done
- bel
Got it running from within the build directory with my slightly modified starter scripts from Z-Man.
(The original scripts doesn't work with BSD for the reasons mentioned above)
Had to do a lot of virtual linking (to make the use relativle comfortable) but now it works...
Still, would be nice if, one day, the path problem gets fixed for BSD. =)
(The original scripts doesn't work with BSD for the reasons mentioned above)
Had to do a lot of virtual linking (to make the use relativle comfortable) but now it works...
Still, would be nice if, one day, the path problem gets fixed for BSD. =)
- bel
Im confused now... I restored the original dirs and it worked.z-man wrote:I don't think symbolic links are a problem.
Then I made the symbolic links again and it works too?
Happen I just made a typo with on of the symbolic links before?
Well, I attached the "unbashified" scripts so you can look through them and maybe implement in the next beta, RC or release, whatever...
Last edited by belenus on Mon Mar 20, 2006 2:14 pm, edited 1 time in total.
- bel
HOWTO: Installing AA 0.2.8.x under OpenBSD 3.8
AA versions 0.2.8.0 and 0.2.8.1 work if description below is followed.
OpenBSD 3.7 and upcomming 3.9 SHOULD work too... will test 3.9 as soon as I get it. =)
If not otherwise mentioned, the user is root.
Step 1: Install the needed packages
Install from ports or as packages:
gmake
libxml-2
bash
nano
Also get the depending packages...
Step 2: Download and unpack source of AA 0.2.8.x to your home directory
Step 3: Editing sources
goto line 901 or search for "xml/calalog"
replace "file:///etc/xml/catalog" with "file:///var/db/xmlcatalog"
save and exit nano (Ctrl+O and Ctrl+X)
Step 4: Building
Step 5: Customizing for OpenBSD
if not already done by the AA installer, create a user named "armagetronad-dedicated" with the home directory at "/home/armagetronad-dedicated" and then:
Install a symbolic link to the modified serverstarter script that will be installed soon:
We want the server using the real config directory, so we rename the config dir inside the build directory and create a symbolic link instead, pointing to the real config dir:
Extract the directory from my scripts_bsd.tar.gz into:
Extract the script from aactl.tar.gz into:
and if nececarry
it.
Make sure you only have ONE armagetronad-0.2.8.* subdirectory in "/home/armagetronad-dedicated" because aactl won't work otherwise.
Deleting stuff you don't need
Step 6: Starting the server
Enter from anywhere you like:
aactl start|stop|restart|status|log
Step 7: Making AA start at system boot
Add these lines to /etc/rc.local
And this to /rc/rc.conf.local
where you have to change "NO" to "" if you want AA to start at system boot.
Step 8: Be happy and report any erros you find
The server should now run as user "armagetronad-dedicated" and all configuration comes from inside the default directories:
/etc/armagetronad
/usr/local/share/games/armagetronad-dedicated/resource
If you want to have the server started automaticly at system start, just modify "/etc/rc.local" to include "/usr/local/bin/aactl start" if it exists.
Thats it, for now we can only wait for the path problems getting solved so it can be started directly without all the trouble and maybe my changed scripts find a way into the official version...
AA versions 0.2.8.0 and 0.2.8.1 work if description below is followed.
OpenBSD 3.7 and upcomming 3.9 SHOULD work too... will test 3.9 as soon as I get it. =)
If not otherwise mentioned, the user is root.
Step 1: Install the needed packages
Install from ports or as packages:
gmake
libxml-2
bash
nano
Also get the depending packages...
Step 2: Download and unpack source of AA 0.2.8.x to your home directory
Code: Select all
cd ~
wget http://heanet.dl.sourceforge.net/sourceforge/armagetronad/armagetronad-0.2.8.1.src.tar.gz
tar zxvf arma*0.2.8.*gz
Step 3: Editing sources
Code: Select all
cd armagetronad-0.2.8.*/src/tron
nano gParser.cpp
replace "file:///etc/xml/catalog" with "file:///var/db/xmlcatalog"
save and exit nano (Ctrl+O and Ctrl+X)
Step 4: Building
Code: Select all
cd ../../
MAKE=gmake ./configure --disable-glout
gmake
gmake install
Step 5: Customizing for OpenBSD
Code: Select all
mkdir -p /home/armagetronad-dedicated
cd ..
cp -r armagetronad-0.2.8.* /home/armagetronad-dedicated
Code: Select all
chown -R armagetronad-dedicated /home/armagetronad-dedicated
cd /home/armagetronad-dedicated/arma*0.2.8.*
Code: Select all
ln -s /usr/local/share/games/armagetronad-dedicated/scripts_bsd/rcd_server aactl
Code: Select all
mv config config_build
ln -s /etc/armagetronad-dedicated config
Code: Select all
/usr/local/share/games/armagetronad-dedicated
Code: Select all
/usr/local/bin
Code: Select all
chmod 755 /usr/local/bin/aactl
chown root.wheel /usr/local/bin/aactl
Make sure you only have ONE armagetronad-0.2.8.* subdirectory in "/home/armagetronad-dedicated" because aactl won't work otherwise.
Deleting stuff you don't need
Code: Select all
rm -r /etc/init.d
Enter from anywhere you like:
aactl start|stop|restart|status|log
Step 7: Making AA start at system boot
Add these lines to /etc/rc.local
Code: Select all
# Armagetron Advanced #TAG_AACTL
if [ X"${aactl}" != X"NO" -a -x /usr/local/bin/aactl ]; then #TAG_AACTL
echo -n " ArmagetronAd" #TAG_AACTL
/usr/local/bin/aactl start #TAG_AACTL
fi #TAG_AACTL
Code: Select all
aactl="NO" #TAG_AACTL, change "NO" to "" for autostart
Step 8: Be happy and report any erros you find

The server should now run as user "armagetronad-dedicated" and all configuration comes from inside the default directories:
/etc/armagetronad
/usr/local/share/games/armagetronad-dedicated/resource
If you want to have the server started automaticly at system start, just modify "/etc/rc.local" to include "/usr/local/bin/aactl start" if it exists.
Thats it, for now we can only wait for the path problems getting solved so it can be started directly without all the trouble and maybe my changed scripts find a way into the official version...

- Attachments
-
- scripts_bsd.tar.gz
- (4.15 KiB) Downloaded 430 times
-
- aactl.tar.gz
- (171 Bytes) Downloaded 400 times
Last edited by belenus on Tue Mar 28, 2006 7:19 pm, edited 26 times in total.
- bel
-
- Dr Z Level
- Posts: 2246
- Joined: Sun Mar 20, 2005 4:03 pm
- Location: IM: luke@dashjr.org
Hi belenus, this is seperate and a bit offtopic but I'm wondering if you're (also) running the ArmagetronAD client on OpenBSD and if you do; have you tried or given any tought to jailing it?
I'm personally only thinking about the AAD client and not about the AAD server but I guess they use pretty much the same resources/dependencies. If you have any experiences or toughts about jailing AAD I would like to hear them (I'm not playing AAD on OpenBSD yet but will possibly do so later on) and I'm sure others running AAD on OpenBSD would be interested as well (if there is any that is, might be a bit too esoteric)
I'm personally only thinking about the AAD client and not about the AAD server but I guess they use pretty much the same resources/dependencies. If you have any experiences or toughts about jailing AAD I would like to hear them (I'm not playing AAD on OpenBSD yet but will possibly do so later on) and I'm sure others running AAD on OpenBSD would be interested as well (if there is any that is, might be a bit too esoteric)

I play AA on a machine running Ubuntu and no, I haven't thought about jailing it, especially not the client, why would you? Do you also jail Firefox? Thunderbird?n54 wrote:Hi belenus, this is seperate and a bit offtopic but I'm wondering if you're (also) running the ArmagetronAD client on OpenBSD and if you do; have you tried or given any tought to jailing it?
Jailing the server is another matter, since I am already running the server from build directory, as would any other people who run AA on OpenBSD (but I doubt there are many) . So jailing it shouldn't be too hard since everything you need is in the build directory I guess...
However, if you wanted to use the rcd_scripts you would need some major tweaking to change all paths to be within the chroot directory.
But that also makes some other things quite uncomfortable, like making the statistics available on the internet, because jailed Apache cannot access AA and jailed AA could not access Apache.
Sure, one could make a cronjob that copies the statstics files every few minutes or every minute...
Edit:
Updated the HOWTO...
added a part how to start AA at system boot.
- bel
Allright, the CVS branch b0_2_8 is now FreeBSD compatible. Complete with user addition and startup scripts, FreeBSD is using the same system as Linux.
I chose to keep the bash references for now, until we find a shell zoologist who can tell us that all /bin/sh support functions, that's the only possible shell incompatibility issue that would be cumbersome to work around. bash and what (Free|Open)BSD are using seem to comply.
Hmm, found one:
The directory finding code now also respects the prefix the game was compiled with, so if binreloc is not supported, it finds its files anyway.
Credit for the rest of the fixes goes to belenus.
OpenBSD is already installed, time to give that a try.
I chose to keep the bash references for now, until we find a shell zoologist who can tell us that all /bin/sh support functions, that's the only possible shell incompatibility issue that would be cumbersome to work around. bash and what (Free|Open)BSD are using seem to comply.
Hmm, found one:
So we'll stick to bash.info autoconf wrote:You should not use shell functions, aliases, negated character classes, or other features that are not found in all Bourne-compatible shells; restrict yourself to the lowest common denominator.
The directory finding code now also respects the prefix the game was compiled with, so if binreloc is not supported, it finds its files anyway.
Credit for the rest of the fixes goes to belenus.
OpenBSD is already installed, time to give that a try.
-
- Dr Z Level
- Posts: 2246
- Joined: Sun Mar 20, 2005 4:03 pm
- Location: IM: luke@dashjr.org
I hope it also respects the configuration exec-prefix, bindir, sbindir, libexecdir, datadir, sysconfdir, sharedstatedir, localstatedir, libdir, and includedir. I've made this one of my todo-asap goals, fyi.z-man wrote:The directory finding code now also respects the prefix the game was compiled with, so if binreloc is not supported, it finds its files anyway.
-
- Dr Z Level
- Posts: 2246
- Joined: Sun Mar 20, 2005 4:03 pm
- Location: IM: luke@dashjr.org