Accepting request 798281 from science:HPC

- Add 'Obsolete:' option to master package. This way, a removed
  master package may be declared obsolte. 
- Allow 'Empty' package - without a 'Requires:' to keep master
  package for backward compatibility. (forwarded request 798280 from eeich)

OBS-URL: https://build.opensuse.org/request/show/798281
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/suse-hpc?expand=0&rev=18
This commit is contained in:
Dominique Leuenberger 2020-04-29 18:41:52 +00:00 committed by Git OBS Bridge
commit b81142fc94
4 changed files with 29 additions and 6 deletions

View File

@ -6,7 +6,7 @@
<param name="exclude">.git</param>
<param name="filename">suse-hpc</param>
<param name="versionformat">0.4.%h</param>
<param name="revision">ec20e912f5395e091bede4849ecc5476581c1871</param>
<param name="revision">d55686f0e90750122e3a56f4a38e3cb05a02381c</param>
<param name="extract">general/dlinfo.c</param>
<param name="extract">general/macros.hpc</param>
<param name="extract">general/hpc_elf.pl</param>

View File

@ -32,9 +32,12 @@
%hpc_libexecdir %{hpc_prefix}/lib
%hpc_localstatedir %{_localstatedir}
%hpc_sharedstatedir %{_sharedstatedir}
# MANPATH
%hpc_mandir %{hpc_datadir}/man
%hpc_docdir %{hpc_datadir}/doc/packages
# INFOPATH
%hpc_infodir %{hpc_datadir}/info
# PKG_CONFIG_PATH
%hpc_pkgconfigdir %{hpc_libdir}/pkgconfig
%hpc_cmake_dir %{hpc_datadir}/cmake
%hpc_cmake_moddir %{hpc_cmake_dir}/Modules
@ -369,8 +372,13 @@ cat << EOF > %{buildroot}%{hpc_module_dep_base}%{version}
# -N <pname>: Specify if a sub-package has different basename (pname)
# -q: For internal use only!
# -M: use specified name in place of %%name
# -O: Obsoleted package with version %version, multiple obsoletes may be
# separated by ":"
# -E: create an 'empty' master package with no requires. This allows to
# keep the macro package around for compatibility even if the underlying
# package has been removed.
#
%hpc_master_package(n:g:s:lLaqN:M:) \
%hpc_master_package(n:g:s:lLaqN:M:O:E) \
%define _mylib %{-s:lib}%{!-s:%{-l:lib}} \
%define _p_ext %(test -n "%{*}" && echo -%{*}) \
%{-M: \ %define name %{-M*}} \
@ -415,7 +423,14 @@ cat << EOF > %{buildroot}%{hpc_module_dep_base}%{version}
Summary: Dependency package for %{s_name} \
Group: %_group \
Obsoletes: %_lname < %version \
Requires: %{s_name} = %version \
%{-O:%(\
v=%{-O*}; \
for i in ${v//:/ }; \
do echo "Obsoletes: $i < %version"; \
echo "Provides: %i = %version"; \
done)\
} \
%{!-E:Requires: %{s_name} = %version} \
%{!-l:%{!-s:%{!-a:BuildArch: noarch}}} \
%description -n %_lname \
%{pname}: %{SUMMARY} \

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Apr 27 06:58:20 UTC 2020 - Egbert Eich <eich@suse.com>
- Add 'Obsolete:' option to master package. This way, a removed
master package may be declared obsolte.
- Allow 'Empty' package - without a 'Requires:' to keep master
package for backward compatibility.
-------------------------------------------------------------------
Wed Feb 6 07:08:30 UTC 2019 - eich@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package suse-hpc
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -20,7 +20,7 @@ Summary: SUSE HPC Environment
License: BSD-3-Clause
Group: Productivity/Clustering/Computing
Name: suse-hpc
Version: 0.4
Version: 0.5
Release: 0
Source0: macros.hpc
Source1: dlinfo.c
@ -28,7 +28,7 @@ Source2: hpc_elf.pl
Source3: hpc_elf.attr
Source4: hpc_elflib.attr
Source5: LICENSE
Url: http://www.suse.com/hpc
URL: http://www.suse.com/hpc
%description
Provide rpm macros for building and installing SUSE HPC