GNU bug report logs - #47615
[PATCH 0/9] Add 32-bit powerpc support

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Efraim Flashner <efraim@HIDDEN>; Keywords: patch; dated Tue, 6 Apr 2021 12:26:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 22:31:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 18:31:31 2021
Received: from localhost ([127.0.0.1]:42183 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTuEN-0000dT-54
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 18:31:31 -0400
Received: from mail-pf1-f180.google.com ([209.85.210.180]:45666)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.legoll@HIDDEN>) id 1lTuEL-0000dA-FC
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 18:31:29 -0400
Received: by mail-pf1-f180.google.com with SMTP id i190so3228341pfc.12
 for <47615 <at> debbugs.gnu.org>; Tue, 06 Apr 2021 15:31:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=jDkrODJ1dBr0PUhDgiURMgE2uHHHDd5EWxJ7GNSw72Q=;
 b=U51T5rc/xDYNyPYMYQ3z9xDgM8DTZyJHvCiTPldr5c3EmipJZ5gZFCS1WLjQM2muEh
 4C1NphRcZSeHnkwoejlGp5tTeNAxw474UppLHDuidwXvtP93/l5fuzlvdfSjh1O3B4nU
 S/hZyQROtEKTVUx1Az5CGiHzTK3NsHExKuBudABHkUrsl3UL8sDaRNirkXFUXykb/0oH
 ub6mPArlf+HI0cYIehtgD2RY8N8IuaqwDVg7+h2g+IaHwJYlPBZFk+oU7IHBbi28OKTZ
 fIvfU4Vb/vSkFA1IUAs3di/uJFY0Gh3i9ZXEYL1t7XkSk5sVqRvwdZkudiyae5gbM+XF
 xYFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=jDkrODJ1dBr0PUhDgiURMgE2uHHHDd5EWxJ7GNSw72Q=;
 b=ZqtWEuWo3oZIvL8+p3mtuKvqRea0pV4nSYQY4iC6wbqCNV4/EuYvxNzcsD4hqxmmeF
 NRVHi31I38GdBNtX1BsdrxjvnJsaZC0qrOMhyJbNLkEcL7HkYM8iXgaudL3r/c/H14yJ
 /qABYsQE7WG89biVw6mzEeBt2/5/4vrh4c/XuWj5PJXQPwGOKwoTuYpbpFjJKv3uorX8
 L6QORoGOVB2MaroVMvPZmakzRMCkNtrMSrNEfPfW9Dq7saRHqZN6IXOs1OvnJPPbS5+T
 4FpwW4e8eG24LLWbJgY+SbxNHX/oY1h7lOEOivdQpkFLwW+03Z+JkjM1j5NJ0aU6dAJ2
 1x2w==
X-Gm-Message-State: AOAM5335zW9cX5Gti/pj1Ysir8FyM3u3bOrwp5zyqOmwZONvJYU5RTYu
 a2hv9uSkNG8nUiGRHYStuAWYzA8SDg2qINJfwLw=
X-Google-Smtp-Source: ABdhPJwCD06M6MzLVE2cZj5OWAPF+U1s/x5JvJGBRoxhPXY6nT2Ys7lVU7jqY5zODCIGo0oAftFxo4mU53ArMwOcezA=
X-Received: by 2002:a63:b59:: with SMTP id a25mr336967pgl.235.1617748283473;
 Tue, 06 Apr 2021 15:31:23 -0700 (PDT)
MIME-Version: 1.0
References: <cover.1617711307.git.efraim@HIDDEN>
 <b0b76cdac4e9147105b1613fbb69707b8de5366a.1617711307.git.efraim@HIDDEN>
 <CAEwRq=pkXrQnxKJMqw9bDm4xiWQPski-2K8AoOPkR23shvXysA@HIDDEN>
 <YGy0AnamHYVtHVz0@3900XT>
In-Reply-To: <YGy0AnamHYVtHVz0@3900XT>
From: Vincent Legoll <vincent.legoll@HIDDEN>
Date: Wed, 7 Apr 2021 00:31:12 +0200
Message-ID: <CAEwRq=qShDHfLT=VJYqG_LUqiqVNgPqSFECKfupNf7vKQxFRrw@HIDDEN>
Subject: Re: [PATCH 9/9] gnu: nss: Skip tests on powerpc-linux.
To: Efraim Flashner <efraim@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: guix-devel <guix-devel@HIDDEN>, 47615 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Apr 6, 2021 at 9:18 PM Efraim Flashner <efraim@HIDDEN> wrote:
> On Tue, Apr 06, 2021 at 07:00:50PM +0200, Vincent Legoll wrote:
> > s/sporatically/sporadically/
>
> Not going to lie, spelling is hard. I normally have spell check turned
> off for scheme files.

But you *are* lying, you have the guile spell-(and-syntax-)checker enabled
for all your scheme files, and it is a picky one... ;-)

-- 
Vincent Legoll




Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 22:27:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 18:27:21 2021
Received: from localhost ([127.0.0.1]:42156 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTuAK-0000Ug-PT
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 18:27:20 -0400
Received: from mail-pj1-f53.google.com ([209.85.216.53]:35678)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.legoll@HIDDEN>) id 1lTuAI-0000UT-ES
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 18:27:18 -0400
Received: by mail-pj1-f53.google.com with SMTP id
 il9-20020a17090b1649b0290114bcb0d6c2so230272pjb.0
 for <47615 <at> debbugs.gnu.org>; Tue, 06 Apr 2021 15:27:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=YxUu6QT9ddDvlyzXE94mcyxMnfQK4p8cQVPk4gxRwfg=;
 b=XdLo/zCw4v0DnkbmboCpM2/jNIayrs1EZNRMLqhwL7CuJaTm6TOYBau4FJEKH3itqC
 VJJsEk+QTEScKEpqpNla7oVEGXoCz7fEqMwAXucnwW0CT5DvlUoQEAkt/rtrCokaIfFR
 HDX5kOihUhV36ex0gHoSvLpjntBKKfIso1D5HZPoYUb9Fw7ccuWuZF1aC5TBEyF7aHmb
 dwX9PMWqs5KwsxTTLiZghafGBhXEe855vCl+KVgYYJsspm8RqV8ocNxyJTuGWHVZe8gG
 8xpeTGBVrNT/UIvz0JAFDum9IWZehNQ8cFt8vOYYqloyfDEutycZAmFIdrgItHKCUQZw
 37rQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=YxUu6QT9ddDvlyzXE94mcyxMnfQK4p8cQVPk4gxRwfg=;
 b=pG+WoDv/1X7q15k6sH5KOR00E01d7MRzoTdf3LbYfjvPcJDOECbxZ2+i8/OGBP2RSf
 6/Jp0wAoUpqsl8d7PpjR6a+AcJBBzTIsTxkTpdBc4ZwYhPP7vnxRntWz6Nl7GNRVvEno
 ZWMSBfKWJHwosn/ua04qwlQfKbGKLhuV9x3Vn+SLwsCUSo/mbQ/o7adTt5TpL8CcAay0
 0fE0CrCN0g8Rr5KydmwZVDHfb4FhwSnAtZbzT0ir8U066L2sxH5rc5ThKqfSfUoBcmHE
 m3vy8TALW9HVaMEA5At2MOQXGl4YEuugNeIIteqpnRU91z1xfjKHknrRstPLZ6MzsN6z
 8dgw==
X-Gm-Message-State: AOAM533+2lZ0I9Y3s160j+OxdbgN5l/B9f3aYNPV7bODaL1lCs+lbz0R
 cKAQy93XQlrKs7Dz1iMUk56tGaS/R5QOrN8J/ZOAcNf+3hZHdw==
X-Google-Smtp-Source: ABdhPJwOoifOXS9qYBoh69bn3+RUgv5v0Dt3PLpKImq+0XsTX95Idyj9FoOrnd2MmxpGu7YNHAm3xtRwycQHiLz74uA=
X-Received: by 2002:a17:902:b684:b029:e6:8efd:fb00 with SMTP id
 c4-20020a170902b684b02900e68efdfb00mr402569pls.16.1617748032332; Tue, 06 Apr
 2021 15:27:12 -0700 (PDT)
MIME-Version: 1.0
References: <cover.1617711307.git.efraim@HIDDEN>
 <9f9bc5d3686731bf30c72c821f0b5a54c66843aa.1617711307.git.efraim@HIDDEN>
 <CAEwRq=qyBemm_8eqV2_Pr8wFKAb1hRK2aKwDw_qhds0ZN5vy4w@HIDDEN>
 <YGyzyA4LoKxwFfWI@3900XT>
In-Reply-To: <YGyzyA4LoKxwFfWI@3900XT>
From: Vincent Legoll <vincent.legoll@HIDDEN>
Date: Wed, 7 Apr 2021 00:27:01 +0200
Message-ID: <CAEwRq=op4nhStX282YdziZL9zUShVFcPQmpYUSEoZU70sn_LtQ@HIDDEN>
Subject: Re: [PATCH 7/9] build: qemu-command: Add support for powerpc.
To: Efraim Flashner <efraim@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: guix-devel <guix-devel@HIDDEN>, 47615 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, Apr 6, 2021 at 9:18 PM Efraim Flashner <efraim@HIDDEN> wrote:
>
> On Tue, Apr 06, 2021 at 07:02:47PM +0200, Vincent Legoll wrote:
> > Hello,
> >
> > On Tue, Apr 6, 2021 at 2:44 PM Efraim Flashner <efraim@HIDDEN> wrote:
> > > +                    ((string-match "powerpc" cpu) "ppc")
> >
> > Won't there be some "powerpc64le" conflict here ?
> >
>
> I thought not, but it appears it would match all of powerpc*
>
> (ins)scheme@(guile-user)> (use-modules (ice-9 regex))
> (ins)scheme@(guile-user)> (string-match "powerpc" "powerpc")
> $1 = #("powerpc" (0 . 7))
> (ins)scheme@(guile-user)> (string-match "powerpc" "powerpc64le")
> $2 = #("powerpc64le" (0 . 7))
> (ins)scheme@(guile-user)> (string-match "powerpc" "armhf")
> $3 = #f
>
> If it were string=? then it would be fine, but that would break the
> ^i[3456]86$ regex. It looks like I would need to add a powerpc64 case
> above the powerpc case. Looking at the output of qemu adding
> ((string-match "powerpc64" cpu) "ppc64") would be the right answer.

or you can use anchored regex, like in the x86 case:

((string-match "^powerpc$" cpu) "ppc")

-- 
Vincent Legoll




Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 19:30:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 15:30:06 2021
Received: from localhost ([127.0.0.1]:41806 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTrOo-0002Ih-Fk
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 15:30:06 -0400
Received: from flashner.co.il ([178.62.234.194]:46908)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTrOn-0002He-3h
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 15:30:05 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id E92D540279;
 Tue,  6 Apr 2021 19:29:58 +0000 (UTC)
Date: Tue, 6 Apr 2021 22:29:26 +0300
From: Efraim Flashner <efraim@HIDDEN>
To: 47615 <at> debbugs.gnu.org, guix-devel@HIDDEN
Subject: Re: [PATCH 4/9] gnu: mesa: Add support for powerpc-linux.
Message-ID: <YGy2lmYzrTOARlnN@3900XT>
References: <cover.1617711307.git.efraim@HIDDEN>
 <3a5dddb867370ce5f91fa7e1b5051f2bba5fcec5.1617711307.git.efraim@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="hNx9+etlEEjuIrA/"
Content-Disposition: inline
In-Reply-To: <3a5dddb867370ce5f91fa7e1b5051f2bba5fcec5.1617711307.git.efraim@HIDDEN>
X-PGP-Key-ID: 0x41AAE7DCCA3D8351
X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc
X-PGP-Fingerprint: A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--hNx9+etlEEjuIrA/
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 06, 2021 at 03:32:48PM +0300, Efraim Flashner wrote:
> =20
> +       ;; The llvm-based tests are flakey on non-Intel hardware.
> +       #:tests? ,(if (string=3D? "powerpc-linux" (or (%current-system)
> +                                                   (%current-target-syst=
em)))
> +                   '#f '#t)
> +
>=20

Looks like Charl=C3=A8ne of OpenBSD (I think?) is right, there are some
endianness bugs in mesa with llvm. I've tried, building mesa for powerpc
without llvm isn't actually possible, so disabled tests for now.

Snippet from the test suite log:

Testing util_format_a1b5g5r5_unorm_unpack_rgba_8unorm ...
FAILED: {0x39, 0xc5, 0x00, 0x00} obtained
        {0x00, 0x00, 0xff, 0x00} expected
FAILED: {0xc5, 0x00, 0x18, 0xff} obtained
        {0x00, 0xff, 0x00, 0x00} expected
FAILED: {0x00, 0x18, 0xe6, 0x00} obtained
        {0xff, 0x00, 0x00, 0x00} expected
FAILED: {0x00, 0x20, 0x00, 0x00} obtained
        {0x00, 0x00, 0x00, 0xff} expected
Testing util_format_a1b5g5r5_unorm_norm_flags ...
Testing util_format_x1b5g5r5_unorm_fetch_rgba_float ...
FAILED: {0.225806, 0.774194, 0.000000, 1.000000} obtained
        {0.000000, 0.000000, 1.000000, 1.000000} expected
FAILED: {0.774194, 0.000000, 0.096774, 1.000000} obtained
        {0.000000, 1.000000, 0.000000, 1.000000} expected
FAILED: {0.000000, 0.096774, 0.903226, 1.000000} obtained
        {1.000000, 0.000000, 0.000000, 1.000000} expected
FAILED: {1.000000, 0.870968, 1.000000, 1.000000} obtained
        {1.000000, 1.000000, 1.000000, 1.000000} expected
Testing util_format_x1b5g5r5_unorm_pack_rgba_float ...
FAILED: 00 3e obtained
        3e 00 expected
FAILED: 07 c0 obtained
        c0 07 expected
FAILED: f8 00 obtained
        00 f8 expected
FAILED: ff fe obtained
        fe ff expected


--=20
Efraim Flashner   <efraim@HIDDEN>   =D7=90=D7=A4=D7=A8=D7=99=D7=9D =
=D7=A4=D7=9C=D7=A9=D7=A0=D7=A8
GPG key =3D A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

--hNx9+etlEEjuIrA/
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBstpMACgkQQarn3Mo9
g1HNnA//cDfqfc3lR94dHwvZ+f/FZsqgz5thprglbQRtS3iTqwf9fQA2/vP1dEIp
H01bqesG1Ln3UMP5CXm7Fm9BDlSbmRbPztmq34WBC0y/Qt7tpjooSN9lLXdr/M9i
INIL5FXkg/ywMYce6EUnJLughFbQg3uVcZXklb1z1y5y1L5mnxEJODrZYjHIM5lA
ETR1pgNpWRzD+QcQsiN/4OHbX3GvpMbeqHB7yb4GYpmb8Pe6JHNFHh9xwTZeD9w4
Ug9gO/fFurEulIePH47y5ND7q9l2fJWssITUagF0PujKSk2HeTBs7UScZbvLnSCz
5aAW8OiT3P5XMYez9Uk8q6+5rlCUSp3yL4ov6qnTriaWIxDjY0BzC/7x0gZocGC0
2SdsUJlGnAR58sWnleLLPHI3TAMTBVa3lpdCEBnk3QhACwq/ih6XkdBGCdigSi73
sOX7/3DVdOW+k1CgkaXLzXP+pDPNazodU0DUCbWQoRy0BRLFUHofn/SCLYtpXoO1
JTbknMNIyKc+a4+qzI0o8D309jJpY44kqFhjk9IGkiGd04F0F5+IQs1KZ0GLOc6q
OCjbIPkOsivSX1SuPYzxWrNpl2QGFzt5otkY03+4jpadDdbHSJS1ELlwPUyvsW/X
mMOJNe3rErddT+wcqhCopu+56zjIaQCI0RHf2PnPFY0ejkIEj2c=
=b8/q
-----END PGP SIGNATURE-----

