-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apk: backport patch fixing broken apk update with wget fetch
APK update is currently broken if wget is used as a tool. This wasn't correctly tested and cause seg fault. Backport the patch fixing this to restore original functionality. Signed-off-by: Christian Marangi <[email protected]>
- Loading branch information
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
package/system/apk/patches/0002-io_url_wget-correctly-init-wget_out-on-apk_io_url_in.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From a50f7ea2dd023ef124c5209b487608b37dbeea7c Mon Sep 17 00:00:00 2001 | ||
From: Christian Marangi <[email protected]> | ||
Date: Sat, 1 Mar 2025 19:33:18 +0100 | ||
Subject: [PATCH] io_url_wget: correctly init wget_out on apk_io_url_init call | ||
|
||
Commit fc7768c09497 ("io_url_wget: log wget output using apk_process | ||
api") reworked the implementation but forgot to init the static wget_out | ||
on calling apk_io_url_init. This cause APK to SIGFAULT on apk update or | ||
apk add when actually using the WGET method to download remote packages. | ||
|
||
Fix this by setting wget_out with the passed out from apk_io_url_init. | ||
|
||
Reported-by: John Crispin <[email protected]> | ||
Fixes: fc7768c09497 ("io_url_wget: log wget output using apk_process api") | ||
Signed-off-by: Christian Marangi <[email protected]> | ||
--- | ||
src/io_url_wget.c | 1 + | ||
1 file changed, 1 insertion(+) | ||
|
||
--- a/src/io_url_wget.c | ||
+++ b/src/io_url_wget.c | ||
@@ -48,4 +48,5 @@ void apk_io_url_set_redirect_callback(vo | ||
|
||
void apk_io_url_init(struct apk_out *out) | ||
{ | ||
+ wget_out = out; | ||
} |