From patchwork Mon Aug 15 17:17:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tremer X-Patchwork-Id: 5872 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4M61FY3dlmz3wfV for ; Mon, 15 Aug 2022 17:18:09 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4M61FQ1ddQz5Xw; Mon, 15 Aug 2022 17:18:02 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4M61FP6N2kz302W; Mon, 15 Aug 2022 17:18:01 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4M61FN060Sz2yyb for ; Mon, 15 Aug 2022 17:18:00 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4M61FL73Ssz5Wf; Mon, 15 Aug 2022 17:17:58 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1660583879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8BgcZmjHhM8+46DoJR14G7lLu1UNHIRuUIn7wc+Yuuo=; b=ehHKI2ECtJd5f9pyJjba8zOXO6da5DMODzHvVyHiC1Yzcf42nwZJTwDfvnCG1HpA9OlhR8 YVkJV5Hfi2nV83DQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1660583879; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8BgcZmjHhM8+46DoJR14G7lLu1UNHIRuUIn7wc+Yuuo=; b=TWDY5fT9oiy+f9YCOI8DIkUM+vH4GF943VATjmMfMM0fTukY6BsAEwu3ZaYPMVgijmXYbp TbCJ78+xdHlotqQa3DhWD3Yuv+W5RsYPQNKs4FrK/ZCbzWtq8rpGGgQuOWh2QchcUcYYuy uout3K/RRHLdKyM73PHjuHtGB3WymfzJ24p1UT5oTehlNq2zpeZCU4thB53pTe/3JpX4Ux U1nez+N7AEJBJXz5Tp2UuHartOfk9QR58ZpTdr0xcmXgzCH6LJrsqH6AKgUaarHqq8rg6S FFb2Khbi9dpNhvYfUJzkElCKCbH2UfBYJvL8ou57iUa7VOt3VuqVu6Fh2VlSRA== From: Michael Tremer To: development@lists.ipfire.org Subject: [PATCH 07/15] libarchive: Fix build with glibc 2.36 Date: Mon, 15 Aug 2022 17:17:45 +0000 Message-Id: <20220815171753.1858688-7-michael.tremer@ipfire.org> In-Reply-To: <20220815171753.1858688-1-michael.tremer@ipfire.org> References: <20220815171753.1858688-1-michael.tremer@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Tremer Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Michael Tremer --- lfs/libarchive | 1 + ...ibarchive-3.6-fix-glibc-2.36-headers.patch | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/patches/libarchive-3.6-fix-glibc-2.36-headers.patch diff --git a/lfs/libarchive b/lfs/libarchive index 42040b6db..f22bbd481 100644 --- a/lfs/libarchive +++ b/lfs/libarchive @@ -74,6 +74,7 @@ $(subst %,%_BLAKE2,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/libarchive-3.6-fix-glibc-2.36-headers.patch cd $(DIR_APP) && ./configure --prefix=/usr --disable-static cd $(DIR_APP) && make $(MAKETUNING) cd $(DIR_APP) && make install diff --git a/src/patches/libarchive-3.6-fix-glibc-2.36-headers.patch b/src/patches/libarchive-3.6-fix-glibc-2.36-headers.patch new file mode 100644 index 000000000..7c88ca1b1 --- /dev/null +++ b/src/patches/libarchive-3.6-fix-glibc-2.36-headers.patch @@ -0,0 +1,41 @@ +From a2f68263a1da5ad227bcb9cd8fa91b93c8b6c99f Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 25 Jul 2022 10:56:53 -0700 +Subject: [PATCH] libarchive: Do not include sys/mount.h when linux/fs.h is + present + +These headers are in conflict and only one is needed by +archive_read_disk_posix.c therefore include linux/fs.h if it exists +otherwise include sys/mount.h + +It also helps compiling with glibc 2.36 +where sys/mount.h conflicts with linux/mount.h see [1] + +[1] https://sourceware.org/glibc/wiki/Release/2.36 +--- + libarchive/archive_read_disk_posix.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +diff --git a/libarchive/archive_read_disk_posix.c b/libarchive/archive_read_disk_posix.c +index 2b39e672b..a96008db7 100644 +--- a/libarchive/archive_read_disk_posix.c ++++ b/libarchive/archive_read_disk_posix.c +@@ -34,9 +34,6 @@ __FBSDID("$FreeBSD$"); + #ifdef HAVE_SYS_PARAM_H + #include + #endif +-#ifdef HAVE_SYS_MOUNT_H +-#include +-#endif + #ifdef HAVE_SYS_STAT_H + #include + #endif +@@ -54,6 +51,8 @@ __FBSDID("$FreeBSD$"); + #endif + #ifdef HAVE_LINUX_FS_H + #include ++#elif HAVE_SYS_MOUNT_H ++#include + #endif + /* + * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h.