From 3422efe549b2ebb528907ab6bcaff66c9d4ecdc55b8c9de0633cac88ef84c91e Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Mon, 4 Dec 2023 12:38:15 +0000 Subject: [PATCH] Accepting request 1123605 from home:mlewissmith:branches:openSUSE:Tools - specfile change : use rhel version macros wherever 'fedora' macro is also used + Build manpages on RHEL distros where argparse-manpage is available and where python3-sphinx is available and cleanly installable without requiring environment(modules) from EPEL + use fdupes to deduplicate python bytecode on RHEL distros which support it OBS-URL: https://build.opensuse.org/request/show/1123605 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/osc?expand=0&rev=426 --- osc.changes | 9 +++++++++ osc.spec | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/osc.changes b/osc.changes index 03e3390..db4f283 100644 --- a/osc.changes +++ b/osc.changes @@ -13,6 +13,15 @@ Wed Nov 22 07:57:53 UTC 2023 - Daniel Mach - Spec: - Recommend 'build' on openSUSE/SLE and 'obs-build' on all other distros +------------------------------------------------------------------- +Mon Nov 6 15:19:42 UTC 2023 - Magnus Lewis-Smith + +- specfile change : use rhel version macros wherever 'fedora' macro is also used + + Build manpages on RHEL distros where argparse-manpage is available + and where python3-sphinx is available and cleanly installable without + requiring environment(modules) from EPEL + + use fdupes to deduplicate python bytecode on RHEL distros which support it + ------------------------------------------------------------------- Thu Nov 2 14:51:36 UTC 2023 - Daniel Mach diff --git a/osc.spec b/osc.spec index f6d50ed..3c6e4a3 100644 --- a/osc.spec +++ b/osc.spec @@ -32,15 +32,15 @@ # need to override python_sitelib because it is not set as we would expect on many distros %define python_sitelib %(RPM_BUILD_ROOT= %{use_python} -Ic "import sysconfig; print(sysconfig.get_path('purelib'))") -# generate manpages on distros where argparse-manpage >= 3 is available -%if 0%{?suse_version} > 1500 || 0%{?fedora} >= 37 +# generate manpages on distros where argparse-manpage >= 3 and python3-Sphinx are available +%if 0%{?suse_version} > 1500 || 0%{?fedora} >= 37 || 0%{?rhel} >= 9 %bcond_without man %else %bcond_with man %endif # whether to use fdupes to deduplicate python bytecode -%if 0%{?suse_version} || 0%{?fedora} +%if 0%{?suse_version} || 0%{?fedora} || 0%{?rhel} >= 8 %bcond_without fdupes %else %bcond_with fdupes @@ -50,7 +50,7 @@ %define obs_build_pkg obs-build %define sphinx_pkg %{use_python_pkg}-Sphinx -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} >= 9 %define argparse_manpage_pkg argparse-manpage %define sphinx_pkg %{use_python_pkg}-sphinx %endif @@ -127,7 +127,7 @@ Recommends: obs-service-source_validator Recommends: obs-service-tar_scm Recommends: obs-service-verify_file -%if 0%{?fedora} +%if 0%{?fedora} || 0%{?rhel} Recommends: openssh %endif %if 0%{?suse_version}