From 89d3ff3f50670610fd42be18214572b51ff51aa8 Mon Sep 17 00:00:00 2001 From: Thomas Perale Date: Wed, 4 Feb 2026 14:18:32 +0100 Subject: [PATCH] package/libmad: remove Debian patches In Buildroot there are multiple way to apply patches on a package [1] - Adding `.patch` file in the package directory. - Define `_PATCH` variable with the location of the patch tar.gz. It used to download Debian patches tarball. - Implement custom patching logic with `PRE`/`POST` patches hooks. The libmad package is downloading a diff file from the Debian mirror with the `_PATCH` method [2] and then apply that diff to create a directory containing patches. The patches are then applied in the `PRE_PATCH_HOOK`. The Debian patches were integrated in commit [4], in commit [5] the application of the patches was moved to the PRE_PATCH_HOOK. The problem is that in the PRE_PATCH step the `_PATCH` downloaded from Debian don't exist yet and end up not being applied at all. Since this is not used, remove the Debian patches. [1] https://buildroot.org/downloads/manual/manual.html#patch-policy [2] http://snapshot.debian.org/archive/debian/20190310T213528Z/pool/main/libm/libmad/libmad_0.15.1b-10.diff.gz [3] 1167d0ff3d docs/manual: mention CVE trailer [4] 858df3643f package/libmad: switch to debian to fix CVEs [5] b21184a877 package/libmad: update the patches to be applied with fuzz 0 Signed-off-by: Thomas Perale Signed-off-by: Thomas Petazzoni (cherry picked from commit 103f84b30fd8dfd4f8e27910d7136aa3cd7a6133) Signed-off-by: Thomas Perale --- package/libmad/libmad.mk | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/package/libmad/libmad.mk b/package/libmad/libmad.mk index db04d22e92..611f13eb67 100644 --- a/package/libmad/libmad.mk +++ b/package/libmad/libmad.mk @@ -5,7 +5,6 @@ ################################################################################ LIBMAD_VERSION = 0.15.1b -LIBMAD_PATCH = libmad_$(LIBMAD_VERSION)-10.diff.gz LIBMAD_SOURCE = libmad_$(LIBMAD_VERSION).orig.tar.gz LIBMAD_SITE = \ http://snapshot.debian.org/archive/debian/20190310T213528Z/pool/main/libm/libmad @@ -13,20 +12,6 @@ LIBMAD_INSTALL_STAGING = YES LIBMAD_LICENSE = GPL-2.0+ LIBMAD_LICENSE_FILES = COPYING -define LIBMAD_APPLY_DEBIAN_PATCHES - if [ -d $(@D)/debian/patches ]; then \ - $(APPLY_PATCHES) $(@D) $(@D)/debian/patches *.patch; \ - fi -endef - -LIBMAD_PRE_PATCH_HOOKS += LIBMAD_APPLY_DEBIAN_PATCHES - -# debian/patches/md_size.diff -LIBMAD_IGNORE_CVES += CVE-2017-8372 CVE-2017-8373 - -# debian/patches/length-check.patch -LIBMAD_IGNORE_CVES += CVE-2017-8374 - # Force autoreconf to be able to use a more recent libtool script, that # is able to properly behave in the face of a missing C++ compiler. LIBMAD_AUTORECONF = YES