diff options
| -rw-r--r-- | .gitea/workflows/test.yml | 10 | ||||
| -rw-r--r-- | README.md | 3 | ||||
| -rw-r--r-- | cmd/hpkg/app.go (renamed from cmd/planterette/app.go) | 0 | ||||
| -rw-r--r-- | cmd/hpkg/build.nix (renamed from cmd/planterette/build.nix) | 0 | ||||
| -rw-r--r-- | cmd/hpkg/main.go (renamed from cmd/planterette/main.go) | 8 | ||||
| -rw-r--r-- | cmd/hpkg/paths.go (renamed from cmd/planterette/paths.go) | 0 | ||||
| -rw-r--r-- | cmd/hpkg/proc.go (renamed from cmd/planterette/proc.go) | 0 | ||||
| -rw-r--r-- | cmd/hpkg/test/configuration.nix (renamed from cmd/planterette/test/configuration.nix) | 0 | ||||
| -rw-r--r-- | cmd/hpkg/test/default.nix (renamed from cmd/planterette/test/default.nix) | 2 | ||||
| -rw-r--r-- | cmd/hpkg/test/foot.nix (renamed from cmd/planterette/test/foot.nix) | 0 | ||||
| -rw-r--r-- | cmd/hpkg/test/test.py (renamed from cmd/planterette/test/test.py) | 10 | ||||
| -rw-r--r-- | cmd/hpkg/with.go (renamed from cmd/planterette/with.go) | 0 | ||||
| -rwxr-xr-x | dist/install.sh | 2 | ||||
| -rw-r--r-- | flake.nix | 6 | ||||
| -rw-r--r-- | package.nix | 4 |
15 files changed, 23 insertions, 22 deletions
diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index cb1ce8c1..9215915a 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -73,20 +73,20 @@ jobs: path: result/* retention-days: 1 - planterette: - name: Planterette + hpkg: + name: Hpkg runs-on: nix steps: - name: Checkout uses: actions/checkout@v4 - name: Run NixOS test - run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.planterette + run: nix build --out-link "result" --print-out-paths --print-build-logs .#checks.x86_64-linux.hpkg - name: Upload test output uses: actions/upload-artifact@v3 with: - name: "planterette-vm-output" + name: "hpkg-vm-output" path: result/* retention-days: 1 @@ -97,7 +97,7 @@ jobs: - race - sandbox - sandbox-race - - planterette + - hpkg runs-on: nix steps: - name: Checkout @@ -16,7 +16,8 @@ </p> Hakurei is a tool for running sandboxed graphical applications as dedicated subordinate users on the Linux kernel. -It also implements [planterette (WIP)](cmd/planterette), a self-contained Android-like package manager with modern security features. +It implements the application container of [planterette (WIP)](https://git.gensokyo.uk/security/planterette), +a self-contained Android-like package manager with modern security features. ## NixOS Module usage diff --git a/cmd/planterette/app.go b/cmd/hpkg/app.go index 082bc28e..082bc28e 100644 --- a/cmd/planterette/app.go +++ b/cmd/hpkg/app.go diff --git a/cmd/planterette/build.nix b/cmd/hpkg/build.nix index 13f3144f..13f3144f 100644 --- a/cmd/planterette/build.nix +++ b/cmd/hpkg/build.nix diff --git a/cmd/planterette/main.go b/cmd/hpkg/main.go index 75983a4b..d808aa01 100644 --- a/cmd/planterette/main.go +++ b/cmd/hpkg/main.go @@ -23,7 +23,7 @@ var ( ) func init() { - hlog.Prepare("planterette") + hlog.Prepare("hpkg") if err := os.Setenv("SHELL", shellPath); err != nil { log.Fatalf("cannot set $SHELL: %v", err) } @@ -42,7 +42,7 @@ func main() { flagVerbose bool flagDropShell bool ) - c := command.New(os.Stderr, log.Printf, "planterette", func([]string) error { internal.InstallOutput(flagVerbose); return nil }). + c := command.New(os.Stderr, log.Printf, "hpkg", func([]string) error { internal.InstallOutput(flagVerbose); return nil }). Flag(&flagVerbose, "v", command.BoolFlag(false), "Print debug messages to the console"). Flag(&flagDropShell, "s", command.BoolFlag(false), "Drop to a shell in place of next hakurei action") @@ -66,7 +66,7 @@ func main() { } /* - Look up paths to programs started by planterette. + Look up paths to programs started by hpkg. This is done here to ease error handling as cleanup is not yet required. */ @@ -82,7 +82,7 @@ func main() { */ var workDir string - if p, err := os.MkdirTemp("", "planterette.*"); err != nil { + if p, err := os.MkdirTemp("", "hpkg.*"); err != nil { log.Printf("cannot create temporary directory: %v", err) return err } else { diff --git a/cmd/planterette/paths.go b/cmd/hpkg/paths.go index 11715fb2..11715fb2 100644 --- a/cmd/planterette/paths.go +++ b/cmd/hpkg/paths.go diff --git a/cmd/planterette/proc.go b/cmd/hpkg/proc.go index d374e13d..d374e13d 100644 --- a/cmd/planterette/proc.go +++ b/cmd/hpkg/proc.go diff --git a/cmd/planterette/test/configuration.nix b/cmd/hpkg/test/configuration.nix index ce74228a..ce74228a 100644 --- a/cmd/planterette/test/configuration.nix +++ b/cmd/hpkg/test/configuration.nix diff --git a/cmd/planterette/test/default.nix b/cmd/hpkg/test/default.nix index 3ff76fcf..4d5e3b02 100644 --- a/cmd/planterette/test/default.nix +++ b/cmd/hpkg/test/default.nix @@ -9,7 +9,7 @@ let buildPackage = self.buildPackage.${system}; in nixosTest { - name = "planterette"; + name = "hpkg"; nodes.machine = { environment.etc = { "foot.pkg".source = callPackage ./foot.nix { inherit buildPackage; }; diff --git a/cmd/planterette/test/foot.nix b/cmd/hpkg/test/foot.nix index 76b677ac..76b677ac 100644 --- a/cmd/planterette/test/foot.nix +++ b/cmd/hpkg/test/foot.nix diff --git a/cmd/planterette/test/test.py b/cmd/hpkg/test/test.py index b551dc7a..c9944354 100644 --- a/cmd/planterette/test/test.py +++ b/cmd/hpkg/test/test.py @@ -79,15 +79,15 @@ print(machine.succeed("sudo -u alice -i hakurei version")) machine.wait_for_file("/run/user/1000/wayland-1") machine.wait_for_file("/tmp/sway-ipc.sock") -# Prepare planterette directory: +# Prepare hpkg directory: machine.succeed("install -dm 0700 -o alice -g users /var/lib/hakurei/1000") -# Install planterette app: -swaymsg("exec planterette -v install /etc/foot.pkg && touch /tmp/planterette-install-ok") -machine.wait_for_file("/tmp/planterette-install-ok") +# Install hpkg app: +swaymsg("exec hpkg -v install /etc/foot.pkg && touch /tmp/hpkg-install-ok") +machine.wait_for_file("/tmp/hpkg-install-ok") # Start app (foot) with Wayland enablement: -swaymsg("exec planterette -v start org.codeberg.dnkl.foot") +swaymsg("exec hpkg -v start org.codeberg.dnkl.foot") wait_for_window("hakurei@machine-foot") machine.send_chars("clear; wayland-info && touch /tmp/success-client\n") machine.wait_for_file("/tmp/hakurei.1000/tmpdir/2/success-client") diff --git a/cmd/planterette/with.go b/cmd/hpkg/with.go index 7d9fc7b8..7d9fc7b8 100644 --- a/cmd/planterette/with.go +++ b/cmd/hpkg/with.go diff --git a/dist/install.sh b/dist/install.sh index 8601b27f..ef2e13d0 100755 --- a/dist/install.sh +++ b/dist/install.sh @@ -2,7 +2,7 @@ cd "$(dirname -- "$0")" || exit 1 install -vDm0755 "bin/hakurei" "${HAKUREI_INSTALL_PREFIX}/usr/bin/hakurei" -install -vDm0755 "bin/planterette" "${HAKUREI_INSTALL_PREFIX}/usr/bin/planterette" +install -vDm0755 "bin/hpkg" "${HAKUREI_INSTALL_PREFIX}/usr/bin/hpkg" install -vDm6511 "bin/hsu" "${HAKUREI_INSTALL_PREFIX}/usr/bin/hsu" if [ ! -f "${HAKUREI_INSTALL_PREFIX}/etc/hsurc" ]; then @@ -32,7 +32,7 @@ buildPackage = forAllSystems ( system: nixpkgsFor.${system}.callPackage ( - import ./cmd/planterette/build.nix { + import ./cmd/hpkg/build.nix { inherit nixpkgsFor system @@ -69,7 +69,7 @@ withRace = true; }; - planterette = callPackage ./cmd/planterette/test { inherit system self; }; + hpkg = callPackage ./cmd/hpkg/test { inherit system self; }; formatting = runCommandLocal "check-formatting" { nativeBuildInputs = [ nixfmt-rfc-style ]; } '' cd ${./.} @@ -125,7 +125,7 @@ glibc xdg-dbus-proxy - # planterette + # hpkg zstd gnutar coreutils diff --git a/package.nix b/package.nix index c52ff337..48b91c73 100644 --- a/package.nix +++ b/package.nix @@ -13,7 +13,7 @@ wayland-scanner, xorg, - # for planterette + # for hpkg zstd, gnutar, coreutils, @@ -116,7 +116,7 @@ buildGoModule rec { makeBinaryWrapper "$out/libexec/hakurei" "$out/bin/hakurei" \ --inherit-argv0 --prefix PATH : ${lib.makeBinPath appPackages} - makeBinaryWrapper "$out/libexec/planterette" "$out/bin/planterette" \ + makeBinaryWrapper "$out/libexec/hpkg" "$out/bin/hpkg" \ --inherit-argv0 --prefix PATH : ${ lib.makeBinPath ( appPackages |
