Preserve roster seeding and extend packaged multicall checks
Verify bare unit commands through init PATH lookup and cargo run. Assisted-by: SurmAgent:unknown [read] [edit] [bash]
This commit is contained in:
@@ -134,6 +134,7 @@
|
||||
'') |> lib.concatStrings}
|
||||
cp -R --no-preserve=mode ${src}/. $out/src/sausage/
|
||||
cp ${./config/config.yaml} $out/etc/sausage/config.yaml
|
||||
cp -R ${./config/roster} $out/etc/sausage/roster
|
||||
cp ${./userland/web/web.service} $out/etc/systemd/system/web.service
|
||||
touch $out/etc/systemd/system/multi-user.target.wants/web.service
|
||||
cp ${./userland/web/index.html} ${./userland/web/credentials.js} ${./userland/web/credentials-view.js} $out/srv/www/
|
||||
@@ -187,6 +188,7 @@
|
||||
grep -qx 42 output
|
||||
grep -q payload output
|
||||
test -d "$TMPDIR/world/world/src/sausage/extensions"
|
||||
test -f "$TMPDIR/world/world/etc/sausage/roster/sausage.md"
|
||||
touch $out
|
||||
'';
|
||||
apps.default = { type = "app"; program = "${sausage}/bin/sausage"; };
|
||||
|
||||
@@ -18,6 +18,17 @@ ps | grep -q PID
|
||||
sh -c 'echo sh OK'
|
||||
bash -c 'echo bash OK'
|
||||
qjs -e 'console.log("qjs source OK")'
|
||||
rm /etc/systemd/system/multi-user.target.wants/web.service
|
||||
mkdir -p /run/systemd/requests /run/systemd/replies /run/systemd/state
|
||||
set -m
|
||||
init > /init.stdout 2> /init.stderr &
|
||||
supervisor=$!
|
||||
set +m
|
||||
systemd-run --unit alias --wait -p Type=oneshot touch /init-PATH-ok
|
||||
test -f /init-PATH-ok
|
||||
echo 'init PATH OK'
|
||||
/bin/kill "$supervisor"
|
||||
wait "$supervisor" || true
|
||||
mkdir -p /src/projects
|
||||
cd /src/projects
|
||||
cargo new packaged-probe --vcs none
|
||||
@@ -29,7 +40,7 @@ cargo run --release
|
||||
print --no-newline $result.stdout
|
||||
print --stderr --no-newline $result.stderr
|
||||
if $result.exit_code != 0 { error make {msg: 'packaged builder failed'} }
|
||||
for expected in ['coreutils OK' 'sh OK' 'bash OK' 'qjs source OK' 'packaged builder OK'] {
|
||||
for expected in ['coreutils OK' 'sh OK' 'bash OK' 'qjs source OK' 'init PATH OK' 'packaged builder OK'] {
|
||||
if not ($result.stdout | lines | any {|line| $line == $expected }) {
|
||||
error make {msg: $'packaged check did not print: ($expected)'}
|
||||
}
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ def main [destination?: path] {
|
||||
mkdir $settings
|
||||
^cp --remove-destination ($snapshot | path join config config.yaml) ($settings | path join config.yaml)
|
||||
if $env.LAST_EXIT_CODE != 0 { error make {msg: 'default config copy failed'} }
|
||||
^cp -r ($snapshot | path join config roster) ($settings | path join roster)
|
||||
^cp -r ($snapshot | path join config roster) $settings
|
||||
if $env.LAST_EXIT_CODE != 0 { error make {msg: 'default roster copy failed'} }
|
||||
print $destination
|
||||
}
|
||||
|
||||
@@ -12,7 +12,10 @@ fn main() {
|
||||
}
|
||||
let name = uucore::util_name();
|
||||
let name = name.strip_suffix(".wasm").unwrap_or(name);
|
||||
let locale = match name { "dir" | "vdir" => "ls", _ => name };
|
||||
let locale = match name {
|
||||
"dir" | "vdir" => "ls",
|
||||
_ => name,
|
||||
};
|
||||
uucore::locale::setup_localization(locale).expect("utility supplies localization");
|
||||
let args = uucore::args_os().skip(usize::from(second));
|
||||
let code = match name {
|
||||
@@ -94,7 +97,10 @@ fn main() {
|
||||
"vdir" => uu_vdir::uumain(args),
|
||||
"wc" => uu_wc::uumain(args),
|
||||
"yes" => uu_yes::uumain(args),
|
||||
_ => { eprintln!("coreutils: unknown utility: {name}"); 127 }
|
||||
_ => {
|
||||
eprintln!("coreutils: unknown utility: {name}");
|
||||
127
|
||||
}
|
||||
};
|
||||
std::process::exit(code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user