diff --git a/0001-zck_end_chunk-returns-number-of-bytes-written-or-1-f.patch b/0001-zck_end_chunk-returns-number-of-bytes-written-or-1-f.patch deleted file mode 100644 index 9931fdf..0000000 --- a/0001-zck_end_chunk-returns-number-of-bytes-written-or-1-f.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 19af36bcd4984359509deb95e2df83449ce471f6 Mon Sep 17 00:00:00 2001 -From: Jonathan Dieter -Date: Sun, 6 Jan 2019 19:21:04 +0000 -Subject: [PATCH 1/3] zck_end_chunk returns number of bytes written or -1 for - error - -Signed-off-by: Jonathan Dieter ---- - src/compression_wrapper.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/compression_wrapper.c b/src/compression_wrapper.c -index 43f213c..e5b58d2 100644 ---- a/src/compression_wrapper.c -+++ b/src/compression_wrapper.c -@@ -880,7 +880,7 @@ cr_close(CR_FILE *cr_file, GError **err) - zckCtx *zck = (zckCtx *) cr_file->FILE; - ret = CRE_OK; - if (cr_file->mode == CR_CW_MODE_WRITE) { -- if(!zck_end_chunk(zck)) { -+ if(zck_end_chunk(zck) < 0) { - ret = CRE_ZCK; - g_set_error(err, ERR_DOMAIN, CRE_ZCK, - "Unable to end final chunk: %s", zck_get_error(zck)); --- -2.20.1 - diff --git a/0002-Add-missing-sentinal.patch b/0002-Add-missing-sentinal.patch deleted file mode 100644 index 255c712..0000000 --- a/0002-Add-missing-sentinal.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 2eb66187dd8ab5840b4c82c18e817d04caa258ca Mon Sep 17 00:00:00 2001 -From: Jonathan Dieter -Date: Tue, 15 Jan 2019 23:23:47 +0000 -Subject: [PATCH 2/3] Add missing sentinal - -Signed-off-by: Jonathan Dieter ---- - src/misc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/misc.c b/src/misc.c -index ec8667b..288b0eb 100644 ---- a/src/misc.c -+++ b/src/misc.c -@@ -1519,7 +1519,7 @@ cr_get_dict_file(const gchar *dir, const gchar *file) - assert(dict_file); - - snprintf(dict_file, strlen(file) + 7, "%s.zdict", file); -- gchar *full_path = g_build_path("/", dir, dict_file); -+ gchar *full_path = g_build_path("/", dir, dict_file, NULL); - assert(full_path); - - free(dict_file); --- -2.20.1 - diff --git a/0003-Fix-misc-test.patch b/0003-Fix-misc-test.patch deleted file mode 100644 index 00d76d5..0000000 --- a/0003-Fix-misc-test.patch +++ /dev/null @@ -1,40 +0,0 @@ -From ccd8f0ec32b9ca82a727b35fcc8724ea6f6d3556 Mon Sep 17 00:00:00 2001 -From: Jonathan Dieter -Date: Tue, 15 Jan 2019 23:23:58 +0000 -Subject: [PATCH 3/3] Fix misc test - -Signed-off-by: Jonathan Dieter ---- - tests/test_misc.c | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) - -diff --git a/tests/test_misc.c b/tests/test_misc.c -index 9d528c7..06144a6 100644 ---- a/tests/test_misc.c -+++ b/tests/test_misc.c -@@ -531,8 +531,8 @@ compressfile_test_text_file(Copyfiletest *copyfiletest, - GError *tmp_err = NULL; - - g_assert(!g_file_test(copyfiletest->dst_file, G_FILE_TEST_EXISTS)); -- ret = cr_compress_file(TEST_TEXT_FILE, copyfiletest->dst_file, -- CR_CW_GZ_COMPRESSION, &tmp_err); -+ ret = cr_compress_file(TEST_TEXT_FILE, &(copyfiletest->dst_file), -+ CR_CW_GZ_COMPRESSION, NULL, FALSE, &tmp_err); - g_assert(!tmp_err); - g_assert_cmpint(ret, ==, CRE_OK); - g_assert(g_file_test(copyfiletest->dst_file, G_FILE_TEST_IS_REGULAR)); -@@ -556,8 +556,9 @@ compressfile_with_stat_test_text_file(Copyfiletest *copyfiletest, - g_assert(!tmp_err); - - g_assert(!g_file_test(copyfiletest->dst_file, G_FILE_TEST_EXISTS)); -- ret = cr_compress_file_with_stat(TEST_TEXT_FILE, copyfiletest->dst_file, -- CR_CW_GZ_COMPRESSION, stat, &tmp_err); -+ ret = cr_compress_file_with_stat(TEST_TEXT_FILE, ©filetest->dst_file, -+ CR_CW_GZ_COMPRESSION, stat, NULL, FALSE, -+ &tmp_err); - g_assert(!tmp_err); - g_assert_cmpint(ret, ==, CRE_OK); - g_assert(g_file_test(copyfiletest->dst_file, G_FILE_TEST_IS_REGULAR)); --- -2.20.1 - diff --git a/createrepo_c-0.12.0.tar.gz b/createrepo_c-0.12.0.tar.gz deleted file mode 100644 index ac4d077..0000000 --- a/createrepo_c-0.12.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c55334e6e8f41c4c9c527ffe3d55dc8e08815f3f06c6972ee7e99306a3b8219e -size 363013 diff --git a/createrepo_c-0.15.4.tar.gz b/createrepo_c-0.15.4.tar.gz new file mode 100644 index 0000000..79ef304 --- /dev/null +++ b/createrepo_c-0.15.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80dad163abdb83fc24c3de519e8a4888c394a25337e3682fd5f68c04ac2b3d90 +size 595460 diff --git a/createrepo_c.changes b/createrepo_c.changes index a8feded..034a133 100644 --- a/createrepo_c.changes +++ b/createrepo_c.changes @@ -1,3 +1,125 @@ +------------------------------------------------------------------- +Fri Dec 6 11:47:37 UTC 2019 - Neal Gompa + +- Update to 0.15.4 + + Add reboot_suggested field to UpdateRecord (rh#1772466) + + Skip directory matching --exclude right away + + Add restart_suggested to updatecollectionpackage + +------------------------------------------------------------------- +Fri Nov 29 12:42:37 UTC 2019 - Neal Gompa + +- Update to 0.15.3 + + Export all changelog entries in compatibility mode + + Libmagic to follow symlinks (rh#1776399) + + Add shortcut to detect *.yaml files as not compressed +- Ensure createrepo_c fully replaces createrepo on Tumbleweed +- Remove old and now unused dependency on deltarpm as drpm is used now + +------------------------------------------------------------------- +Mon Nov 25 13:39:11 UTC 2019 - Neal Gompa + +- Update to 0.15.2 + + Fix file mode for cache (rh#1686812) + + Honor umask on cache files (rh#1686812) +- Enable DeltaRPM support for openSUSE targets on Leap 15.2+ and TW + +------------------------------------------------------------------- +Mon Nov 18 05:57:08 UTC 2019 - Steve Kowalik + +- Add BuildRequires on python3, it won't be pulled in side effect of + requiring python3-nose + +------------------------------------------------------------------- +Tue Sep 17 12:00:42 UTC 2019 - Dirk Mueller + +- fix build by adding missing tarball and updating filelist + +------------------------------------------------------------------- +Tue Sep 17 11:43:49 UTC 2019 - Frank Schreiner + +- Update to version 0.15.1: + * Release 0.15.1 + * Fix null pointer crash in cr_dumper_thread() if it fails to get checksum + * Fix search in string with missing terminating zero (rh#1750673) + * Depend on DRPM minimum version 0.4.0 + * Release 0.15.0 + * Revise drpm dependency check and bump the minimum version to 0.3.0 + * Release 0.14.4 + * Update documentation and regenerate man pages to sync up + * Use drpm_make from drpm instead of deltarpm (rh#1687843) + * Fix some DEBUG build warnings + * Switch off html timestamps on documentation (rh#1731050) + * Update documentation for mergerepo_c merge methods (rh#1722803) + * Update documentation for --retain-old-md and --compatibility + * Fix --read-pkgs-list to only list actually read packages + * Release 0.14.3 + * Add missing python metadata to python2/3-createrepo_c (rh#1695677) + * detect plain tar file as non compressed + +------------------------------------------------------------------- +Sat Jun 29 13:06:18 UTC 2019 - Neal Gompa + +- Update to 0.14.2 + + Fix issue with createrepo_c hanging at the end (rh#1714666) + + Don't include packages with forbidden control chars in repodata (boo#1110914) + + Correct pkg count in headers if there were invalid pkgs (rh#1596211) + + Prevent exiting with 0 if errors occur while finalizing repodata + +------------------------------------------------------------------- +Wed May 15 23:17:38 UTC 2019 - Neal Gompa + +- Update to 0.14.0 + + Fix crash when dumping updateinfo and module is omitted (rh#1707981) + + Add --pkgorigins mode + +------------------------------------------------------------------- +Sat May 4 22:17:16 UTC 2019 - Neal Gompa + +- Update to 0.13.1 + + Fix tests to work properly when modulemd support is not enabled +- Enable modulemd support on openSUSE Leap 15.1+ and Tumbleweed + +------------------------------------------------------------------- +Sat May 4 01:39:34 UTC 2019 - Neal Gompa + +- Update to 0.13.0 + + Add support for handling modulemd + + Add support for Koji simple merge mode + + Add support for zchunked modulemd + + Fixed --keep-all-metadata to keep all additional metadata +- Disable tests if modulemd support is not enabled to prevent wrong failures +- Drop patches included in this release + + 0001-Find-correct-nosetests-version-even-when-which-comma.patch + + 0002-fix-linking-when-Wl-no-undefined-is-set.patch + +------------------------------------------------------------------- +Mon Mar 18 17:16:27 UTC 2019 - Jan Engelhardt + +- Use noun phrase in summary. + +------------------------------------------------------------------- +Fri Mar 01 09:37:11 UTC 2019 - Frank Schreiner +- Added upstream patches + * 0001-Find-correct-nosetests-version-even-when-which-comma.patch + * 0002-fix-linking-when-Wl-no-undefined-is-set.patch +- Drop included patches + * 0001-zck_end_chunk-returns-number-of-bytes-written-or-1-f.patch + * 0002-Add-missing-sentinal.patch + * 0003-Fix-misc-test.patch +- Disable drpm support +- Update to version 0.12.1: + * Release 0.12.1 + * For make test, xz and zchunk (not just *-devel) are required. + * Make cmake variable PYTHON_EXECUTABLE global + * Add zchunk support already to Fedora 29 + * [spec] Fix spec to work for epel 7 + * Add CMake support for python interpreter path + * Add space after if statement + * Fix misc test + * Add missing sentinal + * Add zchunk support to mergerepo_c for extra files + ------------------------------------------------------------------- Mon Feb 4 12:09:27 UTC 2019 - Neal Gompa @@ -31,6 +153,7 @@ Wed Aug 1 12:06:35 UTC 2018 - Neal Gompa - Use license macro for license file - Drop trailing whitespace - Fix comment about drpm support +- [boo#1125044] fix for huge rpm packages ------------------------------------------------------------------- Thu Apr 5 15:50:28 UTC 2018 - Adrian Schröter diff --git a/createrepo_c.spec b/createrepo_c.spec index bd9e272..8c9cacd 100644 --- a/createrepo_c.spec +++ b/createrepo_c.spec @@ -1,7 +1,7 @@ # # spec file for package createrepo_c # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # Copyright (c) 2019 Neal Gompa . # # All modifications and additions to the file contributed by third parties @@ -17,25 +17,34 @@ # -# Enable Python and tests selectively %if 0%{?is_opensuse} || 0%{?suse_version} >= 1330 +# Enable Python bindings on openSUSE %bcond_without python3 %bcond_without tests %else -%bcond_with tests %bcond_with python3 +%bcond_with tests %endif -%if ( 0%{?sle_version} || 0%{?suse_version} ) -# Disabled DeltaRPM support for SUSE -%bcond_with drpm -%else +%if (0%{?is_opensuse} && 0%{?sle_version} >= 150200) || 0%{?suse_version} >= 1550 # Enable enhanced DeltaRPM support %bcond_without drpm +%else +%bcond_with drpm %endif %if (0%{?is_opensuse} && 0%{?sle_version} >= 150100) || 0%{?suse_version} >= 1550 %bcond_without zchunk +%bcond_without libmodulemd +%else +%bcond_with zchunk +%bcond_with libmodulemd +%endif + +%if 0%{?sle_version} && 0%{?sle_version} < 160000 +%bcond_with as_createrepo +%else +%bcond_without as_createrepo %endif %{!?make_build: %global make_build %{__make} %{?_smp_mflags}} @@ -45,19 +54,14 @@ %define devname lib%{name}-devel Name: createrepo_c -Version: 0.12.0 +Version: 0.15.4 Release: 0 -Summary: Creates a common metadata repository +Summary: RPM repository metadata generation utility License: GPL-2.0-or-later Group: System/Packages URL: https://github.com/rpm-software-management/createrepo_c Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz -# Backports from upstream -Patch0001: 0001-zck_end_chunk-returns-number-of-bytes-written-or-1-f.patch -Patch0002: 0002-Add-missing-sentinal.patch -Patch0003: 0003-Fix-misc-test.patch - %if %{with python3} BuildRequires: python3-devel %endif @@ -83,21 +87,32 @@ BuildRequires: zlib-devel BuildRequires: zchunk BuildRequires: zchunk-devel >= 0.9.11 %endif +%if %{with libmodulemd} +BuildRequires: libmodulemd-devel >= 2.3.0 +%endif Requires: %{libname}%{?_isa} = %{version}-%{release} %if %{with tests} +BuildRequires: python3 BuildRequires: python3-nose %endif %if 0%{?suse_version} >= 1330 BuildRequires: bash-completion-devel %endif %if %{with drpm} -BuildRequires: drpm-devel +BuildRequires: drpm-devel >= 0.4.0 %endif Requires: %{libname} = %{version}-%{release} +%if %{with as_createrepo} +# Fully replaces createrepo +Requires(pre): update-alternatives +Obsoletes: createrepo < 0.11.0 +Provides: createrepo = %{version}-%{release} +%else Requires(post): update-alternatives Requires(postun): update-alternatives +%endif Provides: createrepo-implementation @@ -112,10 +127,7 @@ rpm packages and maintaining it. %package -n %{libname} Summary: Library for repodata manipulation -# The function to create DeltaRPMs calls /usr/bin/makedeltarpm, -# which is part of the 'deltarpm' package Group: System/Libraries -Requires: deltarpm %description -n %{libname} Libraries for applications using the createrepo_c library @@ -152,6 +164,7 @@ sed -i -e '/HTML_TIMESTAMP/d' doc/Doxyfile.in.in %define __builddir build %cmake \ %{!?with_zchunk:-DWITH_ZCHUNK=OFF} \ + %{!?with_libmodulemd:-DWITH_LIBMODULEMD=OFF} \ %{!?with_drpm:-DENABLE_DRPM=OFF} \ %{!?with_python3:-DENABLE_PYTHON=OFF} \ -DPYTHON_DESIRED:str=3 @@ -169,6 +182,12 @@ sed -i -e '/HTML_TIMESTAMP/d' doc/Doxyfile.in.in %define __builddir build %cmake_install +%if %{with as_createrepo} +for i in createrepo mergerepo modifyrepo sqliterepo;do + ln -s %{_bindir}/$i\_c %{buildroot}%{_bindir}/$i + echo ".so man8/$i\_c.8" > %{buildroot}%{_mandir}/man8/$i\.8 +done +%else mkdir -p %{buildroot}%{_sysconfdir}/alternatives for i in createrepo mergerepo modifyrepo sqliterepo;do ln -s %{_bindir}/$i\_c %{buildroot}%{_sysconfdir}/alternatives/$i @@ -176,10 +195,17 @@ for i in createrepo mergerepo modifyrepo sqliterepo;do ln -s %{_mandir}/man8/$i\_c.8.gz %{buildroot}%{_sysconfdir}/alternatives/$i\.8.gz ln -s %{_sysconfdir}/alternatives/$i\.8.gz %{buildroot}%{_mandir}/man8/$i\.8.gz done +%endif %fdupes %{buildroot}%{_prefix} %fdupes build/doc/html +%if %{with as_createrepo} +%pre +if [ -e %{_sysconfdir}/alternatives/createrepo ]; then + update-alternatives --remove createrepo %{_bindir}/createrepo_c +fi +%else %post update-alternatives --install \ %{_bindir}/createrepo createrepo %{_bindir}/createrepo_c 20 \ @@ -195,6 +221,7 @@ update-alternatives --install \ if [ ! -f %{_bindir}/createrepo_c ]; then update-alternatives --remove createrepo %{_bindir}/createrepo_c fi +%endif %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig @@ -219,6 +246,7 @@ fi %{_bindir}/mergerepo %{_bindir}/modifyrepo %{_bindir}/sqliterepo +%if ! %{with as_createrepo} %ghost %_sysconfdir/alternatives/createrepo %ghost %_sysconfdir/alternatives/mergerepo %ghost %_sysconfdir/alternatives/modifyrepo @@ -227,6 +255,7 @@ fi %ghost %_sysconfdir/alternatives/mergerepo.8.gz %ghost %_sysconfdir/alternatives/modifyrepo.8.gz %ghost %_sysconfdir/alternatives/sqliterepo.8.gz +%endif %files -n %{libname} %license COPYING @@ -244,6 +273,7 @@ fi %files -n python3-%{name} %license COPYING %{python3_sitearch}/createrepo_c/ +%{python3_sitearch}/*egg-info %endif %changelog