From: Manolis Ragkousis <manolis837@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix-devel <Guix-devel@gnu.org>
Subject: [PATCH] gnu: acl: Fix i686-gnu build.
Date: Tue, 28 Apr 2015 13:41:11 +0300 [thread overview]
Message-ID: <CAFtzXzMPKRKrxr3vcxtF-Qbdq6VHUSTTjxiP8_XAmG=ju7kRmg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 364 bytes --]
Hello guix
This is a patch that allows acl to be built when hurd is targeted.
Is it okay to push to wip-hurd?
I have rebased wip-hurd on top of master locally and I have removed
some things from commit ea44aa1b33933328aa0b7b33f36dfcc90aaa8c74
that were no longer needed.
I will resend that patch for review before I push. All the others are the same.
Manolis
[-- Attachment #2: 0001-gnu-acl-Fix-i686-gnu-build.patch --]
[-- Type: text/x-patch, Size: 3982 bytes --]
From c85bc49b864570b27af95260bb7e59d7db660b36 Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Sat, 25 Apr 2015 18:18:53 +0300
Subject: [PATCH] gnu: acl: Fix i686-gnu build.
* gnu/packages/patches/acl-hurd-path-max.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
---
gnu-system.am | 1 +
gnu/packages/acl.scm | 4 +-
gnu/packages/patches/acl-hurd-path-max.patch | 80 ++++++++++++++++++++++++++++
3 files changed, 84 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/acl-hurd-path-max.patch
diff --git a/gnu-system.am b/gnu-system.am
index 3a10757..3b634a1 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -364,6 +364,7 @@ dist_patch_DATA = \
gnu/packages/patches/abiword-pass-no-undefined-to-linker.patch \
gnu/packages/patches/abiword-use-proper-png-api.patch \
gnu/packages/patches/abiword-wmf-version-lookup-fix.patch \
+ gnu/packages/patches/acl-hurd-path-max.patch \
gnu/packages/patches/aegis-constness-error.patch \
gnu/packages/patches/aegis-perl-tempdir1.patch \
gnu/packages/patches/aegis-perl-tempdir2.patch \
diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm
index af2fb62..f2e1bad 100644
--- a/gnu/packages/acl.scm
+++ b/gnu/packages/acl.scm
@@ -26,6 +26,7 @@
#:use-module (gnu packages perl)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (gnu packages)
#:use-module (guix build-system gnu))
(define-public acl
@@ -39,7 +40,8 @@
version ".src.tar.gz"))
(sha256
(base32
- "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p"))))
+ "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p"))
+ (patches (list (search-patch "acl-hurd-path-max.patch")))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; FIXME: Investigate test suite failures
diff --git a/gnu/packages/patches/acl-hurd-path-max.patch b/gnu/packages/patches/acl-hurd-path-max.patch
new file mode 100644
index 0000000..89cb3a3
--- /dev/null
+++ b/gnu/packages/patches/acl-hurd-path-max.patch
@@ -0,0 +1,80 @@
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=636512
+
+From: Svante Signell <srs@kth.se>
+Subject: acl: Fix FTBFS on hurd-i386
+Date: Wed, 03 Aug 2011 19:36:27 +0200
+
+Currently acl does not compile on hurd-i386. The problem is a PATH_MAX
+definition which is not supported on GNU/Hurd.
+
+Index: acl-2.2.52/setfacl/parse.c
+===================================================================
+--- acl-2.2.52/setfacl/parse.c
++++ acl-2.2.52/setfacl/parse.c
+@@ -419,7 +419,13 @@ read_acl_comments(
+ bytes for "# file: ". Not a good solution but for now it is the
+ best I can do without too much impact on the code. [tw]
+ */
++
++#ifdef __GNU__
++ char *linebuf;
++ size_t dummy = 0;
++#else
+ char linebuf[(4*PATH_MAX)+9];
++#endif
+ char *cp;
+ char *p;
+ int comments_read = 0;
+@@ -449,9 +455,13 @@ read_acl_comments(
+ if (line)
+ (*line)++;
+
++#ifdef __GNU__
++ if (getline(&linebuf, &dummy, file) == -1)
++ break;
++#else
+ if (fgets(linebuf, sizeof(linebuf), file) == NULL)
+ break;
+-
++#endif
+ comments_read = 1;
+
+ p = strrchr(linebuf, '\0');
+@@ -473,7 +483,12 @@ read_acl_comments(
+ goto fail;
+ *path_p = (char*)malloc(strlen(cp)+1);
+ if (!*path_p)
++ {
++#ifdef __GNU__
++ free (linebuf);
++#endif
+ return -1;
++ }
+ strcpy(*path_p, cp);
+ }
+ } else if (strncmp(cp, "owner:", 6) == 0) {
+@@ -522,13 +537,24 @@ read_acl_comments(
+ }
+ }
+ if (ferror(file))
++ {
++#ifdef __GNU__
++ free (linebuf);
++#endif
+ return -1;
++ }
++#ifdef __GNU__
++ free (linebuf);
++#endif
+ return comments_read;
+ fail:
+ if (path_p && *path_p) {
+ free(*path_p);
+ *path_p = NULL;
+ }
++#ifdef __GNU__
++ free (linebuf);
++#endif
+ return -EINVAL;
+ }
+
--
2.3.6
next reply other threads:[~2015-04-28 10:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 10:41 Manolis Ragkousis [this message]
2015-05-01 14:53 ` [PATCH] gnu: acl: Fix i686-gnu build Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFtzXzMPKRKrxr3vcxtF-Qbdq6VHUSTTjxiP8_XAmG=ju7kRmg@mail.gmail.com' \
--to=manolis837@gmail.com \
--cc=Guix-devel@gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).