diff --git a/0001-Fix-comparison-object-must-be-invocable-as-const-err.patch b/0001-Fix-comparison-object-must-be-invocable-as-const-err.patch new file mode 100644 index 0000000..db044a8 --- /dev/null +++ b/0001-Fix-comparison-object-must-be-invocable-as-const-err.patch @@ -0,0 +1,62 @@ +From 84592db9db303d4010dd0138b8d0ee40fd668167 Mon Sep 17 00:00:00 2001 +From: Michael Andres +Date: Fri, 20 Mar 2020 13:44:09 +0100 +Subject: [PATCH 1/2] Fix comparison object must be invocable as const errors + +--- + src/repos.cc | 2 +- + src/update.cc | 2 +- + src/utils/misc.h | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/repos.cc b/src/repos.cc +index da543f56..e5f2b016 100644 +--- a/src/repos.cc ++++ b/src/repos.cc +@@ -1473,7 +1473,7 @@ RepoInfoSet collect_repos_by_option( Zypper & zypper, const RepoServiceCommonSel + + if ( selectOpts._all ) + { +- std::for_each( repos.begin(), repos.end(), [&toModify] (const RepoInfo &info) { toModify.insert( info ); } ); ++ //std::for_each( repos.begin(), repos.end(), [&toModify] (const RepoInfo &info) { toModify.insert( info ); } ); + } + else + { +diff --git a/src/update.cc b/src/update.cc +index 0b004af3..38ca38cb 100755 +--- a/src/update.cc ++++ b/src/update.cc +@@ -248,7 +248,7 @@ namespace + + struct CategorySort + { +- bool operator()( const Patch::Category & lhs, const Patch::Category & rhs ) ++ bool operator()( const Patch::Category & lhs, const Patch::Category & rhs ) const + { + if ( lhs == rhs ) + return false; +diff --git a/src/utils/misc.h b/src/utils/misc.h +index cec76127..4de5b301 100644 +--- a/src/utils/misc.h ++++ b/src/utils/misc.h +@@ -182,7 +182,7 @@ std::string & indent( std::string & text, int columns ); + // comparator for RepoInfo set + struct RepoInfoAliasComparator + { +- bool operator()( const RepoInfo & a, const RepoInfo & b ) ++ bool operator()( const RepoInfo & a, const RepoInfo & b ) const + { return a.alias() < b.alias(); } + }; + +@@ -190,7 +190,7 @@ struct RepoInfoAliasComparator + // comparator for Service set + struct ServiceAliasComparator + { +- bool operator()( const repo::RepoInfoBase_Ptr & a, const repo::RepoInfoBase_Ptr & b ) ++ bool operator()( const repo::RepoInfoBase_Ptr & a, const repo::RepoInfoBase_Ptr & b ) const + { return a->alias() < b->alias(); } + }; + +-- +2.24.1 + diff --git a/0002-fixup-Fix-comparison-object-must-be-invocable-as-con.patch b/0002-fixup-Fix-comparison-object-must-be-invocable-as-con.patch new file mode 100644 index 0000000..522bd61 --- /dev/null +++ b/0002-fixup-Fix-comparison-object-must-be-invocable-as-con.patch @@ -0,0 +1,26 @@ +From 1a37b2a4631470a11c6b9ff00935978dcf8a0539 Mon Sep 17 00:00:00 2001 +From: Michael Andres +Date: Fri, 20 Mar 2020 15:14:24 +0100 +Subject: [PATCH 2/2] fixup! Fix comparison object must be invocable as const + errors + +--- + src/repos.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/repos.cc b/src/repos.cc +index e5f2b016..da543f56 100644 +--- a/src/repos.cc ++++ b/src/repos.cc +@@ -1473,7 +1473,7 @@ RepoInfoSet collect_repos_by_option( Zypper & zypper, const RepoServiceCommonSel + + if ( selectOpts._all ) + { +- //std::for_each( repos.begin(), repos.end(), [&toModify] (const RepoInfo &info) { toModify.insert( info ); } ); ++ std::for_each( repos.begin(), repos.end(), [&toModify] (const RepoInfo &info) { toModify.insert( info ); } ); + } + else + { +-- +2.24.1 + diff --git a/sources b/sources index e96c468..c233702 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (zypper-1.14.94.tar.gz) = 579f91def0c0e79ba81fe73341302ba1a8942a9878d2305ca11fb0a7747936612ed6eb91c68e6a0199687fd06ac0b9dc2fbae5dd9b895e484aa204b2b519dc2e +SHA512 (zypper-1.14.35.tar.gz) = c8be4ea7403f2cd3824bc18b11c41ada542ef3033dbe830e3dddf84118d7afaa912552c2e47ab852b8883eb93c2f0586f92866beaec4c3dba20cf9c11886491e diff --git a/zypper.spec b/zypper.spec index 472978a..ce5de92 100644 --- a/zypper.spec +++ b/zypper.spec @@ -1,21 +1,21 @@ -# Force out of source build -%undefine __cmake_in_source_build - -%global min_libzypp_ver 17.37.12 +%global min_libzypp_ver 17.23.2 Name: zypper -Version: 1.14.94 +Version: 1.14.35 Release: 2%{?dist} Summary: Command line package manager using libzypp -# Automatically converted from old format: GPLv2+ - review is highly recommended. -License: GPL-2.0-or-later +License: GPLv2+ URL: http://en.opensuse.org/Portal:Zypper Source0: https://github.com/openSUSE/zypper/archive/%{version}/%{name}-%{version}.tar.gz +# Backports from upstream +Patch0001: 0001-Fix-comparison-object-must-be-invocable-as-const-err.patch +Patch0002: 0002-fixup-Fix-comparison-object-must-be-invocable-as-con.patch + BuildRequires: %{_bindir}/asciidoctor BuildRequires: %{_bindir}/xsltproc -BuildRequires: cmake >= 3.5 +BuildRequires: cmake >= 3.1 BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: perl-generators @@ -27,6 +27,7 @@ BuildRequires: readline-devel BuildRequires: libxml2-devel BuildRequires: libzypp-devel >= %{min_libzypp_ver} Requires: libzypp%{?_isa} >= %{min_libzypp_ver} +Requires: procps # Blech, apparently we don't want bash-completion always... Cf. rhbz#1652183 Recommends: bash-completion @@ -40,7 +41,6 @@ Provides: zypper(oldpackage) Provides: zypper(updatestack-only) Provides: zypper(auto-agree-with-product-licenses) Provides: zypper(purge-kernels) -Provides: zypper(include-all-archs) %description @@ -62,6 +62,7 @@ accessing the Zypper log file. Summary: apt/aptitude CLI compatibility interface for Zypper Provides: %{name}-apt = %{version}-%{release} Requires: %{name} = %{version}-%{release} +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) Enhances: zypper BuildArch: noarch @@ -85,12 +86,12 @@ find -type f -exec sed -i -e "s|\${CMAKE_INSTALL_PREFIX}/lib/\${PACKAGE}|\${CMAK find -type f -exec sed -i -e "s|\${INSTALL_PREFIX}/share/doc/packages/\${PACKAGE}|\${INSTALL_PREFIX}/share/doc/\${PACKAGE}|g" {} ';' %build -%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDOC_INSTALL_DIR=%{_docdir} -DENABLE_BUILD_TESTS=ON -DENABLE_BUILD_TRANS=ON -%cmake_build +%cmake . -B"%{_vpath_builddir}" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDOC_INSTALL_DIR=%{_docdir} -DENABLE_BUILD_TESTS=ON -DENABLE_BUILD_TRANS=ON +%make_build -C %{_vpath_builddir} %install -%cmake_install +%make_install -C %{_vpath_builddir} mkdir -p %{buildroot}%{_libexecdir}/zypper/commands @@ -107,11 +108,10 @@ ln -sf zypp-aptitude %{buildroot}%{_bindir}/zypp-apt-get rm %{buildroot}%{_bindir}/apt ln -sf zypp-aptitude %{buildroot}%{_bindir}/zypp-apt -%if "%{_sbindir}" != "/usr/sbin" -# If sbin-bin merge, move everything accordingly -mv %{buildroot}%{_prefix}/sbin/* %{buildroot}%{_sbindir} -rmdir %{buildroot}%{_prefix}/sbin -%endif +# Move the bash completion file +mkdir -p %{buildroot}%{_datadir}/bash-completion/completions +mv %{buildroot}%{_sysconfdir}/bash_completion.d/zypper.sh %{buildroot}%{_datadir}/bash-completion/completions/zypper +rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d/ # Remove conflicting man page and rename needs-restarting rm %{buildroot}%{_mandir}/man1/needs-restarting.1* @@ -156,85 +156,6 @@ popd %changelog -* Fri Jul 17 2026 Fedora Release Engineering - 1.14.94-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild - -* Fri Jan 16 2026 Neal Gompa - 1.14.94-1 -- Update to 1.14.94 - -* Fri Jul 25 2025 Fedora Release Engineering - 1.14.88-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Wed Mar 19 2025 Neal Gompa - 1.14.88-1 -- Rebase to 1.14.88 - -* Sun Jan 19 2025 Fedora Release Engineering - 1.14.73-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Fri Jul 26 2024 Miroslav Suchý - 1.14.73-3 -- convert license to SPDX - -* Sat Jul 20 2024 Fedora Release Engineering - 1.14.73-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Wed Jun 05 2024 Neal Gompa - 1.14.73-1 -- Update to 1.14.73 - -* Sun Apr 14 2024 Neal Gompa - 1.14.68-2 -- Rebuild for libzypp-tui soname fix - -* Mon Mar 04 2024 Neal Gompa - 1.14.68-1 -- Update to 1.14.68 - -* Sat Jan 27 2024 Fedora Release Engineering - 1.14.59-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 1.14.59-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Thu Mar 09 2023 Neal Gompa - 1.14.59-1 -- Update to 1.14.59 - -* Sat Jan 21 2023 Fedora Release Engineering - 1.14.55-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Fri Sep 02 2022 Neal Gompa - 1.14.55-1 -- Update to 1.14.55 (#1932773) - -* Sat Jul 23 2022 Fedora Release Engineering - 1.14.42-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jun 01 2022 Jitka Plesnikova - 1.14.42-5 -- Perl 5.36 rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 1.14.42-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 1.14.42-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Fri May 21 2021 Jitka Plesnikova - 1.14.42-2 -- Perl 5.34 rebuild - -* Thu Feb 11 2021 Neal Gompa - 1.14.42-1 -- Update to 1.14.42 (#1823433) - -* Thu Jan 28 2021 Fedora Release Engineering - 1.14.37-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Sat Aug 08 2020 Neal Gompa - 1.14.37-1 -- Update to 1.14.37 (#1823433) - -* Sat Aug 01 2020 Fedora Release Engineering - 1.14.35-5 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 1.14.35-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jun 25 2020 Jitka Plesnikova - 1.14.35-3 -- Perl 5.32 rebuild - * Fri Mar 20 2020 Neal Gompa - 1.14.35-2 - Backport fixup commit for building with C++17