diff options
author | Tuukka Pasanen <tuukka.pasanen@ilmi.fi> | 2022-04-11 11:32:26 +0300 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2022-04-26 12:46:39 +1000 |
commit | 375b8f40ce1bb7e93bcb87145c3c00fa0fa5d87e (patch) | |
tree | e74077fa230371da0b0eb92080faa45e12ed3346 /debian/rules | |
parent | 72a125058527126ae31c02851db0d1ca186706f7 (diff) | |
download | mariadb-git-375b8f40ce1bb7e93bcb87145c3c00fa0fa5d87e.tar.gz |
MDEV-27033: Remove version suffix from Debian packages
Remove version suffix from Debian packages (for example mariadb-server-10.9)
because installing suffixed package removes older version
of package even if it's suffixed (for example mariadb-server-10.7)
This make also Debian package management easier in future MariaDB
version iterations because there is no need for stacking
Conlicts/Breaks/Replaces-parameters in every new major release
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/debian/rules b/debian/rules index 0f3f2f01c8a..b690a7ad5b0 100755 --- a/debian/rules +++ b/debian/rules @@ -19,6 +19,8 @@ endif BUILDDIR := builddir DEB_VERSION_REVISION := $(shell echo $(DEB_VERSION) | sed -e 's/^.*-//') +DEB_VERSION_VERSION := $(shell echo $(DEB_VERSION) | sed -e 's/^.*:\(.*\)\(-\|+\).*/\1/') +DEB_VERSION_MAJOR := $(shell echo $(DEB_VERSION_VERSION) | sed -e 's/^\(.*\)\..*$$/\1/') RELEASE := $(shell lsb_release -r -s) # Use changelog based DEB_DISTRIBUTION instead? TMP:=$(CURDIR)/debian/tmp @@ -85,6 +87,10 @@ endif echo "server:Version=$(DEB_VERSION)" >> debian/substvars + # As packages does not have major version any more on package name there is no way as it not set by dpkg + # to use this on postinst script. Use sed to determine major version + sed -i 's/__MARIADB_MAJOR_VER__/$(DEB_VERSION_MAJOR)/g' debian/mariadb-server.post* debian/mariadb-server.preinst + # Don't build ColumnStore as part of the native build as it does not meet the # quality standards in Debian. Also building it requires an extra 4 GB of disk # space which makes native Debian builds fail as the total disk space needed @@ -134,12 +140,12 @@ override_dh_auto_install: ifneq (,$(filter linux,$(DEB_HOST_ARCH_OS))) # Copy systemd files to a location available for dh_installinit - cp $(BUILDDIR)/support-files/mariadb.service debian/mariadb-server-10.9.mariadb.service - cp $(BUILDDIR)/support-files/mariadb.socket debian/mariadb-server-10.9.mariadb.socket - cp $(BUILDDIR)/support-files/mariadb-extra.socket debian/mariadb-server-10.9.mariadb-extra.socket - cp $(BUILDDIR)/support-files/mariadb@.service debian/mariadb-server-10.9.mariadb@.service - cp $(BUILDDIR)/support-files/mariadb@.socket debian/mariadb-server-10.9.mariadb@.socket - cp $(BUILDDIR)/support-files/mariadb-extra@.socket debian/mariadb-server-10.9.mariadb-extra@.socket + cp $(BUILDDIR)/support-files/mariadb.service debian/mariadb-server.mariadb.service + cp $(BUILDDIR)/support-files/mariadb.socket debian/mariadb-server.mariadb.socket + cp $(BUILDDIR)/support-files/mariadb-extra.socket debian/mariadb-server.mariadb-extra.socket + cp $(BUILDDIR)/support-files/mariadb@.service debian/mariadb-server.mariadb@.service + cp $(BUILDDIR)/support-files/mariadb@.socket debian/mariadb-server.mariadb@.socket + cp $(BUILDDIR)/support-files/mariadb-extra@.socket debian/mariadb-server.mariadb-extra@.socket endif # Run 'make install' without output since it is uninteresting and |