SUSE / suse-migration-services

GNU General Public License v3.0
7 stars 11 forks source link

Enforce minimun version supported #143

Closed jesusbv closed 5 years ago

jesusbv commented 5 years ago

The minimum migration starting point should be

SLES 12 SP3

or

SLES For SAP 12 SP3.

rjschwei commented 5 years ago

I think the requirement should be in the image rpm as it is the driver for the migration.

Also I am not certain the Requires: is correct. It uses rpm macros for identifying versions in the build service, I don't think these work during installation. For installation I think we would need a dependency on the release packages. For example SLES For SAP has the package name SLES_SAP-release product package definitions can be found in the _product package definition of the given distro in IBS.

jesusbv commented 5 years ago

I think the requirement should be in the image rpm as it is the driver for the migration.

Also I am not certain the Requires: is correct. It uses rpm macros for identifying versions in the build service, I don't think these work during installation.

I'm not sure either.

For installation I think we would need a dependency on the release packages. For example SLES For SAP has the package name SLES_SAP-release product package definitions can be found in the _product package definition of the given distro in IBS.

Ok, something like

Version:        12
Patch:           3
Requires:      product(SUSE_SLE) >= %{version}.%{patch} || product(SUSE_SLE_SAP) >= %{version}.%{patch} 

not sure if this what you meant after I checked the file SLES_SAP-release.spec of _product for Devel:SAP:SLE-12

rjschwei commented 5 years ago

Ok, something like

Version:        12
Patch:           3
Requires:      product(SUSE_SLE) >= %{version}.%{patch} || product(SUSE_SLE_SAP) >= %{version}.%{patch} 

not sure if this what you meant after I checked the file SLES_SAP-release.spec of _product for Devel:SAP:SLE-12

Yes I think that is correct, please double check with one of the release managers for SLE. @aosthof can point you in the right direction.

schaefi commented 5 years ago

I put the question label here since we need to clarify the concept with @aosthof Thanks

schaefi commented 5 years ago

@aosthof any news ?

@jesusbv you could make this PR conflict free with out current best guess approach. Thoughts ?

Thanks guys

aosthof commented 5 years ago

@aosthof any news ?

@schaefi @jesusbv Sorry for my late reply, had a chat with Stefan Weiberg now how we can check for SLES for SAP as product.

So, there are a couple of things:

Requires: product(SUSE_SLE) >= %{version}.%{patch} || product(SUSE_SLE_SAP) >= %{version}.%{patch} needs to be changed in the following way:

The resulting line should then look like:

Requires: product(SLES) >= %{MinSLEVersion} || product(SLES_SAP) >= %{MinSLEVersion}

And if I understood the concept of the DMS packages correctly this line has to be added to the suse-migration-sle15-activation and SLES12-SP4-SLES15-Migration packages.

Regarding the latter, you might want to also think about a different name of the package. SLES12-SP4-SLES15-Migration actually offers (will soon offer) migrations from SLES 12 SP3, SP4 and SP5 to SLES 15, but judging from the name one might think this is only available for SLES 12 SP4.

schaefi commented 5 years ago

The resulting line should then look like: ... And if I understood the concept of the DMS packages correctly this line has to be added to the suse-migration-sle15-activation and SLES12-SP4-SLES15-Migration packages.

Correct. Thanks much for the details. I will add the change to the SLES12-SP4-SLES15-Migration package. @jesusbv can you add the change here in the git for the activation package. Thanks

Regarding the latter, you might want to also think about a different name of the package

I agree. I will open a new issue for the package name change. This would require a correct obsoletes and requires as well as a doc change and I don't want to make mistakes here. Thus your input on that new issue would be much appreciated. Thanks

schaefi commented 5 years ago

I'd either hardcode the version to 12.3 or e.g. use a variable called MinSLEVersion

@aosthof is the variable MinSLEVersion defined by some suse macro or ist that something we need to define ourselves ?

Thanks

schaefi commented 5 years ago

@aosthof

here is my change for the suse-migration-rpm package that would be effective when the image build is packaged into an rpm:

diff -u suse-migration-rpm/image.spec.in suse-migration-rpm.new/image.spec.in
--- suse-migration-rpm/image.spec.in    2019-07-17 11:53:50.829585700 +0200
+++ suse-migration-rpm.new/image.spec.in        2019-11-11 15:26:15.010284403 +0100
@@ -1,5 +1,7 @@
 # needsrootforbuild

+%global MinSLEVersion 12.3
+
 Url:            http://www.suse.com/
 Name:           __NAME__
 Summary:        Migration Live System
@@ -8,6 +10,7 @@
 Group:          System/Management
 License:        SUSE-EULA
 Source0:        __SOURCE__
+Requires:       product(SLES) >= %{MinSLEVersion} || product(SLES_SAP) >= %{MinSLEVersion}
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

 %description
schaefi commented 5 years ago

Is that correct ?

schaefi commented 5 years ago

The change will go to Devel:PubCloud/suse-migration-rpm if approved. Thanks

aosthof commented 5 years ago

I'd either hardcode the version to 12.3 or e.g. use a variable called MinSLEVersion

@aosthof is the variable MinSLEVersion defined by some suse macro or ist that something we need to define ourselves ?

I'm not aware that this variable already exists, this is just a name I came up with.

jesusbv commented 5 years ago

I'd either hardcode the version to 12.3 or e.g. use a variable called MinSLEVersion

@aosthof is the variable MinSLEVersion defined by some suse macro or ist that something we need to define ourselves ?

Thanks

We define the variable MinSLEVersion (or another name for that purpose) or hardcode the value directly.

aosthof commented 5 years ago

Is that correct ?

Yes, this LGTM

jesusbv commented 5 years ago

Regarding the latter, you might want to also think about a different name of the package

I agree. I will open a new issue for the package name change. This would require a correct obsoletes and requires as well as a doc change and I don't want to make mistakes here. Thus your input on that new issue would be much appreciated. Thanks

Yes, very good point. Thanks @aosthof

schaefi commented 5 years ago

ok thanks Alex. @jesusbv can you adapt the change in this PR to:

a) revert the changes in package/suse-migration-services-spec-template b) apply a similar change like the diff I posted to package/suse-migration-sle15-activation-spec-template

Once done we merge this PR first and then I "osc ci" the change in the suse-migration-rpm which makes it effective on the next rebuild of the image.

Thoughts ?

schaefi commented 5 years ago

@jesusbv can you squash into one and then merge. Thanks much