From patchwork Thu Feb 11 03:14:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Lipnitskiy X-Patchwork-Id: 1439282 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=hCMPJgcK; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=I3c4S/cC; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DbhfQ1tzVz9sBy for ; Thu, 11 Feb 2021 14:18:20 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=SxI6flHCi/sNFUeG36qrrN2eem2Ea1Pk33j+o5OeMxU=; b=hCMPJgcK8eBQkyG4jNRJTHYM8K Pv17DgJ6WQ8a8981JeAYKmrynBRheo0/QJe3/RPHz/6UK510KC4zBipcldnHOBGqjnLBGPLLsd+C/ 2crP1cAB/q723ZFUEsG9ASNGxiiwByY4g/VfKYufVvKjajN5TIppymV6GY3mDHD5fpUXDwVhyiFtv xkWHqc2/uAO9wXbx0lvdGiwhF6kZqKiGpF7o5AV6QD/O7ELoH/gyiniDITCZkprx6E7M+a2mkW3dn kBNt7aGRrH5R6DPOkvp8Uo8uvr6f6JbzSOWlvL29xTLI7oEfrIFjE4ByLnHRqMWyCvC+k8Z1tGExu 2/G9FWLA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lA2RU-00028Y-63; Thu, 11 Feb 2021 03:14:56 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lA2RP-00027v-Ui for openwrt-devel@lists.openwrt.org; Thu, 11 Feb 2021 03:14:53 +0000 Received: by mail-pg1-x531.google.com with SMTP id b21so2798379pgk.7 for ; Wed, 10 Feb 2021 19:14:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q8KUpxFu/Ypuwf6SQUOMyzAy0dmomZZ4mcO41kcWiHA=; b=I3c4S/cCo0CH5A9hASXdh6xR5MH68SpgsYm+iA0CIY9zaxOoAlct0YWNRe4fHcX0w+ I2p9/LmgBgdpCQlisqahUFcFHv+0c8ypao4Y9fwxj/qv12ISOOncfeBOrUIffRfvTrWY 1rTaNPTj7NSRyNNQQB0Ka5TKeAMQidX2kKZfvx5cvnFMa2x6g+nbtSfX1rIwVUrSgw/w SV36ZVIxilopZwtxsyIqyyiTob++xBtp5xo1SoSE1eYuoPNbATErSbGU3LmzFGeyAYHi kI30TGn+Uvb8H6keGaSPy0zJIRTs3J5bpb6ivtgRjbDz03bs0j2AOdCZ1Sbe+GX9h0Tv NXbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=q8KUpxFu/Ypuwf6SQUOMyzAy0dmomZZ4mcO41kcWiHA=; b=YRmzRRGRhMvQ/GkQ+WF3Huv3bMgpPeJPrP1bsB4eM81lLZowCiQHTQEgaPapGN3eVs ArDWi3uFF3HWf/z6h2msGCZEdZROLxeYklj86r4mjoMqV5HLR9WchGXu9FS+Z1kF8f9H mgmukKjcILQjWtRWD1pid5cA+k/JsJ3tHC5ol/8tKbR4sWHR/Wm76onxoX62Mx5sEQ3H SzMMtwdibKc9tDMb63tdCOcPUBs3XTsAOpTImicdcPnmRv0zZmZWDbuiREro4VaQoqVv li3Qr1wdylDwWAf+9QdeDAZWfr4hKeCFZjLaHBXiIYzVwdvM42W0bnMWLiTVZ3/p6ZmK 3b5A== X-Gm-Message-State: AOAM533jTxnHzTRMYhg7zlm7zRYOVs74DxX0I/Yjw8XJg4LZgHwTQV0/ PbUBRE+2+n8RVRfSbjgyoSagxPv3NyHcbQ== X-Google-Smtp-Source: ABdhPJyHiy6VderNagTef/mFffUnR4nbexaMCRjzc94RAfBPT5sFPItdA38tbneyvLJfOIKlcxhIKw== X-Received: by 2002:a63:515:: with SMTP id 21mr5976313pgf.231.1613013285681; Wed, 10 Feb 2021 19:14:45 -0800 (PST) Received: from z640-arch.lan ([2602:4b:a46e:b100::678]) by smtp.gmail.com with ESMTPSA id k10sm3763101pfk.0.2021.02.10.19.14.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Feb 2021 19:14:45 -0800 (PST) From: Ilya Lipnitskiy To: openwrt-devel@lists.openwrt.org Subject: [PATCH] fakeroot: fix to work with glibc 2.33 Date: Wed, 10 Feb 2021 19:14:41 -0800 Message-Id: <20210211031441.628215-1-ilya.lipnitskiy@gmail.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210210_221452_058041_9FD01F10 X-CRM114-Status: GOOD ( 13.25 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:531 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ilya.lipnitskiy[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ilya Lipnitskiy Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The following commit removed _STAT_VER definitions from glibc: https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=8ed005daf0ab03e142500324a34087ce179ae78e That subsequently broke fakeroot: https://bugs.archlinux.org/task/69572 https://bugzilla.redhat.com/show_bug.cgi?id=1889862#c13 https://forum.openwrt.org/t/unable-to-build-toolchain-fakeroot-fails-perhaps-others-after-it/87966 Make the patch based on Jan Pazdziora's suggestion from here: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SMQ3RYXEYTVZH6PLQMKNB3NM4XLPMNZO/ Tested on my x86_64 Arch Linux machine, fakeroot unit tests pass. Signed-off-by: Ilya Lipnitskiy --- tools/fakeroot/patches/100-portability.patch | 27 ++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/tools/fakeroot/patches/100-portability.patch b/tools/fakeroot/patches/100-portability.patch index 7ba12996be..edf63d3ff4 100644 --- a/tools/fakeroot/patches/100-portability.patch +++ b/tools/fakeroot/patches/100-portability.patch @@ -1,6 +1,23 @@ --- a/libfakeroot.c +++ b/libfakeroot.c -@@ -112,8 +112,16 @@ +@@ -90,6 +90,16 @@ + #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b) + #endif + ++#ifndef _STAT_VER ++ #if defined (__aarch64__) ++ #define _STAT_VER 0 ++ #elif defined (__x86_64__) ++ #define _STAT_VER 1 ++ #else ++ #define _STAT_VER 3 ++ #endif ++#endif ++ + /* + These INT_* (which stands for internal) macros should always be used when + the fakeroot library owns the storage of the stat variable. +@@ -112,8 +122,16 @@ #define INT_SEND_STAT(a,b) SEND_STAT(a,b,_STAT_VER) #define INT_SEND_GET_XATTR(a,b) SEND_GET_XATTR(a,b,_STAT_VER) #define INT_SEND_GET_STAT(a,b) SEND_GET_STAT(a,b) @@ -17,7 +34,7 @@ #include #include #include -@@ -125,7 +133,6 @@ +@@ -125,7 +143,6 @@ #include #include #include @@ -25,7 +42,7 @@ #ifdef HAVE_SYS_ACL_H #include #endif /* HAVE_SYS_ACL_H */ -@@ -188,6 +195,15 @@ extern int unsetenv (const char *name); +@@ -188,6 +205,15 @@ extern int unsetenv (const char *name); #undef __lxstat64 #undef _FILE_OFFSET_BITS @@ -41,7 +58,7 @@ /* // next_wrap_st: // this structure is used in next_wrap, which is defined in -@@ -1911,7 +1927,7 @@ ssize_t fremovexattr(int fd, const char +@@ -1911,7 +1937,7 @@ ssize_t fremovexattr(int fd, const char } #endif /* HAVE_FREMOVEXATTR */ @@ -50,7 +67,7 @@ if (fakeroot_disabled) return next_setpriority(which, who, prio); next_setpriority(which, who, prio); -@@ -2520,3 +2536,19 @@ int sysinfo(int command, char *buf, long +@@ -2520,3 +2546,19 @@ int sysinfo(int command, char *buf, long } } #endif