From 95b9221a235c7bbd5fb28bac400602a1d962484d Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Sat, 6 Jan 2024 05:42:22 +0100 Subject: [PATCH] package created using the webbuild interface [release 1.8.1-1mamba;Thu May 17 2018] --- README.md | 2 + librepo-1.8.1-xattr-glibc.patch | 116 ++++++++++++++++++++++++++++++++ librepo.spec | 78 +++++++++++++++++++++ 3 files changed, 196 insertions(+) create mode 100644 librepo-1.8.1-xattr-glibc.patch create mode 100644 librepo.spec diff --git a/README.md b/README.md index d394880..21dfda9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # librepo +A library providing C and Python (libcURL like) API for downloading packages and linux repository metadata in rpm-md format. + diff --git a/librepo-1.8.1-xattr-glibc.patch b/librepo-1.8.1-xattr-glibc.patch new file mode 100644 index 0000000..e528e78 --- /dev/null +++ b/librepo-1.8.1-xattr-glibc.patch @@ -0,0 +1,116 @@ +From 1dff9c2c8271ba7019b9a9a4d3612b6d4ff86b2b Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Sat, 10 Feb 2018 18:28:28 +0100 +Subject: [PATCH] stop requiring attr(xattr) + +Latest xattr dropped xattr bits because they are in glibc. + +Fixes: https://github.com/rpm-software-management/librepo/issues/121 +Signed-off-by: Igor Gnatenko +--- + CMakeLists.txt | 1 - + cmake/Modules/FindXattr.cmake | 29 ----------------------------- + librepo/checksum.c | 3 ++- + librepo/downloader.c | 2 +- + tests/test_checksum.c | 3 ++- + 5 files changed, 5 insertions(+), 33 deletions(-) + delete mode 100644 cmake/Modules/FindXattr.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e5c8c2e..90cf9b0 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -32,7 +32,6 @@ PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto openssl) + FIND_PACKAGE(EXPAT REQUIRED) + FIND_PACKAGE(CURL REQUIRED) + FIND_PACKAGE(Gpgme REQUIRED) +-FIND_PACKAGE(Xattr REQUIRED) + + INCLUDE_DIRECTORIES(${GLIB2_INCLUDE_DIRS}) + +diff --git a/cmake/Modules/FindXattr.cmake b/cmake/Modules/FindXattr.cmake +deleted file mode 100644 +index fce2c56..0000000 +--- a/cmake/Modules/FindXattr.cmake ++++ /dev/null +@@ -1,29 +0,0 @@ +-# XATTR_FOUND libattr found +-# XATTR_INCLUDE_DIRS include directories +-# XATTR_LIBRARIES libattr library +- +-FIND_PATH(XATTR_INCLUDE attr/xattr.h +- /usr/include +- /usr/local/include +- ${CMAKE_INCLUDE_PATH} +- ${CMAKE_INSTALL_PREFIX}/usr/include +-) +- +-FIND_LIBRARY(XATTR_LIB NAMES attr libattr +- PATHS +- ${CMAKE_LIBRARY_PATH} +- ${CMAKE_INSTALL_PREFIX}/lib +-) +- +-IF(XATTR_INCLUDE AND XATTR_LIB) +- SET(XATTR_FOUND TRUE) +- SET(XATTR_INCLUDE_DIRS ${XATTR_INCLUDE}) +- SET(XATTR_LIBRARIES ${XATTR_LIB}) +- MESSAGE(STATUS "Found xattr") +-ELSE(XATTR_INCLUDE AND XATTR_LIB) +- SET(XATTR_FOUND FALSE) +- SET(XATTR_LIBRARIES "") +- MESSAGE(STATUS "Not found xattr") +-ENDIF(XATTR_INCLUDE AND XATTR_LIB) +- +-MARK_AS_ADVANCED( XATTR_LIB XATTR_INCLUDE ) +diff --git a/librepo/checksum.c b/librepo/checksum.c +index d005397..f55735c 100644 +--- a/librepo/checksum.c ++++ b/librepo/checksum.c +@@ -23,10 +23,11 @@ + #include + #include + #include ++#include + #include + #include ++#include + #include +-#include + #include + + #include "cleanup.h" +diff --git a/librepo/downloader.c b/librepo/downloader.c +index 5995da0..cf4f050 100644 +--- a/librepo/downloader.c ++++ b/librepo/downloader.c +@@ -28,9 +28,9 @@ + #include + #include + #include ++#include + #include + #include +-#include + + #include "downloader.h" + #include "downloader_internal.h" +diff --git a/tests/test_checksum.c b/tests/test_checksum.c +index ab75038..023ae55 100644 +--- a/tests/test_checksum.c ++++ b/tests/test_checksum.c +@@ -1,12 +1,13 @@ + #define _GNU_SOURCE ++#include + #include + #include + #include + #include + #include + #include ++#include + #include +-#include + + #include "librepo/util.h" + #include "librepo/checksum.h" diff --git a/librepo.spec b/librepo.spec new file mode 100644 index 0000000..a1bc436 --- /dev/null +++ b/librepo.spec @@ -0,0 +1,78 @@ +Name: librepo +Version: 1.8.1 +Release: 1mamba +Summary: A library providing C and Python API for downloading packages and linux repository metadata in rpm-md format +Group: System/Libraries +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: http://rpm-software-management.github.io/librepo/ +## GITSOURCE https://github.com/rpm-software-management/librepo.git 1.8.1 +Source: https://github.com/rpm-software-management/librepo.git/%{version}/librepo-%{version}.tar.bz2 +Patch0: librepo-1.8.1-xattr-glibc.patch +License: LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libassuan-devel +BuildRequires: libcurl-devel +BuildRequires: libexpat-devel +BuildRequires: libglib-devel +BuildRequires: libgpg-error-devel +BuildRequires: libgpgme-devel +BuildRequires: libopenssl-devel +BuildRequires: libpython-devel +BuildRequires: libpython27-devel +## AUTOBUILDREQ-END +BuildRequires: cmake +BuildRoot: %{_tmppath}/%{name}-%{version}-root + +%description +A library providing C and Python (libcURL like) API for downloading packages and linux repository metadata in rpm-md format. + +%package devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} +Requires: pkg-config + +%description devel +This package contains libraries and header files for developing applications that use %{name}. + +%debug_package + +%prep +%setup -q +%patch0 -p1 + +%build +%cmake -d build +%make + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall -C build + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_libdir}/librepo.so.* +%doc AUTHORS COPYING +%dir %{python27_sitearch}/librepo +%{python27_sitearch}/librepo/* + +%files devel +%defattr(-,root,root) +%dir %{_includedir}/librepo +%{_includedir}/librepo/*.h +%{_libdir}/librepo.so +%{_libdir}/pkgconfig/librepo.pc +%doc README.md + +%changelog +* Thu May 17 2018 Silvan Calarco 1.8.1-1mamba +- package created using the webbuild interface