debian packaging finished
This commit is contained in:
parent
3490be26ef
commit
34c2f26b52
8
debian/control
vendored
8
debian/control
vendored
|
@ -2,15 +2,15 @@ Source: cryptobox
|
|||
Section: admin
|
||||
Priority: extra
|
||||
Maintainer: Lars Kruse <devel@sumpfralle.de>
|
||||
Build-Depends: debhelper (>= 5.0.37.2), dpatch, python-all-dev (>= 2.4), python-central (>= 0.5.6)
|
||||
XS-Python-Version: 2.4
|
||||
Build-Depends: debhelper (>= 5.0.38), dpatch, python-all-dev (>= 2.4), python-central (>= 0.5.6)
|
||||
XS-Python-Version: >= 2.4
|
||||
Standards-Version: 3.7.2
|
||||
|
||||
Package: cryptobox
|
||||
Architecture: any
|
||||
Depends: ${python:Depends}, bash (>=2.0), sed (>=4.0), coreutils, grep (>=2.0), hashalot, cryptsetup (>=20050111), dmsetup, initscripts, e2fsprogs (>= 1.27), adduser, python (>=2.4), python-clearsilver, super, dosfstools, python-cherrypy, python-configobj
|
||||
Depends: ${python:Depends}, bash (>=2.0), sed (>=4.0), coreutils, grep (>=2.0), cryptsetup (>=20050111), dmsetup, initscripts, e2fsprogs (>= 1.27), adduser, python (>=2.4), python-clearsilver, super, dosfstools, python-cherrypy, python-configobj
|
||||
Suggests: samba, stunnel, openssl
|
||||
XB-Python-Version: 2.4
|
||||
XB-Python-Version: ${python:Versions}
|
||||
Description: Web interface for an encrypting fileserver
|
||||
This web interface allows you to manage the encrypted and plaintext
|
||||
disks of your system. The data is platform independently available
|
||||
|
|
4
debian/cryptobox.default
vendored
4
debian/cryptobox.default
vendored
|
@ -1,8 +1,6 @@
|
|||
# boot configuration file for the CryptoBox
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
# the default setup of the cryptobox is complete inactivity
|
||||
# the default state of the cryptobox is disabled
|
||||
|
||||
# set to "0" to enable the startup of the cryptobox - otherwise "1"
|
||||
NO_START=1
|
||||
|
|
2
debian/cryptobox.docs
vendored
2
debian/cryptobox.docs
vendored
|
@ -2,6 +2,4 @@ README
|
|||
copyright
|
||||
changelog
|
||||
doc/html
|
||||
LICENSE
|
||||
event-scripts
|
||||
conf-examples
|
||||
|
|
1
debian/cryptobox.examples
vendored
Normal file
1
debian/cryptobox.examples
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
conf-examples
|
10
debian/cryptobox.init
vendored
10
debian/cryptobox.init
vendored
|
@ -59,22 +59,20 @@ case "$1" in
|
|||
log_daemon_msg "Starting $DESC"
|
||||
if start-stop-daemon \
|
||||
--chuid $RUNAS: --quiet --start \
|
||||
--oknodo --user $RUNAS --pidfile "$PIDFILE" \
|
||||
--user $RUNAS --pidfile "$PIDFILE" \
|
||||
--exec /usr/bin/python --startas "$DAEMON" -- $OPTIONS
|
||||
then log_end_msg 0
|
||||
else log_end_msg 1
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
stop )
|
||||
log_daemon_msg "Stopping cryptobox webserver" "$DESC"
|
||||
if start-stop-daemon --oknodo --quiet --stop \
|
||||
if start-stop-daemon --quiet --stop \
|
||||
--pidfile "$PIDFILE" \
|
||||
--user "$RUNAS"
|
||||
then rm "$PIDFILE"
|
||||
then test -e "$PIDFILE" && rm "$PIDFILE"
|
||||
log_end_msg 0
|
||||
else log_end_msg 1
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
reload | force-reload | restart )
|
||||
|
@ -85,7 +83,7 @@ case "$1" in
|
|||
status )
|
||||
echo -n "$DESC "
|
||||
if start-stop-daemon --stop --signal 0 --quiet \
|
||||
--pidfile "$PIDFILE" -user "$RUNAS"
|
||||
--pidfile "$PIDFILE" --user "$RUNAS"
|
||||
then echo "running"
|
||||
exit 0
|
||||
else if [ -e "$PIDFILE" ]
|
||||
|
|
1
debian/cryptobox.lintian
vendored
Normal file
1
debian/cryptobox.lintian
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
cryptobox: package-has-a-duplicate-relation
|
2
debian/cryptobox.manpages
vendored
Normal file
2
debian/cryptobox.manpages
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
man/CryptoBoxWebserver.8
|
||||
man/CryptoBoxRootActions.8
|
4
debian/postinst
vendored
4
debian/postinst
vendored
|
@ -6,6 +6,7 @@ PID_DIR=/var/run/cryptobox
|
|||
CRYPTOBOX_USER=cryptobox
|
||||
USER_HOME=/var/cache/cryptobox
|
||||
SUPER_FILE=/etc/super.tab
|
||||
ADDITIONAL_GROUP=disk
|
||||
|
||||
# check the current cryptobox user - maybe it was changed
|
||||
if test -r /etc/default/cryptobox
|
||||
|
@ -20,7 +21,8 @@ create_user_home()
|
|||
getent passwd "$CRYPTOBOX_USER" 2>/dev/null >/dev/null && return 0
|
||||
# create cryptobox user
|
||||
echo "Creating new user '$CRYPTOBOX_USER' ..."
|
||||
adduser --system --group --groups disk --home "$USER_HOME" cryptobox
|
||||
adduser --system --group --home "$USER_HOME" "$CRYPTOBOX_USER"
|
||||
adduser "$CRYPTOBOX_USER" "$ADDITIONAL_GROUP"
|
||||
mkdir -p "$USER_HOME/mnt"
|
||||
mkdir -p "$USER_HOME/settings"
|
||||
chown -R ${CRYPTOBOX_USER}: "$USER_HOME"
|
||||
|
|
36
debian/postrm
vendored
36
debian/postrm
vendored
|
@ -4,6 +4,8 @@ LOG_FILE=/var/log/cryptobox/cryptobox.log
|
|||
WEBLOG_FILE=/var/log/cryptobox/webserver.log
|
||||
PID_DIR=/var/run/cryptobox
|
||||
SUPER_FILE=/etc/super.tab
|
||||
MNT_DIR=/var/cache/cryptobox/mnt
|
||||
SETTINGS_DIR=/var/cache/cryptobox/settings
|
||||
|
||||
remove_super_lines()
|
||||
{
|
||||
|
@ -14,31 +16,45 @@ remove_super_lines()
|
|||
}
|
||||
|
||||
|
||||
remove_log_files()
|
||||
umount_all()
|
||||
{
|
||||
test -d "$SETTINGS_DIR" && mountpoint -q "$SETTINGS_DIR" && umount "$SETTINGS_DIR"
|
||||
test -d "$MNT_DIR" && ls "$MNT_DIR" | while read dir
|
||||
do if test -d "$MNT_DIR/$dir"
|
||||
then mountpoint -q "$MNT_DIR/$dir" && umount "$MNT_DIR/$dir"
|
||||
rm -r "$MNT_DIR/$dir"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
remove_stuff()
|
||||
{
|
||||
test -e "$LOG_FILE" && rm "$LOG_FILE"
|
||||
test -e "$LOG_FILE" && rm "$WEBLOG_FILE"
|
||||
}
|
||||
|
||||
|
||||
remove_pid_dir()
|
||||
{
|
||||
test -e "$WEBLOG_FILE" && rm "$WEBLOG_FILE"
|
||||
test -e "$PID_DIR" && rm -r "$PID_DIR"
|
||||
test -e "$SETTINGS_DIR" && rm -r "$SETTINGS_DIR"
|
||||
}
|
||||
|
||||
|
||||
################## main ###################
|
||||
|
||||
# umount everything that is still active
|
||||
umount_all
|
||||
|
||||
# remove the user
|
||||
if test "$1" = "purge" && getent passwd cryptobox 2>/dev/null >/dev/null \
|
||||
&& test "$(cd ~cryptobox;pwd)" = /var/cache/cryptobox
|
||||
then echo "Removing user 'cryptobox' ..."
|
||||
userdel -r cryptobox
|
||||
remove_log_files
|
||||
remove_pid_dir
|
||||
fi
|
||||
|
||||
## always remove the lines from the 'super' configuration file
|
||||
# always remove the lines from the 'super' configuration file
|
||||
remove_super_lines
|
||||
|
||||
# remove obsolete files
|
||||
test "$1" = "purge" && remove_stuff
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
# return without error
|
||||
|
|
4
debian/preinst
vendored
Normal file
4
debian/preinst
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
#DEBHELPER#
|
||||
|
4
debian/prerm
vendored
Normal file
4
debian/prerm
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
#DEBHELPER#
|
||||
|
21
debian/rules
vendored
21
debian/rules
vendored
|
@ -54,13 +54,20 @@ install: build
|
|||
mv $(DEB_BUILD_DIR)/usr/bin/CryptoBoxWebserver $(DEB_BUILD_DIR)/usr/sbin/
|
||||
mv $(DEB_BUILD_DIR)/usr/bin/CryptoBoxRootActions $(DEB_BUILD_DIR)/usr/sbin/
|
||||
# remove tests
|
||||
rm -rf $(CB_PYDIR)/tests
|
||||
rm -r $(CB_PYDIR)/tests
|
||||
# remove duplicate documentation files
|
||||
rm -rf $(CB_PYDIR)/share/doc
|
||||
rm -r $(CB_PYDIR)/doc
|
||||
# move shared files
|
||||
mv $(CB_PYDIR)/share $(DEB_BUILD_DIR)/usr/share/cryptobox
|
||||
$(INSTALL) -d -m 755 $(DEB_BUILD_DIR)/var/log/cryptobox
|
||||
$(INSTALL) -d -m 755 $(DEB_BUILD_DIR)/var/run/cryptobox
|
||||
install -d -m 755 $(DEB_BUILD_DIR)/usr/share/cryptobox
|
||||
mv $(CB_PYDIR)/share/* $(DEB_BUILD_DIR)/usr/share/cryptobox/
|
||||
rmdir $(CB_PYDIR)/share
|
||||
# create log directory
|
||||
install -d -m 755 $(DEB_BUILD_DIR)/var/log/cryptobox
|
||||
# create pid directory
|
||||
install -d -m 755 $(DEB_BUILD_DIR)/var/run/cryptobox
|
||||
# install lintian override file: for multiple dependency caused by {python:Depends}
|
||||
install -D -m 644 debian/cryptobox.lintian \
|
||||
$(DEB_BUILD_DIR)/usr/share/lintian/overrides/cryptobox
|
||||
|
||||
|
||||
# Build architecture-independent files here.
|
||||
|
@ -74,10 +81,12 @@ binary-arch: build install
|
|||
dh_installdocs
|
||||
dh_installexamples
|
||||
dh_installlogrotate
|
||||
dh_installinit
|
||||
dh_installman
|
||||
dh_install
|
||||
dh_pycentral
|
||||
@# pycentral must be called before installinit - otherwise the DEBHELPER part
|
||||
@# in the postinst script is filled in the wrong order
|
||||
dh_installinit
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_installdeb
|
||||
|
|
Loading…
Reference in a new issue