Skip to content

Commit fcc4fd1

Browse files
committed
builder-source-archive: Switch to bsdunzip
info-zip's unzip is unmaintained and horribly behind security patches so switch to bsdunzip from libarchive. See https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/blob/687b07205c02d28622053d419ec0f3c6f0240f5b/elements/components/unzip.bst#L45-68 and https://gitlab.com/freedesktop-sdk/freedesktop-sdk/-/issues/1777
1 parent 7fec2fa commit fcc4fd1

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

.github/workflows/check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
libjson-glib-dev shared-mime-info desktop-file-utils libpolkit-agent-1-dev libpolkit-gobject-1-dev \
2626
libseccomp-dev libsystemd-dev libxml2-utils libgpgme11-dev gobject-introspection \
2727
libgirepository1.0-dev libappstream-dev libdconf-dev clang socat flatpak \
28-
libcurl4-gnutls-dev libflatpak-dev libyaml-dev elfutils git patch unzip
28+
libcurl4-gnutls-dev libflatpak-dev libyaml-dev elfutils git patch libarchive-tools
2929
- name: Check out flatpak
3030
uses: actions/checkout@v4
3131
with:
@@ -58,7 +58,7 @@ jobs:
5858
libjson-glib-dev shared-mime-info desktop-file-utils libpolkit-agent-1-dev libpolkit-gobject-1-dev \
5959
libseccomp-dev libsystemd-dev libxml2-utils libgpgme11-dev gobject-introspection \
6060
libgirepository1.0-dev libappstream-dev libdconf-dev clang flatpak \
61-
libcurl4-gnutls-dev libflatpak-dev libyaml-dev elfutils git patch unzip
61+
libcurl4-gnutls-dev libflatpak-dev libyaml-dev elfutils git patch libarchive-tools
6262
- name: Check out flatpak
6363
uses: actions/checkout@v4
6464
with:
@@ -131,7 +131,7 @@ jobs:
131131
patch \
132132
shared-mime-info \
133133
socat \
134-
unzip
134+
libarchive-tools
135135
136136
- name: Check out flatpak-builder
137137
uses: actions/checkout@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Very commonly used:
4040
* cp
4141
* git
4242
* 7z
43-
* unzip
43+
* bsdunzip (libarchive)
4444

4545
Rarely used:
4646

ci/libbuild.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ pkg_install_builddeps() {
5050
else
5151
yum -y install yum-utils
5252
# Base buildroot, copied from the mock config sadly
53-
yum -y install bash bzip2 coreutils cpio diffutils system-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz
53+
yum -y install bash bzip2 coreutils cpio diffutils system-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar libarchive-tools util-linux which xz
5454
fi
5555
# builddeps+runtime deps
5656
pkg_builddep $pkg

src/builder-source-archive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ unzip (GFile *dir,
507507
GError **error)
508508
{
509509
gboolean res;
510-
const char *argv[] = { "unzip", "-q", zip_path, NULL };
510+
const char *argv[] = { "bsdunzip", "-q", zip_path, NULL };
511511

512512
res = flatpak_spawnv (dir, NULL, 0, error, argv, NULL);
513513

0 commit comments

Comments
 (0)