Initial Release - for Mystic BBS 1.1.12a39

This commit is contained in:
Deon George 2018-08-24 13:57:25 +10:00
commit 56fbac0a96
11 changed files with 297 additions and 0 deletions

3
.dockerignore Normal file
View File

@ -0,0 +1,3 @@
cleaninstall/
.git/
Makefile

42
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,42 @@
image: docker:latest
stages:
- test
- build
variables:
VERSION: latest
CACHETAG: build
DOCKER_HOST: tcp://docker:2375
services:
- docker:dind
before_script:
- docker info
- docker version
- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
test:
stage: test
script:
- cat /etc/hosts
- env|sort
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} .
- docker images
only:
- debug
- armv7l
build:
stage: build
script:
- if [ -f init ]; then chmod 500 init; fi
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
tags:
- docker-armv7l
only:
- armv7l

31
Dockerfile Normal file
View File

@ -0,0 +1,31 @@
# NAME leenooks/mysticbbs
# VERSION 1.12a39-armv7l
FROM arm32v7/debian:jessie-slim
MAINTAINER Deon George <deon@leenooks.net>
# Pre-requisites
RUN apt-get update \
&& apt-get install -yqq unzip zip curl libhunspell-dev \
&& rm -rf /var/lib/apt/lists/* /tmp/*
# For SSH connections and Spell
ADD libcl.so.3.4.3 /usr/lib
RUN ln -sf libcl.so.3.4.3 /usr/lib/libcl.so
RUN ln -sf /usr/lib/arm-linux-gnueabihf/libhunspell-1.3.so.0 /usr/lib/libhunspell.so
RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
WORKDIR /mystic
ENV mysticbbs /mystic/data
EXPOSE 22 23 24554
COPY init /sbin/init
ENTRYPOINT [ "/sbin/init" ]
CMD [ "start" ]
ADD mystic.tar.gz /
VOLUME ["/mystic/data"]
# Add Mystic Mods

18
Makefile Normal file
View File

@ -0,0 +1,18 @@
NAME=$$(head -1 Dockerfile|grep NAME |awk '{print $$3}')
VERSION=$$(grep VERSION Dockerfile |awk '{print $$3}')
REGISTRY=registry.leenooks.net
SUBDIRS := $(wildcard */.)
.PHONY: all build image $(SUBDIRS)
all: build
build: Dockerfile
@if test "$(NAME)" = ""; then echo "NAME not in Dockerfile."; exit 1; fi
@if test "$(VERSION)" = ""; then echo "VERSION not in Dockerfile."; exit 1; fi
@if test -f image.bz2; then rm -f image.bz2; fi
@#docker pull $(NAME):$(VERSION)
@#docker build --cache-from $(NAME):$(VERSION) -t $(NAME):$(VERSION) .
docker build -t $(NAME):$(VERSION) .
image: Dockerfile
docker save $(NAME):$(VERSION) | bzip2 -9 > image.bz2

54
README.md Normal file
View File

