[packages/poldek] - release 18, handle redirects from https as well

adamg adamg at pld-linux.org
Thu Oct 19 14:20:43 CEST 2023


commit 4c18fee28a08543b4ce144403efe0c7cbf1109df
Author: Adam Gołębiowski <adamg at pld-linux.org>
Date:   Thu Oct 19 14:19:17 2023 +0200

    - release 18, handle redirects from https as well

 poldek-https-redirect.patch | 15 +++++++++++++++
 poldek.spec                 |  4 +++-
 2 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/poldek.spec b/poldek.spec
index 3b3c63a..e696fb2 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -22,7 +22,7 @@
 %define		ver_rpm		1:4.14
 %endif
 
-%define		rel	17
+%define		rel	18
 Summary:	RPM packages management helper tool
 Summary(hu.UTF-8):	RPM csomagkezelést segítő eszköz
 Summary(pl.UTF-8):	Pomocnicze narzędzie do zarządzania pakietami RPM
@@ -72,6 +72,7 @@ Patch20:	boolean-deps.patch
 Patch21:	sorted-ls-upgradable.patch
 Patch22:	egrep-is-obsolete.patch
 Patch23:	minus.patch
+Patch24:	%{name}-https-redirect.patch
 URL:		http://poldek.pld-linux.org/
 %{?with_rpm5:BuildRequires:	%{db_pkg}-devel >= %{ver_db}}
 BuildRequires:	autoconf >= 2.63
@@ -270,6 +271,7 @@ cd ..
 %patch21 -p1
 %patch22 -p1
 %patch23 -p1
+%patch24 -p1
 
 %{__rm} doc/poldek.info
 %{__rm} m4/libtool.m4 m4/lt*.m4
diff --git a/poldek-https-redirect.patch b/poldek-https-redirect.patch
new file mode 100644
index 0000000..4a7cb8c
--- /dev/null
+++ b/poldek-https-redirect.patch
@@ -0,0 +1,15 @@
+--- poldek-0.42.2/vfile/vfffmod.c.orig	2020-01-25 22:59:59.000000000 +0100
++++ poldek-0.42.2/vfile/vfffmod.c	2023-10-19 14:05:44.263325854 +0200
+@@ -269,10 +269,10 @@
+         char topath[PATH_MAX + 128], *topathp = vreq.redirected_to;
+         int  foreign_proto = 0;
+ 
+-        n_assert(cn->proto == VCN_PROTO_HTTP);
++        n_assert(cn->proto == VCN_PROTO_HTTP || cn->proto == VCN_PROTO_HTTPS);
+ 
+         if (*vreq.redirected_to == '/') {
+-            snprintf(topath, sizeof(topath), "http://%s%s", req->host,
++            snprintf(topath, sizeof(topath), "http%s://%s%s", cn->proto == VCN_PROTO_HTTPS ? "s" : "" , req->host,
+                      vreq.redirected_to);
+             topathp = topath;
+         } else if (strncmp(vreq.redirected_to, "http://", 7) != 0)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/poldek.git/commitdiff/4c18fee28a08543b4ce144403efe0c7cbf1109df



More information about the pld-cvs-commit mailing list