From 87fdacfd43227b12aa88cfb8a957ae5ea1750a25 Mon Sep 17 00:00:00 2001 From: Patrick Creech Date: Tue, 27 Feb 2024 19:35:33 -0500 Subject: [PATCH 1/6] Build python-solv --- package_manifest.yaml | 1 + packages/python-solv/libsolv-0.7.28.tar.gz | 1 + packages/python-solv/python-solv.spec | 150 +++++++++++++++++++++ 3 files changed, 152 insertions(+) create mode 120000 packages/python-solv/libsolv-0.7.28.tar.gz create mode 100644 packages/python-solv/python-solv.spec diff --git a/package_manifest.yaml b/package_manifest.yaml index a34f79d59..68068d7cb 100644 --- a/package_manifest.yaml +++ b/package_manifest.yaml @@ -366,6 +366,7 @@ tier4_packages: python-shellingham: {} python-six: {} python-smmap: {} + python-solv: {} python-sniffio: {} python-tablib: {} python-tomlkit: {} diff --git a/packages/python-solv/libsolv-0.7.28.tar.gz b/packages/python-solv/libsolv-0.7.28.tar.gz new file mode 120000 index 000000000..fb59cb18b --- /dev/null +++ b/packages/python-solv/libsolv-0.7.28.tar.gz @@ -0,0 +1 @@ +../../.git/annex/objects/88/qg/SHA256E-s752701--bd2406f498fea6086ae0eacbf8b188c98b380e59af2267170e6a7b7d715cb207.tar.gz/SHA256E-s752701--bd2406f498fea6086ae0eacbf8b188c98b380e59af2267170e6a7b7d715cb207.tar.gz \ No newline at end of file diff --git a/packages/python-solv/python-solv.spec b/packages/python-solv/python-solv.spec new file mode 100644 index 000000000..30d28fd56 --- /dev/null +++ b/packages/python-solv/python-solv.spec @@ -0,0 +1,150 @@ +%global libname solv + +%global python3_pkgversion 3.11 +%global __python3 /usr/bin/python3.11 + +%bcond_without python_bindings + +# Creates special prefixed pseudo-packages from appdata metadata +%bcond_without appdata + +# Creates special prefixed "group:", "category:" pseudo-packages +%bcond_without comps +%bcond_without conda + +# For rich dependencies +%bcond_without complex_deps + +%bcond_without helix_repo +%bcond_without suse_repo +%bcond_without debian_repo +%bcond_without arch_repo + +# For handling deb + rpm at the same time +%bcond_without multi_semantics +%bcond_with zchunk + +%bcond_without zstd + +%define __cmake_switch(b:) %{expand:%%{?with_%{-b*}:ON}}%{expand:%%{!?with_%{-b*}:OFF}} + +Name: python-%{libname} +Version: 0.7.28 +Release: 1%{?dist} +Summary: Python bindings for the lib%{libname} library + +License: BSD +URL: https://github.com/openSUSE/libsolv +Source: %{url}/archive/%{version}/lib%{libname}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: gcc-c++ +BuildRequires: ninja-build +BuildRequires: pkgconfig(rpm) +BuildRequires: zlib-devel + + +BuildRequires: swig +BuildRequires: python%{python3_pkgversion}-devel + +# -DWITH_LIBXML2=ON +BuildRequires: libxml2-devel + +# -DWITH_OPENSSL=ON +BuildRequires: pkgconfig(openssl) + +# -DENABLE_LZMA_COMPRESSION=ON +BuildRequires: xz-devel + +# -DENABLE_BZIP2_COMPRESSION=ON +BuildRequires: bzip2-devel + +%if %{with zstd} +# -DENABLE_ZSTD_COMPRESSION=ON +BuildRequires: libzstd-devel +%endif + +%if %{with zchunk} +# -DENABLE_ZCHUNK_COMPRESSION=ON +BuildRequires: libzck-devel +%endif + +%description +Python bindings for the %{name} library. + +Python 3 version. + + + +%prep +%autosetup -p1 -n lib%{libname}-%{version} + +%build +%cmake -GNinja \ + -DFEDORA=1 \ + -DENABLE_RPMDB=ON \ + -DENABLE_RPMDB_BYRPMHEADER=ON \ + -DENABLE_RPMDB_LIBRPM=ON \ + -DENABLE_RPMPKG_LIBRPM=ON \ + -DENABLE_RPMMD=ON \ + -DENABLE_COMPS=%{__cmake_switch -b comps} \ + -DENABLE_APPDATA=%{__cmake_switch -b appdata} \ + -DUSE_VENDORDIRS=ON \ + -DWITH_LIBXML2=ON \ + -DWITH_OPENSSL=ON \ + -DENABLE_LZMA_COMPRESSION=ON \ + -DENABLE_BZIP2_COMPRESSION=ON \ + -DENABLE_ZSTD_COMPRESSION=%{__cmake_switch -b zstd} \ + -DENABLE_ZCHUNK_COMPRESSION=%{__cmake_switch -b zchunk} \ +%if %{with zchunk} + -DWITH_SYSTEM_ZCHUNK=ON \ +%endif + -DENABLE_HELIXREPO=%{__cmake_switch -b helix_repo} \ + -DENABLE_SUSEREPO=%{__cmake_switch -b suse_repo} \ + -DENABLE_DEBIAN=%{__cmake_switch -b debian_repo} \ + -DENABLE_ARCHREPO=%{__cmake_switch -b arch_repo} \ + -DMULTI_SEMANTICS=%{__cmake_switch -b multi_semantics} \ + -DENABLE_COMPLEX_DEPS=%{__cmake_switch -b complex_deps} \ + -DENABLE_CONDA=%{__cmake_switch -b conda} \ + -DENABLE_PYTHON=%{__cmake_switch -b python_bindings} \ + -DENABLE_STATIC=ON \ + -DDISABLE_SHARED=ON \ + -DPYTHON_LIBRARY=/usr/lib64/libpython3.11.so.1.0 \ + -DPYTHON_INCLUDE_DIR=/usr/include/python3.11 \ + -DPYTHON_EXECUTABLE=%{python3} \ + %{nil} +%cmake_build + +%install +%cmake_install + + +rm -rf %{buildroot}/usr/bin/ +rm -rf %{buildroot}/usr/include/ +rm -rf %{buildroot}%{_libdir}/debug/ +rm -rf %{buildroot}/usr/bin/ +rm -rf %{buildroot}%{_datadir} + +rm %{buildroot}/usr/lib64/libsolv*.a +rm %{buildroot}/usr/lib64/pkgconfig/libsolv*.pc + + +%check +%ctest + +# Python smoke test (not tested in %%ctest): +export PYTHONPATH=%{buildroot}%{python3_sitearch} +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +%python3 -c 'import solv' + +%files +%license LICENSE* +%doc README +%{python3_sitearch}/_%{libname}.so +%{python3_sitearch}/%{libname}.py +%{python3_sitearch}/__pycache__/%{libname}.* + + +%changelog +* Tue Feb 27 2024 Patrick Creech - 0.7.28-1 +- Build python3 bindings statically linked. \ No newline at end of file From eae52692f65a791c6814fbc13b579c8a91f560bb Mon Sep 17 00:00:00 2001 From: Patrick Creech Date: Mon, 22 Jan 2024 19:20:30 -0500 Subject: [PATCH 2/6] Rebase libsolv and add epoch --- ...t-for-computing-hashes-using-OpenSSL.patch | 160 ++++ ...for-storing-user-data-in-a-solv-file.patch | 311 +++++++ ...toolversion-at-runtime-and-increase-.patch | 68 ++ ...both-as-positive-and-negative-litera.patch | 60 ++ ...-Allow_break_arch_lock_step_on_erase.patch | 125 +++ packages/libsolv/libsolv-0.7.20.tar.gz | 1 + packages/libsolv/libsolv-0.7.22.tar.gz | 1 - packages/libsolv/libsolv.spec | 863 +++++++++++++----- 8 files changed, 1358 insertions(+), 231 deletions(-) create mode 100644 packages/libsolv/0001-Add-support-for-computing-hashes-using-OpenSSL.patch create mode 100644 packages/libsolv/0002-Add-support-for-storing-user-data-in-a-solv-file.patch create mode 100644 packages/libsolv/0003-Allow-accessing-toolversion-at-runtime-and-increase-.patch create mode 100644 packages/libsolv/0004-Treat-condition-both-as-positive-and-negative-litera.patch create mode 100644 packages/libsolv/0005-Allow_break_arch_lock_step_on_erase.patch create mode 120000 packages/libsolv/libsolv-0.7.20.tar.gz delete mode 120000 packages/libsolv/libsolv-0.7.22.tar.gz diff --git a/packages/libsolv/0001-Add-support-for-computing-hashes-using-OpenSSL.patch b/packages/libsolv/0001-Add-support-for-computing-hashes-using-OpenSSL.patch new file mode 100644 index 000000000..e20e29364 --- /dev/null +++ b/packages/libsolv/0001-Add-support-for-computing-hashes-using-OpenSSL.patch @@ -0,0 +1,160 @@ +From c56a7db62db6d62b53830f8f1af4d5a70e86d69f Mon Sep 17 00:00:00 2001 +From: Jaroslav Rohel +Date: Fri, 25 Oct 2019 14:33:22 +0200 +Subject: [PATCH 1/3] Add support for computing hashes using OpenSSL + +It adds WITH_OPENSSL build option. +If it is ON, OpenSSL will be used instead of internal implementation +of computing hashes (MD5, SHA1, SHA224, SHA256, SHA384, SHA512). +--- + CMakeLists.txt | 13 +++++++++++-- + src/CMakeLists.txt | 12 +++++++++--- + src/chksum.c | 32 ++++++++++++++++++++++++++++++++ + tools/CMakeLists.txt | 2 +- + 4 files changed, 53 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 3541f496..e73dc552 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -40,6 +40,7 @@ OPTION (ENABLE_ZCHUNK_COMPRESSION "Build with zchunk compression support?" OFF) + OPTION (WITH_SYSTEM_ZCHUNK "Use system zchunk library?" OFF) + OPTION (WITH_LIBXML2 "Build with libxml2 instead of libexpat?" OFF) + OPTION (WITHOUT_COOKIEOPEN "Disable the use of stdio cookie opens?" OFF) ++OPTION (WITH_OPENSSL "Use OpenSSL instead of internal implementation of hashes?" OFF) + + include (GNUInstallDirs) + message (STATUS "Libraries will be installed in ${CMAKE_INSTALL_FULL_LIBDIR}") +@@ -164,6 +165,11 @@ INCLUDE_DIRECTORIES (${EXPAT_INCLUDE_DIRS}) + ENDIF (WITH_LIBXML2 ) + ENDIF (ENABLE_RPMMD OR ENABLE_SUSEREPO OR ENABLE_APPDATA OR ENABLE_COMPS OR ENABLE_HELIXREPO OR ENABLE_MDKREPO) + ++IF (WITH_OPENSSL) ++FIND_PACKAGE (OpenSSL REQUIRED) ++INCLUDE_DIRECTORIES (${OPENSSL_INCLUDE_DIR}) ++ENDIF(WITH_OPENSSL) ++ + IF (ENABLE_ZLIB_COMPRESSION) + FIND_PACKAGE (ZLIB REQUIRED) + INCLUDE_DIRECTORIES (${ZLIB_INCLUDE_DIRS}) +@@ -288,8 +294,8 @@ ENDIF (${CMAKE_MAJOR_VERSION} GREATER 2) + + # should create config.h with #cmakedefine instead... + FOREACH (VAR HAVE_STRCHRNUL HAVE_FOPENCOOKIE HAVE_FUNOPEN WORDS_BIGENDIAN +- HAVE_RPM_DB_H HAVE_RPMDBNEXTITERATORHEADERBLOB HAVE_RPMDBFSTAT +- WITH_LIBXML2 WITHOUT_COOKIEOPEN) ++ HAVE_RPM_DB_H HAVE_PGPDIGGETPARAMS HAVE_RPMDBNEXTITERATORHEADERBLOB HAVE_RPMDBFSTAT ++ WITH_LIBXML2 WITHOUT_COOKIEOPEN WITH_OPENSSL) + IF(${VAR}) + ADD_DEFINITIONS (-D${VAR}=1) + SET (SWIG_FLAGS ${SWIG_FLAGS} -D${VAR}) +@@ -426,6 +432,9 @@ ENDIF (ENABLE_ZSTD_COMPRESSION) + IF (WITH_SYSTEM_ZCHUNK) + SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${ZCHUNK_LIBRARIES}) + ENDIF (WITH_SYSTEM_ZCHUNK) ++IF (WITH_OPENSSL) ++SET (SYSTEM_LIBRARIES ${SYSTEM_LIBRARIES} ${OPENSSL_CRYPTO_LIBRARY}) ++ENDIF (WITH_OPENSSL) + IF (ENABLE_RPMDB) + SET (SYSTEM_LIBRARIES ${RPMDB_LIBRARY} ${SYSTEM_LIBRARIES}) + ENDIF (ENABLE_RPMDB) +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index bbf30bac..6b5ea42b 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -18,9 +18,8 @@ SET (libsolv_SRCS + solver.c solverdebug.c repo_solv.c repo_write.c evr.c pool.c + queue.c repo.c repodata.c repopage.c util.c policy.c solvable.c + transaction.c order.c rules.c problems.c linkedpkg.c cplxdeps.c +- chksum.c md5.c sha1.c sha2.c solvversion.c selection.c +- fileprovides.c diskusage.c suse.c solver_util.c cleandeps.c +- userinstalled.c filelistfilter.c) ++ chksum.c solvversion.c selection.c fileprovides.c diskusage.c ++ suse.c solver_util.c cleandeps.c userinstalled.c filelistfilter.c) + + SET (libsolv_HEADERS + bitmap.h evr.h hash.h policy.h poolarch.h poolvendor.h pool.h +@@ -43,6 +42,10 @@ IF (WIN32) + LIST (APPEND libsolv_SRCS ${WIN32_COMPAT_SOURCES}) + ENDIF (WIN32) + ++IF (NOT WITH_OPENSSL) ++ SET (libsolv_SRCS ${libsolv_SRCS} md5.c sha1.c sha2.c) ++ENDIF (NOT WITH_OPENSSL) ++ + IF (HAVE_LINKER_VERSION_SCRIPT) + SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LINK_FLAGS} -Wl,--version-script=${CMAKE_SOURCE_DIR}/src/libsolv.ver") + ENDIF (HAVE_LINKER_VERSION_SCRIPT) +@@ -51,6 +54,9 @@ IF (DISABLE_SHARED) + ADD_LIBRARY (libsolv STATIC ${libsolv_SRCS}) + ELSE (DISABLE_SHARED) + ADD_LIBRARY (libsolv SHARED ${libsolv_SRCS}) ++ IF (WITH_OPENSSL) ++ TARGET_LINK_LIBRARIES (libsolv ${OPENSSL_CRYPTO_LIBRARY}) ++ ENDIF (WITH_OPENSSL) + ENDIF (DISABLE_SHARED) + + IF (WIN32) +diff --git a/src/chksum.c b/src/chksum.c +index 1f8ab471..9189b744 100644 +--- a/src/chksum.c ++++ b/src/chksum.c +@@ -15,10 +15,42 @@ + #include "util.h" + #include "chksum.h" + ++#ifdef WITH_OPENSSL ++ ++#include ++#include ++ ++typedef SHA_CTX SHA1_CTX; ++typedef SHA256_CTX SHA224_CTX; ++typedef SHA512_CTX SHA384_CTX; ++ ++#define solv_MD5_Init(ctx) MD5_Init(ctx) ++#define solv_MD5_Update(ctx, data, len) MD5_Update(ctx, data, len) ++#define solv_MD5_Final(md, ctx) MD5_Final(md, ctx) ++#define solv_SHA1_Init(ctx) SHA1_Init(ctx) ++#define solv_SHA1_Update(ctx, data, len) SHA1_Update(ctx, data, len) ++#define solv_SHA1_Final(ctx, md) SHA1_Final(md, ctx) ++#define solv_SHA224_Init(ctx) SHA224_Init(ctx) ++#define solv_SHA224_Update(ctx, data, len) SHA224_Update(ctx, data, len) ++#define solv_SHA224_Final(md, ctx) SHA224_Final(md, ctx) ++#define solv_SHA256_Init(ctx) SHA256_Init(ctx) ++#define solv_SHA256_Update(ctx, data, len) SHA256_Update(ctx, data, len) ++#define solv_SHA256_Final(md, ctx) SHA256_Final(md, ctx) ++#define solv_SHA384_Init(ctx) SHA384_Init(ctx) ++#define solv_SHA384_Update(ctx, data, len) SHA384_Update(ctx, data, len) ++#define solv_SHA384_Final(md, ctx) SHA384_Final(md, ctx) ++#define solv_SHA512_Init(ctx) SHA512_Init(ctx) ++#define solv_SHA512_Update(ctx, data, len) SHA512_Update(ctx, data, len) ++#define solv_SHA512_Final(md, ctx) SHA512_Final(md, ctx) ++ ++#else ++ + #include "md5.h" + #include "sha1.h" + #include "sha2.h" + ++#endif ++ + #ifdef _WIN32 + #include "strfncs.h" + #endif +diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt +index f19030eb..d477e195 100644 +--- a/tools/CMakeLists.txt ++++ b/tools/CMakeLists.txt +@@ -116,7 +116,7 @@ SET(tools_list ${tools_list} repo2solv) + ENDIF (NOT WIN32) + + ADD_EXECUTABLE (dumpsolv dumpsolv.c ) +-TARGET_LINK_LIBRARIES (dumpsolv libsolv) ++TARGET_LINK_LIBRARIES (dumpsolv libsolv ${SYSTEM_LIBRARIES}) + + ADD_EXECUTABLE (mergesolv mergesolv.c ) + TARGET_LINK_LIBRARIES (mergesolv toolstuff libsolvext libsolv ${SYSTEM_LIBRARIES}) +-- +2.31.1 + diff --git a/packages/libsolv/0002-Add-support-for-storing-user-data-in-a-solv-file.patch b/packages/libsolv/0002-Add-support-for-storing-user-data-in-a-solv-file.patch new file mode 100644 index 000000000..f17d1942a --- /dev/null +++ b/packages/libsolv/0002-Add-support-for-storing-user-data-in-a-solv-file.patch @@ -0,0 +1,311 @@ +From 9b89a186e3769631b6cee859be9d69063cfdfb94 Mon Sep 17 00:00:00 2001 +From: Michael Schroeder +Date: Fri, 25 Feb 2022 16:47:21 +0100 +Subject: [PATCH 2/3] Add support for storing user data in a solv file + +Userdata can be arbritrary (binary)data with a maximum size of +65535 bytes. It can be read without reading the complete +solv file, but do not forget to rewind the fp after reading +the user data. + +New functions: +void + void repowriter_set_userdata(Repowriter *writer, const void *data, int len) + int solv_read_userdata(FILE *fp, unsigned char **datap, int *lenp) +--- + src/libsolv.ver | 2 ++ + src/pooltypes.h | 6 ++++-- + src/repo_solv.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ + src/repo_solv.h | 1 + + src/repo_write.c | 24 ++++++++++++++++++++- + src/repo_write.h | 3 +++ + tools/dumpsolv.c | 50 ++++++++++++++++++++++++++++++++++++++++---- + 7 files changed, 133 insertions(+), 7 deletions(-) + +diff --git a/src/libsolv.ver b/src/libsolv.ver +index ee40d0ad..4c6fbf4f 100644 +--- a/src/libsolv.ver ++++ b/src/libsolv.ver +@@ -255,6 +255,7 @@ SOLV_1.0 { + repowriter_set_keyqueue; + repowriter_set_repodatarange; + repowriter_set_solvablerange; ++ repowriter_set_userdata; + repowriter_write; + selection_add; + selection_filter; +@@ -288,6 +289,7 @@ SOLV_1.0 { + solv_malloc; + solv_malloc2; + solv_oom; ++ solv_read_userdata; + solv_realloc; + solv_realloc2; + solv_replacebadutf8; +diff --git a/src/pooltypes.h b/src/pooltypes.h +index e1f77b0e..3bde155a 100644 +--- a/src/pooltypes.h ++++ b/src/pooltypes.h +@@ -23,9 +23,11 @@ + #define SOLV_VERSION_6 6 + #define SOLV_VERSION_7 7 + #define SOLV_VERSION_8 8 ++#define SOLV_VERSION_9 9 + +-#define SOLV_FLAG_PREFIX_POOL 4 +-#define SOLV_FLAG_SIZE_BYTES 8 ++#define SOLV_FLAG_PREFIX_POOL 4 ++#define SOLV_FLAG_SIZE_BYTES 8 ++#define SOLV_FLAG_USERDATA 16 + + struct s_Stringpool; + typedef struct s_Stringpool Stringpool; +diff --git a/src/repo_solv.c b/src/repo_solv.c +index 761d06e6..2ba602b2 100644 +--- a/src/repo_solv.c ++++ b/src/repo_solv.c +@@ -514,6 +514,7 @@ repo_add_solv(Repo *repo, FILE *fp, int flags) + switch (solvversion) + { + case SOLV_VERSION_8: ++ case SOLV_VERSION_9: + break; + default: + return pool_error(pool, SOLV_ERROR_UNSUPPORTED, "unsupported SOLV version"); +@@ -552,6 +553,18 @@ repo_add_solv(Repo *repo, FILE *fp, int flags) + return pool_error(pool, SOLV_ERROR_CORRUPT, "main repository contains holes, cannot extend"); + } + ++ /******* Part 0: skip optional userdata ******************************/ ++ ++ if (solvflags & SOLV_FLAG_USERDATA) ++ { ++ unsigned int userdatalen = read_u32(&data); ++ if (userdatalen >= 65536) ++ return pool_error(pool, SOLV_ERROR_CORRUPT, "illegal userdata length"); ++ while (userdatalen--) ++ if (getc(data.fp) == EOF) ++ return pool_error(pool, SOLV_ERROR_EOF, "unexpected EOF"); ++ } ++ + /******* Part 1: string IDs *****************************************/ + + sizeid = read_u32(&data); /* size of string space */ +@@ -1353,3 +1366,44 @@ printf("=> %s %s %p\n", pool_id2str(pool, keys[key].name), pool_id2str(pool, key + return 0; + } + ++int ++solv_read_userdata(FILE *fp, unsigned char **datap, int *lenp) ++{ ++ unsigned char d[4 * 10], *ud = 0; ++ unsigned int n; ++ if (fread(d, sizeof(d), 1, fp) != 1) ++ return SOLV_ERROR_EOF; ++ n = d[0] << 24 | d[1] << 16 | d[2] << 8 | d[3]; ++ if (n != ('S' << 24 | 'O' << 16 | 'L' << 8 | 'V')) ++ return SOLV_ERROR_NOT_SOLV; ++ n = d[4] << 24 | d[5] << 16 | d[6] << 8 | d[7]; ++ switch(n) ++ { ++ case SOLV_VERSION_8: ++ case SOLV_VERSION_9: ++ break; ++ default: ++ return SOLV_ERROR_UNSUPPORTED; ++ } ++ n = d[32] << 24 | d[33] << 16 | d[34] << 8 | d[35]; ++ if (!(n & SOLV_FLAG_USERDATA)) ++ n = 0; ++ else ++ n = d[36] << 24 | d[37] << 16 | d[38] << 8 | d[39]; ++ if (n >= 65536) ++ return SOLV_ERROR_CORRUPT; ++ if (n) ++ { ++ ud = solv_malloc(n + 1); ++ if (fread(ud, n, 1, fp) != 1) ++ { ++ solv_free(ud); ++ return SOLV_ERROR_EOF; ++ } ++ ud[n] = 0; ++ } ++ *datap = ud; ++ if (lenp) ++ *lenp = (int)n; ++ return 0; ++} +diff --git a/src/repo_solv.h b/src/repo_solv.h +index 0c663949..57bf1772 100644 +--- a/src/repo_solv.h ++++ b/src/repo_solv.h +@@ -23,6 +23,7 @@ extern "C" { + #endif + + extern int repo_add_solv(Repo *repo, FILE *fp, int flags); ++extern int solv_read_userdata(FILE *fp, unsigned char **datap, int *lenp); + + #define SOLV_ADD_NO_STUBS (1 << 8) + +diff --git a/src/repo_write.c b/src/repo_write.c +index af4e7599..a11de002 100644 +--- a/src/repo_write.c ++++ b/src/repo_write.c +@@ -1071,6 +1071,7 @@ repowriter_create(Repo *repo) + Repowriter * + repowriter_free(Repowriter *writer) + { ++ solv_free(writer->userdata); + return solv_free(writer); + } + +@@ -1107,6 +1108,17 @@ repowriter_set_solvablerange(Repowriter *writer, int solvablestart, int solvable + writer->solvableend = solvableend; + } + ++void ++repowriter_set_userdata(Repowriter *writer, const void *data, int len) ++{ ++ writer->userdata = solv_free(writer->userdata); ++ writer->userdatalen = 0; ++ if (len < 0 || len >= 65536) ++ return; ++ writer->userdata = len ? solv_memdup(data, len) : 0; ++ writer->userdatalen = len; ++} ++ + /* + * the code works the following way: + * +@@ -1898,7 +1910,10 @@ for (i = 1; i < target.nkeys; i++) + + /* write file header */ + write_u32(&target, 'S' << 24 | 'O' << 16 | 'L' << 8 | 'V'); +- write_u32(&target, SOLV_VERSION_8); ++ if (writer->userdatalen) ++ write_u32(&target, SOLV_VERSION_9); ++ else ++ write_u32(&target, SOLV_VERSION_8); + + + /* write counts */ +@@ -1911,7 +1926,14 @@ for (i = 1; i < target.nkeys; i++) + solv_flags = 0; + solv_flags |= SOLV_FLAG_PREFIX_POOL; + solv_flags |= SOLV_FLAG_SIZE_BYTES; ++ if (writer->userdatalen) ++ solv_flags |= SOLV_FLAG_USERDATA; + write_u32(&target, solv_flags); ++ if (writer->userdatalen) ++ { ++ write_u32(&target, writer->userdatalen); ++ write_blob(&target, writer->userdata, writer->userdatalen); ++ } + + if (nstrings) + { +diff --git a/src/repo_write.h b/src/repo_write.h +index 34716705..7734b013 100644 +--- a/src/repo_write.h ++++ b/src/repo_write.h +@@ -32,6 +32,8 @@ typedef struct s_Repowriter { + int (*keyfilter)(Repo *repo, Repokey *key, void *kfdata); + void *kfdata; + Queue *keyq; ++ void *userdata; ++ int userdatalen; + } Repowriter; + + /* repowriter flags */ +@@ -46,6 +48,7 @@ void repowriter_set_keyfilter(Repowriter *writer, int (*keyfilter)(Repo *repo, R + void repowriter_set_keyqueue(Repowriter *writer, Queue *keyq); + void repowriter_set_repodatarange(Repowriter *writer, int repodatastart, int repodataend); + void repowriter_set_solvablerange(Repowriter *writer, int solvablestart, int solvableend); ++void repowriter_set_userdata(Repowriter *writer, const void *data, int len); + int repowriter_write(Repowriter *writer, FILE *fp); + + /* convenience functions */ +diff --git a/tools/dumpsolv.c b/tools/dumpsolv.c +index 13076574..49651fbe 100644 +--- a/tools/dumpsolv.c ++++ b/tools/dumpsolv.c +@@ -13,6 +13,7 @@ + + static int with_attr; + static int dump_json; ++static int dump_userdata; + + #include "pool.h" + #include "chksum.h" +@@ -394,10 +395,7 @@ int main(int argc, char **argv) + int c, i, j, n; + Solvable *s; + +- pool = pool_create(); +- pool_setloadcallback(pool, loadcallback, 0); +- +- while ((c = getopt(argc, argv, "haj")) >= 0) ++ while ((c = getopt(argc, argv, "uhaj")) >= 0) + { + switch(c) + { +@@ -410,11 +408,55 @@ int main(int argc, char **argv) + case 'j': + dump_json = 1; + break; ++ case 'u': ++ dump_userdata++; ++ break; + default: + usage(1); + break; + } + } ++ if (dump_userdata) ++ { ++ if (optind == argc) ++ argc++; ++ for (; optind < argc; optind++) ++ { ++ unsigned char *userdata = 0; ++ int r, userdatalen = 0; ++ if (argv[optind] && freopen(argv[optind], "r", stdin) == 0) ++ { ++ perror(argv[optind]); ++ exit(1); ++ } ++ r = solv_read_userdata(stdin, &userdata, &userdatalen); ++ if (r) ++ { ++ fprintf(stderr, "could not read userdata: error %d\n", r); ++ exit(1); ++ } ++ if (dump_userdata > 1) ++ { ++ /* dump raw */ ++ if (userdatalen && fwrite(userdata, userdatalen, 1, stdout) != 1) ++ { ++ perror("fwrite"); ++ exit(1); ++ } ++ } ++ else ++ { ++ for (r = 0; r < userdatalen; r++) ++ printf("%02x", userdata[r]); ++ printf("\n"); ++ } ++ solv_free(userdata); ++ } ++ exit(0); ++ } ++ ++ pool = pool_create(); ++ pool_setloadcallback(pool, loadcallback, 0); + if (!dump_json) + pool_setdebuglevel(pool, 1); + if (dump_json) +-- +2.31.1 + diff --git a/packages/libsolv/0003-Allow-accessing-toolversion-at-runtime-and-increase-.patch b/packages/libsolv/0003-Allow-accessing-toolversion-at-runtime-and-increase-.patch new file mode 100644 index 000000000..96034709d --- /dev/null +++ b/packages/libsolv/0003-Allow-accessing-toolversion-at-runtime-and-increase-.patch @@ -0,0 +1,68 @@ +From 07a1a0fd83f108a0e9b1f801b52ff2bd26722097 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= +Date: Thu, 27 Jan 2022 08:38:27 +0100 +Subject: [PATCH] Allow accessing toolversion at runtime and increase it + +--- + src/libsolv.ver | 1 + + src/solvversion.c | 1 + + src/solvversion.h.in | 3 ++- + tools/common_write.c | 1 + + 4 files changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/libsolv.ver b/src/libsolv.ver +index 4c6fbf4f..89517f50 100644 +--- a/src/libsolv.ver ++++ b/src/libsolv.ver +@@ -306,6 +306,7 @@ SOLV_1.0 { + solv_version_major; + solv_version_minor; + solv_version_patch; ++ solv_toolversion; + solvable_add_deparray; + solvable_add_idarray; + solvable_add_poolstr_array; +diff --git a/src/solvversion.c b/src/solvversion.c +index d66e1958..51d57a63 100644 +--- a/src/solvversion.c ++++ b/src/solvversion.c +@@ -11,3 +11,4 @@ const char solv_version[] = LIBSOLV_VERSION_STRING; + int solv_version_major = LIBSOLV_VERSION_MAJOR; + int solv_version_minor = LIBSOLV_VERSION_MINOR; + int solv_version_patch = LIBSOLV_VERSION_PATCH; ++const char solv_toolversion[] = LIBSOLV_TOOLVERSION; +diff --git a/src/solvversion.h.in b/src/solvversion.h.in +index 43b566a1..da0ad743 100644 +--- a/src/solvversion.h.in ++++ b/src/solvversion.h.in +@@ -23,6 +23,7 @@ extern const char solv_version[]; + extern int solv_version_major; + extern int solv_version_minor; + extern int solv_version_patch; ++extern const char solv_toolversion[]; + + #cmakedefine LIBSOLV_FEATURE_LINKED_PKGS + #cmakedefine LIBSOLV_FEATURE_COMPLEX_DEPS +@@ -48,6 +49,6 @@ extern int solv_version_patch; + #cmakedefine LIBSOLVEXT_FEATURE_ZCHUNK_COMPRESSION + + /* see tools/common_write.c for toolversion history */ +-#define LIBSOLV_TOOLVERSION "1.1" ++#define LIBSOLV_TOOLVERSION "1.2" + + #endif +diff --git a/tools/common_write.c b/tools/common_write.c +index 36f8dd89..8fda3e33 100644 +--- a/tools/common_write.c ++++ b/tools/common_write.c +@@ -19,6 +19,7 @@ + /* toolversion history + * 1.0: initial tool version + * 1.1: changed PRODUCT_ENDOFLIFE parsing ++ * 1.2: added UPDATE_COLLECTIONLIST to updateinfo + */ + + static int +-- +2.31.1 + diff --git a/packages/libsolv/0004-Treat-condition-both-as-positive-and-negative-litera.patch b/packages/libsolv/0004-Treat-condition-both-as-positive-and-negative-litera.patch new file mode 100644 index 000000000..4acb13b1a --- /dev/null +++ b/packages/libsolv/0004-Treat-condition-both-as-positive-and-negative-litera.patch @@ -0,0 +1,60 @@ +From 91125fe786cb6de2f050430fa51e11c501f17aed Mon Sep 17 00:00:00 2001 +From: Michael Schroeder +Date: Tue, 18 Apr 2023 11:57:50 +0200 +Subject: [PATCH] Treat condition both as positive and negative literal in + pool_add_pos_literals_complex_dep + +That's because (A IF B ELSE C) gets rewritten to (A OR ~B) AND (C OR B) and +(A UNLESS B ELSE C) gets rewritten to (A AND ~B) OR (C AND B). In both +cases we have A, B, ~B, C. + +This resolves issue #527 +--- + src/cplxdeps.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/cplxdeps.c b/src/cplxdeps.c +index 6c40752e..26e754d9 100644 +--- a/src/cplxdeps.c ++++ b/src/cplxdeps.c +@@ -405,6 +405,7 @@ pool_add_pos_literals_complex_dep(Pool *pool, Id dep, Queue *q, Map *m, int neg) + Reldep *rd2 = GETRELDEP(pool, rd->evr); + if (rd2->flags == REL_ELSE) + { ++ pool_add_pos_literals_complex_dep(pool, rd2->name, q, m, !neg); + pool_add_pos_literals_complex_dep(pool, rd2->evr, q, m, !neg); + dep = rd2->name; + } +-- +2.40.1 + + +From 11fac9a31e892125e19246101b5604322836467d Mon Sep 17 00:00:00 2001 +From: Michael Schroeder +Date: Tue, 18 Apr 2023 12:36:40 +0200 +Subject: [PATCH] Add testcase for last commit + +--- + test/testcases/cplxdeps/ifelse_rec.t | 10 ++++++++++ + 1 file changed, 10 insertions(+) + create mode 100644 test/testcases/cplxdeps/ifelse_rec.t + +diff --git a/test/testcases/cplxdeps/ifelse_rec.t b/test/testcases/cplxdeps/ifelse_rec.t +new file mode 100644 +index 00000000..ea467027 +--- /dev/null ++++ b/test/testcases/cplxdeps/ifelse_rec.t +@@ -0,0 +1,10 @@ ++repo appstream 0 testtags ++#>=Pkg: xorg-x11-server-Xorg 1.20.11 18.el9 noarch ++#>=Req: missing-req ++#>=Pkg: pass 1.7.4 6.el9 noarch ++#>=Rec: xclip (xorg-x11-server-Xorg wl-clipboard) ++repo @System 0 empty ++system unset * @System ++job install pkg pass-1.7.4-6.el9.noarch@appstream ++result transaction,problems ++#>install pass-1.7.4-6.el9.noarch@appstream +-- +2.40.1 + diff --git a/packages/libsolv/0005-Allow_break_arch_lock_step_on_erase.patch b/packages/libsolv/0005-Allow_break_arch_lock_step_on_erase.patch new file mode 100644 index 000000000..b5b29079e --- /dev/null +++ b/packages/libsolv/0005-Allow_break_arch_lock_step_on_erase.patch @@ -0,0 +1,125 @@ +From 78b2d8148bea1dc12b854d9c11691d5f1bc33fd8 Mon Sep 17 00:00:00 2001 +From: Michael Schroeder +Date: Wed, 19 Apr 2023 13:09:10 +0200 +Subject: [PATCH] Allow to break arch lock-step on erase operations + +We allow it if SOLVER_SETARCH is (auto-)set in the erase job. +--- + src/rules.c | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/src/rules.c b/src/rules.c +index 212df322..bbabc55f 100644 +--- a/src/rules.c ++++ b/src/rules.c +@@ -1668,6 +1668,16 @@ solver_addinfarchrules(Solver *solv, Map *addedmap) + if (first) + continue; /* not the first in the group */ + ++ if (!bestscore && allowedarchs.count > 1 && pool->implicitobsoleteusescolors) ++ { ++ for (j = 0; j < allowedarchs.count; j++) ++ { ++ a = pool_arch2score(pool, allowedarchs.elements[j]); ++ if (a && a != 1 && (!bestscore || a < bestscore)) ++ bestscore = a; ++ } ++ } ++ + if (!bestscore) + continue; /* did not find a score for this group */ + +@@ -2456,6 +2466,20 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q) + case SOLVER_ERASE: + if (!installed) + break; ++ set = how & SOLVER_SETMASK; ++ if (!(set & (SOLVER_NOAUTOSET | SOLVER_SETARCH)) && pool->implicitobsoleteusescolors && solv->infarchrules != solv->infarchrules_end) ++ { ++ if (select == SOLVER_SOLVABLE) ++ set |= SOLVER_SETARCH; ++ else if ((select == SOLVER_SOLVABLE_NAME || select == SOLVER_SOLVABLE_PROVIDES) && ISRELDEP(what)) ++ { ++ Reldep *rd = GETRELDEP(pool, what); ++ if (rd->flags <= 7 && ISRELDEP(rd->name)) ++ rd = GETRELDEP(pool, rd->name); ++ if (rd->flags == REL_ARCH) ++ set |= SOLVER_SETARCH; ++ } ++ } + if (select == SOLVER_SOLVABLE_ALL || (select == SOLVER_SOLVABLE_REPO && what == installed->repoid)) + { + FOR_REPO_SOLVABLES(installed, p, s) +@@ -2465,6 +2489,8 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q) + if (pool->solvables[p].repo == installed) + { + queue_push2(q, DISABLE_UPDATE, p); ++ if ((set & SOLVER_SETARCH) != 0 && pool->implicitobsoleteusescolors && solv->infarchrules != solv->infarchrules_end) ++ queue_push2(q, DISABLE_INFARCH, pool->solvables[p].name); /* allow to break the lock-step */ + #ifdef ENABLE_LINKED_PKGS + if (solv->instbuddy && solv->instbuddy[p - installed->start] > 1) + queue_push2(q, DISABLE_UPDATE, solv->instbuddy[p - installed->start]); +-- +2.40.1 + + +From dc4c91a71eda2950df11724945ebd5151883a041 Mon Sep 17 00:00:00 2001 +From: Michael Schroeder +Date: Fri, 21 Apr 2023 16:15:10 +0200 +Subject: [PATCH] Only disable infarch rules on erase if the package was in + lock-step + +Fiexes issue #528 +--- + src/rules.c | 28 +++++++++++++++++++++++++++- + 1 file changed, 27 insertions(+), 1 deletion(-) + +diff --git a/src/rules.c b/src/rules.c +index bbabc55f..c909ae0b 100644 +--- a/src/rules.c ++++ b/src/rules.c +@@ -2279,6 +2279,31 @@ solver_addblackrules(Solver *solv) + #define DISABLE_DUP 3 + #define DISABLE_BLACK 4 + ++/* check if installed package p is in lock-step with another installed package */ ++static int ++installed_is_in_lockstep(Solver *solv, Id p) ++{ ++ Pool *pool = solv->pool; ++ Repo *installed = solv->installed; ++ int rid; ++ Id pp, l; ++ Rule *r; ++ ++ if (!installed) ++ return 0; ++ for (rid = solv->infarchrules, r = solv->rules + rid; rid < solv->infarchrules_end; rid++, r++) ++ { ++ if (r->p >= 0) ++ continue; ++ if (pool->solvables[-r->p].repo != installed) ++ continue; ++ FOR_RULELITERALS(l, pp, r) ++ if (l == p) ++ return 1; ++ } ++ return 0; ++} ++ + static void + jobtodisablelist(Solver *solv, Id how, Id what, Queue *q) + { +@@ -2490,7 +2515,8 @@ jobtodisablelist(Solver *solv, Id how, Id what, Queue *q) + { + queue_push2(q, DISABLE_UPDATE, p); + if ((set & SOLVER_SETARCH) != 0 && pool->implicitobsoleteusescolors && solv->infarchrules != solv->infarchrules_end) +- queue_push2(q, DISABLE_INFARCH, pool->solvables[p].name); /* allow to break the lock-step */ ++ if (installed_is_in_lockstep(solv, p)) ++ queue_push2(q, DISABLE_INFARCH, pool->solvables[p].name); /* allow to break the lock-step */ + #ifdef ENABLE_LINKED_PKGS + if (solv->instbuddy && solv->instbuddy[p - installed->start] > 1) + queue_push2(q, DISABLE_UPDATE, solv->instbuddy[p - installed->start]); +-- +2.40.1 + diff --git a/packages/libsolv/libsolv-0.7.20.tar.gz b/packages/libsolv/libsolv-0.7.20.tar.gz new file mode 120000 index 000000000..04f591bf3 --- /dev/null +++ b/packages/libsolv/libsolv-0.7.20.tar.gz @@ -0,0 +1 @@ +../../.git/annex/objects/QW/Wx/SHA256E-s721666--8bc0ce89dc8e6277825181db795589b26f913c6d85ca74c833641c1df75c07bc.tar.gz/SHA256E-s721666--8bc0ce89dc8e6277825181db795589b26f913c6d85ca74c833641c1df75c07bc.tar.gz \ No newline at end of file diff --git a/packages/libsolv/libsolv-0.7.22.tar.gz b/packages/libsolv/libsolv-0.7.22.tar.gz deleted file mode 120000 index c32809f3b..000000000 --- a/packages/libsolv/libsolv-0.7.22.tar.gz +++ /dev/null @@ -1 +0,0 @@ -../../.git/annex/objects/Zw/1M/SHA256E-s729191--968aef452b5493751fa0168cd58745a77c755e202a43fe8d549d791eb16034d5.tar.gz/SHA256E-s729191--968aef452b5493751fa0168cd58745a77c755e202a43fe8d549d791eb16034d5.tar.gz \ No newline at end of file diff --git a/packages/libsolv/libsolv.spec b/packages/libsolv/libsolv.spec index 2b7a6b912..97abffabd 100644 --- a/packages/libsolv/libsolv.spec +++ b/packages/libsolv/libsolv.spec @@ -1,60 +1,59 @@ -%global python3_pkgversion 3.11 -%global __python3 /usr/bin/python3.11 - -# explicitly define, as we build on top of an scl, not inside with scl_package -%if 0%{?scl:1} -%global scl_prefix %{scl}- -%global python3_sitearch /opt/theforeman/tfm-pulpcore/root/usr/lib64/python3.8/site-packages/ -%global python3_version %python38python3_version -%global __os_install_post %python38_os_install_post -%global __python_requires %python38_python_requires -%global __python_provides %python38_python_provides -%global __python3 %python38__python -%endif - -# Our EL8 buildroots default to Python 3.8, but let's also build 3.6, just to be safe -# to make dnf happy -%if 0%{?rhel} == 8 -%bcond_without python36 -%else -%bcond_with python36 -%endif - %global libname solv -# Only build Python2 bindings on EL7 -%if 0%{?rhel} == 7 -%bcond_without python2_bindings -%else -%bcond_with python2_bindings -%endif - -%bcond_without python3_bindings -%bcond_with perl_bindings +%bcond_without python_bindings +%bcond_without perl_bindings %bcond_without ruby_bindings # Creates special prefixed pseudo-packages from appdata metadata %bcond_without appdata # Creates special prefixed "group:", "category:" pseudo-packages %bcond_without comps +%bcond_without conda # For rich dependencies %bcond_without complex_deps +%if 0%{?rhel} +%bcond_with helix_repo +%bcond_with suse_repo +%bcond_with debian_repo +%bcond_with arch_repo +# For handling deb + rpm at the same time +%bcond_with multi_semantics +%bcond_with zchunk +%else %bcond_without helix_repo %bcond_without suse_repo %bcond_without debian_repo %bcond_without arch_repo # For handling deb + rpm at the same time %bcond_without multi_semantics -%bcond_with zchunk -%bcond_with zstd +%bcond_without zchunk +%endif +%bcond_without zstd + +#global commitnum 2901 +#global commit 47fbaa2a0892866d30ec0e1b4c885532d0aca7b8 +#global shortcommit %%(c=%%{commit}; echo ${c:0:7}) + +%define __cmake_switch(b:) %{expand:%%{?with_%{-b*}:ON}}%{expand:%%{!?with_%{-b*}:OFF}} Name: lib%{libname} -Version: 0.7.22 +Version: 0.7.20 Release: 6%{?dist} +Epoch: 1 Summary: Package dependency solver License: BSD URL: https://github.com/openSUSE/libsolv +%if %{defined commit} +Source: %{url}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz +%else Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +%endif +# https://bugzilla.redhat.com/show_bug.cgi?id=1630300 +Patch1: 0001-Add-support-for-computing-hashes-using-OpenSSL.patch +Patch2: 0002-Add-support-for-storing-user-data-in-a-solv-file.patch +Patch3: 0003-Allow-accessing-toolversion-at-runtime-and-increase-.patch +Patch4: 0004-Treat-condition-both-as-positive-and-negative-litera.patch +Patch5: 0005-Allow_break_arch_lock_step_on_erase.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -63,6 +62,8 @@ BuildRequires: pkgconfig(rpm) BuildRequires: zlib-devel # -DWITH_LIBXML2=ON BuildRequires: libxml2-devel +# -DWITH_OPENSSL=ON +BuildRequires: pkgconfig(openssl) # -DENABLE_LZMA_COMPRESSION=ON BuildRequires: xz-devel # -DENABLE_BZIP2_COMPRESSION=ON @@ -75,6 +76,8 @@ BuildRequires: libzstd-devel # -DENABLE_ZCHUNK_COMPRESSION=ON BuildRequires: pkgconfig(zck) %endif +# https://bugzilla.redhat.com/show_bug.cgi?id=1830346 +Conflicts: rpm%{?_isa} < 4.14.3 %description A free package dependency solver using a satisfiability algorithm. The @@ -98,7 +101,7 @@ Development files for %{name}. Summary: Package dependency solver tools Requires: %{name}%{?_isa} = %{version}-%{release} # repo2solv dependencies. Used as execl() -Requires: %{_bindir}/find +Requires: /usr/bin/find %description tools Package dependency solver tools. @@ -107,8 +110,8 @@ Package dependency solver tools. Summary: Applications demoing the %{name} library Requires: %{name}%{?_isa} = %{version}-%{release} # solv dependencies. Used as execlp() and system() -Requires: %{_bindir}/curl -Requires: %{_bindir}/gpg2 +Requires: /usr/bin/curl +Requires: /usr/bin/gpg2 %description demo Applications demoing the %{name} library. @@ -136,48 +139,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release} Ruby bindings for the %{name} library. %endif -%if %{with python2_bindings} -%package -n python2-%{libname} -Summary: Python bindings for the %{name} library -%{?python_provide:%python_provide python2-%{libname}} -BuildRequires: swig -BuildRequires: python2-devel -Requires: %{name}%{?_isa} = %{version}-%{release} - -%description -n python2-%{libname} -Python bindings for the %{name} library. - -Python 2 version. -%endif - -%if %{with python3_bindings} -%package -n %{?scl_prefix}python%{python3_pkgversion}-%{libname} -Summary: Python bindings for the %{name} library -%{?python_provide:%python_provide python%{python3_pkgversion}-%{libname}} -BuildRequires: swig -BuildRequires: %{?scl_prefix}python%{python3_pkgversion}-devel -Requires: %{name}%{?_isa} = %{version}-%{release} -%if 0%{?scl:1} -Obsoletes: python3-%{libname} < %{version}-%{release} -%endif -%if 0%{?rhel} == 8 -Obsoletes: python38-%{libname} < %{version}-%{release} -Obsoletes: python39-%{libname} < %{version}-%{release} -%endif - - -%description -n %{?scl_prefix}python%{python3_pkgversion}-%{libname} -Python bindings for the %{name} library. - -Python 3 version. -%endif - -%if %{with python36} +%if %{with python_bindings} %package -n python3-%{libname} Summary: Python bindings for the %{name} library +%{?python_provide:%python_provide python3-%{libname}} BuildRequires: swig -BuildRequires: python36-devel -Provides: python36-%{libname} = %{version}-%{release} +BuildRequires: python3-devel Requires: %{name}%{?_isa} = %{version}-%{release} %description -n python3-%{libname} @@ -187,126 +154,54 @@ Python 3 version. %endif %prep -%{?scl:scl enable %{scl} - << \EOF} -set -ex -%autosetup -p1 - -# it can't detect our special PYTHONPATH and uses the compiled-in from the SCL Python -%if 0%{?scl:1} -sed -i "/OUTPUT_VARIABLE PYTHON3_INSTALL_DIR/ s#))#).replace('rh/rh-python38', 'theforeman/tfm-pulpcore'))#" bindings/python3/CMakeLists.txt -%endif -%{?scl:EOF} - -%if %{with python36} -mkdir build-py36 -%endif +%autosetup -p1 %{?commit:-n %{name}-%{commit}} %build -%{?scl:scl enable %{scl} - << \EOF} -set -ex -%cmake . -B"%{_vpath_builddir}" -GNinja \ - -DFEDORA=1 \ - -DENABLE_RPMDB=ON \ - -DENABLE_RPMDB_BYRPMHEADER=ON \ - -DENABLE_RPMDB_LIBRPM=ON \ - -DENABLE_RPMPKG_LIBRPM=ON \ - -DENABLE_RPMMD=ON \ - %{?with_comps:-DENABLE_COMPS=ON} \ - %{?with_appdata:-DENABLE_APPDATA=ON} \ - -DUSE_VENDORDIRS=ON \ - -DWITH_LIBXML2=ON \ - -DENABLE_LZMA_COMPRESSION=ON \ - -DENABLE_BZIP2_COMPRESSION=ON \ - %{?with_zstd:-DENABLE_ZSTD_COMPRESSION=ON} \ -%if %{with zchunk} - -DENABLE_ZCHUNK_COMPRESSION=ON \ - -DWITH_SYSTEM_ZCHUNK=ON \ -%endif - %{?with_helix_repo:-DENABLE_HELIXREPO=ON} \ - %{?with_suse_repo:-DENABLE_SUSEREPO=ON} \ - %{?with_debian_repo:-DENABLE_DEBIAN=ON} \ - %{?with_arch_repo:-DENABLE_ARCHREPO=ON} \ - %{?with_multi_semantics:-DMULTI_SEMANTICS=ON} \ - %{?with_complex_deps:-DENABLE_COMPLEX_DEPS=1} \ - %{?with_perl_bindings:-DENABLE_PERL=ON} \ - %{?with_ruby_bindings:-DENABLE_RUBY=ON} \ -%if %{with python2_bindings} || %{with python3_bindings} - -DENABLE_PYTHON=ON \ -%if %{with python2_bindings} - -DPYTHON_EXECUTABLE=%{__python2} \ -%if %{with python3_bindings} - -DENABLE_PYTHON3=ON \ - -DPYTHON_EXECUTABLE=%{__python3} \ - -DPYTHON_LIBRARY=/usr/lib64/libpython3.11.so.1.0 \ - -DPYTHON_INCLUDE_DIR=/usr/include/python3.11 \ - -DPython_ADDITIONAL_VERSIONS=3.11 \ -%endif -%else - -DPYTHON_EXECUTABLE=%{__python3} \ - -DPYTHON_LIBRARY=/usr/lib64/libpython3.11.so.1.0 \ - -DPYTHON_INCLUDE_DIR=/usr/include/python3.11 \ - -DPython_ADDITIONAL_VERSIONS=3.11 \ -%endif -%endif - %{nil} -%ninja_build -C "%{_vpath_builddir}" -%{?scl:EOF} - -%if %{with python36} -pushd build-py36 -%cmake .. -B"%{_vpath_builddir}" -GNinja \ - -DFEDORA=1 \ - -DENABLE_RPMDB=ON \ - -DENABLE_RPMDB_BYRPMHEADER=ON \ - -DENABLE_RPMDB_LIBRPM=ON \ - -DENABLE_RPMPKG_LIBRPM=ON \ - -DENABLE_RPMMD=ON \ - %{?with_comps:-DENABLE_COMPS=ON} \ - %{?with_appdata:-DENABLE_APPDATA=ON} \ - -DUSE_VENDORDIRS=ON \ - -DWITH_LIBXML2=ON \ - -DENABLE_LZMA_COMPRESSION=ON \ - -DENABLE_BZIP2_COMPRESSION=ON \ - %{?with_zstd:-DENABLE_ZSTD_COMPRESSION=ON} \ +%cmake -GNinja \ + -DFEDORA=1 \ + -DENABLE_RPMDB=ON \ + -DENABLE_RPMDB_BYRPMHEADER=ON \ + -DENABLE_RPMDB_LIBRPM=ON \ + -DENABLE_RPMPKG_LIBRPM=ON \ + -DENABLE_RPMMD=ON \ + -DENABLE_COMPS=%{__cmake_switch -b comps} \ + -DENABLE_APPDATA=%{__cmake_switch -b appdata} \ + -DUSE_VENDORDIRS=ON \ + -DWITH_LIBXML2=ON \ + -DWITH_OPENSSL=ON \ + -DENABLE_LZMA_COMPRESSION=ON \ + -DENABLE_BZIP2_COMPRESSION=ON \ + -DENABLE_ZSTD_COMPRESSION=%{__cmake_switch -b zstd} \ + -DENABLE_ZCHUNK_COMPRESSION=%{__cmake_switch -b zchunk} \ %if %{with zchunk} - -DENABLE_ZCHUNK_COMPRESSION=ON \ - -DWITH_SYSTEM_ZCHUNK=ON \ + -DWITH_SYSTEM_ZCHUNK=ON \ +%endif + -DENABLE_HELIXREPO=%{__cmake_switch -b helix_repo} \ + -DENABLE_SUSEREPO=%{__cmake_switch -b suse_repo} \ + -DENABLE_DEBIAN=%{__cmake_switch -b debian_repo} \ + -DENABLE_ARCHREPO=%{__cmake_switch -b arch_repo} \ + -DMULTI_SEMANTICS=%{__cmake_switch -b multi_semantics} \ + -DENABLE_COMPLEX_DEPS=%{__cmake_switch -b complex_deps} \ + -DENABLE_CONDA=%{__cmake_switch -b conda} \ + -DENABLE_PERL=%{__cmake_switch -b perl_bindings} \ + -DENABLE_RUBY=%{__cmake_switch -b ruby_bindings} \ + -DENABLE_PYTHON=%{__cmake_switch -b python_bindings} \ +%if %{with python_bindings} + -DPYTHON_EXECUTABLE=%{python3} \ %endif - %{?with_helix_repo:-DENABLE_HELIXREPO=ON} \ - %{?with_suse_repo:-DENABLE_SUSEREPO=ON} \ - %{?with_debian_repo:-DENABLE_DEBIAN=ON} \ - %{?with_arch_repo:-DENABLE_ARCHREPO=ON} \ - %{?with_multi_semantics:-DMULTI_SEMANTICS=ON} \ - %{?with_complex_deps:-DENABLE_COMPLEX_DEPS=1} \ - %{?with_perl_bindings:-DENABLE_PERL=ON} \ - %{?with_ruby_bindings:-DENABLE_RUBY=ON} \ - -DENABLE_PYTHON=ON \ - -DPYTHON_EXECUTABLE=/usr/bin/python3.6 \ - -DPYTHON_LIBRARY=/usr/lib64/libpython3.6m.so \ - -DPYTHON_INCLUDE_DIR=/usr/include/python3.6m \ - -DPython_ADDITIONAL_VERSIONS=3.6 \ %{nil} -%ninja_build -C "%{_vpath_builddir}" -popd +%cmake_build -%endif %install -%{?scl:scl enable %{scl} - << \EOF} -set -ex -%ninja_install -C "%{_vpath_builddir}" -%{?scl:EOF} - -%if %{with python36} -pushd build-py36 -%ninja_install -C "%{_vpath_builddir}" -popd -%endif +%cmake_install %check -%{?scl:scl enable %{scl} - << \EOF} -set -ex -%ninja_test -C "%{_vpath_builddir}" -%{?scl:EOF} +%ctest + +# Python smoke test (not tested in %%ctest): +export PYTHONPATH=%{buildroot}%{python3_sitearch} +export LD_LIBRARY_PATH=%{buildroot}%{_libdir} +%python3 -c 'import solv' %files %license LICENSE* @@ -361,6 +256,9 @@ set -ex %if %{with suse_repo} %solv_tool susetags2solv %endif +%if %{with conda} + %{_bindir}/conda2solv +%endif %files demo %solv_tool solv @@ -376,64 +274,569 @@ set -ex %{ruby_vendorarchdir}/%{libname}.so %endif -%if %{with python2_bindings} -%files -n python2-%{libname} -%{python2_sitearch}/_%{libname}.so -%{python2_sitearch}/%{libname}.py* -%endif - -%if %{with python3_bindings} -%files -n %{?scl_prefix}python%{python3_pkgversion}-%{libname} +%if %{with python_bindings} +%files -n python3-%{libname} %{python3_sitearch}/_%{libname}.so %{python3_sitearch}/%{libname}.py -%if 0%{?rhel} == 9 %{python3_sitearch}/__pycache__/%{libname}.* %endif -%endif - -%if %{with python36} -%files -n python3-%{libname} -/usr/lib64/python3.6/site-packages/_%{libname}.so -/usr/lib64/python3.6/site-packages/%{libname}.py -/usr/lib64/python3.6/site-packages/__pycache__/%{libname}.* -%endif %changelog -* Mon Nov 20 2023 Patrick Creech - 0.7.22-6 -- Obsolete python39-libsolv as well +* Mon Jan 22 2024 Patrick Creech - 1:0.7.20-6 +- Rebase libsolv and add epoc + +* Wed Jun 21 2023 Jaroslav Rohel - 0.7.20-6 +- Backport Allow to break arch lock-step on erase operations (RhBug:2172288,2172292) + +* Wed May 17 2023 Jaroslav Rohel - 0.7.20-5 +- Backport Treat condition both as positive and negative literal in pool_add_pos_literals_complex_dep + (RhBug:2185061,2190136) + +* Wed Dec 07 2022 Nicola Sella - 0.7.20-4 +- Drop patch to fix pick of old build (RhBug:2150300,RhBug:2151551) + +* Thu May 05 2022 Lukas Hrazky - 0.7.20-3 +- Allow accessing toolversion at runtime and increase it + +* Wed May 04 2022 Lukas Hrazky - 0.7.20-2 +- Add support for storing user data in a solv file +- Improve choice rule generation + +* Tue Nov 09 2021 Pavla Kratochvilova - 0.7.20-1 +- Update to 0.7.20 +- new SOLVER_EXCLUDEFROMWEAK job to ignore pkgs for weak dependencies +- support for environments in comps parser +- fix misparsing of '&' in attributes with libxml2 +- choice rules: treat orphaned packages as newest +- fix compatibility with Python 3.10 + +* Tue Jul 27 2021 Pavla Kratochvilova - 0.7.19-1 +- Update to 0.7.19 +- repo_add_conda: add flag to skip v2 packages +- fix rare segfault in resolve_jobrules() that could happen if new rules are learnt +- fix error handling in solv_xfopen_fd() +- fix memory leaks + +* Fri Apr 30 2021 Pavla Kratochvilova - 0.7.17-2 +- Fix rpm dependency + +* Thu Apr 29 2021 Pavla Kratochvilova - 0.7.17-1 +- Update to 0.7.17 +- selected bug fixes: + * repo_write: fix handling of nested flexarray + * improve choicerule generation a bit more to cover more cases + * harden testcase parser against repos being added too late + * support python-3.10 + * check %_dbpath macro in rpmdb code +- new features: + * handle default/visible/langonly attributes in comps parser + * support multiple collections in updateinfo parser + * add '-D' option in rpmdb2solv to set the dbpath + +* Thu Jan 14 2021 Nicola Sella - 0.7.16-2 +- Enable zstd compression in libsolv + +* Wed Nov 11 2020 Nicola Sella - 0.7.16-1 +- Update to 0.7.16 +- selected bug fixes: + * make testcase_mangle_repo_names deal correctly with freed repos + [bnc#1177238] + * fix add_complex_recommends() selecting conflicted packages in + rare cases leading to crashes + * improve choicerule generation so that package updates are + prefered in more cases + * fix deduceq2addedmap clearing bits outside of the map + * conda: feature depriorization and fix startswith implementation + * Fix solvable swapping messing up idarrays + * fix ruleinfo of complex dependencies returning the wrong origin + * fix solv_zchunk decoding error if large chunks are used + [bnc#1159314] +- new features + * new testcase_mangle_repo_names() function + * new solv_fmemopen() function + * Enable zstd compression support for sle15 and sle15-sp2 + * Support blacklisted packages in solver_findproblemrule() + [bnc#1172135] + * Support rules with multiple negative literals in choice rule + generation + * build with -DENABLE_RPMDB_LIBRPM=1 on SUSE to support + multiple rpm database backends + * added two new function to make libzypp independent of the rpm + database format + * support conda constrains dependencies + + +* Mon Apr 06 2020 Ales Matej - 0.7.11-1 +- Update to 0.7.11 +- selected bug fixes: + * support arch<->noarch package changes when creating patch + conflicts from the updateinfo data + * also support other rpm database types + * fixed solv_zchunk decoding error if large chunks are used + * treat retracted pathes as irrelevant + * made add_update_target work with multiversion installs +- new features + * support for SOLVER_BLACKLIST jobs that block the installation of matched + packages unless they are directly selected by an SOLVER_INSTALL job + * libsolv now also parses the patch status in the updateinfo parser + * new solvable_matchessolvable() function + * support conda constrains dependencies + * new rpm_stat_database() function + * new rpm_hash_database_state() function + + +* Tue Jun 11 2019 Ales Matej - 0.7.7-1 +- Update to 0.7.7 +- selected bug fixes: + * fix updating of too many packages in focusbest mode + * fix handling of disabled installed packages in distupgrade + * fix repository priority handling for multiversion packages + * better support of inverval deps in pool_match_dep() + * support src rpms that have non-empty provides + * fix favorq leaking between solver runs if the solver is reused + * fix SOLVER_FLAG_FOCUS_BEST updateing packages without reason + * be more correct with multiversion packages that obsolete their + own name + * allow building with swig-4.0.0 + * lock jobs now take precedence over dup and forcebest jobs +- new features + * new POOL_FLAG_WHATPROVIDESWITHDISABLED pool flag + * bindings: add get_disabled_list() and set_disabled_list() + * bindings: add whatcontainsdep() + * bindings: make the selection filters return the self object + * MSVC compilation support + +* Tue Jun 11 2019 Pavla Kratochvilova - 0.7.4-3 +- Backport patches: Use OpenSSL for computing hashes (RhBug:1630300) + +* Wed May 29 2019 Pavla Kratochvilova - 0.7.4-2 +- Backport patch: Not considered excluded packages as a best candidate (RhBug:1677583) + +* Fri Apr 26 2019 Pavla Kratochvilova - 0.7.4-1 +- soname bump to "1" +- incompatible API changes: + * bindings: Selection.flags is now an attribute + * repodata_lookup_num now works like the other lookup_num functions +- new functions: + * selection_make_matchsolvable + * selection_make_matchsolvablelist + * pool_whatmatchessolvable + * repodata_search_arrayelement + * repodata_lookup_kv_uninternalized + * repodata_search_uninternalized + * repodata_translate_dir +- new repowriter interface to write solv files allowing better + control over what gets written +- support for filtered file lists with a custom filter +- dropped support of (since a long time unused) REPOKEY_TYPE_U32 +- selected bug fixes: + * fix nasty off-by-one error in repo_write + * do not autouninstall packages because of forcebest updates + * fixed a couple of null pointer derefs and potential memory + leaks + * made disfavoring recommended packages work if strong recommends + is enabled + * no longer disable infarch rules when they don't conflict with + the job + * repo_add_rpmdb: do not copy bad solvables from the old solv file + * fix cleandeps updates not updating all packages +- new features: + * support rpm's new '^' version separator + * support set/get_considered_list in bindings + * new experimental SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED flag + * do favor evaluation before pruning allowing to (dis)favor + specific package versions + * bindings: support pool.matchsolvable(), pool.whatmatchessolvable() + pool.best_solvables() and selection.matchsolvable() + * experimental DISTTYPE_CONDA and REL_CONDA support + +* Fri Feb 08 2019 Jaroslav Mracek - 0.6.35-6 +- Backport patch to add support for modular updateinfoxml data + +* Wed Feb 06 2019 Jaroslav Mracek - 0.6.35-5 +- Backport patches for: Install of update of nss.x86_64 adds i686 into transaction (RhBug:1663136) + +* Wed Dec 12 2018 Pavla Kratochvilova - 0.6.35-4 +- Backport patch: Fix memory leaks, memory access, not used values + +* Mon Oct 15 2018 Jaroslav Mracek - 0.6.35-3 +- Update to 0.6.35 +- Backport patch: Make sure that targeted updates don't do reinstalls + +* Sun Jun 10 2018 Charalampos Stratakis - 0.6.34-2 +- Conditionalize the python2 subpackage + +* Mon Mar 26 2018 Igor Gnatenko - 0.6.34-1 +- Update to 0.6.34 + +* Wed Feb 28 2018 Igor Gnatenko - 0.6.33-1 +- Update to 0.6.33 + +* Tue Feb 13 2018 Igor Gnatenko - 0.6.32-1 +- Update to 0.6.32 + +* Wed Feb 07 2018 Fedora Release Engineering - 0.6.31-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jan 31 2018 Igor Gnatenko - 0.6.31-1 +- Update to 0.6.31 + +* Tue Jan 30 2018 Igor Gnatenko - 0.6.30-9.git.2901.47fbaa2 +- Use librpm to access rpm headers + +* Tue Jan 30 2018 Igor Gnatenko - 0.6.30-8.git.2900.8bdcce1 +- Use librpm to access DB + +* Tue Jan 30 2018 Igor Gnatenko - 0.6.30-7.git.2898.ae214a6 +- Switch to %%ldconfig_scriptlets + +* Mon Jan 29 2018 Igor Gnatenko - 0.6.30-6.git.2898.ae214a6 +- Disable librpm from accessing DB + +* Mon Jan 29 2018 Igor Gnatenko - 0.6.30-5.git.2898.ae214a6 +- Allow disabling python2 bindings + +* Mon Jan 29 2018 Igor Gnatenko - 0.6.30-4.git.2898.ae214a6 +- Switch to ninja-build + +* Mon Jan 29 2018 Igor Gnatenko - 0.6.30-3.git.2898.ae214a6 +- Update to latest git version +- Switch to use librpm for accessing headers / rpmdb + +* Mon Nov 20 2017 Igor Gnatenko - 0.6.30-3.git.2887.97b8c0c +- Update to latest snapshot + +* Mon Nov 06 2017 Panu Matilainen - 0.6.30-2 +- Better error message on DB_VERSION_MISMATCH errors + +* Tue Oct 24 2017 Igor Gnatenko - 0.6.30-1 +- Update to 0.6.30 + +* Tue Sep 19 2017 Panu Matilainen - 0.6.29-2 +- Band-aid for DB_VERSION_MISMATCH errors on glibc updates + +* Thu Sep 07 2017 Igor Gnatenko - 0.6.29-1 +- Update to 0.6.29 + +* Fri Aug 11 2017 Igor Gnatenko - 0.6.28-8 +- Rebuilt after RPM update (№ 3) + +* Thu Aug 10 2017 Igor Gnatenko - 0.6.28-7 +- Rebuilt for RPM soname bump + +* Thu Aug 10 2017 Igor Gnatenko - 0.6.28-6 +- Rebuilt for RPM soname bump + +* Thu Aug 03 2017 Igor Gnatenko - 0.6.28-5 +- Add support for REL_WITHOUT + +* Thu Aug 03 2017 Fedora Release Engineering - 0.6.28-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.6.28-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Jul 21 2017 Igor Gnatenko - 0.6.28-2 +- Backport patch for fixing yumobs + +* Sat Jul 01 2017 Igor Gnatenko - 0.6.28-1 +- Update to 0.6.28 + +* Mon May 29 2017 Igor Gnatenko - 0.6.27-2 +- Backport few fixes for bindings + +* Thu May 04 2017 Igor Gnatenko - 0.6.27-1 +- Update to 0.6.27 + +* Mon Mar 27 2017 Igor Gnatenko - 0.6.26-5.git.20.668e249 +- Update to latest snapshot + +* Sat Mar 18 2017 Neal Gompa - 0.6.26-4.git.19.2262346 +- Enable AppData support (#1427171) + +* Thu Mar 16 2017 Igor Gnatenko - 0.6.26-3.git.19.2262346 +- Update to latest git +- Switch to libxml2 + +* Mon Mar 06 2017 Igor Gnatenko - 0.6.26-2 +- Use %%{__python3} as PYTHON3_EXECUTABLE + +* Wed Feb 15 2017 Igor Gnatenko - 0.6.26-1 +- Update to 0.6.26 + +* Tue Feb 07 2017 Igor Gnatenko - 0.6.25-1 +- Update to 0.6.25 + +* Fri Jan 13 2017 Vít Ondruch - 0.6.24-4 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4 + +* Mon Dec 12 2016 Charalampos Stratakis - 0.6.24-3 +- Rebuild for Python 3.6 + +* Fri Dec 09 2016 Orion Poplawski - 0.6.24-2 +- Use upstream python build options + +* Fri Nov 11 2016 Igor Gnatenko - 0.6.24-1 +- Update to 0.6.24 + +* Sat Oct 29 2016 Denis Ollier - 0.6.23-6 +- Typo fixes in spec: s/MULTI_SYMANTICS/MULTI_SEMANTICS/ + +* Tue Sep 13 2016 Igor Gnatenko - 0.6.23-5 +- Trivial fixes in spec + +* Sat Aug 27 2016 Neal Gompa - 0.6.23-4 +- Enable suserepo on Fedora to enable making openSUSE containers with Zypper + +* Fri Aug 12 2016 Igor Gnatenko - 0.6.23-3 +- Enable helixrepo on Fedora + +* Wed Aug 03 2016 Igor Gnatenko - 0.6.23-2 +- Backport patch to fix dnf --debugsolver crash (RHBZ #1361831) + +* Wed Jul 27 2016 Igor Gnatenko - 0.6.23-1 +- Update to 0.6.23 + +* Wed Jul 20 2016 Igor Gnatenko - 0.6.22-3 +- Backport couple of patches from upstream + +* Tue Jul 19 2016 Fedora Release Engineering - 0.6.22-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Tue Jun 14 2016 Igor Gnatenko - 0.6.22-1 +- Update to 0.6.22 +- Backport patch which will help to not autoremove needed packages + (RHBZ #1227066, #1284349) + +* Mon Jun 06 2016 Igor Gnatenko - 0.6.21-3 +- Enable deb/arch support for non-rhel distros + +* Mon May 30 2016 Igor Gnatenko - 0.6.21-2 +- Modify enabled/disabled features + +* Wed May 18 2016 Igor Gnatenko - 0.6.21-1 +- Update to 0.6.21 + +* Tue May 17 2016 Igor Gnatenko - 0.6.20-2 +- Backport patch to fix crashing on reading some repos (RHBZ #1318662) +- Backport patch to fix installing multilib packages with weak deps + (RHBZ #1325471) + +* Sat Apr 09 2016 Igor Gnatenko - 0.6.20-1 +- Update to 0.6.20 + +* Tue Apr 05 2016 Igor Gnatenko - 0.6.19-3 +- Reorganize spec file +- Enable helixrepo feature +- enable appdata feature + +* Tue Mar 8 2016 Jaroslav Mracek - 0.6.19-2 +- Apply 9 patches from upstream + +* Sat Feb 27 2016 Igor Gnatenko - 0.6.19-1 +- Update to 0.6.19 + +* Tue Feb 2 2016 Peter Robinson 0.6.15-6 +- Explicitly add rubypick and ruubygems build dependencies + +* Tue Jan 12 2016 Vít Ondruch - 0.6.15-5 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3 + +* Sun Jan 10 2016 Dan Horák - 0.6.15-4 +- fix build on non-Fedora with python3 + +* Tue Jan 05 2016 Jaroslav Mracek - 0.6.15-3 +- Fix bz2 compression support for python3 (RhBug:1293652) + +* Fri Dec 18 2015 Michal Luscon - 0.6.15-2 +- Revert reworked multiversion orphaned handling + +* Thu Dec 17 2015 Igor Gnatenko - 0.6.15-1 +- Update to 0.6.15 + +* Tue Dec 08 2015 Jaroslav Mracek - 0.6.14-7 +- Rebase to upstream b1ea392 +- Enable bz2 compression support (Mikolaj Izdebski ) (RhBug:1226647) + +* Thu Nov 26 2015 Adam Williamson - 0.6.14-6 +- revert obsolete, as %%python_provide does it (undocumented) + +* Wed Nov 18 2015 Adam Williamson - 0.6.14-5 +- adjust obsolete for stupid packaging + +* Wed Nov 18 2015 Adam Williamson - 0.6.14-4 +- python2-solv obsoletes python-solv (#1263230) + +* Tue Nov 10 2015 Fedora Release Engineering - 0.6.14-3 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Wed Oct 14 2015 Michal Luscon - 0.6.14-2 +- Backport patches from upstream + +* Mon Oct 12 2015 Igor Gnatenko - 0.6.14-1 +- Update to 0.6.14 +- Backport patches from upstream + +* Thu Sep 10 2015 Igor Gnatenko - 0.6.12-1 +- Update to 0.6.12 + +* Wed Aug 05 2015 Jan Silhan - 0.6.11-3 +- added compile flag to support rich dependencies +- new version adding MIPS support +- Distribute testsolv in -tools subpackage (Igor Gnatenko) +- Enable python3 bindings for fedora (Igor Gnatenko) + +* Tue Aug 04 2015 Adam Williamson - 0.6.11-2 +- make bindings require the exact matching version of the lib (#1243737) + +* Mon Jun 22 2015 Jan Silhan - 0.6.11-1 +- new version fixing segfault +- RbConfig fixed in the upstream (1928f1a), libsolv-ruby22-rbconfig.patch erased + +* Wed Jun 17 2015 Fedora Release Engineering - 0.6.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Mar 25 2015 Jan Silhan - 0.6.10-1 +- new version fixing segfault + +* Fri Mar 6 2015 Jan Silhan - 0.6.8-3 +- Rebuilt with new provides selection feature + +* Mon Jan 19 2015 Vít Ondruch - 0.6.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.2 + +* Fri Jan 16 2015 Richard Hughes - 0.6.8-2 +- Update to latest upstream release to fix a crash in PackageKit. + +* Sun Aug 17 2014 Fedora Release Engineering - 0.6.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + + +* Mon Aug 11 2014 Jan Silhan - 0.6.4-2 +- Rebase to upstream 12af31a + +* Mon Jul 28 2014 Aleš Kozumplík - 0.6.4-1 +- Rebase to upstream 5bd9589 + +* Mon Jul 14 2014 Jan Silhan - 0.6.4-0.git2a5c1c4 +- Rebase to upstream 2a5c1c4 +- Filename selector can start with a star + +* Sat Jun 07 2014 Fedora Release Engineering - 0.6.1-2.git6d968f1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue May 27 2014 Aleš Kozumplík - 0.6.1-1.git6d968f1 +- Rebase to upstream 6d968f1 +- Fix RhBug:1049209 + +* Fri Apr 25 2014 Jan Silhan - 0.6.1-0.gitf78f5de +- Rebase to 0.6.0, upstream commit f78f5de. + +* Thu Apr 24 2014 Vít Ondruch - 0.6.0-0.git05baf54.1 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1 + +* Wed Apr 9 2014 Jan Silhan - 0.6.0-0.git05baf54 +- Rebase to 0.6.0, upstream commit 05baf54. + +* Mon Dec 16 2013 Aleš Kozumplík - 0.4.1-1.gitbcedc98 +- Rebase upstream bcedc98 +- Fix RhBug:1051917. + +* Mon Dec 16 2013 Aleš Kozumplík - 0.4.1-0.gita8e47f1 +- Rebase to 0.4.1, upstream commit a8e47f1. + +* Fri Nov 22 2013 Zdenek Pavlas - 0.4.0-2.git4442b7f +- Rebase to 0.4.0, upstream commit 4442b7f. +- support DELTA_LOCATION_BASE for completeness + +* Tue Oct 29 2013 Aleš Kozumplík - 0.4.0-1.gitd49d319 +- Rebase to 0.4.0, upstream commit d49d319. + +* Sat Aug 03 2013 Petr Pisar - 0.3.0-9.gita59d11d +- Perl 5.18 rebuild + +* Wed Jul 31 2013 Aleš Kozumplík - 0.3.0-8.gita59d11d +- Rebase to upstream a59d11d. + +* Fri Jul 19 2013 Aleš Kozumplík - 0.3.0-7.git228d412 +- Add build flags, including Deb, Arch, LZMA and MULTI_SEMANTICS. (RhBug:985905) + +* Wed Jul 17 2013 Petr Pisar - 0.3.0-6.git228d412 +- Perl 5.18 rebuild + +* Mon Jun 24 2013 Aleš Kozumplík - 0.3.0-5.git228d412 +- Rebase to upstream 228d412. +- Fixes hawkey github issue https://github.com/akozumpl/hawkey/issues/13 + +* Thu Jun 20 2013 Aleš Kozumplík - 0.3.0-4.git209e9cb +- Rebase to upstream 209e9cb. +- Package the new man pages. + +* Thu May 16 2013 Aleš Kozumplík - 0.3.0-3.git7399ad1 +- Run 'make test' with libsolv build. + +* Mon Apr 8 2013 Aleš Kozumplík - 0.3.0-2.git7399ad1 +- Rebase to upstream 7399ad1. +- Fixes RhBug:905209 + +* Mon Apr 8 2013 Aleš Kozumplík - 0.3.0-1.gite372b78 +- Rebase to upstream e372b78. +- Fixes RhBug:e372b78 + +* Thu Feb 14 2013 Fedora Release Engineering - 0.2.3-2.gitf663ca2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Aug 23 2012 Aleš Kozumplík - 0.0.0-17.git6c9d3eb +- Rebase to upstream 6c9d3eb. +- Drop the solv.i stdbool.h fix integrated upstream. +- Dropped the job reasons fix. + +* Mon Jul 23 2012 Aleš Kozumplík - 0.0.0-16.git1617994 +- Fix build problems with Perl bindings. + +* Mon Jul 23 2012 Aleš Kozumplík - 0.0.0-15.git1617994 +- Rebuilt after a failed mass rebuild. -* Sat Nov 11 2023 Odilon Sousa - 0.7.22-5 -- Build against python 3.11 +* Thu Jul 19 2012 Fedora Release Engineering - 0.0.0-14.git1617994 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild -* Thu May 12 2022 Yanis Guenane - 0.7.22-4 -- Fix obsolete named package +* Mon Jul 16 2012 Aleš Kozumplik - 0.0.0-13.git1617994%{?dist} +- preliminary fix for JOB resons in solver_describe_decision(). -* Tue May 10 2022 Yanis Guenane - 0.7.22-3 -- Obsolete the old Python 3.8 package for smooth upgrade +* Sun Jul 1 2012 Aleš Kozumplik - 0.0.0-12.git1617994%{?dist} +- Rebase to upstream 1617994. +- Support for RPM_ADD_WITH_HDRID. -* Thu Apr 28 2022 Odilon Sousa - 0.7.22-2 -- Rebuilding libsolv against python 3.9 +* Thu Jun 7 2012 Aleš Kozumplik - 0.0.0-11.gitd39a42b%{?dist} +- Rebase to upstream d39a42b. +- Fix the epochs. +- Move the ruby modules into vendorarch dir, where they are expected. -* Tue Apr 19 2022 Odilon Sousa - 0.7.22-1 -- Release libsolv 0.7.22 +* Thu May 17 2012 Aleš Kozumplik - 0.0.0-9.git8cf7650%{?dist} +- Rebase to upstream 8cf7650. +- ruby bindings: fix USE_VENDORDIRS for Fedora. -* Wed Oct 27 2021 Evgeni Golov - 0.7.20-4 -- Also build libsolv against Python 3.6 on EL8 +* Thu Apr 12 2012 Aleš Kozumplik - 0.0.0-7.gitaf1465a2%{?dist} +- Rebase to the upstream. +- Make repo_add_solv() work without stub repodata. -* Tue Oct 26 2021 Evgeni Golov - 0.7.20-3 -- Obsolete non-SCL Python 3 packages on EL7 +* Thu Apr 5 2012 Karel Klíč - 0.0.0-6.git80afaf7%{?dist} +- Rebuild for the new libdb package. -* Tue Sep 28 2021 Evgeni Golov - 0.7.20-2 -- Build against Python 3.8 +* Mon Apr 2 2012 Karel Klíč - 0.0.0-5.git80afaf7%{?dist} +- Rebuild for the new rpm package. -* Tue Sep 28 2021 Evgeni Golov - 0.7.20-1 -- Release libsolv 0.7.20 +* Wed Mar 21 2012 Aleš Kozumplík - 0.0.0-4.git80afaf7%{?dist} +- New upstream version, fix the .rpm release number. -* Tue Mar 23 2021 Evgeni Golov - 0.7.17-1 -- Release libsolv 0.7.17 +* Wed Mar 21 2012 Aleš Kozumplík - 0.0.0-3.git80afaf7%{?dist} +- New upstream version. -* Tue Aug 18 2020 Evgeni Golov - 0.7.12-2 -- Only build Python2 bindings on EL7 +* Tue Feb 7 2012 Karel Klíč - 0.0.0-2.git857fe28%{?dist} +- Adapted to Ruby 1.9.3 (workaround for broken CMake in Fedora and + ruby template correction in bindings) -* Tue Apr 21 2020 Igor Raits - 0.7.12-1 -- Update to 0.7.12 +* Thu Feb 2 2012 Karel Klíč - 0.0.0-1.git857fe28 +- Initial packaging +- Based on Jindra Novy's spec file +- Based on upstream spec file From 855b5ebf9bed1976cf232bc3acbb749bbf9d2aae Mon Sep 17 00:00:00 2001 From: Patrick Creech Date: Thu, 21 Mar 2024 11:28:01 -0400 Subject: [PATCH 3/6] Use python3_pkgversion in name --- packages/python-solv/python-solv.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/python-solv/python-solv.spec b/packages/python-solv/python-solv.spec index 30d28fd56..4e64268ad 100644 --- a/packages/python-solv/python-solv.spec +++ b/packages/python-solv/python-solv.spec @@ -137,7 +137,15 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch} export LD_LIBRARY_PATH=%{buildroot}%{_libdir} %python3 -c 'import solv' -%files +%package -n python%{python3_pkgversion}-%{libname} +Summary: %{summary} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{libname}} + +%description -n python%{python3_pkgversion}-%{libname} +%{summary} + + +%files -n python%{python3_pkgversion}-%{libname} %license LICENSE* %doc README %{python3_sitearch}/_%{libname}.so From 46fee9d77dec3793de421f583e47b3a37f0dcb68 Mon Sep 17 00:00:00 2001 From: Patrick Creech Date: Thu, 21 Mar 2024 11:44:00 -0400 Subject: [PATCH 4/6] Remove libsolv from el9 comps --- comps/comps-pulpcore-el9.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/comps/comps-pulpcore-el9.xml b/comps/comps-pulpcore-el9.xml index 4ede409ce..224679da2 100644 --- a/comps/comps-pulpcore-el9.xml +++ b/comps/comps-pulpcore-el9.xml @@ -16,10 +16,6 @@ createrepo_c-libs libcomps libcomps-devel - libsolv - libsolv-demo - libsolv-devel - libsolv-tools postgresql-debversion postgresql-evr pulpcore-obsolete-packages From 25761e0f4be89e9d1049e6394356ee8869b724bb Mon Sep 17 00:00:00 2001 From: Patrick Creech Date: Tue, 27 Feb 2024 19:41:20 -0500 Subject: [PATCH 5/6] ERROR=Reset relesae to bypass version/release check. There's got to be a way around this error --- packages/libsolv/libsolv.spec | 4 ++-- packages/python-solv/python-solv.spec | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/libsolv/libsolv.spec b/packages/libsolv/libsolv.spec index 97abffabd..3ae876563 100644 --- a/packages/libsolv/libsolv.spec +++ b/packages/libsolv/libsolv.spec @@ -37,7 +37,7 @@ Name: lib%{libname} Version: 0.7.20 -Release: 6%{?dist} +Release: 1%{?dist} Epoch: 1 Summary: Package dependency solver @@ -282,7 +282,7 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir} %endif %changelog -* Mon Jan 22 2024 Patrick Creech - 1:0.7.20-6 +* Mon Jan 22 2024 Patrick Creech - 1:0.7.20-1 - Rebase libsolv and add epoc * Wed Jun 21 2023 Jaroslav Rohel - 0.7.20-6 diff --git a/packages/python-solv/python-solv.spec b/packages/python-solv/python-solv.spec index 4e64268ad..e3e47efac 100644 --- a/packages/python-solv/python-solv.spec +++ b/packages/python-solv/python-solv.spec @@ -46,6 +46,7 @@ BuildRequires: zlib-devel BuildRequires: swig BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-setuptools # -DWITH_LIBXML2=ON BuildRequires: libxml2-devel From d8b34ff97851318b5030e6c3fef1d198f3f3934a Mon Sep 17 00:00:00 2001 From: Patrick Creech Date: Thu, 21 Mar 2024 15:32:25 -0400 Subject: [PATCH 6/6] Random testing --- packages/python-solv/python-solv.spec | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/python-solv/python-solv.spec b/packages/python-solv/python-solv.spec index e3e47efac..68b561dd6 100644 --- a/packages/python-solv/python-solv.spec +++ b/packages/python-solv/python-solv.spec @@ -1,4 +1,5 @@ %global libname solv +%global pypi_name solv %global python3_pkgversion 3.11 %global __python3 /usr/bin/python3.11 @@ -138,15 +139,15 @@ export PYTHONPATH=%{buildroot}%{python3_sitearch} export LD_LIBRARY_PATH=%{buildroot}%{_libdir} %python3 -c 'import solv' -%package -n python%{python3_pkgversion}-%{libname} +%package -n python%{python3_pkgversion}-%{pypi_name} Summary: %{summary} -%{?python_provide:%python_provide python%{python3_pkgversion}-%{libname}} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} -%description -n python%{python3_pkgversion}-%{libname} +%description -n python%{python3_pkgversion}-%{pypi_name} %{summary} -%files -n python%{python3_pkgversion}-%{libname} +%files -n python%{python3_pkgversion}-%{pypi_name} %license LICENSE* %doc README %{python3_sitearch}/_%{libname}.so