diff --git a/BuildFiles/Packaging/scripts/repackage-one b/BuildFiles/Packaging/scripts/repackage-one index 03365a28..e95e6f93 100755 --- a/BuildFiles/Packaging/scripts/repackage-one +++ b/BuildFiles/Packaging/scripts/repackage-one @@ -137,13 +137,26 @@ else fi fi +if [ -e "../templates/preinst-$PACKAGE.template" ]; then + echo "Adding $PACKAGE preinst script..." + cp ../templates/preinst-$PACKAGE.template DEBIAN/preinst + chmod +x DEBIAN/preinst +else + if [ -e "DEBIAN/preinst" ]; then + echo "Deleting old preinst script..." + rm DEBIAN/preinst + fi +fi + echo "Converting CRLF line endings in scripts to LF-only..." dos2unix -q DEBIAN/* dos2unix -q etc/init.d/* echo "Setting build number $BUILDID..." -sed -i "s/--BuildNumber--/$BUILDID/" DEBIAN/control -echo $BUILDID > $DEPLOYDIR/$TARGETDIR/BuildIdentity.txt +sed -i "s/--BuildNumber--/$BUILDID/g" DEBIAN/control +if [ -e $DEPLOYDIR/$TARGETDIR ]; then + echo $BUILDID > $DEPLOYDIR/$TARGETDIR/BuildIdentity.txt +fi # Calculating new checksums echo "Creating MD5 checksum file..." diff --git a/BuildFiles/Packaging/templates/control-backend-sprint.template b/BuildFiles/Packaging/templates/control-backend-sprint.template index eb18a5c6..91d27c33 100644 --- a/BuildFiles/Packaging/templates/control-backend-sprint.template +++ b/BuildFiles/Packaging/templates/control-backend-sprint.template @@ -2,7 +2,7 @@ Package: swarmops-backend Version: --BuildNumber-- Architecture: all Maintainer: Rick Falkvinge (swarmops-maintain@falkvinge.net) -Depends: swarmops-common,mono-runtime (>= 3.2.8),libmono-corlib4.0-cil (>= 3.2.8),libmono-posix4.0-cil (>= 3.2.8),libmono-system-data4.0-cil (>= 3.2.8),libmono-system-web-http4.0-cil (>= 3.2.8) +Depends: swarmops-common (>= --BuildNumber--),mono-runtime (>= 3.2.8),libmono-corlib4.0-cil (>= 3.2.8),libmono-posix4.0-cil (>= 3.2.8),libmono-system-data4.0-cil (>= 3.2.8),libmono-system-web-http4.0-cil (>= 3.2.8) Conflicts: swarmops-backend-internal,swarmops-backend-stable Homepage: http://swarmops.com/ Description: Swarmops Backend diff --git a/BuildFiles/Packaging/templates/control-frontend-sprint.template b/BuildFiles/Packaging/templates/control-frontend-sprint.template index c0c3200f..b82ed4b8 100644 --- a/BuildFiles/Packaging/templates/control-frontend-sprint.template +++ b/BuildFiles/Packaging/templates/control-frontend-sprint.template @@ -2,7 +2,7 @@ Package: swarmops-frontend Version: --BuildNumber-- Architecture: all Maintainer: Rick Falkvinge (swarmops-maintain@falkvinge.net) -Depends: swarmops-common, apache2 (>= 2.2.20), mono-apache-server4 (>= 3.0.11), libapache2-mod-mono (>= 2.11), libgdiplus (>= 2.11), imagemagick, ghostscript +Depends: swarmops-common (>= --BuildNumber--), apache2 (>= 2.2.20), mono-apache-server4 (>= 3.0.11), libapache2-mod-mono (>= 2.11), libgdiplus (>= 2.11), imagemagick, ghostscript Conflicts: swarmops-frontend-internal,swarmops-frontend-stable Homepage: http://swarmops.com/ Description: Swarmops Frontend diff --git a/BuildFiles/Packaging/templates/postinst-frontend.template b/BuildFiles/Packaging/templates/postinst-frontend.template index b72414a9..135bd74f 100644 --- a/BuildFiles/Packaging/templates/postinst-frontend.template +++ b/BuildFiles/Packaging/templates/postinst-frontend.template @@ -1,6 +1,27 @@ #! /bin/bash -#echo "Swarmops Frontend post-installation script running" -#just make sure the upload folder exists and is writeable by www-data -mkdir -p /var/lib/swarmops/upload -chown www-data:www-data /var/lib/swarmops/upload +# make sure the upload folder exists and is writeable by www-data +# do not make any changes to an already existing folder + +if [ ! -e /var/lib/swarmops/upload ]; then + mkdir -p /var/lib/swarmops/upload + chown www-data:www-data /var/lib/swarmops/upload + chmod 777 /var/lib/swarmops/upload +fi + +# make sure the web frontend (and its init routine) can write to machineKey.config +# TODO: add test here - only chown if it's the pristine, unedited file + +chown www-data:www-data /etc/swarmops/machineKey.config + +# make sure the web frontend (and its init) can write to database.config + +chown www-data:www-data /etc/swarmops/database.config + +# if we stopped Apache in preinst (1st install), restart it + +if [ -e /tmp/swarmops-restart-apache.flag ]; then + /etc/init.d/apache2 start + rm /tmp/swarmops-restart-apache.flag +fi + diff --git a/BuildFiles/Packaging/templates/preinst-frontend.template b/BuildFiles/Packaging/templates/preinst-frontend.template new file mode 100644 index 00000000..58eb8536 --- /dev/null +++ b/BuildFiles/Packaging/templates/preinst-frontend.template @@ -0,0 +1,15 @@ +#! /bin/bash + +# To circumvent lib-mod-mono bug on first install, stop Apache if it is currently running, before we try to install. +# (It's very rude to shut down services without asking first like this, but even more rude of the lib-mod-mono +# installer to just bloody hang.) + +if [! -e /etc/swarmops/database.config ]; then + if /etc/init.d/apache2 status > /dev/null; then + # Set a flag to postinst to restart Apache + echo foo > /tmp/swarmops-restart-apache.flag + /etc/init.d/apache2 stop + fi +fi + + diff --git a/BuildFiles/prepare-sprint b/BuildFiles/prepare-sprint index 5ad06529..fd42efc1 100755 --- a/BuildFiles/prepare-sprint +++ b/BuildFiles/prepare-sprint @@ -10,6 +10,7 @@ cd .. #Update lines-of-code count cd .. BuildFiles/update-kaylock-count +tail -n 1 LINESOFCODE | cut -c 2-7 | xargs printf "%'d" | xargs -I {} sed -i 's/.*/{}/' Site5/Default.aspx cd BuildFiles #After this, a manual git push should be done diff --git a/Site5/Default.aspx b/Site5/Default.aspx index a429ee15..0f0e287b 100644 --- a/Site5/Default.aspx +++ b/Site5/Default.aspx @@ -9,7 +9,7 @@

What you see here is the new interface being rewritten on top of the already-running engine. It runs on Debian/Ubuntu servers for frontend and backend.

This notice will be replaced with a proper Dashboard when all the basic functions are in place. You can see functions appear as they are implemented in the menu.

A rough roadmap says that basic financials are implemented first, then member registry functions, then communications, then responsibilities, then governance. For more on the specific roadmap, go to the SCRUM planning for Swarmops.

-

Look at the Swarmops code on Github (and feel free to contribute)! Current line count: 102,576.

+

Look at the Swarmops code on Github (and feel free to contribute)! Current line count: 102,576.

Use this form to report bugs for these early builds.