File SLES_SAP-release.spec of Package 000release-packages
#
# spec file for package SLES_SAP
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# old location was /etc/YaST2/licenses/, see jsc#SLE-3067
%define product_license_dir /usr/share/licenses/product/
Name: SLES_SAP-release
Summary: SUSE Linux Enterprise Server for SAP Applications 15 SP1
License: MIT
Group: System/Fhs
Version: 15.1
Release: 0
BuildRequires: skelcd-EULA-sap-apl
Recommends: branding
#!BuildIgnore: SLES_SAP-installation-release
# Included on the Project Config until resolve the future of SLES_SAP-installation-release package.
# Prefer: sles-release
# in rare cases, 'ln' is not found...
Requires(post): coreutils
Recommends: issue-generator
# bsc#1078737#c7
Recommends: release-notes-sles-for-sap
# This is coming from sles-release already.
Provides: distribution-release
Provides: product(SUSE_SLE) = %{version}-%{release}
Provides: product(SUSE_SLE-SP1) = %{version}-%{release}
# used by yast to show where the product will be shown during installation.
# lowest number will be top-most
Provides: displayorder(300)
# bsc#1055299
Conflicts: otherproviders(distribution-release)
# bsc#1049164
Obsoletes: leanos-release
#bsc#1071720
Obsoletes: SLES_SAP-release-DVD < 15
Obsoletes: SLES_SAP-release-MINI < 15
Obsoletes: SLES_SAP-release-POOL < 15
#bsc#1076598
Obsoletes: SUSE_SLES_SAP-release < 15
Obsoletes: sles-release < %{version}
Obsoletes: sles-release-DVD < 15
Obsoletes: sles-release-MINI < 15
Obsoletes: sles-release-POOL < 15
Provides: %name-%version
Provides: product() = SLES_SAP
Provides: product(SLES_SAP) = 15.1-0
%ifarch x86_64
Provides: product-register-target() = sle%2D15%2Dx86_64
%endif
%ifarch ppc64le
Provides: product-register-target() = sle%2D15%2Dppc64le
%endif
Provides: product-label() = SLE%2D15%2DSP1%2DSAP
Provides: product-cpeid() = cpe%3A%2Fo%3Asuse%3Asles_sap%3A15%3Asp1
Provides: product-url(releasenotes) = https%3A%2F%2Fwww.suse.com%2Freleasenotes%2F%{_target_cpu}%2FSLE%2DSAP%2F15%2DSP1%2Frelease%2Dnotes%2Dsles%2Dfor%2Dsap.rpm
%ifarch x86_64
Provides: product-updates-repoid() = obsrepository%3A%2F%2Fbuild.suse.de%2FSUSE%3AUpdates%3ASLE%2DProduct%2DSLES_SAP%3A15%2DSP1%3Ax86_64%2Fupdate
%endif
%ifarch ppc64le
Provides: product-updates-repoid() = obsrepository%3A%2F%2Fbuild.suse.de%2FSUSE%3AUpdates%3ASLE%2DProduct%2DSLES_SAP%3A15%2DSP1%3Appc64le%2Fupdate
%endif
%ifarch x86_64
Provides: product-updates-repoid() = obsrepository%3A%2F%2Fbuild.suse.de%2FSUSE%3AUpdates%3ASLE%2DProduct%2DSLES_SAP%3A15%2DSP1%3Ax86_64%2Fupdate_debug
%endif
%ifarch ppc64le
Provides: product-updates-repoid() = obsrepository%3A%2F%2Fbuild.suse.de%2FSUSE%3AUpdates%3ASLE%2DProduct%2DSLES_SAP%3A15%2DSP1%3Appc64le%2Fupdate_debug
%endif
Obsoletes: product:SUSE_SLES_SAP
Provides: product-endoflife()
Provides: product(SLES_SAP-SP1) = %version-%release
Obsoletes: SLES_SAP-SP1-migration
Obsoletes: product:SLES_SAP-SP1-migration
Provides: product(SUSE_SLE) = 15.1
Provides: product(SUSE_SLE-SP1) = 15.1
# Make sure we are at SLES15 level
# TBD
PreReq: glibc >= 2.22
Conflicts: kernel < 4.4
Conflicts: perl-Bootloader < 0.904
# old package obsoletes removed. If we support 11 SP4 migration to 15, we may
# need to re-add some.
# ./.
BuildRoot: %{_tmppath}/%{name}-%{version}-build
# this package should only be available for the "basearchs" of a product
# i586 added as installation-images-SLES reequires it.
ExclusiveArch: i586 x86_64 ppc64le
Source100: weakremovers.inc
%include %{SOURCE100}
%description
SUSE Linux Enterprise offers a comprehensive
suite of products built on a single code base.
The platform addresses business needs from
the smallest thin-client devices to the world's
most powerful high-performance computing
and mainframe servers. SUSE Linux Enterprise
offers common management tools and technology
certifications across the platform, and
each product is enterprise-class.
%prep
%build
%install
mkdir -p $RPM_BUILD_ROOT/etc
mkdir -p $RPM_BUILD_ROOT/usr/lib/issue.d
# Create set-up for issue-generator
echo -e "\nWelcome to SUSE Linux Enterprise Server for SAP Applications 15 SP1 (%{_target_cpu}) - Kernel \\\r (\\\l).\n" > $RPM_BUILD_ROOT/usr/lib/issue.d/10-SUSE
echo -e "\n" > $RPM_BUILD_ROOT/usr/lib/issue.d/90-SUSE
# create /etc/SuSE-release - deprecated, FATE#316268
# no longer build, in case you wonder
touch $RPM_BUILD_ROOT/etc/motd
# Setup rpm macros
mkdir -p $RPM_BUILD_ROOT/etc/rpm/
echo "#" > $RPM_BUILD_ROOT/etc/rpm/macros.sle
echo "# RPM macros to identify SLE distribution" >> $RPM_BUILD_ROOT/etc/rpm/macros.sle
echo "#" >> $RPM_BUILD_ROOT/etc/rpm/macros.sle
echo "#==================================================" >> $RPM_BUILD_ROOT/etc/rpm/macros.sle
echo "" >> $RPM_BUILD_ROOT/etc/rpm/macros.sle
echo "%%sle_version %sle_version" >> $RPM_BUILD_ROOT/etc/rpm/macros.sle
# Put EULA into correct place
mkdir -p $RPM_BUILD_ROOT/%{product_license_dir}SLES_SAP
cd $RPM_BUILD_ROOT/%{product_license_dir}SLES_SAP
tar -xf /usr/lib/skelcd/CD1/license-SLES_SAP.tar.gz # --overwrite
echo "directory.yast" > directory.yast
ls lic* > directory.yast
# Removed since SLES4SAP must have the same os-release as SLES to not break SAP certifications.
# We will copy it manually until we have a final agreement about the certification process
# CREATE_OS_RELEASE_FILE
mkdir -p $RPM_BUILD_ROOT/etc
cat >$RPM_BUILD_ROOT/etc/os-release << EOF
NAME="SLES"
VERSION="15-SP1%{?betaversion: }%{?betaversion}"
VERSION_ID="%{version}%{?betaversion?: }%{?betaversion}"
PRETTY_NAME="SUSE Linux Enterprise Server 15 SP1"
ID="sles"
ID_LIKE="suse"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:15:sp1"
EOF
mkdir -p $RPM_BUILD_ROOT/etc/products.d
cat >$RPM_BUILD_ROOT/etc/products.d/SLES_SAP.prod << EOF
<?xml version="1.0" encoding="UTF-8"?>
<product schemeversion="0">
<vendor>SUSE</vendor>
<name>SLES_SAP</name>
<version>15.1</version>
<baseversion>15</baseversion>
<patchlevel>1</patchlevel>
<predecessor>SUSE_SLES_SAP</predecessor>
<release>0</release>
<endoflife></endoflife>
<arch>%{_target_cpu}</arch>
<cpeid>cpe:/o:suse:sles_sap:15:sp1</cpeid>
<productline>SLES_SAP</productline>
<codestream>
<name>SUSE Linux Enterprise Server for SAP Applications 15</name>
<endoflife>2028-07-31</endoflife>
</codestream>
<register>
%ifarch x86_64
<target>sle-15-x86_64</target>
%endif
%ifarch ppc64le
<target>sle-15-ppc64le</target>
%endif
</register>
<repositories>
%ifarch x86_64
<repository type="update" repoid="obsrepository://build.suse.de/SUSE:Updates:SLE-Product-SLES_SAP:15-SP1:x86_64/update" />
%endif
%ifarch ppc64le
<repository type="update" repoid="obsrepository://build.suse.de/SUSE:Updates:SLE-Product-SLES_SAP:15-SP1:ppc64le/update" />
%endif
%ifarch x86_64
<repository type="update" repoid="obsrepository://build.suse.de/SUSE:Updates:SLE-Product-SLES_SAP:15-SP1:x86_64/update_debug" />
%endif
%ifarch ppc64le
<repository type="update" repoid="obsrepository://build.suse.de/SUSE:Updates:SLE-Product-SLES_SAP:15-SP1:ppc64le/update_debug" />
%endif
%ifarch x86_64
<repository type="pool" repoid="obsproduct://build.suse.de/SUSE:Products:SLE-Product-SLES_SAP:15-SP1:x86_64/SLES_SAP/15.1/%{_target_cpu}" />
%endif
%ifarch ppc64le
<repository type="pool" repoid="obsproduct://build.suse.de/SUSE:Products:SLE-Product-SLES_SAP:15-SP1:ppc64le/SLES_SAP/15.1/%{_target_cpu}" />
%endif
%ifarch x86_64
<repository type="pool" repoid="obsproduct://build.suse.de/SUSE:Products:SLE-Product-SLES_SAP:15-SP1:x86_64/SLES_SAP/15.1/%{_target_cpu}" />
%endif
%ifarch ppc64le
<repository type="pool" repoid="obsproduct://build.suse.de/SUSE:Products:SLE-Product-SLES_SAP:15-SP1:ppc64le/SLES_SAP/15.1/%{_target_cpu}" />
%endif
%ifarch x86_64
<repository type="pool" repoid="obsproduct://build.suse.de/SUSE:Products:SLE-Product-SLES_SAP:15-SP1:x86_64/SLES_SAP/15.1/%{_target_cpu}" />
%endif
%ifarch ppc64le
<repository type="pool" repoid="obsproduct://build.suse.de/SUSE:Products:SLE-Product-SLES_SAP:15-SP1:ppc64le/SLES_SAP/15.1/%{_target_cpu}" />
%endif
</repositories>
<upgrades/>
<summary>SUSE Linux Enterprise Server for SAP Applications 15 SP1</summary>
<shortsummary>SLE-15-SP1-SAP</shortsummary>
<description>SUSE Linux Enterprise offers a comprehensive
suite of products built on a single code base.
The platform addresses business needs from
the smallest thin-client devices to the world's
most powerful high-performance computing
and mainframe servers. SUSE Linux Enterprise
offers common management tools and technology
certifications across the platform, and
each product is enterprise-class.</description>
<linguas>
<language>cs</language>
<language>da</language>
<language>de</language>
<language>en</language>
<language>en_GB</language>
<language>en_US</language>
<language>es</language>
<language>fi</language>
<language>fr</language>
<language>hu</language>
<language>it</language>
<language>ja</language>
<language>nb</language>
<language>nl</language>
<language>pl</language>
<language>pt</language>
<language>pt_BR</language>
<language>ru</language>
<language>sv</language>
<language>zh</language>
<language>zh_CN</language>
<language>zh_TW</language>
</linguas>
<urls>
<url name="releasenotes">https://www.suse.com/releasenotes/%{_target_cpu}/SLE-SAP/15-SP1/release-notes-sles-for-sap.rpm</url>
</urls>
<buildconfig>
<producttheme>SLES_SAP</producttheme>
</buildconfig>
<installconfig>
<defaultlang>en_US</defaultlang>
<releasepackage name="%{name}" flag="EQ" version="%{version}" release="%{release}"/>
<distribution>SUSE_SLE</distribution>
</installconfig>
<runtimeconfig/>
<productdependency relationship="provides" name="SUSE_SLE" baseversion="15" patchlevel="1" flag="EQ"/>
<productdependency relationship="provides" name="SUSE_SLE-SP1" baseversion="15" patchlevel="1" flag="EQ"/>
</product>
EOF
%post
# Change the symlink to SLES for SAP prod file.
if [ -L /etc/products.d/baseproduct ] ; then
rm -f /etc/products.d/baseproduct
ln -sf SLES_SAP.prod /etc/products.d/baseproduct
# bsc#1065272
elif [ ! -e /etc/products.d/baseproduct ]; then
ln -sf SLES_SAP.prod /etc/products.d/baseproduct
fi
# Put EULA into correct place
if [ ! -e %{product_license_dir}base ] ; then
ln -sf SLES_SAP %{product_license_dir}base
fi
%files
%defattr(644,root,root,755)
%config /etc/os-release
%dir /etc/products.d
%ghost /etc/products.d/baseproduct
/etc/products.d/*
%dir %{product_license_dir}
%config /etc/rpm/macros.sle
%config(noreplace) /etc/motd
%dir %{product_license_dir}
%dir %{product_license_dir}SLES_SAP/
%dir /usr/lib/issue.d/
/usr/lib/issue.d/*-SUSE
%license %{product_license_dir}SLES_SAP/license*txt
%{product_license_dir}SLES_SAP/directory.yast
%changelog