From d69b4838eae2bbad4d202812570df8454b4462f8 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 20 Nov 2023 11:28:56 +0800 Subject: [PATCH 1/3] dist/redhat: remove tags for subpackage which are same as main preamble this is a cleanup. if a subpackage is licensed under a different license from the one specified in the main preamble, we need to use a distinct License tag on a per-subpackage basis. but if it is licensed with the identical license, it is not necessary. since all three subpackages of "*-{server, conf, kernel-conf}" are licensed under AGPLv3, there is no need to repeat the "License:" tag in their own preamble section. the same applies to the "URL" tag. Signed-off-by: Kefu Chai --- dist/redhat/scylla.spec | 6 ------ 1 file changed, 6 deletions(-) diff --git a/dist/redhat/scylla.spec b/dist/redhat/scylla.spec index 0b3706bf53..c506057ef6 100644 --- a/dist/redhat/scylla.spec +++ b/dist/redhat/scylla.spec @@ -60,8 +60,6 @@ This package installs all required packages for ScyllaDB, including %package server Group: Applications/Databases Summary: The Scylla database server -License: AGPLv3 -URL: http://www.scylladb.com/ Requires: %{product}-conf = %{version}-%{release} Requires: %{product}-python3 = %{version}-%{release} AutoReqProv: no @@ -156,8 +154,6 @@ rm -rf $RPM_BUILD_ROOT %package conf Group: Applications/Databases Summary: Scylla configuration package -License: AGPLv3 -URL: http://www.scylladb.com/ Obsoletes: scylla-server < 1.1 %description conf @@ -203,8 +199,6 @@ fi %package kernel-conf Group: Applications/Databases Summary: Scylla configuration package for the Linux kernel -License: AGPLv3 -URL: http://www.scylladb.com/ Requires: kmod # tuned overwrites our sysctl settings Obsoletes: tuned >= 2.11.0 From 3f108629b9a5d7f34878a5b779c4907f7dfd4c7e Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 20 Nov 2023 11:49:21 +0800 Subject: [PATCH 2/3] dist/redhat: drop unused `defines` variable this variable was introduced in 6d7d0231. back then, we were still building the binaries in .spec, but we've switched to the relocatable package now, so there is no need to use keep these compilation related flags anymore. in this change, the `defines` variable is dropped. Signed-off-by: Kefu Chai --- dist/redhat/scylla.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/dist/redhat/scylla.spec b/dist/redhat/scylla.spec index c506057ef6..3be21b813e 100644 --- a/dist/redhat/scylla.spec +++ b/dist/redhat/scylla.spec @@ -69,8 +69,6 @@ This package contains ScyllaDB server. %build -defines=() - %install %if 0%{housekeeping} install_arg="--housekeeping" From 71f352896d912e95bdb0ebbc3132048c41818909 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 20 Nov 2023 11:56:04 +0800 Subject: [PATCH 3/3] dist/redhat: group sub-package preambles together group sections like `%build` and `%install` together, to improve the readability of the spec recipe. Signed-off-by: Kefu Chai --- dist/redhat/scylla.spec | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dist/redhat/scylla.spec b/dist/redhat/scylla.spec index 3be21b813e..e019415bfc 100644 --- a/dist/redhat/scylla.spec +++ b/dist/redhat/scylla.spec @@ -57,6 +57,17 @@ This package installs all required packages for ScyllaDB, including %prep %setup -q -n scylla +%build + +%install +%if 0%{housekeeping} +install_arg="--housekeeping" +%endif +./install.sh --packaging --root "$RPM_BUILD_ROOT" $install_arg + +%clean +rm -rf $RPM_BUILD_ROOT + %package server Group: Applications/Databases Summary: The Scylla database server @@ -67,14 +78,6 @@ AutoReqProv: no %description server This package contains ScyllaDB server. -%build - -%install -%if 0%{housekeeping} -install_arg="--housekeeping" -%endif -./install.sh --packaging --root "$RPM_BUILD_ROOT" $install_arg - %pre server getent group scylla || /usr/sbin/groupadd scylla 2> /dev/null || : getent passwd scylla || /usr/sbin/useradd -g scylla -s /sbin/nologin -r -d %{_sharedstatedir}/scylla scylla 2> /dev/null || : @@ -102,9 +105,6 @@ if [ -d /tmp/%{name}-%{version}-%{release} ]; then fi ln -sfT /etc/scylla /var/lib/scylla/conf -%clean -rm -rf $RPM_BUILD_ROOT - %files server %defattr(-,root,root)