]> git.pld-linux.org Git - packages/poldek.git/commitdiff
add patches from pull requests
authorJan Palus <atler@pld-linux.org>
Mon, 23 Nov 2020 11:18:21 +0000 (12:18 +0100)
committerJan Palus <atler@pld-linux.org>
Mon, 23 Nov 2020 11:20:00 +0000 (12:20 +0100)
- rpmvercmp implementation for rpm.org
- dynamic linking against libtrurl instead of static in dynamic
  libraries: libtndb and libvfile

poldek.spec
rpm4-rpmvercmp.patch [new file with mode: 0644]
trurlib-shared.patch [new file with mode: 0644]

index ee811082f38064981481e00e5ab723e31c17aa71..9e0ab23e7d1fddb8c4dd3af544163652be4ade64 100644 (file)
@@ -63,6 +63,8 @@ Patch8:               rpm4-uname-deps.patch
 Patch9:                sqlite-rpmdb.patch
 Patch10:       rpm4-cpuinfo-deps.patch
 Patch11:       rpm4-no-dir-deps.patch
+Patch12:       rpm4-rpmvercmp.patch
+Patch13:       trurlib-shared.patch
 URL:           http://poldek.pld-linux.org/
 BuildRequires: %{db_pkg}-devel >= %{ver_db}
 BuildRequires: autoconf >= 2.63
@@ -248,6 +250,10 @@ Moduły języka Python dla poldka.
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
+cd trurlib
+%patch13 -p1
+cd ..
 
 %{__rm} doc/poldek.info
 %{__rm} m4/libtool.m4 m4/lt*.m4
diff --git a/rpm4-rpmvercmp.patch b/rpm4-rpmvercmp.patch
new file mode 100644 (file)
index 0000000..a2cbf18
--- /dev/null
@@ -0,0 +1,73 @@
+From 70940292e321f1b7f4af217425810ed4110f6333 Mon Sep 17 00:00:00 2001
+From: Jan Palus <atler@pld-linux.org>
+Date: Sat, 31 Oct 2020 00:32:04 +0100
+Subject: [PATCH] implement rpmvercmp for rpm.org
+
+---
+ pm/rpmorg/rpmvercmp.c | 24 ++++++++++++++++--------
+ 1 file changed, 16 insertions(+), 8 deletions(-)
+
+diff --git a/pm/rpmorg/rpmvercmp.c b/pm/rpmorg/rpmvercmp.c
+index 7e40e15..36bf9e5 100644
+--- a/pm/rpmorg/rpmvercmp.c
++++ b/pm/rpmorg/rpmvercmp.c
+@@ -49,18 +49,15 @@ static void parse(const char *evrstr, EVR_t evr)
+ #endif
+ #endif
+-#ifdef HAVE_RPMORG
+-int main(void)
+-{
+-    printf("not implemented");
+-    exit(EXIT_SUCCESS);
+-}
+-#else
+ int main(int argc, char *argv[])
+ {
+     int cmprc;
+     const char *v1, *v2;
++#ifdef HAVE_RPMORG
++    rpmver evr1, evr2;
++#else
+     EVR_t evr1, evr2;
++#endif
+     if (argc < 3) {
+         printf("Usage: rpmvercmp VERSION1 VERSION2\n");
+@@ -81,6 +78,12 @@ int main(int argc, char *argv[])
+       exit(2);
+     }
++#ifdef HAVE_RPMORG
++    evr1 = rpmverParse(v1);
++    evr2 = rpmverParse(v2);
++
++    cmprc = rpmverCmp(evr1, evr2);
++#else
+     evr1 = malloc(sizeof(struct EVR_s));
+     evr2 = malloc(sizeof(struct EVR_s));
+@@ -93,17 +96,22 @@ int main(int argc, char *argv[])
+ #endif
+     cmprc = rpmEVRcompare(evr1, evr2);
++#endif
+     printf("%s %s %s\n", v1, cmprc == 0 ?  "==" : cmprc > 0 ? ">" : "<", v2);
+     if (cmprc < 0)
+         cmprc = 2;
++#ifdef HAVE_RPMORG
++    rpmverFree(evr1);
++    rpmverFree(evr2);
++#else
+     free((char *)evr1->str);
+     free((char *)evr2->str);
+     free(evr1);
+     free(evr2);
++#endif
+     exit(cmprc);
+ }
+-#endif
diff --git a/trurlib-shared.patch b/trurlib-shared.patch
new file mode 100644 (file)
index 0000000..7764486
--- /dev/null
@@ -0,0 +1,35 @@
+From 67817281c4346832356febca89373742a0cde8b1 Mon Sep 17 00:00:00 2001
+From: Jan Palus <atler@pld-linux.org>
+Date: Sat, 31 Oct 2020 00:04:11 +0100
+Subject: [PATCH] create symbolic link for dynamic lib as well
+
+both tndb and vfile in poldek link against libtrurl and due to the way
+linking is configured it is always linked with static libtrurl (only
+libtrurl.a link provided). this causes two issues:
+
+- mixes dynamically linked libraries with statically linked libtrurl
+  and since nothing enforces -fPIC in the latter it results in error:
+
+libtool: warning: relinking 'libtndb.la'
+libtool: install: ... -o .libs/libtndb.so.0.2.0
+/usr/bin/ld: ./../trurlib/libtrurl.a(ndie.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `__stack_chk_guard@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC
+/usr/bin/ld: ./../trurlib/libtrurl.a(ndie.o)(.text+0x8): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `__stack_chk_guard@@GLIBC_2.17'
+/usr/bin/ld: final link failed: bad value
+
+- includes copy of libtrurl in dynamic libraries even though poldek
+  provides dynamic libtrurl
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 7c41374..0d13380 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -146,5 +146,6 @@ tests:  $(EXTRA_PROGRAMS)
+ all-local:
+       @ln -sf .libs/libtrurl.a libtrurl.a
++      @ln -sf .libs/libtrurl.so libtrurl.so
+ include Makefile.extra
This page took 0.170655 seconds and 4 git commands to generate.