dist: support smooth upgrade from enterprise to source availalbe
When upgrading for example from `2024.1` to `2025.1` the package name is not identical casuing the upgrade command to fail: ``` Command: 'sudo DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade scylla -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"' Exit code: 100 Stdout: Selecting previously unselected package scylla. Preparing to unpack .../6-scylla_2025.1.0~dev-0.20250118.1ef2d9d07692-1_amd64.deb ... Unpacking scylla (2025.1.0~dev-0.20250118.1ef2d9d07692-1) ... Errors were encountered while processing: /tmp/apt-dpkg-install-JbOMav/0-scylla-conf_2025.1.0~dev-0.20250118.1ef2d9d07692-1_amd64.deb /tmp/apt-dpkg-install-JbOMav/1-scylla-python3_2025.1.0~dev-0.20250118.1ef2d9d07692-1_amd64.deb /tmp/apt-dpkg-install-JbOMav/2-scylla-server_2025.1.0~dev-0.20250118.1ef2d9d07692-1_amd64.deb /tmp/apt-dpkg-install-JbOMav/3-scylla-kernel-conf_2025.1.0~dev-0.20250118.1ef2d9d07692-1_amd64.deb /tmp/apt-dpkg-install-JbOMav/4-scylla-node-exporter_2025.1.0~dev-0.20250118.1ef2d9d07692-1_amd64.deb /tmp/apt-dpkg-install-JbOMav/5-scylla-cqlsh_2025.1.0~dev-0.20250118.1ef2d9d07692-1_amd64.deb Stderr: E: Sub-process /usr/bin/dpkg returned an error code (1) ``` Adding `Obsoletes` (for rpm) and `Replaces` (for deb) Fixes: https://github.com/scylladb/scylladb/issues/22420 Closes scylladb/scylladb#22457
This commit is contained in:
56
dist/debian/control.template
vendored
56
dist/debian/control.template
vendored
@@ -12,14 +12,15 @@ Architecture: any
|
||||
Description: Scylla database main configuration file
|
||||
Scylla is a highly scalable, eventually consistent, distributed,
|
||||
partitioned row DB.
|
||||
Replaces: %{product}-server (<< 1.1)
|
||||
Replaces: %{product}-server (<< 1.1), scylla-enterprise-conf (<< 2025.1.0~)
|
||||
Conflicts: %{product}-server (<< 1.1)
|
||||
Breaks: scylla-enterprise-conf (<< 2025.1.0~)
|
||||
|
||||
Package: %{product}-server
|
||||
Architecture: any
|
||||
Depends: ${misc:Depends}, %{product}-conf (= ${binary:Version}), %{product}-python3 (= ${binary:Version})
|
||||
Replaces: %{product}-tools (<<5.5)
|
||||
Breaks: %{product}-tools (<<5.5)
|
||||
Replaces: %{product}-tools (<<5.5), scylla-enterprise-server (<< 2025.1.0~)
|
||||
Breaks: %{product}-tools (<<5.5), scylla-enterprise-server (<< 2025.1.0~)
|
||||
Description: Scylla database server binaries
|
||||
Scylla is a highly scalable, eventually consistent, distributed,
|
||||
partitioned row DB.
|
||||
@@ -29,6 +30,8 @@ Section: debug
|
||||
Priority: extra
|
||||
Architecture: any
|
||||
Depends: %{product}-server (= ${binary:Version}), ${misc:Depends}
|
||||
Replaces: scylla-enterprise-server-dbg (<< 2025.1.0~)
|
||||
Breaks: scylla-enterprise-server-dbg (<< 2025.1.0~)
|
||||
Description: debugging symbols for %{product}-server
|
||||
Scylla is a highly scalable, eventually consistent, distributed,
|
||||
partitioned row DB.
|
||||
@@ -37,13 +40,17 @@ Description: debugging symbols for %{product}-server
|
||||
Package: %{product}-kernel-conf
|
||||
Architecture: any
|
||||
Depends: procps
|
||||
Replaces: scylla-enterprise-kernel-conf (<< 2025.1.0~)
|
||||
Breaks: scylla-enterprise-kernel-conf (<< 2025.1.0~)
|
||||
Description: Scylla kernel tuning configuration
|
||||
Scylla is a highly scalable, eventually consistent, distributed,
|
||||
partitioned row DB.
|
||||
|
||||
Package: %{product}-node-exporter
|
||||
Architecture: any
|
||||
Replaces: scylla-enterprise-node-exporter (<< 2025.1.0~)
|
||||
Conflicts: prometheus-node-exporter
|
||||
Breaks: scylla-enterprise-node-exporter (<< 2025.1.0~)
|
||||
Description: Prometheus exporter for machine metrics
|
||||
Prometheus exporter for machine metrics, written in Go with pluggable metric collectors.
|
||||
|
||||
@@ -54,6 +61,49 @@ Depends: %{product}-server (= ${binary:Version})
|
||||
, %{product}-kernel-conf (= ${binary:Version})
|
||||
, %{product}-node-exporter (= ${binary:Version})
|
||||
, %{product}-cqlsh (= ${binary:Version})
|
||||
Replaces: scylla-enterprise (<< 2025.1.0~)
|
||||
Breaks: scylla-enterprise (<< 2025.1.0~)
|
||||
Description: Scylla database metapackage
|
||||
Scylla is a highly scalable, eventually consistent, distributed,
|
||||
partitioned row DB.
|
||||
|
||||
Package: scylla-enterprise-conf
|
||||
Depends: %{product}-conf (= ${binary:Version})
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: oldlibs
|
||||
Description: transitional package
|
||||
This is a transitional package. It can safely be removed.
|
||||
|
||||
Package: scylla-enterprise-server
|
||||
Depends: %{product}-server (= ${binary:Version})
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: oldlibs
|
||||
Description: transitional package
|
||||
This is a transitional package. It can safely be removed.
|
||||
|
||||
Package: scylla-enterprise
|
||||
Depends: %{product} (= ${binary:Version})
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: oldlibs
|
||||
Description: transitional package
|
||||
This is a transitional package. It can safely be removed.
|
||||
|
||||
Package: scylla-enterprise-kernel-conf
|
||||
Depends: %{product}-kernel-conf (= ${binary:Version})
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: oldlibs
|
||||
Description: transitional package
|
||||
This is a transitional package. It can safely be removed.
|
||||
|
||||
Package: scylla-enterprise-node-exporter
|
||||
Depends: %{product}-node-exporter (= ${binary:Version})
|
||||
Architecture: all
|
||||
Priority: optional
|
||||
Section: oldlibs
|
||||
Description: transitional package
|
||||
This is a transitional package. It can safely be removed.
|
||||
|
||||
11
dist/redhat/scylla.spec
vendored
11
dist/redhat/scylla.spec
vendored
@@ -13,7 +13,8 @@ Requires: %{product}-python3 = %{version}-%{release}
|
||||
Requires: %{product}-kernel-conf = %{version}-%{release}
|
||||
Requires: %{product}-node-exporter = %{version}-%{release}
|
||||
Requires: %{product}-cqlsh = %{version}-%{release}
|
||||
Obsoletes: scylla-server < 1.1
|
||||
Provides: scylla-enterprise = %{version}-%{release}
|
||||
Obsoletes: scylla-enterprise < 2025.1.0
|
||||
|
||||
%global _debugsource_template %{nil}
|
||||
%global _debuginfo_subpackages %{nil}
|
||||
@@ -73,6 +74,8 @@ Requires: %{product}-python3 = %{version}-%{release}
|
||||
AutoReqProv: no
|
||||
Provides: %{product}-tools:%{_bindir}/nodetool
|
||||
Provides: %{product}-tools:%{_sysconfigdir}/bash_completion.d/nodetool-completion
|
||||
Provides: scylla-enterprise-server = %{version}-%{release}
|
||||
Obsoletes: scylla-enterprise-server < 2025.1.0
|
||||
|
||||
%description server
|
||||
This package contains ScyllaDB server.
|
||||
@@ -157,6 +160,8 @@ ln -sfT /etc/scylla /var/lib/scylla/conf
|
||||
Group: Applications/Databases
|
||||
Summary: Scylla configuration package
|
||||
Obsoletes: scylla-server < 1.1
|
||||
Provides: scylla-enterprise-conf = %{version}-%{release}
|
||||
Obsoletes: scylla-enterprise-conf < 2025.1.0
|
||||
|
||||
%description conf
|
||||
This package contains the main scylla configuration file.
|
||||
@@ -177,6 +182,8 @@ Summary: Scylla configuration package for the Linux kernel
|
||||
Requires: kmod
|
||||
# tuned overwrites our sysctl settings
|
||||
Obsoletes: tuned >= 2.11.0
|
||||
Provides: scylla-enterprise-kernel-conf = %{version}-%{release}
|
||||
Obsoletes: scylla-enterprise-kernel-conf < 2025.1.0
|
||||
|
||||
%description kernel-conf
|
||||
This package contains Linux kernel configuration changes for the Scylla database. Install this package
|
||||
@@ -213,6 +220,8 @@ Group: Applications/Databases
|
||||
Summary: Prometheus exporter for machine metrics
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/prometheus/node_exporter
|
||||
Provides: scylla-enterprise-node-exporter = %{version}-%{release}
|
||||
Obsoletes: scylla-enterprise-node-exporter < 2025.1.0
|
||||
|
||||
%description node-exporter
|
||||
Prometheus exporter for machine metrics, written in Go with pluggable metric collectors.
|
||||
|
||||
Reference in New Issue
Block a user