diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 85f72a8..c3271ab --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This repo includes the SaltStack states and supporting files to install the data analysis, forensics, security tools, and environment modifications that form the BitCurator environment. See details below for how to deploy in a recent Ubuntu LTS release. -Visit https://github.com/BitCurator/bitcurator-distro/wiki/Releases to view the Quick Start Guide. Pre-configured VMs are also available for some current and past releases. +Visit https://github.com/BitCurator/bitcurator-distro/wiki/Releases to view the Quickstart Guide. Pre-configured VMs are also available for some current and past releases. **Note: BitCurator must be deployed on an x86/amd64 version of Ubuntu. Currently, it is not possible to deploy it on systems with ARM processors (including Apple M1).** @@ -109,8 +109,9 @@ The **bitcurator** directory contains all support files and salt states in a num ## BitCurator documentation, help, and other information -User documentation and additional resources are available on -[the BitCurator Environment wiki](https://confluence.educopia.org/display/BC). +Quickstart Guides for BitCurator releases, installation notes, and other technical guidance can be found at https://github.com/BitCurator/bitcurator-distro/wiki/Releases. + +Additional user documentation and resources are available in the community maintained pages at [the BitCurator Environment wiki](https://confluence.educopia.org/display/BC). Questions and comments can also be directed to the bitcurator-users list. diff --git a/bitcurator/VERSION b/bitcurator/VERSION index b913b7c..51be872 100644 --- a/bitcurator/VERSION +++ b/bitcurator/VERSION @@ -1 +1 @@ -v4.1.0 +v4.2.0 diff --git a/bitcurator/attic/bc-minimal.sh b/bitcurator/attic/bc-minimal.sh deleted file mode 100755 index f5e6e21..0000000 --- a/bitcurator/attic/bc-minimal.sh +++ /dev/null @@ -1,1221 +0,0 @@ -#!/bin/bash - - -# -# bitcurator-distro-minimal: Install only the BitCurator tools and Desktop for any user. -# ---------------------------------------------------------------------------------------------- -# -# -# This script should be run using Ubuntu 16.04LTS (or later, some modification may be required. -# -#=============================================================================== -# vim: softtabstop=4 shiftwidth=4 expandtab fenc=utf-8 spell spelllang=en cc=81 -#=============================================================================== -# - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __function_defined -# DESCRIPTION: Checks if a function is defined within this scripts scope -# PARAMETERS: function name -# RETURNS: 0 or 1 as in defined or not defined -#------------------------------------------------------------------------------- -__function_defined() { - FUNC_NAME=$1 - if [ "$(command -v $FUNC_NAME)x" != "x" ]; then - echoinfo "Found function $FUNC_NAME" - return 0 - fi - - echodebug "$FUNC_NAME not found...." - return 1 -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __strip_duplicates -# DESCRIPTION: Strip duplicate strings -#------------------------------------------------------------------------------- -__strip_duplicates() { - echo $@ | tr -s '[:space:]' '\n' | awk '!x[$0]++' -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: echoerr -# DESCRIPTION: Echo errors to stderr. -#------------------------------------------------------------------------------- -echoerror() { - printf "${RC} * ERROR${EC}: $@\n" 1>&2; -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: echoinfo -# DESCRIPTION: Echo information to stdout. -#------------------------------------------------------------------------------- -echoinfo() { - printf "${GC} * STATUS${EC}: %s\n" "$@"; -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: echowarn -# DESCRIPTION: Echo warning informations to stdout. -#------------------------------------------------------------------------------- -echowarn() { - printf "${YC} * WARN${EC}: %s\n" "$@"; -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: echodebug -# DESCRIPTION: Echo debug information to stdout. -#------------------------------------------------------------------------------- -echodebug() { - if [ $_ECHO_DEBUG -eq $BS_TRUE ]; then - printf "${BC} * DEBUG${EC}: %s\n" "$@"; - fi -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __apt_get_install_noinput -# DESCRIPTION: (DRY) apt-get install with noinput options -#------------------------------------------------------------------------------- -__apt_get_install_noinput() { - apt-get install -y -o DPkg::Options::=--force-confold $@; return $? -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __apt_get_upgrade_noinput -# DESCRIPTION: (DRY) apt-get upgrade with noinput options -#------------------------------------------------------------------------------- -__apt_get_upgrade_noinput() { - apt-get upgrade -y -o DPkg::Options::=--force-confold $@; return $? -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __pip_install_noinput -# DESCRIPTION: (DRY) -#------------------------------------------------------------------------------- -__pip_install_noinput() { - pip3 install --upgrade $@; return $? -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __pip_install_noinput -# DESCRIPTION: (DRY) -#------------------------------------------------------------------------------- -__pip_pre_install_noinput() { - pip3 install --pre --upgrade $@; return $? -} - -__check_apt_lock() { - lsof /var/lib/dpkg/lock > /dev/null 2>&1 - RES=`echo $?` - return $RES -} - -__check_unparsed_options() { - shellopts="$1" - # grep alternative for SunOS - if [ -f /usr/xpg4/bin/grep ]; then - grep='/usr/xpg4/bin/grep' - else - grep='grep' - fi - unparsed_options=$( echo "$shellopts" | ${grep} -E '(^|[[:space:]])[-]+[[:alnum:]]' ) - if [ "x$unparsed_options" != "x" ]; then - usage - echo - echoerror "options are only allowed before install arguments" - echo - exit 1 - fi -} - -configure_cpan() { - (echo y;echo o conf prerequisites_policy follow;echo o conf commit)|cpan > /dev/null -} - -usage() { - echo "usage" - exit 1 -} - -install_ubuntu_16.04_deps() { - - echoinfo "Updating your APT Repositories ... " - apt-get update >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Installing Python Software Properies ... " - __apt_get_install_noinput software-properties-common >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Adding Guymager Repository" - wget -nH -rP /etc/apt/sources.list.d/ http://deb.pinguin.lu/pinguin.lu.list >> $HOME/bitcurator-install.log 2>&1 - wget -q http://deb.pinguin.lu/debsign_public.key -O- | sudo apt-key add - >>$HOME/bitcurator-install.log 2>&1 - apt-get update >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Adding Siegfried Repository" - wget -qO - https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add - - echo "deb http://dl.bintray.com/siegfried/debian wheezy main" | sudo tee -a /etc/apt/sources.list - apt-get update >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Adding Yad Repository: $@" - add-apt-repository -y ppa:nilarimogard/webupd8 >> $HOME/bitcurator-install.log 2>&1 || return 1 - - #echoinfo "Adding Gradle Repository: $@" - #add-apt-repository -y ppa:cwchien/gradle >> $HOME/bitcurator-install.log 2>&1 || return 1 - - #echoinfo "Adding BitCurator Repository: $@" - #add-apt-repository -y ppa:bitcurator/$@ >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Updating Repository Package List ..." - apt-get update >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Upgrading all packages to latest version ..." - __apt_get_upgrade_noinput >> $HOME/bitcurator-install.log 2>&1 || return 1 - - return 0 -} - -install_ubuntu_16.04_packages() { - packages="ant -antiword -aufs-tools -automake -autopoint -bchunk -bison -bless -casper -cdrdao -cifs-utils -clamav -clamav-daemon -clamtk -clonezilla -cmake -compizconfig-settings-manager -dcfldd -dconf-tools -dialog -discover -disktype -dkms -easytag -equivs -expat -expect -fdutils -flex -fslint -g++ -gadmin-rsync -gawk -gddrescue -ghex -git -git-svn -gnome-panel -gnome-search-tool -gnome-sushi -gnome-system-tools -gradle -grsync -gtkhash -guymager-beta -gxine -hardinfo -hdparm -hfsplus -hfsprogs -hfsutils -hfsutils-tcltk -icedax -id3tool -lame -libappindicator1 -libarchive-dev -libav-tools -libavcodec-extra -libboost-dev -libboost-filesystem-dev -libboost-program-options-dev -libboost-system-dev -libboost-test-dev -libbz2-dev -libcppunit-1.13-0v5 -libcppunit-dev -libcrypto++9v5 -libcurl4-openssl-dev -libdebian-installer4 -libdvdread4 -libevent-dev -libexif-dev -libexpat1-dev -libffi-dev -libfuse-dev -libgdbm-dev -libgnomeui-0 -libgnomeui-dev -libgtk2.0-dev -libicu-dev -libimage-exiftool-perl -libmad0 -libmagic-dev -libmysqlclient-dev -libncurses5-dev -libncursesw5-dev -libnss-myhostname -libparse-win32registry-perl -libpthread-stubs0-dev -libreadline-dev -libssl-dev -libtalloc-dev -libtool -libtool-bin -libtre-dev -libtre5 -libudev-dev -libvte-common -libvte9 -libxml2-dev -libyaml-dev -linux-headers-generic -maven -mediainfo -mencoder -mercurial-common -mokutil -mpg321 -mplayer -mysql-client -nautilus-actions -nautilus-script-audio-convert -nautilus-scripts-manager -nwipe -openjdk-8-jdk -openjfx -openssh-server -plymouth-themes -plymouth-x11 -python-compizconfig -python-magic -python-pip -python-pyside -python-sphinx -python-tk -python-vte -python2.7-dev -python3 -python3-dev -python3-numpy -python3-pip -python3-pyqt4 -python3-setuptools -python3-sip-dev -python3-tk -readpst -recoll -ruby -sharutils -siegfried -smartmontools -squashfs-tools -ssdeep -subversion -swig -synaptic -syslinux-utils -tagtool -tagtool -testdisk -tree -ubiquity-frontend-debconf -udisks2 -unixodbc -unixodbc-dev -user-setup -uuid-dev -vim -vlc -winbind -xmount -xorriso -yad" - -# ubuntu-restricted-extras -# Added to above list. May be removed depending on deployment. -# -#gstreamer0.10-plugins-ugly libxine1-ffmpeg gxine mencoder libdvdread4 totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 mpg321 libavcodec-extra -# - - if [ "$@" = "dev" ]; then - packages="$packages" - elif [ "$@" = "stable" ]; then - packages="$packages" - fi - - for PACKAGE in $packages; do - __apt_get_install_noinput $PACKAGE >> $HOME/bitcurator-install.log 2>&1 - ERROR=$? - if [ $ERROR -ne 0 ]; then - echoerror "Install Failure: $PACKAGE (Error Code: $ERROR)" - else - echoinfo "Installed Package: $PACKAGE" - fi - done - - return 0 -} - -install_ubuntu_16.04_pip_packages() { - pip_packages="pip docopt python-evtx python-registry six configobj construct et_xmlfile jdcal pefile analyzeMFT python-magic argparse unicodecsv matplotlib" - pip_pre_packages="bitstring" - - if [ "$@" = "dev" ]; then - pip_packages="$pip_packages" - elif [ "$@" = "stable" ]; then - pip_packages="$pip_packages" - fi - - ERROR=0 - for PACKAGE in $pip_pre_packages; do - CURRENT_ERROR=0 - echoinfo "Installed Python (pre) Package: $PACKAGE" - __pip_pre_install_noinput $PACKAGE >> $HOME/bitcurator-install.log 2>&1 || (let ERROR=ERROR+1 && let CURRENT_ERROR=1) - if [ $CURRENT_ERROR -eq 1 ]; then - echoerror "Python Package Install Failure: $PACKAGE" - fi - done - - for PACKAGE in $pip_packages; do - CURRENT_ERROR=0 - echoinfo "Installed Python Package: $PACKAGE" - __pip_install_noinput $PACKAGE >> $HOME/bitcurator-install.log 2>&1 || (let ERROR=ERROR+1 && let CURRENT_ERROR=1) - if [ $CURRENT_ERROR -eq 1 ]; then - echoerror "Python Package Install Failure: $PACKAGE" - fi - done - - if [ $ERROR -ne 0 ]; then - echoerror - return 1 - fi - - return 0 -} - -# Global: Works on 16.04 and 16.10 -install_perl_modules() { - # Required by macl.pl script - #perl -MCPAN -e "install Net::Wigle" >> $HOME/bitcurator-install.log 2>&1 - echoinfo "No perl modules to install at this time." -} - -install_bitcurator_files() { - # Checkout code from bitcurator and put these files into place - echoinfo "BitCurator environment: Installing BitCurator Tools" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - - git clone --recursive https://github.com/bitcurator/bitcurator-distro-main /tmp/bitcurator-distro-main >> $HOME/bitcurator-install.log 2>&1 - - git clone --recursive https://github.com/bitcurator/bitcurator-distro-tools /tmp/bitcurator-distro-tools >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Installing bctools" - cd /tmp/bitcurator-distro-tools - python3 setup.py build >> $HOME/bitcurator-install.log 2>&1 - python3 setup.py install >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Installing py3fpdf" - cd /tmp/bitcurator-distro-main/externals/py3fpdf - python3 setup.py build >> $HOME/bitcurator-install.log 2>&1 - sudo python3 setup.py install >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Copying HFSExplorer snapshot to /tmp" - cp /tmp/bitcurator-distro-main/externals/hfsexplorer-0.23.1-snapshot_2016-09-02-bin.zip /tmp - - echoinfo "BitCurator environment: Copying libewf-20140608.tar.gz to /tmp" - cp /tmp/bitcurator-distro-main/externals/libewf-20140608.tar.gz /tmp - - echoinfo "BitCurator environment: Copying libuna-alpha-20150927.tar.gz to /tmp" - cp /tmp/bitcurator-distro-main/externals/libuna-alpha-20150927.tar.gz /tmp - - echoinfo "BitCurator environment: Installing BitCurator mount policy app and mounter" - cd /tmp/bitcurator-distro-main/mounter - cp *.py /usr/local/bin - - echoinfo "BitCurator environment: Installing BitCurator desktop launcher scripts" - cd /tmp/bitcurator-distro-main/scripts - cp ./launch-scripts/* /usr/local/bin - - echoinfo "BitCurator environment: Moving BitCurator configuration files to /etc/bitcurator" - cd /tmp/bitcurator-distro-main/env/etc - cp -r bitcurator /etc - - echoinfo "BitCurator environment: Copying .vimrc and editor refinements to home" - cd /tmp/bitcurator-distro-main/env - cp .vimrc $HOME - cp -r .vim $HOME - cd $HOME/.vim - mkdir backups - mkdir swaps - cd /tmp - - echoinfo "BitCurator environment: Moving BitCurator sudoers file to /etc/sudoers" - cd /tmp/bitcurator-distro-main/env/etc - cp sudoers /etc - chmod 440 /etc/sudoers - - #echoinfo "BitCurator environment: Moving BitCurator autostart files to $HOME/.config/autostart" - # cd /tmp/bitcurator-distro-main/env/.config - # sudo -u $SUDO_USER rsync -a -v --ignore-existing autostart $HOME/.config/ >> $HOME/bitcurator-install.log 2>&1 - # chmod 755 $HOME/.config/autostart/bcpolicyapp.py.desktop - - echoinfo "BitCurator environment: Moving BitCurator nautilus files to $HOME/.local/share/nautilus/" - cd /tmp/bitcurator-distro-main/env/.local/share/nautilus - sudo -u $SUDO_USER rsync -a -v --ignore-existing scripts $HOME/.local/share/nautilus >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Copying fmount support scripts to /usr/local/bin" - cd /tmp/bitcurator-distro-main/env/usr/local/bin - cp * /usr/local/bin - - echoinfo "BitCurator environment: Copying rbfstab scripts to /usr/sbin" - cd /tmp/bitcurator-distro-main/env/usr/sbin - cp * /usr/sbin - - #echoinfo "BitCurator environment: Force fstab options for devices" - # cd /tmp/bitcurator-distro-main/env/etc/udev/rules.d - # cp fstab.rules /etc/udev/rules.d - - echoinfo "BitCurator environment: Moving BitCurator icons and pixmaps to /usr/share" - cd /tmp/bitcurator-distro-main/env/usr/share/icons - cp -r bitcurator /usr/share/icons - cd /tmp/bitcurator-distro-main/env/usr/share/pixmaps - cp -r * /usr/share/pixmaps - - #echoinfo "BitCurator environment: Setup module-assistant" - # Disabled for now - manually run on first ISO install after respin, or VBox chokes - #m-a prepare >> $HOME/bitcurator-install.log 2>&1 - - #echoinfo "BitCurator environment: Updating grub configuration" - # cd /tmp/bitcurator-distro-main/env/etc/default - # cp grub /etc/default/grub - # update-grub >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Moving desktop support files to /usr/share/bitcurator/resources" - if [ ! -d /usr/share/bitcurator ]; then - mkdir -p /usr/share/bitcurator - fi - if [ ! -d /usr/share/bitcurator/resources ]; then - mkdir -p /usr/share/bitcurator/resources - mkdir -p /usr/share/bitcurator/resources/xenial - fi - - # We'll be transfering desktop-folders contents later... - cp -r /tmp/bitcurator-distro-main/env/desktop-folders /usr/share/bitcurator/resources - # We'll also be transfering plymouth contents later... - - # Copy resources for 16.04 - cp -r /tmp/bitcurator-distro-main/env/usr/share/plymouth /usr/share/bitcurator/resources/xenial - - echoinfo "BitCurator environment: Moving image files to /usr/share/bitcurator/resources" - cp -r /tmp/bitcurator-distro-main/env/images /usr/share/bitcurator/resources - -} - -install_ubuntu_16.04_respin_support() { - # Checkout code from bitcurator and put these files into place - echoinfo "BitCurator environment: Installing Distro/Respin Tools" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - - #echoinfo "BitCurator environment: Installing legacy xresprobe dependency" - # dpkg -i /tmp/bitcurator-distro-main/livecd/xresprobe_0.4.24ubuntu9_amd64.deb >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Installing BodhiBuilder LiveCD imager" - dpkg -i /tmp/bitcurator-distro-main/livecd/bodhibuilder_2.2.7_all.deb >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Cleaning up..." - cd $CDIR - rm -r -f /tmp/bitcurator-distro-main - -} - -install_source_packages() { - - # Install libuna from specific release - echoinfo "BitCurator environment: Building and installing libuna" - CDIR=$(pwd) - - # Newer versions break a lot of stuff. Keep 20150927 for now. - cd /tmp - tar zxf libuna-alpha-20150927.tar.gz >> $HOME/bitcurator-install.log 2>&1 - cd libuna-20150927 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - - # Now clean up - cd /tmp - rm -rf libuna-20150927 - rm libuna-alpha-20150927.tar.gz - - # Install libewf from current sources - echoinfo "BitCurator environment: Building and installing libewf" - CDIR=$(pwd) - - # Newer versions break a lot of stuff. Keep 20140608 for now. - cd /tmp - tar zxf libewf-20140608.tar.gz >> $HOME/bitcurator-install.log 2>&1 - cd libewf-20140608 - ./configure --enable-python --enable-v1-api >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - - # Now clean up - cd /tmp - rm -rf libewf-20140608 - rm libewf-20140608.tar.gz - - # Install AFFLIBv3 (may remove this in future, for now use sshock fork) - echoinfo "BitCurator environment: Building and installing AFFLIBv3" - CDIR=$(pwd) - git clone --recursive https://github.com/sshock/AFFLIBv3 /tmp/AFFLIBv3 >> $HOME/bitcurator-install.log 2>&1 - cd /tmp/AFFLIBv3 - ./bootstrap.sh >> $HOME/bitcurator-install.log 2>&1 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf AFFLIBv3 - - # Pull DFXML tools from GitHub. No installer for now, place in /usr/share - echoinfo "BitCurator environment: Adding DFXML tools and libraries" - CDIR=$(pwd) - git clone https://github.com/simsong/dfxml /usr/share/dfxml >> $HOME/bitcurator-install.log 2>&1 - # No cleanup needed - cd /tmp - - # Install The Sleuth Kit (TSK) from current sources - echoinfo "BitCurator environment: Building and installing The Sleuth Kit" - CDIR=$(pwd) - git clone --recursive https://github.com/sleuthkit/sleuthkit /usr/share/sleuthkit >> $HOME/bitcurator-install.log 2>&1 - cd /usr/share/sleuthkit - git fetch - git checkout master >> $HOME/bitcurator-install.log 2>&1 - - # Copy ficlam to use location - sudo -u $SUDO_USER mkdir $HOME/.fiwalk - sudo -u $SUDO_USER cp /usr/share/sleuthkit/tools/fiwalk/plugins/ficlam.sh $HOME/.fiwalk - sudo -u $SUDO_USER cp /usr/share/sleuthkit/tools/fiwalk/plugins/clamconfig.txt $HOME/.fiwalk - sudo -u $SUDO_USER chmod 755 $HOME/.fiwalk/ficlam.sh - - ./bootstrap >> $HOME/bitcurator-install.log 2>&1 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - - # Install PyTSK - echoinfo "BitCurator environment: Building and installing PyTSK (Python bindings for TSK)" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - cd /tmp - #wget -q https://github.com/py4n6/pytsk/releases/download/20160721/pytsk3-20160721.tar.gz - #tar -zxf pytsk3-20160721.tar.gz >> $HOME/bitcurator-install.log 2>&1 - wget -q https://github.com/py4n6/pytsk/releases/download/20171108/pytsk3-20171108.tar.gz - tar -zxf pytsk3-20171108.tar.gz >> $HOME/bitcurator-install.log 2>&1 - cd pytsk3-20171108 - python3 setup.py build >> $HOME/bitcurator-install.log 2>&1 - python3 setup.py install >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf pytsk3-20171108 - - # Install libsodium (not packaged version in 16.04LTS, needed for ZeroMQ) - #echoinfo "BitCurator environment: Building and installing libsodium" - #echoinfo " -- Please be patient. This may take several minutes..." - #CDIR=$(pwd) - # cd /tmp - # #wget -q https://download.libsodium.org/libsodium/releases/libsodium-1.0.11.tar.gz - # #tar -zxf libsodium-1.0.11.tar.gz >> $HOME/bitcurator-install.log 2>&1 - # wget -q https://github.com/jedisct1/libsodium/releases/download/1.0.15/libsodium-1.0.15.tar.gz - # tar -zxf libsodium-1.0.15.tar.gz >> $HOME/bitcurator-install.log 1>&1 - # cd libsodium-1.0.15 - # ./configure >> $HOME/bitcurator-install.log 2>&1 - # make >> $HOME/bitcurator-install.log 2>&1 - # make install >> $HOME/bitcurator-install.log 2>&1 - # ldconfig >> $HOME/bitcurator-install.log 2>&1 - # # Now clean up - # cd /tmp - # rm libsodium-1.0.15.tar.gz - # rm -rf libsodium-1.0.15 - - # Install hashdb (optional dependency for bulk_extractor) - echoinfo "BitCurator environment: Building and installing hashdb" - CDIR=$(pwd) - # git clone --recursive https://github.com/simsong/hashdb /tmp/hashdb >> $HOME/bitcurator-install.log 2>&1 - cd /tmp - wget -q https://github.com/NPS-DEEP/hashdb/archive/v3.0.0.tar.gz - tar -zxf v3.0.0.tar.gz - cd hashdb-3.0.0 - chmod 755 bootstrap.sh - ./bootstrap.sh >> $HOME/bitcurator-install.log 2>&1 - ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf hashdb-3.0.0 - rm v3.0.0.tar.gz - ldconfig >> $HOME/bitcurator-install.log 2>&1 - - # Install lightgrep - echoinfo "BitCurator environment: Building and installing lightgrep" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - git clone --recursive git://github.com/strozfriedberg/liblightgrep.git /tmp/liblightgrep >> $HOME/bitcurator-install.log 2>&1 - cd /tmp/liblightgrep - autoreconf -fi >> $HOME/bitcurator-install.log 2>&1 - ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu >> $HOME/bitcurator-install.log 2>&1 - make -j4 -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - cp pylightgrep/lightgrep.py /usr/local/bin - chmod 755 /usr/local/bin/lightgrep.py - cd /tmp - rm -rf liblightgrep - ldconfig >> $HOME/bitcurator-install.log 2>&1 - - # Install bulk_extractor - echoinfo "BitCurator environment: Building and installing bulk_extractor" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - git clone --recursive https://github.com/simsong/bulk_extractor /tmp/bulk_extractor >> $HOME/bitcurator-install.log 2>&1 - cd /tmp/bulk_extractor - chmod 755 bootstrap.sh - ./bootstrap.sh >> $HOME/bitcurator-install.log 2>&1 - ./configure --enable-lightgrep --disable-hashdb >> $HOME/bitcurator-install.log 2>&1 - # ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - echoinfo "BitCurator environment: Moving identify_filenames and bulk_extractor_reader to /usr/share/dfxml/python" - cp python/identify_filenames.py /usr/share/dfxml/python - chmod 755 /usr/share/dfxml/python/identify_filenames.py - cp python/bulk_extractor_reader.py /usr/share/dfxml/python - chmod 755 /usr/share/dfxml/python/bulk_extractor_reader.py - # Now clean up - cd /tmp - rm -rf bulk_extractor - - # Install HFS Explorer (not packaged for 16.04LTS) - echoinfo "BitCurator environment: Building and installing HFS Explorer" - CDIR=$(pwd) - mkdir /usr/share/hfsexplorer - cd /usr/share/hfsexplorer - #wget -q https://sourceforge.net/projects/catacombae/files/HFSExplorer/0.23.1/hfsexplorer-0.23.1-bin.zip - #unzip hfsexplorer-0.23.1-bin.zip >> $HOME/bitcurator-install.log 2>&1 - #rm hfsexplorer-0.23.1-bin.zip - cp /tmp/hfsexplorer-0.23.1-snapshot_2016-09-02-bin.zip /usr/share/hfsexplorer - unzip hfsexplorer-0.23.1-snapshot_2016-09-02-bin.zip >> $HOME/bitcurator-install.log 2>&1 - rm hfsexplorer-0.23.1-snapshot_2016-09-02-bin.zip - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - - # Install dumpfloppy (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing dumpfloppy" - CDIR=$(pwd) - cd /tmp - git clone http://offog.org/git/dumpfloppy.git >> $HOME/bitcurator-install.log 2>&1 - cd dumpfloppy - aclocal --force && autoconf -f && automake --add-missing && ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf dumpfloppy - - # Install bagit-python (not packaged for 16.04LTS, use author source) - #echoinfo "BitCurator environment: Building and installing bagit-python" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/LibraryOfCongress/bagit-python >> $HOME/bitcurator-install.log 2>&1 - cd bagit-python - pip install bagit >> $HOME/bitcurator-install.log 2>&1 - # sudo -u $SUDO_USER pip install bagit >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf bagit-python - - # Install loc-bagger (not packaged for 16.04LTS, use author source) - # Bagger doesn't have an installer, and is weirdly packaged. For now, - # put it in a .bagger directory in $HOME - echoinfo "BitCurator environment: Building and installing bagger" - CDIR=$(pwd) - - cd $HOME - sudo -u $SUDO_USER mkdir .bagger - cd .bagger - - sudo -u $SUDO_USER wget -q https://github.com/LibraryOfCongress/bagger/releases/download/2.7.7/bagger-2.7.7.zip >> $HOME/bitcurator-install.log 2>&1 - sudo -u $SUDO_USER unzip bagger-2.7.7.zip >> $HOME/bitcurator-install.log 2>&1 - sudo -u $SUDO_USER mv bagger-2.7.7 bagger >> $HOME/bitcurator-install.log 2>&1 - rm bagger-2.7.7.zip - - # No cleanup needed at this point - cd /tmp - - # Install Brunnhilde (depends on Siegfried, installed as a package in BC) - echoinfo "BitCurator environment: Installing Brunnhilde" - pip install brunnhilde - - # Install sdhash (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing sdhash" - CDIR=$(pwd) - cd /tmp - wget -q https://github.com/sdhash/sdhash/archive/v3.4.tar.gz - tar -zxf v3.4.tar.gz >> $HOME/bitcurator-install.log 2>&1 - cd sdhash-3.4 - # ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf sdhash-3.4 - - # Install md5deep (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing md5deep" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/jessek/hashdeep >> $HOME/bitcurator-install.log 2>&1 - cd hashdeep - ./bootstrap.sh >> $HOME/bitcurator-install.log 2>&1 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig - # Now clean up - cd /tmp - rm -rf hashdeep - - # Install pyExifToolGUI (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing pyExifToolGUI" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/hvdwolf/pyExifToolGUI >> $HOME/bitcurator-install.log 2>&1 - cd pyExifToolGUI - ./install_remove.py install >> $HOME/bitcurator-install.log 2>&1 - # pyExifToolGUI doesn't always create the .pyexiftoolgui direcotry needed to - # run. Check and create manually, just in case. - if [ ! -d $HOME/.pyexiftoolgui ]; then - mkdir -p $HOME/.pyexiftoolgui - fi - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf pyExifToolGUI - - # Install FIDO (not packaged for 16.04LTS, use openpreserve source) - echoinfo "BitCurator environment: Building and installing FIDO" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/openpreserve/fido >> $HOME/bitcurator-install.log 2>&1 - cd fido - python3 setup.py build >> $HOME/bitcurator-install.log 2>&1 - python3 setup.py install >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf fido - - # Install openpyxl (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing openpyxl" - CDIR=$(pwd) - cd /tmp - hg clone https://bitbucket.org/openpyxl/openpyxl >> $HOME/bitcurator-install.log 2>&1 - cd openpyxl - python3 setup.py build >> $HOME/bitcurator-install.log 2>&1 - python3 setup.py install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf openpyxl - -# # Install FITS (not packaged for 16.04LTS, use Harvard GitHub source) -# echoinfo "BitCurator environment: Building and installing FITS" -# CDIR=$(pwd) -# cd $HOME -# sudo -u $SUDO_USER mkdir .fits -# cd .fits -# wget -q http://projects.iq.harvard.edu/files/fits/files/fits-1.0.3.zip -# sudo -u $SUDO_USER unzip fits-1.0.3.zip >> $HOME/bitcurator-install.log 2>&1 -# sudo -u $SUDO_USER mv fits-1.0.3 fits - - # Install regripper (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing regripper" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/keydet89/RegRipper2.8 >> $HOME/bitcurator-install.log 2>&1 - mv RegRipper2.8 /usr/share/regripper - # Install needed CPAN modules - # Use Ubuntu package - #perl -MCPAN -e 'install Parse::Win32Registry' >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - - # Install NSRLlookup (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing nsrllookup" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/rjhansen/nsrllookup >> $HOME/bitcurator-install.log 2>&1 - cd nsrllookup - # Fix AM version - # sed -i "s/am__api_version='1.13'/am__api_version='1.14'/g" configure - aclocal >> $HOME/bitcurator-install.log 2>&1 - automake --add-missing >> $HOME/bitcurator-install.log 2>&1 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf nsrllookup - -} - -configure_ubuntu() { - - echoinfo "BitCurator VM: Setting up symlinks to useful scripts" - if [ ! -L /usr/bin/vol.py ] && [ ! -e /usr/bin/vol.py ]; then - ln -s /usr/bin/vol.py /usr/bin/vol - fi - if [ ! -L /usr/bin/log2timeline ] && [ ! -e /usr/bin/log2timeline ]; then - ln -s /usr/bin/log2timeline_legacy /usr/bin/log2timeline - fi - if [ ! -L /usr/bin/kedit ] && [ ! -e /usr/bin/kedit ]; then - ln -s /usr/bin/gedit /usr/bin/kedit - fi - if [ ! -L /usr/bin/mount_ewf.py ] && [ ! -e /usr/bin/mount_ewf.py ]; then - ln -s /usr/bin/ewfmount /usr/bin/mount_ewf.py - fi - - echoinfo "BitCurator VM: Finished basic configuration" -} - -# Global: Ubuntu BitCurator VM Plymouth Configuration -# Works with 16.04 -configure_ubuntu_16.04_bitcurator_plymouth() { - echoinfo "BitCurator VM: Updating plymouth theme for 16.04" - cp -r /usr/share/bitcurator/resources/xenial/plymouth/themes/* /usr/share/plymouth/themes/ - # Already installed in initial setup - apt-get install plymouth-theme-script >> $HOME/bitcurator-install.log 2>&1 - update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/bitcurator-logo/bitcurator-logo.plymouth 100 - update-alternatives --config default.plymouth - update-initramfs -u -} - -# 16.04 BitCurator VM Configuration Function -configure_ubuntu_16.04_bitcurator_vm() { - - echoinfo "BitCurator VM: Setting Hostname: bitcurator" - OLD_HOSTNAME=$(hostname) - sed -i "s/$OLD_HOSTNAME/bitcurator/g" /etc/hosts - echo "bitcurator" > /etc/hostname - hostname bitcurator - - echoinfo "BitCurator VM: Fixing Samba User" - # Make sure we replace the BITCURATOR_USER template with our actual - # user so there is write permissions to samba. - sed -i "s/BITCURTOR_USER/$SUDO_USER/g" /etc/samba/smb.conf - - echoinfo "BitCurator VM: Restarting Samba" - # Restart samba services - service smbd restart >> $HOME/bitcurator-install.log 2>&1 - service nmbd restart >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator VM: Quieting i2c_piix4 boot error message:" - # Edit /etc/modprobe.d/blacklist.conf - sed -i -e "\$a# Fix piix4 error\nblacklist i2c_piix4" /etc/modprobe.d/blacklist.conf - - echoinfo "BitCurator VM: Setting noclobber for $SUDO_USER" - if ! grep -i "set -o noclobber" $HOME/.bashrc > /dev/null 2>&1 - then - echo "set -o noclobber" >> $HOME/.bashrc - fi - if ! grep -i "set -o noclobber" /root/.bashrc > /dev/null 2>&1 - then - echo "set -o noclobber" >> /root/.bashrc - fi - - echoinfo "BitCurator VM: Configuring Aliases for $SUDO_USER and root" - if ! grep -i "alias mountwin" $HOME/.bash_aliases > /dev/null 2>&1 - then - echo "alias mountwin='mount -o ro,loop,show_sys_files,streams_interface=windows'" >> $HOME/.bash_aliases - fi - - # For BitCurator VM, root is used frequently, set the alias there too. - if ! grep -i "alias mountwin" /root/.bash_aliases > /dev/null 2>&1 - then - echo "alias mountwin='mount -o ro,loop,show_sys_files,streams_interface=windows'" >> /root/.bash_aliases - fi - - echoinfo "BitCurator VM: Cleaning up broken symlinks on $SUDO_USER Desktop" - # Clean up broken symlinks - find -L /home/$SUDO_USER/Desktop -type l -delete - - echoinfo "BitCurator VM: Adding all BitCurator resources to $SUDO_USER Desktop" - - # Copy over necessary directories and files without clobbering - # This will need to be modified to accommodate changes to existing files! - sudo -u $SUDO_USER rsync -a -v --ignore-existing /usr/share/bitcurator/resources/desktop-folders/* $HOME/Desktop/ - - echoinfo "BitCurator VM: Symlinking media directory" - cd /home/$SUDO_USER/Desktop - sudo -u $SUDO_USER ln -s /media Shared\ Folders\ and\ Media - - echoinfo "BitCurator VM: Enabling desktop icons for $SUDO_USER Desktop" - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background show-desktop-icons true - - echoinfo "BitCurator VM: Setting some useful icons for $SUDO_USER Desktop" - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop home-icon-visible true - #gsettings set org.gnome.nautilus.desktop computer-icon-visible true - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop trash-icon-visible true - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop network-icon-visible true - - echoinfo "BitCurator VM: Enabling mount visibility for $SUDO_USER Desktop" - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop volumes-visible true - - echoinfo "BitCurator VM: Disabling automount and automount-open for $SUDO_USER" - sudo -u $SUDO_USER gsettings set org.gnome.desktop.media-handling automount false - sudo -u $SUDO_USER gsettings set org.gnome.desktop.media-handling automount-open false - - echoinfo "BitCurator VM: Setting Desktop background image" - #cd /usr/share/bitcurator/resources/images - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background primary-color '#3464A2' - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background secondary-color '#3464A2' - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background color-shading-type 'solid' - - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background draw-background false && sudo -u $SUDO_USER gsettings set org.gnome.desktop.background picture-uri file:///usr/share/bitcurator/resources/images/BitCuratorEnv3Logo300px.png && sudo -u $SUDO_USER gsettings set org.gnome.desktop.background draw-background true - - - #echoinfo "BitCurator VM: Adding primary user to vboxsf group" - # usermod -a -G vboxsf $SUDO_USER - - echoinfo "BitCurator VM: Fixing udisks rules to enable floppy access" - sed -i 's/{ID_DRIVE_FLOPPY}="1"/{ID_DRIVE_FLOPPY}="0"/' /lib/udev/rules.d/80-udisks.rules - sed -i 's/{ID_DRIVE_FLOPPY_ZIP}="1"/{ID_DRIVE_FLOPPY_ZIP}="0"/' /lib/udev/rules.d/80-udisks.rules - sed -i 's/{ID_DRIVE_FLOPPY}="1"/{ID_DRIVE_FLOPPY}="0"/' /lib/udev/rules.d/80-udisks2.rules - sed -i 's/{ID_DRIVE_FLOPPY_ZIP}="1"/{ID_DRIVE_FLOPPY_ZIP}="0"/' /lib/udev/rules.d/80-udisks2.rules - - #echoinfo "BitCurator VM: Fixing swappiness and cache pressure" - # echo '' >> /etc/sysctl.conf - # echo '# Decrease swap usage to a workable level' >> /etc/sysctl.conf - # echo 'vm.swappiness=10' >> /etc/sysctl.conf - # echo '# Improve cache management' >> /etc/sysctl.conf - # echo 'vm.vfs_cache_pressure=50' >> /etc/sysctl.conf - - echoinfo "BitCurator VM: Reenable AffLib for Guymager" - # NOTE! The spaces matter here! - sed -i 's/AffEnabled = false/AffEnabled = TRUE/' /etc/guymager/guymager.cfg - - # To fix: piix4_smbus - # rapl_domains no package found - - if [ ! -L /sbin/iscsiadm ]; then - ln -s /usr/bin/iscsiadm /sbin/iscsiadm - fi - - if [ ! -L /usr/local/bin/rip.pl ]; then - ln -s /usr/share/regripper/rip.pl /usr/local/bin/rip.pl - fi - - # Add extra device loop backs. - if ! grep "do mknod /dev/loop" /etc/rc.local > /dev/null 2>&1 - then - echo 'for i in `seq 8 100`; do mknod /dev/loop$i b 7 $i; done' >> /etc/rc.local - fi - - echoinfo "BitCurator VM: Fixing permissions in user's home directory" - chown -R $SUDO_USER:$SUDO_USER /home/$SUDO_USER - - #echoinfo "BitCurator VM: vboxvideo module load force" - # held back for now - # bash -c 'echo vboxvideo >> /etc/modules' - -} - -complete_message() { - echo - echo "Installation Complete!" - echo - echo "Related docs are works in progress, feel free to contribute!" - echo - echo "Documentation: http://wiki.bitcurator.net" - echo -} - -complete_message_skin() { - echo "The hostname may have changed. It's a good idea to reboot at this point." - echo - echo "sudo reboot" - echo -} - -UPGRADE_ONLY=0 -CONFIGURE_ONLY=0 -SKIN=0 -INSTALL=0 -YESTOALL=0 - -OS=$(lsb_release -si) -ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/') -VER=$(lsb_release -sr) - -if [ $OS != "Ubuntu" ]; then - echo "BitCurator is only installable on Ubuntu operating systems at this time." - exit 1 -fi - -if [ $ARCH != "64" ]; then - echo "BitCurator is only installable on a 64 bit architecture at this time." - exit 2 -fi - -if [ $VER != "16.04" ] && [ $VER != "16.10" ]; then - echo "BitCurator is only installable on Ubuntu 16.04 and 16.10 at this time." - exit 3 -fi - -if [ `whoami` != "root" ]; then - echoerror "The BitCurator Bootstrap script must run as root." - echoinfo "Preferred Usage: sudo bootstrap.sh (options)" - echo "" - exit 3 -fi - -if [ "$SUDO_USER" = "" ]; then - echo "The SUDO_USER variable doesn't seem to be set" - exit 4 -fi - -#if [ ! "$(__check_apt_lock)" ]; then -# echo "APT Package Manager appears to be locked. Close all package managers." -# exit 15 -#fi - -while getopts ":hvcsiyu" opt -do -case "${opt}" in - h ) usage; exit 0 ;; - v ) echo "$0 -- Version $__ScriptVersion"; exit 0 ;; - s ) SKIN=1 ;; - i ) INSTALL=1 ;; - c ) CONFIGURE_ONLY=1; INSTALL=0; SKIN=0; ;; - u ) UPGRADE_ONLY=1; ;; - y ) YESTOALL=1 ;; - \?) echo - echoerror "Option does not exist: $OPTARG" - usage - exit 1 - ;; -esac -done - -shift $(($OPTIND-1)) - -if [ "$#" -eq 0 ]; then - ITYPE="stable" -else - __check_unparsed_options "$*" - ITYPE=$1 - shift -fi - -if [ "$UPGRADE_ONLY" -eq 1 ]; then - echoinfo "BitCurator update/upgrade requested." - echoinfo "All other options will be ignored!" - echoinfo "This could take a few minutes ..." - echo "" - - export DEBIAN_FRONTEND=noninteractive - - install_ubuntu_${VER}_deps $ITYPE || echoerror "Updating Depedencies Failed" - install_ubuntu_${VER}_packages $ITYPE || echoerror "Updating Packages Failed" - install_ubuntu_${VER}_pip_packages $ITYPE || echoerror "Updating Python Packages Failed" - install_perl_modules || echoerror "Updating Perl Packages Failed" - install_bitcurator_files || echoerror "Installing/Updating BitCurator Files Failed" - #install_ubuntu_${VER}_respin_support $ITYPE || echoerror "Updating Distro Support Failed" - install_source_packages || echoerror "Installing/Updating BitCurator Source Packages Failed" - #install_kibana || echoerror "Installing/Updating Kibana Failed" - - echo "" - echoinfo "BitCurator Upgrade Complete" - exit 0 -fi - -# Check installation type -if [ "$(echo $ITYPE | egrep '(dev|stable)')x" = "x" ]; then - echoerror "Installation type \"$ITYPE\" is not known..." - exit 1 -fi - -echoinfo "*******************************************************" -echoinfo "Welcome to the BitCurator Bootstrap Script" -echoinfo "This script will now proceed to configure your system." -echoinfo "*******************************************************" -echoinfo "" - -if [ "$YESTOALL" -eq 1 ]; then - echoinfo "You supplied the -y option, this script will not exit for any reason" -fi - -echoinfo "OS: $OS" -echoinfo "Arch: $ARCH" -echoinfo "Version: $VER" - -if [ "$SKIN" -eq 1 ] && [ "$YESTOALL" -eq 0 ]; then - echo - echo "You have chosen to apply the BitCurator skin to the Ubuntu system." - echo - echo "You did not choose to say YES to all, so we are going to exit." - echo - echo "Your current user is: $SUDO_USER" - echo - echo "Re-run this command with the -y option" - echo - exit 10 -fi - -if [ "$INSTALL" -eq 1 ] && [ "$CONFIGURE_ONLY" -eq 0 ]; then - export DEBIAN_FRONTEND=noninteractive - install_ubuntu_${VER}_deps $ITYPE - install_ubuntu_${VER}_packages $ITYPE - install_ubuntu_${VER}_pip_packages $ITYPE - configure_cpan - install_perl_modules - #install_kibana - install_bitcurator_files - #install_ubuntu_${VER}_respin_support $ITYPE || echoerror "Updating Distro Support Failed" - install_source_packages -fi - -#configure_elasticsearch - -# Configure for BitCurator -configure_ubuntu - -# Configure BitCurator VM (if selected) -if [ "$SKIN" -eq 1 ]; then - # No longer needed - use ${VER} only due to changes in 16.04 - #configure_ubuntu_bitcurator_vm - configure_ubuntu_${VER}_bitcurator_vm - #configure_ubuntu_${VER}_bitcurator_plymouth -fi - -complete_message - -if [ "$SKIN" -eq 1 ]; then - complete_message_skin -fi diff --git a/bitcurator/attic/bcmount.desktop b/bitcurator/attic/bcmount.desktop deleted file mode 100755 index 05fe96e..0000000 --- a/bitcurator/attic/bcmount.desktop +++ /dev/null @@ -1,16 +0,0 @@ -[Desktop Entry] -# BitCurator GUI -# The format of this file is specified at -# http://freedesktop.org/Standards/desktop-entry-spec -# The entries are in the order they are listed in version 1.0 -Type=Application -Version=1.0 -Name=BitCurator Mounter -GenericName=bcdat -Comment=GUI for the BitCurator Mounter Tool -Icon=/usr/share/icons/bitcurator/bcdisk.svg -Exec=/usr/local/bin/bc_mounter.py -Terminal=false -# Categorie entry according to version 1.0 of -# http://www.freedesktop.org/wiki/Specifications/menu-spec -Categories=Qt diff --git a/bitcurator/attic/bootstrap.sh b/bitcurator/attic/bootstrap.sh deleted file mode 100755 index e21ae7b..0000000 --- a/bitcurator/attic/bootstrap.sh +++ /dev/null @@ -1,1458 +0,0 @@ -#!/bin/bash - - -# -# Build, upgrade, and configuration script to initialize salt install and execution -# -# -#=============================================================================== -# vim: softtabstop=4 shiftwidth=4 expandtab fenc=utf-8 spell spelllang=en cc=81 -#=============================================================================== -# - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __function_defined -# DESCRIPTION: Checks if a function is defined within this scripts scope -# PARAMETERS: function name -# RETURNS: 0 or 1 as in defined or not defined -#------------------------------------------------------------------------------- -__function_defined() { - FUNC_NAME=$1 - if [ "$(command -v $FUNC_NAME)x" != "x" ]; then - echoinfo "Found function $FUNC_NAME" - return 0 - fi - - echodebug "$FUNC_NAME not found...." - return 1 -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __strip_duplicates -# DESCRIPTION: Strip duplicate strings -#------------------------------------------------------------------------------- -__strip_duplicates() { - echo $@ | tr -s '[:space:]' '\n' | awk '!x[$0]++' -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: echoerr -# DESCRIPTION: Echo errors to stderr. -#------------------------------------------------------------------------------- -echoerror() { - printf "${RC} * ERROR${EC}: $@\n" 1>&2; -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: echoinfo -# DESCRIPTION: Echo information to stdout. -#------------------------------------------------------------------------------- -echoinfo() { - printf "${GC} * STATUS${EC}: %s\n" "$@"; -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: echowarn -# DESCRIPTION: Echo warning informations to stdout. -#------------------------------------------------------------------------------- -echowarn() { - printf "${YC} * WARN${EC}: %s\n" "$@"; -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: echodebug -# DESCRIPTION: Echo debug information to stdout. -#------------------------------------------------------------------------------- -echodebug() { - if [ $_ECHO_DEBUG -eq $BS_TRUE ]; then - printf "${BC} * DEBUG${EC}: %s\n" "$@"; - fi -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __apt_get_install_noinput -# DESCRIPTION: (DRY) apt-get install with noinput options -#------------------------------------------------------------------------------- -__apt_get_install_noinput() { - apt-get install -y -o DPkg::Options::=--force-confold $@; return $? -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __apt_get_upgrade_noinput -# DESCRIPTION: (DRY) apt-get upgrade with noinput options -#------------------------------------------------------------------------------- -__apt_get_upgrade_noinput() { - apt-get upgrade -y -o DPkg::Options::=--force-confold $@; return $? -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __pip_install_noinput -# DESCRIPTION: (DRY) -#------------------------------------------------------------------------------- -__pip_install_noinput() { - pip3 install --upgrade $@; return $? -} - -#--- FUNCTION ---------------------------------------------------------------- -# NAME: __pip_install_noinput -# DESCRIPTION: (DRY) -#------------------------------------------------------------------------------- -__pip_pre_install_noinput() { - pip3 install --pre --upgrade $@; return $? -} - -__check_apt_lock() { - lsof /var/lib/dpkg/lock > /dev/null 2>&1 - RES=`echo $?` - return $RES -} - -__enable_universe_repository() { - if [ "x$(grep -R universe /etc/apt/sources.list /etc/apt/sources.list.d/ | grep -v '#')" != "x" ]; then - # The universe repository is already enabled - return 0 - fi - - echodebug "Enabling the universe repository" - # Ubuntu versions higher than 12.04 do not live in the old repositories - if [ $DISTRO_MAJOR_VERSION -gt 12 ] || ([ $DISTRO_MAJOR_VERSION -eq 12 ] && [ $DISTRO_MINOR_VERSION -gt 04 ]); then - add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe" || return 1 - fi - add-apt-repository -y "deb http://old-releases.ubuntu.com/ubuntu $(lsb_release -sc) universe" || return 1 - return 0 -} - -__check_unparsed_options() { - shellopts="$1" - # grep alternative for SunOS - if [ -f /usr/xpg4/bin/grep ]; then - grep='/usr/xpg4/bin/grep' - else - grep='grep' - fi - unparsed_options=$( echo "$shellopts" | ${grep} -E '(^|[[:space:]])[-]+[[:alnum:]]' ) - if [ "x$unparsed_options" != "x" ]; then - usage - echo - echoerror "options are only allowed before install arguments" - echo - exit 1 - fi -} - -configure_cpan() { - (echo y;echo o conf prerequisites_policy follow;echo o conf commit)|cpan > /dev/null -} - -usage() { - echo "usage" - exit 1 -} - -install_ubuntu_deps() { - - echoinfo "Updating your APT Repositories ... " - apt-get update >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Installing Python Software Properies ... " - __apt_get_install_noinput software-properties-common >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Enabling Universal Repository ... " - __enable_universe_repository >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Adding Guymager Repository" - wget -nH -rP /etc/apt/sources.list.d/ http://deb.pinguin.lu/pinguin.lu.list >> $HOME/bitcurator-install.log 2>&1 - wget -q http://deb.pinguin.lu/debsign_public.key -O- | sudo apt-key add - >>$HOME/bitcurator-install.log 2>&1 - apt-get update >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Adding Siegfried Repository" - wget -qO - https://bintray.com/user/downloadSubjectPublicKey?username=bintray | sudo apt-key add - - echo "deb http://dl.bintray.com/siegfried/debian wheezy main" | sudo tee -a /etc/apt/sources.list - apt-get update >> $HOME/bitcurator-install.log 2>&1 || return 1 - -# Disabled for 1.9.0-prealpha - no longer required (no appindicators) -# echoinfo "Adding Yad Repository: $@" -# add-apt-repository -y ppa:nilarimogard/webupd8 >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Adding Gradle Repository: $@" - add-apt-repository -y ppa:cwchien/gradle >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Updating Repository Package List ..." - apt-get update >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Upgrading all packages to latest version ..." - __apt_get_upgrade_noinput >> $HOME/bitcurator-install.log 2>&1 || return 1 - - echoinfo "Fixing swappiness for build" - sysctl vm.swappiness=10 >> $HOME/bitcurator-install.log 2>&1 - - return 0 -} - -#install_ubuntu_packages() { -# packages="ant -#antiword -#aufs-tools -#automake -#autopoint -#bchunk -#bison -#bless -#casper -#cdrdao -#cifs-utils -#clamav -#clamav-daemon -#clamtk -#clonezilla -#cmake -#compizconfig-settings-manager -#dcfldd -#dconf-tools -#dialog -#discover -#dkms -#easytag -#equivs -#expat -#expect -#fdutils -#flex -#fslint -#g++ -#gadmin-rsync -#gawk -#gddrescue -#ghex -#git -#git-svn -#gnome-panel -#gnome-search-tool -#gnome-sushi -#gnome-system-tools -#gradle -#grsync -#gtkhash -#guymager-beta -#gxine -#hardinfo -#hdparm -#hfsplus -#hfsprogs -#hfsutils -#hfsutils-tcltk -#icedax -#id3tool -#lame -#libappindicator1 -#libarchive-dev -#libav-tools -#libavcodec-extra -#libboost-dev -#libboost-filesystem-dev -#libboost-program-options-dev -#libboost-system-dev -#libboost-test-dev -#libbz2-dev -#libcppunit-1.14-0 -#libcppunit-dev -#libcrypto++6 -#libcurl4-openssl-dev -#libdebian-installer4 -#libdvdread4 -#libevent-dev -#libexif-dev -#libexpat1-dev -#libffi-dev -#libfuse-dev -#libgdbm-dev -#libgnomeui-0 -#libgnomeui-dev -#libgtk2.0-dev -#libicu-dev -#libimage-exiftool-perl -#libmad0 -#libmagic-dev -#libmysqlclient-dev -#libncurses5-dev -#libncursesw5-dev -#libnss-myhostname -#libparse-win32registry-perl -#libpthread-stubs0-dev -#libreadline-dev -#libssl-dev -#libtalloc-dev -#libtool -#libtool-bin -#libtre-dev -#libtre5 -#libudev-dev -#libvte-common -#libvte9 -#libxml2-dev -#libyaml-dev -#linux-headers-generic -#maven -#mediainfo -#mencoder -#mercurial-common -#mokutil -#mpg321 -#mplayer -#mysql-client -#nautilus-actions -#nautilus-script-audio-convert -#nautilus-scripts-manager -#nwipe -#openjdk-8-jdk -#openjfx -#openssh-server -#plymouth-themes -#plymouth-x11 -#python-compizconfig -#python-magic -#python-pip -#python-pyside -#python-sphinx -#python-tk -#python-vte -#python2.7-dev -#python3 -#python3-dev -#python3-lxml -#python3-numpy -#python3-pip -#python3-pyqt4 -#python3-setuptools -#python3-sip-dev -#python3-tk -#readpst -#recoll -#ruby -#sharutils -#siegfried -#smartmontools -#squashfs-tools -#subversion -#swig -#synaptic -#syslinux-utils -#tagtool -#tagtool -#tree -#ubiquity-frontend-debconf -#udisks2 -#unixodbc -#unixodbc-dev -#user-setup -#uuid-dev -#vim -#vlc -#winbind -#xmount -#xorriso -#yad" - -# ubuntu-restricted-extras -# Added to above list. May be removed depending on deployment. -# -#gstreamer0.10-plugins-ugly libxine1-ffmpeg gxine mencoder libdvdread4 totem-mozilla icedax tagtool easytag id3tool lame nautilus-script-audio-convert libmad0 mpg321 libavcodec-extra -# - -# if [ "$@" = "dev" ]; then -# packages="$packages" -# elif [ "$@" = "stable" ]; then -# packages="$packages" -# fi -# -# for PACKAGE in $packages; do -# __apt_get_install_noinput $PACKAGE >> $HOME/bitcurator-install.log 2>&1 -# ERROR=$? -# if [ $ERROR -ne 0 ]; then -# echoerror "Install Failure: $PACKAGE (Error Code: $ERROR)" -# else -# echoinfo "Installed Package: $PACKAGE" -# fi -# done -# -# return 0 -#} - -install_ubuntu_pip_packages() { - pip_packages="pip docopt python-evtx python-registry six configobj construct et_xmlfile jdcal pefile analyzeMFT python-magic argparse unicodecsv matplotlib" - pip_pre_packages="bitstring" - - if [ "$@" = "dev" ]; then - pip_packages="$pip_packages" - elif [ "$@" = "stable" ]; then - pip_packages="$pip_packages" - fi - - ERROR=0 - for PACKAGE in $pip_pre_packages; do - CURRENT_ERROR=0 - echoinfo "Installed Python (pre) Package: $PACKAGE" - __pip_pre_install_noinput $PACKAGE >> $HOME/bitcurator-install.log 2>&1 || (let ERROR=ERROR+1 && let CURRENT_ERROR=1) - if [ $CURRENT_ERROR -eq 1 ]; then - echoerror "Python Package Install Failure: $PACKAGE" - fi - done - - for PACKAGE in $pip_packages; do - CURRENT_ERROR=0 - echoinfo "Installed Python Package: $PACKAGE" - __pip_install_noinput $PACKAGE >> $HOME/bitcurator-install.log 2>&1 || (let ERROR=ERROR+1 && let CURRENT_ERROR=1) - if [ $CURRENT_ERROR -eq 1 ]; then - echoerror "Python Package Install Failure: $PACKAGE" - fi - done - - if [ $ERROR -ne 0 ]; then - echoerror - return 1 - fi - - return 0 -} - -# Global: Works on 16.04 and 16.10 -#install_perl_modules() { -# # Required by macl.pl script -# #perl -MCPAN -e "install Net::Wigle" >> $HOME/bitcurator-install.log 2>&1 -# echoinfo "No perl modules to install at this time." -#} - -install_bitcurator_files() { - # Checkout code from bitcurator and put these files into place - echoinfo "BitCurator environment: Installing BitCurator Tools" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - - git clone --recursive https://github.com/bitcurator/bitcurator-distro-main /tmp/bitcurator-distro-main >> $HOME/bitcurator-install.log 2>&1 - - git clone --recursive https://github.com/bitcurator/bitcurator-distro-tools /tmp/bitcurator-distro-tools >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Installing bctools" - cd /tmp/bitcurator-distro-tools - python3 setup.py build >> $HOME/bitcurator-install.log 2>&1 - python3 setup.py install >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment (prealpha): Switching to bionic for distro-main" - cd /tmp/bitcurator-distro-main - git fetch - git checkout bionic - - echoinfo "BitCurator environment: Installing py3fpdf" - cd /tmp/bitcurator-distro-main/externals/py3fpdf - python3 setup.py build >> $HOME/bitcurator-install.log 2>&1 - sudo python3 setup.py install >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Copying HFSExplorer snapshot to /tmp" - cp /tmp/bitcurator-distro-main/externals/hfsexplorer-0.23.1-snapshot_2016-09-02-bin.zip /tmp - - echoinfo "BitCurator environment: Copying libewf-20140608.tar.gz to /tmp" - cp /tmp/bitcurator-distro-main/externals/libewf-20140608.tar.gz /tmp - - echoinfo "BitCurator environment: Copying libuna-alpha-20150927.tar.gz to /tmp" - cp /tmp/bitcurator-distro-main/externals/libuna-alpha-20150927.tar.gz /tmp - - echoinfo "BitCurator environment: Installing BitCurator mount policy app and mounter" - cd /tmp/bitcurator-distro-main/mounter - cp *.py /usr/local/bin - - echoinfo "BitCurator environment: Installing BitCurator desktop launcher scripts" - cd /tmp/bitcurator-distro-main/scripts - cp ./launch-scripts/* /usr/local/bin - - echoinfo "BitCurator environment: Moving BitCurator configuration files to /etc/bitcurator" - cd /tmp/bitcurator-distro-main/env/etc - cp -r bitcurator /etc - - echoinfo "BitCurator environment: Copying .vimrc and editor refinements to home" - cd /tmp/bitcurator-distro-main/env - cp .vimrc $HOME - cp -r .vim $HOME - cd $HOME/.vim - mkdir backups - mkdir swaps - cd /tmp - - echoinfo "BitCurator environment: Moving BitCurator sudoers file to /etc/sudoers" - cd /tmp/bitcurator-distro-main/env/etc - cp sudoers /etc - chmod 440 /etc/sudoers - -# echoinfo "BitCurator environment: Moving BitCurator autostart files to $HOME/.config/autostart" -# cd /tmp/bitcurator-distro-main/env/.config -# sudo -u $SUDO_USER rsync -a -v --ignore-existing autostart $HOME/.config/ >> $HOME/bitcurator-install.log 2>&1 -# chmod 755 $HOME/.config/autostart/bcpolicyapp.py.desktop - - echoinfo "BitCurator environment: Moving BitCurator nautilus files to $HOME/.local/share/nautilus/" - cd /tmp/bitcurator-distro-main/env/.local/share/nautilus - sudo -u $SUDO_USER rsync -a -v --ignore-existing scripts $HOME/.local/share/nautilus >> $HOME/bitcurator-install.log 2>&1 - -# echoinfo "BitCurator environment: Disabling fstrim in cron.weekly" -# cd /tmp/bitcurator-distro-main/env/etc -# cp cron.weekly/fstrim /etc/cron.weekly/fstrim - - echoinfo "BitCurator environment: Copying fmount support scripts to /usr/local/bin" - cd /tmp/bitcurator-distro-main/env/usr/local/bin - cp * /usr/local/bin - - echoinfo "BitCurator environment: Copying rbfstab scripts to /usr/sbin" - cd /tmp/bitcurator-distro-main/env/usr/sbin - cp * /usr/sbin - -# echoinfo "BitCurator environment: Force fstab options for devices" -# cd /tmp/bitcurator-distro-main/env/etc/udev/rules.d -# cp fstab.rules /etc/udev/rules.d - - echoinfo "BitCurator environment: Moving BitCurator icons and pixmaps to /usr/share" - cd /tmp/bitcurator-distro-main/env/usr/share/icons - cp -r bitcurator /usr/share/icons - cd /tmp/bitcurator-distro-main/env/usr/share/pixmaps - cp -r * /usr/share/pixmaps - - #echoinfo "BitCurator environment: Setup module-assistant" - # Disabled for now - manually run on first ISO install after respin, or VBox chokes - #m-a prepare >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Updating grub configuration" - cd /tmp/bitcurator-distro-main/env/etc/default - cp grub /etc/default/grub - update-grub >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Moving desktop support files to /usr/share/bitcurator/resources" - if [ ! -d /usr/share/bitcurator ]; then - mkdir -p /usr/share/bitcurator - fi - if [ ! -d /usr/share/bitcurator/resources ]; then - mkdir -p /usr/share/bitcurator/resources - mkdir -p /usr/share/bitcurator/resources/xenial - fi - - # We'll be transfering desktop-folders contents later... - cp -r /tmp/bitcurator-distro-main/env/desktop-folders /usr/share/bitcurator/resources - # We'll also be transfering plymouth contents later... - - # Copy resources for 16.04 - cp -r /tmp/bitcurator-distro-main/env/usr/share/plymouth /usr/share/bitcurator/resources/xenial - - echoinfo "BitCurator environment: Moving image files to /usr/share/bitcurator/resources" - cp -r /tmp/bitcurator-distro-main/env/images /usr/share/bitcurator/resources - -} - -install_ubuntu_respin_support() { - # Checkout code from bitcurator and put these files into place - echoinfo "BitCurator environment: Installing Distro/Respin Tools" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - - echoinfo "BitCurator environment: Installing legacy xresprobe dependency" - dpkg -i /tmp/bitcurator-distro-main/livecd/xresprobe_0.4.24ubuntu9_amd64.deb >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Installing BodhiBuilder LiveCD imager" - dpkg -i /tmp/bitcurator-distro-main/livecd/bodhibuilder_2.2.5_all.deb >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator environment: Cleaning up..." - cd $CDIR - rm -r -f /tmp/bitcurator-distro-main - -} - -install_source_packages() { - - # Install Apache Thrift - packaged version too old in 16.04LTS - #echoinfo "BitCurator environment: Building and installing Apache Thrift" - #echoinfo " -- Please be patient. This may take several minutes..." - #CDIR=$(pwd) - # cd /tmp - # wget -q http://apache.mirrors.pair.com/thrift/0.10.0/thrift-0.10.0.tar.gz - # tar -zxf thrift-0.10.0.tar.gz >> $HOME/bitcurator-install.log 2>&1 - # cd thrift-0.10.0 - # ./configure >> $HOME/bitcurator-install.log 2>&1 - # make -s >> $HOME/bitcurator-install.log 2>&1 - # make install >> $HOME/bitcurator-install.log 2>&1 - # ldconfig >> $HOME/bitcurator-install.log 2>&1 - # # Now clean up - # cd /tmp - # rm thrift-0.10.0.tar.gz - # rm -rf thrift-0.10.0 - - # Install libuna from specific release - echoinfo "BitCurator environment: Building and installing libuna" - CDIR=$(pwd) - - # Newer versions break a lot of stuff. Keep 20150927 for now. - cd /tmp - tar zxf libuna-alpha-20150927.tar.gz >> $HOME/bitcurator-install.log 2>&1 - cd libuna-20150927 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - - # Now clean up - cd /tmp - rm -rf libuna-20150927 - rm libuna-alpha-20150927.tar.gz - - # Install libewf from current sources - echoinfo "BitCurator environment: Building and installing libewf" - CDIR=$(pwd) - - # Newer versions break a lot of stuff. Keep 20140608 for now. - cd /tmp - tar zxf libewf-20140608.tar.gz >> $HOME/bitcurator-install.log 2>&1 - cd libewf-20140608 - ./configure --enable-python --enable-v1-api >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - - # Now clean up - cd /tmp - rm -rf libewf-20140608 - rm libewf-20140608.tar.gz - - # Install AFFLIBv3 (may remove this in future, for now use sshock fork) - echoinfo "BitCurator environment: Building and installing AFFLIBv3" - CDIR=$(pwd) - git clone --recursive https://github.com/sshock/AFFLIBv3 /tmp/AFFLIBv3 >> $HOME/bitcurator-install.log 2>&1 - cd /tmp/AFFLIBv3 - ./bootstrap.sh >> $HOME/bitcurator-install.log 2>&1 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf AFFLIBv3 - - # Pull DFXML tools from GitHub. No installer for now, place in /usr/share - echoinfo "BitCurator environment: Adding DFXML tools and libraries" - CDIR=$(pwd) - git clone https://github.com/simsong/dfxml /usr/share/dfxml >> $HOME/bitcurator-install.log 2>&1 - # No cleanup needed - cd /tmp - - # Install POCO - #echoinfo "BitCurator environment: Building and installing POCO C++ libraries" - #echoinfo " -- Please be patient. This may take several minutes..." - #CDIR=$(pwd) - # cd /tmp - # wget -q pocoproject.org/releases/poco-1.7.8/poco-1.7.8p2.tar.gz - # tar -zxf poco-1.7.8p2.tar.gz >> $HOME/bitcurator-install.log 2>&1 - # cd poco-1.7.8p2 - # ./configure >> $HOME/bitcurator-install.log 2>&1 - # make -s >> $HOME/bitcurator-install.log 2>&1 - # make install >> $HOME/bitcurator-install.log 2>&1 - # ldconfig >> $HOME/bitcurator-install.log 2>&1 - # # Now clean up - # cd /tmp - # rm poco-1.7.8p2.tar.gz - # rm -rf poco-1.7.8p2 - - # Install The Sleuth Kit (TSK) from current sources - echoinfo "BitCurator environment: Building and installing The Sleuth Kit" - CDIR=$(pwd) - git clone --recursive https://github.com/sleuthkit/sleuthkit /usr/share/sleuthkit >> $HOME/bitcurator-install.log 2>&1 - cd /usr/share/sleuthkit - git fetch - git checkout master >> $HOME/bitcurator-install.log 2>&1 - - # Copy ficlam to use location - sudo -u $SUDO_USER mkdir /home/bcadmin/.fiwalk - sudo -u $SUDO_USER cp /usr/share/sleuthkit/tools/fiwalk/plugins/ficlam.sh /home/bcadmin/.fiwalk - sudo -u $SUDO_USER cp /usr/share/sleuthkit/tools/fiwalk/plugins/clamconfig.txt /home/bcadmin/.fiwalk - sudo -u $SUDO_USER chmod 755 /home/bcadmin/.fiwalk/ficlam.sh - - ./bootstrap >> $HOME/bitcurator-install.log 2>&1 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - - # Install PyTSK - echoinfo "BitCurator environment: Building and installing PyTSK (Python bindings for TSK)" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - cd /tmp - #wget -q https://github.com/py4n6/pytsk/releases/download/20160721/pytsk3-20160721.tar.gz - #tar -zxf pytsk3-20160721.tar.gz >> $HOME/bitcurator-install.log 2>&1 - wget -q https://github.com/py4n6/pytsk/releases/download/20170508/pytsk3-20170508.tar.gz - tar -zxf pytsk3-20170508.tar.gz >> $HOME/bitcurator-install.log 2>&1 - cd pytsk3-20170508 - python3 setup.py build >> $HOME/bitcurator-install.log 2>&1 - python3 setup.py install >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf pytsk3-20170508 - - # Install libsodium (not packaged version in 16.04LTS, needed for ZeroMQ) - echoinfo "BitCurator environment: Building and installing libsodium" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - cd /tmp - #wget -q https://download.libsodium.org/libsodium/releases/libsodium-1.0.11.tar.gz - #tar -zxf libsodium-1.0.11.tar.gz >> $HOME/bitcurator-install.log 2>&1 - wget -q https://github.com/jedisct1/libsodium/releases/download/1.0.15/libsodium-1.0.15.tar.gz - tar -zxf libsodium-1.0.15.tar.gz >> $HOME/bitcurator-install.log 1>&1 - cd libsodium-1.0.15 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm libsodium-1.0.15.tar.gz - rm -rf libsodium-1.0.15 - - # Install ZeroMQ (packaged version in 16.04LTS out of date) - #echoinfo "BitCurator environment: Building and installing ZeroMQ" - #echoinfo " -- Please be patient. This may take several minutes..." - #CDIR=$(pwd) - # cd /tmp - # wget -q https://github.com/zeromq/libzmq/releases/download/v4.2.1/zeromq-4.2.1.tar.gz - # tar -zxf zeromq-4.2.1.tar.gz >> $HOME/bitcurator-install.log 2>&1 - # cd zeromq-4.2.1 - # ./configure >> $HOME/bitcurator-install.log 2>&1 - # make >> $HOME/bitcurator-install.log 2>&1 - # make install >> $HOME/bitcurator-install.log 2>&1 - # ldconfig >> $HOME/bitcurator-install.log 2>&1 - ## Now clean up - # cd /tmp - # rm zeromq-4.2.1.tar.gz - # rm -rf zeromq-4.2.1 - - # Install hashdb (optional dependency for bulk_extractor) - echoinfo "BitCurator environment: Building and installing hashdb" - CDIR=$(pwd) - # git clone --recursive https://github.com/simsong/hashdb /tmp/hashdb >> $HOME/bitcurator-install.log 2>&1 - cd /tmp - wget -q https://github.com/NPS-DEEP/hashdb/archive/v3.0.0.tar.gz - tar -zxf v3.0.0.tar.gz - cd hashdb-3.0.0 - chmod 755 bootstrap.sh - ./bootstrap.sh >> $HOME/bitcurator-install.log 2>&1 - ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf hashdb-3.0.0 - rm v3.0.0.tar.gz - ldconfig >> $HOME/bitcurator-install.log 2>&1 - - # Install lightgrep - echoinfo "BitCurator environment: Building and installing lightgrep" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - git clone --recursive git://github.com/strozfriedberg/liblightgrep.git /tmp/liblightgrep >> $HOME/bitcurator-install.log 2>&1 - cd /tmp/liblightgrep - autoreconf -fi >> $HOME/bitcurator-install.log 2>&1 - ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu >> $HOME/bitcurator-install.log 2>&1 - make -j4 -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - cp pylightgrep/lightgrep.py /usr/local/bin - chmod 755 /usr/local/bin/lightgrep.py - cd /tmp - rm -rf liblightgrep - ldconfig >> $HOME/bitcurator-install.log 2>&1 - - # Install bulk_extractor - echoinfo "BitCurator environment: Building and installing bulk_extractor" - echoinfo " -- Please be patient. This may take several minutes..." - CDIR=$(pwd) - git clone --recursive https://github.com/simsong/bulk_extractor /tmp/bulk_extractor >> $HOME/bitcurator-install.log 2>&1 - cd /tmp/bulk_extractor - chmod 755 bootstrap.sh - ./bootstrap.sh >> $HOME/bitcurator-install.log 2>&1 - ./configure --enable-lightgrep --disable-hashdb >> $HOME/bitcurator-install.log 2>&1 - # ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu >> $HOME/bitcurator-install.log 2>&1 - make -s >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - echoinfo "BitCurator environment: Moving identify_filenames and bulk_extractor_reader to /usr/share/dfxml/python" - cp python/identify_filenames.py /usr/share/dfxml/python - chmod 755 /usr/share/dfxml/python/identify_filenames.py - cp python/bulk_extractor_reader.py /usr/share/dfxml/python - chmod 755 /usr/share/dfxml/python/bulk_extractor_reader.py - # Now clean up - cd /tmp - rm -rf bulk_extractor - - # Install HFSUtils - # Retained for reference - installed from package now - # echoinfo "BitCurator environment: Building and installing hfsutils" - # CDIR=$(pwd) - # cd /tmp - # wget -q ftp://ftp.mars.org/pub/hfs/hfsutils-3.2.6.tar.gz - # tar -zxf hfsutils-3.2.6.tar.gz >> $HOME/bitcurator-install.log 2>&1 - # cd hfsutils-3.2.6 - # ./configure >> $HOME/bitcurator-install.log 2>&1 - # make >> $HOME/bitcurator-install.log 2>&1 - # make install >> $HOME/bitcurator-install.log 2>&1 - # ldconfig >> $HOME/bitcurator-install.log 2>&1 - # # Now clean up - # cd /tmp - # rm hfsutils-3.2.6.tar.gz - # rm -rf hfsutils-3.2.6 - - # Install HFS Explorer (not packaged for 16.04LTS) - echoinfo "BitCurator environment: Building and installing HFS Explorer" - CDIR=$(pwd) - mkdir /usr/share/hfsexplorer - cd /usr/share/hfsexplorer - #wget -q https://sourceforge.net/projects/catacombae/files/HFSExplorer/0.23.1/hfsexplorer-0.23.1-bin.zip - #unzip hfsexplorer-0.23.1-bin.zip >> $HOME/bitcurator-install.log 2>&1 - #rm hfsexplorer-0.23.1-bin.zip - cp /tmp/hfsexplorer-0.23.1-snapshot_2016-09-02-bin.zip /usr/share/hfsexplorer - unzip hfsexplorer-0.23.1-snapshot_2016-09-02-bin.zip >> $HOME/bitcurator-install.log 2>&1 - rm hfsexplorer-0.23.1-snapshot_2016-09-02-bin.zip - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - - # Install disktype (not packaged for 16.04LTS, use KW fork) - echoinfo "BitCurator environment: Building and installing disktype" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/kamwoods/disktype >> $HOME/bitcurator-install.log 2>&1 - cd disktype/src - make >> $HOME/bitcurator-install.log 2>&1 - cp disktype /usr/local/bin - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf disktype - - # Install dumpfloppy (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing dumpfloppy" - CDIR=$(pwd) - cd /tmp - git clone http://offog.org/git/dumpfloppy.git >> $HOME/bitcurator-install.log 2>&1 - cd dumpfloppy - aclocal --force && autoconf -f && automake --add-missing && ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf dumpfloppy - - # Install bagit-python (not packaged for 16.04LTS, use author source) - #echoinfo "BitCurator environment: Building and installing bagit-python" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/LibraryOfCongress/bagit-python >> $HOME/bitcurator-install.log 2>&1 - cd bagit-python - pip install bagit >> $HOME/bitcurator-install.log 2>&1 - # sudo -u $SUDO_USER pip install bagit >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf bagit-python - -# # Install loc-bagger (not packaged for 16.04LTS, use author source) -# # Bagger doesn't have an installer, and is weirdly packaged. For now, -# # put it in a .bagger directory in $HOME -# echoinfo "BitCurator environment: Building and installing bagger" -# CDIR=$(pwd) -# -# cd $HOME -# sudo -u $SUDO_USER mkdir .bagger -# cd .bagger -# -# sudo -u $SUDO_USER wget -q https://github.com/LibraryOfCongress/bagger/releases/download/v2.7.6/bagger-2.7.6.zip >> $HOME/bitcurator-install.log 2>&1 -# sudo -u $SUDO_USER unzip bagger-2.7.6.zip >> $HOME/bitcurator-install.log 2>&1 -# sudo -u $SUDO_USER mv bagger-2.7.6 bagger >> $HOME/bitcurator-install.log 2>&1 -# rm bagger-2.7.6.zip -# -# # No cleanup needed at this point -# cd /tmp - - # Install Brunnhilde (depends on Siegfried, installed as a package in BC) - echoinfo "BitCurator environment: Installing Brunnhilde" - pip install brunnhilde - - # Install sdhash (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing sdhash" - CDIR=$(pwd) - cd /tmp - wget -q https://github.com/sdhash/sdhash/archive/v3.4.tar.gz - tar -zxf v3.4.tar.gz >> $HOME/bitcurator-install.log 2>&1 - cd sdhash-3.4 - # ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf sdhash-3.4 - - # Install md5deep (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing md5deep" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/jessek/hashdeep >> $HOME/bitcurator-install.log 2>&1 - cd hashdeep - ./bootstrap.sh >> $HOME/bitcurator-install.log 2>&1 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig - # Now clean up - cd /tmp - rm -rf hashdeep - - # Install pyExifToolGUI (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing pyExifToolGUI" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/hvdwolf/pyExifToolGUI >> $HOME/bitcurator-install.log 2>&1 - cd pyExifToolGUI - ./install_remove.py install >> $HOME/bitcurator-install.log 2>&1 - # pyExifToolGUI doesn't always create the .pyexiftoolgui direcotry needed to - # run. Check and create manually, just in case. - if [ ! -d $HOME/.pyexiftoolgui ]; then - mkdir -p $HOME/.pyexiftoolgui - fi - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf pyExifToolGUI - - # Install FIDO (not packaged for 16.04LTS, use openpreserve source) - echoinfo "BitCurator environment: Building and installing FIDO" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/openpreserve/fido >> $HOME/bitcurator-install.log 2>&1 - cd fido - python3 setup.py build >> $HOME/bitcurator-install.log 2>&1 - python3 setup.py install >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf fido - - # Install testdisk and photorec (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing testdisk and photorec" - CDIR=$(pwd) - cd /tmp - wget -q http://www.cgsecurity.org/testdisk-7.0.tar.bz2 >> $HOME/bitcurator-install.log 2>&1 - bunzip2 testdisk-7.0.tar.bz2 >> $HOME/bitcurator-install.log 2>&1 - tar xvf testdisk-7.0.tar >> $HOME/bitcurator-install.log 2>&1 - cd testdisk-7.0 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf testdisk-7.0 - - # Install ssdeep (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing ssdeep" - CDIR=$(pwd) - cd /tmp - wget -q https://sourceforge.net/projects/ssdeep/files/ssdeep-2.13/ssdeep-2.13.tar.gz - tar zxvf ssdeep-2.13.tar.gz >> $HOME/bitcurator-install.log 2>&1 - cd ssdeep-2.13 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf ssdeep-2.13 - rm ssdeep-2.13.tar.gz - - # Install openpyxl (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing openpyxl" - CDIR=$(pwd) - cd /tmp - hg clone https://bitbucket.org/openpyxl/openpyxl >> $HOME/bitcurator-install.log 2>&1 - cd openpyxl - python3 setup.py build >> $HOME/bitcurator-install.log 2>&1 - python3 setup.py install >> $HOME/bitcurator-install.log 2>&1 - ldconfig >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf openpyxl - -# # Install FITS (not packaged for 16.04LTS, use Harvard GitHub source) -# echoinfo "BitCurator environment: Building and installing FITS" -# CDIR=$(pwd) -# cd $HOME -# sudo -u $SUDO_USER mkdir .fits -# cd .fits -# wget -q http://projects.iq.harvard.edu/files/fits/files/fits-1.0.3.zip -# sudo -u $SUDO_USER unzip fits-1.0.3.zip >> $HOME/bitcurator-install.log 2>&1 -# sudo -u $SUDO_USER mv fits-1.0.3 fits - - # Install regripper (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing regripper" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/keydet89/RegRipper2.8 >> $HOME/bitcurator-install.log 2>&1 - mv RegRipper2.8 /usr/share/regripper - # Install needed CPAN modules - # Use Ubuntu package - #perl -MCPAN -e 'install Parse::Win32Registry' >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - - # Install NSRLlookup (not packaged for 16.04LTS, use author source) - echoinfo "BitCurator environment: Building and installing nsrllookup" - CDIR=$(pwd) - cd /tmp - git clone https://github.com/rjhansen/nsrllookup >> $HOME/bitcurator-install.log 2>&1 - cd nsrllookup - # Fix AM version - # sed -i "s/am__api_version='1.13'/am__api_version='1.14'/g" configure - aclocal >> $HOME/bitcurator-install.log 2>&1 - automake --add-missing >> $HOME/bitcurator-install.log 2>&1 - ./configure >> $HOME/bitcurator-install.log 2>&1 - make >> $HOME/bitcurator-install.log 2>&1 - make install >> $HOME/bitcurator-install.log 2>&1 - # Now clean up - cd /tmp - rm -rf nsrllookup - - # Install latest Ruby - # Disregard for now - install from package - #echoinfo "BitCurator environment: Building and installing Ruby" - #CDIR=$(pwd) - # cd /tmp - # git clone https://github.com/rbenv/rbenv.git /home/bcadmin/.rbenv >> $HOME/bitcurator-install.log 2>&1 - # - # echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> /home/bcadmin/.bashrc - # echo 'eval "$(rbenv init -)"' >> ~/.bashrc - # source /home/bcadmin/.bashrc - # git clone https://github.com/rbenv/ruby-build.git /home/bcadmin/.rbenv/plugins/ruby-build - # rbenv install 2.4.1 - # rbenv global 2.4.1 - - # Install Kaitai - echoinfo "BitCurator environment: Installing Kaitai Struct and Visualizer" - cd /tmp - echo "deb https://dl.bintray.com/kaitai-io/debian jessie main" | sudo tee /etc/apt/sources.list.d/kaitai.list - sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv 379CE192D401AB61 >> $HOME/bitcurator-install.log 2>&1 - sudo apt-get update >> $HOME/bitcurator-install.log 2>&1 - sudo apt-get install kaitai-struct-compiler >> $HOME/bitcurator-install.log 2>&1 - sudo gem install kaitai-struct-visualizer >> $HOME/bitcurator-install.log 2>&1 - -} - -configure_ubuntu() { - - echoinfo "BitCurator VM: Setting up symlinks to useful scripts" - if [ ! -L /usr/bin/vol.py ] && [ ! -e /usr/bin/vol.py ]; then - ln -s /usr/bin/vol.py /usr/bin/vol - fi - if [ ! -L /usr/bin/log2timeline ] && [ ! -e /usr/bin/log2timeline ]; then - ln -s /usr/bin/log2timeline_legacy /usr/bin/log2timeline - fi - if [ ! -L /usr/bin/kedit ] && [ ! -e /usr/bin/kedit ]; then - ln -s /usr/bin/gedit /usr/bin/kedit - fi - if [ ! -L /usr/bin/mount_ewf.py ] && [ ! -e /usr/bin/mount_ewf.py ]; then - ln -s /usr/bin/ewfmount /usr/bin/mount_ewf.py - fi - - echoinfo "BitCurator VM: Finished basic configuration" -} - -# Global: Ubuntu BitCurator VM Configuration Function -configure_ubuntu_bitcurator_vm() { - echoinfo "BitCurator VM: Setting Hostname: bitcurator" - OLD_HOSTNAME=$(hostname) - sed -i "s/$OLD_HOSTNAME/bitcurator/g" /etc/hosts - echo "bitcurator" > /etc/hostname - hostname bitcurator - - echoinfo "BitCurator VM: Fixing Samba User" - # Make sure we replace the BITCURATOR_USER template with our actual - # user so there is write permissions to samba. - sed -i "s/BITCURTOR_USER/$SUDO_USER/g" /etc/samba/smb.conf - - echoinfo "BitCurator VM: Restarting Samba" - # Restart samba services - service smbd restart >> $HOME/bitcurator-install.log 2>&1 - service nmbd restart >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator VM: Quieting i2c_piix4 boot error message:" - # Edit /etc/modprobe.d/blacklist.conf - sed -i -e "\$a# Fix piix4 error\nblacklist i2c_piix4" /etc/modprobe.d/blacklist.conf - - echoinfo "BitCurator VM: Setting noclobber for $SUDO_USER" - if ! grep -i "set -o noclobber" $HOME/.bashrc > /dev/null 2>&1 - then - echo "set -o noclobber" >> $HOME/.bashrc - fi - if ! grep -i "set -o noclobber" /root/.bashrc > /dev/null 2>&1 - then - echo "set -o noclobber" >> /root/.bashrc - fi - - echoinfo "BitCurator VM: Configuring Aliases for $SUDO_USER and root" - if ! grep -i "alias mountwin" $HOME/.bash_aliases > /dev/null 2>&1 - then - echo "alias mountwin='mount -o ro,loop,show_sys_files,streams_interface=windows'" >> $HOME/.bash_aliases - fi - - # For BitCurator VM, root is used frequently, set the alias there too. - if ! grep -i "alias mountwin" /root/.bash_aliases > /dev/null 2>&1 - then - echo "alias mountwin='mount -o ro,loop,show_sys_files,streams_interface=windows'" >> /root/.bash_aliases - fi - - echoinfo "BitCurator VM: Cleaning up broken symlinks on $SUDO_USER Desktop" - # Clean up broken symlinks - find -L /home/$SUDO_USER/Desktop -type l -delete - - echoinfo "BitCurator VM: Adding all BitCurator resources to $SUDO_USER Desktop" - - #files="$(find -L "/usr/share/bitcurator/resources/desktop-folders" -type f)" - #directories="$(find -L "/usr/share/bitcurator/resources/desktop-folders" -type d)" - - # Copy over necessary directories and files without clobbering - # This will need to be modified to accommodate changes to existing files! - sudo -u $SUDO_USER rsync -a -v --ignore-existing /usr/share/bitcurator/resources/desktop-folders/* /home/bcadmin/Desktop/ - - echoinfo "BitCurator VM: Symlinking media directory" - cd /home/$SUDO_USER/Desktop - sudo -u $SUDO_USER ln -s /media Shared\ Folders\ and\ Media - - echoinfo "BitCurator VM: Enabling desktop icons for $SUDO_USER Desktop" - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background show-desktop-icons true - - echoinfo "BitCurator VM: Setting some useful icons for $SUDO_USER Desktop" - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop home-icon-visible true - #gsettings set org.gnome.nautilus.desktop computer-icon-visible true - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop trash-icon-visible true - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop network-icon-visible true - - echoinfo "BitCurator VM: Enabling mount visibility for $SUDO_USER Desktop" - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop volumes-visible true - - echoinfo "BitCurator VM: Disabling automount and automount-open for $SUDO_USER" - sudo -u $SUDO_USER gsettings set org.gnome.desktop.media-handling automount false - sudo -u $SUDO_USER gsettings set org.gnome.desktop.media-handling automount-open false - - echoinfo "BitCurator VM: Setting Desktop background image" - #cd /usr/share/bitcurator/resources/images - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background primary-color '#3464A2' - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background secondary-color '#3464A2' - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background color-shading-type 'solid' - - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background draw-background false && sudo -u $SUDO_USER gsettings set org.gnome.desktop.background picture-uri file:///usr/share/bitcurator/resources/images/BitCuratorEnv3Logo300px.png && sudo -u $SUDO_USER gsettings set org.gnome.desktop.background draw-background true - - - echoinfo "BitCurator VM: Adding primary user to vboxsf group" - usermod -a -G vboxsf $SUDO_USER - - echoinfo "BitCurator VM: Fixing udisks rules to enable floppy access" - sed -i 's/{ID_DRIVE_FLOPPY}="1"/{ID_DRIVE_FLOPPY}="0"/' /lib/udev/rules.d/80-udisks2.rules - sed -i 's/{ID_DRIVE_FLOPPY_ZIP}="1"/{ID_DRIVE_FLOPPY_ZIP}="0"/' /lib/udev/rules.d/80-udisks2.rules - - echoinfo "BitCurator VM: Fixing swappiness and cache pressure" - echo '' >> /etc/sysctl.conf - echo '# Decrease swap usage to a workable level' >> /etc/sysctl.conf - echo 'vm.swappiness=10' >> /etc/sysctl.conf - echo '# Improve cache management' >> /etc/sysctl.conf - echo 'vm.vfs_cache_pressure=50' >> /etc/sysctl.conf - - echoinfo "BitCurator VM: Reenable AffLib for Guymager" - # NOTE! The spaces matter here! - sed -i 's/AffEnabled = false/AffEnabled = TRUE/' /etc/guymager/guymager.cfg - - # To fix: piix4_smbus - # rapl_domains no package found - - if [ ! -L /sbin/iscsiadm ]; then - ln -s /usr/bin/iscsiadm /sbin/iscsiadm - fi - - if [ ! -L /usr/local/bin/rip.pl ]; then - ln -s /usr/share/regripper/rip.pl /usr/local/bin/rip.pl - fi - - # Add extra device loop backs. - if ! grep "do mknod /dev/loop" /etc/rc.local > /dev/null 2>&1 - then - echo 'for i in `seq 8 100`; do mknod /dev/loop$i b 7 $i; done' >> /etc/rc.local - fi -} - -# Plymouth Configuration -configure_ubuntu_bitcurator_plymouth() { - echoinfo "BitCurator VM: Updating plymouth theme for 16.04" - cp -r /usr/share/bitcurator/resources/xenial/plymouth/themes/* /usr/share/plymouth/themes/ - # echoinfo "CHECK ME" - # Already installed in initial setup - apt-get install plymouth-theme-script >> $HOME/bitcurator-install.log 2>&1 - update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/bitcurator-logo/bitcurator-logo.plymouth 100 - update-alternatives --config default.plymouth - update-initramfs -u -} - -# 16.04 BitCurator VM Configuration Function -configure_ubuntu_bitcurator_vm() { - - echoinfo "BitCurator VM: Setting Hostname: bitcurator" - OLD_HOSTNAME=$(hostname) - sed -i "s/$OLD_HOSTNAME/bitcurator/g" /etc/hosts - echo "bitcurator" > /etc/hostname - hostname bitcurator - - echoinfo "BitCurator VM: Fixing Samba User" - # Make sure we replace the BITCURATOR_USER template with our actual - # user so there is write permissions to samba. - sed -i "s/BITCURTOR_USER/$SUDO_USER/g" /etc/samba/smb.conf - - echoinfo "BitCurator VM: Restarting Samba" - # Restart samba services - service smbd restart >> $HOME/bitcurator-install.log 2>&1 - service nmbd restart >> $HOME/bitcurator-install.log 2>&1 - - echoinfo "BitCurator VM: Quieting i2c_piix4 boot error message:" - # Edit /etc/modprobe.d/blacklist.conf - sed -i -e "\$a# Fix piix4 error\nblacklist i2c_piix4" /etc/modprobe.d/blacklist.conf - - echoinfo "BitCurator VM: Setting noclobber for $SUDO_USER" - if ! grep -i "set -o noclobber" $HOME/.bashrc > /dev/null 2>&1 - then - echo "set -o noclobber" >> $HOME/.bashrc - fi - if ! grep -i "set -o noclobber" /root/.bashrc > /dev/null 2>&1 - then - echo "set -o noclobber" >> /root/.bashrc - fi - - echoinfo "BitCurator VM: Configuring Aliases for $SUDO_USER and root" - if ! grep -i "alias mountwin" $HOME/.bash_aliases > /dev/null 2>&1 - then - echo "alias mountwin='mount -o ro,loop,show_sys_files,streams_interface=windows'" >> $HOME/.bash_aliases - fi - - # For BitCurator VM, root is used frequently, set the alias there too. - if ! grep -i "alias mountwin" /root/.bash_aliases > /dev/null 2>&1 - then - echo "alias mountwin='mount -o ro,loop,show_sys_files,streams_interface=windows'" >> /root/.bash_aliases - fi - - echoinfo "BitCurator VM: Cleaning up broken symlinks on $SUDO_USER Desktop" - # Clean up broken symlinks - find -L /home/$SUDO_USER/Desktop -type l -delete - - echoinfo "BitCurator VM: Adding all BitCurator resources to $SUDO_USER Desktop" - - # Copy over necessary directories and files without clobbering - # This will need to be modified to accommodate changes to existing files! - sudo -u $SUDO_USER rsync -a -v --ignore-existing /usr/share/bitcurator/resources/desktop-folders/* /home/bcadmin/Desktop/ - - echoinfo "BitCurator VM: Symlinking media directory" - cd /home/$SUDO_USER/Desktop - sudo -u $SUDO_USER ln -s /media Shared\ Folders\ and\ Media - - echoinfo "BitCurator VM: Enabling desktop icons for $SUDO_USER Desktop" - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background show-desktop-icons true - - echoinfo "BitCurator VM: Setting some useful icons for $SUDO_USER Desktop" - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop home-icon-visible true - #gsettings set org.gnome.nautilus.desktop computer-icon-visible true - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop trash-icon-visible true - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop network-icon-visible true - - echoinfo "BitCurator VM: Enabling mount visibility for $SUDO_USER Desktop" - sudo -u $SUDO_USER gsettings set org.gnome.nautilus.desktop volumes-visible true - - echoinfo "BitCurator VM: Disabling automount and automount-open for $SUDO_USER" - sudo -u $SUDO_USER gsettings set org.gnome.desktop.media-handling automount false - sudo -u $SUDO_USER gsettings set org.gnome.desktop.media-handling automount-open false - - echoinfo "BitCurator VM: Setting Desktop background image" - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background primary-color '#3464A2' - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background secondary-color '#3464A2' - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background color-shading-type 'solid' - sudo -u $SUDO_USER gsettings set org.gnome.desktop.background draw-background false && sudo -u $SUDO_USER gsettings set org.gnome.desktop.background picture-uri file:///usr/share/bitcurator/resources/images/BitCuratorEnv3Logo300px.png && sudo -u $SUDO_USER gsettings set org.gnome.desktop.background draw-background true - - echoinfo "BitCurator VM: Adding primary user to vboxsf group" - usermod -a -G vboxsf $SUDO_USER - - echoinfo "BitCurator VM: Fixing udisks rules to enable floppy access" - sed -i 's/{ID_DRIVE_FLOPPY}="1"/{ID_DRIVE_FLOPPY}="0"/' /lib/udev/rules.d/80-udisks.rules - sed -i 's/{ID_DRIVE_FLOPPY_ZIP}="1"/{ID_DRIVE_FLOPPY_ZIP}="0"/' /lib/udev/rules.d/80-udisks.rules - sed -i 's/{ID_DRIVE_FLOPPY}="1"/{ID_DRIVE_FLOPPY}="0"/' /lib/udev/rules.d/80-udisks2.rules - sed -i 's/{ID_DRIVE_FLOPPY_ZIP}="1"/{ID_DRIVE_FLOPPY_ZIP}="0"/' /lib/udev/rules.d/80-udisks2.rules - - echoinfo "BitCurator VM: Fixing swappiness and cache pressure" - echo '' >> /etc/sysctl.conf - echo '# Decrease swap usage to a workable level' >> /etc/sysctl.conf - echo 'vm.swappiness=10' >> /etc/sysctl.conf - echo '# Improve cache management' >> /etc/sysctl.conf - echo 'vm.vfs_cache_pressure=50' >> /etc/sysctl.conf - - echoinfo "BitCurator VM: Reenable AffLib for Guymager" - # NOTE! The spaces matter here! - sed -i 's/AffEnabled = false/AffEnabled = TRUE/' /etc/guymager/guymager.cfg - - if [ ! -L /sbin/iscsiadm ]; then - ln -s /usr/bin/iscsiadm /sbin/iscsiadm - fi - - if [ ! -L /usr/local/bin/rip.pl ]; then - ln -s /usr/share/regripper/rip.pl /usr/local/bin/rip.pl - fi - - # Add extra device loop backs. - if ! grep "do mknod /dev/loop" /etc/rc.local > /dev/null 2>&1 - then - echo 'for i in `seq 8 100`; do mknod /dev/loop$i b 7 $i; done' >> /etc/rc.local - fi - - echoinfo "BitCurator VM: Fixing permissions in user's home directory" - chown -R $SUDO_USER:$SUDO_USER /home/$SUDO_USER -} - -complete_message() { - echo - echo "Installation Complete!" - echo -} - -complete_message_skin() { - echo "The hostname may have changed. It's a good idea to reboot at this point." - echo - echo "sudo reboot" - echo -} - -UPGRADE_ONLY=0 -CONFIGURE_ONLY=0 -SKIN=0 -INSTALL=0 -YESTOALL=0 - -OS=$(lsb_release -si) -ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/') -VER=$(lsb_release -sr) - -if [ $OS != "Ubuntu" ]; then - echo "BitCurator is only installable on Ubuntu operating systems at this time." - exit 1 -fi - -if [ $ARCH != "64" ]; then - echo "BitCurator is only installable on a 64 bit architecture at this time." - exit 2 -fi - -if [ $VER != "17.10" ] && [ $VER != "18.04" ]; then - echo "MIDA is only usable on Ubuntu 17.10 and 18.04 at this time." - exit 3 -fi - -if [ `whoami` != "root" ]; then - echoerror "The MIDA bootstrap script must run as root." - echoinfo "Preferred Usage: sudo bootstrap.sh -s -i -y" - echo "" - exit 3 -fi - -if [ "$SUDO_USER" = "" ]; then - echo "The SUDO_USER variable doesn't seem to be set" - exit 4 -fi - -#if [ ! "$(__check_apt_lock)" ]; then -# echo "APT Package Manager appears to be locked. Close all package managers." -# exit 15 -#fi - -while getopts ":hvcsiyu" opt -do -case "${opt}" in - h ) usage; exit 0 ;; - v ) echo "$0 -- Version $__ScriptVersion"; exit 0 ;; - s ) SKIN=1 ;; - i ) INSTALL=1 ;; - c ) CONFIGURE_ONLY=1; INSTALL=0; SKIN=0; ;; - u ) UPGRADE_ONLY=1; ;; - y ) YESTOALL=1 ;; - \?) echo - echoerror "Option does not exist: $OPTARG" - usage - exit 1 - ;; -esac -done - -shift $(($OPTIND-1)) - -if [ "$#" -eq 0 ]; then - ITYPE="stable" -else - __check_unparsed_options "$*" - ITYPE=$1 - shift -fi - -# Check installation type -if [ "$(echo $ITYPE | egrep '(dev|stable)')x" = "x" ]; then - echoerror "Installation type \"$ITYPE\" is not known..." - exit 1 -fi - -echoinfo "*********************************************************" -echoinfo "The MIDO bootstrap script will now configure your system." -echoinfo "*********************************************************" -echoinfo "" - -if [ "$YESTOALL" -eq 1 ]; then - echoinfo "You supplied the -y option, this script will not exit for any reason" -fi - -echoinfo "OS: $OS" -echoinfo "Arch: $ARCH" -echoinfo "Version: $VER" - -if [ "$SKIN" -eq 1 ] && [ "$YESTOALL" -eq 0 ]; then - echo - echo "You have chosen to apply the BitCurator skin to the Ubuntu system." - echo "You did not choose to say YES to all, so we are going to exit." - echo "Your current user is: $SUDO_USER" - echo "Re-run this command with the -y option" - exit 10 -fi - -if [ "$INSTALL" -eq 1 ] && [ "$CONFIGURE_ONLY" -eq 0 ]; then - export DEBIAN_FRONTEND=noninteractive - install_ubuntu_deps $ITYPE - install_ubuntu_packages $ITYPE - install_ubuntu_pip_packages $ITYPE - configure_cpan - install_perl_modules - #install_kibana - install_bitcurator_files - install_ubuntu_respin_support $ITYPE || echoerror "Updating Distro Support Failed" - install_source_packages -fi - -# Configure for BitCurator - configure_ubuntu - -# Configure BitCurator VM (if selected) -if [ "$SKIN" -eq 1 ]; then - # No longer needed - use ${VER} only due to changes in 16.04 - #configure_ubuntu_bitcurator_vm - configure_ubuntu_bitcurator_vm - configure_ubuntu_bitcurator_plymouth -fi - -complete_message - -if [ "$SKIN" -eq 1 ]; then - complete_message_skin -fi diff --git a/bitcurator/attic/deprecated-scripts-needing-rewrite/Find Deleted Files Here b/bitcurator/attic/deprecated-scripts-needing-rewrite/Find Deleted Files Here deleted file mode 100755 index 8dbc2ab..0000000 --- a/bitcurator/attic/deprecated-scripts-needing-rewrite/Find Deleted Files Here +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash -#: Title : Show Deleted Files Here -#: Date : 2010-06-30 -#: Author : "John Lehr" -#: Version : 1.1 -#: Description : Shows deleted files in current directory using Sleutkit - -## Change log -# v1.1 -# - Made it possible to extract deleted files -# - Improved mountpoint and inode detection - -## Script variables -title="Find Deleted Here" -icon=/usr/share/icons/gnome-colors-common/16x16/actions/stock_delete.png -export_dir="$HOME/Desktop/Undeleted_Files" - -## Script Functions - -# Determine the mountpoint and device node to pass to Sleuthkit -determine_mountpoint () -{ - mpoint="$PWD" - - while ! mountpoint -q "$mpoint" - do - mpoint="$(dirname "$mpoint")" - done - - device_node="$(mount | grep "$mpoint" |sed -e 's/ on /\t/' -e 's/ /\\ /g'| cut -f1)" - export mpoint device_node -} - -# Determine the inode number for Sleuthkit -determine_inode () -{ - directory=$(pwd | sed 's.'${mpoint}'/..') - if [ "$directory" = "$mpoint" ] - then - inode= - else - inode=$(sudo ifind "$device_node" -n "$directory") - fi - echo "Device: $device_node \nMount Point: $mpoint \nDirectory: $directory \nInode: $inode" - export inode -} - -# Determine if user cancelled operation -check_for_cancel () -{ - if [ $? = 1 ] - then - zenity --info \ - --title="$title" \ - --window-icon=$icon \ - --text="Operation cancelled by user." - exit 1 - fi -} - - -## Main script - -# Obtain root permission -gksu -k -m "Enter password for administrative access." /bin/echo - -# Obtain inode of current working directory and determine device node -determine_mountpoint -determine_inode - -# Display deleted files in directory -file_list=$(sudo fls -Fdl "$device_node" $inode | sed -e 's/ /_/g') - -selection=$(zenity --list \ - --title="$title" \ - --window-icon=$icon \ - --text="Select the file(s) you want to examine (shift- or ctrl-click):" \ - --width=800 \ - --height=600 \ - --multiple \ - --separator=" " \ - --column=Inode --column=Filename --column=Modified --column=Accessed --column=Changed --column=Created --column=Size --column=UID --column=GID $file_list) -check_for_cancel - -# Save selected files to desktop -mkdir -p "$export_dir" -cd "$export_dir" - -count=0 -for entry in $selection -do - - inode=$(echo $entry | sed -e 's/.\/._\*_//g' -e 's/://g') - file_name=$(sudo ffind "$device_node" "$inode" | sed 's/\* \///') - sudo icat $device_node $inode > "$(basename "$file_name")-$inode" - count=$((count+1)) -done - -# File extraction confirmation - -zenity --info \ - --title="$title" \ - --window-icon=$icon \ - --text="$count files copied to desktop" - -exit 0 diff --git a/bitcurator/attic/deprecated-scripts-needing-rewrite/Open Browser as Root b/bitcurator/attic/deprecated-scripts-needing-rewrite/Open Browser as Root deleted file mode 100755 index d964dce..0000000 --- a/bitcurator/attic/deprecated-scripts-needing-rewrite/Open Browser as Root +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -#: Title : Open Browser as Root -#: Date : 2010-05-11 -#: Author : "John Lehr" -#: Version : 1.0 -#: Description : Opens present directory as super user, adapted for paths with spaces - -gksu nautilus "$(pwd)" - diff --git a/bitcurator/attic/deprecated-scripts-needing-rewrite/README.md b/bitcurator/attic/deprecated-scripts-needing-rewrite/README.md deleted file mode 100644 index 73d28c4..0000000 --- a/bitcurator/attic/deprecated-scripts-needing-rewrite/README.md +++ /dev/null @@ -1,17 +0,0 @@ -The following scripts have been removed from the locations shown below as they use gksu, which is deprecated in Ubuntu 18.04LTS. They may be candidates for rewrite/update or replacement, depending on the use case. They've been moved here for the time being. - - -Script; env/usr/local/bin/Safe Mount: -Relevant command: gksudo -m "$MESSAGE" "echo -n" - -Script: env/usr/local/bin/fmount-gui.sh: -Relevnat command: gksu -k -S -m "Enter root password to continue" -D "fmount-gui requires root user priveleges to mount disk images." echo - -Script: env/.local/share/nautilus/scripts/Safe Mount: -Relevant command: gksudo -m "$MESSAGE" echo >/dev/null - -Script: env/.local/share/nautilus/scripts/Find Files/Find Deleted Files Here -Relevant command: gksu -k -m "Enter password for administrative access." /bin/echo - -Script: env/.local/share/nautilus/scripts/Open Browser as Root -Relevant command: gksu nautilus "$(pwd)" \ No newline at end of file diff --git a/bitcurator/attic/deprecated-scripts-needing-rewrite/Safe Mount b/bitcurator/attic/deprecated-scripts-needing-rewrite/Safe Mount deleted file mode 100755 index 524fb29..0000000 --- a/bitcurator/attic/deprecated-scripts-needing-rewrite/Safe Mount +++ /dev/null @@ -1,157 +0,0 @@ -#!/bin/bash -#: Title : Safe Mount -#: Date : 05/12/2011 -#: Author : "John Lehr" -#: Version : 1.0.0 -#: Description : simplified mounting script for forensic analysis - -#: 05/13/2011 : v1.0.0 First release -#: 05/12/2011 : v0.1.0 gui framework established - -## To do: - - -## Variables -TITLE="Safe Mount" -IMAGE="gtk-harddisk" - -## Functions -check_mount () -{ - if [ $EXIT_CODE = 0 ]; then - mount_success - exit 0 - else - mount_fail - exit 1 - fi -} - -get_mountlocation () -{ - LOCATION=$(mount | grep ${DEVICE_NODE#/dev/}) -} - -get_mountoptions () -{ - MOUNT_OPTIONS=$(yad --form \ - --title="$TITLE" \ - --dialog-sep \ - --image=$IMAGE \ - --text="Select device to mount:" \ - --field="Device:":CB ${DEVICES//[[:space:]]/\!} \ - --field="Make Writeable (mount read/write)":CHK FALSE \ - --button="Device Information":2 \ - --button=gtk-cancel:1 \ - --button=gtk-ok:0) - BUTTON=$? -} - -mount_device () -{ - if [ ! -e /media/${DEVICE_NODE#/dev/} ]; then - sudo mkdir /media/${DEVICE_NODE#/dev/} - fi - sudo mount $OPTIONS $DEVICE_NODE /media/${DEVICE_NODE#/dev/} - EXIT_CODE=$? -} - - mount_success () -{ - get_mountlocation - yad --title="$TITLE" \ - --image=gtk-ok \ - --dialog-sep \ - --text="\nDevice successfully mounted $WRITE_TYPE at: \n$LOCATION." \ - --button=gtk-ok -} - -mount_fail () -{ - yad --title="$TITLE" \ - --image=gtk-dialog-error \ - --dialog-sep \ - --text="\nDevice failed to mount.\nTry again, or mount manually." \ - --button=gtk-ok -} - -print_deviceinfo () -{ -# here is your solution patched by me because the "<" and ">" give problems. - #DEVICEINFO=$(sudo blkid -o list | sed s/"<"// | sed s/">"// ) -# I prefer the fdsik -lu output so I can see the size of the disk and I can recognize them- -DEVICEINFO=$(fdisk -lu) - yad --title="$TITLE" \ - --image=gtk-dialog-info \ - --dialog-sep \ - --text="$DEVICEINFO" \ - --button=gtk-ok -} - -write_warning () -{ - yad --title="$TITLE" \ - --image=gtk-dialog-warning \ - --dialog-sep \ - --text="This operation will allow writing to the device\nand potentially destroy data.\n\nDo you want to continue?" \ - --button=gtk-no:1 \ - --button=gtk-yes:0 - - [[ $? = 1 ]] && exit 0 -} - -## Main application -MESSAGE="Operation requires administrative privileges. -Enter root password to continue:" -gksudo -m "$MESSAGE" "echo -n" - -DEVICES=$(sudo blkid -o device) - -get_mountoptions - -LOOP=0 -until [ $LOOP = 1 ]; do - case $BUTTON in - 0) LOOP=1 ;; - 1) exit 0 ;; - 2) print_deviceinfo; get_mountoptions ;; - esac -done - -for VAR in DEVICE_NODE WRITE_OPTION; do - eval $VAR="\${MOUNT_OPTIONS%%|*}" - MOUNT_OPTIONS="${MOUNT_OPTIONS#*|}" -done - -if [ $WRITE_OPTION = TRUE ]; then - WRITE_TYPE=read-write -else - WRITE_TYPE=read-only -fi - -get_mountlocation -#mount | grep ${DEVICE_NODE#/dev/} -if [ $? = 0 ]; then - #get_mountlocation - REMOUNT=$(yad --title="$TITLE" \ - --image=gtk-dialog-question \ - --dialog-sep \ - --text="The partition is already mounted:\n${LOCATION}\n\nDo you want to remount $WRITE_TYPE or unmount?" \ - --button=Remount:2 \ - --button=Unmount:0 \ - --button=gtk-cancel:1) - case $? in - 0) sudo umount /media/${DEVICE_NODE#/dev/}; exit 0 ;; - 1) exit 0 ;; - 2) REMOUNT="remount," ;; - esac -fi - -case $WRITE_OPTION in - FALSE) OPTIONS="-o ${REMOUNT}loop,ro,loop,noauto,user,noexec,nodev,noatime" - mount_device - check_mount ;; - TRUE) OPTIONS="-o ${REMOUNT}rw" - mount_device - check_mount ;; -esac diff --git a/bitcurator/attic/deprecated-scripts-needing-rewrite/fmount-gui.sh b/bitcurator/attic/deprecated-scripts-needing-rewrite/fmount-gui.sh deleted file mode 100755 index 2437cba..0000000 --- a/bitcurator/attic/deprecated-scripts-needing-rewrite/fmount-gui.sh +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -#:fmount-gui -# by John Lehr - slo.sleuth@gmail.com - http://linuxsleuthing.blogspot.com -# touched by Nanni Bassetti - http://www.nannibassetti.com - digitfor@gmail.com -# version 1.00 - -check_cancel() -{ - if [ $? -gt 0 ]; then - exit 1 - fi -} - -if [ "$(id -ru)" != "0" ];then - gksu -k -S -m "Enter root password to continue" -D "fmount-gui requires root user priveleges to mount disk images." echo -fi - -image_files="$(yad --file-selection \ - --multiple \ - --height 400 \ - --width 600 \ - --title "fmount: Disk Image Selection" \ - --text " If image is split, select all image segments (shift-click).\n")" -check_cancel - - - -image_files="$(echo $image_files | tr "|" " ")" - - - -sudo bash fmount.sh $image_files - -if [ $? = 0 ]; then - yad --width 600 \--title "fmount" --text "Operation succeeded!\n\nYour disk is mounted" -else - yad --width 600 --title "fmount" --text "fmount encountered errors.\n\nPlease check your settings and try again" -fi diff --git a/bitcurator/attic/env/fslint.desktop b/bitcurator/attic/env/fslint.desktop deleted file mode 100755 index 014fac5..0000000 --- a/bitcurator/attic/env/fslint.desktop +++ /dev/null @@ -1,8 +0,0 @@ -[Desktop Entry] -Name=FSlint -Comment=File System Lint -Exec=fslint-gui -Terminal=false -Type=Application -Icon=fslint_icon -Categories=System;Filesystem;GTK; diff --git a/bitcurator/attic/env/old-sudoers b/bitcurator/attic/env/old-sudoers deleted file mode 100644 index 42292ca..0000000 --- a/bitcurator/attic/env/old-sudoers +++ /dev/null @@ -1,37 +0,0 @@ -# -# This file MUST be edited with the 'visudo' command as root. -# -# Please consider adding local content in /etc/sudoers.d/ instead of -# directly modifying this file. -# -# See the man page for details on how to write a sudoers file. -# -Defaults env_reset -Defaults mail_badpass -Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" - -# Host alias specification - -# User alias specification - -# Cmnd alias specification - -# User privilege specification -root ALL=(ALL:ALL) ALL -root ALL=NOPASSWD:/usr/local/bin/mounter -root ALL=(ALL) NOPASSWD: ALL - -# Members of the admin group may gain root privileges -%admin ALL=(ALL) ALL -%admin ALL=NOPASSWD:/usr/local/bin/mounter -%admin ALL=(ALL) NOPASSWD: ALL - -# Allow members of group sudo to execute any command -#%sudo ALL=(ALL:ALL) ALL -%sudo ALL=NOPASSWD:/usr/local/bin/mounter -%sudo ALL=(ALL) NOPASSWD: ALL - -# See sudoers(5) for more information on "#include" directives: - -#includedir /etc/sudoers.d -bcadmin ALL=(ALL) NOPASSWD: ALL diff --git a/bitcurator/attic/env/pyexiftoolgui.desktop b/bitcurator/attic/env/pyexiftoolgui.desktop deleted file mode 100755 index bb8952f..0000000 --- a/bitcurator/attic/env/pyexiftoolgui.desktop +++ /dev/null @@ -1,19 +0,0 @@ -[Desktop Entry] -Encoding=UTF-8 -Version=0.16 -Name=pyExifToolGUI -GenericName=pyExifToolGUI -Comment= pyside based python gui for exiftool -Comment[nl]=pyside gebaseerde python gui - -Type=Application -Categories=Graphics;Photography; - -Exec=pyexiftoolgui %F -TryExec=pyexiftoolgui -Icon=pyexiftoolgui.png - -Terminal=false -StartupNotify=true - -MimeType=application/x-mfusion;image/jpeg;image/tiff; diff --git a/bitcurator/attic/mounter/README.md b/bitcurator/attic/mounter/README.md deleted file mode 100644 index 07a179a..0000000 --- a/bitcurator/attic/mounter/README.md +++ /dev/null @@ -1,15 +0,0 @@ -![Logo](https://github.com/BitCurator/bitcurator.github.io/blob/master/logos/BitCurator-Basic-400px.png) - -# bitcurator-distro-salt disk image mount tools - -This directory includes disk and disk image mount support tools that were available in version of BitCurator up to 1.8.16. These tools should be considered deprecated / no longer supported (see explanations below) and are retained only for legacy reference. - -## bc_policyapp - -A mount policy appindicator that can be used to set the state of the system mount policy (read only or read write) by installing or removing rbfstab (enabling or disabling custom control of fstab. - -Appindicators are no longer officially supported in Ubuntu / GNOME, and the functionality of this tool will (eventually) be shifted to a standalone desktop application. - -## bc_mounter - -A standalone mount GUI with extremely simple functionality - allowing users to select and mount devices according to the current system policy. This app is not useful without bc_policyapp. diff --git a/bitcurator/attic/mounter/bc_mounter.py b/bitcurator/attic/mounter/bc_mounter.py deleted file mode 100644 index ec1b7d0..0000000 --- a/bitcurator/attic/mounter/bc_mounter.py +++ /dev/null @@ -1,180 +0,0 @@ -#!/usr/bin/env python3 - -from gi.repository import Gtk as gtk -import subprocess -import os, sys - -#class MounterDialog(gtk.Window): -class MounterDialog(gtk.Dialog): - - def on_cell_toggled(self, widget, index): - self.liststore[index][0] = not self.liststore[index][0] - #print("Cell toggled, on or off") - - def __init__(self, dialog_message): - gtk.Dialog.__init__(self, "BitCurator Mounter", None, 0) - #(gtk.STOCK_CANCEL, gtk.ResponseType.CANCEL, - # gtk.STOCK_OK, gtk.ResponseType.OK)) - - self.set_border_width(6) - self.set_default_size(600, 400) - - label = gtk.Label(dialog_message) - - # Get info about attached block devices - blkid_cmd = "sudo blkid -o device | grep -v ram" - p_blkid = subprocess.Popen(blkid_cmd, stdout=subprocess.PIPE, stderr=None, shell=True) - #Launch the shell command: - output = p_blkid.communicate() - #print(output[0].decode("utf-8")) - - device_list = output[0].decode("utf-8").split('\n') - - # Set up the 2D array for device information - info_list = [[] for _ in range(len(device_list[0:-1]))] - - # Parse the device information for the dialog - for index, this_dev in enumerate(device_list[0:-1]): - # Testing only - #print("Got here: " + this_dev + " " + str(index)) - - # Add raw device point to info list - info_list[index].append(this_dev) - - # --- Determine the file system type - fs_cmd = "blkid -s TYPE -o value " + this_dev - p_fs = subprocess.Popen(fs_cmd, stdout=subprocess.PIPE, stderr=None, shell=True) - #Launch the shell command: - output = p_fs.communicate() - #print(output[0].decode("utf-8")) - - # Add file system type to info list for this device - info_list[index].append(output[0].decode("utf-8").rstrip('\n')) - - # --- Determine the volume label - label_cmd = "blkid -s LABEL -o value " + this_dev - p_label = subprocess.Popen(label_cmd, stdout=subprocess.PIPE, stderr=None, shell=True) - #Launch the shell command: - output = p_label.communicate() - #print(output[0].decode("utf-8")) - - # Add volume label to info list for this device - info_list[index].append(output[0].decode("utf-8").rstrip('\n')) - - # --- Determine the volume size - size_cmd = "sudo sfdisk -s " + this_dev - p_size = subprocess.Popen(size_cmd, stdout=subprocess.PIPE, stderr=None, shell=True) - #Launch the shell command: - need to fix this for KB - output = p_size.communicate() - #print(output[0].decode("utf-8")) - - # Add volume size to info list for this device - info_list[index].append(output[0].decode("utf-8").rstrip('\n')) - - # --- Determine if device is mounted - mnt_cmd = "grep ^" + this_dev + " /etc/mtab" - p_mnt = subprocess.Popen(mnt_cmd, stdout=subprocess.PIPE, stderr=None, shell=True) - #Launch the shell command: - need to fix this for KB - output = p_mnt.communicate() - mnt_status_list = (output[0].decode("utf-8")).split(' ') - - if len(mnt_status_list) == 1: - # Add negative mount point and status to info list for this device - info_list[index].append("") - info_list[index].append("(none)") - - else: - # Set mounted location (fix this to not just print) - #print("Mounted at: " + mnt_status_list[1]) - info_list[index].append(mnt_status_list[1]) - # Check for ro/rw status: - if mnt_status_list[3].startswith("ro"): - #print("READ ONLY") - # Add read-only mount status to info list for this device - info_list[index].append("READ ONLY") - if mnt_status_list[3].startswith("rw"): - #print("READ-WRITE") - # Add read-only mount status to info list for this device - info_list[index].append("WRITEABLE") - - #print(info_list) - self.liststore = gtk.ListStore(bool, str, str, str, str, str, str) - - for dev_info in info_list: - self.liststore.append([False, dev_info[0], dev_info[1], dev_info[2], dev_info[3], dev_info[4], dev_info[5]]) - - treeview = gtk.TreeView(model=self.liststore) - - cell0 = gtk.CellRendererToggle() - cell0.connect("toggled", self.on_cell_toggled) - column_check = gtk.TreeViewColumn("Select", cell0, active=0) - treeview.append_column(column_check) - - cell1 = gtk.CellRendererText() - column_dev = gtk.TreeViewColumn("Raw Device", cell1, text=1) - treeview.append_column(column_dev) - - cell2 = gtk.CellRendererText() - column_dev = gtk.TreeViewColumn("File System", cell2, text=2) - treeview.append_column(column_dev) - - cell3 = gtk.CellRendererText() - column_dev = gtk.TreeViewColumn("Label", cell3, text=3) - treeview.append_column(column_dev) - - cell4 = gtk.CellRendererText() - column_dev = gtk.TreeViewColumn("Size (Bytes)", cell4, text=4) - treeview.append_column(column_dev) - - cell5 = gtk.CellRendererText() - column_dev = gtk.TreeViewColumn("Mount Point", cell5, text=5) - treeview.append_column(column_dev) - - cell6 = gtk.CellRendererText() - column_dev = gtk.TreeViewColumn("Read/Write Status", cell6, text=6) - treeview.append_column(column_dev) - - mount_button = gtk.Button() - mount_button.set_label("Mount Selected Devices") - mount_button.connect('clicked', self.on_mount_clicked) - - # Add all items to the main box - box = self.get_content_area() - box.set_spacing(6) - box.add(label) - box.add(treeview) - box.add(mount_button) - self.show_all() - - def on_mount_clicked(self, widget): - #print("Clicked") - for dev_info in self.liststore: - # Check if this device is clicked, not mounted, and not swap - if dev_info[0] == True and dev_info[5] == "" and dev_info[2] != 'swap': - # Run udisks to mount - mount_cmd = 'udisksctl mount -b ' + dev_info[1] - p_label = subprocess.Popen(mount_cmd, stdout=subprocess.PIPE, stderr=None, shell=True) - #Launch the shell command: - output = p_label.communicate() - #print("Finished mount") - win.destroy() - #sys.exit(0) - -def main(): - #win.show_all() - ##win.connect("delete-event", gtk.main_quit) - ##gtk.main() - response = win.run() - #print(str(response)) - - #if response == gtk.ResponseType.OK: - # print("Got an OK.") - #else: - # print("Got a CANCEL.") - win.destroy() - -if __name__ == "__main__": - #win = MounterDialog() - win = MounterDialog("Select devices to mount. Devices will be mounted according to the system policy." + "\nCurrently mounted devices will not be changed.\n\n") - main() - diff --git a/bitcurator/attic/mounter/bc_policyapp.py b/bitcurator/attic/mounter/bc_policyapp.py deleted file mode 100644 index 0c23bbe..0000000 --- a/bitcurator/attic/mounter/bc_policyapp.py +++ /dev/null @@ -1,194 +0,0 @@ -#!/usr/bin/env python3 -# -# BitCurator Mounter and Read/Write Application Indicator -# Unity Application Indicator -# Verstion: 0.1 -# -# Author: Kam Woods -# https://wiki.ubuntu.com/DesktopExperienceTeam/ApplicationIndicators -# License: GPL v3 -# -# Requires Python >3.0 -# Additional information at http://wiki.bitcurator.net/ - -from gi.repository import AppIndicator3 as appindicator -from gi.repository import Gtk as gtk -import subprocess -import os, sys -import bc_mounter - -class PolicyDialog(gtk.Dialog): - - def __init__(self, dialog_message): - gtk.Dialog.__init__(self, "System Mount Policy", None, 0, - (gtk.STOCK_CANCEL, gtk.ResponseType.CANCEL, - gtk.STOCK_OK, gtk.ResponseType.OK)) - - self.set_border_width(6) - self.set_default_size(500, 150) - - # Set label with the warning (RO or RW) - label = gtk.Label(dialog_message) - - box = self.get_content_area() - box.add(label) - self.show_all() - -class MounterAppIndicator: - - def __init__(self): - self.ind = appindicator.Indicator.new("Mounter Indicator", - "indicator-messages", appindicator.IndicatorCategory.APPLICATION_STATUS) - - self.ind.set_status(appindicator.IndicatorStatus.ACTIVE) - self.ind.set_attention_icon("indicator-messages-new") - - # Set based on current policy (check if fstab entry exists) - if os.path.isfile("/etc/udev/rules.d/fstab.rules"): - self.ind.set_icon("/usr/share/pixmaps/mounter/harddisk-readonly.png") - else: - self.ind.set_icon("/usr/share/pixmaps/mounter/harddisk-writeable.png") - - # create a menu - self.menu = gtk.Menu() - - # Mounter item - #mounter = gtk.MenuItem("Open Mounter...") - #mounter.connect("activate", self.mounter_start) - #mounter.show() - #self.menu.append(mounter) - - # Read-only status - rostatus = gtk.MenuItem("Set USB mount policy READ-ONLY") - rostatus.connect("activate", self.ro_set) - rostatus.show() - self.menu.append(rostatus) - - # Read-write status - #if os.path.isfile("/etc/udev/rules.d/fstab.rules"): - rwstatus = gtk.MenuItem("Set USB mount policy WRITEABLE") - rwstatus.connect("activate", self.rw_set) - rwstatus.show() - self.menu.append(rwstatus) - - # Quit item - #image = gtk.ImageMenuItem(gtk.STOCK_QUIT) - #image = gtk.MenuItem("Exit") - #image.connect("activate", self.exit_menu) - #image.show() - #self.menu.append(image) - - self.menu.show() - self.ind.set_menu(self.menu) - -## def mounter_start(self, widget, data=None): - #Call mounter Unity app / legacy app here - #subprocess.call(["/usr/local/bin/rbfstabGUI.sh"]) - #win = MounterDialog("Select devices to mount. Devices will be mounted according to the system policy." + "\nCurrently mounted devices will not be changed.\n\n") - #win.connect("delete-event", gtk.main_quit) - #win.show_all() - #response = win.run() - #win.destroy() - -## bc_mounter.main() - -# win = bc_mounter.MounterDialog("Select devices to mount. Devices will be mounted according to the system policy." + "\nCurrently mounted devices will not be changed.\n\n") -# response = win.run() -# win.destroy() - - - def ro_set(self, widget, data=None): - #Call RO warning indicator here - if not os.path.isfile("/etc/udev/rules.d/fstab.rules"): - win = PolicyDialog("You are about to set the system-wide USB mount policy to:" \ - + "\n\n" + "READ-ONLY" + "\n\n" + \ - "Currently mounted volumes on USB devices will not be affected until remounted.") - else: - win = PolicyDialog("\nThe USB mount policy is already in the READ-ONLY state." + "\n") - #win.connect("delete-event", gtk.main_quit) - #win.show_all() - response = win.run() - win.destroy() - - if response == gtk.ResponseType.OK: - print("Got an OK") - # Call rbfstab to set policy - READ-ONLY here - if not os.path.isfile("/etc/udev/rules.d/fstab.rules"): - subprocess.call(["sudo", "rbfstab", "-i"]) - else: - print("No change required in current state") - self.ind.set_icon("/usr/share/pixmaps/mounter/harddisk-readonly.png") - else: - print("Got a CANCEL") - - def rw_set(self, widget, data=None): - #Call RW warning indicator here - if os.path.isfile("/etc/udev/rules.d/fstab.rules"): - win = PolicyDialog("CAUTION! You are about to set the system-wide USB mount policy to:" \ - + "\n\n" + "WRITEABLE" + "\n\n" + \ - "Click CANCEL to remain in the READ-ONLY state. Currently " \ - + "\n" + "mounted volumes on USB devices will not be affected until remounted.") - else: - win = PolicyDialog("\nThe USB mount policy is already in the WRITEABLE state." + "\n") - - #win.connect("delete-event", gtk.main_quit) - response = win.run() - win.destroy() - - if response == gtk.ResponseType.OK: - print("Got an OK") - # Call rbfstab to set policy - READ-WRITE here - if os.path.isfile("/etc/udev/rules.d/fstab.rules"): - subprocess.call(["sudo", "rbfstab", "-r"]) - else: - print("No change required in current state") - self.ind.set_icon("/usr/share/pixmaps/mounter/harddisk-writeable.png") - else: - print("Got a CANCEL") - - def exit_menu(self, widget, data=None): - #gtk.main_quit() - sys.exit(0) - -def main(): - gtk.main() - return 0 - -if __name__ == "__main__": - indicator = MounterAppIndicator() - main() - -# Dialog Example - Remove in future -#class DialogExample(gtk.Dialog): -# def __init__(self, parent): -# gtk.Dialog.__init__(self, "My Dialog", parent, 0, -# (gtk.STOCK_CANCEL, gtk.ResponseType.CANCEL, -# gtk.STOCK_OK, gtk.ResponseType.OK)) -# -# self.set_default_size(300, 200) -# label = gtk.Label("This is a dialog to display additional information") -# box = self.get_content_area() -# box.add(label) -# self.show_all() -# -#class DialogWindow(gtk.Window): -# def __init__(self): -# gtk.Window.__init__(self, title="Dialog Example") -# -# self.set_border_width(6) -# self.set_default_size(500, 150) -# button = gtk.Button("Open dialog") -# button.connect("clicked", self.on_button_clicked) -# -# self.add(button) -# -# def on_button_clicked(self, widget): -# dialog = DialogExample(self) -# response = dialog.run() -# -# if response == gtk.ResponseType.OK: -# print("The OK button was clicked") -# elif response == gtk.ResponseType.CANCEL: -# print("The Cancel button was clicked") -# dialog.destroy() - diff --git a/bitcurator/attic/mounter/bcautostart.sls b/bitcurator/attic/mounter/bcautostart.sls deleted file mode 100644 index d10de3d..0000000 --- a/bitcurator/attic/mounter/bcautostart.sls +++ /dev/null @@ -1,14 +0,0 @@ -{% set user = salt['pillar.get']('bitcurator_user', 'bcadmin') %} - -include: - - bitcurator.config.user - -/home/{{ user }}/.config/autostart/bcpolicyapp.py.desktop: - file.managed: - - source: salt://bitcurator/mounter/bcpolicyapp.py.desktop - - user: root - - group: root - - mode: 755 - - makedirs: True - - require: - - user: bitcurator-user-{{ user }} diff --git a/bitcurator/attic/mounter/bcmounter.sls b/bitcurator/attic/mounter/bcmounter.sls deleted file mode 100644 index ff61a75..0000000 --- a/bitcurator/attic/mounter/bcmounter.sls +++ /dev/null @@ -1,6 +0,0 @@ -/usr/local/bin/bc_mounter.py: - file.managed: - - source: salt://bitcurator/mounter/bc_mounter.py - - user: root - - group: root - - mode: 755 diff --git a/bitcurator/attic/mounter/bcpolicyapp.py.desktop b/bitcurator/attic/mounter/bcpolicyapp.py.desktop deleted file mode 100644 index b72cb5c..0000000 --- a/bitcurator/attic/mounter/bcpolicyapp.py.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Exec=/usr/local/bin/bc_policyapp.py -Hidden=false -NoDisplay=false -X-GNOME-Autostart-enabled=true -Name[en_US]=BitCurator Mount Policy -Name=BitCurator Mount Policy -Comment[en_US]=Requires sudo access for current user -Comment=Requires sudo access for current user diff --git a/bitcurator/attic/mounter/bcpolicyapp.sls b/bitcurator/attic/mounter/bcpolicyapp.sls deleted file mode 100644 index 5586991..0000000 --- a/bitcurator/attic/mounter/bcpolicyapp.sls +++ /dev/null @@ -1,6 +0,0 @@ -/usr/local/bin/bc_policyapp.py: - file.managed: - - source: salt://bitcurator/mounter/bc_policyapp.py - - user: root - - group: root - - mode: 755 \ No newline at end of file diff --git a/bitcurator/attic/mounter/init.sls b/bitcurator/attic/mounter/init.sls deleted file mode 100644 index 7282f0c..0000000 --- a/bitcurator/attic/mounter/init.sls +++ /dev/null @@ -1,12 +0,0 @@ -include: - - bitcurator.mounter.bcmounter - - bitcurator.mounter.bcpolicyapp - - bitcurator.mounter.bcautostart - -bitcurator-mounter: - test.nop: - - name: bitcurator-mounter - - require: - - sls: bitcurator.mounter.bcmounter - - sls: bitcurator.mounter.bcpolicyapp - - sls: bitcurator.mounter.bcautostart diff --git a/bitcurator/attic/packages/casper.sls b/bitcurator/attic/packages/casper.sls deleted file mode 100644 index f111216..0000000 --- a/bitcurator/attic/packages/casper.sls +++ /dev/null @@ -1,2 +0,0 @@ -casper: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/cifs-utils.sls b/bitcurator/attic/packages/cifs-utils.sls deleted file mode 100644 index a6b3d35..0000000 --- a/bitcurator/attic/packages/cifs-utils.sls +++ /dev/null @@ -1,2 +0,0 @@ -cifs-utils: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/dkms.sls b/bitcurator/attic/packages/dkms.sls deleted file mode 100644 index 85ae30f..0000000 --- a/bitcurator/attic/packages/dkms.sls +++ /dev/null @@ -1,2 +0,0 @@ -dkms: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/easytag.sls b/bitcurator/attic/packages/easytag.sls deleted file mode 100644 index fa73c52..0000000 --- a/bitcurator/attic/packages/easytag.sls +++ /dev/null @@ -1,2 +0,0 @@ -easytag: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/fslint.sls b/bitcurator/attic/packages/fslint.sls deleted file mode 100644 index e224d4e..0000000 --- a/bitcurator/attic/packages/fslint.sls +++ /dev/null @@ -1,2 +0,0 @@ -fslint: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/git-svn.sls b/bitcurator/attic/packages/git-svn.sls deleted file mode 100644 index fec1b4c..0000000 --- a/bitcurator/attic/packages/git-svn.sls +++ /dev/null @@ -1,2 +0,0 @@ -git-svn: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/id3tool.sls b/bitcurator/attic/packages/id3tool.sls deleted file mode 100644 index d92d4c2..0000000 --- a/bitcurator/attic/packages/id3tool.sls +++ /dev/null @@ -1,2 +0,0 @@ -id3tool: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/lame.sls b/bitcurator/attic/packages/lame.sls deleted file mode 100644 index 997c4de..0000000 --- a/bitcurator/attic/packages/lame.sls +++ /dev/null @@ -1,2 +0,0 @@ -lame: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/libdebian-installer4.sls b/bitcurator/attic/packages/libdebian-installer4.sls deleted file mode 100644 index 5370b60..0000000 --- a/bitcurator/attic/packages/libdebian-installer4.sls +++ /dev/null @@ -1,2 +0,0 @@ -libdebian-installer4: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/mercurial-common.sls b/bitcurator/attic/packages/mercurial-common.sls deleted file mode 100644 index eecec04..0000000 --- a/bitcurator/attic/packages/mercurial-common.sls +++ /dev/null @@ -1,2 +0,0 @@ -mercurial-common: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/mpg321.sls b/bitcurator/attic/packages/mpg321.sls deleted file mode 100644 index 15ba706..0000000 --- a/bitcurator/attic/packages/mpg321.sls +++ /dev/null @@ -1,2 +0,0 @@ -mpg321: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/python-appindicator.sls b/bitcurator/attic/packages/python-appindicator.sls deleted file mode 100644 index 6178c2c..0000000 --- a/bitcurator/attic/packages/python-appindicator.sls +++ /dev/null @@ -1,2 +0,0 @@ -python-appindicator: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/python-dev.sls b/bitcurator/attic/packages/python-dev.sls deleted file mode 100644 index a124bb9..0000000 --- a/bitcurator/attic/packages/python-dev.sls +++ /dev/null @@ -1,2 +0,0 @@ -python-dev: - pkg.installed diff --git a/bitcurator/attic/packages/python-magic.sls b/bitcurator/attic/packages/python-magic.sls deleted file mode 100644 index feb188b..0000000 --- a/bitcurator/attic/packages/python-magic.sls +++ /dev/null @@ -1,2 +0,0 @@ -python-magic: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/python-pip.sls b/bitcurator/attic/packages/python-pip.sls deleted file mode 100644 index 093b219..0000000 --- a/bitcurator/attic/packages/python-pip.sls +++ /dev/null @@ -1,6 +0,0 @@ -include: - - .python - -python-pip: - pkg.installed: - - reload_modules: true \ No newline at end of file diff --git a/bitcurator/attic/packages/python-pyicu.sls b/bitcurator/attic/packages/python-pyicu.sls deleted file mode 100644 index e1b5dc6..0000000 --- a/bitcurator/attic/packages/python-pyicu.sls +++ /dev/null @@ -1,2 +0,0 @@ -python-pyicu: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/python-pyside.sls b/bitcurator/attic/packages/python-pyside.sls deleted file mode 100644 index 5193ffb..0000000 --- a/bitcurator/attic/packages/python-pyside.sls +++ /dev/null @@ -1,2 +0,0 @@ -python-pyside: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/python-sphinx.sls b/bitcurator/attic/packages/python-sphinx.sls deleted file mode 100644 index f9e0ffa..0000000 --- a/bitcurator/attic/packages/python-sphinx.sls +++ /dev/null @@ -1,2 +0,0 @@ -python-sphinx: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/python-tk.sls b/bitcurator/attic/packages/python-tk.sls deleted file mode 100644 index 67406ef..0000000 --- a/bitcurator/attic/packages/python-tk.sls +++ /dev/null @@ -1,2 +0,0 @@ -python-tk: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/python-virtualenv.sls b/bitcurator/attic/packages/python-virtualenv.sls deleted file mode 100644 index c2f6de0..0000000 --- a/bitcurator/attic/packages/python-virtualenv.sls +++ /dev/null @@ -1,2 +0,0 @@ -python-virtualenv: - pkg.installed diff --git a/bitcurator/attic/packages/python-vte.sls b/bitcurator/attic/packages/python-vte.sls deleted file mode 100644 index 38f8039..0000000 --- a/bitcurator/attic/packages/python-vte.sls +++ /dev/null @@ -1,2 +0,0 @@ -python-vte: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/python.sls b/bitcurator/attic/packages/python.sls deleted file mode 100644 index dbd339d..0000000 --- a/bitcurator/attic/packages/python.sls +++ /dev/null @@ -1,2 +0,0 @@ -python: - pkg.installed diff --git a/bitcurator/attic/packages/python2-dot-7-dev.sls b/bitcurator/attic/packages/python2-dot-7-dev.sls deleted file mode 100644 index ec42597..0000000 --- a/bitcurator/attic/packages/python2-dot-7-dev.sls +++ /dev/null @@ -1,2 +0,0 @@ -python2.7-dev: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/samba.sls b/bitcurator/attic/packages/samba.sls deleted file mode 100644 index 6bdbffd..0000000 --- a/bitcurator/attic/packages/samba.sls +++ /dev/null @@ -1,2 +0,0 @@ -samba: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/subversion.sls b/bitcurator/attic/packages/subversion.sls deleted file mode 100644 index 8078071..0000000 --- a/bitcurator/attic/packages/subversion.sls +++ /dev/null @@ -1,2 +0,0 @@ -subversion: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/synaptic.sls b/bitcurator/attic/packages/synaptic.sls deleted file mode 100644 index 08a5b76..0000000 --- a/bitcurator/attic/packages/synaptic.sls +++ /dev/null @@ -1,2 +0,0 @@ -synaptic: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/system-config-samba.sls b/bitcurator/attic/packages/system-config-samba.sls deleted file mode 100644 index cd77d65..0000000 --- a/bitcurator/attic/packages/system-config-samba.sls +++ /dev/null @@ -1,2 +0,0 @@ -system-config-samba: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/ubiquity-frontend-debconf.sls b/bitcurator/attic/packages/ubiquity-frontend-debconf.sls deleted file mode 100644 index 9930999..0000000 --- a/bitcurator/attic/packages/ubiquity-frontend-debconf.sls +++ /dev/null @@ -1,2 +0,0 @@ -ubiquity-frontend-debconf: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/packages/winbind.sls b/bitcurator/attic/packages/winbind.sls deleted file mode 100644 index 287f15f..0000000 --- a/bitcurator/attic/packages/winbind.sls +++ /dev/null @@ -1,2 +0,0 @@ -winbind: - pkg.installed \ No newline at end of file diff --git a/bitcurator/attic/repos/guymager-repo.sls b/bitcurator/attic/repos/guymager-repo.sls deleted file mode 100644 index f3325b7..0000000 --- a/bitcurator/attic/repos/guymager-repo.sls +++ /dev/null @@ -1,8 +0,0 @@ -guymager-repo: - cmd.run: - - name: | - wget -nH -rP /etc/apt/sources.list.d/ http://deb.pinguin.lu/pinguin.lu.list - wget -q http://deb.pinguin.lu/debsign_public.key -O- | sudo apt-key add - - - cwd: /tmp - - shell: /bin/bash - - timeout: 12000 diff --git a/bitcurator/attic/tools/openpyxl.sls b/bitcurator/attic/tools/openpyxl.sls deleted file mode 100644 index 7859766..0000000 --- a/bitcurator/attic/tools/openpyxl.sls +++ /dev/null @@ -1,14 +0,0 @@ -openpyxl: - cmd.run: - - name: | - cd /tmp - hg clone https://bitbucket.org/openpyxl/openpyxl - cd openpyxl - python3 setup.py build - python3 setup.py install - ldconfig - cd /tmp - rm -rf openpyxl - - cwd: /tmp - - shell: /bin/bash - - timeout: 12000 diff --git a/bitcurator/attic/tools/pyexiftoolgui.sls b/bitcurator/attic/tools/pyexiftoolgui.sls deleted file mode 100644 index c073b48..0000000 --- a/bitcurator/attic/tools/pyexiftoolgui.sls +++ /dev/null @@ -1,23 +0,0 @@ -{% set user = salt['pillar.get']('bitcurator_user') %} - -pyexiftoolgui: - cmd.run: - - name: | - cd /tmp - wget -q https://github.com/hvdwolf/pyExifToolGUI/archive/0.5.tar.gz - tar zxf 0.5.tar.gz - cd pyExifToolGUI-0.5 - ./install_remove.py install - if [ ! -d $HOME/.pyexiftoolgui ]; then - mkdir -p $HOME/.pyexiftoolgui - fi - ldconfig - cd /tmp - rm -rf pyExifToolGUI-0.5 - rm 0.5.tar.gz - chown {{ user }} /home/{{ user }}/.pyexiftoolgui - chgrp {{ user }} /home/{{ user }}/.pyexiftoolgui - - cwd: /tmp - - shell: /bin/bash - - timeout: 12000 - - unless: test -x /usr/bin/pyexiftoolgui diff --git a/bitcurator/attic/tools/pytsk.sls b/bitcurator/attic/tools/pytsk.sls deleted file mode 100644 index af46068..0000000 --- a/bitcurator/attic/tools/pytsk.sls +++ /dev/null @@ -1,16 +0,0 @@ -pytsk: - cmd.run: - - name: | - cd /tmp - wget -q https://github.com/py4n6/pytsk/releases/download/20160721/pytsk3-20160721.tar.gz - echo "Got pytsk3 with wget" >> /var/log/bitcurator-install.log 2>&1 - tar -zxf pytsk3-20160721.tar.gz >> /var/log/bitcurator-install.log 2>&1 - cd pytsk3-20160721 - python3 setup.py build >> /var/log/bitcurator-install.log 2>&1 - python3 setup.py install >> /var/log/bitcurator-install.log 2>&1 - cd /tmp - rm -rf pytsk3-20160721 - rm pytsk3-20160721.tar.gz - - cwd: /tmp - - shell: /bin/bash - - timeout: 12000 diff --git a/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-BaseLogo-3284x536px.png b/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-BaseLogo-3284x536px.png new file mode 100755 index 0000000..a9f45a9 Binary files /dev/null and b/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-BaseLogo-3284x536px.png differ diff --git a/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-BaseLogo-3284x536px.xcf b/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-BaseLogo-3284x536px.xcf new file mode 100755 index 0000000..1845fe1 Binary files /dev/null and b/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-BaseLogo-3284x536px.xcf differ diff --git a/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-Wallpaper.png b/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-Wallpaper.png new file mode 100755 index 0000000..96e9561 Binary files /dev/null and b/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-Wallpaper.png differ diff --git a/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-Wallpaper.xcf b/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-Wallpaper.xcf new file mode 100755 index 0000000..f8d5289 Binary files /dev/null and b/bitcurator/env/usr/share/bitcurator/resources/images/BitCurator-Env4-Wallpaper.xcf differ diff --git a/bitcurator/theme/bitcurator-theme.sh b/bitcurator/theme/bitcurator-theme.sh index 0748e23..0066445 100755 --- a/bitcurator/theme/bitcurator-theme.sh +++ b/bitcurator/theme/bitcurator-theme.sh @@ -1,28 +1,28 @@ #!/bin/bash -gsettings set org.gnome.desktop.background primary-color '#3464A2' -gsettings set org.gnome.desktop.background secondary-color '#3464A2' -gsettings set org.gnome.desktop.background color-shading-type 'solid' if [[ $(lsb_release -c -s) == focal ]]; then + gsettings set org.gnome.desktop.background primary-color '#3464A2' + gsettings set org.gnome.desktop.background secondary-color '#3464A2' + gsettings set org.gnome.desktop.background color-shading-type 'solid' gsettings set org.gnome.desktop.background draw-background false - gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/bitcurator/resources/images/BitCuratorEnv3Logo300px.png' + gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/bitcurator/resources/images/BitCurator-Env4-Wallpaper.png' gsettings set org.gnome.desktop.background draw-background true gsettings set org.gnome.shell.extensions.desktop-icons show-trash true gsettings set org.gnome.shell.extensions.desktop-icons show-home true gsettings set org.gnome.shell favorite-apps "['firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop']" elif [[ $(lsb_release -c -s) == jammy ]]; then - gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/bitcurator/resources/images/BitCuratorEnv3Logo300px.png' - gsettings set org.gnome.desktop.background picture-uri-dark 'file:///usr/share/bitcurator/resources/images/BitCuratorEnv3Logo300px.png' + gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/bitcurator/resources/images/BitCurator-Env4-Wallpaper.png' + gsettings set org.gnome.desktop.background picture-uri-dark 'file:///usr/share/bitcurator/resources/images/BitCurator-Env4-Wallpaper.png' gsettings set org.gnome.shell favorite-apps "['firefox_firefox.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop']" - gsettings set org.gnome.desktop.background picture-options 'wallpaper' fi + gsettings set org.gnome.desktop.background picture-options 'zoom' gsettings set org.gnome.desktop.background show-desktop-icons true gsettings set org.gnome.desktop.media-handling automount false gsettings set org.gnome.desktop.media-handling automount-open false -gsettings set org.gnome.shell enabled-extensions "['ubuntu-appindicators@ubuntu.com', 'ubuntu-dock@ubuntu.com', 'desktop-icons@csoriano', 'apps-menu@gnome-shell-extensions.gcampax.github.com', 'user-theme@gnome-shell-extensions.gcampax.github.com']" +gsettings set org.gnome.shell enabled-extensions "['ubuntu-appindicators@ubuntu.com', 'ubuntu-dock@ubuntu.com', 'desktop-icons@csoriano', 'apps-menu@gnome-shell-extensions.gcampax.github.com', 'user-theme@gnome-shell-extensions.gcampax.github.com']" gsettings set org.gnome.shell.extensions.dash-to-dock show-mounts true trust=true -dconf load /org/gnome/terminal/legacy/profiles:/ < /usr/share/bitcurator/resources/terminal-profile.txt +dconf load /org/gnome/terminal/legacy/profiles:/ < /usr/share/bitcurator/resources/terminal-profile-dark.txt rm /home/$(whoami)/.config/autostart/bitcurator-theme.desktop diff --git a/bitcurator/theme/terminal-profile-dark.txt b/bitcurator/theme/terminal-profile-dark.txt new file mode 100755 index 0000000..a2586ab --- /dev/null +++ b/bitcurator/theme/terminal-profile-dark.txt @@ -0,0 +1,13 @@ +[:b1dcc9dd-5262-4d8d-a863-c897e6d979b9] +background-color='rgb(14,27,38)' +bold-color-same-as-fg=true +cursor-colors-set=false +font='Noto Mono Bold 12' +foreground-color='rgb(192,200,201)' +highlight-colors-set=false +use-system-font=false +use-theme-colors=false +use-theme-transparency=true +use-transparent-background=false +bold-is-bright=true +visible-name='bitcurator' diff --git a/bitcurator/theme/terminal.sls b/bitcurator/theme/terminal.sls index 98f7969..7fc1c82 100755 --- a/bitcurator/theme/terminal.sls +++ b/bitcurator/theme/terminal.sls @@ -12,8 +12,8 @@ include: bitcurator-theme-terminal-profile-file: file.managed: - - name: /usr/share/bitcurator/resources/terminal-profile.txt - - source: salt://bitcurator/theme/terminal-profile.txt + - name: /usr/share/bitcurator/resources/terminal-profile-dark.txt + - source: salt://bitcurator/theme/terminal-profile-dark.txt - user: root - group: root - mode: 0644 @@ -32,7 +32,7 @@ bitcurator-dbus-address: bitcurator-theme-terminal-profile-install: cmd.run: - - name: dconf load /org/gnome/terminal/legacy/profiles:/ < /usr/share/bitcurator/resources/terminal-profile.txt + - name: dconf load /org/gnome/terminal/legacy/profiles:/ < /usr/share/bitcurator/resources/terminal-profile-dark.txt - runas: {{ user }} - cwd: {{ home }} - shell: /bin/bash