[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
23/31: gnu: less: Build fix for the Hurd.
From: |
guix-commits |
Subject: |
23/31: gnu: less: Build fix for the Hurd. |
Date: |
Mon, 16 Mar 2020 06:25:58 -0400 (EDT) |
janneke pushed a commit to branch wip-hurd
in repository guix.
commit c8c5e6d45e03cfa7dfda5031367720fc9865389a
Author: Jan Nieuwenhuizen <address@hidden>
AuthorDate: Sat Mar 7 14:55:35 2020 +0100
gnu: less: Build fix for the Hurd.
* gnu/packages/patches/less-hurd-path-max.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/less.scm (less): Use it.
---
gnu/local.mk | 1 +
gnu/packages/less.scm | 3 +++
gnu/packages/patches/less-hurd-path-max.patch | 38 +++++++++++++++++++++++++++
3 files changed, 42 insertions(+)
diff --git a/gnu/local.mk b/gnu/local.mk
index ada793e..a73914d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1098,6 +1098,7 @@ dist_patch_DATA =
\
%D%/packages/patches/ldc-bootstrap-disable-tests.patch \
%D%/packages/patches/ldc-disable-phobos-tests.patch \
%D%/packages/patches/leela-zero-gtest.patch \
+ %D%/packages/patches/less-hurd-path-max.patch \
%D%/packages/patches/liba52-enable-pic.patch \
%D%/packages/patches/liba52-link-with-libm.patch \
%D%/packages/patches/liba52-set-soname.patch \
diff --git a/gnu/packages/less.scm b/gnu/packages/less.scm
index 91c269a..d01a423 100644
--- a/gnu/packages/less.scm
+++ b/gnu/packages/less.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012 Nikita Karetnikov <address@hidden>
;;; Copyright © 2019 Tobias Geerinckx-Rice <address@hidden>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -19,6 +20,7 @@
(define-module (gnu packages less)
#:use-module (guix licenses)
+ #:use-module (gnu packages)
#:use-module (gnu packages ncurses)
#:use-module (guix packages)
#:use-module (guix download)
@@ -35,6 +37,7 @@
version ".tar.gz")
(string-append "http://www.greenwoodsoftware.com/less/less-"
version ".tar.gz")))
+ (patches (search-patches "less-hurd-path-max.patch"))
(sha256
(base32 "0ggyjl3yzn7c450zk1rixi9ls6asdhgqynhk34zsd0ckhmsm45pz"))))
(build-system gnu-build-system)
diff --git a/gnu/packages/patches/less-hurd-path-max.patch
b/gnu/packages/patches/less-hurd-path-max.patch
new file mode 100644
index 0000000..afb4a4e
--- /dev/null
+++ b/gnu/packages/patches/less-hurd-path-max.patch
@@ -0,0 +1,38 @@
+Description: Avoid usage of PATH_MAX.
+Author: Jan (janneke) Nieuwenhuizen <address@hidden>
+Bug-Guix: - XXX: [core-updates] merge wip-hurd
+Forwarded: submitted to address@hidden
+Last-Update: 2020-03-07
+
+From ef652341ed8b2c14ac40312ccd4ed329cb69fd0c Mon Sep 17 00:00:00 2001
+From: Jan Nieuwenhuizen <address@hidden>
+Date: Sat, 7 Mar 2020 14:57:19 +0100
+Subject: [PATCH] Avoid usage of PATH_MAX.
+
+* filename.c (lrealpath): Have realpath allocate the buffer. Fixes
+compilation on the Hurd and avoids possible buffer overflow on other
+systems.
+---
+ filename.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/filename.c b/filename.c
+index e420837..faa71b0 100644
+--- a/filename.c
++++ b/filename.c
+@@ -795,9 +795,9 @@ lrealpath(path)
+ char *path;
+ {
+ #if HAVE_REALPATH
+- char rpath[PATH_MAX];
+- if (realpath(path, rpath) != NULL)
+- return (save(rpath));
++ char *rpath = NULL;
++ if ((rpath = realpath(path, rpath)) != NULL)
++ return (rpath);
+ #endif
+ return (save(path));
+ }
+--
+2.24.0
+
- 13/31: gnu: commencement: gnumach-headers-boot0: Build from tarball., (continued)
- 13/31: gnu: commencement: gnumach-headers-boot0: Build from tarball., guix-commits, 2020/03/16
- 15/31: gnu: commencement: hurd-minimal-boot0: Build from tarball., guix-commits, 2020/03/16
- 07/31: Revert "gnu: guile-static-stripped: Update to 2.2.", guix-commits, 2020/03/16
- 18/31: gnu: commencement: gnumach-headers-boot0: Update to 1.8-116-g28b53508., guix-commits, 2020/03/16
- 16/31: gnu: commencement: glibc-intermediate: Build fixes for the Hurd., guix-commits, 2020/03/16
- 05/31: gnu: glibc: Add signal SA_SIGINFO support for the Hurd., guix-commits, 2020/03/16
- 25/31: gnu: shadow: Add linux-pam dependency for the Hurd., guix-commits, 2020/03/16
- 21/31: daemon: Do not use clone on the Hurd., guix-commits, 2020/03/16
- 17/31: gnu: commencement: hurd-source: Update to latest git., guix-commits, 2020/03/16
- 20/31: gnu: hurd: Update to hurd-headers version: 0.9-91a51672., guix-commits, 2020/03/16
- 23/31: gnu: less: Build fix for the Hurd.,
guix-commits <=
- 22/31: daemon: Avoid kill -1 bug on the Hurd., guix-commits, 2020/03/16
- 27/31: gnu: shepherd: Build fix for the Hurd., guix-commits, 2020/03/16
- 19/31: gnu: commencement: glibc-final: Allow gnumach-headers references., guix-commits, 2020/03/16
- 24/31: gnu: fontconfig: Build fix for the Hurd., guix-commits, 2020/03/16
- 26/31: gnu: pciutils: Build fixes for the Hurd., guix-commits, 2020/03/16
- 31/31: gnu: mit-krb5: Supprt for the Hurd., guix-commits, 2020/03/16
- 30/31: gnu: shadow: Build fix for the Hurd., guix-commits, 2020/03/16
- 29/31: gnu: screen: Build fix for the Hurd., guix-commits, 2020/03/16
- 28/31: gnu: inetutils: Support for the Hurd., guix-commits, 2020/03/16