Mercurial > hg > dml-home
changeset 13:2059c4f64feb
Some more refinements to install scripts.
author | samer |
---|---|
date | Mon, 19 Jan 2015 14:38:58 +0000 |
parents | 4bf4943f93a4 |
children | ef88a4afac7a |
files | .hgignore README VERSION etc/INSTALL etc/setup.sh etc/setup_as_dml.sh make_tarball |
diffstat | 7 files changed, 33 insertions(+), 86 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgignore Mon Jan 19 14:23:19 2015 +0000 +++ b/.hgignore Mon Jan 19 14:38:58 2015 +0000 @@ -28,3 +28,4 @@ ^lib/swipl ^lib/beets ^lib/mets +^dml-home.*gz
--- a/README Mon Jan 19 14:23:19 2015 +0000 +++ b/README Mon Jan 19 14:38:58 2015 +0000 @@ -1,6 +1,6 @@ # DML Home Directory -### Version 0.0.1 +### Version 0.0.2 This is the home directory for the DML CliopPatria server.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/VERSION Mon Jan 19 14:38:58 2015 +0000 @@ -0,0 +1,1 @@ +0.0.2
--- a/etc/INSTALL Mon Jan 19 14:23:19 2015 +0000 +++ b/etc/INSTALL Mon Jan 19 14:38:58 2015 +0000 @@ -1,85 +1,27 @@ -h1. Server setup instructions v2 +I'm assuming you've downloaded and unpacked dml-home-XXXXX.tar.gz and +set up any HTTP proxy you might need. +After doing this, log out and log back in to pick up the new dot files +in the home directory. -These instructions assume a Debian-based Linux distribution, and a user account called 'dml'. +Then, in this directory (~/etc), edit setup_as_root.sh to set the configuration +variables at the top. Then, do + sudo sh setup_as_root.sh +to see what setup_as_root.sh will do. Make sure you're happy with it. +Then, type + sudo sh setup_as_root.sh no +to do it for real. -Also, please add any environment variables needed for internet proxy settings etc in the system-wide shell profile. +Then, download the following files and put them in ~/downloads -If you are using Ubuntu, I recommend the following modification to the file /etc/sudoers: at the prompt, say <code>sudo visudo</code> and add the following to the 'Defaults' section near the top: -<pre> -Defaults env_keep -= "HOME" -</pre> + https://code.soundsoftware.ac.uk/attachments/download/1283/DML_metadata_batch_01.tar.gz + https://code.soundsoftware.ac.uk/attachments/download/1284/music-ro.db + https://code.soundsoftware.ac.uk/attachments/download/1282/var-dml-cpack.tar.gz + https://code.soundsoftware.ac.uk/attachments/download/1281/lib-swipl.tar.gz -This means that when you use sudo, the given command will run with the HOME environment variable set to root's home, ie /root, instead -of the user's home. This is the default on Debian, and IMHO it makes more sense, and avoids doing bizarre rooty things in the unsuspecting -user's home directory. It also means that <code>sudo bash</code> or <code>sudo -s</code> give you a root shell with root's bash profile -and bashrc. +Then edit setup_as_dml.sh to check you agree with it. Then run it: + sh setup_as_dml.sh -Finally, if you add the following near the end of /root/.bashrc, a root shell will have a nice red prompt to remind you of it's -awesome power: -<pre> -PS1='\[\e[1;31m\]\t ${debian_chroot:+($debian_chroot)}\u@\h:\w#\[\e[0m\] ' -</pre> -h2. Home directory setup +Finally, to make score sonification work, you'll need some soundfonts in +~/lib/sounds/sf2. Better instructions to follow at a later data. -The dml home directory can be prepared by cloning the dml-home repository on this server. Note that you can only clone into an empty directory, so doing this when the dml home directory already exists is a bit of a fiddly job--you'd have to clone the repository -somewhere else and then copy it over the existing home directory. -<pre> -sudo apt-get install mercurial -cd /tmp -hg clone https://code.soundsoftware.ac.uk/hg/dml-home -cp -pR dml-home /home/dml -</pre> - -Alternatively, you can download the archive from https://code.soundsoftware.ac.uk/attachments/download/1286/dml-home-0.0.1.tar.gz, -put it in the dml home directory, and unpack it in place: -<pre> -cd -tar xzf dml-home.tar.gz -</pre> - -After doing this, log out and log back in again as dml to pick up the new bash profile, bashrc etc. - -h2. Install MATLAB - -If you have a license, now is the time to install Matlab. The current DML ClioPatria component does not react well to the absence of Matlab, but in future, it will be reorganised so that the Matlab sub-component will be an optional plug-in. - -h2. Setup as root - -The directory ~/etc contains a shell script setup_as_root.sh. Before you run this, edit it to set the variables -defined in the configuration section at the top. Then run it using sudo: -<pre> -sudo sh setup_as_root.sh -</pre> -This will install various packages via apt-get, make some links in the file system, configure Matlab (if enabled) -and configure the X server. - -h2. Setup as dml user - -The script ~/etc/setup_as_dml.sh contains commands to do nearly everything else. -It will clone the following repositories: -* A modified fork of ClioPatria from GitHub: https://github.com/samer--/ClioPatria -* Humdrum tools from GitHub https://github.com/humdrum-tools/humdrum.git -* DML ClioPatria package from dml-cliopatria -* Matlab utilities from ishara -* Kern scores from kernscores-utf8 - -Then (in theory) it will download some archives from this site: -# https://code.soundsoftware.ac.uk/attachments/download/1283/DML_metadata_batch_01.tar.gz -# https://code.soundsoftware.ac.uk/attachments/download/1284/music-ro.db -# https://code.soundsoftware.ac.uk/attachments/download/1282/var-dml-cpack.tar.gz -# https://code.soundsoftware.ac.uk/attachments/download/1281/lib-swipl.tar.gz - -However, in practise, access restrictions mean that this seems not to work. -If they cannot be downloaded automatically, download them manually, put them in ~/downloads, -and run the script again. - -The alternative to step 4 is to build the packs from within SWI Prolog: -<pre> -?- maplist(pack_install,[memo,callgraph,swipe,sparkle,lambda,musicbrainz,plml,plsmf,plumdrum,prosqlite,sindice]). -</pre> - -h2. Downloading sound fonts - -The only remaining job is to download some soundfonts to resolve the links in ~/lib/sounds/sf2. -
--- a/etc/setup.sh Mon Jan 19 14:23:19 2015 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -sudo sh ./setup_as_root.sh -sh ./setup_as_dml.sh
--- a/etc/setup_as_dml.sh Mon Jan 19 14:23:19 2015 +0000 +++ b/etc/setup_as_dml.sh Mon Jan 19 14:38:58 2015 +0000 @@ -2,8 +2,8 @@ # ------------------ CONFIG ---------------- INSTALL_SWI=no -SS_USER=samer -MAKE_HUMDRUM=no +SS_USER=<DML_USER_NAME HERE> +MAKE_HUMDRUM=yes # ------------------ END OF CONFIG --------- @@ -37,9 +37,12 @@ if [ -a "$name" ]; then echo "Aready existing in $1: $2." else - echo "I am going to download into $1 from $2." - echo "You may be asked for a password." - wget --user=$SS_USER --ask-password "$2" + echo "Please download from $2 and put it in $1." + exit 1 +# echo "I am going to download into $1 from $2." +# echo "You may be asked for a password." +# wget --user=$SS_USER --ask-password "$2" +# wget "$2" fi }