From eaa710f2c278801c1061dfbd2c0fa6313329f11ffd15506091f66bb553b0678d Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Wed, 6 Feb 2019 17:56:26 +0000 Subject: [PATCH 1/2] Accepting request 672258 from home:eeich:branches:science:HPC - macros.hpc: Fix default moduleversion link generation and deletion * Generation: convert to a posttrans script to make sure the link target exists. * Deletion: Fix paths and line endings. (bsc#1124509) - macros.hpc: Improve documentation for -L option in %%hpc_master macro. OBS-URL: https://build.opensuse.org/request/show/672258 OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=43 --- _service | 2 +- macros.hpc | 19 +++++++++++-------- suse-hpc.changes | 10 ++++++++++ suse-hpc.spec | 2 +- 4 files changed, 23 insertions(+), 10 deletions(-) diff --git a/_service b/_service index e7955cb..2cbd8e6 100644 --- a/_service +++ b/_service @@ -6,7 +6,7 @@ .git suse-hpc 0.4.%h - 87f3f2c336d9dc5f9e8874e7639459371cfae3b0 + e7d6197ce848ef77b7cb7565f199e9c5d7cf11a8 general/dlinfo.c general/macros.hpc general/hpc_elf.pl diff --git a/macros.hpc b/macros.hpc index 3ce0420..3c340f9 100644 --- a/macros.hpc +++ b/macros.hpc @@ -56,7 +56,7 @@ includedir=%{hpc_includedir} \ sysconfdir=%{hpc_sysconfdir} \ \ Name: %pname \ -Description: %{summary:0} \ +Description: %{SUMMARY} \ Version: %version \ Libs: -L${libdir} %{?-l:-l%{-l*}} \ Cflags: -I${includedir} \ @@ -223,9 +223,10 @@ EOF\ # delete default in %postun %hpc_module_delete_if_default \ - _tmp=$(readlink -e %{hpc_module_dep_base}/version) && \ - test "$_tmp" = "$(readlink -f %{hpc_module_dep_base}/.version.%{version})" && \ - rm -f %{hpc_module_dep_base}/version || exit 0 + _tmp=$(readlink -f %{hpc_module_dep_base}.version) && \\\ + test "$_tmp" = "$(readlink -f %{hpc_module_dep_base}.version.%{version})" \\\ + -o "x" = "x$(readlink -e %{hpc_module_dep_base}.version)" && \\\ + rm -f %{hpc_module_dep_base}.version || exit 0 # %hpc_write_modules_version_file \ @@ -362,7 +363,8 @@ cat << EOF > %{buildroot}%{hpc_module_dep_base}%{version} # -l: mark a library package, prepend the package name with a `lib` (like -s # but without an explicite so version. Do not use -l and -s together. # -L: Create a link from the .version. file to the .version file -# to mark the default version. +# to mark the default version. To undo, add %hpc_module_delete_if_default +# to the package the master is created for. # -a: Use native arch even if no library package. # -N : Specify if a sub-package has different basename (pname) # -q: For internal use only! @@ -418,11 +420,12 @@ Requires: %{s_name} = %version \ %description -n %_lname \ The package %{_lname} 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} \ +%{-L:%posttrans -n %_lname \ + [ -e %{hpc_module_dep_base}.version.%{version} ] && \\\ + ln -sf .version.%{version} %{hpc_module_dep_base}.version} \ %files -n %{_lname} \ %defattr(-,root,root)\ - %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 _msg '%{summary}: 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} \ diff --git a/suse-hpc.changes b/suse-hpc.changes index 1eaba0f..409b64a 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Wed Feb 6 07:08:30 UTC 2019 - eich@suse.com + +- macros.hpc: Fix default moduleversion link generation and deletion + * Generation: convert to a posttrans script to make sure the link + target exists. + * Deletion: Fix paths and line endings. + (bsc#1124509) +- macros.hpc: Improve documentation for -L option in %%hpc_master macro. + ------------------------------------------------------------------- Mon Jan 7 15:44:07 UTC 2019 - eich@suse.com diff --git a/suse-hpc.spec b/suse-hpc.spec index c96f293..1456b4b 100644 --- a/suse-hpc.spec +++ b/suse-hpc.spec @@ -12,7 +12,7 @@ # 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/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # From 32af44b9bd29ff07d169ea54a2be150d20cbcbe430db13053ed31a51f742f104 Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Thu, 7 Feb 2019 06:58:32 +0000 Subject: [PATCH 2/2] Accepting request 672357 from home:eeich:branches:science:HPC - macros.hpc: Improve master package description and README message. OBS-URL: https://build.opensuse.org/request/show/672357 OBS-URL: https://build.opensuse.org/package/show/science:HPC/suse-hpc?expand=0&rev=44 --- _service | 2 +- macros.hpc | 5 +++-- suse-hpc.changes | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/_service b/_service index 2cbd8e6..84c2fd6 100644 --- a/_service +++ b/_service @@ -6,7 +6,7 @@ .git suse-hpc 0.4.%h - e7d6197ce848ef77b7cb7565f199e9c5d7cf11a8 + ec20e912f5395e091bede4849ecc5476581c1871 general/dlinfo.c general/macros.hpc general/hpc_elf.pl diff --git a/macros.hpc b/macros.hpc index 3c340f9..5eb4ad3 100644 --- a/macros.hpc +++ b/macros.hpc @@ -418,14 +418,15 @@ Obsoletes: %_lname < %version \ Requires: %{s_name} = %version \ %{!-l:%{!-s:%{!-a:BuildArch: noarch}}} \ %description -n %_lname \ -The package %{_lname} provides the dependency to get binary package %{s_name} \ +%{pname}: %{SUMMARY} \ +The package %{_lname} provides the dependency to get binary package %{s_name}. \ When this package gets updated it installs the latest version of %name. \ %{-L:%posttrans -n %_lname \ [ -e %{hpc_module_dep_base}.version.%{version} ] && \\\ ln -sf .version.%{version} %{hpc_module_dep_base}.version} \ %files -n %{_lname} \ %defattr(-,root,root)\ - %define _msg '%{summary}: Provide the dependency to get binary package %{s_name\\\\nWhen this package gets updated it installs the latest version of %name.}' \ + %define _msg '%{pname}: %{SUMMARY}.\\\\nProvide the dependency to get binary package %{s_name}.\\\\nWhen this package gets updated it installs the latest 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 409b64a..0d992b8 100644 --- a/suse-hpc.changes +++ b/suse-hpc.changes @@ -7,6 +7,7 @@ Wed Feb 6 07:08:30 UTC 2019 - eich@suse.com * Deletion: Fix paths and line endings. (bsc#1124509) - macros.hpc: Improve documentation for -L option in %%hpc_master macro. +- macros.hpc: Improve master package description and README message. ------------------------------------------------------------------- Mon Jan 7 15:44:07 UTC 2019 - eich@suse.com