From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id mABoE5zAcGRieAAASxT56A (envelope-from ) for ; Fri, 26 May 2023 16:22:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id UKQlE5zAcGSSDAAA9RJhRA (envelope-from ) for ; Fri, 26 May 2023 16:22:20 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B89B93FF90 for ; Fri, 26 May 2023 16:22:19 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2YKT-0007tJ-AT; Fri, 26 May 2023 10:22:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2YKR-0007sm-EG for bug-guix@gnu.org; Fri, 26 May 2023 10:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2YKR-0007YR-5w for bug-guix@gnu.org; Fri, 26 May 2023 10:22:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2YKQ-0000Aa-6f for bug-guix@gnu.org; Fri, 26 May 2023 10:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63738: [PATCH glibc] Stop checking if MiG supports retcode. Resent-From: Joshua Branson Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 26 May 2023 14:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63738 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: janneke@gnu.org Cc: guix-devel@gnu.org, 63738@debbugs.gnu.org X-Debbugs-Original-Cc: guix-devel@gnu.org, bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1685110891592 (code B ref -1); Fri, 26 May 2023 14:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 26 May 2023 14:21:31 +0000 Received: from localhost ([127.0.0.1]:50501 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2YJu-00009T-8F for submit@debbugs.gnu.org; Fri, 26 May 2023 10:21:31 -0400 Received: from lists.gnu.org ([209.51.188.17]:36016) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2YJr-00009J-T5 for submit@debbugs.gnu.org; Fri, 26 May 2023 10:21:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2YJq-0005zc-4K; Fri, 26 May 2023 10:21:26 -0400 Received: from mx1.dismail.de ([78.46.223.134]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2YJh-0007Ia-QB; Fri, 26 May 2023 10:21:25 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id faea2b21; Fri, 26 May 2023 16:21:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=20190914; bh=cwEKkd4P rIVktczQoH5gl796j7lwKbQSEjSQHkN21DQ=; b=hfQkqEbx1FmIncKIr3WOMPb2 wZVIwrH3ax4tzlCuyZOtL58qcx5kh7YheOiqJ/Bf4Wam75ewwNL87XkLDUXnUBZt JT+9KQ7kv2h3FWZdDsAev1c4eFN13Qaq8nN+jqxnB/yw9EsAAVfOxxlDsqmQGtny 3Tr5l7ja7KT3ROSIqpRCoueujybB/3OmWRi4zBNjdzbutQ/Xyr1CzJh2KavHNjos tXXgVi809xKIJjE7inYlG1+WILmUXSnJPiPNZDUeCS/+Wl6xd2i1oD2sAUxVaFBM GuqwQtDljLYq/nKFTGksAuPX+I0QUxSMQpAhcM+WFwqT8UaD75W4RXZUx5NdMA== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 9c689108; Fri, 26 May 2023 16:21:11 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id ce8b35f2; Fri, 26 May 2023 16:21:11 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 484d9236 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Fri, 26 May 2023 16:21:10 +0200 (CEST) References: X-Gnus-Sucks: I know man Date: Fri, 26 May 2023 10:21:04 -0400 In-Reply-To: ("=?UTF-8?Q?Fl=C3=A1vio?= Cruz"'s message of "Fri, 26 May 2023 08:00:00 -0400") Message-ID: <87353jb2cv.fsf@dismail.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=78.46.223.134; envelope-from=jbranso@dismail.de; helo=mx1.dismail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Joshua Branson From: Joshua Branson via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685110939; a=rsa-sha256; cv=none; b=WDCcw+ejftT1Dh944nMx52GzWxxOzX3IG/fP8L+DfQ1EVH1Jde6FWOXswrsDtYZbgW1oeg +c465RXZBFH0b3+EJeJ2FCxKNpyj4vm6c/pyQkYsWg6jQAUxdI5zwk6U8A2dSAPsEEtXrx eixnVeAN8WKsCpk4bqNtMk8vW9fRm6ZHtFDvxxa0MkqWhl1LbzHCBSw6VOBSQSzPtrnSn3 BAbnwDT/g8CmEFtS5dYdWFnOEr2i8JJOAnEbO2slTkcIWv9gFY5UtUmHHqjQemlg7iMXTw ObpGysparefxDbcqwmwC5vi53bGVvcCAEziBsDM7xB0V2CHRXjJnaFF+jRRNJA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=dismail.de header.s=20190914 header.b=hfQkqEbx; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685110939; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=1qxCc36IU3sXbGHGPrGYluqab5Uyyr9rY9cq1fEc6sU=; b=ugWqSVsldXHjClAl05ab7wCeW8G1a34F2og/iJSMAqIAjYbwQbHvuux6gUjS10kLMyAZ1u bBVoEjOJlavRuMUwfDYib8waKe/FucCzkmI6Bq3EKGy4R/lUq1YIKOGY+tdXLNZyk4xi27 A6WJ9L3dRCPxy58R9sAvNfTT0hYyEIaAooL/iSRgyUd8k+q+UYdNksJIl0oRCkb401izw4 1RLIyW8pseEFTTJ0JvIW+//bL8La7IYfqD0BxGhYz0HnBaENejlss/pOrqWhlWC2/sOAFC 1F33AHNpOWRaYHEj6NscvFML1sRDyRGgN/A78OIh9a0lzJOHziklvXdwgcoXEQ== X-Migadu-Spam-Score: -2.01 X-Spam-Score: -2.01 X-Migadu-Queue-Id: B89B93FF90 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=dismail.de header.s=20190914 header.b=hfQkqEbx; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-TUID: ts2tpjewUCm1 Hey guix people! The Hurd developers having a 64 bit Hurd that can run /bin/sh. The below are some tips for how to set up such a thing if you were so inclined. The Debian people are providing 64-bit hurd applications here for now: https://people.debian.org/~sthibault/tmp/hurd-amd64 Fl=C3=A1vio Cruz writes: > Hi Sergey > > On Fri, May 19, 2023 at 4:02=E2=80=AFAM Sergey Bugaev = wrote: > > Hi, > > On Fri, May 19, 2023 at 9:43=E2=80=AFAM Fl=C3=A1vio Cruz > wrote: > > I have made changes so that it does daily builds and I'm able to boot > small programs. However, I haven't had the time to boot programs built > against Glibc. How do you package and boot the static binaries using a > ramdisk? I've been reading the other threads about the Guix/rumpkernel > so I might be able to piece something together and try it this weekend. > > You just put the entirety of the root filesystem (containing /usr, > /bin, /lib, /hurd, and so on) as an ext2 image into a *file* that you > place onto the actual drive (a CD disk in my case), and then you ask > GRUB to load the file from the drive into memory, tell gnumach to make > a ramdisk device out of it (you'll need to apply [0]), and tell ext2fs > to use that device. Here's the relevant piece of my grub config > script: > > [0]: > https://salsa.debian.org/hurd-team/gnumach/-/blob/master/debian/patches/= 50_initrd.patch >=20=20 > > multiboot /boot/gnumach console=3Dcom0 > module /boot/initrd.ext2 initrd.ext2 '$(ramdisk-create)' > module /sbin/ext2fs.static ext2fs > --multiboot-command-line=3D'${kernel-command-line}' --readonly > --host-priv-port=3D'${host-port}' --device-master-port=3D'${device-port}' > --exec-server-task=3D'${exec-task}' --kernel-task=3D'${kernel-task}' -T > device rd0 '$(fs-task=3Dtask-create)' '$(prompt-task-resume)' > module /lib/ld.so.1 ld.so.1 /hurd/exec > --device-master-port=3D'${device-port}' '$(exec-task=3Dtask-create)' > boot > > (I should probably change it to not hardcode 'rd0', but whatever). > Note that /boot/gnumach, /boot/initrd.ext2, /sbin/ext2fs.static, and > /lib/ld.so.1 are all paths inside the CD image (those are going to be > loaded by GRUB), and /boot/initrd.ext2 is the ext2 filesystem image > containing the actual Hurd root. /hurd/exec however is already a path > inside the fs image -- this is where ld.so (not grub) is going to load > the exec server from. The only static binary here is ext2fs.static, > the rest are all dynamically linked. > > Then in /libexec/console-run (inside the filesystem image), I have > written the following: > > #! /bin/sh > > settrans -ac /dev/mach-console /hurd/streamio console > exec <>/dev/mach-console >&0 2>&0 > echo Hello from /bin/sh! > exec /bin/sh -i > > (If you're going to do the same, don't forget to create the > /dev/mach-console node beforehand, since the fs is read-only.) I also > had to patch streamio a little to do the \r -> \n conversion like > glibc already does in devstream: > > diff --git a/trans/streamio.c b/trans/streamio.c > index 272a002c..0af1aea3 100644 > --- a/trans/streamio.c > +++ b/trans/streamio.c > @@ -500,6 +500,9 @@ trivfs_S_io_read (struct trivfs_protid *cred, > cred->po->openmodes & O_NONBLOCK); > pthread_mutex_unlock (&global_lock); > *data_len =3D data_size; > + for (size_t i =3D 0; i < data_size; i++) > + if ((*data)[i] =3D=3D '\r') > + (*data)[i] =3D '\n'; > return err; > } > > (maybe I should also add echoing of input characters in the same way, > which is also what glibc's devstream does -- otherwise currently I > don't see what I'm typing on the console). > > Make sure to use the very latest glibc (Samuel has already pushed all > of my patches upstream!) + the BRK_START hack. > > Thanks for the instructions. I was able to make it work and pushed my > changes to Github. > > For people that might want to try out the new port using > https://github.com/flavioc/cross-hurd, > the following will download the packages and build a disk image with the = ram > disk: > > $ export CPU=3Dx86_64 > $ bash download.sh && bash bootstrap.sh && bash compile.sh && bash > create-initrd.sh > > Then, to run qemu: > > $ bash start-qemu-debug.sh > > Sergey > --=20 Joshua Branson Sent from the Hurd