forked from rosa/hakurei
Compare commits
30 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
c32c06b2e8
|
|||
|
61199f734c
|
|||
|
87cf0d4e6b
|
|||
|
cf0dffa0f5
|
|||
|
686d7ec63a
|
|||
|
4c653b1151
|
|||
|
0b0a63d151
|
|||
|
6231cfe2aa
|
|||
|
712e80890b
|
|||
|
3fe7d48014
|
|||
|
16f9d39427
|
|||
|
c1cd5ba07b
|
|||
|
7b0cd2e472
|
|||
|
e580307528
|
|||
|
ee1dffb676
|
|||
|
f095fcf181
|
|||
|
ca8a130130
|
|||
|
0ad6b00e41
|
|||
|
ad0f1cf36b
|
|||
|
b12d924fa2
|
|||
|
c31d8ae41a
|
|||
|
6dbbf15c0e
|
|||
|
be7de68a42
|
|||
|
a759cf3666
|
|||
|
8c2dd3e984
|
|||
|
67038d5af4
|
|||
|
53d8d12e7f
|
|||
|
7997d79e56
|
|||
|
f2f1726190
|
|||
|
f63203cb0a
|
@@ -506,6 +506,8 @@ func main() {
|
||||
flagExport string
|
||||
flagRemote bool
|
||||
flagNoReply bool
|
||||
flagFaults bool
|
||||
flagPop bool
|
||||
|
||||
flagBoot bool
|
||||
flagStd bool
|
||||
@@ -614,6 +616,49 @@ func main() {
|
||||
}
|
||||
|
||||
return err
|
||||
|
||||
case flagFaults:
|
||||
var faults []pkg.Fault
|
||||
if err := cm.Do(func(cache *pkg.Cache) (err error) {
|
||||
faults, err = cache.ReadFaults(t.Load(p))
|
||||
return
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, fault := range faults {
|
||||
log.Printf("%s: %s ago", fault.String(), time.Since(fault.Time()))
|
||||
}
|
||||
return nil
|
||||
|
||||
case flagPop:
|
||||
var faults []pkg.Fault
|
||||
if err := cm.Do(func(cache *pkg.Cache) (err error) {
|
||||
faults, err = cache.ReadFaults(t.Load(p))
|
||||
return
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if len(faults) == 0 {
|
||||
return errors.New("no fault entries found")
|
||||
}
|
||||
fault := faults[len(faults)-1]
|
||||
r, err := fault.Open()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if _, err = io.Copy(os.Stdout, r); err != nil {
|
||||
_ = r.Close()
|
||||
return err
|
||||
}
|
||||
fmt.Println()
|
||||
if err = r.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Printf("faulting cure terminated %s ago", time.Since(fault.Time()))
|
||||
return fault.Destroy()
|
||||
}
|
||||
},
|
||||
).Flag(
|
||||
@@ -644,9 +689,40 @@ func main() {
|
||||
&flagStd,
|
||||
"std", command.BoolFlag(false),
|
||||
"Build on the intermediate toolchain",
|
||||
).Flag(
|
||||
&flagFaults,
|
||||
"faults", command.BoolFlag(false),
|
||||
"Display fault entries of the specified artifact",
|
||||
).Flag(
|
||||
&flagPop,
|
||||
"pop", command.BoolFlag(false),
|
||||
"Display and destroy the most recent fault entry",
|
||||
)
|
||||
}
|
||||
|
||||
c.NewCommand(
|
||||
"clear",
|
||||
"Remove all fault entries from the cache",
|
||||
func([]string) error {
|
||||
return cm.Do(func(*pkg.Cache) error {
|
||||
pathname := filepath.Join(cm.base, "fault")
|
||||
dents, err := os.ReadDir(pathname)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, dent := range dents {
|
||||
msg.Verbosef("destroying entry %s", dent.Name())
|
||||
if err = os.Remove(filepath.Join(pathname, dent.Name())); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
log.Printf("destroyed %d fault entries", len(dents))
|
||||
return nil
|
||||
})
|
||||
},
|
||||
)
|
||||
|
||||
c.NewCommand(
|
||||
"abort",
|
||||
"Abort all pending cures on the daemon",
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package pkg_test
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
_ "embed"
|
||||
"encoding/gob"
|
||||
"errors"
|
||||
@@ -85,6 +86,30 @@ func TestExec(t *testing.T) {
|
||||
pkg.MustPath("/opt", false, testtool),
|
||||
), ignorePathname, wantOffline, nil},
|
||||
|
||||
{"substitution", pkg.NewExec(
|
||||
"exec-offline", "", new(wantOffline.hash()), 0, false, false,
|
||||
pkg.AbsWork,
|
||||
[]string{"HAKUREI_TEST=1"},
|
||||
check.MustAbs("/opt/bin/testtool"),
|
||||
[]string{"testtool"},
|
||||
|
||||
pkg.MustPath("/file", false, newStubFile(
|
||||
pkg.KindHTTPGet,
|
||||
pkg.ID{0xfe, 0},
|
||||
nil,
|
||||
nil, nil,
|
||||
)),
|
||||
// substitution miss fails in testtool due to differing idents
|
||||
pkg.MustPath("/.hakurei", false, &stubArtifact{
|
||||
kind: pkg.KindTar,
|
||||
params: []byte("empty directory (substituted)"),
|
||||
cure: func(t *pkg.TContext) error {
|
||||
return os.MkdirAll(t.GetWorkDir().String(), 0700)
|
||||
},
|
||||
}),
|
||||
pkg.MustPath("/opt", false, testtool),
|
||||
), ignorePathname, wantOffline, nil},
|
||||
|
||||
{"error passthrough", pkg.NewExec(
|
||||
"", "", nil, 0, false, true,
|
||||
pkg.AbsWork,
|
||||
@@ -112,18 +137,41 @@ func TestExec(t *testing.T) {
|
||||
})
|
||||
|
||||
// check init failure passthrough
|
||||
var exitError *exec.ExitError
|
||||
if _, _, err := c.Cure(pkg.NewExec(
|
||||
initFailureArtifact := pkg.NewExec(
|
||||
"", "", nil, 0, false, false,
|
||||
pkg.AbsWork,
|
||||
nil,
|
||||
check.MustAbs("/opt/bin/testtool"),
|
||||
[]string{"testtool"},
|
||||
)); !errors.As(err, &exitError) ||
|
||||
)
|
||||
var exitError *exec.ExitError
|
||||
if _, _, err := c.Cure(initFailureArtifact); !errors.As(err, &exitError) ||
|
||||
exitError.ExitCode() != hst.ExitFailure {
|
||||
t.Fatalf("Cure: error = %v, want init exit status 1", err)
|
||||
}
|
||||
|
||||
var faultStatus []byte
|
||||
if faults, err := c.ReadFaults(initFailureArtifact); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if len(faults) != 1 {
|
||||
t.Fatalf("ReadFaults: %v", faults)
|
||||
} else if faultStatus, err = os.ReadFile(faults[0].String()); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if err = faults[0].Destroy(); err != nil {
|
||||
t.Fatal(err)
|
||||
} else {
|
||||
t.Logf("destroyed expected fault at %s", faults[0].Time().UTC())
|
||||
}
|
||||
|
||||
if !bytes.HasPrefix(faultStatus, []byte(
|
||||
"internal/pkg ",
|
||||
)) || !bytes.Contains(faultStatus, []byte(
|
||||
"\ninit: fork/exec /opt/bin/testtool: no such file or directory\n",
|
||||
)) {
|
||||
t.Errorf("unexpected status:\n%s", string(faultStatus))
|
||||
}
|
||||
|
||||
destroyStatus(t, base, 2, 1)
|
||||
testtoolDestroy(t, base, c)
|
||||
}, expectsFS{
|
||||
".": {Mode: fs.ModeDir | 0700},
|
||||
@@ -135,6 +183,8 @@ func TestExec(t *testing.T) {
|
||||
"checksum/OLBgp1GsljhM2TJ-sbHjaiH9txEUvgdDTAzHv2P24donTt6_529l-9Ua0vFImLlb": {Mode: 0400, Data: []byte{}},
|
||||
|
||||
"identifier": {Mode: fs.ModeDir | 0700},
|
||||
"identifier/IY91PCtOpCYy21AaIK0c9f8-Z6fb2_2ewoHWkt4dxoLf0GOrWqS8yAGFLV84b1Dw": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/" + wantOfflineEncode)},
|
||||
"identifier/QwS7SmiatdqryQYgESdGw7Yw2PcpNf0vNfpvUA0t92BTlKiUjfCrXyMW17G2X77X": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/MGWmEfjut2QE2xPJwTsmUzpff4BN_FEnQ7T0j7gvUCCiugJQNwqt9m151fm9D1yU")},
|
||||
"identifier/_gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/OLBgp1GsljhM2TJ-sbHjaiH9txEUvgdDTAzHv2P24donTt6_529l-9Ua0vFImLlb")},
|
||||
"identifier/" + expected.Offline: {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/" + wantOfflineEncode)},
|
||||
"identifier/vjz1MHPcGBKV7sjcs8jQP3cqxJ1hgPTiQBMCEHP9BGXjGxd-tJmEmXKaStObo5gK": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/MGWmEfjut2QE2xPJwTsmUzpff4BN_FEnQ7T0j7gvUCCiugJQNwqt9m151fm9D1yU")},
|
||||
@@ -178,6 +228,7 @@ func TestExec(t *testing.T) {
|
||||
), ignorePathname, wantNet, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
testtoolDestroy(t, base, c)
|
||||
}, expectsFS{
|
||||
".": {Mode: fs.ModeDir | 0700},
|
||||
@@ -221,6 +272,7 @@ func TestExec(t *testing.T) {
|
||||
), ignorePathname, wantOffline, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
testtoolDestroy(t, base, c)
|
||||
}, expectsFS{
|
||||
".": {Mode: fs.ModeDir | 0700},
|
||||
@@ -267,6 +319,7 @@ func TestExec(t *testing.T) {
|
||||
), ignorePathname, wantOffline, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
testtoolDestroy(t, base, c)
|
||||
}, expectsFS{
|
||||
".": {Mode: fs.ModeDir | 0700},
|
||||
@@ -335,6 +388,7 @@ func TestExec(t *testing.T) {
|
||||
), ignorePathname, wantOffline, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
testtoolDestroy(t, base, c)
|
||||
}, expectsFS{
|
||||
".": {Mode: fs.ModeDir | 0700},
|
||||
@@ -387,6 +441,7 @@ func TestExec(t *testing.T) {
|
||||
), ignorePathname, wantOffline, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
testtoolDestroy(t, base, c)
|
||||
}, expectsFS{
|
||||
".": {Mode: fs.ModeDir | 0700},
|
||||
@@ -450,6 +505,8 @@ func TestExec(t *testing.T) {
|
||||
"check": {Mode: 0400, Data: []byte("binfmt")},
|
||||
}, nil},
|
||||
})
|
||||
|
||||
destroyStatus(t, base, 2, 0)
|
||||
}, expectsFS{
|
||||
".": {Mode: fs.ModeDir | 0700},
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ package pkg
|
||||
import (
|
||||
"bufio"
|
||||
"bytes"
|
||||
"cmp"
|
||||
"context"
|
||||
"crypto/sha512"
|
||||
"encoding/base64"
|
||||
@@ -25,6 +26,7 @@ import (
|
||||
"sync/atomic"
|
||||
"syscall"
|
||||
"testing"
|
||||
"time"
|
||||
"unique"
|
||||
"unsafe"
|
||||
|
||||
@@ -248,7 +250,14 @@ func (t *TContext) destroy(errP *error) {
|
||||
*errP = errors.Join(*errP, err)
|
||||
}
|
||||
if *errP != nil {
|
||||
*errP = errors.Join(*errP, os.Remove(t.statusPath.String()))
|
||||
*errP = errors.Join(*errP, os.Rename(
|
||||
t.statusPath.String(), t.cache.base.Append(
|
||||
dirFault,
|
||||
t.ids+"."+strconv.FormatUint(uint64(
|
||||
time.Now().UnixNano(),
|
||||
), 10),
|
||||
).String(),
|
||||
))
|
||||
}
|
||||
t.status = nil
|
||||
}
|
||||
@@ -509,36 +518,34 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
// fileLock is the file name appended to Cache.base for guaranteeing
|
||||
// exclusive access to the cache directory.
|
||||
// fileLock is the lock file for exclusive access to the cache directory.
|
||||
fileLock = "lock"
|
||||
// fileVariant is the file name appended to Cache.base holding the variant
|
||||
// identification string set by a prior call to [SetExtension].
|
||||
// fileVariant is a file holding the variant identification string set by a
|
||||
// prior call to [SetExtension].
|
||||
fileVariant = "variant"
|
||||
|
||||
// dirSubstitute is the directory name appended to Cache.base for linking
|
||||
// artifacts named after their substitute identifier.
|
||||
// dirSubstitute holds symlinks to artifacts by checksum, named after their
|
||||
// substitute identifier.
|
||||
dirSubstitute = "substitute"
|
||||
// dirIdentifier is the directory name appended to Cache.base for storing
|
||||
// artifacts named after their [ID].
|
||||
// dirIdentifier holds symlinks to artifacts by checksum, named after their
|
||||
// IR-based identifier.
|
||||
dirIdentifier = "identifier"
|
||||
// dirChecksum is the directory name appended to Cache.base for storing
|
||||
// artifacts named after their [Checksum].
|
||||
// dirChecksum holds artifacts named after their [Checksum].
|
||||
dirChecksum = "checksum"
|
||||
// dirStatus is the directory name appended to Cache.base for storing
|
||||
// artifact metadata and logs named after their [ID].
|
||||
// dirStatus holds artifact metadata and logs named after their IR-based
|
||||
// identifier. For [FloodArtifact], the same file is also available under
|
||||
// its substitute identifier.
|
||||
dirStatus = "status"
|
||||
// dirFault holds status files of faulted cures.
|
||||
dirFault = "fault"
|
||||
|
||||
// dirWork is the directory name appended to Cache.base for working
|
||||
// pathnames set up during [Cache.Cure].
|
||||
// dirWork holds working pathnames set up during [Cache.Cure].
|
||||
dirWork = "work"
|
||||
// dirTemp is the directory name appended to Cache.base for scratch space
|
||||
// pathnames allocated during [Cache.Cure].
|
||||
// dirTemp holds scratch space allocated during [Cache.Cure].
|
||||
dirTemp = "temp"
|
||||
|
||||
// dirExecScratch is the directory name appended to Cache.base for scratch
|
||||
// space setting up the container started by [Cache.EnterExec]. Exclusivity
|
||||
// via Cache.inExec.
|
||||
// dirExecScratch is scratch space set up for the container started by
|
||||
// [Cache.EnterExec]. Exclusivity via Cache.inExec.
|
||||
dirExecScratch = "scratch"
|
||||
|
||||
// checksumLinknamePrefix is prepended to the encoded [Checksum] value
|
||||
@@ -1995,10 +2002,11 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
|
||||
buf := c.getIdentBuf()
|
||||
sh.Sum(buf[wordSize:wordSize])
|
||||
substitute = unique.Make(ID(buf[wordSize:]))
|
||||
substitutes := Encode(substitute.Value())
|
||||
c.putIdentBuf(buf)
|
||||
alternative = c.base.Append(
|
||||
dirSubstitute,
|
||||
Encode(substitute.Value()),
|
||||
substitutes,
|
||||
)
|
||||
|
||||
if c.flags&CIgnoreSubstitutes == 0 {
|
||||
@@ -2014,6 +2022,17 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
|
||||
dirChecksum,
|
||||
checksums,
|
||||
)
|
||||
if _, err = os.Lstat(c.base.Append(
|
||||
dirStatus,
|
||||
substitutes,
|
||||
).String()); err == nil {
|
||||
err = os.Symlink(substitutes, c.base.Append(
|
||||
dirStatus,
|
||||
ids,
|
||||
).String())
|
||||
} else if errors.Is(err, os.ErrNotExist) {
|
||||
err = nil
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -2023,6 +2042,15 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
|
||||
return
|
||||
}
|
||||
err = ca.Cure(&f)
|
||||
if err == nil && f.status != nil {
|
||||
err = os.Link(c.base.Append(
|
||||
dirStatus,
|
||||
ids,
|
||||
).String(), c.base.Append(
|
||||
dirStatus,
|
||||
substitutes,
|
||||
).String())
|
||||
}
|
||||
c.exitCure(a, curesExempt)
|
||||
if err != nil {
|
||||
return
|
||||
@@ -2131,6 +2159,52 @@ func (c *Cache) OpenStatus(a Artifact) (r io.ReadSeekCloser, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
// Fault holds the pathname and termination time of an [Artifact] fault entry.
|
||||
type Fault struct {
|
||||
*check.Absolute
|
||||
t uint64
|
||||
}
|
||||
|
||||
// Time returns the instant in time where the fault occurred.
|
||||
func (f Fault) Time() time.Time { return time.Unix(0, int64(f.t)) }
|
||||
|
||||
// Open opens the underlying entry for reading.
|
||||
func (f Fault) Open() (io.ReadCloser, error) { return os.Open(f.Absolute.String()) }
|
||||
|
||||
// Destroy removes the underlying fault entry.
|
||||
func (f Fault) Destroy() error { return os.Remove(f.Absolute.String()) }
|
||||
|
||||
// ReadFaults returns fault entries for an [Artifact].
|
||||
func (c *Cache) ReadFaults(a Artifact) (faults []Fault, err error) {
|
||||
prefix := Encode(c.Ident(a).Value()) + "."
|
||||
var dents []os.DirEntry
|
||||
if dents, err = os.ReadDir(c.base.Append(dirFault).String()); err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
for _, dent := range dents {
|
||||
name := dent.Name()
|
||||
if !strings.HasPrefix(name, prefix) {
|
||||
continue
|
||||
}
|
||||
var t uint64
|
||||
t, err = strconv.ParseUint(name[len(prefix):], 10, 64)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
faults = append(faults, Fault{c.base.Append(
|
||||
dirFault,
|
||||
name,
|
||||
), t})
|
||||
}
|
||||
|
||||
slices.SortFunc(faults, func(a, b Fault) int {
|
||||
return cmp.Compare(a.t, b.t)
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// Abort cancels all pending cures and waits for them to clean up, but does not
|
||||
// close the cache.
|
||||
func (c *Cache) Abort() {
|
||||
@@ -2234,6 +2308,7 @@ func open(
|
||||
dirIdentifier,
|
||||
dirChecksum,
|
||||
dirStatus,
|
||||
dirFault,
|
||||
dirWork,
|
||||
} {
|
||||
if err := os.MkdirAll(
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
"syscall"
|
||||
"testing"
|
||||
"testing/fstest"
|
||||
"time"
|
||||
"unique"
|
||||
"unsafe"
|
||||
|
||||
@@ -244,6 +245,41 @@ func newDestroyArtifactFunc(a pkg.Artifact) func(
|
||||
}
|
||||
}
|
||||
|
||||
// destroyStatus counts non-substitution status entries and destroys them.
|
||||
func destroyStatus(t *testing.T, base *check.Absolute, c, s int) {
|
||||
dents, err := os.ReadDir(base.Append("status").String())
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
var gotC, gotS int
|
||||
for _, dent := range dents {
|
||||
if err = os.Remove(base.Append(
|
||||
"status",
|
||||
dent.Name(),
|
||||
).String()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if dent.Type().IsRegular() {
|
||||
gotC++
|
||||
continue
|
||||
}
|
||||
if dent.Type()&fs.ModeSymlink == fs.ModeSymlink {
|
||||
gotS++
|
||||
continue
|
||||
}
|
||||
t.Errorf("%s: %s", dent.Name(), dent.Type())
|
||||
}
|
||||
|
||||
if gotC != c {
|
||||
t.Errorf("status: c = %d, want %d", gotC, c)
|
||||
}
|
||||
if gotS != s {
|
||||
t.Errorf("status: s = %d, want %d", gotS, s)
|
||||
}
|
||||
}
|
||||
|
||||
func TestIdent(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -488,10 +524,17 @@ func checkWithCache(t *testing.T, testCases []cacheTestCase) {
|
||||
}
|
||||
}
|
||||
|
||||
// destroy non-deterministic status files
|
||||
if err := os.RemoveAll(base.Append("status").String()); err != nil {
|
||||
// destroy empty status directory
|
||||
if err := syscall.Rmdir(base.Append("status").String()); err != nil {
|
||||
t.Error(expectsFrom(base.Append("status").String()))
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
// destroy empty fault directory
|
||||
if err := os.Remove(base.Append("fault").String()); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
want := tc.want.hash()
|
||||
|
||||
var checksum pkg.Checksum
|
||||
@@ -555,6 +598,21 @@ func cureMany(t *testing.T, c *pkg.Cache, steps []cureStep) {
|
||||
for _, step := range steps {
|
||||
t.Log("cure step:", step.name)
|
||||
if pathname, checksum, err := c.Cure(step.a); !reflect.DeepEqual(err, step.err) {
|
||||
faults, _err := c.ReadFaults(step.a)
|
||||
if _err != nil {
|
||||
t.Errorf("ReadFaults: error = %v", _err)
|
||||
}
|
||||
|
||||
var p []byte
|
||||
for _, fault := range faults {
|
||||
p, _err = os.ReadFile(fault.String())
|
||||
if _err != nil {
|
||||
t.Error(_err)
|
||||
continue
|
||||
}
|
||||
t.Log(string(p))
|
||||
t.Logf("faulting cure terminated %s ago", time.Since(faults[0].Time()))
|
||||
}
|
||||
t.Fatalf("Cure: error = %v, want %v", err, step.err)
|
||||
} else if step.pathname != ignorePathname && !pathname.Is(step.pathname) {
|
||||
t.Fatalf("Cure: pathname = %q, want %q", pathname, step.pathname)
|
||||
@@ -1059,8 +1117,14 @@ func TestCache(t *testing.T) {
|
||||
"_EmV5nsYZ2UWHgRmLDMU8i-rJWDx-kv5_1pFrzQI7vMMCM5mAXivO8UZtVfOqMR_",
|
||||
), want, nil},
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
if dents, err := os.ReadDir(base.Append("status").String()); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if len(dents) > 0 {
|
||||
t.Errorf("ReadDir: %v", dents)
|
||||
}
|
||||
|
||||
}, expectsFS{
|
||||
".": {Mode: fs.ModeDir | 0700},
|
||||
|
||||
|
||||
@@ -56,6 +56,8 @@ const (
|
||||
Fakeroot
|
||||
Findutils
|
||||
Flex
|
||||
FontUtil
|
||||
Freetype
|
||||
Fuse
|
||||
GMP
|
||||
GLib
|
||||
@@ -77,7 +79,10 @@ const (
|
||||
LIT
|
||||
LibX11
|
||||
LibXau
|
||||
LibXdmcp
|
||||
LibXext
|
||||
LibXfixes
|
||||
LibXfont2
|
||||
LibXrandr
|
||||
LibXrender
|
||||
LibXxf86vm
|
||||
@@ -87,9 +92,11 @@ const (
|
||||
Libconfig
|
||||
LibdisplayInfo
|
||||
Libdrm
|
||||
Libepoxy
|
||||
Libev
|
||||
Libexpat
|
||||
Libffi
|
||||
Libfontenc
|
||||
Libgd
|
||||
Libglvnd
|
||||
Libiconv
|
||||
@@ -101,17 +108,28 @@ const (
|
||||
Libpsl
|
||||
Libseccomp
|
||||
Libtasn1
|
||||
Libtirpc
|
||||
Libtool
|
||||
Libucontext
|
||||
Libunistring
|
||||
Libxshmfence
|
||||
Libva
|
||||
LibxcbRenderUtil
|
||||
LibxcbUtil
|
||||
LibxcbUtilImage
|
||||
LibxcbUtilKeysyms
|
||||
LibxcbUtilWM
|
||||
Libxcvt
|
||||
Libxkbfile
|
||||
Libxml2
|
||||
Libxshmfence
|
||||
Libxslt
|
||||
Libxtrans
|
||||
LMSensors
|
||||
M4
|
||||
MPC
|
||||
MPFR
|
||||
Make
|
||||
Mesa
|
||||
Meson
|
||||
Mksh
|
||||
MuslFts
|
||||
@@ -133,10 +151,12 @@ const (
|
||||
PerlPodParser
|
||||
PerlSGMLS
|
||||
PerlTermReadKey
|
||||
PerlTestCmd
|
||||
PerlTextCharWidth
|
||||
PerlTextWrapI18N
|
||||
PerlUnicodeLineBreak
|
||||
PerlYAMLTiny
|
||||
Pixman
|
||||
PkgConfig
|
||||
Procps
|
||||
Python
|
||||
@@ -179,10 +199,12 @@ const (
|
||||
WaylandProtocols
|
||||
XCB
|
||||
XCBProto
|
||||
XCBUtilKeysyms
|
||||
XDGDBusProxy
|
||||
XZ
|
||||
Xkbcomp
|
||||
XkeyboardConfig
|
||||
XorgProto
|
||||
Xserver
|
||||
Zlib
|
||||
Zstd
|
||||
|
||||
|
||||
27
internal/rosa/freetype.go
Normal file
27
internal/rosa/freetype.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newFreetype() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "2.14.3"
|
||||
checksum = "-WfLv8fVJNyCHpP_lriiDzOcVbBL9ajdQ3tl8AzIIUa9-8sVpU9irxOmSMgRHWYz"
|
||||
)
|
||||
return t.NewPackage("freetype", version, newTar(
|
||||
"https://download.savannah.gnu.org/releases/freetype/"+
|
||||
"freetype-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), nil, (*MakeHelper)(nil)), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Freetype] = Metadata{
|
||||
f: Toolchain.newFreetype,
|
||||
|
||||
Name: "freetype",
|
||||
Description: "a freely available software library to render fonts",
|
||||
Website: "http://www.freetype.org/",
|
||||
|
||||
ID: 854,
|
||||
}
|
||||
}
|
||||
@@ -62,6 +62,7 @@ disable_test t7002-mv-sparse-checkout
|
||||
disable_test t1451-fsck-buffer
|
||||
disable_test t4104-apply-boundary
|
||||
disable_test t4200-rerere
|
||||
disable_test t5515-fetch-merge-logic
|
||||
`,
|
||||
Check: []string{
|
||||
"-C t",
|
||||
|
||||
@@ -189,9 +189,18 @@ func (t Toolchain) newSPIRVLLVMTranslator() (pkg.Artifact, string) {
|
||||
), &PackageAttr{
|
||||
Patches: []KV{
|
||||
{"remove-early-prefix", `diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c000a77e..86f79b03 100644
|
||||
index c000a77e..f18f3fde 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -164,7 +164,7 @@ install(
|
||||
${LLVM_SPIRV_INCLUDE_DIRS}/LLVMSPIRVOpts.h
|
||||
${LLVM_SPIRV_INCLUDE_DIRS}/LLVMSPIRVExtensions.inc
|
||||
DESTINATION
|
||||
- ${CMAKE_INSTALL_PREFIX}/include/LLVMSPIRVLib
|
||||
+ include/LLVMSPIRVLib
|
||||
)
|
||||
|
||||
configure_file(LLVMSPIRVLib.pc.in ${CMAKE_BINARY_DIR}/LLVMSPIRVLib.pc @ONLY)
|
||||
@@ -172,5 +172,5 @@ install(
|
||||
FILES
|
||||
${CMAKE_BINARY_DIR}/LLVMSPIRVLib.pc
|
||||
@@ -199,7 +208,7 @@ index c000a77e..86f79b03 100644
|
||||
- ${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}/pkgconfig
|
||||
+ lib${LLVM_LIBDIR_SUFFIX}/pkgconfig
|
||||
)
|
||||
`},
|
||||
;`},
|
||||
},
|
||||
|
||||
// litArgs emits shell syntax
|
||||
|
||||
33
internal/rosa/libepoxy.go
Normal file
33
internal/rosa/libepoxy.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLibepoxy() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.5.10"
|
||||
checksum = "OHI8wshrlGw6BMGrmSyejJtwzM2gPhyFJrTsKxULyKMmYrfgcOe7Iw2ibVoUND_Q"
|
||||
)
|
||||
return t.NewPackage("libepoxy", version, newFromGitHub(
|
||||
"anholt/libepoxy",
|
||||
version,
|
||||
checksum,
|
||||
), nil, &MesonHelper{
|
||||
Setup: []KV{
|
||||
{"Dglx", "no"},
|
||||
{"Degl", "no"},
|
||||
},
|
||||
},
|
||||
LibX11,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Libepoxy] = Metadata{
|
||||
f: Toolchain.newLibepoxy,
|
||||
|
||||
Name: "libepoxy",
|
||||
Description: "a library for handling OpenGL function pointer management",
|
||||
Website: "https://github.com/anholt/libepoxy",
|
||||
|
||||
ID: 6090,
|
||||
}
|
||||
}
|
||||
44
internal/rosa/libtirpc.go
Normal file
44
internal/rosa/libtirpc.go
Normal file
@@ -0,0 +1,44 @@
|
||||
package rosa
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"hakurei.app/internal/pkg"
|
||||
)
|
||||
|
||||
func (t Toolchain) newLibtirpc() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.3.7"
|
||||
checksum = "nzFfu7LNvnSNiNAryD1vtnNWnU-Xqee8KqfXUKoBf5yjb5-dkeRkYuRijdCoYLof"
|
||||
)
|
||||
return t.NewPackage("libtirpc", version, t.newTagRemote(
|
||||
"git://linux-nfs.org/~steved/libtirpc",
|
||||
"libtirpc-"+
|
||||
strings.Join(strings.SplitN(version, ".", 3), "-"),
|
||||
checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "sh -e ./bootstrap",
|
||||
Configure: []KV{
|
||||
{"CFLAGS", `"$(pkg-config --cflags libbsd-overlay) ${CFLAGS:-}"`},
|
||||
{"disable-gssapi"},
|
||||
},
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
PkgConfig,
|
||||
|
||||
Libbsd,
|
||||
KernelHeaders,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Libtirpc] = Metadata{
|
||||
f: Toolchain.newLibtirpc,
|
||||
|
||||
Name: "libtirpc",
|
||||
Description: "a port of Suns Transport-Independent RPC library to Linux",
|
||||
Website: "https://sourceforge.net/projects/libtirpc/",
|
||||
|
||||
ID: 1740,
|
||||
}
|
||||
}
|
||||
59
internal/rosa/lm-sensors.go
Normal file
59
internal/rosa/lm-sensors.go
Normal file
@@ -0,0 +1,59 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newLMSensors() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "3-6-2"
|
||||
checksum = "7JYNutrihe-FP6r3ftf96uFZJJWPfxnBHL0ALSMA-vovaXVRr-sAjlLitw7WWpCI"
|
||||
)
|
||||
return t.NewPackage("lm_sensors", version, newFromGitHub(
|
||||
"lm-sensors/lm-sensors",
|
||||
"V"+version,
|
||||
checksum,
|
||||
), &PackageAttr{
|
||||
Writable: true,
|
||||
Chmod: true,
|
||||
EnterSource: true,
|
||||
|
||||
ScriptEarly: `
|
||||
ln -s \
|
||||
../../system/bin/perl \
|
||||
/usr/bin/
|
||||
`,
|
||||
}, &MakeHelper{
|
||||
InPlace: true,
|
||||
SkipConfigure: true,
|
||||
|
||||
Make: []string{
|
||||
"CC=cc",
|
||||
"ETCDIR=/system/etc",
|
||||
"PREFIX=/system",
|
||||
},
|
||||
|
||||
Check: []string{
|
||||
"CC=cc",
|
||||
"check",
|
||||
},
|
||||
|
||||
Install: "make DESTDIR=/work PREFIX=/system install",
|
||||
},
|
||||
Perl,
|
||||
PerlTestCmd,
|
||||
|
||||
M4,
|
||||
Bison,
|
||||
Flex,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[LMSensors] = Metadata{
|
||||
f: Toolchain.newLMSensors,
|
||||
|
||||
Name: "lm_sensors",
|
||||
Description: "user-space support for hardware monitoring drivers",
|
||||
Website: "https://hwmon.wiki.kernel.org/lm_sensors",
|
||||
|
||||
ID: 1831,
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"hakurei.app/internal/pkg"
|
||||
)
|
||||
|
||||
func (t Toolchain) newLibglvnd() (pkg.Artifact, string) {
|
||||
const (
|
||||
@@ -12,8 +16,22 @@ func (t Toolchain) newLibglvnd() (pkg.Artifact, string) {
|
||||
"glvnd/libglvnd",
|
||||
"v"+version,
|
||||
checksum,
|
||||
), nil, (*MesonHelper)(nil),
|
||||
), nil, &MesonHelper{
|
||||
Setup: []KV{
|
||||
{"Dx11", "enabled"},
|
||||
{"Dglx", "enabled"},
|
||||
},
|
||||
ScriptCompiled: `
|
||||
export DISPLAY=':0'
|
||||
Xvfb &
|
||||
XVFB_PID="$!"
|
||||
trap 'kill $XVFB_PID && wait $XVFB_PID' EXIT
|
||||
`,
|
||||
},
|
||||
Binutils, // symbols check fail with llvm nm
|
||||
Xserver, // test suite wants X server
|
||||
|
||||
LibXext,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
@@ -24,6 +42,10 @@ func init() {
|
||||
Description: "The GL Vendor-Neutral Dispatch library",
|
||||
Website: "https://gitlab.freedesktop.org/glvnd/libglvnd",
|
||||
|
||||
Dependencies: P{
|
||||
LibXext,
|
||||
},
|
||||
|
||||
ID: 12098,
|
||||
}
|
||||
}
|
||||
@@ -64,3 +86,180 @@ func init() {
|
||||
ID: 1596,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibva() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "2.23.0"
|
||||
checksum = "UmF5tPyWIG_w5kiR3KFpoYbF7UUcaak5tyc-RhOheNTwQlLkPlifreFYCM9FQxbq"
|
||||
)
|
||||
return t.NewPackage("libva", version, newFromGitHub(
|
||||
"intel/libva",
|
||||
version,
|
||||
checksum,
|
||||
), nil, &MesonHelper{
|
||||
Setup: []KV{
|
||||
{"Dwith_x11", "yes"},
|
||||
{"Dwith_glx", "yes"},
|
||||
{"Dwith_wayland", "yes"},
|
||||
},
|
||||
},
|
||||
Libdrm,
|
||||
LibXfixes,
|
||||
Libglvnd,
|
||||
Wayland,
|
||||
KernelHeaders,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Libva] = Metadata{
|
||||
f: Toolchain.newLibva,
|
||||
|
||||
Name: "libva",
|
||||
Description: "an implementation for VA-API (Video Acceleration API)",
|
||||
Website: "https://01.org/vaapi",
|
||||
|
||||
Dependencies: P{
|
||||
Libdrm,
|
||||
LibXfixes,
|
||||
Libglvnd,
|
||||
Wayland,
|
||||
},
|
||||
|
||||
ID: 1752,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newMesa() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "26.1.0"
|
||||
checksum = "zU0fjqevySBaoi_5SLW3e2UffmGeBdxOuHmAHTH68n2hV-sjYoqg30koLqFXuk5y"
|
||||
)
|
||||
return t.NewPackage("mesa", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"mesa/mesa",
|
||||
"mesa-"+version,
|
||||
checksum,
|
||||
), nil, &MesonHelper{
|
||||
Setup: []KV{
|
||||
{"Dplatforms", "x11,wayland"},
|
||||
{"Dvideo-codecs", "all"},
|
||||
|
||||
{"Dglvnd", "enabled"},
|
||||
{"Dgbm", "enabled"},
|
||||
|
||||
{"Dgallium-drivers", strings.Join([]string{
|
||||
"asahi", // Apple AGX
|
||||
"crocus", // Intel legacy
|
||||
"etnaviv", // Vivante GPU designs (mostly NXP/Marvell SoCs)
|
||||
"freedreno", // Qualcomm Adreno (all Qualcomm SoCs)
|
||||
"i915", // Intel extra legacy
|
||||
"iris", // new Intel (Broadwell+)
|
||||
"lima", // ARM Mali 4xx
|
||||
"llvmpipe", // software renderer
|
||||
"nouveau", // Nvidia
|
||||
"panfrost", // ARM Mali Midgard and up (T/G series)
|
||||
"r300", // very old AMD
|
||||
"r600", // less old AMD
|
||||
"radeonsi", // new AMD (GCN+)
|
||||
"softpipe", // older software renderer
|
||||
"svga", // VMWare virtualized GPU
|
||||
"tegra", // Nvidia Tegra SoCs
|
||||
"v3d", // Broadcom VC5 (Raspberry Pi 4)
|
||||
"vc4", // Broadcom VC4 (Raspberry Pi 0-3)
|
||||
"virgl", // QEMU virtualized GPU (aka VirGL)
|
||||
"zink", // generic OpenGL over Vulkan, experimental
|
||||
|
||||
// d3d12: WSL emulated GPU (aka Dozen)
|
||||
// ethosu: accelerator
|
||||
// rocket: accelerator
|
||||
}, ",")},
|
||||
|
||||
{"Dvulkan-drivers", strings.Join([]string{
|
||||
"amd", // AMD (aka RADV)
|
||||
"broadcom", // Broadcom VC5 (Raspberry Pi 4, aka V3D)
|
||||
"freedreno", // Qualcomm Adreno (all Qualcomm SoCs)
|
||||
"intel", // new Intel (aka ANV)
|
||||
"intel_hasvk", // Intel Haswell/Broadwell, "legacy" Vulkan driver (https://www.phoronix.com/news/Intel-HasVK-Drop-Dead-Code)
|
||||
"panfrost", // ARM Mali Midgard and up (T/G series)
|
||||
"swrast", // software renderer (aka Lavapipe)
|
||||
"virtio", // QEMU virtualized GPU (aka VirGL)
|
||||
"imagination", // PowerVR Rogue
|
||||
"asahi", // Apple AGX
|
||||
"gfxstream", // Android virtualized GPU
|
||||
|
||||
// nouveau: Nouveau (aka NVK), requires rust
|
||||
// microsoft-experimental: WSL virtualized GPU (aka DZN/Dozen)
|
||||
// kosmickrisp: macOS-specific
|
||||
}, ",")},
|
||||
{"Dvulkan-layers", strings.Join([]string{
|
||||
"device-select",
|
||||
"intel-nullhw",
|
||||
"overlay",
|
||||
"screenshot",
|
||||
"anti-lag",
|
||||
"vram-report-limit",
|
||||
}, ",")},
|
||||
|
||||
{"Dfreedreno-kmds", "msm,virtio"},
|
||||
{"Damdgpu-virtio", "true"},
|
||||
},
|
||||
},
|
||||
M4,
|
||||
PythonPackaging,
|
||||
PythonMako,
|
||||
PythonPyYAML,
|
||||
PythonPycparser,
|
||||
Glslang,
|
||||
SPIRVLLVMTranslator,
|
||||
|
||||
Zlib,
|
||||
Zstd,
|
||||
Gzip,
|
||||
Ncurses,
|
||||
Libglvnd,
|
||||
Libexpat,
|
||||
Libva,
|
||||
Libdrm,
|
||||
Elfutils,
|
||||
Bison,
|
||||
Flex,
|
||||
LMSensors,
|
||||
Libconfig,
|
||||
LibdisplayInfo,
|
||||
Wayland,
|
||||
WaylandProtocols,
|
||||
Libxshmfence,
|
||||
LibXxf86vm,
|
||||
LibXrandr,
|
||||
LibxcbUtilKeysyms,
|
||||
Libpng,
|
||||
Libarchive,
|
||||
KernelHeaders,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Mesa] = Metadata{
|
||||
f: Toolchain.newMesa,
|
||||
|
||||
Name: "mesa",
|
||||
Description: "open source implementations of OpenGL, OpenGL ES, Vulkan, OpenCL, and more",
|
||||
Website: "https://mesa3d.org",
|
||||
|
||||
Dependencies: P{
|
||||
Libdrm,
|
||||
Elfutils,
|
||||
LMSensors,
|
||||
LibdisplayInfo,
|
||||
Wayland,
|
||||
Libxshmfence,
|
||||
LibXxf86vm,
|
||||
LibXrandr,
|
||||
LibxcbUtilKeysyms,
|
||||
Libpng,
|
||||
},
|
||||
|
||||
ID: 1970,
|
||||
|
||||
latest: (*Versions).getStable,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -382,3 +382,27 @@ func init() {
|
||||
ID: 3549,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newPerlTestCmd() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.09"
|
||||
checksum = "gpGUwyC9IozDiYSgW_kXARNfXsTPFa6cTowJmmCBbPqcs2-pONZca_SB06FGy-7H"
|
||||
)
|
||||
return t.newViaPerlMakeMaker("Test::Cmd", version, newFromCPAN(
|
||||
"NEILB",
|
||||
"Test-Cmd",
|
||||
version,
|
||||
checksum,
|
||||
), nil), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[PerlTestCmd] = Metadata{
|
||||
f: Toolchain.newPerlTestCmd,
|
||||
|
||||
Name: "perl-Test::Cmd",
|
||||
Description: "portable testing of commands and scripts",
|
||||
Website: "https://metacpan.org/release/Test-Cmd",
|
||||
|
||||
ID: 6014,
|
||||
}
|
||||
}
|
||||
|
||||
31
internal/rosa/pixman.go
Normal file
31
internal/rosa/pixman.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package rosa
|
||||
|
||||
import "hakurei.app/internal/pkg"
|
||||
|
||||
func (t Toolchain) newPixman() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.46.4"
|
||||
checksum = "iECDxLG9SxUrvGHqeDoaBa-b3uqdT5DC4zudjtrwb8Wodq82pyacmFNEAo4SDsiE"
|
||||
)
|
||||
return t.NewPackage("pixman", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"pixman/pixman",
|
||||
"pixman-"+version,
|
||||
checksum,
|
||||
), nil, &MesonHelper{
|
||||
Setup: []KV{
|
||||
{"Dtests", "enabled"},
|
||||
},
|
||||
}), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Pixman] = Metadata{
|
||||
f: Toolchain.newPixman,
|
||||
|
||||
Name: "pixman",
|
||||
Description: "a low-level software library for pixel manipulation",
|
||||
Website: "https://pixman.org/",
|
||||
|
||||
ID: 3648,
|
||||
}
|
||||
}
|
||||
@@ -186,12 +186,12 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newXCBUtilKeysyms() (pkg.Artifact, string) {
|
||||
func (t Toolchain) newLibxcbUtilKeysyms() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.4.1"
|
||||
checksum = "-EEje12UEjtFBuIjb6Fy4cxEghV20BXwQ1BLvhtvSuVcrFkp_X-ZHRM48wAspXZ4"
|
||||
)
|
||||
return t.NewPackage("xcb-util-keysyms", version, newTar(
|
||||
return t.NewPackage("libxcb-util-keysyms", version, newTar(
|
||||
"https://xcb.freedesktop.org/dist/xcb-util-keysyms-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
@@ -202,10 +202,10 @@ func (t Toolchain) newXCBUtilKeysyms() (pkg.Artifact, string) {
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[XCBUtilKeysyms] = Metadata{
|
||||
f: Toolchain.newXCBUtilKeysyms,
|
||||
artifactsM[LibxcbUtilKeysyms] = Metadata{
|
||||
f: Toolchain.newLibxcbUtilKeysyms,
|
||||
|
||||
Name: "xcb-util-keysyms",
|
||||
Name: "libxcb-util-keysyms",
|
||||
Description: "standard X key constants and conversion to/from keycodes",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-keysyms",
|
||||
|
||||
@@ -217,6 +217,135 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibxcbUtilImage() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.4.1"
|
||||
checksum = "47pvXmFwaUBZIrJ4CE9xjTQIFyxeqoNAL-DshlB11GZ_jjI3G1a6KF0K7mtBQ1E7"
|
||||
)
|
||||
return t.NewPackage("libxcb-util-image", version, newTar(
|
||||
"https://xcb.freedesktop.org/dist/xcb-util-image-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), nil, (*MakeHelper)(nil),
|
||||
PkgConfig,
|
||||
|
||||
LibxcbUtil,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[LibxcbUtilImage] = Metadata{
|
||||
f: Toolchain.newLibxcbUtilImage,
|
||||
|
||||
Name: "libxcb-util-image",
|
||||
Description: "XCB port of Xlib's XImage and XShmImage functions",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-image",
|
||||
|
||||
Dependencies: P{
|
||||
LibxcbUtil,
|
||||
},
|
||||
|
||||
ID: 5168,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibxcbUtilWM() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.4.2"
|
||||
checksum = "g0VZgMU9hcIgyXb3XxBR9xqsvUMBd9qt_Dbmwoj2h5y24pODr_S_D0DhRsuXUNjF"
|
||||
)
|
||||
return t.NewPackage("libxcb-util-wm", version, newTar(
|
||||
"https://xcb.freedesktop.org/dist/xcb-util-wm-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), nil, (*MakeHelper)(nil),
|
||||
M4,
|
||||
PkgConfig,
|
||||
|
||||
XCB,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[LibxcbUtilWM] = Metadata{
|
||||
f: Toolchain.newLibxcbUtilWM,
|
||||
|
||||
Name: "libxcb-util-wm",
|
||||
Description: "XCB client and window-manager helpers for ICCCM & EWMH",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-wm",
|
||||
|
||||
Dependencies: P{
|
||||
XCB,
|
||||
},
|
||||
|
||||
ID: 5170,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibxcbUtil() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.4.1"
|
||||
checksum = "YMXGQUQbF6PoEAGflvYnJYsLWjti6sL_ifY47wIXTNGVM3tQ8u41nkBYN4K1D5CD"
|
||||
)
|
||||
return t.NewPackage("libxcb-util", version, newTar(
|
||||
"https://www.x.org/releases/individual/xcb/"+
|
||||
"xcb-util-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), nil, (*MakeHelper)(nil),
|
||||
PkgConfig,
|
||||
|
||||
utilMacros,
|
||||
XCB,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[LibxcbUtil] = Metadata{
|
||||
f: Toolchain.newLibxcbUtil,
|
||||
|
||||
Name: "libxcb-util",
|
||||
Description: "XCB utility libraries",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-util",
|
||||
|
||||
Dependencies: P{
|
||||
XCB,
|
||||
},
|
||||
|
||||
ID: 5165,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibxcbRenderUtil() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.3.10"
|
||||
checksum = "n08L8PyCoOd7v2vb6fSVq5Pq6JtteXVh9K2wrQMTNwGMf_Fjpi6i3HWF-TMFSVTI"
|
||||
)
|
||||
return t.NewPackage("libxcb-render-util", version, newTar(
|
||||
"https://www.x.org/releases/individual/xcb/"+
|
||||
"xcb-util-renderutil-"+version+".tar.gz",
|
||||
checksum,
|
||||
pkg.TarGzip,
|
||||
), nil, (*MakeHelper)(nil),
|
||||
PkgConfig,
|
||||
|
||||
utilMacros,
|
||||
XCB,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[LibxcbRenderUtil] = Metadata{
|
||||
f: Toolchain.newLibxcbRenderUtil,
|
||||
|
||||
Name: "libxcb-render-util",
|
||||
Description: "XCB convenience functions for the Render extension",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-render-util",
|
||||
|
||||
Dependencies: P{
|
||||
XCB,
|
||||
},
|
||||
|
||||
ID: 5169,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibX11() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.8.13"
|
||||
@@ -298,6 +427,44 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibXfixes() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "6.0.2"
|
||||
checksum = "_-kJfKZ7cE3NNeMr6NLSXCmsyP7MVEHVPLNfxatz2qBy3_fZJvPMQwZNOC9y6V5L"
|
||||
)
|
||||
return t.NewPackage("libXfixes", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"xorg/lib/libxfixes",
|
||||
"libXfixes-"+version,
|
||||
checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "NOCONFIGURE=1 ./autogen.sh",
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
PkgConfig,
|
||||
|
||||
utilMacros,
|
||||
XorgProto,
|
||||
LibX11,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[LibXfixes] = Metadata{
|
||||
f: Toolchain.newLibXfixes,
|
||||
|
||||
Name: "libXfixes",
|
||||
Description: "Xlib-based library for the XFIXES Extension",
|
||||
Website: "https://www.freedesktop.org/wiki/Software/FixesExt/",
|
||||
|
||||
Dependencies: P{
|
||||
LibX11,
|
||||
},
|
||||
|
||||
ID: 1775,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibXrender() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.9.12"
|
||||
@@ -446,6 +613,264 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newFontUtil() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.4.2"
|
||||
checksum = "YWiaIxkq-N2yNdbGa_RF1S0UkQq6xsgoRT73WZP2DOmyH_CJ0TAkpQjId657MQmh"
|
||||
)
|
||||
return t.NewPackage("font-util", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"xorg/font/util",
|
||||
"font-util-"+version,
|
||||
checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "NOCONFIGURE=1 ./autogen.sh",
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
PkgConfig,
|
||||
|
||||
utilMacros,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[FontUtil] = Metadata{
|
||||
f: Toolchain.newFontUtil,
|
||||
|
||||
Name: "font-util",
|
||||
Description: "X.Org font package creation/installation utilities",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/font/util",
|
||||
|
||||
ID: 15055,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibfontenc() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.1.9"
|
||||
checksum = "XqosXfbVwaoYzG9vVyRCl3eatwjASoJdLZsxQ37NN8S_jTyqNmbxpRSJGImJj7RS"
|
||||
)
|
||||
return t.NewPackage("libfontenc", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"xorg/lib/libfontenc",
|
||||
"libfontenc-"+version,
|
||||
checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "NOCONFIGURE=1 ./autogen.sh",
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
PkgConfig,
|
||||
|
||||
utilMacros,
|
||||
FontUtil,
|
||||
XorgProto,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Libfontenc] = Metadata{
|
||||
f: Toolchain.newLibfontenc,
|
||||
|
||||
Name: "libfontenc",
|
||||
Description: "X font encoding library",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libfontenc",
|
||||
|
||||
ID: 1613,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibxkbfile() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.2.0"
|
||||
checksum = "WUtph1ab0AyATahlwljchBxZJcpjYrjyhCK9DW2VO0uXEXaN22GWmUaibcA83i_B"
|
||||
)
|
||||
return t.NewPackage("libxkbfile", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"xorg/lib/libxkbfile",
|
||||
"libxkbfile-"+version,
|
||||
checksum,
|
||||
), nil, (*MesonHelper)(nil),
|
||||
LibX11,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Libxkbfile] = Metadata{
|
||||
f: Toolchain.newLibxkbfile,
|
||||
|
||||
Name: "libxkbfile",
|
||||
Description: "XKB file handling routines",
|
||||
Website: "http://www.x.org/wiki/XKB",
|
||||
|
||||
Dependencies: P{
|
||||
LibX11,
|
||||
},
|
||||
|
||||
ID: 1781,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newXkbcomp() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.5.0"
|
||||
checksum = "ttICW8ZPbljI-nw2kknvxFhwFoDK40iAMBeZDLAHYsHf3B6UPO_zc9TpzZYRRyZH"
|
||||
)
|
||||
return t.NewPackage("xkbcomp", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"xorg/app/xkbcomp",
|
||||
"xkbcomp-"+version,
|
||||
checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "NOCONFIGURE=1 ./autogen.sh",
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
PkgConfig,
|
||||
Bison,
|
||||
|
||||
utilMacros,
|
||||
Libxkbfile,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Xkbcomp] = Metadata{
|
||||
f: Toolchain.newXkbcomp,
|
||||
|
||||
Name: "xkbcomp",
|
||||
Description: "XKB keyboard description compiler",
|
||||
Website: "http://www.x.org/wiki/XKB",
|
||||
|
||||
Dependencies: P{
|
||||
Libxkbfile,
|
||||
},
|
||||
|
||||
ID: 15018,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibXfont2() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "2.0.7"
|
||||
checksum = "jv9BZNA02493KB8j1lfAErF5SA3ZFcAhm3_UVJ--Bp1maz-vNprl_wXpkHApBi9M"
|
||||
)
|
||||
return t.NewPackage("libXfont2", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"xorg/lib/libxfont",
|
||||
"libXfont2-"+version,
|
||||
checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "NOCONFIGURE=1 ./autogen.sh",
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
PkgConfig,
|
||||
|
||||
utilMacros,
|
||||
Freetype,
|
||||
XorgProto,
|
||||
Libxtrans,
|
||||
Libfontenc,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[LibXfont2] = Metadata{
|
||||
f: Toolchain.newLibXfont2,
|
||||
|
||||
Name: "libXfont2",
|
||||
Description: "X font handling library for server & utilities",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxfont",
|
||||
|
||||
Dependencies: P{
|
||||
Freetype,
|
||||
Libfontenc,
|
||||
},
|
||||
|
||||
ID: 17165,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibxcvt() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.1.3"
|
||||
checksum = "IfIA7SxlHMWh681e1AgYmZcRAfkZd5LlzmqcMRifNY5nNVRrUx_wnoaidAv0Yu03"
|
||||
)
|
||||
return t.NewPackage("libxcvt", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"xorg/lib/libxcvt",
|
||||
"libxcvt-"+version,
|
||||
checksum,
|
||||
), nil, (*MesonHelper)(nil)), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Libxcvt] = Metadata{
|
||||
f: Toolchain.newLibxcvt,
|
||||
|
||||
Name: "libxcvt",
|
||||
Description: "VESA CVT standard timing modeline generation library & utility",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcvt",
|
||||
|
||||
ID: 235147,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibXdmcp() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "1.1.5"
|
||||
checksum = "N6AJSv9pmeBedFn8KuSIOUGvTken4rkypNWVE2KfPlliwkfIbhfXrt5YHZkBMUHp"
|
||||
)
|
||||
return t.NewPackage("libXdmcp", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"xorg/lib/libxdmcp",
|
||||
"libXdmcp-"+version,
|
||||
checksum,
|
||||
), nil, &MakeHelper{
|
||||
Generate: "NOCONFIGURE=1 ./autogen.sh",
|
||||
},
|
||||
Automake,
|
||||
Libtool,
|
||||
PkgConfig,
|
||||
|
||||
utilMacros,
|
||||
XorgProto,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[LibXdmcp] = Metadata{
|
||||
f: Toolchain.newLibXdmcp,
|
||||
|
||||
Name: "libXdmcp",
|
||||
Description: "X Display Manager Control Protocol library",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxdmcp",
|
||||
|
||||
ID: 1772,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newXkeyboardConfig() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "2.47"
|
||||
checksum = "E03PsPIaRrxPAuKgDGSQyPiJB49wXtyyvdV0lVx3_G-pelMMlaFLkoTDHTHG_qgA"
|
||||
)
|
||||
return t.NewPackage("xkeyboard-config", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"xkeyboard-config/xkeyboard-config",
|
||||
"xkeyboard-config-"+version,
|
||||
checksum,
|
||||
), nil, (*MesonHelper)(nil),
|
||||
Perl,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[XkeyboardConfig] = Metadata{
|
||||
f: Toolchain.newXkeyboardConfig,
|
||||
|
||||
Name: "xkeyboard-config",
|
||||
Description: "the non-arch keyboard configuration database for X Window",
|
||||
Website: "https://www.freedesktop.org/wiki/Software/XKeyboardConfig/",
|
||||
|
||||
ID: 5191,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newLibpciaccess() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "0.19"
|
||||
@@ -477,3 +902,87 @@ func init() {
|
||||
ID: 1703,
|
||||
}
|
||||
}
|
||||
|
||||
func (t Toolchain) newXserver() (pkg.Artifact, string) {
|
||||
const (
|
||||
version = "21.1.22"
|
||||
checksum = "prLT2wKecBu5m9w1ThgIt0GvenNpjKXoOyvTiMA1oQTlP0QHh6QiWsdvH3OmUwNo"
|
||||
)
|
||||
return t.NewPackage("xserver", version, newFromGitLab(
|
||||
"gitlab.freedesktop.org",
|
||||
"xorg/xserver",
|
||||
"xorg-server-"+version,
|
||||
checksum,
|
||||
), nil, &MesonHelper{
|
||||
Setup: []KV{
|
||||
{"Dxorg", "true"},
|
||||
{"Dxephyr", "true"},
|
||||
{"Dxnest", "true"},
|
||||
{"Dipv6", "false"},
|
||||
|
||||
{"Dudev", "false"},
|
||||
{"Dudev_kms", "false"},
|
||||
{"Dglx", "false"},
|
||||
// ../../usr/src/xserver/glamor/glamor_glx.c:24:10: fatal error: 'epoxy/glx.h' file not found
|
||||
{"Dglamor", "false"},
|
||||
},
|
||||
},
|
||||
Gawk,
|
||||
|
||||
XorgProto,
|
||||
Libxtrans,
|
||||
Libxshmfence,
|
||||
Pixman,
|
||||
Libbsd,
|
||||
Xkbcomp,
|
||||
XkeyboardConfig,
|
||||
LibXfont2,
|
||||
DBus,
|
||||
FontUtil,
|
||||
Libxcvt,
|
||||
LibXext,
|
||||
Libmd,
|
||||
LibXdmcp,
|
||||
Libtirpc,
|
||||
Libepoxy,
|
||||
LibxcbUtil,
|
||||
LibxcbUtilImage,
|
||||
LibxcbUtilWM,
|
||||
LibxcbUtilKeysyms,
|
||||
LibxcbRenderUtil,
|
||||
Libpciaccess,
|
||||
KernelHeaders,
|
||||
), version
|
||||
}
|
||||
func init() {
|
||||
artifactsM[Xserver] = Metadata{
|
||||
f: Toolchain.newXserver,
|
||||
|
||||
Name: "xserver",
|
||||
Description: "X server",
|
||||
Website: "https://gitlab.freedesktop.org/xorg/xserver",
|
||||
|
||||
Dependencies: P{
|
||||
Xkbcomp,
|
||||
XkeyboardConfig,
|
||||
|
||||
XCB,
|
||||
Pixman,
|
||||
Libmd,
|
||||
Libbsd,
|
||||
Libtirpc,
|
||||
Libxcvt,
|
||||
LibXdmcp,
|
||||
LibXfont2,
|
||||
Libpciaccess,
|
||||
|
||||
// Xephyr
|
||||
LibxcbUtilImage,
|
||||
LibxcbUtilWM,
|
||||
LibxcbUtilKeysyms,
|
||||
LibxcbRenderUtil,
|
||||
},
|
||||
|
||||
ID: 5250,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user