From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id +PXTLkSg4l7lCgAA0tVLHw (envelope-from ) for ; Thu, 11 Jun 2020 21:21:08 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id kKWaKkSg4l4mZwAAbx9fmQ (envelope-from ) for ; Thu, 11 Jun 2020 21:21:08 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 66EF894036C for ; Thu, 11 Jun 2020 21:21:08 +0000 (UTC) Received: from localhost ([::1]:34970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jjUdH-0004rn-8E for larch@yhetil.org; Thu, 11 Jun 2020 17:21:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jjUSY-0008HA-ML for guix-patches@gnu.org; Thu, 11 Jun 2020 17:10:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54935) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jjUSY-0002ib-B9 for guix-patches@gnu.org; Thu, 11 Jun 2020 17:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jjUSY-0008Da-6C for guix-patches@gnu.org; Thu, 11 Jun 2020 17:10:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41816] [PATCH 3/4] gnu: busybox: Fix build with new glibc. Resent-From: Danny Milosavljevic Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 11 Jun 2020 21:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41816 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41816@debbugs.gnu.org Cc: Danny Milosavljevic Received: via spool by 41816-submit@debbugs.gnu.org id=B41816.159190974231495 (code B ref 41816); Thu, 11 Jun 2020 21:10:02 +0000 Received: (at 41816) by debbugs.gnu.org; 11 Jun 2020 21:09:02 +0000 Received: from localhost ([127.0.0.1]:38241 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjURY-0008BK-NY for submit@debbugs.gnu.org; Thu, 11 Jun 2020 17:09:02 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:48304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jjURT-0008AW-EC for 41816@debbugs.gnu.org; Thu, 11 Jun 2020 17:08:59 -0400 Received: from dayas.lan (80-110-127-207.cgn.dynamic.surfer.at [80.110.127.207]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 3F1023366D21; Thu, 11 Jun 2020 23:08:54 +0200 (CEST) From: Danny Milosavljevic Date: Thu, 11 Jun 2020 23:08:47 +0200 Message-Id: <20200611210848.28784-3-dannym@scratchpost.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200611210848.28784-1-dannym@scratchpost.org> References: <20200611210540.28722-1-dannym@scratchpost.org> <20200611210848.28784-1-dannym@scratchpost.org> MIME-Version: 1.0 Tags: patch Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 3.99 X-TUID: vXzkGhWB3Z6v * gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/busybox.scm (busybox)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/busybox.scm | 5 +- ...box-1.31.1-fix-build-with-glibc-2.31.patch | 68 +++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch diff --git a/gnu/local.mk b/gnu/local.mk index 76d6b5deba..221e3b12e4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -805,6 +805,7 @@ dist_patch_DATA = \ %D%/packages/patches/blender-2.79-newer-ffmpeg.patch \ %D%/packages/patches/blender-2.79-python-3.7-fix.patch \ %D%/packages/patches/bluez-CVE-2020-0556.patch \ + %D%/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/calibre-msgpack-compat.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ diff --git a/gnu/packages/busybox.scm b/gnu/packages/busybox.scm index 61a382e854..dce5ccf766 100644 --- a/gnu/packages/busybox.scm +++ b/gnu/packages/busybox.scm @@ -40,7 +40,10 @@ version ".tar.bz2")) (sha256 (base32 - "1659aabzp8w4hayr4z8kcpbk2z1q2wqhw7i1yb0l72b45ykl1yfh")))) + "1659aabzp8w4hayr4z8kcpbk2z1q2wqhw7i1yb0l72b45ykl1yfh")) + (patches + (search-patches + "busybox-1.31.1-fix-build-with-glibc-2.31.patch")))) (build-system gnu-build-system) (arguments '(#:phases diff --git a/gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch b/gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch new file mode 100644 index 0000000000..1518df067f --- /dev/null +++ b/gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch @@ -0,0 +1,68 @@ +See: https://bugs.gentoo.org/708350 +Author: Patrick McLean +Date: 2020-02-06 23:06:22 +0000 +diff --git a/coreutils/date.c b/coreutils/date.c +index 3414d38ae..4ade6abb4 100644 +--- a/coreutils/date.c ++++ b/coreutils/date.c +@@ -279,6 +279,9 @@ int date_main(int argc UNUSED_PARAM, char **argv) + time(&ts.tv_sec); + #endif + } ++#if !ENABLE_FEATURE_DATE_NANO ++ ts.tv_nsec = 0; ++#endif + localtime_r(&ts.tv_sec, &tm_time); + + /* If date string is given, update tm_time, and maybe set date */ +@@ -301,9 +304,10 @@ int date_main(int argc UNUSED_PARAM, char **argv) + if (date_str[0] != '@') + tm_time.tm_isdst = -1; + ts.tv_sec = validate_tm_time(date_str, &tm_time); ++ ts.tv_nsec = 0; + + /* if setting time, set it */ +- if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) { ++ if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) { + bb_perror_msg("can't set date"); + } + } +diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c +index 87cf59b3d..dc40d9155 100644 +--- a/libbb/missing_syscalls.c ++++ b/libbb/missing_syscalls.c +@@ -15,14 +15,6 @@ pid_t getsid(pid_t pid) + return syscall(__NR_getsid, pid); + } + +-int stime(const time_t *t) +-{ +- struct timeval tv; +- tv.tv_sec = *t; +- tv.tv_usec = 0; +- return settimeofday(&tv, NULL); +-} +- + int sethostname(const char *name, size_t len) + { + return syscall(__NR_sethostname, name, len); +diff --git a/util-linux/rdate.c b/util-linux/rdate.c +index 70f829e7f..878375d78 100644 +--- a/util-linux/rdate.c ++++ b/util-linux/rdate.c +@@ -95,9 +95,13 @@ int rdate_main(int argc UNUSED_PARAM, char **argv) + if (!(flags & 2)) { /* no -p (-s may be present) */ + if (time(NULL) == remote_time) + bb_error_msg("current time matches remote time"); +- else +- if (stime(&remote_time) < 0) ++ else { ++ struct timespec ts; ++ ts.tv_sec = remote_time; ++ ts.tv_nsec = 0; ++ if (clock_settime(CLOCK_REALTIME, &ts) < 0) + bb_perror_msg_and_die("can't set time of day"); ++ } + } + + if (flags != 1) /* not lone -s */