unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Thomas Schmitt <scdbackup@gmx.net>
Cc: bug-xorriso@gnu.org, guix-devel@gnu.org
Subject: Re: ISO installer image: GPT versus MBR partitions
Date: Thu, 25 Apr 2019 16:59:49 +0200	[thread overview]
Message-ID: <20190425165949.57fd4eba@scratchpost.org> (raw)
In-Reply-To: <20531677679849119589@scdbackup.webframe.org>

[-- Attachment #1: Type: text/plain, Size: 4507 bytes --]

> How comfortable is the Guix patching system ? :))

Very comfortable.  But we'd like not to diverge from upstream too much.
We are all in this together, so I'd like upstream to eventually converge on
a solution.  I'm fine with carrying a patch if it's coordinated by people with
knowledge about the matter at hand.  For multiple projects, we already carry
patches while they are being actively reviewed upstream in order to fix bugs.

If the problem is not too bad, I'd like the change to take the normal path
instead of us interfering with upstream.  But here, you *are* upstream so
it's really up to you whether we should patch xorriso or not.

As for people testing possible avenues by patches in Guix, that's easy to do.

> This is quite contrary to the expectations of partition editors, though.
> I deem this EFI's behavior a much clearer bug than the Macbook EFI's.
> So i stay with my proposal of native xorriso command
>   -boot_image any iso_mbr_part_type=0x83
> or mkisofs emulation option
>   -iso_mbr_part_type 0x83
> 
> (To my knowledge, the Guix xorriso run switches from mkisofs emulation
>  to native commands by "--". So -boot_image would be the one to use
>  if it gets appended to the other arguments.)
> 
> 
> > Add an option to “guix system disk-image” to select which
> > grub-mkrescue-sed.sh environment variables to enable?  
> 
> This would be great.

Since grub-mkrescue-sed.sh is part of xorriso, it's easy to get it
to where it needs to be (gnu/build/vm.scm) from where xorriso is
refererred to (gnu/system/vm.scm).  (Just pass the package as argument)
I can do that part.

The patches would then go into the xorriso package definition we carry
(gnu/packages/cdrom.scm) and modify grub-mkrescue-sed.sh in its output
(the patching part would require no Guile knowledge, they are just
".patch" files we distribute and automatically apply).

I'm not sure about amending "guix system disk-image" by options that
aren't really end user options, but I guess it can't be helped.

Basically they would just be something that we'd tell users which
have problems booting the Guix iso to use.  Even that is a lot to ask
from normal users--building a new installer ISO for the sake of
installing Guix.

> (I was brought up with HP BASIC and never was able to solve the Lisp
>  puzzles in german magazine Bild der Wissenschaft of the 1980s.
>  So i cannot help much with translating the usage gestures or even
>  the script itself from shell to Guile.)

Oh, I see.  It's fine if it's in a shell script.

We aren't opposed to shell scripts--sometimes (in initrd etc) we already have
Guile there and don't want to bloat the image by shells and shell utils.

But in this case, we would be patching the iso generator which requires
a lot of the system anyway, so who cares if we pull in the shell and 20
small utils?

Also, we try very hard to keep packages modular.

But if no care is taken, shell scripts take stuff from the global environment
and thus are very difficult to predict and isolate for modularity.

Think of what happens when someone replaces the "test" binary
in $PATH, or "sed".  It will unintentionally potentially completely
change the output depending on what the user has installed (it's definitely
not what the user intended to happen).

As a first countermeasure, we build inside isolated build containers, which
makes the problem less bad.  But then grub-mkrescue will invoke
grub-mkrescue-sed.sh at runtime, and who knows what the latter will pick up
as the sed to use?

(For that matter, think of what happens when another xorriso is somewhere
in $PATH and we use --xorriso=.../grub-mkrescue-sed.sh).  (I see that
you already take care to use a "closer" xorriso--but these kind of problems
pop up in shell scripts for almost every term used in there.  It's kinda
difficult to get them to behave)

What's more, shell scripts don't fail on error.  For example in
grub-mkrescue-sed.sh there's no "-e" in the shebang, which means that if
some command in there has an error, the shell will happily continue anyway.
I'm not blaming you, that's just the culture with shell scripts.

Even with "-e", if a command in a pipeline fails, it will sometimes still
not fail the shell script.  For that, you need "set -o pipefail" which is
a bash feature and not necessarily available on other shells (dash etc).