--hNx9+etlEEjuIrA/--




Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 19:19:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 15:19:05 2021
Received: from localhost ([127.0.0.1]:41791 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTrE9-000212-Mt
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 15:19:05 -0400
Received: from flashner.co.il ([178.62.234.194]:46870)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTrE8-00020S-4P
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 15:19:04 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id 336DB40279;
 Tue,  6 Apr 2021 19:18:58 +0000 (UTC)
Date: Tue, 6 Apr 2021 22:18:26 +0300
From: Efraim Flashner <efraim@HIDDEN>
To: Vincent Legoll <vincent.legoll@HIDDEN>
Subject: Re: [PATCH 9/9] gnu: nss: Skip tests on powerpc-linux.
Message-ID: <YGy0AnamHYVtHVz0@3900XT>
References: <cover.1617711307.git.efraim@HIDDEN>
 <b0b76cdac4e9147105b1613fbb69707b8de5366a.1617711307.git.efraim@HIDDEN>
 <CAEwRq=pkXrQnxKJMqw9bDm4xiWQPski-2K8AoOPkR23shvXysA@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="v2FegUcx8K9YXhhG"
Content-Disposition: inline
In-Reply-To: <CAEwRq=pkXrQnxKJMqw9bDm4xiWQPski-2K8AoOPkR23shvXysA@HIDDEN>
X-PGP-Key-ID: 0x41AAE7DCCA3D8351
X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc
X-PGP-Fingerprint: A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: guix-devel <guix-devel@HIDDEN>, 47615 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--v2FegUcx8K9YXhhG
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 06, 2021 at 07:00:50PM +0200, Vincent Legoll wrote:
> Hello,
>=20
> On Tue, Apr 6, 2021 at 2:44 PM Efraim Flashner <efraim@HIDDEN> wr=
ote:
> > +         ;; Tests on powerpc-linux take forever and fail sporatically.
>=20
> s/sporatically/sporadically/
>=20

Not going to lie, spelling is hard. I normally have spell check turned
off for scheme files.

--=20
Efraim Flashner   <efraim@HIDDEN>   =D7=90=D7=A4=D7=A8=D7=99=D7=9D =
=D7=A4=D7=9C=D7=A9=D7=A0=D7=A8
GPG key =3D A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

--v2FegUcx8K9YXhhG
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBstAEACgkQQarn3Mo9
g1EYaA/9FZ6hnb+PyLozgHgWcp3XJHqHS7bapmtqjFb0ZwtrHyJINOVfPvJJpO32
Hl6cUNEqyKssyL0whDCl2Tp5HrZ3syuLisr0j06eYs6mFEf7AVOhGFhQE+xWoP6+
bJrxMvmrJiVkQAtr3lkf6ZRT8BGQPI0GeaRrYa6BEbwdcNQNqhMTsuK7k5SIQ8Dk
tenpTH1EuBDX4zhaxLpDdB7kKcUwMTqsEmBdWqbFZPta0FsDe3nlPlQujwsYduo4
MO3pDRiwFZLq4/1Cy7mt6yHmD+JZZVeq58yO6dm/3GNi1FzCmU1yVXAlabytjh04
JG2DvV9O6t9f/5+zK+AE3oTqdtht9/w7MmmyYz34QJE2guYzmriZXs36fJuWUxoh
hszCsyM3G6P7spwU+cwL9IpOe09xPq8YZv0gwHDmS/cKb+YZw6Xyzlmo4Q1mK91k
MWFztLFF1wNO3S74VJzkN4nDIdOvk4prxYmf3ZEd6rgdwxDBMOrIPGRhSHPSJOR8
YAjWLasbbuvbBhBn5gYkW3NPXPk8Jj5QPyU3M/B2y/RfYt28LNKyROv/5X50/u+G
IeWBrH/0O/fBsMSzCHEG1/fEjRlZpp3H81NJXQF7GOMWwLO4cwaTbmjg2ezOE8a8
C58cipki0MJPV5fO13PbVk77lkfDgFKT+2ttBKV4OuVLxU0bcD8=
=CJDk
-----END PGP SIGNATURE-----

--v2FegUcx8K9YXhhG--




Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 19:18:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 15:18:18 2021
Received: from localhost ([127.0.0.1]:41787 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTrDO-0001zf-9z
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 15:18:18 -0400
Received: from flashner.co.il ([178.62.234.194]:46856)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTrDM-0001zS-EA
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 15:18:16 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id 8DA5940279;
 Tue,  6 Apr 2021 19:18:10 +0000 (UTC)
Date: Tue, 6 Apr 2021 22:17:28 +0300
From: Efraim Flashner <efraim@HIDDEN>
To: Vincent Legoll <vincent.legoll@HIDDEN>
Subject: Re: [PATCH 7/9] build: qemu-command: Add support for powerpc.
Message-ID: <YGyzyA4LoKxwFfWI@3900XT>
References: <cover.1617711307.git.efraim@HIDDEN>
 <9f9bc5d3686731bf30c72c821f0b5a54c66843aa.1617711307.git.efraim@HIDDEN>
 <CAEwRq=qyBemm_8eqV2_Pr8wFKAb1hRK2aKwDw_qhds0ZN5vy4w@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="1vAVykUMq/nXt3p/"
Content-Disposition: inline
In-Reply-To: <CAEwRq=qyBemm_8eqV2_Pr8wFKAb1hRK2aKwDw_qhds0ZN5vy4w@HIDDEN>
X-PGP-Key-ID: 0x41AAE7DCCA3D8351
X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc
X-PGP-Fingerprint: A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: guix-devel <guix-devel@HIDDEN>, 47615 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--1vAVykUMq/nXt3p/
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Apr 06, 2021 at 07:02:47PM +0200, Vincent Legoll wrote:
> Hello,
>=20
> On Tue, Apr 6, 2021 at 2:44 PM Efraim Flashner <efraim@HIDDEN> wr=
ote:
> > +                    ((string-match "powerpc" cpu) "ppc")
>=20
> Won't there be some "powerpc64le" conflict here ?
>=20

I thought not, but it appears it would match all of powerpc*

(ins)scheme@(guile-user)> (use-modules (ice-9 regex))
(ins)scheme@(guile-user)> (string-match "powerpc" "powerpc")
$1 =3D #("powerpc" (0 . 7))
(ins)scheme@(guile-user)> (string-match "powerpc" "powerpc64le")
$2 =3D #("powerpc64le" (0 . 7))
(ins)scheme@(guile-user)> (string-match "powerpc" "armhf")
$3 =3D #f

If it were string=3D? then it would be fine, but that would break the
^i[3456]86$ regex. It looks like I would need to add a powerpc64 case
above the powerpc case. Looking at the output of qemu adding
((string-match "powerpc64" cpu) "ppc64") would be the right answer.

--=20
Efraim Flashner   <efraim@HIDDEN>   =D7=90=D7=A4=D7=A8=D7=99=D7=9D =
=D7=A4=D7=9C=D7=A9=D7=A0=D7=A8
GPG key =3D A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

--1vAVykUMq/nXt3p/
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmBss8UACgkQQarn3Mo9
g1F6OA/+PHxDSLSUaxQUonH3nlZBhXaRJ97HT9ho/BSCL23wPj50EzKsTLzg1SV3
NYLa0vFoXCEQqxMnGz3fdT2yyJMG976zhJRPLni3wCy1RzWxmX+KJLZLKeBQDyin
qwSu/Ld9huqckLm8dHR/bHEPwRF0pUQj2BBu0JvxDnrI/XXszBIRR8L0JskhLfpT
YuJw+Yh1ANltzXLPFsNmo5ZXXKJM4ruQVtussRWpVxN4Bj9Z8W5GgoijeZMbHVOk
brTHAiaTtLhjL/SxVl9uOhHGinDMvg5onAi2doQUD3E35jAl442hTeqGXDiQa0N6
PpVMG1wNEPvzmaBKEWohS/F4thdOuXIaADYsqP4E6xSlm6qMjvjun0wHI/RtSxMg
xsvQy3nR1tpHxlygWV0VNr7IYNNqPSQGEnTsbu28H7/HKO4OpjgHgnpD9AumYnzh
SRPBBoGEc/L+QaY03uKLCJMKJKGzga/HSndgHRkPWKlkTNQ7NjVZdDlPwK6DnWmq
Vwy43aRNxr0oAMAPQN0pDXr5SgJJBluIiAU9tAnGIyZIfZdV35pTWXiEag12XteO
lLH20ZMzsLOLyHP2EFmTACJ2Go20DhJQshqs8nUN91SARSXu2yoYvZ7T+uUJ1AOe
yzMYsB1dRmNJ85HvAySAVg2RGE5V2zS/Rw7IogqHIfegc2x267Y=
=wAhS
-----END PGP SIGNATURE-----

--1vAVykUMq/nXt3p/--




Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 17:03:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 13:03:06 2021
Received: from localhost ([127.0.0.1]:41541 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTp6X-0004t0-Us
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 13:03:06 -0400
Received: from mail-pf1-f179.google.com ([209.85.210.179]:39901)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.legoll@HIDDEN>) id 1lTp6W-0004sV-8U
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 13:03:04 -0400
Received: by mail-pf1-f179.google.com with SMTP id c17so10866186pfn.6
 for <47615 <at> debbugs.gnu.org>; Tue, 06 Apr 2021 10:03:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=k/G3o4vhtXEcJOLOES+Sc2r3qLjYpnAeOjtUUGEOeG4=;
 b=fb67myD4UklePhGEyP0OenGBnSezu+VVnQZ7hvkxv9Kc/KfM1aedOD7EfKmjQGFF3X
 RioyOByOYR/7qUGBloqv+aotpGtBV2IKLAdo5nxfqri3Rp4ODIYY6bSvL8WGH8ii7Z48
 LagRUxQdLoeQyWjmfyearK6E26becmPyAdK++2s8d7DAbC9nvxu3DXcuR8AL7a3sFd6O
 jpanptyMKgXF3y8W50NPKXNu/HphFPvuJN1Ljkj/vqvLwlN+K578eyiQoENyK100Rz0J
 Lvu8KbNL+WzFUDoZOFiGTDulkluwBYtcxuSfzKol0RhWhcvynFHOSKEseOkSjyOeCeqx
 O9Gg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=k/G3o4vhtXEcJOLOES+Sc2r3qLjYpnAeOjtUUGEOeG4=;
 b=hxRO1KmKuX52qrrlfwRD11nMxCj19PyJaS6Kg/qNHNPgPvdxlt0PHB6ax12r1dmaOY
 QTDLYDD/EBj3gto7+iPnpFSJU+p4/qqKLBnLft43OPKNmsitD7Nj2GIV293OUhmrbV26
 vKj7aaVh6DlHCL0SmD0XpurVNWy3vFMQ6doBH8lLsJucoURfS2vNi9gdQ0VHwEYS27Ke
 wc3q5XNOv98/pyPoRQtFfiwilL/AHzwycjCAIKLt6evAAY+gz6qeRb+n0ELlCOWjrfdG
 QmIKW/1hKTDgWLSST2p8OpbKLPcfeTUngX1AMcBnXqLsIrwL+7N3+04KyM1hFKqxQfww
 ny3A==
X-Gm-Message-State: AOAM533++9QhKmOKHgsNKAhUEvtCzJLjPW/GqBq9sccM50SOWN5TO0m+
 XDIKb5ba+X9mGRr74gpdzIieXnhekAeV9WsOH+k=
X-Google-Smtp-Source: ABdhPJyC12ayEiqC4vad2dKIX3bN6g3y7eCLCbzTHSQAp5emSxnc/i1ob/sMk6OOm69JWlDmYabjqNK5empNs0MyCvc=
X-Received: by 2002:a63:eb49:: with SMTP id b9mr18596725pgk.318.1617728578352; 
 Tue, 06 Apr 2021 10:02:58 -0700 (PDT)
MIME-Version: 1.0
References: <cover.1617711307.git.efraim@HIDDEN>
 <9f9bc5d3686731bf30c72c821f0b5a54c66843aa.1617711307.git.efraim@HIDDEN>
In-Reply-To: <9f9bc5d3686731bf30c72c821f0b5a54c66843aa.1617711307.git.efraim@HIDDEN>
From: Vincent Legoll <vincent.legoll@HIDDEN>
Date: Tue, 6 Apr 2021 19:02:47 +0200
Message-ID: <CAEwRq=qyBemm_8eqV2_Pr8wFKAb1hRK2aKwDw_qhds0ZN5vy4w@HIDDEN>
Subject: Re: [PATCH 7/9] build: qemu-command: Add support for powerpc.
To: Efraim Flashner <efraim@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: guix-devel <guix-devel@HIDDEN>, 47615 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

On Tue, Apr 6, 2021 at 2:44 PM Efraim Flashner <efraim@HIDDEN> wrote:
> +                    ((string-match "powerpc" cpu) "ppc")

Won't there be some "powerpc64le" conflict here ?

-- 
Vincent Legoll




Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 17:01:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 13:01:08 2021
Received: from localhost ([127.0.0.1]:41537 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTp4e-0004q7-I6
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 13:01:08 -0400
Received: from mail-pl1-f176.google.com ([209.85.214.176]:41881)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <vincent.legoll@HIDDEN>) id 1lTp4d-0004pe-CT
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 13:01:07 -0400
Received: by mail-pl1-f176.google.com with SMTP id g10so7839055plt.8
 for <47615 <at> debbugs.gnu.org>; Tue, 06 Apr 2021 10:01:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=It7i8iwyTmospnbBLvz88SUV43fNcvxejArMOkyT3uw=;
 b=C9/ObG24sptUxh4gP4d8Y4bhx4Gfs7037qua9HNyPb1M8wT7Oe42fNvQkioqQdk5FB
 1+iIsPT8KI4cm839CvP8k6k1rjB4B1rCV14O3xH63ZXYuVgfpNgxwGTnak8yzAO1nYQP
 5Sznxmv42d6DYwWaLzfBo5O2plau8HIuR0Ytybp+yAU9VS+y3WxX3knA+WoN3PHr/FkY
 UwU5RPHCW46FUzzbTSwS5gxyaAIIlv6LKol7TPi8cXO9Aw0NOsKnYeoiMqhkEp7fwM+3
 5z9mqNbSmKcP0X3NmgGPfGGWD5zJBfGE0ZehvLaNOCn+7qqxDVf0lAkEvgGcJ3gFv7u3
 OZqQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=It7i8iwyTmospnbBLvz88SUV43fNcvxejArMOkyT3uw=;
 b=dkiIB/vwF3XBsFMXLy9TpMh8GVCPlXdwedG93Y6Mlkp1ajyQ9SYObODv+csz3JXbos
 355gLIPsJB/GkI/ue4DeQzpmowwF5ovVVx4RtVSWEjae0fNp3n2sWm1GaQPeSprAE89G
 uWgqc+wKw3HmdwCQPHSs68AWikusF/4pr+sIk40e/wgSNIg6194gzhV0p7eE8uPYupI9
 He0SjjDAehGLcdvDERjXbA/Q/K52lgfMAEEg7YrozKHbpwI3FNN3St2ymlaz5pOsWHek
 jiOll84rl8Rxgy5DplPSlKCdK5vrccSigtafADm08pmUE/h1cNOih6MJN8yPMU+WtYc3
 nLAQ==
X-Gm-Message-State: AOAM530E7gl1Q3dl62Lw73tjbLtIu7R7yI8vW88Codexdp74itr9On26
 XXppMY3EZNDtLd5xF0Htx8AVXaphxp8WwHGtSn0=
X-Google-Smtp-Source: ABdhPJx0REfmhXyTiiWCcF7HGGHFOkxEmPKtKJgIsznGfRgNONpMFAV4QP1fTIHIC6eZcUiryieKPjhdxB9jA3yrA1Y=
X-Received: by 2002:a17:902:9304:b029:e6:8d24:b5ce with SMTP id
 bc4-20020a1709029304b02900e68d24b5cemr29003685plb.27.1617728461437; Tue, 06
 Apr 2021 10:01:01 -0700 (PDT)
MIME-Version: 1.0
References: <cover.1617711307.git.efraim@HIDDEN>
 <b0b76cdac4e9147105b1613fbb69707b8de5366a.1617711307.git.efraim@HIDDEN>
In-Reply-To: <b0b76cdac4e9147105b1613fbb69707b8de5366a.1617711307.git.efraim@HIDDEN>
From: Vincent Legoll <vincent.legoll@HIDDEN>
Date: Tue, 6 Apr 2021 19:00:50 +0200
Message-ID: <CAEwRq=pkXrQnxKJMqw9bDm4xiWQPski-2K8AoOPkR23shvXysA@HIDDEN>
Subject: Re: [PATCH 9/9] gnu: nss: Skip tests on powerpc-linux.
To: Efraim Flashner <efraim@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: guix-devel <guix-devel@HIDDEN>, 47615 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

On Tue, Apr 6, 2021 at 2:44 PM Efraim Flashner <efraim@HIDDEN> wrote:
> +         ;; Tests on powerpc-linux take forever and fail sporatically.

s/sporatically/sporadically/

-- 
Vincent Legoll




Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 12:38:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 08:38:06 2021
Received: from localhost ([127.0.0.1]:39494 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTky2-00040H-0a
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:38:06 -0400
Received: from flashner.co.il ([178.62.234.194]:45608)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTky0-0003zs-KM
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:38:01 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id E4A784024A;
 Tue,  6 Apr 2021 12:37:54 +0000 (UTC)
From: Efraim Flashner <efraim@HIDDEN>
To: 47615 <at> debbugs.gnu.org,
	guix-devel@HIDDEN
Subject: [PATCH 9/9] gnu: nss: Skip tests on powerpc-linux.
Date: Tue,  6 Apr 2021 15:32:53 +0300
Message-Id: <b0b76cdac4e9147105b1613fbb69707b8de5366a.1617711307.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.31.1
In-Reply-To: <cover.1617711307.git.efraim@HIDDEN>
References: <cover.1617711307.git.efraim@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: Efraim Flashner <efraim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/nss.scm (nss)[arguments]: Skip tests on powerpc-linux.
---
 gnu/packages/nss.scm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/nss.scm b/gnu/packages/nss.scm
index e054363e9f..954a1d3b80 100644
--- a/gnu/packages/nss.scm
+++ b/gnu/packages/nss.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@HIDDEN>
 ;;; Copyright © 2014, 2015, 2016, 2017, 2018, 2019 Mark H Weaver <mhw@HIDDEN>
-;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@HIDDEN>
+;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@HIDDEN>
 ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice <me@HIDDEN>
 ;;; Copyright © 2020 Marius Bakke <mbakke@HIDDEN>
 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@HIDDEN>
@@ -109,7 +109,10 @@ in the Mozilla clients.")
        ;; Parallel builds are not supported (see:
        ;; https://bugzilla.mozilla.org/show_bug.cgi?id=1640328).
        `(#:parallel-build? #f
-         #:tests? #t                   ;requires at least one hour to run
+         ;; Tests on powerpc-linux take forever and fail sporatically.
+         #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
+                                                     (%current-target-system)))
+                     '#f '#t)
          #:make-flags
          (let* ((out (assoc-ref %outputs "out"))
                 (nspr (string-append (assoc-ref %build-inputs "nspr")))
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 12:37:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 08:37:30 2021
Received: from localhost ([127.0.0.1]:39490 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTkxV-0003zK-MX
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:37:29 -0400
Received: from flashner.co.il ([178.62.234.194]:45604)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTkxU-0003z8-21
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:37:28 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id 4FDCF402D4;
 Tue,  6 Apr 2021 12:37:22 +0000 (UTC)
From: Efraim Flashner <efraim@HIDDEN>
To: 47615 <at> debbugs.gnu.org,
	guix-devel@HIDDEN
Subject: [PATCH 8/9] gnu: mercurial: Skip tests on powerpc-linux.
Date: Tue,  6 Apr 2021 15:32:52 +0300
Message-Id: <7e40c580cc4efc7627696e517bc338d38d4405b5.1617711307.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.31.1
In-Reply-To: <cover.1617711307.git.efraim@HIDDEN>
References: <cover.1617711307.git.efraim@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: Efraim Flashner <efraim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/version-control.scm (mercurial)[arguments]: Skip tests on
powerpc-linux.
---
 gnu/packages/version-control.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 4d4b276a10..13e2ccd400 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -1688,7 +1688,11 @@ execution of any hook written in any language before every commit.")
                          "--slowtimeout" "86400"
                          ;; The test suite takes a long time and produces little
                          ;; output by default.  Prevent timeouts due to silence.
-                         "-v"))))))))
+                         "-v"))))))
+       ;; Tests on powerpc-linux take more than 10 hours.
+       #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
+                                                   (%current-target-system)))
+                   '#f '#t)))
     ;; The following inputs are only needed to run the tests.
     (native-inputs
      `(("python-nose" ,python-nose)
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 12:36:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 08:36:56 2021
Received: from localhost ([127.0.0.1]:39484 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTkwy-0003xx-Ce
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:36:56 -0400
Received: from flashner.co.il ([178.62.234.194]:45596)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTkwx-0003xk-H6
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:36:55 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id D2039402D4;
 Tue,  6 Apr 2021 12:36:49 +0000 (UTC)
From: Efraim Flashner <efraim@HIDDEN>
To: 47615 <at> debbugs.gnu.org,
	guix-devel@HIDDEN
Subject: [PATCH 7/9] build: qemu-command: Add support for powerpc.
Date: Tue,  6 Apr 2021 15:32:51 +0300
Message-Id: <9f9bc5d3686731bf30c72c821f0b5a54c66843aa.1617711307.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.31.1
In-Reply-To: <cover.1617711307.git.efraim@HIDDEN>
References: <cover.1617711307.git.efraim@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: Efraim Flashner <efraim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/build/vm.scm (qemu-command): Add missing case for powerpc.
---
 gnu/build/vm.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 253d9bcd31..a2c2d79bb9 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -75,6 +75,7 @@
                    (cond
                     ((string-match "^i[3456]86$" cpu) "i386")
                     ((string-match "armhf" cpu) "arm")
+                    ((string-match "powerpc" cpu) "ppc")
                     (else cpu)))))
 
 (define* (load-in-linux-vm builder
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 12:36:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 08:36:25 2021
Received: from localhost ([127.0.0.1]:39481 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTkwT-0003xB-2Z
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:36:25 -0400
Received: from flashner.co.il ([178.62.234.194]:45590)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTkwR-0003wy-6C
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:36:23 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id 55F234024A;
 Tue,  6 Apr 2021 12:36:17 +0000 (UTC)
From: Efraim Flashner <efraim@HIDDEN>
To: 47615 <at> debbugs.gnu.org,
	guix-devel@HIDDEN
Subject: [PATCH 6/9] gnu: american-fuzzy-lop: Add support for powerpc-linux.
Date: Tue,  6 Apr 2021 15:32:50 +0300
Message-Id: <26d9929a7c41d1c614dc2cc7fd082976c9f42b64.1617711307.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.31.1
In-Reply-To: <cover.1617711307.git.efraim@HIDDEN>
References: <cover.1617711307.git.efraim@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: Efraim Flashner <efraim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/debug.scm (american-fuzzy-lop): Add case for
powerpc-linux.
(qemu-for-american-fuzzy-lop): Same.
---
 gnu/packages/debug.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 2913c348f3..1326ce6e16 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -179,6 +179,7 @@ tools that process C/C++ code.")
                    ("aarch64-linux"  "aarch64")
                    ("armhf-linux"    "arm")
                    ("mips64el-linux" "mips64el")
+                   ("powerpc-linux"  "ppc")
                    ;; Prevent errors when querying this package on unsupported
                    ;; platforms, e.g. when running "guix package --search="
                    (_                "UNSUPPORTED"))))
@@ -254,6 +255,7 @@ down the road.")
                    ("aarch64-linux"  "aarch64")
                    ("armhf-linux"    "arm")
                    ("mips64el-linux" "mips64el")
+                   ("powerpc-linux"  "ppc")
                    ;; Prevent errors when querying this package on unsupported
                    ;; platforms, e.g. when running "guix package --search="
                    (_                "UNSUPPORTED"))))
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 12:36:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 08:36:08 2021
Received: from localhost ([127.0.0.1]:39477 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTkw0-0003w6-5X
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:36:07 -0400
Received: from flashner.co.il ([178.62.234.194]:45580)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTkvu-0003vo-Jj
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:35:55 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id 24C044024A;
 Tue,  6 Apr 2021 12:35:44 +0000 (UTC)
From: Efraim Flashner <efraim@HIDDEN>
To: 47615 <at> debbugs.gnu.org,
	guix-devel@HIDDEN
Subject: [PATCH 5/9] gnu: Add mac-fdisk.
Date: Tue,  6 Apr 2021 15:32:49 +0300
Message-Id: <704d44c4cb94b28a4a6d832296a602eb6ad4e711.1617711307.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.31.1
In-Reply-To: <cover.1617711307.git.efraim@HIDDEN>
References: <cover.1617711307.git.efraim@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: Efraim Flashner <efraim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/disk.scm (mac-fdisk): New variable.
* gnu/packages/patches/mac-fdisk-gentoo-patchset.patch,
gnu/packages/patches/mac-fdisk-p18.patch: New files.
* gnu/local.mk (dist_patch_DATA): Register them.
---
 gnu/local.mk                                  |    2 +
 gnu/packages/disk.scm                         |   44 +
 .../patches/mac-fdisk-gentoo-patchset.patch   |  866 +++++++
 gnu/packages/patches/mac-fdisk-p18.patch      | 2070 +++++++++++++++++
 4 files changed, 2982 insertions(+)
 create mode 100644 gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
 create mode 100644 gnu/packages/patches/mac-fdisk-p18.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ce0a79fb4d..4545cd0a7f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1374,6 +1374,8 @@ dist_patch_DATA =						\
   %D%/packages/patches/luit-posix.patch				\
   %D%/packages/patches/lvm2-static-link.patch			\
   %D%/packages/patches/mailutils-fix-uninitialized-variable.patch	\
+  %D%/packages/patches/mac-fdisk-gentoo-patchset.patch		\
+  %D%/packages/patches/mac-fdisk-p18.patch			\
   %D%/packages/patches/make-impure-dirs.patch			\
   %D%/packages/patches/mars-install.patch			\
   %D%/packages/patches/mars-sfml-2.3.patch			\
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index ed112f2ec2..ce49f493ea 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -302,6 +302,50 @@ fdisk.  fdisk is used for the creation and manipulation of disk partition
 tables, and it understands a variety of different formats.")
     (license license:gpl3+)))
 
