Skip to content

Commit

Permalink
quiz: update license headers, dates, SPDX tags
Browse files Browse the repository at this point in the history
  • Loading branch information
robn committed Jan 18, 2025
1 parent eb1efc5 commit aa21345
Show file tree
Hide file tree
Showing 16 changed files with 99 additions and 24 deletions.
9 changes: 9 additions & 0 deletions init/init1
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

# first-stage init; getting the filesystems up, then we bounce into the
# second-stage init in the quiz work dir
Expand Down Expand Up @@ -49,3 +56,5 @@ umount --lazy /mnt

# bounce into the second stage
exec /.quiz/init2

# vim: ft=sh
9 changes: 9 additions & 0 deletions init/init2
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

# second-stage init. filesystem is up, now actually boot the system and run
# the user program
Expand Down Expand Up @@ -67,3 +74,5 @@ fi

# start a "real" init and hand control to rc
exec tini -vwsg -- /bin/sh -l -- /.quiz/rc/run

# vim: ft=sh
7 changes: 4 additions & 3 deletions quiz
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash

# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Copyright (c) 2023, Rob Norris <[email protected]>
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

set -uo pipefail

Expand Down
7 changes: 4 additions & 3 deletions quiz-build-zfs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash

# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Copyright (c) 2023, Rob Norris <[email protected]>
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

set -uo pipefail

Expand Down
9 changes: 6 additions & 3 deletions quiz-cleanup
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash

# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Copyright (c) 2023, Rob Norris <[email protected]>
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

set -uo pipefail

Expand Down Expand Up @@ -133,3 +134,5 @@ for k in $cleanup_kernels ; do
fi
done
done

# vim: ft=bash
6 changes: 4 additions & 2 deletions quiz-config
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Copyright (c) 2023, Rob Norris <[email protected]>
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

# default config for 'quiz', including generated config
# don't change this, override in quiz.cfg
Expand Down
7 changes: 4 additions & 3 deletions quiz-lib
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash

# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Copyright (c) 2023, Rob Norris <[email protected]>
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

#
# Linux source version numbers (the tarball version) don't always match their
Expand Down
7 changes: 4 additions & 3 deletions quiz-prepare-kernel
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash

# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Copyright (c) 2023, Rob Norris <[email protected]>
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

set -uo pipefail

Expand Down
7 changes: 4 additions & 3 deletions quiz-prepare-root
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/usr/bin/env bash

# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Copyright (c) 2023, Rob Norris <[email protected]>
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

set -uo pipefail

Expand Down
2 changes: 2 additions & 0 deletions quiz.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ QUIZ_MEMDEV_COUNT=6

QUIZ_BLOCKDEV_COUNT=4
QUIZ_BLOCKDEV_SIZE=1G

# vim: ft=bash
9 changes: 9 additions & 0 deletions rc/raw/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

# "raw" rc. just the kernel and program output, all in one, good for piping and
# redirecting.
Expand All @@ -11,3 +18,5 @@
exec script -q -e \
-c '/bin/sh -- /.quiz/run' \
/dev/null

# vim: ft=sh
8 changes: 6 additions & 2 deletions rc/raw/vars
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Copyright (c) 2023, Rob Norris <[email protected]>
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

# when enabled, hypervisor will pass signals through to the guess
# when disabled, hypervisor will handle signals itself
_quiz_rc_signals=on

# vim: ft=bash
9 changes: 9 additions & 0 deletions rc/tmux/main
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

# "tmux" rc, for easier interactive use.
#
Expand Down Expand Up @@ -54,3 +61,5 @@ dmesg -W & dmesg_pid=$!

# done
finish

# vim: ft=sh
9 changes: 9 additions & 0 deletions rc/tmux/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#!/bin/sh
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

# "tmux" rc, for easier interactive use.
#
Expand All @@ -20,3 +27,5 @@ dmesg -n 1
tmux -2u -f /.quiz/rc/tmux.conf \
new-session -n 'dmesg' dmesg -w \; \
new-window -n 'run' /.quiz/rc/main \; \

# vim: ft=sh
10 changes: 10 additions & 0 deletions rc/tmux/tmux.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

# basic colours and status layout here
set -g status-style 'bg=color52,fg=white'
set -g status-left '[🧩quiz] '
Expand All @@ -16,3 +24,5 @@ set -g status-keys vi
# crashes will go to the console "under" tmux, overdrawing makes it much less
# confusing
set -g status-interval 1

# vim: ft=tmux
8 changes: 6 additions & 2 deletions rc/tmux/vars
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# SPDX-License-Identifier: MPL-2.0
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Copyright (c) 2023, Rob Norris <[email protected]>
#
# Copyright (c) 2023-2025, Rob Norris <[email protected]>

# when enabled, hypervisor will pass signals through to the guess
# when disabled, hypervisor will handle signals itself
_quiz_rc_signals=off

# vim: ft=bash

0 comments on commit aa21345

Please sign in to comment.