* [PATCH nixpkgs] spectrumPackages.rootfs: fix custom path entries
@ 2021-03-15 13:58 Alyssa Ross
2021-03-15 23:11 ` Cole Helbling
0 siblings, 1 reply; 3+ messages in thread
From: Alyssa Ross @ 2021-03-15 13:58 UTC (permalink / raw)
To: devel
Stage 1 was supposed to be able to take a list of PATH entries to
prepend to the default PATH, but it didn't do anything with them.
Now, it properly adds them to the PATH as early as possible during
boot.
This mechanism isn't currently used anywhere, but is very useful for
debugging.
---
pkgs/os-specific/linux/spectrum/rootfs/generic.nix | 3 ++-
pkgs/os-specific/linux/spectrum/rootfs/stage1.nix | 7 +++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/pkgs/os-specific/linux/spectrum/rootfs/generic.nix b/pkgs/os-specific/linux/spectrum/rootfs/generic.nix
index 0a99f99bd5b..81fb80a614f 100644
--- a/pkgs/os-specific/linux/spectrum/rootfs/generic.nix
+++ b/pkgs/os-specific/linux/spectrum/rootfs/generic.nix
@@ -8,7 +8,8 @@
let
makeStage1 = import ./stage1.nix {
inherit writeScript lib
- execline s6 s6-portable-utils s6-linux-utils s6-linux-init busybox mesa;
+ execline s6 s6-portable-utils s6-linux-utils s6-linux-init busybox mesa
+ path;
};
makeServicesDir = import ./services.nix {
diff --git a/pkgs/os-specific/linux/spectrum/rootfs/stage1.nix b/pkgs/os-specific/linux/spectrum/rootfs/stage1.nix
index be7853316e9..6caf9ff93b8 100644
--- a/pkgs/os-specific/linux/spectrum/rootfs/stage1.nix
+++ b/pkgs/os-specific/linux/spectrum/rootfs/stage1.nix
@@ -1,16 +1,19 @@
{ writeScript, lib
, execline, s6, s6-portable-utils, s6-linux-utils, s6-linux-init, busybox, mesa
+, path ? []
}:
{ run ? "true" }:
let
- path = [ s6 s6-portable-utils s6-linux-utils s6-linux-init busybox execline ];
+ path' = path ++ [
+ s6 s6-portable-utils s6-linux-utils s6-linux-init busybox execline
+ ];
in
writeScript "init-stage1" ''
#! ${execline}/bin/execlineb -P
- export PATH ${lib.makeBinPath path}
+ export PATH ${lib.makeBinPath path'}
${s6}/bin/s6-setsid -qb --
importas -i spectrumcmd spectrumcmd
--
2.30.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH nixpkgs] spectrumPackages.rootfs: fix custom path entries
2021-03-15 13:58 [PATCH nixpkgs] spectrumPackages.rootfs: fix custom path entries Alyssa Ross
@ 2021-03-15 23:11 ` Cole Helbling
2021-03-16 0:48 ` Alyssa Ross
0 siblings, 1 reply; 3+ messages in thread
From: Cole Helbling @ 2021-03-15 23:11 UTC (permalink / raw)
To: Alyssa Ross, devel
On Mon Mar 15, 2021 at 6:58 AM PDT, Alyssa Ross wrote:
> Stage 1 was supposed to be able to take a list of PATH entries to
> prepend to the default PATH, but it didn't do anything with them.
> Now, it properly adds them to the PATH as early as possible during
> boot.
>
> This mechanism isn't currently used anywhere, but is very useful for
> debugging.
> ---
> pkgs/os-specific/linux/spectrum/rootfs/generic.nix | 3 ++-
> pkgs/os-specific/linux/spectrum/rootfs/stage1.nix | 7 +++++--
> 2 files changed, 7 insertions(+), 3 deletions(-)
Stuff that helps debugging is good!
Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH nixpkgs] spectrumPackages.rootfs: fix custom path entries
2021-03-15 23:11 ` Cole Helbling
@ 2021-03-16 0:48 ` Alyssa Ross
0 siblings, 0 replies; 3+ messages in thread
From: Alyssa Ross @ 2021-03-16 0:48 UTC (permalink / raw)
To: Cole Helbling; +Cc: devel
[-- Attachment #1: Type: text/plain, Size: 775 bytes --]
On Mon, Mar 15, 2021 at 04:11:42PM -0700, Cole Helbling wrote:
> On Mon Mar 15, 2021 at 6:58 AM PDT, Alyssa Ross wrote:
> > Stage 1 was supposed to be able to take a list of PATH entries to
> > prepend to the default PATH, but it didn't do anything with them.
> > Now, it properly adds them to the PATH as early as possible during
> > boot.
> >
> > This mechanism isn't currently used anywhere, but is very useful for
> > debugging.
> > ---
> > pkgs/os-specific/linux/spectrum/rootfs/generic.nix | 3 ++-
> > pkgs/os-specific/linux/spectrum/rootfs/stage1.nix | 7 +++++--
> > 2 files changed, 7 insertions(+), 3 deletions(-)
>
> Stuff that helps debugging is good!
>
> Reviewed-by: Cole Helbling <cole.e.helbling@outlook.com>
Committed as d85408e1193. Thanks for the review!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-16 0:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 13:58 [PATCH nixpkgs] spectrumPackages.rootfs: fix custom path entries Alyssa Ross
2021-03-15 23:11 ` Cole Helbling
2021-03-16 0:48 ` Alyssa Ross
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
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 NNTP newsgroup(s).