diff --git a/bin/xbps-rindex/repoflush.c b/bin/xbps-rindex/repoflush.c index ba605e8d..e23de41f 100644 --- a/bin/xbps-rindex/repoflush.c +++ b/bin/xbps-rindex/repoflush.c @@ -55,7 +55,7 @@ repodata_flush(struct xbps_handle *xhp, const char *repodir, /* Create and write our repository archive */ ar = archive_write_new(); assert(ar); - archive_write_add_filter_gzip(ar); + archive_write_support_compression_gzip(ar); archive_write_set_format_pax_restricted(ar); archive_write_set_options(ar, "compression-level=9"); archive_write_open_fd(ar, repofd); diff --git a/include/xbps_api_impl.h b/include/xbps_api_impl.h index 4b701996..556381ea 100644 --- a/include/xbps_api_impl.h +++ b/include/xbps_api_impl.h @@ -74,6 +74,15 @@ #define archive_read_support_compression_xz(x) \ archive_read_support_filter_xz(x) +#define archive_write_support_compression_gzip(x) \ + archive_write_add_filter_gzip(x) + +#define archive_write_support_compression_bzip2(x) \ + archive_write_add_filter_bzip2(x) + +#define archive_write_support_compression_xz(x) \ + archive_write_add_filter_xz(x) + #define archive_read_finish(x) \ archive_read_free(x) diff --git a/lib/repo.c b/lib/repo.c index 92febff6..babdec95 100644 --- a/lib/repo.c +++ b/lib/repo.c @@ -80,7 +80,9 @@ xbps_repo_open(struct xbps_handle *xhp, const char *url) repo->xhp = xhp; repo->uri = url; repo->ar = archive_read_new(); - archive_read_support_filter_gzip(repo->ar); + archive_read_support_compression_gzip(repo->ar); + archive_read_support_compression_bzip2(repo->ar); + archive_read_support_compression_xz(repo->ar); archive_read_support_format_tar(repo->ar); if (archive_read_open_filename(repo->ar, repofile, ARCHIVE_READ_BLOCKSIZE)) {