dist/ubuntu: generate Ubuntu/Debian revision correctly

Ubuntu Packaging Guide says if there's no upstream package (means it's not
ported from Debian), revision should be "0ubuntu1", not "ubuntu1" which is we
currently using.

On Debian, Debian Policy Manual says it's conventional to restart revision from 1 when upstream version increased, so we should specify it to "1".

To do it in single script, we will generate the revision on building time.

Signed-off-by: Takuya ASADA <syuu@scylladb.com>
Message-Id: <1483499161-22557-1-git-send-email-syuu@scylladb.com>
This commit is contained in:
Takuya ASADA 2017-01-04 12:06:01 +09:00 committed by Avi Kivity
parent ee0e460b26
commit 79b3f989fc
2 changed files with 6 additions and 1 deletions

View File

@ -45,6 +45,11 @@ cp dist/ubuntu/rules.in debian/rules
sed -i -e "s/@@VERSION@@/$SCYLLA_VERSION/g" debian/changelog
sed -i -e "s/@@RELEASE@@/$SCYLLA_RELEASE/g" debian/changelog
sed -i -e "s/@@CODENAME@@/$CODENAME/g" debian/changelog
if [ "$DISTRIBUTION" = "Ubuntu" ]; then
sed -i -e "s/@@REVISION@@/0ubuntu1/g" debian/changelog
else
sed -i -e "s/@@REVISION@@/1/g" debian/changelog
fi
if [ "$RELEASE" = "14.04" ]; then
sed -i -e "s/@@DH_INSTALLINIT@@/--upstart-only/g" debian/rules
else

View File

@ -1,4 +1,4 @@
scylla-jmx (@@VERSION@@-@@RELEASE@@-ubuntu1) @@CODENAME@@; urgency=medium
scylla-jmx (@@VERSION@@-@@RELEASE@@-@@REVISION@@) @@CODENAME@@; urgency=medium
* Initial release.