====== Sitemap ====== This is a sitemap over all available pages ordered by [[doku>namespaces|namespaces]].
Page Actions
Wiki Actions
User Actions
====== Differences ====== This shows you the differences between two versions of the page.
guides:synchronet [2009/10/04 23:01] fishy Download an unpacking of runtime data |
guides:synchronet [2009/10/05 00:54] (current) fishy |
||
---|---|---|---|
Line 13: | Line 13: | ||
**//__Unfinished notes...__//** | **//__Unfinished notes...__//** | ||
- | On a base Debian Lenny install. as root: | + | ===== Prerequisites ===== |
+ | |||
+ | Start out with a base Debian Lenny install with "Standard" as the only "tasksel'ed" option. Install the needed | ||
+ | packages for compilation of Synchronet. | ||
apt-get install build-essentials | apt-get install build-essentials | ||
Line 19: | Line 22: | ||
apt-get install libncurses5-dev | apt-get install libncurses5-dev | ||
apt-get install screen | apt-get install screen | ||
- | adduser bbs | ||
- | Logged out root, logged back in as 'bbs' | + | It is good practice to never work as root, and let as little dynamic data be owned by root. So, add a user for the bbs: |
- | Fetched the reference doc (I'm trying to work a bit outside of this though, so I get it just for reference) | + | adduser <bbs-owner-username> |
+ | |||
+ | ===== Get the sources ===== | ||
+ | |||
+ | Log out from your root session, and log back in with the user you created | ||
+ | |||
+ | I personally fetched the reference doc (I'm trying to work a bit outside of this though, so I get it just for reference) | ||
wget http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/docs/sbbsunix.txt | wget http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/docs/sbbsunix.txt | ||
- | Next, I created no less than two directories in teh bbs user home: | + | Next, I created no less than two directories in the bbs user home: |
mkdir sbbs | mkdir sbbs | ||
mkdir build | mkdir build | ||
- | Pulled in the sbbs3 sources from CVS: | + | The sbbs dir will be the SBBSDIR, as in, the directory where all the Synchronet files will live. |
+ | The build directory will be used for, precicely, the build environment and source files. | ||
+ | |||
+ | Pull in the sbbs3 sources and needed libraries from CVS: | ||
cd build | cd build | ||
cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs co -r HEAD src-sbbs3 | cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs co -r HEAD src-sbbs3 | ||
- | |||
- | Needed libs, trying to run these from the 'build' dir first: | ||
- | |||
cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs co -r HEAD lib/mozilla/js/linux.release | cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs co -r HEAD lib/mozilla/js/linux.release | ||
cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs co -r HEAD lib/mozilla/js/linux.debug | cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs co -r HEAD lib/mozilla/js/linux.debug | ||
Line 45: | Line 53: | ||
cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs co -r HEAD lib/cryptlib/linux.release | cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs co -r HEAD lib/cryptlib/linux.release | ||
- | Okay, sources down, time to try a **non-install** compile of the sources! | + | This gives us a complete kit of sources needed for build. We need a populated SBBSDIR (the directory |
+ | where Synchronet will be installed) to stop the //install// from failing. This can be done either | ||
+ | by pulling in the stock runtime, or restoring from a backup of a previous base. To do a fresh install | ||
+ | of a stock BBS: | ||
- | cd src/sbbs3 | + | cd ~ |
- | make | + | wget ftp://vert.synchro.net/Synchronet/sbbs_run.tgz -O sbbs_run-`date +"%Y%m%d"`.tar.gz |
+ | cd sbbs | ||
+ | tar zxvf ~/sbbs_run-`date +"%Y%m%d"`.tar.gz | ||
- | Okay. That built all of the sources directly under sbbs3 ad debug-build. Good start, but not good enough. | + | ===== Modified GNUmakefile ===== |
- | SCFG was not compiled f.ex. | + | |
- | cd scfg | + | The stock GNUmakefile is where the real "magick" I am trying to avoid, so instead of following the install |
- | make | + | doc, and pulling in that one, I have modified it heavily. |
- | cd .. | + | |
- | cd umonitor | + | As a reference to my changes, the base file I started with {{:guides:sbbs_stock_gnumakefile.txt|is available here}}, |
- | make | + | while a unified diff of the changes {{:guides:sbbs_makefile.diff|is also available}}. |
- | cd .. | + | |
- | cd uedit | + | The resulting {{:guides:sbbs_modified_gnumakefile.txt|GNUmakefile}} is placed at the root of my 'build' directory. |
- | make | + | |
- | cd .. | + | ===== Compile ===== |
+ | |||
+ | Before compiling, make sure your SBBSDIR is located correctly. You can add the location as a variable to every | ||
+ | invocation of make, or you can set it as an environment variable. I find that to be cleaner: | ||
+ | |||
+ | export SBBSDIR=~/sbbs | ||
+ | |||
+ | To compile the SBBS3 binaries (the Synchronet binaries, plus scfg umonitor uedit and syncview) is now as simple as: | ||
- | cd install | ||
make | make | ||
- | cd .. | ||
- | cd syncview | + | This performs a build with RELEASE configuration, without installing anything! A small, but significant step. |
+ | To build DEBUG versions of the binaries //should// be as simple as adding "DEBUG=1" to the make | ||
+ | |||
+ | After building the binaries, and verifying A'OK-ness, installing is done as usual (with the added export): | ||
make | make | ||
- | cd .. | ||
- | So, I have verification that compile works for all parts of the source of sbbs3. | + | Naturally, if this is done in sequence of the "make", the export is not needed.... And if you added DEBUG=1 in |
+ | the previous step, add the same here. | ||
- | Obviously, I am going to need a makefile to manage the compilation here. I'll start out with | + | Some files in the runtime set, those being the external programs and baja sources, need to be compiled. With the |
- | the official unix make-file, and mangle it down until I get a version that works right. | + | export still valid, do: |
- | cd ~/build | + | make externals |
- | wget http://cvs.synchro.net/cgi-bin/viewcvs.cgi/*checkout*/install/GNUmakefile | + | |
- | More to come, after I am done fiddling with the makefile. | + | ===== Configure and test ===== |
+ | If this is a fresh install, you are now ready to configure your setup. Follow the info in sbbsunix.txt for this, | ||
+ | basically you need to: | ||
- | Get the runtime data set | + | cd ~/sbbs |
- | cd ~ | + | export SBBSCTRL=/home/bbs/sbbs/ctrl |
- | wget ftp://vert.synchro.net/Synchronet/sbbs_run.tgz -O sbbs_run-`date +"%Y%m%d"`-tar.gz | + | # Configure needed settings & options |
- | cd sbbs | + | ./exec/scfg |
- | tar zxvf ~/sbbs_run-`date +"%Y%m%d"`-tar.gz | + | # Change any options related to services and features in the ini files: |
+ | vim ctrl/sbbs.ini | ||
+ | vim ctrl/services.ini | ||
+ | # And test the setup. | ||
+ | # SBBS runs services that use privileged ports, | ||
+ | # so you'll have to run it as root, unfortunately: | ||
+ | su -c ./exec/sbbs | ||
+ | |||
+ | ===== Onwards ===== | ||
+ | |||
+ | After doing this modification, I have a build system that I trust a whole lot more, and I am now looking into a way to do | ||
+ | a proper "dont-run-as-root" setup for this. There should be code for dropping privileges, but they are still untested | ||
+ | by me. Stay tuned for updates :D | ||