[packages/librepo] - 1.13.0 - python 2 support gone upstream
baggins
baggins at pld-linux.org
Sun Mar 14 01:17:55 CET 2021
commit ba50824e90233bb95a26457ec43fadf81a20d190
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Mar 14 01:17:27 2021 +0100
- 1.13.0
- python 2 support gone upstream
librepo-attr.patch | 49 ------------------------------------
librepo-link.patch | 10 ++++----
librepo.spec | 67 +++++--------------------------------------------
sphinx_executable.patch | 4 +--
4 files changed, 13 insertions(+), 117 deletions(-)
---
diff --git a/librepo.spec b/librepo.spec
index 628fe80..15b43fa 100644
--- a/librepo.spec
+++ b/librepo.spec
@@ -1,21 +1,19 @@
#
# Conditional build:
%bcond_without apidocs # doxygen/sphinx API documentation
-%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
Summary: Library for downloading Linux repository metadata and packages
Summary(pl.UTF-8): Biblioteka do pobierania metadanych repozytoriów roaz pakietów dla Linuksa
Name: librepo
-Version: 1.8.1
-Release: 6
+Version: 1.13.0
+Release: 1
License: GPL v2+
Group: Libraries
#Source0Download: https://github.com/rpm-software-management/librepo/releases
Source0: https://github.com/rpm-software-management/librepo/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 01fe130eb421580d62e97e4991e94df7
+# Source0-md5: 52dd2f4d9108a92f221bde3279bb75f1
Patch0: %{name}-link.patch
-Patch1: %{name}-attr.patch
Patch2: sphinx_executable.patch
URL: http://rpm-software-management.github.io/librepo/
BuildRequires: check-devel
@@ -27,15 +25,12 @@ BuildRequires: glib2-devel >= 2.0
BuildRequires: gpgme-devel
BuildRequires: openssl-devel
BuildRequires: rpmbuild(macros) >= 1.605
-%if %{with python2}
-BuildRequires: python-devel >= 1:2
-%{?with_apidocs:BuildRequires: sphinx-pdg-2}
-%endif
%if %{with python3}
BuildRequires: python3-devel >= 1:3
%{?with_apidocs:BuildRequires: sphinx-pdg-3}
%endif
BuildRequires: tar >= 1:1.22
+BuildRequires: zchunk-devel >= 0.9.11
BuildRequires: xz
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -76,18 +71,6 @@ API documentation for librepo library.
%description apidocs -l pl.UTF-8
Dokumentacja API biblioteki librepo.
-%package -n python-librepo
-Summary: Python 2 binding for librepo library
-Summary(pl.UTF-8): Wiązanie Pythona 2 do biblioteki librepo
-Group: Libraries/Python
-Requires: %{name} = %{version}-%{release}
-
-%description -n python-librepo
-Python 2 binding for librepo library.
-
-%description -n python-librepo -l pl.UTF-8
-Wiązanie Pythona 2 do biblioteki librepo.
-
%package -n python3-librepo
Summary: Python 3 binding for librepo library
Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki librepo
@@ -103,41 +86,23 @@ Wiązanie Pythona 3 do biblioteki librepo.
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%patch2 -p1
%build
install -d build
cd build
%cmake .. \
-%if %{with python2}
- -DPYTHON_DESIRED=2 \
- -DPYTHON_INSTALL_DIR="%{py_sitedir}" \
- -DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-2
-%endif
-
-%{__make}
-
-%if %{with apidocs}
-%{__make} doc
-%endif
-cd ..
-
%if %{with python3}
-install -d build-py3
-cd build-py3
-%cmake .. \
-DPYTHON_DESIRED=3 \
-DPYTHON_INSTALL_DIR="%{py3_sitedir}" \
-DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-3
+%endif
%{__make}
%if %{with apidocs}
%{__make} doc
%endif
-cd ..
-%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -145,15 +110,6 @@ rm -rf $RPM_BUILD_ROOT
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
-%if %{with python3}
-%{__make} -C build-py3 install \
- DESTDIR=$RPM_BUILD_ROOT
-%endif
-
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}/librepo
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/librepo
-%py_postclean
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -177,22 +133,11 @@ rm -rf $RPM_BUILD_ROOT
%doc build/doc/c/html/*
%endif
-%if %{with python2}
-%files -n python-librepo
-%defattr(644,root,root,755)
-%if %{with apidocs}
-%doc build/doc/python/{*.html,_sources,_static}
-%endif
-%dir %{py_sitedir}/librepo
-%attr(755,root,root) %{py_sitedir}/librepo/_librepomodule.so
-%{py_sitedir}/librepo/__init__.py[co]
-%endif
-
%if %{with python3}
%files -n python3-librepo
%defattr(644,root,root,755)
%if %{with apidocs}
-%doc build-py3/doc/python/{*.html,_sources,_static}
+%doc build/doc/python/{*.html,_sources,_static}
%endif
%dir %{py3_sitedir}/librepo
%attr(755,root,root) %{py3_sitedir}/librepo/_librepo.so
diff --git a/librepo-attr.patch b/librepo-attr.patch
deleted file mode 100644
index 805e6f4..0000000
--- a/librepo-attr.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-diff -urNp -x '*.orig' librepo-1.8.1.org/CMakeLists.txt librepo-1.8.1/CMakeLists.txt
---- librepo-1.8.1.org/CMakeLists.txt 2017-09-01 17:45:17.000000000 +0200
-+++ librepo-1.8.1/CMakeLists.txt 2021-03-05 22:44:35.111104671 +0100
-@@ -32,7 +32,6 @@ PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED lib
- FIND_PACKAGE(EXPAT REQUIRED)
- FIND_PACKAGE(CURL REQUIRED)
- FIND_PACKAGE(Gpgme REQUIRED)
--FIND_PACKAGE(Xattr REQUIRED)
-
- INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS})
-
-diff -urNp -x '*.orig' librepo-1.8.1.org/librepo/checksum.c librepo-1.8.1/librepo/checksum.c
---- librepo-1.8.1.org/librepo/checksum.c 2017-09-01 17:45:17.000000000 +0200
-+++ librepo-1.8.1/librepo/checksum.c 2021-03-05 22:44:35.111104671 +0100
-@@ -26,7 +26,8 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
--#include <attr/xattr.h>
-+#include <errno.h>
-+#include <sys/xattr.h>
- #include <openssl/evp.h>
-
- #include "cleanup.h"
-diff -urNp -x '*.orig' librepo-1.8.1.org/librepo/downloader.c librepo-1.8.1/librepo/downloader.c
---- librepo-1.8.1.org/librepo/downloader.c 2017-09-01 17:45:17.000000000 +0200
-+++ librepo-1.8.1/librepo/downloader.c 2021-03-05 22:44:35.111104671 +0100
-@@ -30,7 +30,7 @@
- #include <sys/stat.h>
- #include <fcntl.h>
- #include <curl/curl.h>
--#include <attr/xattr.h>
-+#include <sys/xattr.h>
-
- #include "downloader.h"
- #include "downloader_internal.h"
-diff -urNp -x '*.orig' librepo-1.8.1.org/tests/test_checksum.c librepo-1.8.1/tests/test_checksum.c
---- librepo-1.8.1.org/tests/test_checksum.c 2017-09-01 17:45:17.000000000 +0200
-+++ librepo-1.8.1/tests/test_checksum.c 2021-03-05 22:44:35.111104671 +0100
-@@ -6,7 +6,8 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <fcntl.h>
--#include <attr/xattr.h>
-+#include <errno.h>
-+#include <sys/xattr.h>
-
- #include "librepo/util.h"
- #include "librepo/checksum.h"
diff --git a/librepo-link.patch b/librepo-link.patch
index 23ed2af..775e6d9 100644
--- a/librepo-link.patch
+++ b/librepo-link.patch
@@ -1,11 +1,11 @@
-diff -urNp -x '*.orig' librepo-1.8.1.org/librepo/CMakeLists.txt librepo-1.8.1/librepo/CMakeLists.txt
---- librepo-1.8.1.org/librepo/CMakeLists.txt 2017-09-01 17:45:17.000000000 +0200
-+++ librepo-1.8.1/librepo/CMakeLists.txt 2021-03-05 22:44:35.021105057 +0100
+diff -urNp -x '*.orig' librepo-1.13.0.org/librepo/CMakeLists.txt librepo-1.13.0/librepo/CMakeLists.txt
+--- librepo-1.13.0.org/librepo/CMakeLists.txt 2021-02-03 00:12:04.000000000 +0100
++++ librepo-1.13.0/librepo/CMakeLists.txt 2021-03-14 01:01:38.088147093 +0100
@@ -52,6 +52,7 @@ TARGET_LINK_LIBRARIES(librepo
${LIBCRYPTO_LIBRARIES}
${GPGME_VANILLA_LIBRARIES}
${GLIB2_LIBRARIES}
+ crypto
)
- SET_TARGET_PROPERTIES(librepo PROPERTIES OUTPUT_NAME "repo")
- SET_TARGET_PROPERTIES(librepo PROPERTIES SOVERSION 0)
+ IF (WITH_ZCHUNK)
+ TARGET_LINK_LIBRARIES(librepo ${ZCHUNKLIB_LIBRARIES})
diff --git a/sphinx_executable.patch b/sphinx_executable.patch
index fd111fc..32397ed 100644
--- a/sphinx_executable.patch
+++ b/sphinx_executable.patch
@@ -3,8 +3,8 @@ diff -urNp -x '*.orig' librepo-1.8.1.org/doc/python/CMakeLists.txt librepo-1.8.1
+++ librepo-1.8.1/doc/python/CMakeLists.txt 2021-03-05 22:44:35.207770924 +0100
@@ -1,5 +1,5 @@
ADD_CUSTOM_TARGET (doc-python
-- PYTHONPATH=${CMAKE_BINARY_DIR}/librepo/python/python${PYTHON_DESIRED} sphinx-build -E -b html
-+ PYTHONPATH=${CMAKE_BINARY_DIR}/librepo/python/python${PYTHON_DESIRED} ${SPHINX_EXECUTABLE} -E -b html
+- PYTHONPATH=${CMAKE_BINARY_DIR}/librepo/python/ sphinx-build -E -b html
++ PYTHONPATH=${CMAKE_BINARY_DIR}/librepo/python/ ${SPHINX_EXECUTABLE} -E -b html
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Building Python API documentation with Sphinx")
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/librepo.git/commitdiff/ba50824e90233bb95a26457ec43fadf81a20d190
More information about the pld-cvs-commit
mailing list