New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add zchunk support #127
Add zchunk support #127
Conversation
Do please note, that, unlike the libsolv and dnf patches, these patches make zchunk a mandatory dependency. If you'd rather it be an optional dependency, please let me know. |
@jdieter I suspect that it might be desired for the RHEL side of the house to be optional, but I don't see a reason why we wouldn't want it on in Fedora and Mageia. |
Without a merge of patch for libsolv it will not work? |
That's correct. It will download the zchunk metadata, and send it to libsolv, but without openSUSE/libsolv#270, libsolv won't be able to read the zchunk metadata. |
CMakeLists.txt
Outdated
@@ -31,6 +31,12 @@ PKG_SEARCH_MODULE(LIBCRYPTO REQUIRED libcrypto openssl) | |||
PKG_CHECK_MODULES(LIBXML2 libxml-2.0 REQUIRED) | |||
FIND_PACKAGE(CURL REQUIRED) | |||
FIND_PACKAGE(Gpgme REQUIRED) | |||
FIND_LIBRARY(ZCHUNKLIB NAMES zck) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be pkg_check_modules
zck.h should #include <stdbool.h> as the boolean type is part of public header There are also couple compilation errors, such as:
I also created PR to make zchunk optional - it's very important to us so we can turn it off on as needed: |
Ok, I've gone ahead and merged your PR and added <stdbool.h> to zck.h in zchunk-0.9.10. This now compiles fine with zchunk-0.9.10+, but it won't work with repositories generated using the current createrepo_c zchunk patches because of the format changes. |
fdb6816
to
7e2e787
Compare
@dmach, If you'd prefer these to be in fewer commits, I'll squash them down for you |
@jdieter Could you please do so? |
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
@dmach, @Conan-Kudo is there anything else you need me to do on these before review? |
librepo.spec
Outdated
@@ -38,6 +43,9 @@ BuildRequires: libcurl-devel >= 7.19.0 | |||
BuildRequires: pkgconfig(libxml-2.0) | |||
BuildRequires: pkgconfig(libcrypto) | |||
BuildRequires: pkgconfig(openssl) | |||
%if %{with zchunk} | |||
BuildRequires: zchunk-devel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use pkgconfig(zck) >= 0.9.11
here.
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Thanks! |
Is there anything else you need from me before you review this? |
This patchset adds zchunk support to librepo. It requires that libsolv also have zchunk support enabled, and, for it to be effective, the calling application needs to pass the handle a cache directory to find old zchunk files to delta against (I've submitted a patch to dnf).