wok rev 22561
updated boxbackup-client and boxbackup-server (0.11.1 -> 0.12)
author | Hans-G?nter Theisgen |
---|---|
date | Sun Jan 05 11:14:45 2020 +0100 (2020-01-05) |
parents | 21797bd5599c |
children | fca69926510b |
files | boxbackup-client/receipt boxbackup-server/receipt |
line diff
1.1 --- a/boxbackup-client/receipt Sat Jan 04 17:51:29 2020 +0100 1.2 +++ b/boxbackup-client/receipt Sun Jan 05 11:14:45 2020 +0100 1.3 @@ -1,17 +1,17 @@ 1.4 # SliTaz package receipt. 1.5 1.6 PACKAGE="boxbackup-client" 1.7 -VERSION="0.11.1" 1.8 +VERSION="0.12" 1.9 CATEGORY="network" 1.10 -SHORT_DESC="Client for the BoxBackup on-line backup system" 1.11 +TAGS="backup automatic client" 1.12 +SHORT_DESC="Client for the BoxBackup on-line backup system." 1.13 MAINTAINER="domcox@slitaz.org" 1.14 LICENSE="GPL2" 1.15 +WEB_SITE="https://www.boxbackup.org/" 1.16 + 1.17 SOURCE="boxbackup" 1.18 +DEPENDS="db gcc-lib-base libedit libssl perl zlib" 1.19 WANTED="boxbackup-server" 1.20 -WEB_SITE="https://www.boxbackup.org/" 1.21 -TAGS="backup automatic client" 1.22 - 1.23 -DEPENDS="db libedit libssl perl zlib gcc-lib-base" 1.24 1.25 # Configuration variables 1.26 CONF_DIR="/etc/boxbackup" 1.27 @@ -22,10 +22,12 @@ 1.28 genpkg_rules() 1.29 { 1.30 mkdir -p $fs/usr/bin 1.31 - cp -a $install/boxbackup-${VERSION}-backup-client-linux-gnu/bb* $fs/usr/bin 1.32 - rm -f $fs/usr/bin/*.* 1.33 mkdir -p $fs/etc/init.d 1.34 - cp -a $stuff/bbackupd $fs/etc/init.d 1.35 + 1.36 + cp -a $install/boxbackup-git_-backup-client-i486-slitaz-linux-gnu/bb* \ 1.37 + $fs/usr/bin 1.38 + rm -f $fs/usr/bin/*.* 1.39 + cp -a $stuff/bbackupd $fs/etc/init.d 1.40 } 1.41 1.42 # Pre and post install commands for Tazpkg 1.43 @@ -33,7 +35,8 @@ 1.44 pre_install() 1.45 { 1.46 # Stop daemon 1.47 - if [ -z "$1" -a -e /var/run/bbackupd.pid ]; then 1.48 + if [ -z "$1" -a -e /var/run/bbackupd.pid ] 1.49 + then 1.50 /etc/init.d/bbackupd stop 1.51 RUN_DMON=1 1.52 fi 1.53 @@ -41,16 +44,23 @@ 1.54 1.55 post_install() 1.56 { 1.57 - # Creating conf dir 1.58 - if [ ! -e "$1/$CONF_DIR" ]; then 1.59 + # Creating configuration directory 1.60 + if [ ! -e "$1/$CONF_DIR" ] 1.61 + then 1.62 mkdir -p "$1/$CONF_DIR" && chmod 755 "$1/$CONF_DIR" 1.63 fi 1.64 - if [ ! -e "$1/$DATA_DIR" ]; then 1.65 + 1.66 + # Create data directory 1.67 + if [ ! -e "$1/$DATA_DIR" ] 1.68 + then 1.69 mkdir -p "$1/$DATA_DIR" && chmod 700 "$1/$DATA_DIR" 1.70 fi 1.71 - if [ -z "$1" ]; then 1.72 + 1.73 + if [ -z "$1" ] 1.74 + then 1.75 # Start daemon (if stopped by install) 1.76 - if [ $RUN_DMON -eq 1 ]; then 1.77 + if [ $RUN_DMON -eq 1 ] 1.78 + then 1.79 /etc/init.d/bbackupd start 1.80 fi 1.81 fi 1.82 @@ -62,8 +72,10 @@ 1.83 pre_remove() 1.84 { 1.85 # Stop daemon 1.86 - if [ -z "$1" ]; then 1.87 - if [ -e /var/run/bbackupd.pid ]; then 1.88 + if [ -z "$1" ] 1.89 + then 1.90 + if [ -e /var/run/bbackupd.pid ] 1.91 + then 1.92 /etc/init.d/bbackupd stop 1.93 fi 1.94 fi 1.95 @@ -74,16 +86,18 @@ 1.96 # Delete DATA directory 1.97 rm -rf "$1/$DATA_DIR" 1.98 1.99 - # Delete Client config files 1.100 + # Delete Client configuration file 1.101 rm -rf "$1/$CONF_DIR"/bbackupd* 1.102 1.103 # Delete CONF dir (if empty) 1.104 - if [ $(ls -lA "$1/$CONF_DIR" | wc -l) -eq 0 ]; then 1.105 + if [ $(ls -lA "$1/$CONF_DIR" | wc -l) -eq 0 ] 1.106 + then 1.107 echo 1.108 action "Removing $CONF_DIR..." 1.109 rm -rf "$1/$CONF_DIR" 1.110 status 1.111 fi 1.112 + 1.113 # Delete PID, sock files 1.114 rm -f "$1/var/run/bbackupd".* 1.115 }
2.1 --- a/boxbackup-server/receipt Sat Jan 04 17:51:29 2020 +0100 2.2 +++ b/boxbackup-server/receipt Sun Jan 05 11:14:45 2020 +0100 2.3 @@ -1,22 +1,20 @@ 2.4 # SliTaz package receipt. 2.5 2.6 PACKAGE="boxbackup-server" 2.7 -VERSION="0.11.1" 2.8 +VERSION="0.12" 2.9 CATEGORY="network" 2.10 -SHORT_DESC="Server for the BoxBackup on-line backup system" 2.11 +TAGS="backup automatic server network" 2.12 +SHORT_DESC="Server for the BoxBackup on-line backup system." 2.13 MAINTAINER="domcox@slitaz.org" 2.14 LICENSE="GPL2" 2.15 WEB_SITE="https://www.boxbackup.org/" 2.16 + 2.17 SOURCE="boxbackup" 2.18 -TARBALL="$SOURCE-$VERSION.tgz" 2.19 -# stable 2.20 -# WGET_URL="$SF_MIRROR/$SOURCE/$TARBALL" 2.21 -#WGET_URL="http://www.boxbackup.org/svn/box/packages/$TARBALL" 2.22 -WGET_URL="http://www.boxbackup.org/export/3106/box/packages/$TARBALL" 2.23 -TAGS="backup automatic server network" 2.24 +TARBALL="$SOURCE-$VERSION.tar.gz" 2.25 +WGET_URL="https://github.com/$SOURCE/$SOURCE/archive/BoxBackup-$VERSION.master.190831.9e0e93e.tar.gz" 2.26 2.27 -DEPENDS="db libedit openssl perl zlib gcc-lib-base" 2.28 -BUILD_DEPENDS="db-dev libedit-dev openssl-dev zlib-dev" 2.29 +DEPENDS="db gcc-lib-base libedit openssl perl zlib" 2.30 +BUILD_DEPENDS="autoconf automake db-dev libedit-dev openssl-dev zlib-dev" 2.31 2.32 # Configuration variables 2.33 HOSTNAME=$(ifconfig | awk -F ":" '/cast/ {print substr($2,0, index($2," ")-1) }') 2.34 @@ -28,14 +26,15 @@ 2.35 # Rules to configure and make the package. 2.36 compile_rules() 2.37 { 2.38 + ./bootstrap && 2.39 ./configure --prefix=/usr $CONFIGURE_ARGS && 2.40 - make -j1 && { 2.41 + make -j1 && 2.42 + { 2.43 mkdir -p $DESTDIR 2.44 - cp -a parcels/boxbackup-${VERSION}-backup-client-linux-gnu $DESTDIR 2.45 - cp -a parcels/boxbackup-${VERSION}-backup-server-linux-gnu $DESTDIR 2.46 - rm -f $DESTDIR/boxbackup-${VERSION}-backup-server-linux-gnu/*.* 2.47 + cp -a parcels/boxbackup-git_-backup-client-i486-slitaz-linux-gnu $DESTDIR 2.48 + cp -a parcels/boxbackup-git_-backup-server-i486-slitaz-linux-gnu $DESTDIR 2.49 + rm -f $DESTDIR/boxbackup-git_-backup-server-i486-slitaz-linux-gnu/*.* 2.50 } 2.51 - 2.52 cook_pick_manpages $src/docs/man/* 2.53 } 2.54 2.55 @@ -43,9 +42,12 @@ 2.56 genpkg_rules() 2.57 { 2.58 mkdir -p $fs/usr/bin 2.59 - cp -a $install/boxbackup-${VERSION}-backup-server-linux-gnu/bb* $fs/usr/bin 2.60 - cp -a $install/boxbackup-${VERSION}-backup-server-linux-gnu/ra* $fs/usr/bin 2.61 mkdir -p $fs/etc/init.d 2.62 + 2.63 + cp -a $install/boxbackup-git_-backup-server-i486-slitaz-linux-gnu/bb* \ 2.64 + $fs/usr/bin 2.65 + cp -a $install/boxbackup-git_-backup-server-i486-slitaz-linux-gnu/ra* \ 2.66 + $fs/usr/bin 2.67 cp -a $stuff/bbstored $fs/etc/init.d 2.68 } 2.69 2.70 @@ -55,20 +57,23 @@ 2.71 pre_install() 2.72 { 2.73 # Stop daemon 2.74 - if [ -z "$1" -a -e /var/run/bbstored.pid ]; then 2.75 + if [ -z "$1" -a -e /var/run/bbstored.pid ] 2.76 + then 2.77 /etc/init.d/bbstored stop 2.78 fi 2.79 } 2.80 2.81 post_install() 2.82 { 2.83 - # default conf dir is now /etc/boxbackup 2.84 - if [ ! -e "$1/etc/box/bbstored.conf" ]; then 2.85 + # default configuration directory is now /etc/boxbackup 2.86 + if [ ! -e "$1/etc/box/bbstored.conf" ] 2.87 + then 2.88 mv "$1/etc/box" "$1$CONF_DIR" 2.89 fi 2.90 2.91 # adduser BBUSER if needed 2.92 - if ! grep -q $BBUSER "$1/etc/passwd"; then 2.93 + if ! grep -q $BBUSER "$1/etc/passwd" 2.94 + then 2.95 echo 2.96 action "Adding user '$BBUSER'..." 2.97 echo $BBUSER':x:505:505:BoxBackup Network Backup:/dev/null:/bin/false' >> "$1/etc/passwd" 2.98 @@ -78,15 +83,17 @@ 2.99 status 2.100 fi 2.101 2.102 - # Create config is needed 2.103 - if [ ! -e "$1$CONF_DIR" ]; then 2.104 + # Create configuration as needed 2.105 + if [ ! -e "$1$CONF_DIR" ] 2.106 + then 2.107 mkdir -p "$1$CONF_DIR" && 2.108 chroot "$1/" chown $BBUSER $CONF_DIR && 2.109 chmod 700 "$1$CONF_DIR" 2.110 fi 2.111 2.112 - if [ ! -e "$1$DATA_DIR/backup" ]; then 2.113 - # Creating backup dir 2.114 + if [ ! -e "$1$DATA_DIR/backup" ] 2.115 + then 2.116 + # Creating backup directory 2.117 action "Creating backup directory..." 2.118 mkdir -p "$1$DATA_DIR/backup" && 2.119 chroot "$1/" chown -R $BBUSER $DATA_DIR && 2.120 @@ -94,7 +101,8 @@ 2.121 status 2.122 fi 2.123 2.124 - if [ ! -e "$1$CONF_DIR/raidfile.conf" ]; then 2.125 + if [ ! -e "$1$CONF_DIR/raidfile.conf" ] 2.126 + then 2.127 # RAID Setup 2.128 action "Disabling deprecated userland RAID..." 2.129 chroot "$1/" /usr/bin/raidfile-config $CONF_DIR 2048 $DATA_DIR 2>1 > /dev/null 2.130 @@ -103,13 +111,16 @@ 2.131 chmod 700 -R "$1$CONF_DIR/raidfile.conf" 2.132 fi 2.133 2.134 - if [ ! -e "$1$CONF_DIR/bbstored.conf" ]; then 2.135 + if [ ! -e "$1$CONF_DIR/bbstored.conf" ] 2.136 + then 2.137 # Setting hostname 2.138 action "Setting hostname... " 2.139 - if [ $(chroot "$1/" hostname -f 2>1 > /dev/null;echo $?) -eq 0 ]; then 2.140 + if [ $(chroot "$1/" hostname -f 2>1 > /dev/null;echo $?) -eq 0 ] 2.141 + then 2.142 HOSTNAME=$(chroot "$1/" hostname -f) 2.143 fi 2.144 - if [ -z $HOSTNAME ]; then 2.145 + if [ -z $HOSTNAME ] 2.146 + then 2.147 HOSTNAME="127.0.0.1" 2.148 fi 2.149 export $HOSTNAME 2.150 @@ -127,20 +138,22 @@ 2.151 2.152 # Sign the server certificate 2.153 action "Sign the server certificate..." 2.154 - chroot "$1/" openssl x509 -req -sha1 -extensions usr_crt \ 2.155 - -in $CONF_DIR/$BBUSER/${HOSTNAME}-csr.pem \ 2.156 - -CA $CA_DIR/roots/serverCA.pem \ 2.157 - -CAkey $CA_DIR/keys/serverRootKey.pem \ 2.158 - -out $CA_DIR/servers/${HOSTNAME}-cert.pem \ 2.159 + chroot "$1/" openssl x509 -req -sha1 -extensions usr_crt \ 2.160 + -in $CONF_DIR/$BBUSER/${HOSTNAME}-csr.pem \ 2.161 + -CA $CA_DIR/roots/serverCA.pem \ 2.162 + -CAkey $CA_DIR/keys/serverRootKey.pem \ 2.163 + -out $CA_DIR/servers/${HOSTNAME}-cert.pem \ 2.164 -days 5000 2>1 > /dev/null 2.165 status 2.166 2.167 # Preparing the server certificates 2.168 action "Installing server certificate..." 2.169 - cp -a "$1$CA_DIR/servers/${HOSTNAME}-cert.pem" "$1$CONF_DIR/$BBUSER" 2.170 + cp -a "$1$CA_DIR/servers/${HOSTNAME}-cert.pem" \ 2.171 + "$1$CONF_DIR/$BBUSER" 2.172 status 2.173 action "Installing client certificate..." 2.174 - cp -a "$1$CA_DIR/roots/clientCA.pem" "$1$CONF_DIR/$BBUSER" 2.175 + cp -a "$1$CA_DIR/roots/clientCA.pem" \ 2.176 + "$1$CONF_DIR/$BBUSER" 2.177 status 2.178 2.179 # Securing $CONF_DIR 2.180 @@ -148,7 +161,8 @@ 2.181 chmod 700 -R "$1$CONF_DIR/bbstored"* 2.182 fi 2.183 2.184 - if [ -e "$1$CA_DIR" ]; then 2.185 + if [ -e "$1$CA_DIR" ] 2.186 + then 2.187 # Warning 2.188 echo 2.189 echo "IMPORTANT NOTE:" 2.190 @@ -169,37 +183,47 @@ 2.191 post_remove() 2.192 { 2.193 echo 2.194 - if grep -q $BBUSER /etc/passwd; then 2.195 + if grep -q $BBUSER /etc/passwd 2.196 + then 2.197 action "Removing $BBUSER user..." 2.198 deluser bbstored 2.199 status 2.200 fi 2.201 + 2.202 # Delete data 2.203 - if [ -e $DATA_DIR ]; then 2.204 + if [ -e $DATA_DIR ] 2.205 + then 2.206 action "Removing all backup data..." 2.207 rm -r $DATA_DIR 2.208 status 2.209 fi 2.210 - # Delete bbstored conf files 2.211 - if [ -e $CONF_DIR/bbstored.conf ]; then 2.212 + 2.213 + # Delete bbstored configuration files 2.214 + if [ -e $CONF_DIR/bbstored.conf ] 2.215 + then 2.216 action "Removing config files..." 2.217 rm -rf $CONF_DIR/bbstored 2.218 rm -f $CONF_DIR/raidfile.conf 2.219 rm -f $CONF_DIR/bbstored.conf 2.220 status 2.221 fi 2.222 + 2.223 # Delete certificates 2.224 - if [ -e $CA_DIR ]; then 2.225 + if [ -e $CA_DIR ] 2.226 + then 2.227 action "Removing certificates..." 2.228 rm -r $CA_DIR 2.229 status 2.230 fi 2.231 + 2.232 # Delete $CONF_DIR (if empty) 2.233 - if [ $(ls -lA $CONF_DIR | wc -l) -eq 0 ]; then 2.234 + if [ $(ls -lA $CONF_DIR | wc -l) -eq 0 ] 2.235 + then 2.236 action "Removing $CONF_DIR..." 2.237 rm -r $CONF_DIR 2.238 status 2.239 fi 2.240 + 2.241 # Delete PID, sock files 2.242 rm -f /var/run/bbstored.* 2.243 }