Guile, on the other hand, will just fail the script on error (usually).

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-04-25 15:00 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190415165451.dpzngealeisbibc7@pelzflorian.localdomain>
     [not found] ` <1582867226375139246@scdbackup.webframe.org>
2019-04-16  9:57   ` bug#33639: ISO installer image is broken on i686 Gábor Boskovits
2019-04-16 13:40     ` ISO installer image: GPT versus MBR partitions (was bug#33639) Thomas Schmitt
2019-04-16 16:32       ` pelzflorian (Florian Pelz)
2019-04-16 17:57         ` ISO installer image: GPT versus MBR partitions Thomas Schmitt
2019-04-16 19:55           ` pelzflorian (Florian Pelz)
2019-04-16 20:31             ` pelzflorian (Florian Pelz)
2019-04-16 21:15               ` Thomas Schmitt
2019-04-17  8:59                 ` pelzflorian (Florian Pelz)
2019-04-17 10:23                   ` Thomas Schmitt
2019-04-17 10:30                     ` pelzflorian (Florian Pelz)
2019-04-17 15:51                     ` Thomas Schmitt
2019-04-17 22:35                       ` pelzflorian (Florian Pelz)
2019-04-18  6:32                         ` Thomas Schmitt
2019-04-18  7:00                           ` Thomas Schmitt
2019-04-18  7:07                             ` pelzflorian (Florian Pelz)
2019-04-18  8:13                               ` Thomas Schmitt
2019-04-18 12:19                                 ` pelzflorian (Florian Pelz)
2019-04-18 13:50                                   ` Thomas Schmitt
2019-04-18 21:28                                     ` Thomas Schmitt
2019-04-19  7:29                                       ` pelzflorian (Florian Pelz)
2019-04-19  8:03                                     ` pelzflorian (Florian Pelz)
2019-04-19  9:01                                       ` Thomas Schmitt
2019-04-19  9:39                                         ` pelzflorian (Florian Pelz)
2019-04-19 10:58                                           ` Thomas Schmitt
2019-04-19 14:57                                             ` pelzflorian (Florian Pelz)
2019-04-19 11:30                                         ` pelzflorian (Florian Pelz)
2019-04-19 18:33                                           ` pelzflorian (Florian Pelz)
2019-04-19 19:23                                             ` Thomas Schmitt
2019-04-20 10:26                                               ` pelzflorian (Florian Pelz)
2019-04-20 10:50                                                 ` Thomas Schmitt
2019-04-20 11:16                                                   ` Thomas Schmitt
2019-04-20 11:29                                                     ` Thomas Schmitt
2019-04-20 14:23                                                       ` Thomas Schmitt
2019-04-20 14:54                                                         ` pelzflorian (Florian Pelz)
2019-04-20 15:17                                                           ` pelzflorian (Florian Pelz)
2019-04-20 15:33                                                           ` pelzflorian (Florian Pelz)
2019-04-20 16:32                                                             ` Thomas Schmitt
2019-04-21  7:58                                                               ` pelzflorian (Florian Pelz)
2019-04-21  9:35                                                                 ` Thomas Schmitt
2019-04-21 11:10                                                                   ` pelzflorian (Florian Pelz)
2019-04-21 11:16                                                                 ` Thomas Schmitt
2019-04-21 11:56                                                                   ` pelzflorian (Florian Pelz)
2019-04-21 12:27                                                                     ` Thomas Schmitt
2019-04-21 14:11                                                                       ` pelzflorian (Florian Pelz)
2019-04-21 14:36                                                                         ` Thomas Schmitt
2019-04-22 13:11                                                                           ` Thomas Schmitt
2019-04-23 16:40                                                                       ` pelzflorian (Florian Pelz)
2019-04-23 17:23                                                                         ` Thomas Schmitt
2019-04-17 12:24               ` Ludovic Courtès
2019-04-17 13:42                 ` pelzflorian (Florian Pelz)
2019-04-23 18:14       ` Thomas Schmitt
2019-04-23 19:50         ` pelzflorian (Florian Pelz)
2019-04-23 20:18           ` Thomas Schmitt
2019-04-23 21:43             ` pelzflorian (Florian Pelz)
2019-04-24  6:56               ` Thomas Schmitt
2019-04-24  9:13                 ` pelzflorian (Florian Pelz)
2019-04-24 10:34                   ` Thomas Schmitt
2019-04-24 22:13                     ` Danny Milosavljevic
2019-04-25  7:07                       ` Thomas Schmitt
2019-04-25  9:45                       ` pelzflorian (Florian Pelz)
2019-04-25 13:44                         ` Thomas Schmitt
2019-04-25 14:59                           ` Danny Milosavljevic [this message]
2019-04-25 16:22                             ` Thomas Schmitt
2019-04-25 17:55                               ` Danny Milosavljevic
2019-04-25 18:46                                 ` Thomas Schmitt
2019-04-25 19:01                                   ` Danny Milosavljevic
2019-04-25 16:34                         ` Ludovic Courtès
2019-04-26 11:34                           ` pelzflorian (Florian Pelz)
2019-04-26 14:41                             ` Ludovic Courtès
2019-04-26 15:30                               ` pelzflorian (Florian Pelz)
2019-04-26 13:57                           ` Thomas Schmitt
2019-04-27 13:20                             ` Ludovic Courtès
2019-04-27 16:24                               ` Thomas Schmitt
2019-04-28 12:53                                 ` Ludovic Courtès
2019-04-25 11:49                   ` pelzflorian (Florian Pelz)
2019-04-25 15:09                     ` Thomas Schmitt
2019-04-25 15:58                       ` pelzflorian (Florian Pelz)
2019-04-25 16:40                         ` Thomas Schmitt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190425165949.57fd4eba@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=bug-xorriso@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=scdbackup@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).