From patchwork Sun Apr 10 01:16:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: zamfofex X-Patchwork-Id: 38478 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 621C827BBEA; Sun, 10 Apr 2022 02:21:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BB9AC27BBE9 for ; Sun, 10 Apr 2022 02:21:25 +0100 (BST) Received: from localhost ([::1]:57530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ndMGa-0003kt-Qn for patchwork@mira.cbaines.net; Sat, 09 Apr 2022 21:21:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndMGF-0003kZ-RL for guix-patches@gnu.org; Sat, 09 Apr 2022 21:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ndMGF-00013R-C4 for guix-patches@gnu.org; Sat, 09 Apr 2022 21:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ndMGF-0002CF-8g for guix-patches@gnu.org; Sat, 09 Apr 2022 21:21:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54832] [patch] update glibc to 2.35 Resent-From: zamfofex Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 10 Apr 2022 01:21:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54832 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54832@debbugs.gnu.org X-Debbugs-Original-To: "guix-patches@gnu.org" Received: via spool by submit@debbugs.gnu.org id=B.16495536498387 (code B ref -1); Sun, 10 Apr 2022 01:21:03 +0000 Received: (at submit) by debbugs.gnu.org; 10 Apr 2022 01:20:49 +0000 Received: from localhost ([127.0.0.1]:39000 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndMG0-0002BC-Js for submit@debbugs.gnu.org; Sat, 09 Apr 2022 21:20:49 -0400 Received: from lists.gnu.org ([209.51.188.17]:44912) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndMCL-00025L-12 for submit@debbugs.gnu.org; Sat, 09 Apr 2022 21:17:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42146) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndMCJ-0003Te-SQ for guix-patches@gnu.org; Sat, 09 Apr 2022 21:17:00 -0400 Received: from mta-13-4.privateemail.com ([198.54.127.109]:32846) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndMCE-0000C9-VT for guix-patches@gnu.org; Sat, 09 Apr 2022 21:16:59 -0400 Received: from mta-13.privateemail.com (localhost [127.0.0.1]) by mta-13.privateemail.com (Postfix) with ESMTP id D102F18000A0 for ; Sat, 9 Apr 2022 21:16:31 -0400 (EDT) Received: from APP-12 (unknown [10.50.14.212]) by mta-13.privateemail.com (Postfix) with ESMTPA id A89401800084 for ; Sat, 9 Apr 2022 21:16:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=twdb.moe; s=default; t=1649553391; bh=4QG4j2D/F4HgiWBcHNw2f+mx+4ckSQsUSxCJyRgMHcQ=; h=Date:From:To:Subject:From; b=T5NeQUZsRRf830gEAK9x1DbigU2e55C9KJp7/zHnG8pfCNsyN4ujMQ6GRkYeOgPxD Y6bd1u+wjKh1AI8xOjvzSCvt5Xom1/6Ui7tvfV1zFq99nAitigW3W70wGDeRUV4Zns ymd/OYXnqraet9G5gvLoX2+p6Vi9Um3swYmNQuuxlzVwriJHisdadMChjN9auRS12t Jg61rIimQevNobSHZz6WDL2FBza2T8kS4MZfcYDsRXMq2DoZGyii+z5z4dNjC6mxjf kKe+eSDqCABG55f9T4rp3nNZFC26xjBrQyhDM4hdmy1ogx0SQ2idz5dXmydDbmf04+ LefsjJzxZ2M8g== Date: Sat, 9 Apr 2022 22:16:31 -0300 (BRT) From: zamfofex Message-ID: <935236349.13698.1649553391613@privateemail.com> MIME-Version: 1.0 X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.5-Rev40 X-Originating-Client: open-xchange-appsuite X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: pass client-ip=198.54.127.109; envelope-from=zamfofex@twdb.moe; helo=MTA-13-4.privateemail.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 09 Apr 2022 21:20:47 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hello! I have decided I wanted to work on updating glibc. I tested the updated glibc with the packages ‘hello’, ‘coreutils’, ‘grep’, ‘sed’ and ‘guile’, and they all built successfully! I have attached the generated ‘git diff’ to this message, and I hope that is fine. If there are any issues, please feel free to let me know! diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 72329db..f2a0814 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2021 Maxime Devos ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2022 zamfofex ;;; ;;; This file is part of GNU Guix. ;;; @@ -694,16 +695,14 @@ (define-public glibc ;; version 2.28, GNU/Hurd used a different glibc branch. (package (name "glibc") - (version "2.33") + (version "2.35") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "1zvp0qdfbdyqrzydz18d9zg3n5ygy8ps7cmny1bvsp8h1q05c99f")) - (patches (search-patches "glibc-ldd-powerpc.patch" - "glibc-ldd-x86_64.patch" - "glibc-dl-cache.patch" + "0bpm1kfi09dxl4c6aanc5c9951fmf6ckkzay60cx7k37dcpp68si")) + (patches (search-patches "glibc-dl-cache.patch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" "glibc-reinstate-prlimit64-fallback.patch" @@ -738,6 +737,7 @@ (define-public glibc #:validate-runpath? #f #:modules ((ice-9 ftw) + (srfi srfi-1) (srfi srfi-26) (guix build utils) (guix build gnu-build-system)) @@ -852,13 +852,19 @@ (define-public glibc (add-after 'install 'move-static-libs (lambda* (#:key outputs #:allow-other-keys) ;; Move static libraries to the "static" output. + + (define empty-static-libraries '("libpthread.a" "libdl.a" "libutil.a" "libanl.a")) + (define (empty-static-library? file) + (any (lambda (s) (string=? file s)) empty-static-libraries)) + (define (static-library? file) ;; Return true if FILE is a static library. The ;; "_nonshared.a" files are referred to by libc.so, ;; libpthread.so, etc., which are in fact linker ;; scripts. (and (string-suffix? ".a" file) - (not (string-contains file "_nonshared")))) + (not (string-contains file "_nonshared")) + (not (empty-static-library? file)))) (define (linker-script? file) ;; Guess whether FILE, a ".a" file, is actually a @@ -869,6 +875,7 @@ (define (linker-script? file) (let* ((out (assoc-ref outputs "out")) (lib (string-append out "/lib")) (files (scandir lib static-library?)) + (files2 (scandir lib empty-static-library?)) (static (assoc-ref outputs "static")) (slib (string-append static "/lib"))) (mkdir-p slib) @@ -876,6 +883,10 @@ (define (linker-script? file) (rename-file (string-append lib "/" base) (string-append slib "/" base))) files) + (for-each (lambda (base) + (copy-file (string-append lib "/" base) + (string-append slib "/" base))) + files2) ;; Usually libm.a is a linker script so we need to ;; change the file names in there to refer to STATIC diff --git a/gnu/packages/m4.scm b/gnu/packages/m4.scm index 090f557..e209494 100644 --- a/gnu/packages/m4.scm +++ b/gnu/packages/m4.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2015 Ludovic Courtès ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2022 zamfofex ;;; ;;; This file is part of GNU Guix. ;;; @@ -27,15 +28,17 @@ (define-module (gnu packages m4) (define-public m4 (package (name "m4") - (version "1.4.18") + (version "1.4.19") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/m4/m4-" version ".tar.xz")) - (patches (search-patches "m4-gnulib-libio.patch")) + (patches (search-patches + "m4-shell.patch" + "m4-failing-test-bug.patch")) (sha256 (base32 - "01sfjd5a4waqw83bibvmn522g69qfqvwig9i2qlgy154l1nfihgj")))) + "15mghcksh11saylpm86h1zkz4in0rbi0pk8i6nqxkdikdmfdxbk3")))) (build-system gnu-build-system) (arguments `(;; Explicitly disable tests when cross-compiling, otherwise 'make check' diff --git a/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch b/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch index e31f99a..b022155 100644 --- a/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch +++ b/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch @@ -67,8 +67,8 @@ index fcd79fd554..1dd02aa449 100644 diff --git a/sysdeps/pthread/timer_create.c b/sysdeps/pthread/timer_create.c index 9d8a9ea8ae..3430582c09 100644 ---- a/sysdeps/pthread/timer_create.c -+++ b/sysdeps/pthread/timer_create.c +--- a/rt/timer_create.c ++++ b/rt/timer_create.c @@ -48,7 +48,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid) return -1; } diff --git a/gnu/packages/patches/m4-failing-test-bug.patch b/gnu/packages/patches/m4-failing-test-bug.patch new file mode 100644 index 0000000..39f11c1 --- /dev/null +++ b/gnu/packages/patches/m4-failing-test-bug.patch @@ -0,0 +1,7 @@ +--- a/tests/test-execute.sh ++++ b/tests/test-execute.sh +@@ -0,1 +0,3 @@ +-for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ; do ++# Test case 5 is disabled because of a bug in Guix whereby ++# raising 'SIGINT' does not work as expected. ++for i in 0 1 2 3 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ; do diff --git a/gnu/packages/patches/m4-shell.patch b/gnu/packages/patches/m4-shell.patch new file mode 100644 index 0000000..f10e99f --- /dev/null +++ b/gnu/packages/patches/m4-shell.patch @@ -0,0 +1,16 @@ +--- a/lib/config.hin ++++ b/lib/config.hin +@@ -0,12 +0,1 @@ +-/* File name of the Bourne shell. */ +-#if (defined _WIN32 && !defined __CYGWIN__) || defined __CYGWIN__ || defined __ANDROID__ +-/* Omit the directory part because +- - For native Windows programs in a Cygwin environment, the Cygwin mounts +- are not visible. +- - For 32-bit Cygwin programs in a 64-bit Cygwin environment, the Cygwin +- mounts are not visible. +- - On Android, /bin/sh does not exist. It's /system/bin/sh instead. */ +-# define BOURNE_SHELL "sh" +-#else +-# define BOURNE_SHELL "/bin/sh" +-#endif ++# define BOURNE_SHELL "sh"