6 Commits

Author SHA1 Message Date
cat 3938e8bce5 cmd/app: multiple template uppers
Test / Create distribution (push) Successful in 52s
Test / Sandbox (push) Successful in 2m44s
Test / ShareFS (push) Successful in 3m53s
Test / Hakurei (push) Successful in 4m6s
Test / Sandbox (race detector) (push) Successful in 5m27s
Test / Hakurei (race detector) (push) Successful in 6m40s
Test / Flake checks (push) Successful in 1m12s
Having multiple environments is useful, and this was trivial to implement.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-18 03:51:49 +09:00
cat aee15b4f2a cmd/app: common configuration file
Test / Create distribution (push) Successful in 1m36s
Test / Sandbox (push) Successful in 3m28s
Test / ShareFS (push) Successful in 4m33s
Test / Hakurei (push) Successful in 4m41s
Test / Sandbox (race detector) (push) Successful in 6m45s
Test / Hakurei (race detector) (push) Successful in 7m46s
Test / Flake checks (push) Successful in 1m33s
Generally useful for shared storage and environment.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-18 02:35:56 +09:00
cat 18b1103fdc internal/rosa/llvm: 22.1.7 to 22.1.8
Test / Create distribution (push) Successful in 1m13s
Test / Sandbox (push) Successful in 3m20s
Test / ShareFS (push) Successful in 8m47s
Test / Hakurei (push) Successful in 8m51s
Test / Sandbox (race detector) (push) Successful in 2m54s
Test / Hakurei (race detector) (push) Successful in 4m22s
Test / Flake checks (push) Successful in 1m18s
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-17 21:49:38 +09:00
cat c5a02da0f0 internal/rosa/package/python: 3.14.5 to 3.14.6
Test / Create distribution (push) Successful in 1m8s
Test / Sandbox (push) Successful in 3m14s
Test / ShareFS (push) Successful in 6m39s
Test / Hakurei (push) Successful in 7m35s
Test / Sandbox (race detector) (push) Successful in 2m53s
Test / Hakurei (race detector) (push) Successful in 4m27s
Test / Flake checks (push) Successful in 1m19s
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-17 21:49:07 +09:00
cat c0c2f3233a internal/rosa/package/util-linux: 2.42.1 to 2.42.2
Test / Create distribution (push) Successful in 55s
Test / Sandbox (push) Successful in 2m58s
Test / ShareFS (push) Successful in 3m57s
Test / Hakurei (push) Successful in 4m7s
Test / Sandbox (race detector) (push) Successful in 5m47s
Test / Hakurei (race detector) (push) Successful in 7m4s
Test / Flake checks (push) Successful in 1m34s
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-17 21:44:47 +09:00
cat bda00ac90e internal/rosa/package/hakurei: 0.4.3 to 0.4.4
Test / Create distribution (push) Successful in 52s
Test / Sandbox (push) Successful in 2m41s
Test / ShareFS (push) Successful in 3m48s
Test / Hakurei (push) Successful in 4m2s
Test / Sandbox (race detector) (push) Successful in 5m33s
Test / Hakurei (race detector) (push) Successful in 6m42s
Test / Flake checks (push) Successful in 1m23s
Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-06-17 21:40:04 +09:00
8 changed files with 78 additions and 35 deletions
+9 -8
View File
@@ -35,6 +35,10 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
shell := fhs.AbsRoot.Append("bin", "zsh")
home := hst.AbsPrivateTmp.Append("home")
root := hst.FSOverlay{
Target: fhs.AbsRoot,
Lower: []*check.Absolute{base.Append("initial")},
}
c := hst.Config{
ID: id,
Enablements: new(hst.Enablements),
@@ -51,13 +55,7 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
Container: &hst.ContainerConfig{
Env: make(map[string]string),
Filesystem: []hst.FilesystemConfigJSON{
{FilesystemConfig: &hst.FSOverlay{
Target: fhs.AbsRoot,
Lower: []*check.Absolute{
base.Append("template", "initial"),
},
Upper: base.Append("template", "upper"),
}},
{FilesystemConfig: &root},
{FilesystemConfig: &hst.FSBind{
Target: home,
Source: base.Append("state", id),
@@ -102,10 +100,13 @@ func parse(id string, base *check.Absolute, r io.Reader) (*hst.Config, error) {
if err := scanOnce(); err != nil {
return nil, err
}
if v, err := strconv.Atoi(s.Text()); err != nil {
if template, identity, ok := strings.Cut(s.Text(), ":"); !ok {
return nil, io.ErrUnexpectedEOF
} else if v, err := strconv.Atoi(identity); err != nil {
return nil, err
} else {
c.Identity = v
root.Upper = base.Append("template", template, "upper")
}
if err := scanOnce(); err != nil {
+3 -3
View File
@@ -20,7 +20,7 @@ func TestParse(t *testing.T) {
want *hst.Config
err error
}{
{"com.discordapp.Discord", `8
{"com.discordapp.Discord", `nonfree:8
exec Discord --ozone-platform-hint=wayland
gpu
@@ -74,9 +74,9 @@ talk com.canonical.Unity
{FilesystemConfig: &hst.FSOverlay{
Target: fhs.AbsRoot,
Lower: []*check.Absolute{
base.Append("template", "initial"),
base.Append("initial"),
},
Upper: base.Append("template", "upper"),
Upper: base.Append("template", "nonfree", "upper"),
}},
{FilesystemConfig: &hst.FSBind{
Target: hst.AbsPrivateTmp.Append("home"),
+51 -9
View File
@@ -7,6 +7,8 @@ package main
import (
"context"
"errors"
"fmt"
"io"
"log"
"os"
"os/exec"
@@ -34,7 +36,7 @@ func main() {
flagVerbose bool
flagBase string
base, template, initial, upper, work *check.Absolute
base, template, initial *check.Absolute
)
c := command.New(os.Stderr, log.Printf, "app", func([]string) (err error) {
msg.SwapVerbose(flagVerbose)
@@ -49,9 +51,7 @@ func main() {
}
template = base.Append("template")
initial = template.Append("initial")
upper = template.Append("upper")
work = template.Append("work")
initial = base.Append("initial")
return
}).Flag(
&flagVerbose,
@@ -70,7 +70,21 @@ func main() {
)
c.NewCommand(
"enter", "Enter mutable state template",
func([]string) error {
func(args []string) error {
if len(args) != 1 {
dents, err := os.ReadDir(template.String())
if err != nil {
return err
}
for _, dent := range dents {
if !dent.IsDir() {
continue
}
fmt.Println(dent.Name())
}
return nil
}
config := hst.Config{
ID: "app.hakurei.mutable",
Container: &hst.ContainerConfig{
@@ -79,8 +93,8 @@ func main() {
{FilesystemConfig: &hst.FSOverlay{
Target: fhs.AbsRoot,
Lower: []*check.Absolute{initial},
Upper: upper,
Work: work,
Upper: template.Append(args[0], "upper"),
Work: template.Append(args[0], "work"),
}},
{FilesystemConfig: &hst.FSEphemeral{
Target: fhs.AbsTmp,
@@ -130,18 +144,46 @@ func main() {
"run", "Start the named application",
func(args []string) error {
if len(args) != 1 {
return errors.New("run requires 1 argument")
dents, err := os.ReadDir(base.Append("app").String())
if err != nil {
return err
}
for _, dent := range dents {
if dent.IsDir() {
continue
}
fmt.Println(dent.Name())
}
return nil
}
var config *hst.Config
var r io.Reader
f, err := os.Open(base.Append("app", args[0]).String())
if err != nil {
return err
}
config, err = parse(args[0], base, f)
r = f
var common *os.File
if common, err = os.Open(base.Append("common").String()); err != nil {
if !errors.Is(err, os.ErrNotExist) {
_ = f.Close()
return err
}
} else {
r = io.MultiReader(f, common)
}
config, err = parse(args[0], base, r)
if closeErr := f.Close(); err == nil {
err = closeErr
}
if common != nil {
if closeErr := common.Close(); err == nil {
err = closeErr
}
}
if err != nil {
return err
}
+2 -2
View File
@@ -190,8 +190,8 @@ ln -s \
})
const (
version = "22.1.7"
checksum = "GFjsoTzJ72YWQuAaNmlO67IIkoZ8Z12u3n0dOEMSpltmyXUJp8e3cccWDrscXILZ"
version = "22.1.8"
checksum = "_QzoDE0W6cv0vfIWeLPDvqG_vKhz6IGWl1nqUUvhlKWiRzf5dMGqeC3tyS2XgI6j"
)
native.MustRegister("llvm-project", func(t Toolchain) (*Metadata, pkg.Artifact) {
+2 -2
View File
@@ -2,11 +2,11 @@ package hakurei-source {
description = "hakurei source tree";
exclude = true;
version# = "0.4.3";
version# = "0.4.4";
output = remoteTar {
url = "https://git.gensokyo.uk/rosa/hakurei/archive/"+
"v"+version+".tar.gz";
checksum = "1LqBJIcYcAFTVfydCahOm4hjjKhY953X9ars0eQj32hnpNncWFefuT6OJpZzIlZv";
checksum = "BCIKpRiVv2tDg8lyX1bG_VgTBBMFCByv726x6DfJ0LiRg5ma4T5fcxYUaQl8JMVB";
compress = gzip;
};
}
+2 -2
View File
@@ -3,11 +3,11 @@ package python {
website = "https://www.python.org";
anitya = 13254;
version# = "3.14.5";
version# = "3.14.6";
source = remoteTar {
url = "https://www.python.org/ftp/python/"+version+
"/Python-"+version+".tgz";
checksum = "zYIpDlk2ftZ-UVGCQS1rthle2OHoyXV653ztWiopKV1NhmIJf1K2hHbkwM4DozQ9";
checksum = "yynwXnElUvlAweA_RkBKQY35P59Gu5YU6ickJs6Z-blIoHgw5KgKXROY1gq2w0ez";
compress = gzip;
};
patches = [ "zipfile-no-default-strict_timestamps.patch" ];
@@ -1,8 +1,8 @@
diff --git a/Lib/zipfile/__init__.py b/Lib/zipfile/__init__.py
index 19aea290b58..51603ba9510 100644
index 2b6e6163b96..180b1bdb42a 100644
--- a/Lib/zipfile/__init__.py
+++ b/Lib/zipfile/__init__.py
@@ -617,7 +617,7 @@ def _decodeExtra(self, filename_crc):
@@ -621,7 +621,7 @@ def _decodeExtra(self, filename_crc):
extra = extra[ln+4:]
@classmethod
@@ -10,13 +10,13 @@ index 19aea290b58..51603ba9510 100644
+ def from_file(cls, filename, arcname=None, *, strict_timestamps=False):
"""Construct an appropriate ZipInfo for a file on the filesystem.
filename should be the path to a file or directory on the filesystem.
@@ -1412,7 +1412,7 @@ class ZipFile:
_windows_illegal_name_trans_table = None
filename should be the path to a file or directory on the
@@ -1421,7 +1421,7 @@ class ZipFile:
_ignore_invalid_names = False
def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=True,
- compresslevel=None, *, strict_timestamps=True, metadata_encoding=None):
+ compresslevel=None, *, strict_timestamps=False, metadata_encoding=None):
"""Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',
or append 'a'."""
"""Open the ZIP file with mode read 'r', write 'w', exclusive create
'x', or append 'a'."""
if mode not in ('r', 'w', 'x', 'a'):
+2 -2
View File
@@ -5,7 +5,7 @@ package util-linux {
// release candidates confuse Anitya
latest = anityaFallback;
version# = "2.42.1";
version# = "2.42.2";
source = remoteTar {
url = "https://www.kernel.org/pub/linux/utils/util-linux/"+
"v"+join {
@@ -19,7 +19,7 @@ package util-linux {
};
sep = ".";
}+"/util-linux-"+version+".tar.gz";
checksum = "f1c006mnFL9jTEsqnJn08hHqwcL8TpjCJNIToZNuGEPsLmEdNL87r8RzBT-nl9QB";
checksum = "Z4IZapPCKQP37aeWMDhxcvuOCy-IR_aHZvfUEMZ0T7trwC1znZACKH_3ddqXwBCg";
compress = gzip;
};