Accepting request 892030 from home:dimstar:Factory

- Install macros.osc to %{_rpmmacrodir}, not to /etc/rpm.

Now with compat code so it does not break on SLE12

OBS-URL: https://build.opensuse.org/request/show/892030
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/osc?expand=0&rev=348
This commit is contained in:
Marcus Hüwe 2021-05-11 09:56:32 +00:00 committed by Git OBS Bridge
parent 31577e2edd
commit 2c4bd2e66d
2 changed files with 21 additions and 12 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 5 13:55:44 UTC 2021 - Dominique Leuenberger <dimstar@opensuse.org>
- Install macros.osc to %{_rpmmacrodir}, not to /etc/rpm.
-------------------------------------------------------------------
Wed Jan 27 16:40:47 UTC 2021 - Marcus Hüwe <suse-tux@gmx.de>

View File

@ -30,6 +30,9 @@
%define version_unconverted 0.172.0
%define osc_plugin_dir %{_prefix}/lib/osc-plugins
%define macros_file macros.osc
%if ! %{defined _rpmmacrodir}
%define _rpmmacrodir %{_sysconfdir}/rpm
%endif
Name: osc
Version: 0.172.0
@ -71,20 +74,20 @@ BuildRequires: python-elementtree
Requires: python-elementtree
%endif
%if 0%{?suse_version} > 1000
Recommends: diffstat
Recommends: build
Recommends: sudo
Recommends: powerpc32
Recommends: ca-certificates
Recommends: diffstat
Recommends: powerpc32
Recommends: sudo
# These packages are needed for "osc add $URL"
Recommends: obs-service-recompress
Recommends: obs-service-set_version
Recommends: obs-service-tar_scm
Recommends: obs-service-obs_scm
Recommends: obs-service-verify_file
Recommends: obs-service-download_files
Recommends: obs-service-format_spec_file
Recommends: obs-service-obs_scm
Recommends: obs-service-set_version
Recommends: obs-service-source_validator
Recommends: obs-service-tar_scm
Recommends: obs-service-verify_file
Recommends: xdg-utils
# for osc >= 0.167.0 the newest build version is needed.
# Otherwise osc chroot might not work correctly.
@ -134,6 +137,7 @@ Provides: %{use_python}-osc
%else
%{!?python_sitelib: %define python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%endif
%description
Commandline client for the Open Build Service.
@ -176,7 +180,7 @@ install -Dm0755 dist/osc.complete %{buildroot}%{_libdir}/osc/complete
install -Dm644 osc.fish %{buildroot}%{_datadir}/fish/vendor_completions.d/osc.fish
install -m644 %{macros_file} -D %{buildroot}%{_sysconfdir}/rpm/%{macros_file}
install -m644 %{macros_file} -D %{buildroot}%{_rpmmacrodir}/%{macros_file}
%if 0%{?suse_version} >= 1500
%check
@ -203,7 +207,7 @@ rm -rf %{buildroot}
%else
%config %{_sysconfdir}/profile.d/osc.sh
%endif
%config %{_sysconfdir}/rpm/%{macros_file}
%{_rpmmacrodir}/%{macros_file}
%dir %{_localstatedir}/lib/osc-plugins
%{_mandir}/man1/osc.*
%if 0%{?suse_version} > 1110