@ -0,0 +1,54 @@
# Mystic BBS (Bulletin Board Software)
----
## What is Mystic BBS?
see [MysticBBS](https://www.mysticbbs.com)
> Mystic BBS was conceived around the year 1995 when the author became frustrated by the lack of customization available with Renegade BBS, and first released to the public in late 1997 during a period when many BBS packages were seeing a decline (or a full stop) in development. Mystic is developed from the ground up with all original source code and is intended to be the spiritual successor to both Telegard and Renegade (two of the packages the author used prior to developing Mystic BBS).
> With the fall of MS-DOS and the decline of the BBS, Mystic continued to push forward by releasing an OS/2 and Windows 32 native version in 1998. Mystic was the first of the non-commerical DOS based BBS packages to make the transition and integrate directly with the Telnet protocol. Mystic also went on to become the first of the MS-DOS based packages to release a native Linux version in 1999, and the first to introduce a standardized platform for DOOR games across all 4 operating systems.
> In the following years after the first MS-DOS release in 1997, Mystic grew to become one of the most widely used BBS packages. Popular amongst many SysOps who took ease of customization and the user experience seriously, it is arguable that Mystic was (or even still is) the most popular BBS software for those who share a common interest in ANSI art and BBS modding.
> In recent years, Mystic has removed its DOS version and its limitations, and has moved on to better integrate with Internet protocols. Mystic now has internal Telnet, RLOGIN, SSH, NNTP, POP3, SMTP, FTP, HTTP and BINKP servers while continuing to focus on and enhance the SysOp and user experience.
----
## About this Docker Container
This Docker Container represents a completed installation of MysticBBS. It is ready to configure and personalise.
To use this container:
1. Docker pull it from my registry. (Actually you can skip this step, but its worth doing it anyway!)
docker pull registry.leenooks.net/leenooks/mysticbbs:1.12a39-armv7l
2. Create a directory to hold your BBS data. (I use */srv/docker/mystic*).
mkdir -p /srv/mystic/data
3. Start the container.
docker run -itd -v /srv/mystic/data:/mystic data -p 10022:22 -p 10023:23 -p 24554:24554 registry.leenooks.net/leenooks/mysticbbs:1.12a39-armv7l
Explanation of these parameters:
| Parameter | Value |
| :- | :-- |
| -d | Detached mode: run the container in the background and print the new container ID. |
| -i | Keep STDIN open even if not attached. |
| -n | Give your container a specific name. |
| -p | Map host ports to container ports. |
| -t | Allocate a pseudo-TTY. |
Remember your container ID *(your number will be different)*.
ca219a461376...
4. Attach to your container and create your sysop user.
docker exec -it ca219a461376 ./mystic -l
5. Upgrade your new user to sysop levels
docker exec -it ca219a461376 ./mystic -cfg
6. You can now start to play. If you externalised your telnet port, then you can telnet in.
If you want to monitor your container, or stop it, attach to the console with:
docker attach ca219a461376

4
cleaninstall/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
data
mystic
mods
*.zip

78
cleaninstall/cleaninstall.sh Executable file
View File

@ -0,0 +1,78 @@
#!/bin/bash
set -e
MYSTIC_SOURCE=${1:-mys112a39_pi.zip}
[ "$1" ] && shift
SPELL_SOURCE=${1:-mystic_spellcheck_v2.zip}
[ "$1" ] && shift
CLEAN_INSTALL_DIR=x
INSTALL_CONTAINER=arm32v7/debian:jessie-slim
TARGET_DIR=mystic
PATCH_FILE=mystic.112a39.patch
[ $(id -u) -ne 0 ] && echo "ERROR: You need to run me as root." && exit 1
if [ -d ${TARGET_DIR} ]; then
echo "! Skipping installation [$TARGET_DIR} already exists"
else
# 1) Download Mystic App
[ ! -f ${MYSTIC_SOURCE} -o ! -f ${SPELL_SOURCE} ] && echo "ERROR: Source file missing [${MYSTIC_SOURCE}/${SPELL_SOURCE}], did you download it?" && exit 1
# 2) Create a new directory for it and unzip the App into it
[ -d ${CLEAN_INSTALL_DIR} ] && echo "ERROR: Directory [${CLEAN_INSTALL_DIR}] already exists!" && exit 1
unzip ${MYSTIC_SOURCE} -d ${CLEAN_INSTALL_DIR}
[ $? -gt 0 ] && echo "ERROR: Unzip failed?" && exit 1
# 3) Run docker with -v mapping the unzip files to an arbitrary directory -v unzipfiles:/install
# ** @TODO Request upstream to default QWK and Echo DIRs to named dir as well during installation
echo "Running docker, please perform the installation, and set:"
echo "* Installation directory to /mystic"
echo "* Data directories prefixed with /mystic/data"
echo "+ * Leave System Path and Scripts to /mystic"
echo "+ * Especially, QWK Settings and Echomail Settings"
docker run --rm -it -v ${PWD}/${CLEAN_INSTALL_DIR}:/install ${INSTALL_CONTAINER} /bin/bash -c "cd /install; ./install; [ -d /mystic ] && echo \"Now change QWK Settings and Echomail settings...\" && cd /mystic/ && sleep 5 && ./mystic -cfg && cd /; mv /mystic /install/"
[ ! -d ${CLEAN_INSTALL_DIR}/mystic/data/data ] && echo "ERROR: Expected a [${CLEAN_INSTALL_DIR}/mystic/data/data] dir, but it wasnt there?" && exit 1
[ ! -d ${CLEAN_INSTALL_DIR}/mystic/scripts ] && echo "ERROR: Expected a [${CLEAN_INSTALL_DIR}/mystic/scripts] dir, but it wasnt there?" && exit 1
[ ! -d ${CLEAN_INSTALL_DIR}/mystic/semaphore ] && echo "ERROR: Expected a [${CLEAN_INSTALL_DIR}/mystic/semaphore] dir, but it wasnt there?" && exit 1
# Add the spell directionary files to the data directory
unzip ${SPELL_SOURCE} dictionary.* -d ${CLEAN_INSTALL_DIR}/mystic/data/data
# 4) Run this script which will clean up the install and ZIP it up to be used with a docker.
cd ${CLEAN_INSTALL_DIR}/mystic
mv files mystic.dat data/
rm -rf localqwk echomail
# We need a symbolic link so that MIS can find MYSTIC
# @TODO Request fix from upstream
ln -s ../mystic data/mystic
chmod 755 * scripts/mide scripts/mplc scripts/*.mpx
chmod 644 *.ini *.txt docs/*.txt scripts/*.mps scripts/*.ini
patch -p0 < ../../${PATCH_FILE}
# Clean up data dir
find data -type f -exec chmod 644 {} \;
# Finished
mv data ../..
cd ../..
mv ${CLEAN_INSTALL_DIR}/mystic .
rm -rf ${CLEAN_INSTALL_DIR}
fi
# Tar up the data dir and add it back to the main install
echo "Zipping up data dir..."
tar czf mystic/data.tar.gz data/
# That dir is now ready for the image
tar czf mystic.tar.gz mystic
echo "OK mystic.tar.gz can be moved to your docker build"

View File

@ -0,0 +1,43 @@
--- nodespy.ini.orig 2018-08-22 21:51:26.498766941 +1000
+++ nodespy.ini 2018-08-22 21:51:51.018652751 +1000
@@ -12,7 +12,7 @@
; terminal, you can do that here otherwise it will use the current
; directory
- ;transfer_dir = c:\
+ transfer_dir = /mystic/data/nodespy/
; Use auto zmodem downloads and detect automatically zmodem uploads
--- scripts/mide.ini.orig 2018-08-22 22:26:44.452789582 +1000
+++ scripts/mide.ini 2018-08-22 22:27:28.062371856 +1000
@@ -44,6 +44,6 @@
; For rootpath, you need to include the directory where the MYSTIC binary
; exists.
- rootpath = c:\mystic\
- username = sysopname
- password = password
+ rootpath = /mystic/
+ username = guest
+ password = guest
--- mutil.ini.orig 2018-08-24 12:25:37.571848476 +1000
+++ mutil.ini 2018-08-24 12:27:14.481005284 +1000
@@ -75,7 +75,7 @@
; Set this value if you want to run mutil from a directory other than
; the root Mystic directory or the mysticbbs environment variable:
- ; mystic_directory=c:\mystic\mystic.dat
+ ; mystic_directory=/mystic/data/mystic.dat
; If no directory is specified in the logfile name, mUtil will attempt
; to use the configured LOGS directory from in Mystic's configuration.
@@ -97,7 +97,7 @@
loglevel=2
; logfile time stamp. defaults to NNN DD HH:II:SS if not set here
- ;logstamp = YYYYHHMMHHIISS
+ ;logstamp = YYYYMMDDHHIISS
; Log roller type:
; 0 = Do not roll log files

24
init Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
set -e
NAME="Mystic BBS"
INIT=mis
function stop {
echo "Stopping ${NAME}"
kill $(ps -Af|grep ${INIT} |grep -v grep|awk '{ print $2}')
}
trap 'stop' SIGTERM
export PATH=$PATH:/mystic
if [ "$1" == "start" ]; then
# First time install - expand out our data directory
[ $(find data|wc -l) -le 1 ] && tar xzf data.tar.gz
# OK, start
exec ${INIT} server
else
exec $@
fi

BIN
libcl.so.3.4.3 Normal file

Binary file not shown.

BIN
mystic.tar.gz Normal file

Binary file not shown.