summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Feuer <mfeuer@jaguarlandrover.com>2016-02-16 11:20:22 -0800
committerMagnus Feuer <mfeuer@jaguarlandrover.com>2016-02-16 11:20:22 -0800
commitcb97583d4a105667cc2d2b590f0e6351e94f7d2e (patch)
tree5a418270aad85d96b70c2b24c0d7a9046ea81f80
parentf2ac413890744456ee0ce06f84a15f5d8e1b30ed (diff)
parente705de160d54b9a73d7d7d9a18af44bf49d3c730 (diff)
downloadrvi_core-cb97583d4a105667cc2d2b590f0e6351e94f7d2e.tar.gz
Merge pull request #81 from rstreif/develop
RVI Packaging
-rw-r--r--Makefile11
-rw-r--r--debian_template/changelog2
-rw-r--r--debian_template/control2
-rwxr-xr-xdebian_template/rules4
-rwxr-xr-xdebian_template/rvi.init (renamed from scripts/rvi.init.debian)0
-rw-r--r--debian_template/rvi.postinst9
-rw-r--r--debian_template/rvi.postrm21
-rw-r--r--debian_template/rvi.service10
-rw-r--r--scripts/rvi.service.yocto18
-rwxr-xr-xubuntu_template/rules2
-rwxr-xr-xubuntu_template/rvi.init (renamed from scripts/rvi.init.ubuntu)0
-rwxr-xr-xyocto_template/rvi.init (renamed from scripts/rvi.init.yocto)4
-rw-r--r--yocto_template/rvi.service (renamed from scripts/rvi.service)9
13 files changed, 31 insertions, 61 deletions
diff --git a/Makefile b/Makefile
index ad3bd82..1c594cc 100644
--- a/Makefile
+++ b/Makefile
@@ -27,7 +27,6 @@ SRC_LIST=BUILD.md \
rel \
RELEASE.md \
scripts/setup_gen \
- scripts/rvi.service \
scripts/rvi_ctl.template \
scripts/rvi_install \
python/*.py \
@@ -101,13 +100,12 @@ ubuntu_package: clean ubuntu_clean escript
# Pack up all relevant files, and ubuntu/, necessary for a build.
# Add rvi-$(VERSION) at the beginning of each file so
-# that theu get packed up into a correctly named subdirectory
+# that they get packed up into a correctly named subdirectory
#
tar czf ./ubuntu_build/rvi_$(VERSION).orig.tar.gz \
--exclude-vcs --transform="s|^|./rvi-$(VERSION)/|" \
$(SRC_LIST) \
- ubuntu_template \
- scripts/rvi.init.ubuntu
+ ubuntu_template
rm -rf ubuntu/missing-sources
# Unpack the created tar file
(cd ./ubuntu_build; tar xf rvi_$(VERSION).orig.tar.gz)
@@ -123,13 +121,12 @@ debian_package: clean debian_clean escript
# Pack up all relevant files, and debian/, necessary for a build.
# Add rvi-$(VERSION) at the beginning of each file so
-# that theu get packed up into a correctly named subdirectory
+# that they get packed up into a correctly named subdirectory
#
tar czf ./debian_build/rvi_$(VERSION).orig.tar.gz \
--exclude-vcs --transform="s|^|./rvi-$(VERSION)/|" \
$(SRC_LIST) \
- debian_template \
- scripts/rvi.init.debian
+ debian_template
rm -rf debian/missing-sources
# Unpack the created tar file
(cd ./debian_build; tar xf rvi_$(VERSION).orig.tar.gz)
diff --git a/debian_template/changelog b/debian_template/changelog
index 378c78c..3d774a4 100644
--- a/debian_template/changelog
+++ b/debian_template/changelog
@@ -1,4 +1,4 @@
-rvi (0.5.0) jessie; urgency=low
+rvi (0.5.0-1) jessie; urgency=low
* Initial release
diff --git a/debian_template/control b/debian_template/control
index a112832..bab7968 100644
--- a/debian_template/control
+++ b/debian_template/control
@@ -3,7 +3,7 @@ Section: net
Priority: optional
Maintainer: Magnus Feuer <mfeuer@jaguarlandrover.com>
Build-Depends: debhelper (>= 9), libbluetooth-dev, esl-erlang (>= 1:18.2)
-Standards-Version: 3.9.5
+Standards-Version: 3.9.6
Homepage: https://github.com/PDXostc/rvi_core
Package: rvi
diff --git a/debian_template/rules b/debian_template/rules
index f332d29..b6b8c0a 100755
--- a/debian_template/rules
+++ b/debian_template/rules
@@ -5,7 +5,7 @@
export DH_VERBOSE=1
%:
- dh --with systemd $@
+ dh $@
override_dh_auto_install:
./scripts/rvi_install \
@@ -19,5 +19,3 @@ override_dh_auto_install:
install -D -m 0755 ./debian/rvi/usr/lib/rvi_core/rvi_ctl ./debian/rvi/usr/bin/rvi_ctl
# Install default config
install -D -m 0644 ./priv/config/rvi_ubuntu.config ./debian/rvi/etc/rvi/rvi.config
-# Install start/stop scripts
- install -D -m 0755 ./scripts/rvi.init.debian ./debian/rvi/etc/init.d/rvi
diff --git a/scripts/rvi.init.debian b/debian_template/rvi.init
index 9cd4e59..9cd4e59 100755
--- a/scripts/rvi.init.debian
+++ b/debian_template/rvi.init
diff --git a/debian_template/rvi.postinst b/debian_template/rvi.postinst
index f6d5de5..10c11fe 100644
--- a/debian_template/rvi.postinst
+++ b/debian_template/rvi.postinst
@@ -23,10 +23,10 @@ set -e
case "$1" in
configure)
- # Set up our config for apache
+ # Set up our config
cat /proc/sys/kernel/random/uuid > /etc/rvi/device_id
echo "RVI Device ID set to $(cat /etc/rvi/device_id) in /etc/rvi/device_id"
- update-rc.d rvi defaults
+ #DEBHELPER#
;;
abort-upgrade|abort-remove|abort-deconfigure)
@@ -40,11 +40,6 @@ case "$1" in
esac
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
db_stop
exit 0
diff --git a/debian_template/rvi.postrm b/debian_template/rvi.postrm
index 0ded6f8..a0c5d5b 100644
--- a/debian_template/rvi.postrm
+++ b/debian_template/rvi.postrm
@@ -6,14 +6,15 @@
set -e
# summary of how this script can be called:
-# * <postinst> `configure' <most-recently-configured-version>
-# * <old-postinst> `abort-upgrade' <new version>
-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-# <new-version>
-# * <postinst> `abort-remove'
-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-# <failed-install-package> <version> `removing'
-# <conflicting-package> <version>
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
@@ -24,7 +25,7 @@ case "$1" in
remove|purge|upgrde|disappear)
rm -f /etc/init.d/rvi
- update-rc.d rvi remove
+ #DEBHELPER#
;;
*)
@@ -34,8 +35,6 @@ case "$1" in
esac
-#DEBHELPER#
-
db_stop
exit 0
diff --git a/debian_template/rvi.service b/debian_template/rvi.service
index 5e98259..d9ae979 100644
--- a/debian_template/rvi.service
+++ b/debian_template/rvi.service
@@ -1,18 +1,18 @@
-# systemd(8) setup usde by Tizen and others.
+# systemd(8) setup for Debian
[Unit]
Description=Remote Vehicle Interaction Service
Wants=network-online.target
[Service]
-Environment="HOME=/usr/lib/rvi"
+Environment="HOME=/usr/lib/rvi_core"
Type=forking
StandardOutput=journal
StandardError=journal
-#ExecStartPre=/opt/rvi-0.5.0/erts-5.10.4/bin/epmd -daemon
-ExecStart=/bin/sh /usr/bin/rvi_ctl -c /etc/rvi/rvi.config start
-ExecStop=/bin/sh /usr/bin/rvi_ctl stop
+ExecStart=/usr/bin/rvi_ctl -c /etc/rvi/rvi.config start
+ExecStop=/usr/bin/rvi_ctl stop
GuessMainPID=yes
+RemainAfterExit=yes
[Install]
WantedBy=graphical.target multi-user.target
diff --git a/scripts/rvi.service.yocto b/scripts/rvi.service.yocto
deleted file mode 100644
index 1ddae5d..0000000
--- a/scripts/rvi.service.yocto
+++ /dev/null
@@ -1,18 +0,0 @@
-# systemd(8) setup usde by Tizen and others.
-[Unit]
-Description=Remote Vehicle Interaction Service
-Wants=network-online.target
-
-[Service]
-Environment="HOME=/opt/rvi"
-Type=forking
-StandardOutput=journal
-StandardError=journal
-ExecStartPre=epmd -daemon
-ExecStart=/bin/sh /opt/rvi/rvi.sh -d /etc/opt/rvi -c /etc/opt/rvi/rvi_yocto.config start
-ExecStop=/bin/sh /opt/rvi/rvi stop
-ExecStopPost=epmd -kill
-GuessMainPID=yes
-
-[Install]
-# WantedBy=graphical.target multi-user.target
diff --git a/ubuntu_template/rules b/ubuntu_template/rules
index 0d2cf19..b6b8c0a 100755
--- a/ubuntu_template/rules
+++ b/ubuntu_template/rules
@@ -19,5 +19,3 @@ override_dh_auto_install:
install -D -m 0755 ./debian/rvi/usr/lib/rvi_core/rvi_ctl ./debian/rvi/usr/bin/rvi_ctl
# Install default config
install -D -m 0644 ./priv/config/rvi_ubuntu.config ./debian/rvi/etc/rvi/rvi.config
-# Install start/stop scripts
- install -D -m 0755 ./scripts/rvi.init.ubuntu ./debian/rvi/etc/init.d/rvi
diff --git a/scripts/rvi.init.ubuntu b/ubuntu_template/rvi.init
index 9cd4e59..9cd4e59 100755
--- a/scripts/rvi.init.ubuntu
+++ b/ubuntu_template/rvi.init
diff --git a/scripts/rvi.init.yocto b/yocto_template/rvi.init
index adbeef5..069d78a 100755
--- a/scripts/rvi.init.yocto
+++ b/yocto_template/rvi.init
@@ -23,13 +23,13 @@ export PATH="/bin/:/usr/bin:/sbin:/usr/sbin"
set -e
-DAEMON_PATH="/opt/rvi"
+DAEMON_PATH="/opt/rvi_core"
DAEMON_NAME="rvi"
case "$1" in
start)
echo -n "Starting $DAEMON_NAME: "
- $DAEMON_PATH/rvi_ctl start
+ $DAEMON_PATH/rvi_ctl -c /etc/opt/rvi/rvi.config start
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
echo "OK"
diff --git a/scripts/rvi.service b/yocto_template/rvi.service
index d58dae0..7e38b78 100644
--- a/scripts/rvi.service
+++ b/yocto_template/rvi.service
@@ -1,16 +1,17 @@
-# systemd(8) setup usde by Tizen and others.
+# systemd(8) setup usde by Yocto Project
[Unit]
Description=Remote Vehicle Interaction Service
Wants=network-online.target
[Service]
-Environment="HOME=/opt/rvi"
+Environment="HOME=/opt/rvi_core"
Type=forking
StandardOutput=journal
StandardError=journal
-ExecStart=/bin/sh /opt/rvi/rvi_ctl start
-ExecStop=/bin/sh /opt/rvi/rvi_ctl stop
+ExecStart=/opt/rvi_core/rvi_ctl -c /etc/opt/rvi/rvi.config start
+ExecStop=/opt/rvi_core/rvi_ctl stop
GuessMainPID=yes
+RemainAfterExit=yes
[Install]
WantedBy=graphical.target multi-user.target