From dde99d9b79412b23b2cf4c848a659b1b7401c821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]> Date: Mon, 6 Jun 2016 13:48:10 +0200 Subject: Align Debian and Arch support to libsolv
--- ...-Align-Debian-and-Arch-support-to-libsolv.patch | 73 ++++++++++++++++++++++ perl-BSSolv.spec | 8 ++- 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 BSSolv-0.01-Align-Debian-and-Arch-support-to-libsolv.patch diff --git a/BSSolv-0.01-Align-Debian-and-Arch-support-to-libsolv.patch b/BSSolv-0.01-Align-Debian-and-Arch-support-to-libsolv.patch new file mode 100644 index 0000000..ca1d0ba --- /dev/null +++ b/BSSolv-0.01-Align-Debian-and-Arch-support-to-libsolv.patch @@ -0,0 +1,73 @@ +From d029425eaf9346fab7cdee77e546032e46ee8581 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <[email protected]> +Date: Mon, 6 Jun 2016 13:43:49 +0200 +Subject: [PATCH] Align Debian and Arch support to libsolv +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libsolv can be built without support for Debian or Arch repositories. +This patch allows to build perl-BSSolv against libsolv that does not +support them. + +https://bugzilla.redhat.com/show_bug.cgi?id=1342160 +Signed-off-by: Petr Písař <[email protected]> +--- + BSSolv.xs | 8 +++++++- + Makefile.PL | 8 ++++++++ + 2 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/BSSolv.xs b/BSSolv.xs +index 4468be9..9116a7c 100644 +--- a/BSSolv.xs ++++ b/BSSolv.xs +@@ -16,8 +16,10 @@ + #include "repo_solv.h" + #include "repo_write.h" + #include "repo_rpmdb.h" ++#ifdef HAVE_DEBIAN + #include "repo_deb.h" +-#if 1 ++#endif ++#ifdef HAVE_ARCH + #include "repo_arch.h" + #endif + +@@ -1018,11 +1020,15 @@ repodata_addbin(Repodata *data, char *prefix, char *s, int sl, char *sid) + if (sl >= 4 && !strcmp(s + sl - 4, ".rpm")) + p = repo_add_rpm(data->repo, (const char *)path, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|REPO_NO_LOCATION|RPM_ADD_WITH_PKGID|RPM_ADD_NO_FILELIST|RPM_ADD_NO_RPMLIBREQS); + else if (sl >= 4 && !strcmp(s + sl - 4, ".deb")) ++#ifdef HAVE_DEBIAN + p = repo_add_deb(data->repo, (const char *)path, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|REPO_NO_LOCATION|DEBS_ADD_WITH_PKGID); ++#endif + #ifdef ARCH_ADD_WITH_PKGID ++#ifdef HAVE_ARCH + else if (sl >= 11 && (!strcmp(s + sl - 11, ".pkg.tar.gz") || !strcmp(s + sl - 11, ".pkg.tar.xz"))) + p = repo_add_arch_pkg(data->repo, (const char *)path, REPO_REUSE_REPODATA|REPO_NO_INTERNALIZE|REPO_NO_LOCATION|ARCH_ADD_WITH_PKGID); + #endif ++#endif + solv_free(path); + if (!p) + return 0; +diff --git a/Makefile.PL b/Makefile.PL +index 1325734..1825dc7 100644 +--- a/Makefile.PL ++++ b/Makefile.PL +@@ -13,6 +13,14 @@ if (@ARGV && $ARGV[0] eq '--bundled-libsolv') { + + $lib = ($lib ? "$lib " : '') . '-lsolvext -lsolv -lz -llzma'; + ++my $def = ''; ++if (-e "$inc/repo_deb.h") { ++ $def .= ' -DHAVE_DEBIAN'; ++} ++if (-e "$inc/repo_arch.h") { ++ $def .= ' -DHAVE_ARCH'; ++} ++ + WriteMakefile( + NAME => 'BSSolv', + VERSION_FROM => 'BSSolv.pm', +-- +2.5.5 + diff --git a/perl-BSSolv.spec b/perl-BSSolv.spec index 00f1b5f..1fe9a85 100644 --- a/perl-BSSolv.spec +++ b/perl-BSSolv.spec @@ -2,10 +2,12 @@ Name: perl-BSSolv Version: 0.01 -Release: 11.git%{gitrev}%{?dist} +Release: 12.git%{gitrev}%{?dist} Url: https://github.com/openSUSE/perl-BSSolv # Taken from the upstream url from the revision %{gitrev} Source0: BSSolv-%{version}-git%{gitrev}.tar.gz +# Align Debian and Arch support to libsolv, bug #1342160 +Patch0: BSSolv-0.01-Align-Debian-and-Arch-support-to-libsolv.patch Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: libsolv-devel >= 0.3.0-7 BuildRequires: libdb4-devel @@ -26,6 +28,7 @@ Using a Satisfyability Solver to compute package dependencies. %prep %setup -c %{name}-%{version}-%{release} -T tar xvzf %{SOURCE0} +%patch0 -p1 %build perl Makefile.PL @@ -44,6 +47,9 @@ find $RPM_BUILD_ROOT -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' %doc README %changelog +* Mon Jun 06 2016 Petr Pisar <[email protected]> - 0.01-12.git1e18c32 +- Align Debian and Arch support to libsolv (bug #1342160) + * Sun May 15 2016 Jitka Plesnikova <[email protected]> - 0.01-11.git1e18c32 - Perl 5.24 rebuild -- cgit v0.12 http://pkgs.fedoraproject.org/cgit/perl-BSSolv.git/commit/?h=master&id=dde99d9b79412b23b2cf4c848a659b1b7401c821 -- Fedora Extras Perl SIG http://www.fedoraproject.org/wiki/Extras/SIGs/Perl perl-devel mailing list [email protected] https://lists.fedoraproject.org/admin/lists/[email protected]
