From patchwork Sun Feb 21 22:38:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Barnett X-Patchwork-Id: 1442901 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; 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=pdN2E8Fa; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 4DkKws0scdz9sRN for ; Mon, 22 Feb 2021 09:38:53 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 9AAB66F4AA for ; Sun, 21 Feb 2021 22:38:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id V9LWEjbtANYx for ; Sun, 21 Feb 2021 22:38:50 +0000 (UTC) Received: by smtp3.osuosl.org (Postfix, from userid 1001) id 554B86F4A8; Sun, 21 Feb 2021 22:38:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id B32CA605F3; Sun, 21 Feb 2021 22:38:38 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 929501BF410 for ; Sun, 21 Feb 2021 22:38:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8BA1487034 for ; Sun, 21 Feb 2021 22:38:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YkNXqjXB4sCJ for ; Sun, 21 Feb 2021 22:38:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-il1-f176.google.com (mail-il1-f176.google.com [209.85.166.176]) by hemlock.osuosl.org (Postfix) with ESMTPS id 7652F8702D for ; Sun, 21 Feb 2021 22:38:34 +0000 (UTC) Received: by mail-il1-f176.google.com with SMTP id q9so9279488ilo.1 for ; Sun, 21 Feb 2021 14:38:34 -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=aNqfGFTndGz9vxU4Cd/ar1d3hVx0/ijlYI/rBXKq9WY=; b=pdN2E8FaRQ0AuQhfKOdGLdrG0n97YiVhiVwMdNz+VZ/UWJnW/FtXTC9cSNUDACD4b2 GlU4A99e6D3WJRiszXBgwtsREosfi9vzvi+u//Qa61ytNb28UriEhMeoJgvCNJMknhbq 4HDAtOl0bZyLtorYhekibz/1+ZWSjC7QVYpbI3R/r2vCPBNOxFCZ4M0dxjhXtqlnV2g3 q6g0y6sgTLavpDg0dxLaVXrhoclER9jplAhpvMCYZZPi6ADmxhiqUs99SYH2EFcSbPLj 4EyH6aZ5DPsayjDtlGz6U6L2fSVbmn+XS3nxqnNYn/5i7W+Ipy+HVx8lZhvZc4ieFLI+ mmvA== 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=aNqfGFTndGz9vxU4Cd/ar1d3hVx0/ijlYI/rBXKq9WY=; b=gPjtghrQX/7USQtuDcaBbMDRNjXqBE+kAYfWn4Sf082gfSZ052iFfsBgqsjKPvUKPt EcDOrFcV/7KzFQf68/EXeCBwsk4Cbx0OFBnlfUyn2tFYyzI94oWz4WLKWqwmLyT4C2v4 4KegiGv7DU5tDxBZ5He3LMkd2wizc2ptolhLpq7fO3XVYjchwrqOacXw+gd0mgV0BDpz 0n3OHSEUL9KPnGPrT5yuj4S6QX82ryd8xe6eornqdMVhud1hxZlidovTyKX/jVHqkbCm xVduPwC4VetFOXWpjtSpzKiboH+P06Ug5SOHcDTs6xWgqCgFSqpjqc/LAGcj/K/GVJxU R3JA== X-Gm-Message-State: AOAM531Hm0D0z7Co1mmyPqeA61b117qI4/ZoxI2bpRDRY5CR2vQLfGmY AfwjMJDEAleVEl7sm57yWwYRdLWK7TpLLtOm X-Google-Smtp-Source: ABdhPJzDx1TbL3pcMW0gfs4ytRY0yMiuyGT/LWnFZ/EA+ZW218QX8HyRVCwJuOgJX7gD3vcI6Sb0rQ== X-Received: by 2002:a05:6e02:4a3:: with SMTP id e3mr12241659ils.77.1613947113505; Sun, 21 Feb 2021 14:38:33 -0800 (PST) Received: from ryan-pc.birdiebarn.net (50-82-176-206.client.mchsi.com. [50.82.176.206]) by smtp.gmail.com with ESMTPSA id n7sm10593051ile.12.2021.02.21.14.38.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 21 Feb 2021 14:38:33 -0800 (PST) From: Ryan Barnett To: buildroot@buildroot.org Date: Sun, 21 Feb 2021 16:38:27 -0600 Message-Id: <20210221223828.2750676-1-ryanbarnett3@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2] package/fakeroot: fix glibc detection on patch for new wrappers X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E . MORIN" Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Commit f45925a951318e9e53bead80b363e004301adc6f add the patch: 0003-libfakeroot.c-add-wrappers-for-new-glibc-2.33-symbol.patch which allowed fakeroot to be compiled with GLIBC 2.33 or above. However, this introduce a bug for building with a non-GLIBC based toolchain as a GLIBC macro - __GLIBC_PREREQ - is used on the same line as the detection of GLIBC. Fix this by backporting the fix to this incorrect macro from upstream commit: https://salsa.debian.org/clint/fakeroot/-/commit/8090dffdad8fda86dccd47ce7a7db8840bdf7d7b CC: Yann E. MORIN Signed-off-by: Ryan Barnett --- v1 -> v2: - added patch as standalone patch (suggested by Yann) --- .../0005-fix-build-regression-on-macOS.patch | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 package/fakeroot/0005-fix-build-regression-on-macOS.patch diff --git a/package/fakeroot/0005-fix-build-regression-on-macOS.patch b/package/fakeroot/0005-fix-build-regression-on-macOS.patch new file mode 100644 index 0000000000..71152b850d --- /dev/null +++ b/package/fakeroot/0005-fix-build-regression-on-macOS.patch @@ -0,0 +1,64 @@ +From 3590b817df703a256f2c1de9a5f5469eaa1c86e9 Mon Sep 17 00:00:00 2001 +From: Ilya Lipnitskiy +Date: Mon, 15 Feb 2021 11:07:56 -0800 +Subject: [PATCH] fix build regression on macOS + +Backported from: 8090dffdad8fda86dccd47ce7a7db8840bdf7d7b + +Signed-off-by: Felix Fietkau +Signed-off-by: Ilya Lipnitskiy +Signed-off-by: Ryan Barnett +--- + configure.ac | 6 ++++++ + libfakeroot.c | 4 +++- + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index d85566f..d635df1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -181,6 +181,9 @@ AC_MSG_CHECKING([for type of arg of __xmknod]) + #include + #include + ]], [[ ++#ifndef __GLIBC__ ++#error no extra * ++#endif + int __xmknod ( int ver, + const char *pathname , + mode_t mode , dev_t *dev); +@@ -207,6 +210,9 @@ AC_MSG_CHECKING([for type of arg of __xmknodat]) + #include + #include + ]], [[ ++#ifndef __GLIBC__ ++#error no extra * ++#endif + int __xmknodat ( int ver, + int dirfd, + const char *pathname , +diff --git a/libfakeroot.c b/libfakeroot.c +index d75c51f..ec4e577 100644 +--- a/libfakeroot.c ++++ b/libfakeroot.c +@@ -1352,7 +1352,8 @@ int renameat(int olddir_fd, const char *oldpath, + #endif /* HAVE_FSTATAT */ + + +-#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33) ++#if defined(__GLIBC__) ++#if __GLIBC_PREREQ(2,33) + /* Glibc 2.33 exports symbols for these functions in the shared lib */ + int lstat(const char *file_name, struct stat *statbuf) { + return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf); +@@ -1397,6 +1398,7 @@ int renameat(int olddir_fd, const char *oldpath, + return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev); + } + #endif ++#endif /* __GLIBC__ */ + #endif /* GLIBC_PREREQ */ + + +-- +2.25.1 +