2007-01-10 17:50:00 +01:00
|
|
|
#
|
2010-04-07 18:27:28 +02:00
|
|
|
# spec file for package libzypp
|
2007-01-10 17:50:00 +01:00
|
|
|
#
|
2020-02-07 09:10:35 +01:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2007-01-10 17:50:00 +01:00
|
|
|
#
|
2011-10-18 18:26:16 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-09-17 16:53:40 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-10 17:50:00 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-01-23 18:05:06 +01:00
|
|
|
%if 0%{?is_opensuse} && (0%{?sle_version} >= 150100 || 0%{?suse_version} > 1500)
|
2020-01-23 08:30:46 +01:00
|
|
|
%bcond_without zchunk
|
|
|
|
%else
|
|
|
|
%bcond_with zchunk
|
|
|
|
%endif
|
2020-09-18 14:47:40 +02:00
|
|
|
# libsolvs external references require us to link against it:
|
|
|
|
%if 0%{?sle_version} >= 150000 || 0%{?suse_version} >= 1500
|
|
|
|
%bcond_without zstd
|
|
|
|
%else
|
|
|
|
%bcond_with zstd
|
|
|
|
%endif
|
2020-01-23 08:30:46 +01:00
|
|
|
|
2020-02-20 17:40:51 +01:00
|
|
|
%bcond_without mediabackend_tests
|
|
|
|
|
2007-01-10 17:50:00 +01:00
|
|
|
Name: libzypp
|
2020-12-11 17:09:41 +01:00
|
|
|
Version: 17.25.5
|
2014-10-20 11:06:41 +02:00
|
|
|
Release: 0
|
2020-02-07 09:10:35 +01:00
|
|
|
URL: https://github.com/openSUSE/libzypp
|
2018-11-20 12:41:59 +01:00
|
|
|
Summary: Library for package, patch, pattern and product management
|
2018-05-15 13:17:27 +02:00
|
|
|
License: GPL-2.0-or-later
|
2013-07-04 14:28:20 +02:00
|
|
|
Group: System/Packages
|
2014-10-20 11:06:41 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2009-07-11 17:26:42 +02:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
|
|
|
Source1: %{name}-rpmlintrc
|
2007-04-20 01:16:38 +02:00
|
|
|
Provides: yast2-packagemanager
|
2007-01-10 17:50:00 +01:00
|
|
|
Obsoletes: yast2-packagemanager
|
2011-06-28 16:21:02 +02:00
|
|
|
|
|
|
|
# Features we provide (update doc/autoinclude/FeatureTest.doc):
|
2018-01-04 20:03:37 +01:00
|
|
|
Provides: libzypp(plugin) = 0.1
|
2014-09-25 18:16:12 +02:00
|
|
|
Provides: libzypp(plugin:appdata) = 0
|
2013-11-20 16:53:13 +01:00
|
|
|
Provides: libzypp(plugin:commit) = 1
|
2016-04-25 15:51:54 +02:00
|
|
|
Provides: libzypp(plugin:services) = 1
|
2016-03-18 15:32:03 +01:00
|
|
|
Provides: libzypp(plugin:system) = 1
|
2011-06-28 16:21:02 +02:00
|
|
|
Provides: libzypp(plugin:urlresolver) = 0
|
2017-11-22 10:48:34 +01:00
|
|
|
Provides: libzypp(repovarexpand) = 1.1
|
2011-06-28 16:21:02 +02:00
|
|
|
|
2010-03-01 01:43:27 +01:00
|
|
|
%if 0%{?suse_version}
|
2008-10-24 15:19:57 +02:00
|
|
|
Recommends: logrotate
|
2011-05-31 10:54:37 +02:00
|
|
|
# lsof is used for 'zypper ps':
|
|
|
|
Recommends: lsof
|
2011-06-06 17:11:19 +02:00
|
|
|
%endif
|
2020-03-20 11:36:53 +01:00
|
|
|
BuildRequires: cmake >= 3.1
|
2009-07-16 16:54:21 +02:00
|
|
|
BuildRequires: openssl-devel
|
2016-06-09 18:56:00 +02:00
|
|
|
BuildRequires: pkgconfig(libudev)
|
2017-12-04 11:18:23 +01:00
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
BuildRequires: libboost_headers-devel
|
|
|
|
BuildRequires: libboost_program_options-devel
|
|
|
|
BuildRequires: libboost_test-devel
|
2018-03-02 16:20:48 +01:00
|
|
|
BuildRequires: libboost_thread-devel
|
2017-12-04 11:18:23 +01:00
|
|
|
%else
|
2010-05-17 17:03:29 +02:00
|
|
|
BuildRequires: boost-devel
|
2017-12-04 11:18:23 +01:00
|
|
|
%endif
|
2010-05-17 17:03:29 +02:00
|
|
|
BuildRequires: dejagnu
|
|
|
|
BuildRequires: doxygen
|
2020-03-06 13:59:54 +01:00
|
|
|
BuildRequires: gcc-c++ >= 7
|
2010-05-17 17:03:29 +02:00
|
|
|
BuildRequires: gettext-devel
|
|
|
|
BuildRequires: graphviz
|
|
|
|
BuildRequires: libxml2-devel
|
2020-09-18 12:34:01 +02:00
|
|
|
BuildRequires: yaml-cpp-devel
|
2012-03-19 14:20:30 +01:00
|
|
|
%if 0%{?suse_version} != 1110
|
|
|
|
# No libproxy on SLES
|
2010-12-22 16:34:28 +01:00
|
|
|
BuildRequires: libproxy-devel
|
2012-03-19 14:20:30 +01:00
|
|
|
%endif
|
2012-01-03 15:39:35 +01:00
|
|
|
|
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
%else
|
2011-11-07 15:59:40 +01:00
|
|
|
BuildRequires: pkg-config
|
2012-01-03 15:39:35 +01:00
|
|
|
%endif
|
2010-04-07 18:27:28 +02:00
|
|
|
|
2020-09-18 12:34:01 +02:00
|
|
|
BuildRequires: libsolv-devel >= 0.7.15
|
2011-05-19 17:06:27 +02:00
|
|
|
%if 0%{?suse_version} >= 1100
|
2014-09-24 16:07:07 +02:00
|
|
|
BuildRequires: libsolv-tools
|
2011-10-10 18:39:56 +02:00
|
|
|
%requires_eq libsolv-tools
|
2010-03-01 01:43:27 +01:00
|
|
|
%else
|
2011-10-10 18:39:56 +02:00
|
|
|
Requires: libsolv-tools
|
2010-03-01 01:43:27 +01:00
|
|
|
%endif
|
|
|
|
|
2020-02-04 17:53:29 +01:00
|
|
|
BuildRequires: glib2-devel
|
|
|
|
BuildRequires: libsigc++2-devel
|
|
|
|
|
|
|
|
# required for testsuite
|
2020-02-20 17:40:51 +01:00
|
|
|
%if %{with mediabackend_tests}
|
2020-02-04 17:53:29 +01:00
|
|
|
BuildRequires: nginx
|
2020-02-20 17:40:51 +01:00
|
|
|
%endif
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2011-10-18 18:26:16 +02:00
|
|
|
Requires: rpm
|
2011-09-07 13:05:51 +02:00
|
|
|
|
2008-11-23 09:10:54 +01:00
|
|
|
%if 0%{?suse_version}
|
2017-08-16 11:03:35 +02:00
|
|
|
BuildRequires: rpm-devel > 4.4
|
2008-03-14 18:05:48 +01:00
|
|
|
%endif
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2011-08-01 18:20:37 +02:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
|
2010-05-17 17:03:29 +02:00
|
|
|
BuildRequires: popt-devel
|
2017-08-16 11:03:35 +02:00
|
|
|
BuildRequires: rpm-devel > 4.4
|
2008-02-26 11:52:16 +01:00
|
|
|
%endif
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2008-02-26 11:52:16 +01:00
|
|
|
%if 0%{?mandriva_version}
|
2017-08-16 11:03:35 +02:00
|
|
|
BuildRequires: librpm-devel > 4.4
|
2008-02-26 11:52:16 +01:00
|
|
|
%endif
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2008-02-26 11:52:16 +01:00
|
|
|
%if 0%{?suse_version}
|
2018-02-27 14:24:20 +01:00
|
|
|
BuildRequires: libgpgme-devel
|
2020-02-04 17:53:29 +01:00
|
|
|
#testsuite
|
2020-02-20 17:40:51 +01:00
|
|
|
%if %{with mediabackend_tests}
|
2020-02-04 17:53:29 +01:00
|
|
|
BuildRequires: FastCGI-devel
|
2020-02-20 17:40:51 +01:00
|
|
|
%endif
|
2008-02-26 11:52:16 +01:00
|
|
|
%else
|
2018-02-27 14:24:20 +01:00
|
|
|
BuildRequires: gpgme-devel
|
2020-02-04 17:53:29 +01:00
|
|
|
#testsuite
|
2020-02-20 17:40:51 +01:00
|
|
|
%if %{with mediabackend_tests}
|
2020-02-04 17:53:29 +01:00
|
|
|
BuildRequires: fcgi-devel
|
2008-02-26 11:52:16 +01:00
|
|
|
%endif
|
2020-02-20 17:40:51 +01:00
|
|
|
%endif
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2011-12-08 12:27:09 +01:00
|
|
|
%define min_curl_version 7.19.4
|
2010-03-01 01:43:27 +01:00
|
|
|
%if 0%{?suse_version}
|
2011-05-19 17:06:27 +02:00
|
|
|
%if 0%{?suse_version} >= 1100
|
|
|
|
# Code11+
|
|
|
|
BuildRequires: libcurl-devel >= %{min_curl_version}
|
|
|
|
Requires: libcurl4 >= %{min_curl_version}
|
2010-03-01 01:43:27 +01:00
|
|
|
%else
|
2011-05-19 17:06:27 +02:00
|
|
|
# Code10
|
|
|
|
BuildRequires: curl-devel
|
2010-03-01 01:43:27 +01:00
|
|
|
%endif
|
2011-05-19 17:06:27 +02:00
|
|
|
%else
|
|
|
|
# Other distros (Fedora)
|
2009-12-04 12:10:16 +01:00
|
|
|
BuildRequires: libcurl-devel >= %{min_curl_version}
|
2011-05-19 17:06:27 +02:00
|
|
|
Requires: libcurl >= %{min_curl_version}
|
|
|
|
%endif
|
2007-01-10 17:50:00 +01:00
|
|
|
|
2018-03-01 15:08:56 +01:00
|
|
|
# required for documentation
|
2018-03-09 11:29:47 +01:00
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
BuildRequires: rubygem(asciidoctor)
|
|
|
|
%else
|
2018-03-01 15:08:56 +01:00
|
|
|
BuildRequires: asciidoc
|
2018-03-07 10:07:23 +01:00
|
|
|
BuildRequires: libxslt-tools
|
2018-03-09 11:29:47 +01:00
|
|
|
%endif
|
2018-03-01 15:08:56 +01:00
|
|
|
|
2020-01-23 08:30:46 +01:00
|
|
|
%if %{with zchunk}
|
|
|
|
BuildRequires: libzck-devel
|
|
|
|
%endif
|
2020-09-18 14:47:40 +02:00
|
|
|
%if %{with zstd}
|
|
|
|
BuildRequires: libzstd-devel
|
|
|
|
%endif
|
2020-01-23 08:30:46 +01:00
|
|
|
|
2007-01-10 17:50:00 +01:00
|
|
|
%description
|
2018-11-20 12:41:59 +01:00
|
|
|
libzypp is the package management library that powers applications
|
|
|
|
like YaST, zypper and the openSUSE/SLE implementation of PackageKit.
|
|
|
|
|
|
|
|
libzypp provides functionality for a package manager:
|
|
|
|
|
|
|
|
* An API for package repository management, supporting most common
|
|
|
|
repository metadata formats and signed repositories.
|
|
|
|
* An API for solving packages, products, patterns and patches
|
|
|
|
(installation, removal, update and distribution upgrade
|
|
|
|
operations) dependencies, with additional features like locking.
|
|
|
|
* An API for commiting the transaction to the system over a rpm
|
|
|
|
target. Supporting deltarpm calculation, media changing and
|
|
|
|
installation order calculation.
|
|
|
|
* An API for browsing available and installed software, with some
|
|
|
|
facilities for programs with an user interface.
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%package devel
|
2018-11-20 12:41:59 +01:00
|
|
|
Summary: Header files for libzypp, a library for package management
|
2014-10-20 11:06:41 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Provides: yast2-packagemanager-devel
|
|
|
|
Obsoletes: yast2-packagemanager-devel
|
2017-12-04 11:18:23 +01:00
|
|
|
%if 0%{?suse_version} >= 1330
|
|
|
|
Requires: libboost_headers-devel
|
|
|
|
Requires: libboost_program_options-devel
|
|
|
|
Requires: libboost_test-devel
|
2018-03-02 16:20:48 +01:00
|
|
|
Requires: libboost_thread-devel
|
2017-12-04 11:18:23 +01:00
|
|
|
%else
|
2013-07-04 14:28:20 +02:00
|
|
|
Requires: boost-devel
|
2017-12-04 11:18:23 +01:00
|
|
|
%endif
|
2013-07-04 14:28:20 +02:00
|
|
|
Requires: bzip2
|
|
|
|
Requires: glibc-devel
|
|
|
|
Requires: libstdc++-devel
|
2019-07-22 10:14:37 +02:00
|
|
|
Requires: libudev-devel
|
2010-05-17 17:03:29 +02:00
|
|
|
Requires: libxml2-devel
|
2013-07-04 14:28:20 +02:00
|
|
|
Requires: libzypp = %{version}
|
2010-05-17 17:03:29 +02:00
|
|
|
Requires: openssl-devel
|
2013-07-04 14:28:20 +02:00
|
|
|
Requires: popt-devel
|
2017-08-16 11:03:35 +02:00
|
|
|
Requires: rpm-devel > 4.4
|
2010-05-17 17:03:29 +02:00
|
|
|
Requires: zlib-devel
|
2010-03-01 01:43:27 +01:00
|
|
|
%if 0%{?suse_version}
|
2011-05-19 17:06:27 +02:00
|
|
|
%if 0%{?suse_version} >= 1100
|
|
|
|
# Code11+
|
2011-10-18 18:26:16 +02:00
|
|
|
Requires: libcurl-devel >= %{min_curl_version}
|
2011-05-19 17:06:27 +02:00
|
|
|
%else
|
|
|
|
# Code10
|
2011-10-18 18:26:16 +02:00
|
|
|
Requires: curl-devel
|
2011-05-19 17:06:27 +02:00
|
|
|
%endif
|
|
|
|
%else
|
|
|
|
# Other distros (Fedora)
|
2011-10-18 18:26:16 +02:00
|
|
|
Requires: libcurl-devel >= %{min_curl_version}
|
2011-05-19 17:06:27 +02:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} >= 1100
|
2011-10-10 18:39:56 +02:00
|
|
|
%requires_ge libsolv-devel
|
2010-03-01 01:43:27 +01:00
|
|
|
%else
|
2011-10-10 18:39:56 +02:00
|
|
|
Requires: libsolv-devel
|
2010-03-01 01:43:27 +01:00
|
|
|
%endif
|
2014-10-20 11:06:41 +02:00
|
|
|
|
|
|
|
%description devel
|
2018-11-20 12:41:59 +01:00
|
|
|
Development files for libzypp, a library for package, patch, pattern
|
|
|
|
and product management.
|
2014-10-20 11:06:41 +02:00
|
|
|
|
|
|
|
%package devel-doc
|
2018-11-20 12:41:59 +01:00
|
|
|
Summary: Developer documentation for libzypp
|
2014-10-20 11:06:41 +02:00
|
|
|
Group: Documentation/HTML
|
2007-01-10 17:50:00 +01:00
|
|
|
|
2014-10-20 11:06:41 +02:00
|
|
|
%description devel-doc
|
2018-11-20 12:41:59 +01:00
|
|
|
Developer documentation for libzypp.
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%prep
|
2007-03-01 22:15:26 +01:00
|
|
|
%setup -q
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%build
|
2007-03-01 22:15:26 +01:00
|
|
|
mkdir build
|
|
|
|
cd build
|
2018-11-20 12:41:59 +01:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
export CXXFLAGS="%{optflags}"
|
2012-03-19 13:15:06 +01:00
|
|
|
unset EXTRA_CMAKE_OPTIONS
|
2014-09-18 15:47:38 +02:00
|
|
|
# No libproxy on SLE11
|
|
|
|
%if 0%{?suse_version} == 1110
|
|
|
|
export EXTRA_CMAKE_OPTIONS="-DDISABLE_LIBPROXY=ON"
|
|
|
|
%endif
|
|
|
|
|
2010-05-17 17:03:29 +02:00
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
2019-04-02 18:13:30 +02:00
|
|
|
-DENABLE_BUILD_DOCS=TRUE \
|
|
|
|
-DENABLE_BUILD_TRANS=TRUE \
|
|
|
|
-DENABLE_BUILD_TESTS=TRUE \
|
2008-03-14 18:05:48 +01:00
|
|
|
-DDOC_INSTALL_DIR=%{_docdir} \
|
2007-04-04 20:54:31 +02:00
|
|
|
-DLIB=%{_lib} \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_SKIP_RPATH=1 \
|
2020-01-23 08:30:46 +01:00
|
|
|
%{?with_zchunk:-DENABLE_ZCHUNK_COMPRESSION=1} \
|
2020-09-18 14:47:40 +02:00
|
|
|
%{?with_zstd:-DENABLE_ZSTD_COMPRESSION=1} \
|
2020-02-20 17:40:51 +01:00
|
|
|
%{!?with_mediabackend_tests:-DDISABLE_MEDIABACKEND_TESTS=1} \
|
2012-03-19 13:15:06 +01:00
|
|
|
${EXTRA_CMAKE_OPTIONS} \
|
2007-04-04 20:54:31 +02:00
|
|
|
..
|
2010-05-17 17:03:29 +02:00
|
|
|
make %{?_smp_mflags} VERBOSE=1
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%install
|
2007-03-01 22:15:26 +01:00
|
|
|
cd build
|
2018-11-20 12:41:59 +01:00
|
|
|
%make_install
|
2011-08-01 18:20:37 +02:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
|
2018-11-20 12:41:59 +01:00
|
|
|
ln -s %{_sysconfdir}/yum.repos.d %{buildroot}/%{_sysconfdir}/zypp/repos.d
|
2011-04-14 10:27:51 +02:00
|
|
|
%else
|
2018-11-20 12:41:59 +01:00
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/zypp/repos.d
|
2011-04-14 10:27:51 +02:00
|
|
|
%endif
|
2018-11-20 12:41:59 +01:00
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/zypp/services.d
|
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/zypp/systemCheck.d
|
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/zypp/vars.d
|
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/zypp/vendors.d
|
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/zypp/multiversion.d
|
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/zypp/needreboot.d
|
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/zypp/credentials.d
|
|
|
|
mkdir -p %{buildroot}/%{_prefix}/lib/zypp
|
|
|
|
mkdir -p %{buildroot}/%{_prefix}/lib/zypp/plugins
|
|
|
|
mkdir -p %{buildroot}/%{_prefix}/lib/zypp/plugins/appdata
|
|
|
|
mkdir -p %{buildroot}/%{_prefix}/lib/zypp/plugins/commit
|
|
|
|
mkdir -p %{buildroot}/%{_prefix}/lib/zypp/plugins/services
|
|
|
|
mkdir -p %{buildroot}/%{_prefix}/lib/zypp/plugins/system
|
|
|
|
mkdir -p %{buildroot}/%{_prefix}/lib/zypp/plugins/urlresolver
|
|
|
|
mkdir -p %{buildroot}/%{_var}/lib/zypp
|
|
|
|
mkdir -p %{buildroot}/%{_var}/log/zypp
|
|
|
|
mkdir -p %{buildroot}/%{_var}/cache/zypp
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2017-09-22 12:28:13 +02:00
|
|
|
# Default to 'solver.dupAllowVendorChange = false' on TW and post SLE12
|
|
|
|
%if 0%{?suse_version} >= 1330 || "%{distribution}" == "openSUSE Tumbleweed"
|
2017-06-30 14:53:52 +02:00
|
|
|
sed -i "s|# solver.dupAllowVendorChange = true|solver.dupAllowVendorChange = false|g" %{buildroot}%{_sysconfdir}/zypp/zypp.conf
|
|
|
|
%endif
|
|
|
|
|
2007-03-01 22:15:26 +01:00
|
|
|
cd ..
|
2019-04-02 18:13:30 +02:00
|
|
|
|
|
|
|
# Create filelist with translations
|
2007-01-10 17:50:00 +01:00
|
|
|
%{find_lang} zypp
|
|
|
|
|
2018-02-06 17:48:10 +01:00
|
|
|
%check
|
|
|
|
pushd build/tests
|
2020-02-04 17:53:29 +01:00
|
|
|
LD_LIBRARY_PATH="$(pwd)/../zypp:$LD_LIBRARY_PATH" ctest --output-on-failure .
|
2018-02-06 17:48:10 +01:00
|
|
|
popd
|
|
|
|
|
2007-01-10 17:50:00 +01:00
|
|
|
%post
|
2010-03-01 01:43:27 +01:00
|
|
|
/sbin/ldconfig
|
2008-02-26 11:52:16 +01:00
|
|
|
if [ -f /var/cache/zypp/zypp.db ]; then rm /var/cache/zypp/zypp.db; fi
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2008-05-26 19:04:04 +02:00
|
|
|
# convert old lock file to new
|
|
|
|
# TODO make this a separate file?
|
|
|
|
# TODO run the sript only when updating form pre-11.0 libzypp versions
|
2010-05-17 17:03:29 +02:00
|
|
|
LOCKSFILE=%{_sysconfdir}/zypp/locks
|
|
|
|
OLDLOCKSFILE=%{_sysconfdir}/zypp/locks.old
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2008-05-26 19:04:04 +02:00
|
|
|
is_old(){
|
2008-12-07 21:57:57 +01:00
|
|
|
# if no such file, exit with false (1 in bash)
|
|
|
|
test -f ${LOCKSFILE} || return 1
|
2008-05-26 19:04:04 +02:00
|
|
|
TEMP_FILE=`mktemp`
|
|
|
|
cat ${LOCKSFILE} | sed '/^\#.*/ d;/.*:.*/d;/^[^[a-zA-Z\*?.0-9]*$/d' > ${TEMP_FILE}
|
|
|
|
if [ -s ${TEMP_FILE} ]
|
|
|
|
then
|
|
|
|
RES=0
|
|
|
|
else
|
|
|
|
RES=1
|
|
|
|
fi
|
|
|
|
rm -f ${TEMP_FILE}
|
|
|
|
return ${RES}
|
|
|
|
}
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2008-05-26 19:04:04 +02:00
|
|
|
append_new_lock(){
|
|
|
|
case "$#" in
|
|
|
|
1 )
|
|
|
|
echo "
|
|
|
|
solvable_name: $1
|
|
|
|
match_type: glob
|
|
|
|
" >> ${LOCKSFILE}
|
|
|
|
;;
|
|
|
|
2 ) #TODO version
|
|
|
|
echo "
|
|
|
|
solvable_name: $1
|
|
|
|
match_type: glob
|
|
|
|
version: $2
|
|
|
|
" >> ${LOCKSFILE}
|
|
|
|
;;
|
|
|
|
3 ) #TODO version
|
|
|
|
echo "
|
|
|
|
solvable_name: $1
|
|
|
|
match_type: glob
|
|
|
|
version: $2 $3
|
|
|
|
" >> ${LOCKSFILE}
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2008-05-26 19:04:04 +02:00
|
|
|
die() {
|
|
|
|
echo $1
|
|
|
|
exit 1
|
|
|
|
}
|
2010-03-01 01:43:27 +01:00
|
|
|
|
2008-05-26 19:04:04 +02:00
|
|
|
if is_old ${LOCKSFILE}
|
|
|
|
then
|
|
|
|
mv -f ${LOCKSFILE} ${OLDLOCKSFILE} || die "cannot backup old locks"
|
|
|
|
cat ${OLDLOCKSFILE}| sed "/^\#.*/d"| while read line
|
|
|
|
do
|
|
|
|
append_new_lock $line
|
|
|
|
done
|
|
|
|
fi
|
2007-01-10 17:50:00 +01:00
|
|
|
|
2010-03-01 01:43:27 +01:00
|
|
|
%postun -p /sbin/ldconfig
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%files -f zypp.lang
|
|
|
|
%defattr(-,root,root)
|
2018-08-24 16:56:26 +02:00
|
|
|
%if 0%{?suse_version} >= 1500
|
2018-08-14 16:28:57 +02:00
|
|
|
%license COPYING
|
2018-08-24 16:56:26 +02:00
|
|
|
%endif
|
2010-05-17 17:03:29 +02:00
|
|
|
%dir %{_sysconfdir}/zypp
|
2011-08-01 18:20:37 +02:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} >= 600 || 0%{?centos_version} >= 600
|
2011-04-14 10:27:51 +02:00
|
|
|
%{_sysconfdir}/zypp/repos.d
|
|
|
|
%else
|
2010-05-17 17:03:29 +02:00
|
|
|
%dir %{_sysconfdir}/zypp/repos.d
|
2011-04-14 10:27:51 +02:00
|
|
|
%endif
|
2010-05-17 17:03:29 +02:00
|
|
|
%dir %{_sysconfdir}/zypp/services.d
|
2015-05-21 13:20:45 +02:00
|
|
|
%dir %{_sysconfdir}/zypp/systemCheck.d
|
2017-07-06 15:50:31 +02:00
|
|
|
%dir %{_sysconfdir}/zypp/vars.d
|
2012-04-16 15:14:15 +02:00
|
|
|
%dir %{_sysconfdir}/zypp/vendors.d
|
|
|
|
%dir %{_sysconfdir}/zypp/multiversion.d
|
2018-11-14 12:06:26 +01:00
|
|
|
%config(noreplace) %{_sysconfdir}/zypp/needreboot
|
|
|
|
%dir %{_sysconfdir}/zypp/needreboot.d
|
2016-04-25 15:20:47 +02:00
|
|
|
%dir %{_sysconfdir}/zypp/credentials.d
|
2010-05-17 17:03:29 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/zypp/zypp.conf
|
|
|
|
%config(noreplace) %{_sysconfdir}/zypp/systemCheck
|
2008-10-24 15:19:57 +02:00
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/zypp-history.lr
|
2008-09-25 13:18:59 +02:00
|
|
|
%dir %{_var}/lib/zypp
|
2018-12-07 10:38:28 +01:00
|
|
|
%dir %attr(750,root,root) %{_var}/log/zypp
|
2008-09-25 13:18:59 +02:00
|
|
|
%dir %{_var}/cache/zypp
|
2010-05-17 17:03:29 +02:00
|
|
|
%{_prefix}/lib/zypp
|
|
|
|
%{_datadir}/zypp
|
|
|
|
%{_bindir}/*
|
2007-09-11 00:44:02 +02:00
|
|
|
%{_libdir}/libzypp*so.*
|
2014-10-05 01:32:20 +02:00
|
|
|
%doc %{_mandir}/man1/*.1.*
|
|
|
|
%doc %{_mandir}/man5/*.5.*
|
2007-01-10 17:50:00 +01:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
2007-03-01 22:15:26 +01:00
|
|
|
%{_libdir}/libzypp.so
|
2010-05-17 17:03:29 +02:00
|
|
|
%{_includedir}/zypp
|
|
|
|
%{_datadir}/cmake/Modules/*
|
2007-01-10 17:50:00 +01:00
|
|
|
%{_libdir}/pkgconfig/libzypp.pc
|
2007-12-02 15:09:03 +01:00
|
|
|
|
2014-10-20 11:06:41 +02:00
|
|
|
%files devel-doc
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_docdir}/%{name}
|
|
|
|
|
2007-02-27 13:42:36 +01:00
|
|
|
%changelog
|