From 3a597ec2f0c9a3a666a63bdc4dc2429fd24d886a1888005f1476fa0ee4f6fc5e Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Sat, 16 Jun 2018 19:49:12 +0000 Subject: [PATCH 1/4] - Fix master package summary and description - Add support for different name than %name OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=24 --- _service | 2 +- macros.hpc | 15 +++++++++------ suse-hpc.changes | 6 ++++++ suse-hpc.spec | 4 ++-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/_service b/_service index b58e6c7..dce10be 100644 --- a/_service +++ b/_service @@ -6,7 +6,7 @@ .git suse-hpc 0.1.%h - 10f46e14ff638192561d1de900eef46bdd9bb2eb + 131fdf981724f18a7cef824665884cc40491f265 general/dlinfo.c general/macros.hpc general/hpc_elf.pl diff --git a/macros.hpc b/macros.hpc index f91083d..8e94b07 100644 --- a/macros.hpc +++ b/macros.hpc @@ -353,10 +353,12 @@ cat << EOF > %{buildroot}%{hpc_module_dep_base}%{version} # -a: Use native arch even if no library package. # -N : Specify if a sub-package has different basename (pname) # -q: For internal use only! +# -M: use specified name in place of %%name # -%hpc_master_package(n:g:s:lLaqN:) \ +%hpc_master_package(n:g:s:lLaqN:M:) \ %define _mylib %{-s:lib}%{!-s:%{-l:lib}} \ %define _p_ext %(test -n "%{*}" && echo -%{*}) \ + %{-M: \ %define name %{-M*}} \ %{!-N:\ %define _pname %{pname} \ %define _name %{name} \ @@ -392,20 +394,21 @@ cat << EOF > %{buildroot}%{hpc_module_dep_base}%{version} } \ %{!-s:%define n_name %_name} \ %{-s:%define n_name %(a=%{_name};echo -n ${a/%{_pname}/%{_pname}%{-s*}})} \ + %{!-s:%define s_name %{_mylib}%{n_name}%{_p_ext}} \ + %{-s:%define s_name %(echo -n %{_mylib}%{_name}%{_p_ext} | sed -e "s/\\(.*%{_pname}\\)\\(.*\\)/\\\\1%{-s*}\\\\2/")} \ %package -n %_lname \ -Summary: Dependency package for %{n_name}%{_p_ext} \ +Summary: Dependency package for %{s_name} \ Group: %_group \ Obsoletes: %_lname < %version \ -%{!-s:Requires: %{_mylib}%{_name}%{_p_ext} = %version} \ -%{-s:Requires: %(echo -n %{_mylib}%{_name}%{_p_ext} | sed -e "s/\\(.*%{_pname}\\)\\(.*\\)/\\\\1%{-s*}\\\\2/") = %version} \ +Requires: %{s_name} = %version \ %{!-l:%{!-s:%{!-a:BuildArch: noarch}}} \ %description -n %_lname \ -The package %{n_name}%{_p_ext} provides the dependency to get the latest version of %_pname \ +The package %{l_name} provides the dependency to get the latest binary package version of %{_pname} \ %{-L:%post -n %_lname \ ln -sf %{hpc_module_dep_base}.version.%{version} %{hpc_module_dep_base}.version} \ %files -n %{_lname} \ %defattr(-,root,root)\ - %define _msg '%{summary:0}: Provide the dependency to get the latest version of %_pname' \ + %define _msg '%{summary:0}: Provide the dependency to get the latest binary package version of %{_pname}' \ %define _readme README.%{_mylib}%{_name}%{_p_ext} \ %define _tmpexec %(tmp=$(mktemp /tmp/scr-XXXXXX); \ readme=%{_readme} \ diff --git a/suse-hpc.changes b/suse-hpc.changes index 31b2632..18c93a1 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Jun 16 19:38:18 UTC 2018 - eich@suse.com + +- Fix master package summary and description +- Add support for different name than %name + ------------------------------------------------------------------- Mon Mar 12 19:20:16 UTC 2018 - eich@suse.com diff --git a/suse-hpc.spec b/suse-hpc.spec index 8a4e5d8..c812064 100644 --- a/suse-hpc.spec +++ b/suse-hpc.spec @@ -16,12 +16,12 @@ # -%define git_ver .960d922 +%define git_ver .131fdf9 Summary: SUSE HPC Environment License: BSD-3-Clause Group: Productivity/Clustering/Computing Name: suse-hpc -Version: 0.1 +Version: 0.2 Release: 0 Source0: macros.hpc Source1: dlinfo.c From 2ffe5b8cf4e962cbd102d80c3e641612bedc00772c3374e209f1bf63ff07799d Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Mon, 18 Jun 2018 04:56:54 +0000 Subject: [PATCH 2/4] - Improve description and README in master packages Explain the purpose of the package and explicitly specify the dependency in the package description and generated README. OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=25 --- _service | 2 +- macros.hpc | 7 ++++--- suse-hpc.changes | 7 +++++++ suse-hpc.spec | 1 - 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/_service b/_service index dce10be..1575196 100644 --- a/_service +++ b/_service @@ -6,7 +6,7 @@ .git suse-hpc 0.1.%h - 131fdf981724f18a7cef824665884cc40491f265 + d6d9c0fddeefd4f22d4aa44d6a9f7bc7f625bcba general/dlinfo.c general/macros.hpc general/hpc_elf.pl diff --git a/macros.hpc b/macros.hpc index 8e94b07..0ef092a 100644 --- a/macros.hpc +++ b/macros.hpc @@ -403,17 +403,18 @@ Obsoletes: %_lname < %version \ Requires: %{s_name} = %version \ %{!-l:%{!-s:%{!-a:BuildArch: noarch}}} \ %description -n %_lname \ -The package %{l_name} provides the dependency to get the latest binary package version of %{_pname} \ +The package %{l_name} provides the dependency to get binary package %{s_name} \ +When this package gets updated it installs the latest version of %name. \ %{-L:%post -n %_lname \ ln -sf %{hpc_module_dep_base}.version.%{version} %{hpc_module_dep_base}.version} \ %files -n %{_lname} \ %defattr(-,root,root)\ - %define _msg '%{summary:0}: Provide the dependency to get the latest binary package version of %{_pname}' \ + %define _msg '%{summary:0}: Provide the dependency to get binary package %{s_name\\\\nWhen this package gets updated it installs the latest version of %name.}' \ %define _readme README.%{_mylib}%{_name}%{_p_ext} \ %define _tmpexec %(tmp=$(mktemp /tmp/scr-XXXXXX); \ readme=%{_readme} \ echo "#!/bin/bash" > $tmp; \ - echo "echo %_msg \> $readme && rm -f $tmp || true" >> $tmp; \ + echo "echo -e %_msg \> $readme && rm -f $tmp || true" >> $tmp; \ chmod u+x $tmp; echo -n $tmp) \ %doc $(%_tmpexec)./%{_readme} \ } \ diff --git a/suse-hpc.changes b/suse-hpc.changes index 18c93a1..cc26c47 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jun 18 04:56:03 UTC 2018 - eich@suse.com + +- Improve description and README in master packages + Explain the purpose of the package and explicitly specify the dependency + in the package description and generated README. + ------------------------------------------------------------------- Sat Jun 16 19:38:18 UTC 2018 - eich@suse.com diff --git a/suse-hpc.spec b/suse-hpc.spec index c812064..3a5ce2f 100644 --- a/suse-hpc.spec +++ b/suse-hpc.spec @@ -16,7 +16,6 @@ # -%define git_ver .131fdf9 Summary: SUSE HPC Environment License: BSD-3-Clause Group: Productivity/Clustering/Computing From 2b9180c684e077798904ff00c63acceb1132e64309c5c34d333740610856f5b5 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Tue, 19 Jun 2018 06:11:03 +0000 Subject: [PATCH 3/4] Accepting request 617646 from home:eeich:branches:science:HPC - Handle license file using %license where applicable. OBS-URL: https://build.opensuse.org/request/show/617646 OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=26 --- suse-hpc.changes | 5 +++++ suse-hpc.spec | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/suse-hpc.changes b/suse-hpc.changes index cc26c47..0449dd9 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 19 05:08:01 UTC 2018 - eich@suse.com + +- Handle license file using %license where applicable. + ------------------------------------------------------------------- Mon Jun 18 04:56:03 UTC 2018 - eich@suse.com diff --git a/suse-hpc.spec b/suse-hpc.spec index 3a5ce2f..b4729a3 100644 --- a/suse-hpc.spec +++ b/suse-hpc.spec @@ -49,9 +49,15 @@ install -m 755 %{S:2} dlinfo %{buildroot}%{_rpmconfigdir} install -m 644 %{S:3} %{S:4} %{buildroot}%{_rpmconfigdir}/fileattrs cp %{S:5} . +%if 0%{?sle_version} && 0%{?sle_version} <= 120200 +%define mylicense %doc +%else +%define mylicense %license +%endif + %files %defattr(-,root,root,-) -%doc LICENSE +%mylicense LICENSE %config %{_sysconfdir}/rpm/macros.hpc %{_rpmconfigdir}/dlinfo %{_rpmconfigdir}/hpc_elf.pl From 42d487174c3a6fea505536e79259aeeaee9cdc5d3f5e8645add2da7307dd5704 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Tue, 19 Jun 2018 07:07:13 +0000 Subject: [PATCH 4/4] Accepting request 617652 from home:eeich:branches:science:HPC - Improve test to be more general. OBS-URL: https://build.opensuse.org/request/show/617652 OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=27 --- suse-hpc.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/suse-hpc.spec b/suse-hpc.spec index b4729a3..025df36 100644 --- a/suse-hpc.spec +++ b/suse-hpc.spec @@ -49,10 +49,10 @@ install -m 755 %{S:2} dlinfo %{buildroot}%{_rpmconfigdir} install -m 644 %{S:3} %{S:4} %{buildroot}%{_rpmconfigdir}/fileattrs cp %{S:5} . -%if 0%{?sle_version} && 0%{?sle_version} <= 120200 -%define mylicense %doc -%else -%define mylicense %license +%if 0%{?sle_version} > 120200 || 0%{?suse_version} > 1320 +%define mylicense %license +%else +%define mylicense %doc %endif %files