+(define-public mac-fdisk
+  (package
+    (name "mac-fdisk")
+    (version "0.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (string-append "mirror://debian/pool/main/m/mac-fdisk/"
+                            "mac-fdisk_" version ".orig.tar.gz"))
+        (sha256
+         (base32 "0rkaqp82l47pg0ymqys07mljf3widv2yk4hhgs2yz8hwli5zqnbh"))
+        (patches (search-patches "mac-fdisk-p18.patch"
+                                 "mac-fdisk-gentoo-patchset.patch"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)        ; no configure script.
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out  (assoc-ref outputs "out"))
+                    (sbin (string-append out "/sbin"))
+                    (man8 (string-append out "/share/man/man8")))
+               (mkdir-p sbin)
+               (mkdir-p man8)
+               (copy-file "fdisk" (string-append sbin "/mac-fdisk"))
+               (copy-file "pdisk" (string-append sbin "/pmac-fdisk"))
+               (copy-file "mac-fdisk.8.in" (string-append man8 "/mac-fdisk.8"))
+               (copy-file "pmac-fdisk.8.in" (string-append man8 "/pmac-fdisk.8"))
+               #t))))
+       #:make-flags (list "CC=gcc")
+       #:tests? #f))                ; no tests
+    (home-page "https://tracker.debian.org/pkg/mac-fdisk")
+    (synopsis "Apple disk partition manipulation tool")
+    (description "The @code{fdisk} utilities from the MkLinux project, adopted
+for Linux/m68k.  @code{mac-fdisk} allows you to create and edit the partition
+table of a disk.  It supports only the Apple partition format used on Macintosh
+and PowerMac, use @code{pmac-fdisk} for PC partition format disks as used on
+PowerPC machines.  @code{mac-fdisk} is an interactive tool with a menu similar
+to PC @code{fdisk}, supported options are somewhat different from PC
+@code{fdisk} due to the differences in partition format.")
+    (supported-systems '("powerpc-linux" "i686-linux" "x86_64-linux"))
+    (license license:gpl2)))
+
 (define-public gptfdisk
   (package
     (name "gptfdisk")
diff --git a/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch b/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
new file mode 100644
index 0000000000..b1bd38f671
--- /dev/null
+++ b/gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
@@ -0,0 +1,866 @@
+https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-fs/mac-fdisk/files
+
+---
+ bitfield.c      | 16 +++++-----
+ bitfield.h      |  4 +--
+ dump.c          | 42 ++++++++++++--------------
+ errors.c        | 11 ++++---
+ fdisk.c         | 68 ++++++++++++++++++++++++++++++++++++++----
+ fdisk.h         |  5 ++++
+ fdisklabel.c    | 79 +++++++++++++++++++++++++++----------------------
+ fdisklabel.h    |  2 +-
+ io.c            |  8 +++--
+ kernel-defs.h   |  6 ++++
+ partition_map.c | 43 ++++++++++++++++-----------
+ pdisk.c         |  7 ++---
+ 12 files changed, 186 insertions(+), 105 deletions(-)
+
+diff --git a/bitfield.c b/bitfield.c
+index 687e8bd..02e7f68 100644
+--- a/bitfield.c
++++ b/bitfield.c
+@@ -67,13 +67,12 @@ const unsigned long masks[] = {
+ //
+ // Routines
+ //
+-unsigned long
+-bitfield_set(unsigned long *bf, int base, int length, unsigned long value)
++unsigned int
++bitfield_set(unsigned int *bf, int base, int length, unsigned int value)
+ {
+-    unsigned long t;
+-    unsigned long m;
++    unsigned int t;
++    unsigned int m;
+     int s;
+-    int i;
+ 
+     // compute shift & mask, coerce value to correct number of bits,
+     // zap the old bits and stuff the new value
+@@ -86,12 +85,11 @@ bitfield_set(unsigned long *bf, int base, int length, unsigned long value)
+ }
+ 
+ 
+-unsigned long
+-bitfield_get(unsigned long bf, int base, int length)
++unsigned int
++bitfield_get(unsigned int bf, int base, int length)
+ {
+-    unsigned long m;
++    unsigned int m;
+     int s;
+-    int i;
+ 
+     // compute shift & mask
+     // return the correct number of bits (shifted to low end)
+diff --git a/bitfield.h b/bitfield.h
+index ff56759..abfdf05 100644
+--- a/bitfield.h
++++ b/bitfield.h
+@@ -63,5 +63,5 @@
+ //
+ // Forward declarations
+ //
+-unsigned long bitfield_set(unsigned long *bf, int base, int length, unsigned long value);
+-unsigned long bitfield_get(unsigned long bf, int base, int length);
++unsigned int bitfield_set(unsigned int *bf, int base, int length, unsigned int value);
++unsigned int bitfield_get(unsigned int bf, int base, int length);
+diff --git a/dump.c b/dump.c
+index 4153dc5..edeeb31 100644
+--- a/dump.c
++++ b/dump.c
+@@ -30,10 +30,8 @@
+  */
+ 
+ #include <stdio.h>
+-#ifndef __linux__
+ #include <stdlib.h>
+ #include <unistd.h>
+-#endif
+ #include <string.h>
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -63,16 +61,16 @@ typedef struct names {
+ // Global Constants
+ //
+ NAMES plist[] = {
+-    "Drvr", "Apple_Driver",
+-    "Dr43", "Apple_Driver43",
+-    "Free", "Apple_Free",
+-    " HFS", "Apple_HFS",
+-    " MFS", "Apple_MFS",
+-    "PDOS", "Apple_PRODOS",
+-    "junk", "Apple_Scratch",
+-    "unix", "Apple_UNIX_SVR2",
+-    " map", "Apple_partition_map",
+-    0,	0
++    {"Drvr"}, {"Apple_Driver"},
++    {"Dr43"}, {"Apple_Driver43"},
++    {"Free"}, {"Apple_Free"},
++    {" HFS"}, {"Apple_HFS"},
++    {" MFS"}, {"Apple_MFS"},
++    {"PDOS"}, {"Apple_PRODOS"},
++    {"junk"}, {"Apple_Scratch"},
++    {"unix"}, {"Apple_UNIX_SVR2"},
++    {" map"}, {"Apple_partition_map"},
++    {0},	{0}
+ };
+ 
+ const char * kStringEmpty	= "";
+@@ -164,10 +162,10 @@ dump_partition_map(partition_map_header *map, int disk_order)
+     }
+ #ifdef __mc68000__
+     printf("%*s  type name         "
+-	    "%*s   %-*s ( size )  system\n", strlen(map->name)+1, "#", j, "length", j, "base");
++	    "%*s   %-*s ( size )  system\n", (int)strlen(map->name)+1, "#", j, "length", j, "base");
+ #else
+     printf("%*s                    type name               "
+-	    "%*s   %-*s ( size )  system\n", strlen(map->name)+1, "#", j, "length", j, "base");
++	    "%*s   %-*s ( size )  system\n", (int)strlen(map->name)+1, "#", j, "length", j, "base");
+ #endif
+ 
+     /* Grok devfs names. (courtesy Colin Walters)*/
+@@ -201,7 +199,6 @@ dump_partition_entry(partition_map *entry, int digits, char *dev)
+     partition_map_header *map;
+     int j;
+     DPME *p;
+-    BZB *bp;
+     char *s;
+ #ifdef __mc68000__
+     int aflag = 1;
+@@ -224,13 +221,13 @@ dump_partition_entry(partition_map *entry, int digits, char *dev)
+ 	    }
+ 	}
+ #ifdef __mc68000__
+-	printf("%s%-2d %.4s %-12.12s ", dev, entry->disk_address, s, p->dpme_name);
++	printf("%s%-2d %.4s %-12.12s ", dev, (int)entry->disk_address, s, p->dpme_name);
+ #else
+-	printf("%s%-4d  %.4s %-18.32s ", dev, entry->disk_address, s, p->dpme_name);
++	printf("%s%-4d  %.4s %-18.32s ", dev, (int)entry->disk_address, s, p->dpme_name);
+ #endif
+     } else {
+ 	printf("%s%-4d %20.32s %-18.32s ", dev, 
+-		entry->disk_address, p->dpme_type, p->dpme_name);
++		(int)entry->disk_address, p->dpme_type, p->dpme_name);
+     }
+ 
+     if (pflag) {
+@@ -314,7 +311,6 @@ list_all_disks()
+     int i;
+     int fd;
+     DPME * data;
+-    long t;
+ 
+     data = (DPME *) malloc(PBLOCK_SIZE);
+     if (data == NULL) {
+@@ -382,7 +378,7 @@ show_data_structures(partition_map_header *map)
+     printf("Header:\n");
+     printf("fd=%d (%s)\n", map->fd, (map->regular_file)?"file":"device");
+     printf("map %d blocks out of %d,  media %u blocks\n",
+-	    map->blocks_in_map, map->maximum_in_map, map->media_size);
++	    map->blocks_in_map, map->maximum_in_map, (unsigned int)map->media_size);
+     printf("Map is%s writeable", (map->writeable)?kStringEmpty:kStringNot);
+     printf(", but%s changed\n", (map->changed)?kStringEmpty:kStringNot);
+     printf("\n");
+@@ -426,7 +422,7 @@ u32     dpme_reserved_3[62]     ;
+     for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) {
+ 	p = entry->data;
+ 	printf("%2d: %20.32s ",
+-		entry->disk_address, p->dpme_type);
++		(int)entry->disk_address, p->dpme_type);
+ 	printf("%7u @ %-7u ", p->dpme_pblocks, p->dpme_pblock_start);
+ 	printf("%c%c%c%c%c%c%c%c%c%c ",
+ 		(dpme_valid_get(p))?'V':'v',
+@@ -449,7 +445,7 @@ u32     dpme_reserved_3[62]     ;
+ 	    "goto_address checksum processor\n");
+     for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) {
+ 	p = entry->data;
+-	printf("%2d: ", entry->disk_address);
++	printf("%2d: ", (int)entry->disk_address);
+ 	printf("%7u ", p->dpme_boot_block);
+ 	printf("%7u ", p->dpme_boot_bytes);
+ 	printf("%8x ", p->dpme_load_addr);
+@@ -466,7 +462,7 @@ xx: cccc RU *dd s...
+ */
+     for (entry = map->disk_order; entry != NULL; entry = entry->next_on_disk) {
+ 	p = entry->data;
+-	printf("%2d: ", entry->disk_address);
++	printf("%2d: ", (int)entry->disk_address);
+ 
+ 	bp = (BZB *) (p->dpme_bzb);
+ 	j = -1;
+diff --git a/errors.c b/errors.c
+index 47c9c30..4e9e486 100644
+--- a/errors.c
++++ b/errors.c
+@@ -26,12 +26,11 @@
+  */
+ 
+ #include <stdio.h>
+-#ifndef __linux__
+ #include <stdlib.h>
+-#endif
+ #include <string.h>
+ #include <stdarg.h>
+ 
++#include <errno.h>
+ #include "errors.h"
+ #include "pdisk.h"
+ 
+@@ -115,8 +114,8 @@ fatal(int value, char *fmt, ...)
+     va_end(ap);
+ 
+ #ifdef __linux__
+-    if (value > 0 && value < sys_nerr) {
+-	fprintf(stderr, "  (%s)\n", sys_errlist[value]);
++    if (value > 0 && value < errno) {
++	fprintf(stderr, "  (%s)\n", strerror(value));
+     } else {
+ 	fprintf(stderr, "\n");
+     }
+@@ -144,8 +143,8 @@ error(int value, char *fmt, ...)
+     va_end(ap);
+ 
+ #ifdef __linux__
+-    if (value > 0 && value < sys_nerr) {
+-	fprintf(stderr, "  (%s)\n", sys_errlist[value]);
++    if (value > 0 && value < errno) {
++	fprintf(stderr, "  (%s)\n", strerror(value));
+     } else {
+ 	fprintf(stderr, "\n");
+     }
+diff --git a/fdisk.c b/fdisk.c
+index d77619b..dec19ae 100644
+--- a/fdisk.c
++++ b/fdisk.c
+@@ -59,9 +59,14 @@
+  */
+ 
+ 
++#ifndef _LARGEFILE64_SOURCE
++#define _LARGEFILE64_SOURCE
++#endif
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <setjmp.h>
+@@ -70,12 +75,65 @@
+ 
+ #include <sys/ioctl.h>
+ 
+-typedef unsigned short kdev_t;	/* BAD hack; kdev_t is not exported */
+-
+ #include "kernel-defs.h"
+ 
+ #include "fdisk.h"
+ 
++/* ----------- */
++#define _PPC64_TYPES_H
++#define BITS_PER_LONG 64
++
++typedef __signed__ char __s8;
++typedef signed char s8;
++typedef unsigned char u8;
++typedef unsigned char __u8;
++
++typedef __signed__ short __s16;
++typedef signed short s16;
++/*typedef unsigned short __u16;*/
++typedef unsigned short u16;
++
++typedef __signed__ int __s32;
++typedef signed int s32;
++/*typedef unsigned int __u32;*/
++typedef unsigned int u32;
++
++typedef __signed__ long __s64;
++typedef signed long s64;
++typedef unsigned long __u64;
++typedef unsigned long u64;
++
++typedef struct {
++        __u32 u[4];
++} __attribute((aligned(16))) __vector128;
++
++typedef __vector128 vector128;
++
++typedef u32 dma_addr_t;
++typedef u64 dma64_addr_t;
++
++typedef struct {
++        unsigned long entry;
++        unsigned long toc;
++        unsigned long env;
++} func_descr_t;
++
++typedef unsigned int umode_t;
++
++#define BITS_TO_LONGS(bits) \
++        (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
++#define DECLARE_BITMAP(name,bits) \
++        unsigned long name[BITS_TO_LONGS(bits)]
++#define CLEAR_BITMAP(name,bits) \
++        memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
++
++/* hd/ide ctl's that pass (arg) ptrs to user space are numbered 0x030n/0x031n */
++#define HDIO_GETGEO             0x0301  /* get device geometry */
++
++#define BLKRRPART  _IO(0x12,95) /* re-read partition table */
++
++/* ---------- */
++
+ #define hex_val(c)	({ \
+ 				char _c = (c); \
+ 				isdigit(_c) ? _c - '0' : \
+@@ -192,10 +250,10 @@ char read_char(char *mesg);
+ 
+ jmp_buf listingbuf;
+ 
+-inline unsigned short __swap16(unsigned short x) {
++static inline unsigned short __swap16(unsigned short x) {
+ 	return (((__u16)(x) & 0xFF) << 8) | (((__u16)(x) & 0xFF00) >> 8);
+ }
+-inline __u32 __swap32(__u32 x) {
++static inline __u32 __swap32(__u32 x) {
+ 	return (((__u32)(x) & 0xFF) << 24) | (((__u32)(x) & 0xFF00) << 8) | (((__u32)(x) & 0xFF0000) >> 8) | (((__u32)(x) & 0xFF000000) >> 24);
+ }
+ 
+@@ -1415,7 +1473,7 @@ void try(char *device)
+ 	}
+ }
+ 
+-void main(int argc, char **argv)
++int main(int argc, char **argv)
+ {
+ 	if (argc > 3)
+ 		fatal(usage);
+diff --git a/fdisk.h b/fdisk.h
+index 2b6ddc8..0a0566d 100644
+--- a/fdisk.h
++++ b/fdisk.h
+@@ -2,6 +2,11 @@
+    fdisk.h
+ */
+ 
++#ifdef __linux__
++#define _FILE_OFFSET_BITS 64
++#define _LARGE_FILES
++#endif
++
+ #define SECTOR_SIZE	512
+ #define NETBSD_PARTITION 0xa5
+ #define cround(n)	(((n) + display_factor * unit_flag) / display_factor)
+diff --git a/fdisklabel.c b/fdisklabel.c
+index 70c3cfa..7622bc2 100644
+--- a/fdisklabel.c
++++ b/fdisklabel.c
+@@ -35,9 +35,14 @@
+    SUCH DAMAGE.
+ */
+ 
++#ifndef _LARGEFILE64_SOURCE
++#define _LARGEFILE64_SOURCE
++#endif
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <setjmp.h>
+@@ -46,6 +51,8 @@
+ #include <sys/ioctl.h>
+ #include <sys/param.h>
+ 
++#include <asm/types.h>
++
+ #include "kernel-defs.h"
+ 
+ #include "fdisk.h"
+@@ -68,7 +75,7 @@ static int bsd_initlabel  (struct partition *p, struct disklabel *d, int pindex)
+ static int bsd_readlabel  (struct partition *p, struct disklabel *d);
+ static int bsd_writelabel (struct partition *p, struct disklabel *d);
+ static void sync_disks (void);
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ static int bsd_translate_fstype (int linux_type);
+ static void bsd_link_part (void);
+ #endif
+@@ -78,7 +85,7 @@ void alpha_bootblock_checksum (char *boot);
+ 
+ static struct disklabel bsd_dlabel;
+ static char buffer[BSD_BBSIZE];
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ static struct partition *bsd_part;
+ static int bsd_part_index;
+ #endif
+@@ -95,13 +102,13 @@ bmenu (void)
+ 	"   n   add a new BSD partition\n"
+ 	"   p   print BSD partition table\n"
+ 	"   q   quit without saving changes\n"
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ 	"   r   return to main menu\n"
+ #endif
+ 	"   s   show complete disklabel\n"
+ 	"   t   change a partition's filesystem id\n"
+ 	"   w   write disklabel to disk\n"
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ 	"   x   link BSD partition to non-BSD partition"
+ #endif
+ 	);
+@@ -110,7 +117,7 @@ bmenu (void)
+ void
+ bselect (void)
+ {
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+   int t;
+ 
+   for (t=0; t<4; t++)
+@@ -181,7 +188,7 @@ bselect (void)
+       case 'w':
+ 	bsd_write_disklabel ();
+ 	break;
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+       case 'r':
+ 	return;
+       case 'x':
+@@ -219,7 +226,7 @@ bsd_new_part (void)
+   if (!bsd_check_new_partition (&i))
+     return;
+ 
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+   begin = bsd_part -> start_sect;
+   end = begin + bsd_part -> nr_sects - 1;
+ #elif defined (__alpha__) || defined (__powerpc__)
+@@ -253,7 +260,7 @@ bsd_print_disklabel (int show_all)
+ 
+   if (show_all)
+   {
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+     fprintf(f, "# %s%d:\n", disk_device, bsd_part_index+1);
+ #elif defined (__alpha__) || defined (__powerpc__)
+     fprintf(f, "# %s:\n", disk_device);
+@@ -262,8 +269,8 @@ bsd_print_disklabel (int show_all)
+       fprintf(f, "type: %s\n", bsd_dktypenames[lp->d_type]);
+     else
+       fprintf(f, "type: %d\n", lp->d_type);
+-    fprintf(f, "disk: %.*s\n", sizeof(lp->d_typename), lp->d_typename);
+-    fprintf(f, "label: %.*s\n", sizeof(lp->d_packname), lp->d_packname);
++    fprintf(f, "disk: %.*s\n", (int)sizeof(lp->d_typename), lp->d_typename);
++    fprintf(f, "label: %.*s\n", (int)sizeof(lp->d_packname), lp->d_packname);
+     fprintf(f, "flags:");
+     if (lp->d_flags & BSD_D_REMOVABLE)
+       fprintf(f, " removable");
+@@ -272,17 +279,17 @@ bsd_print_disklabel (int show_all)
+     if (lp->d_flags & BSD_D_BADSECT)
+       fprintf(f, " badsect");
+     fprintf(f, "\n");
+-    fprintf(f, "bytes/sector: %d\n", lp->d_secsize);
+-    fprintf(f, "sectors/track: %d\n", lp->d_nsectors);
+-    fprintf(f, "tracks/cylinder: %d\n", lp->d_ntracks);
+-    fprintf(f, "sectors/cylinder: %d\n", lp->d_secpercyl);
+-    fprintf(f, "cylinders: %d\n", lp->d_ncylinders);
++    fprintf(f, "bytes/sector: %d\n", (int)lp->d_secsize);
++    fprintf(f, "sectors/track: %d\n", (int)lp->d_nsectors);
++    fprintf(f, "tracks/cylinder: %d\n", (int)lp->d_ntracks);
++    fprintf(f, "sectors/cylinder: %d\n", (int)lp->d_secpercyl);
++    fprintf(f, "cylinders: %d\n", (int)lp->d_ncylinders);
+     fprintf(f, "rpm: %d\n", lp->d_rpm);
+     fprintf(f, "interleave: %d\n", lp->d_interleave);
+     fprintf(f, "trackskew: %d\n", lp->d_trackskew);
+     fprintf(f, "cylinderskew: %d\n", lp->d_cylskew);
+-    fprintf(f, "headswitch: %d\t\t# milliseconds\n", lp->d_headswitch);
+-    fprintf(f, "track-to-track seek: %d\t# milliseconds\n", lp->d_trkseek);
++    fprintf(f, "headswitch: %d\t\t# milliseconds\n", (int)lp->d_headswitch);
++    fprintf(f, "track-to-track seek: %d\t# milliseconds\n", (int)lp->d_trkseek);
+     fprintf(f, "drivedata: ");
+     for (i = NDDATA - 1; i >= 0; i--)
+       if (lp->d_drivedata[i])
+@@ -290,7 +297,7 @@ bsd_print_disklabel (int show_all)
+     if (i < 0)
+       i = 0;
+     for (j = 0; j <= i; j++)
+-      fprintf(f, "%d ", lp->d_drivedata[j]);
++      fprintf(f, "%d ", (int)lp->d_drivedata[j]);
+   }
+   fprintf (f, "\n%d partitions:\n", lp->d_npartitions);
+   fprintf (f, "#        size   offset    fstype   [fsize bsize   cpg]\n");
+@@ -298,7 +305,7 @@ bsd_print_disklabel (int show_all)
+   for (i = 0; i < lp->d_npartitions; i++, pp++) {
+     if (pp->p_size) {
+       fprintf(f, "  %c: %8d %8d  ", 'a' + i,
+-	      pp->p_size, pp->p_offset);
++	      (int)pp->p_size, (int)pp->p_offset);
+       if ((unsigned) pp->p_fstype < BSD_FSMAXTYPES)
+ 	fprintf(f, "%8.8s", bsd_fstypes[pp->p_fstype].name);
+       else
+@@ -307,12 +314,12 @@ bsd_print_disklabel (int show_all)
+       {
+         case BSD_FS_UNUSED:
+ 	  fprintf(f, "    %5d %5d %5.5s ",
+-		  pp->p_fsize, pp->p_fsize * pp->p_frag, "");
++		  (int)pp->p_fsize, (int)pp->p_fsize * pp->p_frag, "");
+ 	  break;
+ 	  
+ 	case BSD_FS_BSDFFS:
+ 	  fprintf(f, "    %5d %5d %5d ",
+-		  pp->p_fsize, pp->p_fsize * pp->p_frag,
++		  (int)pp->p_fsize, (int)pp->p_fsize * pp->p_frag,
+ 		  pp->p_cpg);
+ 	  break;
+ 	  
+@@ -322,21 +329,21 @@ bsd_print_disklabel (int show_all)
+       }
+       fprintf(f, "\t# (Cyl. %4d",
+ #if 0
+-	      pp->p_offset / lp->d_secpercyl); /* differs from Linux fdisk */
++	      (int)(pp->p_offset / lp->d_secpercyl)); /* differs from Linux fdisk */
+ #else
+-	      pp->p_offset / lp->d_secpercyl + 1);
++	      (int)(pp->p_offset / lp->d_secpercyl + 1));
+ #endif
+       if (pp->p_offset % lp->d_secpercyl)
+ 	putc('*', f);
+       else
+ 	putc(' ', f);
+       fprintf(f, "- %d",
+-	      (pp->p_offset + 
++	      (int)((pp->p_offset + 
+ 	       pp->p_size + lp->d_secpercyl - 1) /
+ #if 0
+-	      lp->d_secpercyl - 1); /* differs from Linux fdisk */
++	      lp->d_secpercyl - 1)); /* differs from Linux fdisk */
+ #else
+-	      lp->d_secpercyl);
++	      lp->d_secpercyl));
+ #endif
+       if (pp->p_size % lp->d_secpercyl)
+ 	putc('*', f);
+@@ -348,7 +355,7 @@ bsd_print_disklabel (int show_all)
+ static void
+ bsd_write_disklabel (void)
+ {
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+   printf ("Writing disklabel to %s%d.\n", disk_device, bsd_part_index+1);
+   bsd_writelabel (bsd_part, &bsd_dlabel);
+ #elif defined (__alpha__) || defined (__powerpc__)
+@@ -362,7 +369,7 @@ bsd_create_disklabel (void)
+ {
+   char c;
+ 
+-#if defined (i386)
++#if defined (i386) || defined(__amd64)
+   fprintf (stderr, "%s%d contains no disklabel.\n",
+ 	   disk_device, bsd_part_index+1);
+ #elif defined (__alpha__) || defined (__powerpc__)
+@@ -372,7 +379,7 @@ bsd_create_disklabel (void)
+   while (1)
+     if ((c = tolower (read_char ("Do you want to create a disklabel? (y/n) "))) == 'y')
+     {
+-#if defined (i386)
++#if defined (i386) || defined(__amd64)
+       if (bsd_initlabel (bsd_part, &bsd_dlabel, bsd_part_index) == 1)
+ #elif defined (__alpha__) || defined (__powerpc__) || defined (__mc68000__)
+       if (bsd_initlabel (NULL, &bsd_dlabel, 0) == 1)
+@@ -503,7 +510,7 @@ bsd_write_bootstrap (void)
+ 
+   bcopy (&dl, d, sizeof (struct disklabel));
+ 
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+   sector = bsd_part -> start_sect;
+ #elif defined (__powerpc__)
+   sector = 0;
+@@ -517,7 +524,7 @@ bsd_write_bootstrap (void)
+   if (BSD_BBSIZE != write (fd, buffer, BSD_BBSIZE))
+     fatal (unable_to_write);
+ 
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+   printf ("Bootstrap installed on %s%d.\n", disk_device, bsd_part_index+1);
+ #elif defined (__alpha__) || defined (__powerpc__)
+   printf ("Bootstrap installed on %s.\n", disk_device);
+@@ -621,7 +628,7 @@ bsd_initlabel (struct partition *p, struct disklabel *d, int pindex)
+   d -> d_subtype = BSD_DSTYPE_INDOSPART & pindex;
+ #endif
+ 
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+   d -> d_flags = BSD_D_DOSPART;
+ #else
+   d -> d_flags = 0;
+@@ -644,7 +651,7 @@ bsd_initlabel (struct partition *p, struct disklabel *d, int pindex)
+   d -> d_bbsize = BSD_BBSIZE;
+   d -> d_sbsize = BSD_SBSIZE;
+ 
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+   d -> d_npartitions = 4;
+   pp = &d -> d_partitions[2]; /* Partition C should be the NetBSD partition */
+   pp -> p_offset = p -> start_sect;
+@@ -670,7 +677,7 @@ bsd_readlabel (struct partition *p, struct disklabel *d)
+ {
+   int t, sector;
+ 
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+   sector = p -> start_sect;
+ #elif defined (__alpha__) || defined (__powerpc__)
+   sector = 0;
+@@ -704,7 +711,7 @@ bsd_writelabel (struct partition *p, struct disklabel *d)
+ {
+   int sector;
+ 
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+   sector = p -> start_sect + BSD_LABELSECTOR;
+ #elif defined (__alpha__) || defined (__powerpc__)
+   sector = BSD_LABELSECTOR;
+@@ -745,7 +752,7 @@ sync_disks (void)
+   sleep (4);
+ }
+ 
+-#if defined (i386)
++#if defined (i386) || defined (__amd64)
+ static int
+ bsd_translate_fstype (int linux_type)
+ {
+diff --git a/fdisklabel.h b/fdisklabel.h
+index a9c4d2e..44cb89f 100644
+--- a/fdisklabel.h
++++ b/fdisklabel.h
+@@ -35,7 +35,7 @@
+ #define	BSD_MAXPARTITIONS 8
+ #define BSD_LINUX_BOOTDIR "/usr/ucb/mdec"
+ 
+-#if defined (i386)
++#if defined (i386) || defined(__amd64)
+ #define BSD_LABELSECTOR   1
+ #define BSD_LABELOFFSET   0
+ #define	BSD_BBSIZE        8192		/* size of boot area, with label */
+diff --git a/io.c b/io.c
+index 0937e29..0ee7873 100644
+--- a/io.c
++++ b/io.c
+@@ -25,16 +25,20 @@
+  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
+  */
+ 
++#define _LARGEFILE64_SOURCE
+ #include <stdio.h>
+-#ifndef __linux__
+ #include <stdlib.h>
+ #include <fcntl.h>
++#ifndef __linux__
+ #include <SCSI.h>
+ #else
+ #ifdef __GLIBC__
+ #include <sys/types.h>
++#include <sys/stat.h>
+ #endif
+ #endif
++#include <linux/unistd.h>
++#include <sys/types.h>
+ #include <unistd.h>
+ #include <string.h>
+ #include <stdarg.h>
+@@ -466,7 +470,7 @@ write_block(int fd, unsigned long num, char *buf)
+     long t;
+ 
+     if (rflag) {
+-	printf("Can't write block %u to file", num);
++	printf("Can't write block %u to file", (unsigned int)num);
+ 	return 0;
+     }
+ #ifndef __linux__
+diff --git a/kernel-defs.h b/kernel-defs.h
+index 5f15fd4..4dd4414 100644
+--- a/kernel-defs.h
++++ b/kernel-defs.h
+@@ -15,8 +15,14 @@ struct hd_geometry {
+ /* from asm/ioctl.h */
+ #define _IOC_NRBITS	8
+ #define _IOC_TYPEBITS	8
++
++#ifndef _IOC_SIZEBITS
+ #define _IOC_SIZEBITS	13
++#endif
++
++#ifndef _IOC_DIRBITS
+ #define _IOC_DIRBITS	3
++#endif
+ 
+ #define _IOC_NRMASK	((1 << _IOC_NRBITS)-1)
+ #define _IOC_TYPEMASK	((1 << _IOC_TYPEBITS)-1)
+diff --git a/partition_map.c b/partition_map.c
+index 6ca2c16..4aaf4b0 100644
+--- a/partition_map.c
++++ b/partition_map.c
+@@ -25,11 +25,15 @@
+  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
+  */
+ 
++//
++// Defines
++//
++// #define TEST_COMPUTE
++
+ #include <stdio.h>
+-#ifndef __linux__
++#include <string.h>
+ #include <stdlib.h>
+ #include <unistd.h>
+-#endif
+ #include <errno.h>
+ 
+ #include <fcntl.h>
+@@ -37,6 +41,10 @@
+ #include <sys/ioctl.h>
+ #include "kernel-defs.h"
+ #include <sys/stat.h>
++#ifdef TEST_COMPUTE
++#include <linux/fs.h>
++#endif
++
+ #endif
+ 
+ #include "partition_map.h"
+@@ -46,10 +54,6 @@
+ #include "errors.h"
+ 
+ 
+-//
+-// Defines
+-//
+-// #define TEST_COMPUTE
+ 
+ 
+ //
+@@ -106,7 +110,6 @@ open_partition_map(char *name, int *valid_file)
+     int fd;
+     partition_map_header * map;
+     int writeable;
+-    unsigned long length;
+ #ifdef __linux__
+     struct stat info;
+ #endif
+@@ -403,9 +406,7 @@ create_partition_map(char *name)
+ {
+     int fd;
+     partition_map_header * map;
+-    unsigned long length;
+     DPME *data;
+-    int ok;
+     unsigned long number;
+ #ifdef __linux__
+     struct stat info;
+@@ -434,13 +435,13 @@ create_partition_map(char *name)
+     map->maximum_in_map = -1;
+ 
+     number = compute_device_size(fd);
+-    printf("size of 'device' is %u blocks: ", number);
++    printf("size of 'device' is %u blocks: ", (unsigned int)number);
+     flush_to_newline(0);
+     get_number_argument("what should be the size? ", (long *)&number, number);
+     if (number < 4) {
+ 	number = 4;
+     }
+-    printf("new size of 'device' is %u blocks\n", number);
++    printf("new size of 'device' is %u blocks\n", (unsigned int)number);
+     map->media_size = number;
+ 
+ #ifdef __linux__
+@@ -670,7 +671,7 @@ compute_device_size(int fd)
+     loff_t pos;
+ #endif
+     char* data;
+-    unsigned long l, r, x;
++    unsigned long long l, r, x;
+     int valid;
+ 
+ #ifdef TEST_COMPUTE
+@@ -724,9 +725,11 @@ compute_device_size(int fd)
+ 	    } else {
+ 		r = r * 2;
+ 	    }
+-	    if (r >= (1024*1024*1024)) {
+-		break;
+-	    }
++// 	    There's no explanation for this, but I suspect the author was trying to
++// 	    prevent going over the 32 bit size
++//	    if (r >= (1024*1024*1024*2)) {
++//		break;
++//	    }
+ 	}
+ 	// binary search for end
+ 	while (l <= r) {
+@@ -744,11 +747,17 @@ compute_device_size(int fd)
+ 	if (valid != 0) {
+ 	    x = x + 1;
+ 	}
+-	// printf("size in blocks = %d\n", x);
++#ifdef TEST_COMPUTE
++	printf("size in blocks = %d\n", x);
++#endif
+ 	free(data);
+     }
++    
++    // Add a warning just in case...
++    if(x > 0x80000000)
++    	printf("Warning: Large disks may not work with this tool!\n");
+ 
+-    return x;
++    return (unsigned long) x;
+ }
+ 
+ 
+diff --git a/pdisk.c b/pdisk.c
+index a9bc629..ec85f6d 100644
+--- a/pdisk.c
++++ b/pdisk.c
+@@ -32,10 +32,11 @@
+ #include <getopt.h>
+ #include <stddef.h>
+ #else
++#include <SIOUX.h>
++#endif
+ #include <stdlib.h>
+ #include <unistd.h>
+-#include <SIOUX.h>
+-#endif
++#include <string.h>
+ #include <errno.h>
+ 
+ #ifdef __linux__
+@@ -436,7 +437,6 @@ do_create_partition(partition_map_header *map, int get_type)
+ {
+     long base;
+     long length;
+-    long mult;
+     char *name;
+     char *type_name;
+ 
+@@ -598,7 +598,6 @@ do_delete_partition(partition_map_header *map)
+ void
+ do_reorder(partition_map_header *map)
+ {
+-    partition_map * cur;
+     long old_index;
+     long index;
+ 
+-- 
+2.26.2
+
diff --git a/gnu/packages/patches/mac-fdisk-p18.patch b/gnu/packages/patches/mac-fdisk-p18.patch
new file mode 100644
index 0000000000..98fbd3a8bf
--- /dev/null
+++ b/gnu/packages/patches/mac-fdisk-p18.patch
@@ -0,0 +1,2070 @@
+This is the result of unzipping the 0.1-18 diff.gz
+https://cdn-aws.deb.debian.org/debian/pool/main/m/mac-fdisk/mac-fdisk_0.1-18.diff.gz
+
+---
+ Makefile             |   9 +-
+ debian/README.debian |  18 +++
+ debian/changelog     | 185 ++++++++++++++++++++++++++++++
+ debian/compat        |   1 +
+ debian/control       |  58 ++++++++++
+ debian/copyright     |  25 +++++
+ debian/postinst      |  50 +++++++++
+ debian/rules         | 154 +++++++++++++++++++++++++
+ dpme.h               |  11 +-
+ dump.c               | 164 +++++++++++++++++----------
+ fdisk.c              |  48 ++++----
+ fdisklabel.c         |  15 +--
+ fdisklabel.h         |   6 +
+ io.c                 |  10 +-
+ kernel-defs.h        |  64 +++++++++++
+ mac-fdisk.8.in       | 262 +++++++++++++++++++++++++++++++++++++++++++
+ partition_map.c      |  37 +++---
+ partition_map.h      |   2 +
+ pdisk.c              |  55 +++++++--
+ pmac-fdisk.8.in      | 222 ++++++++++++++++++++++++++++++++++++
+ 20 files changed, 1281 insertions(+), 115 deletions(-)
+ create mode 100644 debian/README.debian
+ create mode 100644 debian/changelog
+ create mode 100644 debian/compat
+ create mode 100644 debian/control
+ create mode 100644 debian/copyright
+ create mode 100644 debian/postinst
+ create mode 100644 debian/rules
+ create mode 100644 kernel-defs.h
+ create mode 100644 mac-fdisk.8.in
+ create mode 100644 pmac-fdisk.8.in
+
+diff --git a/Makefile b/Makefile
+index f26608f..0adf886 100644
+--- a/Makefile
++++ b/Makefile
+@@ -5,7 +5,14 @@ pdisk: pdisk.o dump.o partition_map.o convert.o io.o errors.o bitfield.o
+ fdisk: fdisk.o fdisklabel.o
+ 
+ clean:
+-	rm -f *.o pdisk fdisk
++	rm -f *.o pdisk fdisk mac-fdisk pmac-fdisk
++
++install: pdisk fdisk
++	-rm -f pmac-fdisk mac-fdisk
++	ln pdisk mac-fdisk
++	ln fdisk pmac-fdisk
++	install -o root -g root -m 0755 mac-fdisk ${DESTDIR}/sbin
++	install -o root -g root -m 0755 pmac-fdisk ${DESTDIR}/sbin
+ 
+ distribution:
+ 	cd ..; tar cvf pdisk.src.tar.`date +%y%m%d` --files-from pdisk/list.src
+diff --git a/debian/README.debian b/debian/README.debian
+new file mode 100644
+index 0000000..b9de127
+--- /dev/null
++++ b/debian/README.debian
+@@ -0,0 +1,18 @@
++mac-fdisk for DEBIAN
++----------------------
++
++Comments regarding mac-fdisk
++
++mac-fdisk provides Apple partition format utilities required for
++installation of Debian/68k on Apple Macintosh computers. The Debian version
++of mac-fdisk is derived from pdisk 0.4a2 (pdisk.970115.tar) by Eryk Vershen 
++(eryk@HIDDEN).
++pmac-fdisk is a version of the PC partition format utilities for PowerPC
++computers, taken from the same pdisk source version and can be used for
++installation of Debian/68k on PC partition format disks on Macintosh.
++
++Modifications have been made to the pdisk partition table output code to permit
++parsing the output of 'mac-fdisk -l' in a manner consistent with other Linux
++fdisk utilities. (Christiaan Welvaart, <>)
++
++Michael Schmitz <schmitz@HIDDEN>, Sat, 28 Feb 1998 12:58:07 -0800
+diff --git a/debian/changelog b/debian/changelog
+new file mode 100644
+index 0000000..a6bc796
+--- /dev/null
++++ b/debian/changelog
+@@ -0,0 +1,185 @@
++mac-fdisk (0.1-18) unstable; urgency=medium
++
++  * New maintainer:
++    - Set myself as maintainer in debian/control
++  * Add missing debian/compat, set to 9
++  * Stop building udeb packages:
++    - Remove references to {mac,pmac}-fdisk-udeb from debian/control
++    - Remove references to udeb packages from debian/rules
++  * Add missing pmac-fdisk-cross package to debian/control as it
++    is actually being built in debian/rules (Closes: #408341)
++  * Build cross packages on i386 as well (Closes: #202019)
++  * Add Vcs-Git and Vcs-Browser URLs to debian/control
++  * Set Priority to optional in debian/control
++  * Remove Priority extra for cross packages in debian/control
++  * Set Section utils for {mac,pmac}-fdisk in debian/control
++  * Remove unnecessary build dependencies coreutils and grep
++  * Update and amend long and short descriptions in debian/control
++  * Remove trailing white-spaces in debian/control
++  * Remove cruft and fix formatting in debian/changelog
++
++ -- John Paul Adrian Glaubitz <glaubitz@HIDDEN>  Fri, 22 Sep 2017 16:12:01 +0200
++
++mac-fdisk (0.1-17) unstable; urgency=low
++
++  * Fix postinst failure - dpkg --print-installation-architecture
++    is no longer supported. Patch by Finn Thain <fthain@HIDDEN>
++    Closes: #644845.
++
++ -- Michael Schmitz <schmitzmic@HIDDEN>  Tue, 11 AUg 2017 15:49:23 +1200
++
++mac-fdisk (0.1-16) unstable; urgency=low
++
++  * Fix udeb shlib dependencies - patch by Frans Pop <elendil@HIDDEN>
++    Closes: #562190.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Sun, 03 Jan 2010 13:47:27 +1200
++
++mac-fdisk (0.1-15) unstable; urgency=low
++
++  * Rebuild against current glibc to get rid of sys_errlist type size
++    warning (bug reported by Rick Thomas).
++    Closes: #451386.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Mon, 25 Sep 2005 14:50:13 +0100
++
++mac-fdisk (0.1-14) unstable; urgency=low
++
++  * Fix dpme.h u32 typedef which caused a mismatch between disk and memory
++    partition map format.
++    Closes: #389379.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Mon, 25 Sep 2005 14:50:13 +0100
++
++mac-fdisk (0.1-13) unstable; urgency=low
++
++  * Add patch for broken dpkg --print-gnu-build-architecture
++    (patch by Andreas Jochens <aj@HIDDEN>).
++    Closes: #328102.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Wed, 14 Sep 2005 17:25:23 +0100
++
++mac-fdisk (0.1-12) unstable; urgency=low
++
++  * Add makefile support for ppc64 arch (patch by Andreas Jochens
++    <aj@HIDDEN>).
++    Closes: #307897.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Mon, 09 May 2005 12:58:47 +0100
++
++mac-fdisk (0.1-11) unstable; urgency=low
++
++  * Big fat overdue cleanup - back in business after replacing my stolen
++    Powerbook.
++  * fixes as suggested in proposed NMU: changes mostly by Frank Lichtenheld
++    <djpig@HIDDEN>, with subarchitecture modifications by Colin Watson
++    <cjwatson@HIDDEN>.
++  * Copy needed kernel definitions from kernel-headers 2.4.25 (powerpc) and
++    2.4.26-m68k (cjwatson; Closes: #262457).
++  * Add Subarchitecture: fields in DEBIAN/control of the udebs. "mac" for
++    mac-fdisk-udeb on m68k, "powermac_oldworld powermac_newworld" for
++    mac-fdisk-udeb on powerpc, and "chrp chrp_pegasos prep iseries" for
++    pmac-fdisk-udeb on powerpc (djpig; Closes: #250581).
++  * Remove XSI:sms in debian/rules and debian/postinst, patch by David
++    Weinehall (djpig; Closes: #254918).
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Thu, 26 Aug 2004 14:23:13 +0200
++
++mac-fdisk (0.1-10) unstable; urgency=high
++
++  * Added .udeb magic to rules (kudos to Gaudenz Steinlin
++    <gaudenz@HIDDEN>); kept mac-fdisk in /sbin though).
++    Closes: #188420.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Wed, 04 Jun 2003 17:06:02 +0200
++
++mac-fdisk (0.1-9) unstable; urgency=high
++
++  * Rebuilt with woody binutils to allow for prelinking. Closes: #176353.
++
++  * Set 'automagically mount on boot' flag when creating HFS partitions
++    (thanks to Derrick Pates <dpates@HIDDEN> for finding the
++    undocumented bit!). Experimental, but this is unstable, right?
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Fri, 24 Jan 2003 16:20:20 +0200
++
++mac-fdisk (0.1-8) unstable; urgency=high
++
++  * Update mac-fdisk man page (kudos to Chris Tillman). Closes: #121928.
++
++  * Remove mac-fdisk-cross from control file; remove Sparc from Arch: entries
++    (to get rid of outdated mac-fdisk-cross 0.1-1 in the archive). Change
++    package descrption line for pmac-fdisk to emphasize it's a fdisk clone.
++
++  * Change sync() to ioctl(fd, BLKFLSBUF) to flush partition table to disk
++    on write - hopefully work around a kernel bug on new machines.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Fri, 07 Dec 2001 13:38:10 +0200
++
++mac-fdisk (0.1-7) unstable; urgency=high
++
++  * Bugfix: mac-fdisk didn't properly handle devfs device names. Mangle disk
++    name (.../disc) in dump routine to end in .../part%d (patch by Colin
++    Walters <walters@HIDDEN>). Closes: #110056.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Mon, 04 Sep 2001 16:02:45 +0200
++
++mac-fdisk (0.1-6.0potato1) stable; urgency=high
++
++  * Feature added: menu option to create bootstrap partition needed for
++    powerpc NewWorld machines with the proper type and size (patch supplied
++    by Ethan Benson). This should help newbies that won't read the docs
++    anyway. Closes: #99660.
++
++  * Bugfix: mac-fdisk used to get the disk size wrong when brute force
++    probing for end-of-disk by seek&read. Turns out gcc did not cope with
++    arithmetics on long long types without explicit cast. Closes: #99700.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Fri, 15 Jun 2001 12:16:35 +0200
++
++mac-fdisk (0.1-6) unstable; urgency=high
++
++  * Feature added: menu option to create bootstrap partition needed for
++    powerpc NewWorld machines with the proper type and size (patch supplied
++    by Ethan Benson). This should help newbies that won't read the docs
++    anyway. Closes: #99660.
++
++  * Bugfix: mac-fdisk used to get the disk size wrong when brute force
++    probing for end-of-disk by seek&read. Turns out gcc did not cope with
++    arithmetics on long long types without explicit cast. Closes: #99700.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Mon, 04 Jun 2001 13:54:21 +0200
++
++mac-fdisk (0.1-5) unstable; urgency=low
++
++  * Bugfix: fix build problems for glibc 2.2 (remove string.h includes,
++    use lseek64 for llseek, fix some petty gcc warnings)
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Wed, 02 Mar 2001 19:42:01 +0200
++
++mac-fdisk (0.1-4) unstable; urgency=low
++
++  * Bugfix: correct off-by-one error on moving a partition downwards in the
++    partition map. Clarification of various program messages and prompts
++    (closes #69148, #69149 and #69152). Update of mac-fdisk man page.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Wed, 08 Oct 2000 17:49:07 +0200
++
++mac-fdisk (0.1-3) unstable; urgency=low
++
++  * PowerPC install fixes (work around lack of /proc/hardware), rename pmac-fdisk
++    package (previously pmac-fdisk-cross). Add pmac-fdisk man page.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Wed, 08 Mar 2000 18:29:07 +0200
++
++mac-fdisk (0.1-2) unstable; urgency=low
++
++  * Change man page name and install location, changed man page, rebuild for 2.2.
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Fri, 22 Oct 1999 20:29:07 +0200
++
++mac-fdisk (0.1-1) unstable; urgency=low
++
++  * Initial Release. (built from previous pdisk-0.4a2 with fixes by Roman Hodek)
++
++ -- Michael Schmitz <schmitz@HIDDEN>  Sat, 28 Feb 1998 21:58:07 -0800
+diff --git a/debian/compat b/debian/compat
+new file mode 100644
+index 0000000..ec63514
+--- /dev/null
++++ b/debian/compat
+@@ -0,0 +1 @@
++9
+diff --git a/debian/control b/debian/control
+new file mode 100644
+index 0000000..b0e71d9
+--- /dev/null
++++ b/debian/control
+@@ -0,0 +1,58 @@
++Source: mac-fdisk
++Section: base
++Priority: optional
++Build-Depends: debhelper
++Maintainer: John Paul Adrian Glaubitz <glaubitz@HIDDEN>
++Standards-Version: 3.5.8.0
++Vcs-Git: git://github.com/glaubitz/mac-fdisk-debian.git
++Vcs-Browser: https://github.com/glaubitz/mac-fdisk-debian
++
++Package: mac-fdisk
++Architecture: m68k powerpc ppc64
++Section: utils
++Depends: ${shlibs:Depends}
++Description: Apple disk partition manipulation tool
++ The fdisk utilities from the MkLinux project, adopted for Linux/m68k.
++ Mac-fdisk allows you to create and edit the partition table of a disk.
++ It supports only the Apple partition format used on Macintosh and PowerMac,
++ use pmac-fdisk for PC partition format disks as used on PowerPC machines.
++ Mac-fdisk is an interactive tool with a menu similar to PC fdisk, supported
++ options are somewhat different from PC fdisk due to the differences in
++ partition format.
++
++Package: pmac-fdisk
++Architecture: powerpc ppc64
++Section: utils
++Depends: ${shlibs:Depends}
++Description: Apple fdisk partition manipulation tool for PowerPC
++ The fdisk utilities from the MkLinux project, adopted for Linux/ppc.
++ Pmac-fdisk allows you to create and edit the partition table of a disk.
++ It supports the PC partition format as used on PowerPC. It is an
++ interactive tool similar to PC fdisk.
++
++Package: mac-fdisk-cross
++Architecture: i386 m68k
++Section: otherosfs
++Depends: ${shlibs:Depends}
++Description: Apple disk partition manipulation tool, cross version
++ The fdisk utilities from the MkLinux project, adopted for Linux/m68k.
++ Mac-fdisk allows you to create and edit the partition table of a disk.
++ It supports only the Apple partition format used on Macintosh and PowerMac,
++ use pmac-fdisk for PC partition format disks as used on PowerPC machines.
++ Mac-fdisk is an interactive tool with a menu similar to PC fdisk, supported
++ options are somewhat different from PC fdisk due to the differences in
++ partition format.
++ .
++ This package contains the cross version of the package.
++
++Package: pmac-fdisk-cross
++Architecture: i386 m68k
++Section: otherosfs
++Depends: ${shlibs:Depends}
++Description: fdisk partition manipulation tool for PowerPC, cross version
++ The fdisk utilities from the MkLinux project, adopted for Linux/ppc.
++ Pmac-fdisk allows you to create and edit the partition table of a disk.
++ It supports the PC partition format as used on PowerPC. It is an
++ interactive tool similar to PC fdisk.
++ .
++ This package contains the cross version of the package.
+diff --git a/debian/copyright b/debian/copyright
+new file mode 100644
+index 0000000..9a1bd62
+--- /dev/null
++++ b/debian/copyright
+@@ -0,0 +1,25 @@
++This package was debianized by Michael Schmitz schmitz@HIDDEN on
++Sun, 11 Jan 1998 22:58:07 -0800.
++
++It was downloaded from ftp.mklinux.apple.com:/pub/Other_Tools/
++
++Copyright:
++
++ * Copyright 1996,1997 by Apple Computer, Inc.
++ *              All Rights Reserved 
++ *  
++ * Permission to use, copy, modify, and distribute this software and 
++ * its documentation for any purpose and without fee is hereby granted, 
++ * provided that the above copyright notice appears in all copies and 
++ * that both the copyright notice and this permission notice appear in 
++ * supporting documentation. 
++ *  
++ * APPLE COMPUTER DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE 
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 
++ * FOR A PARTICULAR PURPOSE. 
++ *  
++ * IN NO EVENT SHALL APPLE COMPUTER BE LIABLE FOR ANY SPECIAL, INDIRECT, OR 
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
++ * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT, 
++ * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 
++ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 
+diff --git a/debian/postinst b/debian/postinst
+new file mode 100644
+index 0000000..4c4a47e
+--- /dev/null
++++ b/debian/postinst
+@@ -0,0 +1,50 @@
++#! /bin/sh
++set -e
++
++Arch=`dpkg --print-architecture`
++
++#
++# make symlink /sbin/fdisk point to the native fdisk
++#
++
++# This is also true if /sbin/fdisk is a dangling symlink; in that case we
++# want to update the link, too.
++if [ ! -e /sbin/fdisk ]; then
++	machine=""
++	if [ "$Arch" = "m68k" ]; then
++		case `awk '$1 == "Model:" { print $2 }' /proc/hardware` in
++			Atari)
++				machine=atari
++				;;
++			Amiga)
++				machine=amiga
++				;;
++			Macintosh)
++				machine=mac
++				;;
++			Motorola) # MVME
++				;;
++		esac
++	elif [ "$Arch" = "powerpc" ]; then
++		# case `awk '$1 == "motherboard" { print $6 }' /proc/cpuinfo` in
++		# case `cat /proc/cpuinfo | grep -E "^motherboard" | sed -e 's/.* \([a-zA-Z]*\)$/\1/'` in
++		case `awk '$1 == "motherboard" { print $NF }' /proc/cpuinfo` in
++			Macintosh)
++				machine=mac
++				;;
++			*)
++				machine=pmac
++				;;
++		esac
++
++	fi
++	if [ -n "$machine" ] && [ -f /sbin/$machine-fdisk ]; then
++		ln -sf $machine-fdisk /sbin/fdisk
++	else
++		echo "No native fdisk for this machine type!"
++	fi
++fi
++
++#DEBHELPER#
++
++exit 0
+diff --git a/debian/rules b/debian/rules
+new file mode 100644
+index 0000000..c978557
+--- /dev/null
++++ b/debian/rules
+@@ -0,0 +1,154 @@
++#!/usr/bin/make -f
++# Made with the aid of debmake, by Christoph Lameter,
++# based on the sample debian/rules file for GNU hello by Ian Jackson.
++
++export DH_VERBOSE=1
++
++#BUILDARCH = $(shell dpkg --print-gnu-build-architecture)
++BUILDARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
++POWERPC = $(findstring $(BUILDARCH),powerpc ppc64)
++
++packmn  = mac-fdisk
++packmc  = mac-fdisk-cross
++packpmn = pmac-fdisk
++packpmc = pmac-fdisk-cross
++tmpmn   = debian/tmp
++tmpmc   = debian/$(packmc)
++tmppmn  = debian/$(packpmn)
++tmppmc  = debian/$(packpmc)
++docmn   = $(tmpmn)/usr/share/doc/$(packmn)
++docmc   = $(tmpmc)/usr/share/doc/$(packmc)
++docpmn  = $(tmppmn)/usr/share/doc/$(packpmn)
++docpmc  = $(tmppmc)/usr/share/doc/$(packpmc)
++
++ifeq "$(BUILDARCH)" "powerpc"
++mac_subarches=powermac_oldworld powermac_newworld
++pmac_subarches=chrp chrp_pegasos prep iseries
++else
++mac_subarches=mac
++endif
++
++build:
++	$(checkdir)
++	make CFLAGS="-O2 -g -Wall"
++	touch build
++
++clean:
++	$(checkdir)
++	-rm -f build
++	-make clean
++	-rm -f `find . -name "*~"`
++	-rm -rf $(tmpmn) $(tmpmc) $(tmppmn) $(tmppmc) debian/files* core debian/*substvars
++
++binary-indep: build
++	$(checkdir)
++# There are no architecture-independent files to be uploaded
++# generated by this package.  If there were any they would be
++# made here.
++
++binary-arch: build
++	dh_testdir pdisk.h
++	dh_testroot
++	dh_clean -k
++	#dh_installdirs
++	# we don't want to package the pdisk man page
++	mv pdisk.8 pdisk.8.in
++	set -e; if [ "$(BUILDARCH)" = "m68k" ] || [ -n "$(POWERPC)" ]; then \
++		install -d $(tmpmn)/sbin; \
++		install -m 755 pdisk $(tmpmn)/sbin/mac-fdisk; \
++		install -d $(tmpmn)/usr/share/man/man8; \
++		install -m 644 mac-fdisk.8.in $(tmpmn)/usr/share/man/man8/mac-fdisk.8; \
++		dh_installdocs README -p$(packmn); \
++		dh_installmanpages -p$(packmn); \
++		dh_installchangelogs HISTORY -p$(packmn); \
++	else \
++		install -d $(tmpmc)/usr/sbin; \
++		install -m 755 pdisk $(tmpmc)/usr/sbin/mac-fdisk; \
++		install -d $(tmpmn)/usr/share/man/man8; \
++		install -m 644 mac-fdisk.8.in $(tmpmn)/usr/share/man/man8/mac-fdisk.8; \
++		dh_installdocs README -p$(packmc); \
++		dh_installmanpages  -p$(packmc); \
++		dh_installchangelogs HISTORY -p$(packmc); \
++	fi
++	set -e; if [ -n "$(POWERPC)" ]; then \
++		install -d $(tmppmn)/sbin; \
++		install -m 755 fdisk $(tmppmn)/sbin/pmac-fdisk; \
++		install -d $(tmppmn)/usr/share/man/man8; \
++		install -m 644 pmac-fdisk.8.in $(tmppmn)/usr/share/man/man8/pmac-fdisk.8; \
++		dh_installdocs README -p$(packpmn); \
++		dh_installmanpages  -p$(packpmn); \
++		dh_installchangelogs HISTORY -p$(packpmn); \
++	else \
++		install -d $(tmppmc)/usr/sbin; \
++		install -m 755 fdisk $(tmppmc)/usr/sbin/pmac-fdisk; \
++		install -d $(tmppmc)/usr/share/man/man8; \
++		install -m 644 pmac-fdisk.8.in $(tmppmc)/usr/share/man/man8/pmac-fdisk.8; \
++		dh_installdocs README -p$(packpmc); \
++		dh_installmanpages  -p$(packpmc); \
++		dh_installchangelogs HISTORY -p$(packpmc); \
++	fi
++	# install README.Debian also in cross package (not done by dh_installdocs)
++	set -e; if [ "$(BUILDARCH)" != "m68k" ] && ! [ -n "$(POWERPC)" ]; then \
++		install -m 644 debian/README.debian $(docmc)/README.Debian; \
++	fi
++	# and move the pdisk man page back again ...
++	mv pdisk.8.in pdisk.8
++
++	# build native pdisk only for m68k, cross package only for others
++	set -e; if [ "$(BUILDARCH)" = "m68k" ] || [ -n "$(POWERPC)" ]; then \
++		dh_strip -p$(packmn) -P$(tmpmn); \
++		dh_compress -p$(packmn) -P$(tmpmn); \
++		dh_fixperms -p$(packmn) -P$(tmpmn); \
++		dh_installdeb -p$(packmn) -P$(tmpmn); \
++		dh_shlibdeps -p$(packmn) -P$(tmpmn); \
++		dh_gencontrol -p$(packmn) -P$(tmpmn); \
++		dh_md5sums -p$(packmn) -P$(tmpmn); \
++	else \
++		dh_strip -p$(packmc); \
++		dh_compress -p$(packmc); \
++		dh_fixperms -p$(packmc); \
++		dh_installdeb -p$(packmc); \
++		dh_shlibdeps -p$(packmc); \
++		dh_gencontrol -p$(packmc); \
++		dh_md5sums -p$(packmc); \
++	fi
++	# build native fdisk only for powerpc, cross package only for others
++	set -e; if [ -n "$(POWERPC)" ]; then \
++		dh_strip -p$(packpmn); \
++		dh_compress -p$(packpmn); \
++		dh_fixperms -p$(packpmn); \
++		dh_installdeb -p$(packpmn); \
++		dh_shlibdeps -p$(packpmn); \
++		dh_gencontrol -p$(packpmn); \
++		dh_md5sums -p$(packpmn); \
++	else \
++		dh_strip -p$(packpmc); \
++		dh_compress -p$(packpmc); \
++		dh_fixperms -p$(packpmc); \
++		dh_installdeb -p$(packpmc); \
++		dh_shlibdeps -p$(packpmc); \
++		dh_gencontrol -p$(packpmc); \
++		dh_md5sums -p$(packpmc); \
++	fi
++	set -e; if [ "$(BUILDARCH)" = "m68k" ] || [ -n "$(POWERPC)" ]; then \
++		dh_builddeb -p$(packmn) -P$(tmpmn); \
++	else \
++		dh_builddeb -p$(packmc); \
++	fi
++	set -e; if [ -n "$(POWERPC)" ]; then \
++		dh_builddeb -p$(packpmn); \
++	else \
++		dh_builddeb -p$(packpmc); \
++	fi
++
++define checkdir
++	test -f debian/rules
++endef
++
++binary: binary-indep binary-arch
++
++checkroot:
++	$(checkdir)
++	test root = "`whoami`"
++
++.PHONY: binary binary-arch binary-indep clean checkroot
+diff --git a/dpme.h b/dpme.h
+index 2994266..c2a9958 100644
+--- a/dpme.h
++++ b/dpme.h
+@@ -61,7 +61,7 @@
+ //
+ typedef	unsigned char	u8;
+ typedef	unsigned short	u16;
+-typedef	unsigned long	u32;
++typedef	unsigned int	u32;
+ 
+ 
+ // Physical block zero of the disk has this format
+@@ -113,10 +113,17 @@ struct dpme {
+ #endif
+     u32     dpme_boot_block         ;
+     u32     dpme_boot_bytes         ;
++#ifdef __linux__
++    u32     dpme_load_addr          ;
++    u32     dpme_load_addr_2        ;
++    u32     dpme_goto_addr          ;
++    u32     dpme_goto_addr_2        ;
++#else
+     u8     *dpme_load_addr          ;
+     u8     *dpme_load_addr_2        ;
+     u8     *dpme_goto_addr          ;
+     u8     *dpme_goto_addr_2        ;
++#endif
+     u32     dpme_checksum           ;
+     char    dpme_process_id[16]     ;
+     u32     dpme_boot_args[32]      ;
+@@ -124,6 +131,7 @@ struct dpme {
+ };
+ typedef struct dpme DPME;
+ 
++#define	dpme_automount_set(p, v)	bitfield_set(&p->dpme_flags, 30, 1, v) /* MSch */
+ #define	dpme_os_specific_1_set(p, v)	bitfield_set(&p->dpme_flags, 8, 1, v)
+ #define	dpme_os_specific_2_set(p, v)	bitfield_set(&p->dpme_flags, 7, 1, v)
+ #define	dpme_os_pic_code_set(p, v)	bitfield_set(&p->dpme_flags, 6, 1, v)
+@@ -134,6 +142,7 @@ typedef struct dpme DPME;
+ #define	dpme_allocated_set(p, v)	bitfield_set(&p->dpme_flags, 1, 1, v)
+ #define	dpme_valid_set(p, v)		bitfield_set(&p->dpme_flags, 0, 1, v)
+ 
++#define	dpme_automount_get(p)		bitfield_get(p->dpme_flags, 30, 1)	/* MSch */
+ #define	dpme_os_specific_1_get(p)	bitfield_get(p->dpme_flags, 8, 1)
+ #define	dpme_os_specific_2_get(p)	bitfield_get(p->dpme_flags, 7, 1)
+ #define	dpme_os_pic_code_get(p)		bitfield_get(p->dpme_flags, 6, 1)
+diff --git a/dump.c b/dump.c
+index 61ad91b..4153dc5 100644
+--- a/dump.c
++++ b/dump.c
+@@ -3,7 +3,11 @@
+ //
+ // Written by Eryk Vershen (eryk@HIDDEN)
+ //
+-
++/*
++ * Linux/m68k version by Christiaan Welvaart
++ * minor fixes and glibc change by Michael Schmitz
++ */
++ 
+ /*
+  * Copyright 1996,1997 by Apple Computer, Inc.
+  *              All Rights Reserved 
+@@ -60,6 +64,7 @@ typedef struct names {
+ //
+ NAMES plist[] = {
+     "Drvr", "Apple_Driver",
++    "Dr43", "Apple_Driver43",
+     "Free", "Apple_Free",
+     " HFS", "Apple_HFS",
+     " MFS", "Apple_MFS",
+@@ -83,7 +88,7 @@ const char * kStringNot		= " not";
+ // Forward declarations
+ //
+ void dump_block_zero(partition_map_header *map);
+-void dump_partition_entry(partition_map *entry, int digits);
++void dump_partition_entry(partition_map *entry, int digits, char *dev);
+ 
+ 
+ //
+@@ -119,6 +124,7 @@ dump_block_zero(partition_map_header *map)
+     }
+     printf("\nBlock size=%u, Number of Blocks=%u\n",
+ 	    p->sbBlkSize, p->sbBlkCount);
++#ifndef __mc68000__
+     printf("DeviceType=0x%x, DeviceId=0x%x\n",
+ 	    p->sbDevType, p->sbDevId);
+     if (p->sbDrvrCount > 0) {
+@@ -130,6 +136,7 @@ dump_block_zero(partition_map_header *map)
+ 	}
+     }
+     printf("\n");
++#endif
+ }
+ 
+ 
+@@ -138,31 +145,50 @@ dump_partition_map(partition_map_header *map, int disk_order)
+ {
+     partition_map * entry;
+     int j;
++    size_t len;
++    char *buf;
+ 
+     if (map == NULL) {
+ 	bad_input("No partition map exists");
+ 	return;
+     }
++#ifdef __mc68000__
++    printf("Disk %s\n", map->name);
++#else
+     printf("%s\n", map->name);
++#endif
+ 
+     j = number_of_digits(map->media_size);
+     if (j < 7) {
+ 	j = 7;
+     }
+-    printf("   #:                 type name               "
+-	    "%*s   %-*s ( size )\n", j, "length", j, "base");
++#ifdef __mc68000__
++    printf("%*s  type name         "
++	    "%*s   %-*s ( size )  system\n", strlen(map->name)+1, "#", j, "length", j, "base");
++#else
++    printf("%*s                    type name               "
++	    "%*s   %-*s ( size )  system\n", strlen(map->name)+1, "#", j, "length", j, "base");
++#endif
++
++    /* Grok devfs names. (courtesy Colin Walters)*/
++
++    len = strlen(map->name);
++    buf = strdup(map->name);
++    if (len >= 4 && !strcmp(buf+len-4, "disc")) {
++	strcpy(buf+len-4, "part");
++    }
+ 
+     if (disk_order) {
+ 	for (entry = map->disk_order; entry != NULL;
+ 		entry = entry->next_on_disk) {
+ 
+-	    dump_partition_entry(entry, j);
++	    dump_partition_entry(entry, j, buf);
+ 	}
+     } else {
+ 	for (entry = map->base_order; entry != NULL;
+ 		entry = entry->next_by_base) {
+ 
+-	    dump_partition_entry(entry, j);
++	    dump_partition_entry(entry, j, buf);
+ 	}
+     }
+     dump_block_zero(map);
+@@ -170,18 +196,23 @@ dump_partition_map(partition_map_header *map, int disk_order)
+ 
+ 
+ void
+-dump_partition_entry(partition_map *entry, int digits)
++dump_partition_entry(partition_map *entry, int digits, char *dev)
+ {
+     partition_map_header *map;
+     int j;
+     DPME *p;
+     BZB *bp;
+     char *s;
++#ifdef __mc68000__
++    int aflag = 1;
++#else
+     int aflag = 0;
++#endif
+     int pflag = 1;
+     u32 size;
+     double bytes;
+ 
++
+     map = entry->the_map;
+     p = entry->data;
+     if (aflag) {
+@@ -192,9 +223,13 @@ dump_partition_entry(partition_map *entry, int digits)
+ 		break;
+ 	    }
+ 	}
+-	printf("%4d: %.4s %-18.32s ", entry->disk_address, s, p->dpme_name);
++#ifdef __mc68000__
++	printf("%s%-2d %.4s %-12.12s ", dev, entry->disk_address, s, p->dpme_name);
++#else
++	printf("%s%-4d  %.4s %-18.32s ", dev, entry->disk_address, s, p->dpme_name);
++#endif
+     } else {
+-	printf("%4d: %20.32s %-18.32s ",
++	printf("%s%-4d %20.32s %-18.32s ", dev, 
+ 		entry->disk_address, p->dpme_type, p->dpme_name);
+     }
+ 
+@@ -217,7 +252,10 @@ dump_partition_entry(partition_map *entry, int digits)
+ 	printf("@~%-*u", digits, p->dpme_pblock_start + p->dpme_lblock_start);
+     }
+     
++    j = 's';
++
+     bytes = size / ONE_KILOBYTE_IN_BLOCKS;
++    j = 'k';
+     if (bytes >= 1024.0) {
+ 	bytes = bytes / 1024.0;
+ 	if (bytes < 1024.0) {
+@@ -226,58 +264,45 @@ dump_partition_entry(partition_map *entry, int digits)
+ 	    bytes = bytes / 1024.0;
+ 	    j = 'G';
+ 	}
+-	printf(" (%#5.1f%c)", bytes, j);
+     }
++    printf(" (%#5.1f%c)  ", bytes, j);
+ 
+-#if 0
+-    // Old A/UX fields that no one pays attention to anymore.
+-    bp = (BZB *) (p->dpme_bzb);
+-    j = -1;
+-    if (bp->bzb_magic == BZBMAGIC) {
+-	switch (bp->bzb_type) {
+-	case FSTEFS:
+-	    s = "EFS";
+-	    break;
+-	case FSTSFS:
+-	    s = "SFS";
+-	    j = 1;
+-	    break;
+-	case FST:
+-	default:
+-	    if (bzb_root_get(bp) != 0) {
+-		if (bzb_usr_get(bp) != 0) {
+-		    s = "RUFS";
+-		} else {
+-		    s = "RFS";
+-		}
+-		j = 0;
+-	    } else if (bzb_usr_get(bp) != 0) {
+-		s = "UFS";
+-		j = 2;
+-	    } else {
+-		s = "FS";
+-	    }
+-	    break;
+-	}
+-	if (bzb_slice_get(bp) != 0) {
+-	    printf(" s%1d %4s", bzb_slice_get(bp)-1, s);
+-	} else if (j >= 0) {
+-	    printf(" S%1d %4s", j, s);
+-	} else {
+-	    printf("    %4s", s);
+-	}
+-	if (bzb_crit_get(bp) != 0) {
+-	    printf(" K%1d", bp->bzb_cluster);
+-	} else if (j < 0) {
+-	    printf("   ");
+-	} else {
+-	    printf(" k%1d", bp->bzb_cluster);
+-	}
+-	if (bp->bzb_mount_point[0] != 0) {
+-	    printf("  %.64s", bp->bzb_mount_point);
+-	}
++    if (!strcmp(p->dpme_type, "Apple_UNIX_SVR2"))
++    {
++         if (!strcmp(p->dpme_name, "Swap") || !strcmp(p->dpme_name, "swap"))
++            printf("Linux swap");
++         else
++            printf("Linux native");
+     }
+-#endif
++    else
++    if (!strcmp(p->dpme_type, "Apple_Bootstrap"))
++         printf("NewWorld bootblock");
++    else
++    if (!strcmp(p->dpme_type, "Apple_Scratch"))
++         printf("Linux swap");  //not just linux, but who cares
++    else
++    if (!strcmp(p->dpme_type, "Apple_HFS"))
++         printf("HFS");
++    else
++    if (!strcmp(p->dpme_type, "Apple_MFS"))
++        printf("MFS");
++    else
++    if (!strcmp(p->dpme_type, "Apple_Driver"))
++        printf("Driver");
++    else
++    if (!strcmp(p->dpme_type, "Apple_Driver43"))
++        printf("Driver 4.3");
++    else
++    if (!strcmp(p->dpme_type, "Apple_partition_map"))
++        printf("Partition map");
++    else
++    if (!strcmp(p->dpme_type, "Apple_PRODOS"))
++        printf("ProDOS");
++    else
++    if (!strcmp(p->dpme_type, "Apple_Free"))
++        printf("Free space");
++    else
++        printf("Unknown");
+     printf("\n");
+ }
+ 
+@@ -316,6 +341,24 @@ list_all_disks()
+ 
+ 	dump(name);
+     }
++#ifdef __linux__
++    for (i = 0; i < 4; i++) {
++	sprintf(name, "/dev/hd%c", 'a'+i);
++	if ((fd = open_device(name, O_RDONLY)) < 0) {
++	    if (errno == EACCES) {
++		error(errno, "can't open file '%s'", name);
++	    }
++	    continue;
++	}
++	if (read_block(fd, 1, (char *)data, 1) == 0) {
++	    close_device(fd);
++	    continue;
++	}
++	close_device(fd);
++
++	dump(name);
++    }
++#endif
+     free(data);
+ }
+ 
+@@ -385,7 +428,7 @@ u32     dpme_reserved_3[62]     ;
+ 	printf("%2d: %20.32s ",
+ 		entry->disk_address, p->dpme_type);
+ 	printf("%7u @ %-7u ", p->dpme_pblocks, p->dpme_pblock_start);
+-	printf("%c%c%c%c%c%c%c%c%c ",
++	printf("%c%c%c%c%c%c%c%c%c%c ",
+ 		(dpme_valid_get(p))?'V':'v',
+ 		(dpme_allocated_get(p))?'A':'a',
+ 		(dpme_in_use_get(p))?'I':'i',
+@@ -394,7 +437,8 @@ u32     dpme_reserved_3[62]     ;
+ 		(dpme_writable_get(p))?'W':'w',
+ 		(dpme_os_pic_code_get(p))?'P':'p',
+ 		(dpme_os_specific_1_get(p))?'1':'.',
+-		(dpme_os_specific_2_get(p))?'2':'.');
++		(dpme_os_specific_2_get(p))?'2':'.',
++		(dpme_automount_get(p))?'M':'m');
+ 	if (p->dpme_lblock_start != 0 || p->dpme_pblocks != p->dpme_lblocks) {
+ 	    printf("(%u @ %u)", p->dpme_lblocks, p->dpme_lblock_start);
+ 	}
+diff --git a/fdisk.c b/fdisk.c
+index 11e92db..d77619b 100644
+--- a/fdisk.c
++++ b/fdisk.c
+@@ -62,7 +62,6 @@
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <string.h>
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <setjmp.h>
+@@ -71,9 +70,9 @@
+ 
+ #include <sys/ioctl.h>
+ 
+-#include <linux/genhd.h>
+-#include <linux/hdreg.h>
+-#include <linux/fs.h>
++typedef unsigned short kdev_t;	/* BAD hack; kdev_t is not exported */
++
++#include "kernel-defs.h"
+ 
+ #include "fdisk.h"
+ 
+@@ -428,7 +427,7 @@ void read_extended(struct partition *p)
+ 		offsets[partitions] = extended_offset + SWAP32(p->start_sect);
+ 		if (!extended_offset)
+ 			extended_offset = SWAP32(p->start_sect);
+-		if (llseek(fd, (loff_t)offsets[partitions]
++		if (lseek64(fd, (loff_t)offsets[partitions]
+ 			       * SECTOR_SIZE, SEEK_SET) < 0)
+ 			fatal(unable_to_seek);
+ 		if (!(buffers[partitions] = (char *) malloc(SECTOR_SIZE)))
+@@ -438,14 +437,14 @@ void read_extended(struct partition *p)
+ 		part_table[partitions] = ext_pointers[partitions] = NULL;
+ 		q = p = offset(buffers[partitions], 0);
+ 		for (i = 0; i < 4; i++, p++) {
+-			if (p->sys_ind == EXTENDED)
++			if (p->sys_ind == EXTENDED) {
+ 				if (ext_pointers[partitions])
+ 					fprintf(stderr, "Warning: extra link "
+ 						"pointer in partition table "
+ 						"%d\n", partitions + 1);
+ 				else
+ 					ext_pointers[partitions] = p;
+-			else if (p->sys_ind)
++			} else if (p->sys_ind) {
+ 				if (part_table[partitions])
+ 					fprintf(stderr,
+ 						"Warning: ignoring extra data "
+@@ -453,15 +452,18 @@ void read_extended(struct partition *p)
+ 						partitions + 1);
+ 				else
+ 					part_table[partitions] = p;
++			}
+ 		}
+-		if (!part_table[partitions])
++		if (!part_table[partitions]) {
+ 			if (q != ext_pointers[partitions])
+ 				part_table[partitions] = q;
+ 			else part_table[partitions] = q + 1;
+-		if (!ext_pointers[partitions])
++		}
++		if (!ext_pointers[partitions]) {
+ 			if (q != part_table[partitions])
+ 				ext_pointers[partitions] = q;
+ 			else ext_pointers[partitions] = q + 1;
++		}
+ 		p = ext_pointers[partitions++];
+ 	}
+ }
+@@ -497,11 +499,12 @@ void get_boot(void)
+ 	warn_geometry();
+ 
+ 	for (i = 0; i < 4; i++)
+-		if(part_table[i]->sys_ind == EXTENDED)
++		if(part_table[i]->sys_ind == EXTENDED) {
+ 			if (partitions != 4)
+ 				fprintf(stderr, "Ignoring extra extended "
+ 					"partition %d\n", i + 1);
+ 			else read_extended(part_table[ext_index = i]);
++		}
+ 
+ 	for (i = 3; i < partitions; i++)
+ 		if (SWAP16(*table_check(buffers[i])) != PART_TABLE_FLAG) {
+@@ -621,6 +624,7 @@ uint read_int(uint low, uint dflt, uint high, enum offset base, char *mesg)
+ 			case lower: i += low; break;
+ 			case upper: i += high; break;
+ 			case deflt: i += dflt; break;
++			default: break;
+ 			}
+ 		}
+ 		else
+@@ -844,12 +848,12 @@ static void check_consistency(struct partition *p, int partition)
+ 		return;		/* do not check extended partitions */
+ 
+ /* physical beginning c, h, s */
+-	pbc = p->cyl & 0xff | (p->sector << 2) & 0x300;
++	pbc = (p->cyl & 0xff) | ((p->sector << 2) & 0x300);
+ 	pbh = p->head;
+ 	pbs = p->sector & 0x3f;
+ 
+ /* physical ending c, h, s */
+-	pec = p->end_cyl & 0xff | (p->end_sector << 2) & 0x300;
++	pec = (p->end_cyl & 0xff) | ((p->end_sector << 2) & 0x300);
+ 	peh = p->end_head;
+ 	pes = p->end_sector & 0x3f;
+ 
+@@ -941,7 +945,7 @@ void x_list_table(int extend)
+ 		disk_device, heads, sectors, cylinders);
+         printf("Nr AF  Hd Sec  Cyl  Hd Sec  Cyl   Start    Size ID\n");
+ 	for (i = 0 ; i < partitions; i++)
+-		if (p = q[i]) {
++		if ((p = q[i])) {
+                         printf("%2d %02x%4d%4d%5d%4d%4d%5d%8d%8d %02x\n",
+ 				i + 1, p->boot_ind, p->head,
+ 				sector(p->sector),
+@@ -1026,7 +1030,7 @@ void verify(void)
+ 				last[i]);
+ 			total += last[i] + 1 - first[i];
+ 			for (j = 0; j < i; j++)
+-			if (first[i] >= first[j] && first[i] <= last[j]
++			if ((first[i] >= first[j] && first[i] <= last[j])
+ 					|| (last[i] <= last[j] &&
+ 					last[i] >= first[j])) {
+ 				printf("Warning: partition %d overlaps "
+@@ -1060,11 +1064,11 @@ void verify(void)
+ 	if (total > heads * sectors * cylinders)
+ 		printf("Total allocated sectors %d greater than the maximum "
+ 			"%d\n", total, heads * sectors * cylinders);
+-	else if (total = heads * sectors * cylinders - total)
++	else if ((total = heads * sectors * cylinders - total))
+ 		printf("%d unallocated sectors\n", total);
+ }
+ 
+-void add_partition(int n, int sys)
++static void add_partition(int n, int sys)
+ {
+ 	char mesg[48];
+ 	int i, read = 0;
+@@ -1100,11 +1104,12 @@ void add_partition(int n, int sys)
+ 		for (i = 0; i < partitions; i++) {
+ 			if (start == offsets[i])
+ 				start += sector_offset;
+-			if (start >= first[i] && start <= last[i])
++			if (start >= first[i] && start <= last[i]) {
+ 				if (n < 4)
+ 					start = last[i] + 1;
+ 				else
+ 					start = last[i] + sector_offset;
++			}
+ 		}
+ 		if (start > limit)
+ 			break;
+@@ -1249,7 +1254,7 @@ void write_table(void)
+ 	for (i = 3; i < partitions; i++)
+ 		if (changed[i]) {
+ 			*table_check(buffers[i]) = SWAP16(PART_TABLE_FLAG);
+-			if (llseek(fd, (loff_t)offsets[i]
++			if (lseek64(fd, (loff_t)offsets[i]
+ 					* SECTOR_SIZE, SEEK_SET) < 0)
+ 				fatal(unable_to_seek);
+ 			if (write(fd, buffers[i], SECTOR_SIZE) != SECTOR_SIZE)
+@@ -1262,7 +1267,7 @@ void write_table(void)
+ 	       "(Reboot to ensure the partition table has been updated.)\n");
+ 	sync();
+ 	sleep(2);
+-	if (i = ioctl(fd, BLKRRPART)) {
++	if ((i = ioctl(fd, BLKRRPART))) {
+                 error = errno;
+         } else {
+                 /* some kernel versions (1.2.x) seem to have trouble
+@@ -1270,7 +1275,7 @@ void write_table(void)
+ 		   twice, the second time works. - biro@HIDDEN */
+                 sync();
+                 sleep(2);
+-                if(i = ioctl(fd, BLKRRPART))
++                if((i = ioctl(fd, BLKRRPART)))
+                         error = errno;
+         }
+ 
+@@ -1391,7 +1396,7 @@ void xselect(void)
+ void try(char *device)
+ {
+ 	disk_device = device;
+-	if (!setjmp(listingbuf))
++	if (!setjmp(listingbuf)) {
+ 		if ((fd = open(disk_device, type_open)) >= 0) {
+ 			close(fd);
+ 			get_boot();
+@@ -1407,6 +1412,7 @@ void try(char *device)
+ 		    exit(1);
+ 		 }
+ 	      }
++	}
+ }
+ 
+ void main(int argc, char **argv)
+diff --git a/fdisklabel.c b/fdisklabel.c
+index 9344339..70c3cfa 100644
+--- a/fdisklabel.c
++++ b/fdisklabel.c
+@@ -38,7 +38,6 @@
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <string.h>
+ #include <fcntl.h>
+ #include <ctype.h>
+ #include <setjmp.h>
+@@ -47,9 +46,7 @@
+ #include <sys/ioctl.h>
+ #include <sys/param.h>
+ 
+-#include <linux/genhd.h>
+-#include <linux/hdreg.h>
+-#include <linux/fs.h>
++#include "kernel-defs.h"
+ 
+ #include "fdisk.h"
+ #define DKTYPENAMES
+@@ -377,7 +374,7 @@ bsd_create_disklabel (void)
+     {
+ #if defined (i386)
+       if (bsd_initlabel (bsd_part, &bsd_dlabel, bsd_part_index) == 1)
+-#elif defined (__alpha__) || defined (__powerpc__)
++#elif defined (__alpha__) || defined (__powerpc__) || defined (__mc68000__)
+       if (bsd_initlabel (NULL, &bsd_dlabel, 0) == 1)
+ #endif
+       {
+@@ -515,7 +512,7 @@ bsd_write_bootstrap (void)
+   alpha_bootblock_checksum (buffer);
+ #endif
+ 
+-  if (llseek (fd, sector * SECTOR_SIZE, SEEK_SET) == -1)
++  if (lseek64 (fd, sector * SECTOR_SIZE, SEEK_SET) == -1)
+     fatal (unable_to_seek);
+   if (BSD_BBSIZE != write (fd, buffer, BSD_BBSIZE))
+     fatal (unable_to_write);
+@@ -679,7 +676,7 @@ bsd_readlabel (struct partition *p, struct disklabel *d)
+   sector = 0;
+ #endif
+ 
+-  if (llseek (fd, sector * SECTOR_SIZE, SEEK_SET) == -1)
++  if (lseek64 (fd, sector * SECTOR_SIZE, SEEK_SET) == -1)
+     fatal (unable_to_seek);
+   if (BSD_BBSIZE != read (fd, buffer, BSD_BBSIZE))
+     fatal (unable_to_read);
+@@ -724,12 +721,12 @@ bsd_writelabel (struct partition *p, struct disklabel *d)
+ 
+ #if defined (__alpha__) && BSD_LABELSECTOR == 0
+   alpha_bootblock_checksum (buffer);
+-  if (llseek (fd, 0, SEEK_SET) == -1)
++  if (lseek64 (fd, 0, SEEK_SET) == -1)
+     fatal (unable_to_seek);
+   if (BSD_BBSIZE != write (fd, buffer, BSD_BBSIZE))
+     fatal (unable_to_write);
+ #else
+-  if (llseek (fd, sector * SECTOR_SIZE + BSD_LABELOFFSET, SEEK_SET) == -1)
++  if (lseek64 (fd, sector * SECTOR_SIZE + BSD_LABELOFFSET, SEEK_SET) == -1)
+     fatal (unable_to_seek);
+   if (sizeof (struct disklabel) != write (fd, d, sizeof (struct disklabel)))
+     fatal (unable_to_write);
+diff --git a/fdisklabel.h b/fdisklabel.h
+index 0b5227c..a9c4d2e 100644
+--- a/fdisklabel.h
++++ b/fdisklabel.h
+@@ -52,6 +52,12 @@
+ #define BSD_LABELOFFSET   0
+ #define	BSD_BBSIZE        0
+ #define	BSD_SBSIZE        0
++#elif defined (__mc68000__)
++/* LABELSECTOR, LABELOFFSET, BBSIZE & SBSIZE are undefined for __powerpc__ */
++#define BSD_LABELSECTOR   0
++#define BSD_LABELOFFSET   0
++#define	BSD_BBSIZE        0
++#define	BSD_SBSIZE        0
+ #else
+ #error unknown architecture
+ #endif
+diff --git a/io.c b/io.c
+index 0c99d94..0937e29 100644
+--- a/io.c
++++ b/io.c
+@@ -30,6 +30,10 @@
+ #include <stdlib.h>
+ #include <fcntl.h>
+ #include <SCSI.h>
++#else
++#ifdef __GLIBC__
++#include <sys/types.h>
++#endif
+ #endif
+ #include <unistd.h>
+ #include <string.h>
+@@ -51,6 +55,8 @@
+ #define SCSI_FD 8
+ #define loff_t long
+ #define llseek lseek
++#else
++#define llseek lseek64
+ #endif
+ 
+ 
+@@ -435,8 +441,8 @@ read_block(int fd, unsigned long num, char *buf, int quiet)
+ #else
+     {
+ #endif
+-	x = num * PBLOCK_SIZE;
+-	if ((x = llseek(fd, x, 0)) < 0) {
++	x = ((long long) num * PBLOCK_SIZE); /* cast to ll to work around compiler bug */
++	if ((x = lseek64(fd, x, 0)) < 0) {
+ 	    if (quiet == 0) {
+ 		error(errno, "Can't seek on file");
+ 	    }
+diff --git a/kernel-defs.h b/kernel-defs.h
+new file mode 100644
+index 0000000..5f15fd4
+--- /dev/null
++++ b/kernel-defs.h
+@@ -0,0 +1,64 @@
++/* from asm/types.h */
++typedef unsigned short __u16;
++typedef unsigned int __u32;
++
++/* from linux/hdreg.h */
++#define HDIO_GETGEO		0x0301	/* get device geometry */
++
++struct hd_geometry {
++      unsigned char heads;
++      unsigned char sectors;
++      unsigned short cylinders;
++      unsigned long start;
++};
++
++/* from asm/ioctl.h */
++#define _IOC_NRBITS	8
++#define _IOC_TYPEBITS	8
++#define _IOC_SIZEBITS	13
++#define _IOC_DIRBITS	3
++
++#define _IOC_NRMASK	((1 << _IOC_NRBITS)-1)
++#define _IOC_TYPEMASK	((1 << _IOC_TYPEBITS)-1)
++#define _IOC_SIZEMASK	((1 << _IOC_SIZEBITS)-1)
++#define _IOC_DIRMASK	((1 << _IOC_DIRBITS)-1)
++
++#define _IOC_NRSHIFT	0
++#define _IOC_TYPESHIFT	(_IOC_NRSHIFT+_IOC_NRBITS)
++#define _IOC_SIZESHIFT	(_IOC_TYPESHIFT+_IOC_TYPEBITS)
++#define _IOC_DIRSHIFT	(_IOC_SIZESHIFT+_IOC_SIZEBITS)
++
++#ifdef __powerpc__
++#define _IOC_NONE	1U
++#define _IOC_READ	2U
++#define _IOC_WRITE	4U
++#else
++#define _IOC_NONE	0U
++#define _IOC_READ	2U
++#define _IOC_WRITE	1U
++#endif
++
++#define _IOC(dir,type,nr,size) \
++	(((dir)  << _IOC_DIRSHIFT) | \
++	 ((type) << _IOC_TYPESHIFT) | \
++	 ((nr)   << _IOC_NRSHIFT) | \
++	 ((size) << _IOC_SIZESHIFT))
++#define _IO(type,nr)		_IOC(_IOC_NONE,(type),(nr),0)
++
++/* from linux/fs.h */
++#define BLKRRPART  _IO(0x12,95)      /* re-read partition table */
++#define BLKFLSBUF  _IO(0x12,97)      /* flush buffer cache */
++
++/* from linux/genhd.h */
++struct partition {
++	unsigned char boot_ind;		/* 0x80 - active */
++	unsigned char head;		/* starting head */
++	unsigned char sector;		/* starting sector */
++	unsigned char cyl;		/* starting cylinder */
++	unsigned char sys_ind;		/* What partition type */
++	unsigned char end_head;		/* end head */
++	unsigned char end_sector;	/* end sector */
++	unsigned char end_cyl;		/* end cylinder */
++	unsigned int start_sect;	/* starting sector counting from 0 */
++	unsigned int nr_sects;		/* nr of sectors in partition */
++} __attribute__((packed));
+diff --git a/mac-fdisk.8.in b/mac-fdisk.8.in
+new file mode 100644
+index 0000000..31e3643
+--- /dev/null
++++ b/mac-fdisk.8.in
+@@ -0,0 +1,262 @@
++.TH MAC-FDISK 8 "1 December 2001" "Debian" "Apple Disk Partitioning Manual"
++.SH NAME
++mac-fdisk \- Apple partition table editor for Linux
++.SH SYNOPSIS
++.B mac-fdisk
++.B "[ \-h | \--help ] [ \-v | \--version ] [ \-l | \--list device ... ]"
++.br
++.B mac-fdisk
++.B "[ \-r | \--readonly ] device ... "
++.SH DESCRIPTION
++.B mac-fdisk
++is a command line type program which partitions disks using the standard Apple
++disk partitioning scheme described in "Inside Macintosh: Devices".
++The
++.I device
++is usually one of the following:
++
++.nf
++.RS
++/dev/sda
++/dev/sdb
++/dev/sdc
++/dev/sdd
++/dev/sde
++/dev/sdf
++/dev/sdg
++/dev/hda
++/dev/hdb
++
++.RE
++.fi
++/dev/sda is the first hard disk on the SCSI bus (i.e. the
++one with the lowest id), /dev/sdb is the second hard disk, and so on.
++The
++.I partition
++is a
++.I device
++name followed by a partition number.
++The partition number is the index (starting from one) of the partition
++map entry in the partition map (and the partition map itself occupies the
++first entry).
++For example,
++.B /dev/sda2
++is the partition described by the second entry in the partiton map on /dev/sda.
++
++.SH OPTIONS
++.TP
++.B \-v | \--version
++Prints version number of the
++.B mac-fdisk
++program.
++.TP
++.B \-h | \--help
++Prints a list of available commands for the
++.B mac-fdisk
++program.
++.TP
++.B \-l | \--list
++Lists the partition tables for the specified
++.IR device(s).
++With no 
++.IR device(s)
++given, lists all SCSI and IDE devices found in the system.
++.TP
++.B \-r | \--readonly
++Prevents
++.B mac-fdisk
++from writing to the device.
++.SH "Editing Partition Tables"
++An argument which is simply the name of a
++.I device
++indicates that
++.B mac-fdisk
++should edit the partition table of that device. Once started, 
++.B mac-fdisk 
++presents an interactive command prompt to edit the partition table. 
++The partition editing commands are:
++
++.nf
++.RS
++h    list available commands
++p    print (list) the current edited partition table status
++P    print ordered by base address
++i    initialize the partition map
++s    change size of partition map
++b    create new 800K Apple_Bootstrap partition (used by yaboot)
++c    create new standard Linux type partition
++C    create new partition, specifying the partition type
++d    delete a partition
++r    reorder partition entry
++w    write the partition table to disk
++q    quit 
++
++.RE
++.fi
++Commands which take arguments prompt for each argument in turn.
++You can also type the arguments separated by spaces
++and those prompts will be skipped. The
++.B i
++and
++.B w
++commands will prompt for confirmation. None of the editing you do will 
++actually affect the state of the disk you are partitioning until the 
++.B w 
++command is issued. Then the map in its edited state will be 
++permanently written to the disk.
++
++Partitions are always specified by their number, the index of the
++partition entry in the partition map.  Many commands will change the
++index numbers of partitions which follow the affected partition; you are
++encouraged to use the 
++.B p
++command to print the partition table as frequently as necessary. For SCSI
++disks, the partition table should not contain more than fifteen partitions 
++(partition map excluded). IDE disks have a limit of 31 partitions.
++
++Here is a more-or-less typical output for the print command:
++
++.nf
++.RS
++Command (? for help): p
++/dev/sdb
++        #                type name              length   base    ( size )  system
++/dev/sdb1 Apple_partition_map Apple                 63 @ 1       ( 31.5k)  Partition map
++/dev/sdb2      Apple_Driver43 Macintosh             54 @ 64      ( 27.0k)  Driver 4.3
++/dev/sdb3      Apple_Driver43 Macintosh             74 @ 118     ( 37.0k)  Driver 4.3
++/dev/sdb4  Apple_Driver_IOKit Macintosh            512 @ 192     (256.0k)  Unknown
++/dev/sdb5       Apple_Patches Patch Partition      512 @ 704     (256.0k)  Unknown
++/dev/sdb6           Apple_HFS untitled         3072000 @ 1216    (  1.5G)  HFS
++/dev/sdb7           Apple_HFS untitled 2        333026 @ 3073216 (162.6M)  HFS
++/dev/sdb8          Apple_Free Extra                 10 @ 3406242 (  5.0k)  Free space
++
++Block size=512, Number of Blocks=3406252
++DeviceType=0x0, DeviceId=0x0
++Drivers-
++1: @ 64 for 22, type=0x1
++2: @ 118 for 36, type=0xffff
++
++.RE
++.fi
++
++The
++.B i
++(initialize) command prompts for the size of the device.  You can just
++type Return to accept the offered size, which should be correct.
++
++The
++.B b
++command is a shortcut to create the bootstrap partition used on PowerPC
++NewWorld machines. It is equivalent to creating an 800k
++.B Apple_Bootstrap
++type partition using the 
++.B C
++command described below. The sole purpose of this partition is to
++store the boot loader. In multiboot environments, the first bootable
++partition found on the disk takes precedence unless a specific boot
++partition is set in OpenFirmware, so it's best to create the bootstrap
++partition first, or move it to a position before any
++.B Apple_HFS 
++or 
++.B Apple_Boot
++partitions using the 
++.B r
++command described below. Then you will still able to boot Linux after
++the occasional OpenFirmware reset.
++
++The
++.B c
++(create new partition) command has three arguments. As mentioned
++above you can type the arguments following the command, separated by
++spaces, or respond to prompts for each argument:
++
++  1) The base address of the start of the partition.
++
++     You can specify a number in blocks (most likely reading from the
++     existing partition map) or you can also type a partition number
++     followed by the letter 'p' to indicate that the new partition
++     should take the place of that existing free space partition.
++
++  2) The length of the partition.
++
++     Again, you can specify a number in blocks or type a partition
++     number followed by the letter 'p' to indicate use of the entire
++     partition. You can also type a number followed by 'k', 'm', or
++     'g' to indicate the size in kilobytes, megabytes, or gigabytes
++     respectively. (These are powers of 1024, of course, not powers
++     of 1000.)
++
++  3) The name of the partition.
++
++     This can be a single word without quotes, or a string surrounded
++     by single or double quotes. It is best to name any swap partition
++     you create `swap'; other partition names are up to you. The names
++     are not visible to Linux.
++
++The
++.B C
++command is identical to the
++.B c
++command, with the addition of a partition type argument after the
++other arguments. The partition type used for Linux swap and data partitons
++is 
++.B APPLE_UNIX_SVR2
++(this is the partition type created by the 
++.B c
++command). Under normal circumstances, you should not need to use this
++command.
++
++The
++.B d
++command deletes the partition number specified, replacing that partition 
++with partitionable free space.
++
++The
++.B r
++(reorder) command allows the index number of partitions to be changed.
++The index numbers are constrained to be a contiguous sequence. 
++.B mac-fdisk
++will enforce this constraint by recalculating the partition numbers
++after each insert, delete or reorder operation. OpenFirmware looks for
++bootable partitions in the order specified by the index. The
++partitions are not moved on the disk. This command takes two
++arguments, the number of the partition to be moved and the partition
++number it should become.
++
++The
++.B w
++command writes the partition map out to disk. Note that partition
++maps for disks with mounted partitions cannot immediately be
++reinterpreted by the kernel. In order to use the new partition map you
++must reboot. Within the Debian installer system, 
++.B mac-fdisk 
++is normally invoked before any partitions are mounted, thus a reboot is not 
++necessary before continuing the installation.
++
++The
++.B q
++command terminates the program. If there was no 
++.B w
++command issued during the program run, then there will be no effect on the disk.
++
++.SH BUGS
++Some people believe there should really be just one disk partitioning utility.
++
++.B mac-fdisk
++should be able to create HFS partitions that work. Currently, if a
++pre-existing HFS partition is resized, MacOS will continue to use the
++partition size stored in the HFS 'superblock' instead of using the size from
++the partition table (the MacOS volume on the partition remains valid even
++though the sizes don't match anymore). This can have undesired side effects
++especially when creating a smaller HFS partition followed by a few Linux 
++partitions in place of the previous HFS partition space. To avoid this 
++issue, create MacOS partitions within MacOS and then don't resize them 
++in 
++.B mac-fdisk.
++
++.SH "SEE ALSO"
++.BR fdisk (8), 
++.BR mkswap (8),
++.BR mkfs (8)
++.SH AUTHOR
++Eryk Vershen (eryk@HIDDEN), man page revised by Chris Tillman (tillman@HIDDEN)
+diff --git a/partition_map.c b/partition_map.c
+index 113f66b..6ca2c16 100644
+--- a/partition_map.c
++++ b/partition_map.c
+@@ -30,14 +30,12 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #endif
+-#include <string.h>
+ #include <errno.h>
+ 
+ #include <fcntl.h>
+ #ifdef __linux__
+ #include <sys/ioctl.h>
+-#include <linux/fs.h>
+-#include <linux/hdreg.h>
++#include "kernel-defs.h"
+ #include <sys/stat.h>
+ #endif
+ 
+@@ -65,6 +63,8 @@
+ const char * kFreeType	= "Apple_Free";
+ const char * kMapType	= "Apple_partition_map";
+ const char * kUnixType	= "Apple_UNIX_SVR2";
++const char * kBootstrapType = "Apple_Bootstrap";
++const char * kBootstrapName = "bootstrap";
+ 
+ const char * kFreeName = "Extra";
+ 
+@@ -288,15 +288,17 @@ write_partition_map(partition_map_header *map)
+ 	    free(block);
+ 	}
+     }
+-    printf("The partition table has been altered!\n\n");
++    printf("The partition map has been saved successfully!\n\n");
+ 
+ #ifdef __linux__
+     if (map->regular_file) {
+ 	close_device(map->fd);
+     } else {
+-	// printf("Calling ioctl() to re-read partition table.\n"
+-	//       "(Reboot to ensure the partition table has been updated.)\n");
+-	sync();
++	// printf("Calling ioctl() to re-read partition table.\n");
++	if ((i = ioctl(fd, BLKFLSBUF)) != 0) {
++	    perror("ioctl(BLKFLSBUF)");
++	    sync();
++	}
+ 	sleep(2);
+ 	if ((i = ioctl(fd, BLKRRPART)) != 0) {
+ 	    saved_errno = errno;
+@@ -304,20 +306,26 @@ write_partition_map(partition_map_header *map)
+ 	    // some kernel versions (1.2.x) seem to have trouble
+ 	    // rereading the partition table, but if asked to do it
+ 	    // twice, the second time works. - biro@HIDDEN */
+-	    sync();
++	    // printf("Again calling ioctl() to re-read partition table.\n");
++	    if ((i = ioctl(fd, BLKFLSBUF)) != 0) {
++	    	perror("ioctl(BLKFLSBUF)");
++		sync();
++	    }
+ 	    sleep(2);
+ 	    if ((i = ioctl(fd, BLKRRPART)) != 0) {
+ 		saved_errno = errno;
+ 	    }
+ 	}
++	printf("Syncing disks.\n");
++	if ((i = ioctl(fd, BLKFLSBUF)) != 0) {
++	    perror("ioctl(BLKFLSBUF)");
++	    sync();
++	}
+ 	close_device(map->fd);
+-
+-	// printf("Syncing disks.\n");
+-	sync();
+ 	sleep(4);		/* for sync() */
+ 
+ 	if (i < 0) {
+-	    error(saved_errno, "Re-read of partition table failed");
++	    error(saved_errno, "Re-read of partition map failed");
+ 	    printf("Reboot your system to ensure the "
+ 		    "partition table is updated.\n");
+ 	}
+@@ -692,9 +700,9 @@ compute_device_size(int fd)
+ 		geometry.heads*geometry.sectors*geometry.cylinders);
+     }
+ 
+-    if ((pos = llseek(fd, 0, SEEK_END)) < 0) {
++    if ((pos = lseek64(fd, 0, SEEK_END)) < 0) {
+ 	printf("llseek to end of device failed\n");
+-    } else if ((pos = llseek(fd, 0, SEEK_CUR)) < 0) {
++    } else if ((pos = lseek64(fd, 0, SEEK_CUR)) < 0) {
+ 	printf("llseek to end of device failed on second try\n");
+     } else {
+ 	printf("llseek: pos = %d, blocks=%d\n", pos, pos/PBLOCK_SIZE);
+@@ -895,6 +903,7 @@ move_entry_in_map(long old_index, long index, partition_map_header *map)
+ 	printf("No such partition\n");
+     } else {
+ 	remove_from_disk_order(cur);
++	if (old_index < index) index++; /* renumber_disk_addresses(map); */
+ 	cur->disk_address = index;
+ 	insert_in_disk_order(cur);
+ 	renumber_disk_addresses(map);
+diff --git a/partition_map.h b/partition_map.h
+index 90f2210..526f605 100644
+--- a/partition_map.h
++++ b/partition_map.h
+@@ -69,6 +69,8 @@ typedef struct partition_map partition_map;
+ extern const char * kFreeType;
+ extern const char * kMapType;
+ extern const char * kUnixType;
++extern const char * kBootstrapType;
++extern const char * kBootstrapName;
+ 
+ extern const char * kFreeName;
+ 
+diff --git a/pdisk.c b/pdisk.c
+index 52f98c7..a9bc629 100644
+--- a/pdisk.c
++++ b/pdisk.c
+@@ -30,18 +30,17 @@
+ #include <stdio.h>
+ #ifdef __linux__
+ #include <getopt.h>
++#include <stddef.h>
+ #else
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <SIOUX.h>
+ #endif
+-#include <string.h>
+ #include <errno.h>
+ 
+ #ifdef __linux__
+ #include <sys/ioctl.h>
+-#include <linux/fs.h>
+-#include <linux/hdreg.h>
++#include "kernel-defs.h"
+ #endif
+ 
+ #include "pdisk.h"
+@@ -94,6 +93,7 @@ int rflag;
+ void do_add_intel_partition(partition_map_header *map);
+ void do_change_map_size(partition_map_header *map);
+ void do_create_partition(partition_map_header *map, int get_type);
++void do_create_bootstrap_partition(partition_map_header *map);
+ void do_delete_partition(partition_map_header *map);
+ int do_expert(partition_map_header *map);
+ void do_reorder(partition_map_header *map);
+@@ -114,6 +114,7 @@ int
+ main(int argc, char **argv)
+ {
+     int name_index;
++    int err=0;
+ 
+     if (sizeof(DPME) != PBLOCK_SIZE) {
+ 	fatal(-1, "Size of partion map entry (%d) "
+@@ -150,7 +151,9 @@ main(int argc, char **argv)
+     } else if (!vflag) {
+ 	usage("no device argument");
+  	do_help();
++	err=-EINVAL;	// debatable
+     }
++    exit(err);
+ }
+ #else
+ main()
+@@ -351,7 +354,8 @@ edit(char *name)
+ 	    printf("  P    (print ordered by base address)\n");
+ 	    printf("  i    initialize partition map\n");
+ 	    printf("  s    change size of partition map\n");
+-	    printf("  c    create new partition\n");
++	    printf("  b    create new 800K bootstrap partition\n");
++	    printf("  c    create new Linux partition\n");
+ 	    printf("  C    (create with type also specified)\n");
+ 	    printf("  d    delete a partition\n");
+ 	    printf("  r    reorder partition entry in map\n");
+@@ -378,6 +382,10 @@ edit(char *name)
+ 	case 'i':
+ 	    map = init_partition_map(name, map);
+ 	    break;
++	case 'B':
++	case 'b':
++	    do_create_bootstrap_partition(map);
++	    break;
+ 	case 'C':
+ 	    get_type = 1;
+ 	    // fall through
+@@ -471,6 +479,30 @@ do_create_partition(partition_map_header *map, int get_type)
+ }
+ 
+ 
++void
++do_create_bootstrap_partition(partition_map_header *map)
++{
++    long base;
++
++    if (map == NULL) {
++	bad_input("No partition map exists");
++	return;
++    }
++ 
++    if (!rflag && map->writeable == 0) {
++	printf("The map is not writeable.\n");
++    }
++
++    // XXX add help feature (i.e. '?' in any argument routine prints help string)
++    if (get_base_argument(&base, map) == 0) {
++	return;
++    }
++
++    // create 800K type Apple_Bootstrap partition named `bootstrap'
++    add_partition_to_map(kBootstrapName, kBootstrapType, base, 1600, map);
++}
++
++
+ int
+ get_base_argument(long *number, partition_map_header *map)
+ {
+@@ -508,7 +540,7 @@ get_size_argument(long *number, partition_map_header *map)
+     int result = 0;
+     long multiple;
+ 
+-    if (get_number_argument("Length in blocks: ", number, kDefault) == 0) {
++    if (get_number_argument("Length (in blocks, kB (k), MB (M) or GB (G)): ", number, kDefault) == 0) {
+ 	bad_input("Bad length");
+     } else {
+ 	result = 1;
+@@ -605,13 +637,22 @@ do_write_partition_map(partition_map_header *map)
+ 	bad_input("The map is not writeable.");
+ 	return;
+     }
+-    printf("Writing the map destroys what was there before. ");
+-    if (get_okay("Is that okay? [n/y]: ", 0) != 1) {
++//    printf("Writing the map destroys what was there before. ");
++    printf("IMPORTANT: You are about to write a changed partition map to disk. \n");
++    printf("For any partition you changed the start or size of, writing out \n");
++    printf("the map causes all data on that partition to be LOST FOREVER. \n");
++    printf("Make sure you have a backup of any data on such partitions you \n");
++    printf("want to keep before answering 'yes' to the question below! \n\n");
++    if (get_okay("Write partition map? [n/y]: ", 0) != 1) {
+ 	return;
+     }
+ 
+     write_partition_map(map);
+ 
++    printf("\nPartition map written to disk. If any partitions on this disk \n");
++    printf("were still in use by the system (see messages above), you will need \n");
++    printf("to reboot in order to utilize the new partition map.\n\n");
++
+     // exit(0);
+ }
+ 
+diff --git a/pmac-fdisk.8.in b/pmac-fdisk.8.in
+new file mode 100644
+index 0000000..8e32c0c
+--- /dev/null
++++ b/pmac-fdisk.8.in
+@@ -0,0 +1,222 @@
++.\" Copyright 1992, 1993 Rickard E. Faith (faith@HIDDEN)
++.\" Copyright 1998 Andries E. Brouwer (aeb@HIDDEN)
++.\" Copyright 2000 Michael Schmitz (schmitz@HIDDEN)
++.\" May be distributed under the GNU General Public License
++.TH PMAC-FDISK 8 "11 June 1998" "Linux 2.0" "Linux Programmer's Manual"
++.SH NAME
++pmac-fdisk \- Partition table manipulator for Linux
++.SH SYNOPSIS
++.BI "pmac-fdisk [\-u] " device
++.sp
++.BI "pmac-fdisk \-l [\-u] " "device ..."
++.sp
++.BI "pmac-fdisk \-s " "partition ..."
++.sp
++.BI "pmac-fdisk \-v
++.SH DESCRIPTION
++Hard disks can be divided into one or more logical disks called
++.IR partitions .
++This division is described in the
++.I "partition table"
++found in sector 0 of the disk.
++
++In the BSD world one talks about `disk slices' and a `disklabel'.
++
++Linux needs at least one partition, namely for its root file system.
++It can use swap files and/or swap partitions, but the latter are more
++efficient. So, usually one will want a second Linux partition
++dedicated as swap partition.
++On Intel compatible hardware, the BIOS that boots the system
++can often only access the first 1024 cylinders of the disk.
++For this reason people with large disks often create a third partition,
++just a few MB large, typically mounted on
++.IR /boot ,
++to store the kernel image and a few auxiliary files needed at boot time,
++so as to make sure that this stuff is accessible to the BIOS.
++There may be reasons of security, ease of administration and backup,
++or testing, to use more than the minimum number of partitions.
++
++.B pmac-fdisk
++(in the first form of invocation)
++is a menu driven program for creation and manipulation of
++partition tables.
++It understands DOS type partition tables and BSD or SUN type disklabels.
++
++The
++.I device
++is usually one of the following:
++.br
++.nf
++.RS
++/dev/hda
++/dev/hdb
++/dev/sda
++/dev/sdb
++.RE
++.fi
++(/dev/hd[a-h] for IDE disks, /dev/sd[a-p] for SCSI disks).
++A device name refers to the entire disk.
++
++The
++.I partition
++is a
++.I device
++name followed by a partition number.  For example,
++.B /dev/hda1
++is the first partition on the first IDE hard disk in the system.
++IDE disks can have up to 63 partitions, SCSI disks up to 15.
++See also
++.IR /usr/src/linux/Documentation/devices.txt .
++
++A BSD/SUN type disklabel can describe 8 partitions,
++the third of which should be a `whole disk' partition.
++Do not start a partition that actually uses its first sector
++(like a swap partition) at cylinder 0, since that will
++destroy the disklabel.
++
++An IRIX/SGI type disklabel can describe 16 partitions,
++the eleventh of which should be an entire `volume' partition,
++while the ninth should be labeled `volume header'.
++The volume header will also cover the partition table, i.e.,
++it starts at block zero and extends by default over five cylinders.
++The remaining space in the volume header may be used by header
++directory entries.  No partitions may overlap with the volume header.
++Also do not change its type and make some file system on it, since
++you will lose the partition table.  Use this type of label only when
++working with Linux on IRIX/SGI machines or IRIX/SGI disks under Linux.
++
++A DOS type partition table can describe an unlimited number
++of partitions. In sector 0 there is room for the description
++of 4 partitions (called `primary'). One of these may be an
++extended partition; this is a box holding logical partitions,
++with descriptors found in a linked list of sectors, each
++preceding the corresponding logical partitions.
++The four primary partitions, present or not, get numbers 1-4.
++Logical partitions start numbering from 5.
++
++In a DOS type partition table the starting offset and the size
++of each partition is stored in two ways: as an absolute number
++of sectors (given in 32 bits) and as a Cylinders/Heads/Sectors
++triple (given in 10+8+6 bits). The former is OK - with 512-byte
++sectors this will work up to 2 TB. The latter has two different
++problems. First of all, these C/H/S fields can be filled only
++when the number of heads and the number of sectors per track
++are known. Secondly, even if we know what these numbers should be,
++the 24 bits that are available do not suffice.
++DOS uses C/H/S only, Windows uses both, Linux never uses C/H/S.
++
++If possible,
++.B pmac-fdisk
++will obtain the disk geometry automatically.  This is not
++necessarily the physical disk geometry (indeed, modern disks do not
++really have anything like a physical geometry, certainly not something
++that can be described in simplistic Cylinders/Heads/Sectors form),
++but is the disk geometry that MS-DOS uses for the partition table.
++
++Usually all goes well by default, and there are no problems if
++Linux is the only system on the disk. However, if the disk has
++to be shared with other operating systems, it is often a good idea
++to let an fdisk from another operating system make at least one
++partition. When Linux boots it looks at the partition table, and
++tries to deduce what (fake) geometry is required for good
++cooperation with other systems.
++
++Whenever a partition table is printed out, a consistency check is performed
++on the partition table entries.  This check verifies that the physical and
++logical start and end points are identical, and that the partition starts
++and ends on a cylinder boundary (except for the first partition).
++
++Some versions of MS-DOS create a first partition which does not begin
++on a cylinder boundary, but on sector 2 of the first cylinder.
++Partitions beginning in cylinder 1 cannot begin on a cylinder boundary, but
++this is unlikely to cause difficulty unless you have OS/2 on your machine.
++
++A sync() and a BLKRRPART ioctl() (reread partition table from disk)
++are performed before exiting when the partition table has been updated.
++Long ago it used to be necessary to reboot after the use of pmac-fdisk.
++I do not think this is the case anymore - indeed, rebooting too quickly
++might cause loss of not-yet-written data. Note that both the kernel
++and the disk hardware may buffer data.
++
++.SH "DOS 6.x WARNING"
++
++The DOS 6.x FORMAT command looks for some information in the first
++sector of the data area of the partition, and treats this information
++as more reliable than the information in the partition table.  DOS
++FORMAT expects DOS FDISK to clear the first 512 bytes of the data area
++of a partition whenever a size change occurs.  DOS FORMAT will look at
++this extra information even if the /U flag is given -- we consider
++this a bug in DOS FORMAT and DOS FDISK.
++
++The bottom line is that if you use pmac-fdisk to change the size of a
++DOS partition table entry, then you must also use
++.B dd
++to zero the first 512 bytes of that partition before using DOS FORMAT to
++format the partition.  For example, if you were using pmac-fdisk to make a 
++DOS partition table entry for /dev/hda1, then (after exiting pmac-fdisk 
++and rebooting Linux so that the partition table information is valid) you
++would use the command "dd if=/dev/zero of=/dev/hda1 bs=512 count=1" to zero
++the first 512 bytes of the partition.
++
++.B BE EXTREMELY CAREFUL
++if you use the
++.B dd
++command, since a small typo can make all of the data on your disk useless.
++
++For best results, you should always use an OS-specific partition table
++program.  For example, you should make DOS partitions with the DOS FDISK
++program and Linux partitions with the Linux pmac-fdisk program.
++
++.SH OPTIONS
++.TP
++.B \-v
++Print version number of
++.B pmac-fdisk
++program and exit.
++.TP
++.B \-l
++List the partition tables for
++.BR /dev/hd[a-d] ,
++.BR /dev/sd[a-h] ,
++and then exit.
++.TP
++.B \-u
++When listing partition tables, give sizes in sectors instead
++of cylinders.
++.TP
++.BI "\-s " partition
++The
++.I size
++of the partition (in blocks) is printed on the standard output.
++.SH BUGS
++There are several *fdisk programs around.
++Each has its problems and strengths.
++Try them in the order
++.BR cfdisk ,
++.BR pmac-fdisk ,
++.BR sfdisk .
++(Indeed,
++.B cfdisk
++is a beautiful program that has strict requirements on
++the partition tables it accepts, and produces high quality partition
++tables. Use it if you can. 
++.B pmac-fdisk
++is a buggy program that does fuzzy things - usually it happens to
++produce reasonable results. Its single advantage is that it has
++some support for BSD disk labels and other non-DOS partition tables.
++Avoid it if you can.
++.B sfdisk
++is for hackers only - the user interface is terrible, but it is
++more correct than pmac-fdisk and more powerful than both pmac-fdisk and cfdisk.
++Moreover, it can be used noninteractively.)
++.PP
++The IRIX/SGI type disklabel is currently not supported by the kernel.
++Moreover, IRIX/SGI header directories are not fully supported yet.
++.PP
++The option `dump partition table to file' is missing.
++.\" .SH AUTHORS
++.\" A. V. Le Blanc (LeBlanc@HIDDEN)
++.\" Bernhard Fastenrath (fasten@HIDDEN)
++.\" Jakub Jelinek (jj@HIDDEN)
++.\" Andreas Neuper (ANeuper@HIDDEN)
++.\" and many others.
+-- 
+2.26.2
+
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 12:35:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 08:35:20 2021
Received: from localhost ([127.0.0.1]:39474 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTkvP-0003vH-Pn
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:35:20 -0400
Received: from flashner.co.il ([178.62.234.194]:45572)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTkvN-0003uz-5C
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:35:17 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id 840524024A;
 Tue,  6 Apr 2021 12:35:11 +0000 (UTC)
From: Efraim Flashner <efraim@HIDDEN>
To: 47615 <at> debbugs.gnu.org,
	guix-devel@HIDDEN
Subject: [PATCH 4/9] gnu: mesa: Add support for powerpc-linux.
Date: Tue,  6 Apr 2021 15:32:48 +0300
Message-Id: <3a5dddb867370ce5f91fa7e1b5051f2bba5fcec5.1617711307.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.31.1
In-Reply-To: <cover.1617711307.git.efraim@HIDDEN>
References: <cover.1617711307.git.efraim@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: Efraim Flashner <efraim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/gl.scm (mesa)[inputs]: Add llvm, glslang for powerpc.
[arguments]: Customize the configure flags for powerpc. Skip tests on
powerpc.
---
 gnu/packages/gl.scm | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm
index ee29a79366..3b6a829031 100644
--- a/gnu/packages/gl.scm
+++ b/gnu/packages/gl.scm
@@ -271,7 +271,7 @@ also known as DXTn or DXTC) for Mesa.")
         ("libxrandr" ,libxrandr)
         ("libxvmc" ,libxvmc)
         ,@(match (%current-system)
-            ((or "x86_64-linux" "i686-linux")
+            ((or "x86_64-linux" "i686-linux" "powerpc-linux")
              ;; Note: update the 'clang' input of mesa-opencl when bumping this.
              `(("llvm" ,llvm-11)))
             (_
@@ -283,7 +283,7 @@ also known as DXTn or DXTC) for Mesa.")
         ("flex" ,flex)
         ("gettext" ,gettext-minimal)
         ,@(match (%current-system)
-            ((or "x86_64-linux" "i686-linux")
+            ((or "x86_64-linux" "i686-linux" "powerpc-linux")
              `(("glslang" ,glslang)))
             (_
              `()))
@@ -298,6 +298,8 @@ also known as DXTn or DXTC) for Mesa.")
              ((or "armhf-linux" "aarch64-linux")
               ;; TODO: Fix svga driver for aarch64 and armhf.
               '("-Dgallium-drivers=etnaviv,freedreno,kmsro,lima,nouveau,panfrost,r300,r600,swrast,tegra,v3d,vc4,virgl"))
+             ("powerpc-linux"
+              '("-Dgallium-drivers=nouveau,r300,r600,radeonsi,swrast,virgl"))
              (_
               '("-Dgallium-drivers=iris,nouveau,r300,r600,radeonsi,svga,swrast,virgl")))
          ;; Enable various optional features.  TODO: opencl requires libclc,
@@ -318,12 +320,14 @@ also known as DXTn or DXTC) for Mesa.")
          ,@(match (%current-system)
              ((or "i686-linux" "x86_64-linux")
               '("-Dvulkan-drivers=intel,amd"))
+             ("powerpc-linux"   ; No default on this platform.
+              '("-Dvulkan-drivers=amd"))
              (_
               '("-Dvulkan-drivers=auto")))
 
          ;; Enable the Vulkan overlay layer on i686-linux and x86-64-linux.
          ,@(match (%current-system)
-             ((or "x86_64-linux" "i686-linux")
+             ((or "x86_64-linux" "i686-linux" "powerpc-linux")
               '("-Dvulkan-overlay-layer=true"))
              (_
               '()))
@@ -337,6 +341,9 @@ also known as DXTn or DXTC) for Mesa.")
              ((or "x86_64-linux" "i686-linux")
               '("-Ddri-drivers=i915,i965,nouveau,r200,r100"
                 "-Dllvm=enabled"))      ; default is x86/x86_64 only
+             ("powerpc-linux"
+              '("-Ddri-drivers=nouveau,r200,r100"
+                "-Dllvm=enabled"))
              (_
               '("-Ddri-drivers=nouveau,r200,r100"))))
 
@@ -344,6 +351,11 @@ also known as DXTn or DXTC) for Mesa.")
        ;; documentation recommends using 'release' for performance anyway.
        #:build-type "release"
 
+       ;; The llvm-based tests are flakey on non-Intel hardware.
+       #:tests? ,(if (string=? "powerpc-linux" (or (%current-system)
+                                                   (%current-target-system)))
+                   '#f '#t)
+
        #:modules ((ice-9 match)
                   (srfi srfi-1)
                   (guix build utils)
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 12:34:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 08:34:46 2021
Received: from localhost ([127.0.0.1]:39469 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTkus-0003to-6n
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:34:46 -0400
Received: from flashner.co.il ([178.62.234.194]:45566)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTkup-0003ta-Um
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:34:44 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id 124E54024A;
 Tue,  6 Apr 2021 12:34:37 +0000 (UTC)
From: Efraim Flashner <efraim@HIDDEN>
To: 47615 <at> debbugs.gnu.org,
	guix-devel@HIDDEN
Subject: [PATCH 3/9] gnu: binutils: Adjust test suite on powerpc-linux.
Date: Tue,  6 Apr 2021 15:32:47 +0300
Message-Id: <cff09d1a4d4201f5568bccfaad96fb624a1f4165.1617711307.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.31.1
In-Reply-To: <cover.1617711307.git.efraim@HIDDEN>
References: <cover.1617711307.git.efraim@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: Efraim Flashner <efraim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/base.scm (binutils)[arguments]: Add phase on
powerpc-linux to adjust the test suite.
* gnu/packages/commencement.scm (binutils-boot0)[arguments]: Move custom
phases after inherited arguments. Add phase on powerpc-linux to adjust
the test suite.
---
 gnu/packages/base.scm         | 11 ++++++++++-
 gnu/packages/commencement.scm | 21 ++++++++++++++++-----
 2 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index dbb7c619fe..b9fc0a6e29 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -531,7 +531,16 @@ change.  GNU make offers many powerful extensions over the standard utility.")
 
                           ;; Make sure 'ar' and 'ranlib' produce archives in a
                           ;; deterministic fashion.
-                          "--enable-deterministic-archives")))
+                          "--enable-deterministic-archives")
+      ,@(if (string=? (%current-system) "powerpc-linux")
+          `(#:phases
+            (modify-phases %standard-phases
+              (add-after 'unpack 'disable-rust-libiberty-test
+                (lambda _
+                  (substitute* "libiberty/testsuite/Makefile.in"
+                    ((" check-rust-demangle ") ""))
+                  #t))))
+          '())))
 
    (synopsis "Binary utilities: bfd gas gprof ld")
    (description
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 7c39a84008..f707a01d30 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2653,7 +2653,22 @@ exec " gcc "/bin/" program
        #:modules ((guix build gnu-build-system)
                   (guix build utils)
                   (ice-9 ftw))                    ; for 'scandir'
+
+       ;; #:phases gets modified for powerpc-linux in binutils,
+       ;; so #:phases here needs to be after the inherited one.
+       ,@(substitute-keyword-arguments (package-arguments binutils)
+           ((#:configure-flags cf)
+            `(cons ,(string-append "--target=" (boot-triplet))
+                   ,cf)))
+
        #:phases (modify-phases %standard-phases
+                  ,@(if (string=? (%current-system) "powerpc-linux")
+                      '((add-after 'unpack 'disable-rust-libiberty-test
+                          (lambda _
+                            (substitute* "libiberty/testsuite/Makefile.in"
+                              ((" check-rust-demangle ") ""))
+                            #t)))
+                      '())
                   (add-after 'install 'add-symlinks
                     (lambda* (#:key outputs #:allow-other-keys)
                       ;; The cross-gcc invokes 'as', 'ld', etc, without the
@@ -2667,12 +2682,8 @@ exec " gcc "/bin/" program
                         (with-directory-excursion (string-append out "/bin")
                           (for-each (lambda (name)
                                       (symlink name (remove-triplet-prefix name)))
-                                    (scandir "." has-triplet-prefix?)))))))
+                                    (scandir "." has-triplet-prefix?)))))))))
 
-       ,@(substitute-keyword-arguments (package-arguments binutils)
-           ((#:configure-flags cf)
-            `(cons ,(string-append "--target=" (boot-triplet))
-                   ,cf)))))
     (inputs (%boot0-inputs))))
 
 (define libstdc++-boot0
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 12:34:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 08:34:13 2021
Received: from localhost ([127.0.0.1]:39466 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTkuK-0003sy-Ra
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:34:13 -0400
Received: from flashner.co.il ([178.62.234.194]:45560)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTkuJ-0003sm-9l
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:34:11 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id 231D84024A;
 Tue,  6 Apr 2021 12:34:05 +0000 (UTC)
From: Efraim Flashner <efraim@HIDDEN>
To: 47615 <at> debbugs.gnu.org,
	guix-devel@HIDDEN
Subject: [PATCH 2/9] gnu: guile-3.0: Fix building on powerpc-linux.
Date: Tue,  6 Apr 2021 15:32:46 +0300
Message-Id: <c11ad7faa3690b2dfef924a31137f6ced5aab23f.1617711307.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.31.1
In-Reply-To: <cover.1617711307.git.efraim@HIDDEN>
References: <cover.1617711307.git.efraim@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: Efraim Flashner <efraim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* gnu/packages/guile.scm (guile-3.0)[arguments]: On powerpc add two
phases to adjust for 32-bit big-endian systems.
---
 gnu/packages/guile.scm | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index f63322794d..dca1b1c16f 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -305,7 +305,26 @@ without requiring the source code to be rewritten.")
          (substitute-keyword-arguments (package-arguments guile-2.2)
            ((#:configure-flags flags ''())
             `(cons "--disable-jit" ,flags)))
-         (package-arguments guile-2.2)))
+         (if (string-prefix? "powerpc-" (%current-system))
+           (substitute-keyword-arguments (package-arguments guile-2.2)
+             ((#:phases phases)
+              `(modify-phases ,phases
+                 (add-after 'unpack 'adjust-bootstrap-flags
+                   (lambda _
+                     ;; Upstream not yet notified about suggested solution.
+                     ;; See existing bug reports:
+                     ;; https://debbugs.gnu.org/cgi/bugreport.cgi?bug=45214
+                     ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977223
+                     (substitute* "bootstrap/Makefile.in"
+                       (("^GUILE_OPTIMIZATIONS.*")
+                        "GUILE_OPTIMIZATIONS = -O1 -Oresolve-primitives -Ocps\n"))
+                     #t))
+                 (add-after 'unpack 'remove-failing-tests
+                   (lambda _
+                     ;; TODO: Discover why this test fails on powerpc-linux
+                     (delete-file "test-suite/standalone/test-out-of-memory")
+                     #t)))))
+           (package-arguments guile-2.2))))
     (native-search-paths
      (list (search-path-specification
             (variable "GUILE_LOAD_PATH")
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at 47615 <at> debbugs.gnu.org:


Received: (at 47615) by debbugs.gnu.org; 6 Apr 2021 12:33:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 08:33:35 2021
Received: from localhost ([127.0.0.1]:39462 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTktj-0003rl-8D
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:33:35 -0400
Received: from flashner.co.il ([178.62.234.194]:45552)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTktg-0003rY-SA
 for 47615 <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:33:33 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id ED4CB4024A;
 Tue,  6 Apr 2021 12:33:26 +0000 (UTC)
From: Efraim Flashner <efraim@HIDDEN>
To: 47615 <at> debbugs.gnu.org,
	guix-devel@HIDDEN
Subject: [PATCH 1/9] gnu: bootstrap: Add support for powerpc-linux.
Date: Tue,  6 Apr 2021 15:32:45 +0300
Message-Id: <e690c54ea603e68c01240e8155aa122e06f6ccd4.1617711307.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.31.1
In-Reply-To: <cover.1617711307.git.efraim@HIDDEN>
References: <cover.1617711307.git.efraim@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 47615
Cc: Efraim Flashner <efraim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On 923bb70a1bff657125c3008f119a477e5cb57c2b
   gnu:glibc-for-bootstrap: Fix patch.

Run
    ./pre-inst-env guix build --target=powerpc-linux-gnu bootstrap-tarballs

Producing

    /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0

With guix hash -rx /gnu/store/dyj1wvayyp1ihaknkxniz1xamcf4yrhl-bootstrap-tarballs-0

    02xx2ydj28pwv3vflqffinpq1icj09gzi9icm8j4bwc4lca9irxn

* gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for
powerpc-linux.
(%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils,
%bootstrap-glibc, %bootstrap-gcc): Add entry for powerpc-linux.
* gnu/packages.scm (%supported-systems): Add powerpc-linux.
(%hydra-supported-systems): Remove powerpc-linux.
* m4/guix.m4: Add powerpc-linux as a supported system.
---
 gnu/packages/bootstrap.scm | 37 ++++++++++++++++++++++++++++++++++++-
 guix/packages.scm          |  4 ++--
 m4/guix.m4                 |  4 ++--
 3 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c50e94e891..049735013a 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -89,6 +89,15 @@
       ,(base32 "1j51gv08sfg277yxj73xd564wjq3f8xwd6s9rbcg8v9gms47m4cx"))
      ("xz"
       ,(base32 "1d779rwsrasphg5g3r37qppcqy3p7ay1jb1y83w7x4i3qsc7zjy2")))
+    ("powerpc-linux"
+     ("bash"
+      ,(base32 "0hwlw5lcyjzadprf5fm0cv4zb6jw667g9amnmhq0lbixasy7j72j"))
+     ("mkdir"
+      ,(base32 "12lfwh5p8pp06250wgi9mdvjv1jdfpd5xpmvfc0616aj0xqh09hp"))
+     ("tar"
+      ,(base32 "00sbmwl8qh6alxv9mw4hvj1j4yipwmw5mrw6qad8bi2pr7ya5386"))
+     ("xz"
+      ,(base32 "0hi47y6zh5zz137i59l5ibw92x6g54zn7ris1b1ym9rvavsasg7b")))
     ("armhf-linux"
      ("bash"
       ,(base32 "0s6f1s26g4dsrrkl39zblvwpxmbzi6n9mgqf6vxsqz42gik6bgyn"))
@@ -139,6 +148,7 @@
   ;; This is where the bootstrap executables come from.
   '("https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
     "https://alpha.gnu.org/gnu/guix/bootstrap/"
+    "http://flashner.co.il/guix/bootstrap/"
     "http://lilypond.org/janneke/guix/"))
 
 (define (bootstrap-executable-file-name system program)
@@ -146,6 +156,7 @@
   (match system
     ("powerpc64le-linux" (string-append system "/20210106/" program))
     ("i586-gnu" (string-append system "/20200326/" program))
+    ("powerpc-linux" (string-append system "/20200923/bin/" program))
     (_ (string-append system "/" program
                       "?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))))
 
@@ -341,6 +352,8 @@ or false to signal an error."
                  (match system
                    ("aarch64-linux"
                     "/20170217/guile-2.0.14.tar.xz")
+                   ("powerpc-linux"
+                    "/20200923/guile-2.0.14.tar.xz")
                    ("armhf-linux"
                     "/20150101/guile-2.0.11.tar.xz")
                    ("i586-gnu"
@@ -366,7 +379,9 @@ or false to signal an error."
     ("aarch64-linux"
      (base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
     ("i586-gnu"
-     (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))))
+     (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))
+    ("powerpc-linux"
+     (base32 "1by2p7s27fbyjzfkcw8h65h4kkqh7d23kv4sgg5jppjn2qx7swq4"))))
 
 (define (bootstrap-guile-origin system)
   "Return an <origin> object for the Guile tarball of SYSTEM."
@@ -500,6 +515,8 @@ $out/bin/guile --version~%"
                                              "/20210106/static-binaries-0-powerpc64le-linux-gnu.tar.xz")
                                             ("i586-gnu"
                                              "/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
+                                            ("powerpc-linux"
+                                             "/20200923/static-binaries.tar.xz")
                                             (_
                                              "/20131110/static-binaries.tar.xz")))
                                      %bootstrap-base-urls))
@@ -523,6 +540,9 @@ $out/bin/guile --version~%"
                               ("i586-gnu"
                                (base32
                                 "17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
+                              ("powerpc-linux"
+                               (base32
+                                "0kspxy0yczan2vlih6aa9hailr2inz000fqa0gn5x9d1fxxa5y8m"))
                               ("mips64el-linux"
                                (base32
                                 "072y4wyfsj1bs80r6vbybbafy8ya4vfy7qj25dklwk97m6g71753"))))))
@@ -573,6 +593,8 @@ $out/bin/guile --version~%"
                                              "/20210106/binutils-static-stripped-2.34-powerpc64le-linux-gnu.tar.xz")
                                             ("i586-gnu"
                                              "/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
+                                            ("powerpc-linux"
+                                             "/20200923/binutils-2.35.1.tar.xz")
                                             (_
                                              "/20131110/binutils-2.23.2.tar.xz")))
                                      %bootstrap-base-urls))
@@ -596,6 +618,9 @@ $out/bin/guile --version~%"
                               ("i586-gnu"
                                (base32
                                 "11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
+                              ("powerpc-linux"
+                               (base32
+                                "0asbg1c4avkrvh057mx0942xwddd136jni382zqsxzn79ls42yq8"))
                               ("mips64el-linux"
                                (base32
                                 "1x8kkhcxmfyzg1ddpz2pxs6fbdl6412r7x0nzbmi5n7mj8zw2gy7"))))))
@@ -653,6 +678,8 @@ $out/bin/guile --version~%"
                                        "/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
                                       ("i586-gnu"
                                        "/20200326/glibc-stripped-2.31-i586-pc-gnu.tar.xz")
+                                      ("powerpc-linux"
+                                       "/20200923/glibc-2.32.tar.xz")
                                       (_
                                        "/20131110/glibc-2.18.tar.xz")))
                                %bootstrap-base-urls))
@@ -676,6 +703,9 @@ $out/bin/guile --version~%"
                         ("i586-gnu"
                          (base32
                           "14ddm10lpbas8bankmn5bcrlqvz1v5dnn1qjzxb19r57vd2w5952"))
+                        ("powerpc-linux"
+                         (base32
+                          "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
                         ("mips64el-linux"
                          (base32
                           "0k97a3whzx3apsi9n2cbsrr79ad6lh00klxph9hw4fqyp1abkdsg")))))))))
@@ -749,6 +779,8 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
                                         "/20210106/gcc-stripped-5.5.0-powerpc64le-linux-gnu.tar.xz")
                                        ("i586-gnu"
                                         "/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
+                                       ("powerpc-linux"
+                                        "/20200923/gcc-5.5.0.tar.xz")
                                        (_
                                         "/20131110/gcc-4.8.2.tar.xz")))
                                 %bootstrap-base-urls))
@@ -772,6 +804,9 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
                          ("i586-gnu"
                           (base32
                            "1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))
+                         ("powerpc-linux"
+                          (base32
+                           "1p7df3yixhm87dw5sccc6yn1i9db1r9hnmsg87wq5xi4rfmirq7w"))
                          ("mips64el-linux"
                           (base32
                            "1m5miqkyng45l745n0sfafdpjkqv9225xf44jqkygwsipj2cv9ks")))))))))
diff --git a/guix/packages.scm b/guix/packages.scm
index 56173e1204..e60201d8fc 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -350,7 +350,7 @@ name of its URI."
   ;; This is the list of system types that are supported.  By default, we
   ;; expect all packages to build successfully here.
   '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux" "mips64el-linux" "i586-gnu"
-    "powerpc64le-linux"))
+    "powerpc64le-linux" "powerpc-linux"))
 
 (define %hurd-systems
   ;; The GNU/Hurd systems for which support is being developed.
@@ -361,7 +361,7 @@ name of its URI."
   ;;
   ;; XXX: MIPS is unavailable in CI:
   ;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
-  (fold delete %supported-systems '("mips64el-linux")))
+  (fold delete %supported-systems '("mips64el-linux" "powerpc-linux")))
 
 
 ;; A package.
diff --git a/m4/guix.m4 b/m4/guix.m4
index 05d409a674..e778a56004 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -1,7 +1,7 @@
 dnl GNU Guix --- Functional package management for GNU
 dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@HIDDEN>
 dnl Copyright © 2014 Mark H Weaver <mhw@HIDDEN>
-dnl Copyright © 2017 Efraim Flashner <efraim@HIDDEN>
+dnl Copyright © 2017, 2020 Efraim Flashner <efraim@HIDDEN>
 dnl Copyright © 2021 Chris Marusich <cmmarusich@HIDDEN>
 dnl
 dnl This file is part of GNU Guix.
@@ -89,7 +89,7 @@ courageous and port the GNU System distribution to it (see
   # Currently only Linux-based systems are supported, and only on some
   # platforms.
   case "$guix_system" in
-    x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux)
+    x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux|powerpc-linux)
       ;;
     *)
       if test "x$guix_courageous" = "xyes"; then
-- 
2.31.1





Information forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 6 Apr 2021 12:25:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Apr 06 08:25:35 2021
Received: from localhost ([127.0.0.1]:39445 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lTklz-0003dE-3P
	for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:25:35 -0400
Received: from lists.gnu.org ([209.51.188.17]:56374)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1lTklx-0003d6-Kl
 for submit <at> debbugs.gnu.org; Tue, 06 Apr 2021 08:25:34 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36840)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <efraim@HIDDEN>)
 id 1lTklv-0003bc-B4; Tue, 06 Apr 2021 08:25:31 -0400
Received: from flashner.co.il ([178.62.234.194]:42268)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <efraim@HIDDEN>)
 id 1lTklp-0004bJ-A8; Tue, 06 Apr 2021 08:25:31 -0400
Received: from localhost (unknown [31.210.177.71])
 by flashner.co.il (Postfix) with ESMTPSA id B8434402D4;
 Tue,  6 Apr 2021 12:24:51 +0000 (UTC)
From: Efraim Flashner <efraim@HIDDEN>
To: guix-patches@HIDDEN,
	guix-devel@HIDDEN
Subject: [PATCH 0/9] Add 32-bit powerpc support
Date: Tue,  6 Apr 2021 15:24:12 +0300
Message-Id: <cover.1617711307.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.31.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=178.62.234.194;
 envelope-from=efraim@HIDDEN; helo=flashner.co.il
X-Spam_score_int: -18
X-Spam_score: -1.9
X-Spam_bar: -
X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Efraim Flashner <efraim@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

https://git.savannah.gnu.org/cgit/guix.git/log/?h=wip-ppc

The wip-ppc branch on Savannah is currently in a good state. With the
recent rapid churn on core-updates I haven't been very quick about
rebasing on core-updates but I can confirm that building out to mesa
works. Building is slow, it took 6 days to build from guile-final to
mesa without stopping.

The patches start with adding the bootstrap binaries for powerpc.

The next patch fixes guile-3.0.2+ on powerpc (and probably other 32-bit
big-endian systems) and is the result of almost 3 weeks of bisecting.

Next is a patch for binutils to disable one of the tests. The test is
new to core-updates, and fails on powerpc-linux but not the other
architectures we support.

The mesa patch works, but I have to see about enabling the tests. I have
also tested updating mesa and enabling the llvm backend on aarch64 and
the tests no longer fail there, so I'll do another couple (3 hour) mesa
builds to see if the comment needs adjusting or if the tests can be
enabled on powerpc-linux.

mac-fdisk I didn't have a solid reason to put in the wip-ppc branch but
there it is. I need to change CC=gcc to use cc-for-target.

The patch for american-fuzzy-lop I snuck into master

the qemu-command in gnu/build/vm shouldn't overlap with ppc64le.

the last two patches, disabling the tests for mercurial and nss, can
probably be dropped. The comments are accurate though, and we have done
similar in the past on mips64le and armhf.

Efraim Flashner (9):
  gnu: bootstrap: Add support for powerpc-linux.
  gnu: guile-3.0: Fix building on powerpc-linux.
  gnu: binutils: Adjust test suite on powerpc-linux.
  gnu: mesa: Add support for powerpc-linux.
  gnu: Add mac-fdisk.
  gnu: american-fuzzy-lop: Add support for powerpc-linux.
  build: qemu-command: Add support for powerpc.
  gnu: mercurial: Skip tests on powerpc-linux.
  gnu: nss: Skip tests on powerpc-linux.

 gnu/build/vm.scm                              |    1 +
 gnu/local.mk                                  |    2 +
 gnu/packages/base.scm                         |   11 +-
 gnu/packages/bootstrap.scm                    |   37 +-
 gnu/packages/commencement.scm                 |   21 +-
 gnu/packages/debug.scm                        |    2 +
 gnu/packages/disk.scm                         |   44 +
 gnu/packages/gl.scm                           |   18 +-
 gnu/packages/guile.scm                        |   21 +-
 gnu/packages/nss.scm                          |    7 +-
 .../patches/mac-fdisk-gentoo-patchset.patch   |  866 +++++++
 gnu/packages/patches/mac-fdisk-p18.patch      | 2070 +++++++++++++++++
 gnu/packages/version-control.scm              |    6 +-
 guix/packages.scm                             |    4 +-
 m4/guix.m4                                    |    4 +-
 15 files changed, 3096 insertions(+), 18 deletions(-)
 create mode 100644 gnu/packages/patches/mac-fdisk-gentoo-patchset.patch
 create mode 100644 gnu/packages/patches/mac-fdisk-p18.patch


base-commit: f08b070019a3c1697bb0b4a783dcd4f31243715a
-- 
2.31.1





Acknowledgement sent to Efraim Flashner <efraim@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#47615; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 6 Apr 2021 22:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.