From patchwork Fri Oct 4 21:54:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3546 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7B1713F15E for ; Fri, 4 Oct 2024 23:54:59 +0200 (CEST) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42cb22d396csf19544705e9.0 for ; Fri, 04 Oct 2024 14:54:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1728078899; cv=pass; d=google.com; s=arc-20240605; b=DYb8KUY5aVYnW2SbTj0iMPlKzcPyJ1blppYnbRxWPUJzy1ofYRqTXKse8tVdDoTNsY lnCpMO7nDqchUXfGbbu4GZGOa1V1vKKfsVV/WRqCcmDCbSy6cUY8W04FdD3mKTNrWwqr va1caGQYXax5Em3C3MA/U0QV7Qdw6WQgXH93MhlHl9BYqfaKDQghX2t2hPSyGq1knC4N cmfRz7Aicn6yL/TaS4/3r7YgSFRF1AhzICl24Fo6FujtOdDVFSBIArU+f9LGMPim2XsC /ionAXN8V8VJBon5OYuZW1Nfxf9FE+oAtyVI8F+DMk4Wb5FjzP8bOcyjxaovuuvOXzLM yr1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NJUo1RdSxqC8nT8w/+UCJsAwoWBq7FYk6MK408zRoo0=; fh=62kjf3VVml80bBwXi8pk707JC6gATL1c//FIZGI3UzQ=; b=YKsQAa+pyQ/CM06EX9P/XKr/Lc8FHiX+zKmp1WXaOvz5fIPgldFmboo9MXu/FzCctX 0jy/KMf0Zo9zrBaFuosoV+eoAIkLW9BpmJnLWF+IuTmaWJQ1FfDlFL/H3c2puNRT2CtS wO4NPPIe2bu4ebdE6g62ldzz1PNtK+Q6wL0cuh7CvjSttCB+AEVsOKPxRv2TkYfyGe3g OUvFoEDEO0h/N/fBkoMlX5tF5Ibvm54znl8HBZyM82kk7WijGxKBc3Jm6CzoMoXkThaQ F8fu9YblxkI7+XEr69LJu3ArVeZ7KrX6YZXVFogv28E0dGB/ze7k9qpWXWC4co6LhUFS Cx+w==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fq1+izBg; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1728078899; x=1728683699; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=NJUo1RdSxqC8nT8w/+UCJsAwoWBq7FYk6MK408zRoo0=; b=GY4TIf9ymYnseNxGhK8/JTx3KGKFo0zmM+bcxCMDgtaJ238FmiftTD8yb+FTDpToct +0ZjZyz/CKq8lU8e3h5zLSgT9gX05rLOho7L9N2y4GTkM9bqjcR35YftIaeu/n0+PPqU zFpNoLU2xrTTRg/4n+0s5gKv5a7yST1tMvocI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728078899; x=1728683699; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=NJUo1RdSxqC8nT8w/+UCJsAwoWBq7FYk6MK408zRoo0=; b=Y8dS3G3Bx3C1jV5mmrC84gz8wd7Fekstw9RIsw1o75B5+m3mGvE/P8gJXM8kE4roeB pqN2I2qwgqysP1lN2SO5trvL0/gAZEHk2u4hu0JuIxOryGYfnhsWCD0Gb2vqM6ef4SER Wecuug2D7UMgIg3XPmEzyMBjR4H6Zw3uDnfYEuSbwCfTNocZi1Ujn2PgICg5lLhxe0X3 ekwdxipsVaB12kUn9XX+pT32p4HPO1tTFldStSKxiv178ZRWgOPch2U/X5zbC7McqedG xldUoNgSHoZchg33Br99uDg8VqcGYu6qUFTahyQHuEYTn9mJDWWAaVCWvbcnw7mCiwl8 B/YQ== X-Forwarded-Encrypted: i=2; AJvYcCWLzaC5BuQ8AyKx3GXmhA++jzJ9bN3QGpwrb3zwEbiP1QCnGR6SoSc3KWGAPLdssGaJhnpvt2gsfVLRuUuG@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyxDcw1qjiDzVN5ZybMSZapEiZ9YleC8UrlRvP1jiWaTUieJJJe B+MlpGQeIoh4kA7P332SaTyt7oILsm66hIStEoEah3BcY90nqkJNtlSjQATl0z9MDuZNEKleHA= = X-Google-Smtp-Source: AGHT+IGvYuToUmAnT+p+LCm5DDCxMjlX8h6mxnIeQQTMQO8E75vh6Iwa4y7NlqIv47uVwaknTnZuWA== X-Received: by 2002:a05:600c:1da8:b0:426:5fbc:f319 with SMTP id 5b1f17b1804b1-42f85aef6edmr32347675e9.33.1728078898780; Fri, 04 Oct 2024 14:54:58 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3148:b0:42c:c82f:e5b with SMTP id 5b1f17b1804b1-42f7df74f57ls4756545e9.2.-pod-prod-09-eu; Fri, 04 Oct 2024 14:54:57 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWswpNBthx8nUuUOaG6ybtxL3feptXJAe2xmv7ZO1J9g2//1/WqlOjVAo9BvpYCxlFu35wI1gLyW37JF6F2@amarulasolutions.com X-Received: by 2002:a05:600c:46c6:b0:42c:b905:2bf9 with SMTP id 5b1f17b1804b1-42f85ab7cbbmr34272045e9.16.1728078897153; Fri, 04 Oct 2024 14:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1728078897; cv=none; d=google.com; s=arc-20240605; b=OGqlTQT8ZKLCYl4Sn0Ro3gfpLxVtMBWEeSAATBTSClyAd2a87d0Z7aPFaMeZyWW6on LsMaGoNniEHNoeiBjYDUzpb4jS+WBuLZoZ8NxppCDQMD6d8ec2ljg/Fai+vfTnr0uq1L xzqSx7zIrSQv4Ogl1Q1nGuGNoK+QS53yKcr2y6AQFiNBM4ONYn8KWwmk1cAlFaOolb/F l0MbNF7rHS2PmpV1r108hM2JGCt+4C0ownYDosARWBZQdu3ffp6nVsKcF/rN2pHQaOBq 6ZzK+/97zqSSbW3g5f06uUtvSFpRHzXG2pV6fk8Lg8ESHb3yfRVYlFydwpwa2S1KedGj TVog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=z4pETnEyQ3DNyQOp1K07gKBmG1ZeFehlEBN9dQrPr/A=; fh=bwrQm/++DQm2WZlNoLO+H+imqeilslfnb3sCVwhIViM=; b=IV3IIvjhl1X4x1tsd4+fjRrlZteDiASyJPe1yYeDpD8K/Fre8nqWQatS9IfIay+KI7 1vD+MOIMIbs9ziumXSHacwiFx9enka55r5tzdofuGF7IC85s2Hx2sS/FCt8HGfHxGs2g TPN+7jAK95ovIZVFKNXa6tPqcO5Kez4ZVPPIEHZYHUJofr/4S3XBQvrluoOJ9Gym5MhZ G3g0ud2bioH8vziaMqrOgd2MxSLrysublxbwb0Al2HwD0w23c9gEtNQQYCNfhOG3enEK a2pyjJYU85jJQ9hSXKL4dhm3E/GOlPDIhuEr+a0OXSsu5S5zTtUVjesGZ/OHKxRInvL+ G6Lw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fq1+izBg; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-42f8a1d4f9csor2232705e9.12.2024.10.04.14.54.57 for (Google Transport Security); Fri, 04 Oct 2024 14:54:57 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Forwarded-Encrypted: i=1; AJvYcCVKhpyZQbKtrLZm4lXIxVetCc00WehhcUc13fULFNFy6K5Ywgi5z7hHofQ9SH9z5RnmM+4tBq0dj3id/bu0@amarulasolutions.com X-Received: by 2002:a05:600c:b89:b0:42c:b1e1:a45b with SMTP id 5b1f17b1804b1-42f85ab7faamr32424525e9.19.1728078896509; Fri, 04 Oct 2024 14:54:56 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.43.206]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42f89e39aebsm6972005e9.0.2024.10.04.14.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2024 14:54:56 -0700 (PDT) From: Dario Binacchi To: buildroot@buildroot.org Cc: Dario Binacchi , linux-amarula@amarulasolutions.com, Colin Percival Subject: [PATCH 2/3] package/bsdiff: switch upstream Date: Fri, 4 Oct 2024 23:54:45 +0200 Message-ID: <20241004215451.1198861-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241004215451.1198861-1-dario.binacchi@amarulasolutions.com> References: <20241004215451.1198861-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Fq1+izBg; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , I asked Colin Percival, the creator of bsdiff, about the failure to download bsdiff-4.3.tar.gz from https://www.daemonology.net/bsdiff, and he kindly replied that he intentionally disabled the package download because "that code has some security bugs and I didn't have time to roll a new tarball with them fixed. Grab the bsdiff code from FreeBSD or Chromium, I'm pretty sure they have all the fixes." I chose the Chromium version because the FreeBSD one was less suitable for integration into Buildroot, given that there is no git repository for the project itself, but rather for all FreeBSD sources (4.7 GB). C++11 is now mandatory. Fixes: - http://autobuild.buildroot.org/results/21bb827d3dbf553c79f49d7c184099c75df3d45d Cc: Colin Percival Signed-off-by: Dario Binacchi --- .checkpackageignore | 1 - .../0001-Add-missing-header-for-u_char.patch | 17 ----------------- package/bsdiff/Config.in | 4 +++- package/bsdiff/bsdiff.hash | 7 +++---- package/bsdiff/bsdiff.mk | 18 ++++++++---------- 5 files changed, 14 insertions(+), 33 deletions(-) delete mode 100644 package/bsdiff/0001-Add-missing-header-for-u_char.patch diff --git a/.checkpackageignore b/.checkpackageignore index 0cc742bf0960..98b38a386f01 100644 --- a/.checkpackageignore +++ b/.checkpackageignore @@ -343,7 +343,6 @@ package/brickd/S70brickd Shellcheck lib_sysv.Indent lib_sysv.Variables package/bridge-utils/0001-fix-build-on-musl.patch lib_patch.Upstream package/brltty/0001-Fix-linking-error-on-mips64el.patch lib_patch.Upstream package/brltty/S10brltty Shellcheck lib_sysv.Indent lib_sysv.Variables -package/bsdiff/0001-Add-missing-header-for-u_char.patch lib_patch.Upstream package/bustle/0001-Makefile-fix-pcap-config-call.patch lib_patch.Upstream package/busybox/0001-networking-libiproute-use-linux-if_packet.h-instead-.patch lib_patch.Upstream package/busybox/0002-Makefile.flags-strip-non-l-arguments-returned-by-pkg.patch lib_patch.Upstream diff --git a/package/bsdiff/0001-Add-missing-header-for-u_char.patch b/package/bsdiff/0001-Add-missing-header-for-u_char.patch deleted file mode 100644 index 56affb4102ce..000000000000 --- a/package/bsdiff/0001-Add-missing-header-for-u_char.patch +++ /dev/null @@ -1,17 +0,0 @@ -bspatch: Fix missing header for u_char - -Fixes http://autobuild.buildroot.net/results/31a/31a837cf6e34b02dce498f2b12e40d6d16a5a8e6/ - -Signed-off-by: Jörg Krause - -diff -purN bsdiff-4.3.orig/bspatch.c bsdiff-4.3/bspatch.c ---- bsdiff-4.3.orig/bspatch.c 2015-04-30 13:47:26.485903359 +0200 -+++ bsdiff-4.3/bspatch.c 2015-04-30 13:48:14.808908672 +0200 -@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD: src/usr.bin/bsdiff/b - #include - #include - #include -+#include - - static off_t offtin(u_char *buf) - { diff --git a/package/bsdiff/Config.in b/package/bsdiff/Config.in index 11fd8b9d3523..25295f06e70d 100644 --- a/package/bsdiff/Config.in +++ b/package/bsdiff/Config.in @@ -1,8 +1,10 @@ config BR2_PACKAGE_BSDIFF bool "bsdiff" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++11 select BR2_PACKAGE_BZIP2 + select BR2_PACKAGE_LIBDIVSUFSORT help Binary patch/diff like xdelta but creates smaller diffs. Needs bzip2 support. - http://www.daemonology.net/bsdiff/ + https://android.googlesource.com/platform/external/bsdiff/ diff --git a/package/bsdiff/bsdiff.hash b/package/bsdiff/bsdiff.hash index 102086b9fc04..e16d32023e1c 100644 --- a/package/bsdiff/bsdiff.hash +++ b/package/bsdiff/bsdiff.hash @@ -1,4 +1,3 @@ -# From http://www.daemonology.net/bsdiff/: -md5 e6d812394f0e0ecc8d5df255aa1db22a bsdiff-4.3.tar.gz -# locally computed -sha256 fc0a6e634ef77dcf14bf36c7b6d1e57ba1ac5c4809073dfaacb3b5f7ab277eb7 bsdiff.c +# Locally calculated +sha256 6f84d3b2f0b758a97e79f6294ed84da4cd5c1a2ab0f7cb3d5ed80fc234e09c32 bsdiff-8c17bdc0d759c8e6da90c5f72b052ba2605a0a3a-git4.tar.gz +sha256 82d5f69a01bd5b3962ddf42f9346aee41ab80bf4cb67ed8a1ede966e8b080c54 README.chromium diff --git a/package/bsdiff/bsdiff.mk b/package/bsdiff/bsdiff.mk index 97a1b3921df4..e9ee9fa1b9f2 100644 --- a/package/bsdiff/bsdiff.mk +++ b/package/bsdiff/bsdiff.mk @@ -4,23 +4,21 @@ # ################################################################################ -BSDIFF_VERSION = 4.3 -BSDIFF_SITE = http://www.daemonology.net/bsdiff -BSDIFF_DEPENDENCIES = bzip2 +BSDIFF_VERSION = 8c17bdc0d759c8e6da90c5f72b052ba2605a0a3a +BSDIFF_SITE = https://chromium.googlesource.com/chromiumos/third_party/bsdiff +BSDIFF_SITE_METHOD = git +BSDIFF_DEPENDENCIES = bzip2 libdivsufsort BSDIFF_LICENSE = BSD-2-Clause -BSDIFF_LICENSE_FILES = bsdiff.c +BSDIFF_LICENSE_FILES = README.chromium BSDIFF_CPE_ID_VENDOR = daemonology define BSDIFF_BUILD_CMDS - $(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ - $(@D)/bsdiff.c -lbz2 -o $(@D)/bsdiff - $(TARGET_MAKE_ENV) $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ - $(@D)/bspatch.c -lbz2 -o $(@D)/bspatch + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) endef define BSDIFF_INSTALL_TARGET_CMDS - $(INSTALL) -D -m 755 $(@D)/bsdiff $(TARGET_DIR)/usr/bin/bsdiff - $(INSTALL) -D -m 755 $(@D)/bspatch $(TARGET_DIR)/usr/bin/bspatch + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) \ + DESTDIR=$(TARGET_DIR) install endef $(eval $(generic-package))