From 3833179bb27a5f73ca057c93c56570cf058b7679f756cfe5f86397d440013834 Mon Sep 17 00:00:00 2001 From: Frank Schreiner Date: Thu, 22 Feb 2018 13:03:44 +0000 Subject: [PATCH 1/6] Accepting request 579003 from home:M0ses:branches:system:packagemanager - changed to provide createrepo as update-alternatives [bnc#1075670] - also provide createrepo-implementation OBS-URL: https://build.opensuse.org/request/show/579003 OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/createrepo_c?expand=0&rev=18 --- createrepo_c.changes | 6 +++++ createrepo_c.spec | 58 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 62 insertions(+), 2 deletions(-) diff --git a/createrepo_c.changes b/createrepo_c.changes index bb78c9f..1b84a04 100644 --- a/createrepo_c.changes +++ b/createrepo_c.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Feb 21 15:58:06 UTC 2018 - FSchreiner@suse.com + +- changed to provide createrepo as update-alternatives [bnc#1075670] +- also provide createrepo-implementation + ------------------------------------------------------------------- Sun Feb 19 12:57:21 UTC 2017 - ngompa13@gmail.com diff --git a/createrepo_c.spec b/createrepo_c.spec index 58dad9a..a482064 100644 --- a/createrepo_c.spec +++ b/createrepo_c.spec @@ -1,7 +1,7 @@ # # spec file for package createrepo_c # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2015-2017 Neal Gompa . # # All modifications and additions to the file contributed by third parties @@ -39,7 +39,7 @@ Name: createrepo_c Summary: Creates a common metadata repository -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/Packages Version: 0.10.0.git20170131.04828e6 Release: 0 @@ -80,6 +80,11 @@ BuildRequires: drpm-devel Requires: %{libname} = %{version}-%{release} +Requires(post): update-alternatives +Requires(postun): update-alternatives + +Provides: createrepo-implementation + # prevent provides from nonstandard paths: %global __provides_exclude ^(%{python_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so)$ @@ -167,6 +172,15 @@ make ARGS="-V" test -C py3/build %install %make_install -C build +mkdir -p %{buildroot}%{_sysconfdir}/alternatives +ln -s -f %{_sysconfdir}/alternatives/createrepo %{buildroot}%{_bindir}/createrepo +ln -s -f %{_sysconfdir}/alternatives/mergerepo %{buildroot}%{_bindir}/mergerepo +ln -s -f %{_sysconfdir}/alternatives/modifyrepo %{buildroot}%{_bindir}/modifyrepo +ln -s -f %{_sysconfdir}/alternatives/sqliterepo %{buildroot}%{_bindir}/sqliterepo +ln -s -f %{_sysconfdir}/alternatives/createrepo.8.gz %{buildroot}%{_mandir}/man8/createrepo.8.gz +ln -s -f %{_sysconfdir}/alternatives/mergerepo.8.gz %{buildroot}%{_mandir}/man8/mergerepo.8.gz +ln -s -f %{_sysconfdir}/alternatives/modifyrepo.8.gz %{buildroot}%{_mandir}/man8/modifyrepo.8.gz +ln -s -f %{_sysconfdir}/alternatives/sqliterepo.8.gz %{buildroot}%{_mandir}/man8/sqliterepo.8.gz %if %{with python} %if %{with python3} @@ -175,29 +189,67 @@ make ARGS="-V" test -C py3/build %endif %fdupes %{buildroot}%{_prefix} +%fdupes build/doc/html +%clean +exit 0 + +%post +update-alternatives --install \ + %{_bindir}/createrepo createrepo %{_bindir}/createrepo_c 20 \ + --slave %{_bindir}/mergerepo mergerepo %{_bindir}/mergerepo_c \ + --slave %{_bindir}/modifyrepo modifyrepo %{_bindir}/modifyrepo_c \ + --slave %{_bindir}/sqliterepo sqliterepo %{_bindir}/sqliterepo_c \ + --slave %{_mandir}/man8/createrepo.8.gz createrepo.8.gz %{_mandir}/man8/createrepo_c.8.gz \ + --slave %{_mandir}/man8/mergerepo.8.gz mergerepo.8.gz %{_mandir}/man8/mergerepo_c.8.gz \ + --slave %{_mandir}/man8/modifyrepo.8.gz modifyrepo.8.gz %{_mandir}/man8/modifyrepo_c.8.gz \ + --slave %{_mandir}/man8/sqliterepo.8.gz sqliterepo.8.gz %{_mandir}/man8/sqliterepo_c.8.gz + +%postun +if [ ! -f %{_bindir}/createrepo_c ];then + update-alternatives --remove createrepo %{_bindir}/createrepo_c +fi %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %files +%defattr(-,root,root) %doc README.md COPYING %{_mandir}/man8/createrepo_c.8* %{_mandir}/man8/mergerepo_c.8* %{_mandir}/man8/modifyrepo_c.8* %{_mandir}/man8/sqliterepo_c.8* +%{_mandir}/man8/createrepo.8* +%{_mandir}/man8/mergerepo.8* +%{_mandir}/man8/modifyrepo.8* +%{_mandir}/man8/sqliterepo.8* %{_datadir}/bash-completion/completions/ %{_bindir}/createrepo_c %{_bindir}/mergerepo_c %{_bindir}/modifyrepo_c %{_bindir}/sqliterepo_c +%{_bindir}/createrepo +%{_bindir}/mergerepo +%{_bindir}/modifyrepo +%{_bindir}/sqliterepo +%ghost %_sysconfdir/alternatives/createrepo +%ghost %_sysconfdir/alternatives/mergerepo +%ghost %_sysconfdir/alternatives/modifyrepo +%ghost %_sysconfdir/alternatives/sqliterepo +%ghost %_sysconfdir/alternatives/createrepo.8.gz +%ghost %_sysconfdir/alternatives/mergerepo.8.gz +%ghost %_sysconfdir/alternatives/modifyrepo.8.gz +%ghost %_sysconfdir/alternatives/sqliterepo.8.gz %files -n %{libname} +%defattr(-,root,root) %doc COPYING %{_libdir}/libcreaterepo_c.so.%{major} %{_libdir}/libcreaterepo_c.so.%{major}.* %files -n %{devname} +%defattr(-,root,root) %doc build/doc/html COPYING %{_libdir}/libcreaterepo_c.so %{_libdir}/pkgconfig/createrepo_c.pc @@ -205,11 +257,13 @@ make ARGS="-V" test -C py3/build %if %{with python} %files -n python2-%{name} +%defattr(-,root,root) %doc COPYING %{python_sitearch}/createrepo_c/ %if %{with python3} %files -n python3-%{name} +%defattr(-,root,root) %doc COPYING %{python3_sitearch}/createrepo_c/ %endif From beadcff91aad5994b8b84a6327862722c93e7bbd948e11a66ccb6138d939b53c Mon Sep 17 00:00:00 2001 From: Frank Schreiner Date: Thu, 22 Feb 2018 13:45:14 +0000 Subject: [PATCH 2/6] Accepting request 579021 from home:M0ses:branches:system:packagemanager - Disable tests on SLE12 due to the python-nose requirements - Switch to singlespec buidling of python bindings - Make sure to use cmake macros to have it easier to gork what is happending by overriding %__builddir - Sort out with spec-cleaner - Fix embedding of date and time to documentation OBS-URL: https://build.opensuse.org/request/show/579021 OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/createrepo_c?expand=0&rev=19 --- createrepo_c.changes | 14 +++++ createrepo_c.spec | 126 +++++++++++++++++++++---------------------- 2 files changed, 77 insertions(+), 63 deletions(-) diff --git a/createrepo_c.changes b/createrepo_c.changes index 1b84a04..472c2cd 100644 --- a/createrepo_c.changes +++ b/createrepo_c.changes @@ -4,6 +4,20 @@ Wed Feb 21 15:58:06 UTC 2018 - FSchreiner@suse.com - changed to provide createrepo as update-alternatives [bnc#1075670] - also provide createrepo-implementation +------------------------------------------------------------------- +Tue Feb 13 11:53:58 UTC 2018 - tchvatal@suse.com + +- Disable tests on SLE12 due to the python-nose requirements + +------------------------------------------------------------------- +Mon Jan 22 11:58:46 UTC 2018 - tchvatal@suse.com + +- Switch to singlespec buidling of python bindings +- Make sure to use cmake macros to have it easier to gork what is + happending by overriding %__builddir +- Sort out with spec-cleaner +- Fix embedding of date and time to documentation + ------------------------------------------------------------------- Sun Feb 19 12:57:21 UTC 2017 - ngompa13@gmail.com diff --git a/createrepo_c.spec b/createrepo_c.spec index a482064..9e93c43 100644 --- a/createrepo_c.spec +++ b/createrepo_c.spec @@ -17,41 +17,44 @@ # -# Enable Python bindings selectively -%if (0%{?suse_version} == 1315 && 0%{?is_opensuse}) || 0%{?leap_version} || 0%{?suse_version} >= 1330 -# Python bindings are enabled for openSUSE Leap and Tumbleweed -%bcond_without python +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%if 0%{?is_opensuse} || 0%{?suse_version} >= 1330 %bcond_without python3 +%bcond_without tests %else -# Python bindings are disabled for older SUSE -%bcond_with python +%define skip_python3 1 +%bcond_with tests %bcond_with python3 %endif - -# Enable enhanced DeltaRPM support -%bcond_with drpm - %define major 0 %define libname lib%{name}%{major} %define devname lib%{name}-devel - %define version_unconverted 0.10.0.git20170131.04828e6 - +# prevent provides from nonstandard paths: +%global __provides_exclude ^(%{python_sitearch}/.*\\.so\\|%{python3_sitearch}/.*\\.so)$ +# Enable Python bindings selectively +%bcond_without python2 +# Enable enhanced DeltaRPM support +%bcond_with drpm Name: createrepo_c +Version: 0.10.0.git20170131.04828e6 +Release: 0 Summary: Creates a common metadata repository License: GPL-2.0-or-later Group: System/Packages -Version: 0.10.0.git20170131.04828e6 -Release: 0 Url: https://github.com/rpm-software-management/createrepo_c Source0: %{name}-%{version}.tar.gz - -BuildRequires: bash-completion - -%if 0%{?suse_version} >= 1330 -BuildRequires: bash-completion-devel +%if 0%{?is_opensuse} || 0%{?suse_version} >= 1330 +BuildRequires: %{python_module devel} +%else +%if %{with python2} +BuildRequires: python-devel %endif - +%if %{with python3} +BuildRequires: python3-devel +%endif +%endif +BuildRequires: bash-completion BuildRequires: cmake BuildRequires: doxygen BuildRequires: fdupes @@ -63,16 +66,18 @@ BuildRequires: libexpat-devel BuildRequires: libxml2-devel BuildRequires: lzma-devel BuildRequires: openssl-devel +%if 0%{?is_opensuse} || 0%{?suse_version} >= 1330 +BuildRequires: python-rpm-macros +%endif BuildRequires: rpm-devel >= 4.9.0 BuildRequires: sqlite3-devel BuildRequires: zlib-devel -%if %{with python} -BuildRequires: python-devel -BuildRequires: python-nose -%if %{with python3} -BuildRequires: python3-devel -BuildRequires: python3-nose +Requires: %{libname} = %{version}-%{release} +%if %{with tests} +BuildRequires: %{python_module nose} %endif +%if 0%{?suse_version} >= 1330 +BuildRequires: bash-completion-devel %endif %if %{with drpm} BuildRequires: drpm-devel @@ -108,25 +113,23 @@ for easy manipulation with a repodata. %package -n %{devname} Summary: Library for repodata manipulation Group: Development/Libraries/C and C++ -Provides: %{name}-devel = %{version}-%{release} Requires: %{libname} = %{version}-%{release} -Requires: pkg-config +Requires: pkgconfig +Provides: %{name}-devel = %{version}-%{release} %description -n %{devname} This package contains the createrepo_c C library and header files. These development files are for easy manipulation with a repodata. -%if %{with python} %package -n python2-%{name} Summary: Python 2 bindings for the createrepo_c library Group: Development/Libraries/Python -Provides: python-%{name} = %{version}-%{release} Requires: %{libname} = %{version}-%{release} +Provides: python-%{name} = %{version}-%{release} %description -n python2-createrepo_c Python 2 bindings for the createrepo_c library. -%if %{with python3} %package -n python3-%{name} Summary: Python 3 bindings for the createrepo_c library Group: Development/Libraries/Python @@ -134,44 +137,50 @@ Requires: %{libname} = %{version}-%{release} %description -n python3-createrepo_c Python 3 bindings for the createrepo_c library. -%endif -%endif %prep %setup -q - -%if %{with python3} -rm -rf py3 -mkdir py3 -%endif +# do not hardcode date in the docs +sed -i -e '/HTML_TIMESTAMP/d' doc/Doxyfile.in.in %build -%cmake -DENABLE_LEGACY_WEAKTAGS=1 %{!?with_drpm:-DENABLE_DRPM=OFF} %{!?with_python:-DENABLE_PYTHON=OFF} +%define __builddir build +%cmake \ + -DENABLE_LEGACY_WEAKTAGS=1 \ + %{!?with_drpm:-DENABLE_DRPM=OFF} \ + %{!?with_python2:-DENABLE_PYTHON=OFF} make %{?_smp_mflags} -make doc-c +make %{?_smp_mflags} doc-c -%if %{with python} %if %{with python3} -pushd ../py3 -%cmake -DPYTHON_DESIRED:str=3 ../../ +cd .. +%define __builddir build-py3 +%cmake \ + -DENABLE_LEGACY_WEAKTAGS=1 \ + %{!?with_drpm:-DENABLE_DRPM=OFF} \ + %{!?with_python3:-DENABLE_PYTHON=OFF} \ + -DPYTHON_DESIRED:str=3 make %{?_smp_mflags} -popd -%endif %endif %check -make tests -C build -make ARGS="-V" test -C build - -%if %{with python} +%if %{with tests} +%define __builddir build +%ctest %if %{with python3} -make tests -C py3/build -make ARGS="-V" test -C py3/build +%define __builddir build-py3 +%ctest %endif %endif %install -%make_install -C build +%define __builddir build +%cmake_install +%if %{with python3} +%define __builddir build-py3 +%cmake_install +%endif + mkdir -p %{buildroot}%{_sysconfdir}/alternatives ln -s -f %{_sysconfdir}/alternatives/createrepo %{buildroot}%{_bindir}/createrepo ln -s -f %{_sysconfdir}/alternatives/mergerepo %{buildroot}%{_bindir}/mergerepo @@ -182,16 +191,8 @@ ln -s -f %{_sysconfdir}/alternatives/mergerepo.8.gz %{buildroot}%{_mandir}/man8 ln -s -f %{_sysconfdir}/alternatives/modifyrepo.8.gz %{buildroot}%{_mandir}/man8/modifyrepo.8.gz ln -s -f %{_sysconfdir}/alternatives/sqliterepo.8.gz %{buildroot}%{_mandir}/man8/sqliterepo.8.gz -%if %{with python} -%if %{with python3} -%make_install -C py3/build -%endif -%endif - %fdupes %{buildroot}%{_prefix} %fdupes build/doc/html -%clean -exit 0 %post update-alternatives --install \ @@ -210,7 +211,6 @@ if [ ! -f %{_bindir}/createrepo_c ];then fi %post -n %{libname} -p /sbin/ldconfig - %postun -n %{libname} -p /sbin/ldconfig %files @@ -255,11 +255,12 @@ fi %{_libdir}/pkgconfig/createrepo_c.pc %{_includedir}/createrepo_c/ -%if %{with python} +%if %{with python2} %files -n python2-%{name} %defattr(-,root,root) %doc COPYING %{python_sitearch}/createrepo_c/ +%endif %if %{with python3} %files -n python3-%{name} @@ -267,6 +268,5 @@ fi %doc COPYING %{python3_sitearch}/createrepo_c/ %endif -%endif %changelog From df0b3cc2bdba02fcf5d9fb515d1b6cdb7b458491390288ec8fdbc4fbc4391c36 Mon Sep 17 00:00:00 2001 From: Frank Schreiner Date: Thu, 22 Feb 2018 14:10:10 +0000 Subject: [PATCH 3/6] - [bnc#1075670] changed to provide createrepo as update-alternative because createrepo_c will replace createrepo because of switch to python3 OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/createrepo_c?expand=0&rev=20 --- createrepo_c.changes | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/createrepo_c.changes b/createrepo_c.changes index 472c2cd..a4a133d 100644 --- a/createrepo_c.changes +++ b/createrepo_c.changes @@ -1,7 +1,9 @@ ------------------------------------------------------------------- Wed Feb 21 15:58:06 UTC 2018 - FSchreiner@suse.com -- changed to provide createrepo as update-alternatives [bnc#1075670] +- [bnc#1075670] changed to provide createrepo as update-alternative + because createrepo_c will replace createrepo because of switch to + python3 - also provide createrepo-implementation ------------------------------------------------------------------- From 9c862c511ae446a55166c53b2b3db163bce2475b8def7b4422ee9beb1192d9ca Mon Sep 17 00:00:00 2001 From: Frank Schreiner Date: Wed, 28 Feb 2018 15:16:41 +0000 Subject: [PATCH 4/6] fixes for symlinks OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/createrepo_c?expand=0&rev=21 --- createrepo_c.spec | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/createrepo_c.spec b/createrepo_c.spec index 9e93c43..700af96 100644 --- a/createrepo_c.spec +++ b/createrepo_c.spec @@ -128,7 +128,7 @@ Requires: %{libname} = %{version}-%{release} Provides: python-%{name} = %{version}-%{release} %description -n python2-createrepo_c -Python 2 bindings for the createrepo_c library. +The python 2 bindings for the createrepo_c library. %package -n python3-%{name} Summary: Python 3 bindings for the createrepo_c library @@ -136,7 +136,7 @@ Group: Development/Libraries/Python Requires: %{libname} = %{version}-%{release} %description -n python3-createrepo_c -Python 3 bindings for the createrepo_c library. +The python 3 bindings for the createrepo_c library. %prep %setup -q @@ -182,14 +182,10 @@ make %{?_smp_mflags} %endif mkdir -p %{buildroot}%{_sysconfdir}/alternatives -ln -s -f %{_sysconfdir}/alternatives/createrepo %{buildroot}%{_bindir}/createrepo -ln -s -f %{_sysconfdir}/alternatives/mergerepo %{buildroot}%{_bindir}/mergerepo -ln -s -f %{_sysconfdir}/alternatives/modifyrepo %{buildroot}%{_bindir}/modifyrepo -ln -s -f %{_sysconfdir}/alternatives/sqliterepo %{buildroot}%{_bindir}/sqliterepo -ln -s -f %{_sysconfdir}/alternatives/createrepo.8.gz %{buildroot}%{_mandir}/man8/createrepo.8.gz -ln -s -f %{_sysconfdir}/alternatives/mergerepo.8.gz %{buildroot}%{_mandir}/man8/mergerepo.8.gz -ln -s -f %{_sysconfdir}/alternatives/modifyrepo.8.gz %{buildroot}%{_mandir}/man8/modifyrepo.8.gz -ln -s -f %{_sysconfdir}/alternatives/sqliterepo.8.gz %{buildroot}%{_mandir}/man8/sqliterepo.8.gz +for i in createrepo mergerepo modifyrepo sqliterepo;do + ln -s -f %{_bindir}/$i\_c %{buildroot}%{_sysconfdir}/alternatives/$i + ln -s -f %{_mandir}/man8/$i\_c.8.gz %{buildroot}%{_sysconfdir}/alternatives/$i\.8.gz +done %fdupes %{buildroot}%{_prefix} %fdupes build/doc/html @@ -220,19 +216,11 @@ fi %{_mandir}/man8/mergerepo_c.8* %{_mandir}/man8/modifyrepo_c.8* %{_mandir}/man8/sqliterepo_c.8* -%{_mandir}/man8/createrepo.8* -%{_mandir}/man8/mergerepo.8* -%{_mandir}/man8/modifyrepo.8* -%{_mandir}/man8/sqliterepo.8* %{_datadir}/bash-completion/completions/ %{_bindir}/createrepo_c %{_bindir}/mergerepo_c %{_bindir}/modifyrepo_c %{_bindir}/sqliterepo_c -%{_bindir}/createrepo -%{_bindir}/mergerepo -%{_bindir}/modifyrepo -%{_bindir}/sqliterepo %ghost %_sysconfdir/alternatives/createrepo %ghost %_sysconfdir/alternatives/mergerepo %ghost %_sysconfdir/alternatives/modifyrepo From dc9a961cb813226b7e4b299ee86b9e7a3c7fc23518587969de7147a649592180 Mon Sep 17 00:00:00 2001 From: Frank Schreiner Date: Wed, 28 Feb 2018 15:46:43 +0000 Subject: [PATCH 5/6] OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/createrepo_c?expand=0&rev=22 --- createrepo_c.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/createrepo_c.spec b/createrepo_c.spec index 700af96..6c9caec 100644 --- a/createrepo_c.spec +++ b/createrepo_c.spec @@ -184,7 +184,9 @@ make %{?_smp_mflags} mkdir -p %{buildroot}%{_sysconfdir}/alternatives for i in createrepo mergerepo modifyrepo sqliterepo;do ln -s -f %{_bindir}/$i\_c %{buildroot}%{_sysconfdir}/alternatives/$i + ln -s -f %{_sysconfdir}/alternatives/$i %{buildroot}%{_bindir}/$i ln -s -f %{_mandir}/man8/$i\_c.8.gz %{buildroot}%{_sysconfdir}/alternatives/$i\.8.gz + ln -s -f %{_sysconfdir}/alternatives/$i\.8.gz %{buildroot}%{_mandir}/man8/$i\.8.gz done %fdupes %{buildroot}%{_prefix} @@ -216,11 +218,19 @@ fi %{_mandir}/man8/mergerepo_c.8* %{_mandir}/man8/modifyrepo_c.8* %{_mandir}/man8/sqliterepo_c.8* +%{_mandir}/man8/createrepo.8* +%{_mandir}/man8/mergerepo.8* +%{_mandir}/man8/modifyrepo.8* +%{_mandir}/man8/sqliterepo.8* %{_datadir}/bash-completion/completions/ %{_bindir}/createrepo_c %{_bindir}/mergerepo_c %{_bindir}/modifyrepo_c %{_bindir}/sqliterepo_c +%{_bindir}/createrepo +%{_bindir}/mergerepo +%{_bindir}/modifyrepo +%{_bindir}/sqliterepo %ghost %_sysconfdir/alternatives/createrepo %ghost %_sysconfdir/alternatives/mergerepo %ghost %_sysconfdir/alternatives/modifyrepo From 6e211119831228deb5c45607945797aa55d377864ab86369fbe931930110997e Mon Sep 17 00:00:00 2001 From: Frank Schreiner Date: Wed, 28 Feb 2018 16:03:51 +0000 Subject: [PATCH 6/6] avoid using 'ln -sf' OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/createrepo_c?expand=0&rev=23 --- createrepo_c.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/createrepo_c.spec b/createrepo_c.spec index 6c9caec..5b5842e 100644 --- a/createrepo_c.spec +++ b/createrepo_c.spec @@ -183,10 +183,10 @@ make %{?_smp_mflags} mkdir -p %{buildroot}%{_sysconfdir}/alternatives for i in createrepo mergerepo modifyrepo sqliterepo;do - ln -s -f %{_bindir}/$i\_c %{buildroot}%{_sysconfdir}/alternatives/$i - ln -s -f %{_sysconfdir}/alternatives/$i %{buildroot}%{_bindir}/$i - ln -s -f %{_mandir}/man8/$i\_c.8.gz %{buildroot}%{_sysconfdir}/alternatives/$i\.8.gz - ln -s -f %{_sysconfdir}/alternatives/$i\.8.gz %{buildroot}%{_mandir}/man8/$i\.8.gz + ln -s %{_bindir}/$i\_c %{buildroot}%{_sysconfdir}/alternatives/$i + ln -s %{_sysconfdir}/alternatives/$i %{buildroot}%{_bindir}/$i + ln -s %{_mandir}/man8/$i\_c.8.gz %{buildroot}%{_sysconfdir}/alternatives/$i\.8.gz + ln -s %{_sysconfdir}/alternatives/$i\.8.gz %{buildroot}%{_mandir}/man8/$i\.8.gz done %fdupes %{buildroot}%{_prefix}