Commit 2251754a authored by MARGERY David's avatar MARGERY David
Browse files

Update packaging rules to latest version

As implemented for users-api-ror
parent 486ce16f
Pipeline #80515 waiting for manual action with stages
in 20 minutes and 56 seconds
......@@ -3,7 +3,7 @@ Section: ruby
Priority: extra
Maintainer: Grid'5000 developpers <g5k-developers@lists.grid5000.fr>
Uploaders: David Margery <david.margery@inria.fr>
Build-Depends: debhelper (>= 7), git, bundler, rake, libssl-dev, libxml2-dev, libxslt-dev, libicu-dev, default-libmysqlclient-dev | libmysqlclient-dev, libpq-dev, nodejs, ruby-dev, lsb-release, postgresql-client, pkg-config
Build-Depends: debhelper (>= 7), dh-systemd (>= 1.5), git, bundler, rake, libssl-dev, libxml2-dev, libxslt-dev, libicu-dev, default-libmysqlclient-dev | libmysqlclient-dev, libpq-dev, nodejs, ruby-dev, lsb-release, postgresql-client, pkg-config
Standards-Version: 3.7.3
Homepage: https://api.grid5000.fr
......
......@@ -32,9 +32,16 @@ case "$1" in
SECRET=`${NAME} rake secret`
echo "export SECRET_KEY_BASE=\${SECRET_KEY_BASE:-${SECRET}}" > /etc/${NAME}/conf.d/secret.sh
fi
`${NAME} rake db:migrate` || true #attempt to migrate db is there is one
chown $NAME.$NAME /etc/${NAME}/conf.d/secret.sh
chmod 0600 /etc/${NAME}/conf.d/secret.sh
if /usr/bin/${NAME} rake db:migrate ; then
echo "Success in migrating the db"
else
echo "No database configured for ${NAME}. No attempt made to migrate it."
echo " run /usr/bin/${NAME} rake db:create db:migrate when /opt/${NAME}/config/database.yml points to"
echo " a running database server."
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
......
......@@ -3,7 +3,7 @@
export DH_VERBOSE=1
%:
dh $@
dh $@ --with=systemd
# Run 'bundle install --standalone' at the beginning of the Debian build process
override_dh_auto_build:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment