forked from rosa/hakurei
Compare commits
5 Commits
wip-mint
...
wip-irdump
| Author | SHA1 | Date | |
|---|---|---|---|
| 77d1b14830 | |||
| c4d2a9471d | |||
| afbb4ad6ba | |||
| cb4c4a2a59 | |||
| 324e09aa10 |
76
cmd/irdump/main.go
Normal file
76
cmd/irdump/main.go
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"errors"
|
||||||
|
"log"
|
||||||
|
"os"
|
||||||
|
|
||||||
|
"hakurei.app/command"
|
||||||
|
"hakurei.app/internal/pkg"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
log.SetFlags(0)
|
||||||
|
log.SetPrefix("irdump: ")
|
||||||
|
|
||||||
|
var (
|
||||||
|
flagOutput string
|
||||||
|
flagReal bool
|
||||||
|
flagHeader bool
|
||||||
|
flagForce bool
|
||||||
|
flagRaw bool
|
||||||
|
)
|
||||||
|
c := command.New(os.Stderr, log.Printf, "irdump", func(args []string) (err error) {
|
||||||
|
var input *os.File
|
||||||
|
if len(args) != 1 {
|
||||||
|
return errors.New("irdump requires 1 argument")
|
||||||
|
}
|
||||||
|
if input, err = os.Open(args[0]); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
defer input.Close()
|
||||||
|
|
||||||
|
var output *os.File
|
||||||
|
if flagOutput == "" {
|
||||||
|
output = os.Stdout
|
||||||
|
} else {
|
||||||
|
defer output.Close()
|
||||||
|
if output, err = os.Create(flagOutput); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var out string
|
||||||
|
if out, err = pkg.Disassemble(input, flagReal, flagHeader, flagForce, flagRaw); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if _, err = output.WriteString(out); err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}).Flag(
|
||||||
|
&flagOutput,
|
||||||
|
"o", command.StringFlag(""),
|
||||||
|
"Output file for asm (leave empty for stdout)",
|
||||||
|
).Flag(
|
||||||
|
&flagReal,
|
||||||
|
"r", command.BoolFlag(false),
|
||||||
|
"skip label generation; idents print real value",
|
||||||
|
).Flag(
|
||||||
|
&flagHeader,
|
||||||
|
"H", command.BoolFlag(false),
|
||||||
|
"display artifact headers",
|
||||||
|
).Flag(
|
||||||
|
&flagForce,
|
||||||
|
"f", command.BoolFlag(false),
|
||||||
|
"force display (skip validations)",
|
||||||
|
).Flag(
|
||||||
|
&flagRaw,
|
||||||
|
"R", command.BoolFlag(false),
|
||||||
|
"don't format output",
|
||||||
|
)
|
||||||
|
|
||||||
|
c.MustParse(os.Args[1:], func(err error) {
|
||||||
|
log.Fatal(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -506,8 +506,6 @@ func main() {
|
|||||||
flagExport string
|
flagExport string
|
||||||
flagRemote bool
|
flagRemote bool
|
||||||
flagNoReply bool
|
flagNoReply bool
|
||||||
flagFaults bool
|
|
||||||
flagPop bool
|
|
||||||
|
|
||||||
flagBoot bool
|
flagBoot bool
|
||||||
flagStd bool
|
flagStd bool
|
||||||
@@ -616,49 +614,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return err
|
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(
|
).Flag(
|
||||||
@@ -689,40 +644,9 @@ func main() {
|
|||||||
&flagStd,
|
&flagStd,
|
||||||
"std", command.BoolFlag(false),
|
"std", command.BoolFlag(false),
|
||||||
"Build on the intermediate toolchain",
|
"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(
|
c.NewCommand(
|
||||||
"abort",
|
"abort",
|
||||||
"Abort all pending cures on the daemon",
|
"Abort all pending cures on the daemon",
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package pkg_test
|
package pkg_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
|
||||||
_ "embed"
|
_ "embed"
|
||||||
"encoding/gob"
|
"encoding/gob"
|
||||||
"errors"
|
"errors"
|
||||||
@@ -86,30 +85,6 @@ func TestExec(t *testing.T) {
|
|||||||
pkg.MustPath("/opt", false, testtool),
|
pkg.MustPath("/opt", false, testtool),
|
||||||
), ignorePathname, wantOffline, nil},
|
), 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(
|
{"error passthrough", pkg.NewExec(
|
||||||
"", "", nil, 0, false, true,
|
"", "", nil, 0, false, true,
|
||||||
pkg.AbsWork,
|
pkg.AbsWork,
|
||||||
@@ -137,41 +112,18 @@ func TestExec(t *testing.T) {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// check init failure passthrough
|
// check init failure passthrough
|
||||||
initFailureArtifact := pkg.NewExec(
|
var exitError *exec.ExitError
|
||||||
|
if _, _, err := c.Cure(pkg.NewExec(
|
||||||
"", "", nil, 0, false, false,
|
"", "", nil, 0, false, false,
|
||||||
pkg.AbsWork,
|
pkg.AbsWork,
|
||||||
nil,
|
nil,
|
||||||
check.MustAbs("/opt/bin/testtool"),
|
check.MustAbs("/opt/bin/testtool"),
|
||||||
[]string{"testtool"},
|
[]string{"testtool"},
|
||||||
)
|
)); !errors.As(err, &exitError) ||
|
||||||
var exitError *exec.ExitError
|
|
||||||
if _, _, err := c.Cure(initFailureArtifact); !errors.As(err, &exitError) ||
|
|
||||||
exitError.ExitCode() != hst.ExitFailure {
|
exitError.ExitCode() != hst.ExitFailure {
|
||||||
t.Fatalf("Cure: error = %v, want init exit status 1", err)
|
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)
|
testtoolDestroy(t, base, c)
|
||||||
}, expectsFS{
|
}, expectsFS{
|
||||||
".": {Mode: fs.ModeDir | 0700},
|
".": {Mode: fs.ModeDir | 0700},
|
||||||
@@ -183,8 +135,6 @@ func TestExec(t *testing.T) {
|
|||||||
"checksum/OLBgp1GsljhM2TJ-sbHjaiH9txEUvgdDTAzHv2P24donTt6_529l-9Ua0vFImLlb": {Mode: 0400, Data: []byte{}},
|
"checksum/OLBgp1GsljhM2TJ-sbHjaiH9txEUvgdDTAzHv2P24donTt6_529l-9Ua0vFImLlb": {Mode: 0400, Data: []byte{}},
|
||||||
|
|
||||||
"identifier": {Mode: fs.ModeDir | 0700},
|
"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/_gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/OLBgp1GsljhM2TJ-sbHjaiH9txEUvgdDTAzHv2P24donTt6_529l-9Ua0vFImLlb")},
|
||||||
"identifier/" + expected.Offline: {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/" + wantOfflineEncode)},
|
"identifier/" + expected.Offline: {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/" + wantOfflineEncode)},
|
||||||
"identifier/vjz1MHPcGBKV7sjcs8jQP3cqxJ1hgPTiQBMCEHP9BGXjGxd-tJmEmXKaStObo5gK": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/MGWmEfjut2QE2xPJwTsmUzpff4BN_FEnQ7T0j7gvUCCiugJQNwqt9m151fm9D1yU")},
|
"identifier/vjz1MHPcGBKV7sjcs8jQP3cqxJ1hgPTiQBMCEHP9BGXjGxd-tJmEmXKaStObo5gK": {Mode: fs.ModeSymlink | 0777, Data: []byte("../checksum/MGWmEfjut2QE2xPJwTsmUzpff4BN_FEnQ7T0j7gvUCCiugJQNwqt9m151fm9D1yU")},
|
||||||
@@ -228,7 +178,6 @@ func TestExec(t *testing.T) {
|
|||||||
), ignorePathname, wantNet, nil},
|
), ignorePathname, wantNet, nil},
|
||||||
})
|
})
|
||||||
|
|
||||||
destroyStatus(t, base, 2, 0)
|
|
||||||
testtoolDestroy(t, base, c)
|
testtoolDestroy(t, base, c)
|
||||||
}, expectsFS{
|
}, expectsFS{
|
||||||
".": {Mode: fs.ModeDir | 0700},
|
".": {Mode: fs.ModeDir | 0700},
|
||||||
@@ -272,7 +221,6 @@ func TestExec(t *testing.T) {
|
|||||||
), ignorePathname, wantOffline, nil},
|
), ignorePathname, wantOffline, nil},
|
||||||
})
|
})
|
||||||
|
|
||||||
destroyStatus(t, base, 2, 0)
|
|
||||||
testtoolDestroy(t, base, c)
|
testtoolDestroy(t, base, c)
|
||||||
}, expectsFS{
|
}, expectsFS{
|
||||||
".": {Mode: fs.ModeDir | 0700},
|
".": {Mode: fs.ModeDir | 0700},
|
||||||
@@ -319,7 +267,6 @@ func TestExec(t *testing.T) {
|
|||||||
), ignorePathname, wantOffline, nil},
|
), ignorePathname, wantOffline, nil},
|
||||||
})
|
})
|
||||||
|
|
||||||
destroyStatus(t, base, 2, 0)
|
|
||||||
testtoolDestroy(t, base, c)
|
testtoolDestroy(t, base, c)
|
||||||
}, expectsFS{
|
}, expectsFS{
|
||||||
".": {Mode: fs.ModeDir | 0700},
|
".": {Mode: fs.ModeDir | 0700},
|
||||||
@@ -388,7 +335,6 @@ func TestExec(t *testing.T) {
|
|||||||
), ignorePathname, wantOffline, nil},
|
), ignorePathname, wantOffline, nil},
|
||||||
})
|
})
|
||||||
|
|
||||||
destroyStatus(t, base, 2, 0)
|
|
||||||
testtoolDestroy(t, base, c)
|
testtoolDestroy(t, base, c)
|
||||||
}, expectsFS{
|
}, expectsFS{
|
||||||
".": {Mode: fs.ModeDir | 0700},
|
".": {Mode: fs.ModeDir | 0700},
|
||||||
@@ -441,7 +387,6 @@ func TestExec(t *testing.T) {
|
|||||||
), ignorePathname, wantOffline, nil},
|
), ignorePathname, wantOffline, nil},
|
||||||
})
|
})
|
||||||
|
|
||||||
destroyStatus(t, base, 2, 0)
|
|
||||||
testtoolDestroy(t, base, c)
|
testtoolDestroy(t, base, c)
|
||||||
}, expectsFS{
|
}, expectsFS{
|
||||||
".": {Mode: fs.ModeDir | 0700},
|
".": {Mode: fs.ModeDir | 0700},
|
||||||
@@ -505,8 +450,6 @@ func TestExec(t *testing.T) {
|
|||||||
"check": {Mode: 0400, Data: []byte("binfmt")},
|
"check": {Mode: 0400, Data: []byte("binfmt")},
|
||||||
}, nil},
|
}, nil},
|
||||||
})
|
})
|
||||||
|
|
||||||
destroyStatus(t, base, 2, 0)
|
|
||||||
}, expectsFS{
|
}, expectsFS{
|
||||||
".": {Mode: fs.ModeDir | 0700},
|
".": {Mode: fs.ModeDir | 0700},
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ package pkg
|
|||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"bytes"
|
"bytes"
|
||||||
"cmp"
|
|
||||||
"context"
|
"context"
|
||||||
"crypto/sha512"
|
"crypto/sha512"
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
@@ -26,7 +25,6 @@ import (
|
|||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
"syscall"
|
"syscall"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
|
||||||
"unique"
|
"unique"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
@@ -250,14 +248,7 @@ func (t *TContext) destroy(errP *error) {
|
|||||||
*errP = errors.Join(*errP, err)
|
*errP = errors.Join(*errP, err)
|
||||||
}
|
}
|
||||||
if *errP != nil {
|
if *errP != nil {
|
||||||
*errP = errors.Join(*errP, os.Rename(
|
*errP = errors.Join(*errP, os.Remove(t.statusPath.String()))
|
||||||
t.statusPath.String(), t.cache.base.Append(
|
|
||||||
dirFault,
|
|
||||||
t.ids+"."+strconv.FormatUint(uint64(
|
|
||||||
time.Now().UnixNano(),
|
|
||||||
), 10),
|
|
||||||
).String(),
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
t.status = nil
|
t.status = nil
|
||||||
}
|
}
|
||||||
@@ -518,34 +509,36 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// fileLock is the lock file for exclusive access to the cache directory.
|
// fileLock is the file name appended to Cache.base for guaranteeing
|
||||||
|
// exclusive access to the cache directory.
|
||||||
fileLock = "lock"
|
fileLock = "lock"
|
||||||
// fileVariant is a file holding the variant identification string set by a
|
// fileVariant is the file name appended to Cache.base holding the variant
|
||||||
// prior call to [SetExtension].
|
// identification string set by a prior call to [SetExtension].
|
||||||
fileVariant = "variant"
|
fileVariant = "variant"
|
||||||
|
|
||||||
// dirSubstitute holds symlinks to artifacts by checksum, named after their
|
// dirSubstitute is the directory name appended to Cache.base for linking
|
||||||
// substitute identifier.
|
// artifacts named after their substitute identifier.
|
||||||
dirSubstitute = "substitute"
|
dirSubstitute = "substitute"
|
||||||
// dirIdentifier holds symlinks to artifacts by checksum, named after their
|
// dirIdentifier is the directory name appended to Cache.base for storing
|
||||||
// IR-based identifier.
|
// artifacts named after their [ID].
|
||||||
dirIdentifier = "identifier"
|
dirIdentifier = "identifier"
|
||||||
// dirChecksum holds artifacts named after their [Checksum].
|
// dirChecksum is the directory name appended to Cache.base for storing
|
||||||
|
// artifacts named after their [Checksum].
|
||||||
dirChecksum = "checksum"
|
dirChecksum = "checksum"
|
||||||
// dirStatus holds artifact metadata and logs named after their IR-based
|
// dirStatus is the directory name appended to Cache.base for storing
|
||||||
// identifier. For [FloodArtifact], the same file is also available under
|
// artifact metadata and logs named after their [ID].
|
||||||
// its substitute identifier.
|
|
||||||
dirStatus = "status"
|
dirStatus = "status"
|
||||||
// dirFault holds status files of faulted cures.
|
|
||||||
dirFault = "fault"
|
|
||||||
|
|
||||||
// dirWork holds working pathnames set up during [Cache.Cure].
|
// dirWork is the directory name appended to Cache.base for working
|
||||||
|
// pathnames set up during [Cache.Cure].
|
||||||
dirWork = "work"
|
dirWork = "work"
|
||||||
// dirTemp holds scratch space allocated during [Cache.Cure].
|
// dirTemp is the directory name appended to Cache.base for scratch space
|
||||||
|
// pathnames allocated during [Cache.Cure].
|
||||||
dirTemp = "temp"
|
dirTemp = "temp"
|
||||||
|
|
||||||
// dirExecScratch is scratch space set up for the container started by
|
// dirExecScratch is the directory name appended to Cache.base for scratch
|
||||||
// [Cache.EnterExec]. Exclusivity via Cache.inExec.
|
// space setting up the container started by [Cache.EnterExec]. Exclusivity
|
||||||
|
// via Cache.inExec.
|
||||||
dirExecScratch = "scratch"
|
dirExecScratch = "scratch"
|
||||||
|
|
||||||
// checksumLinknamePrefix is prepended to the encoded [Checksum] value
|
// checksumLinknamePrefix is prepended to the encoded [Checksum] value
|
||||||
@@ -2002,11 +1995,10 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
|
|||||||
buf := c.getIdentBuf()
|
buf := c.getIdentBuf()
|
||||||
sh.Sum(buf[wordSize:wordSize])
|
sh.Sum(buf[wordSize:wordSize])
|
||||||
substitute = unique.Make(ID(buf[wordSize:]))
|
substitute = unique.Make(ID(buf[wordSize:]))
|
||||||
substitutes := Encode(substitute.Value())
|
|
||||||
c.putIdentBuf(buf)
|
c.putIdentBuf(buf)
|
||||||
alternative = c.base.Append(
|
alternative = c.base.Append(
|
||||||
dirSubstitute,
|
dirSubstitute,
|
||||||
substitutes,
|
Encode(substitute.Value()),
|
||||||
)
|
)
|
||||||
|
|
||||||
if c.flags&CIgnoreSubstitutes == 0 {
|
if c.flags&CIgnoreSubstitutes == 0 {
|
||||||
@@ -2022,17 +2014,6 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
|
|||||||
dirChecksum,
|
dirChecksum,
|
||||||
checksums,
|
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
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2042,15 +2023,6 @@ func (c *Cache) cure(a Artifact, curesExempt bool) (
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
err = ca.Cure(&f)
|
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)
|
c.exitCure(a, curesExempt)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
@@ -2159,52 +2131,6 @@ func (c *Cache) OpenStatus(a Artifact) (r io.ReadSeekCloser, err error) {
|
|||||||
return
|
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
|
// Abort cancels all pending cures and waits for them to clean up, but does not
|
||||||
// close the cache.
|
// close the cache.
|
||||||
func (c *Cache) Abort() {
|
func (c *Cache) Abort() {
|
||||||
@@ -2308,7 +2234,6 @@ func open(
|
|||||||
dirIdentifier,
|
dirIdentifier,
|
||||||
dirChecksum,
|
dirChecksum,
|
||||||
dirStatus,
|
dirStatus,
|
||||||
dirFault,
|
|
||||||
dirWork,
|
dirWork,
|
||||||
} {
|
} {
|
||||||
if err := os.MkdirAll(
|
if err := os.MkdirAll(
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import (
|
|||||||
"syscall"
|
"syscall"
|
||||||
"testing"
|
"testing"
|
||||||
"testing/fstest"
|
"testing/fstest"
|
||||||
"time"
|
|
||||||
"unique"
|
"unique"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
|
|
||||||
@@ -245,41 +244,6 @@ 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) {
|
func TestIdent(t *testing.T) {
|
||||||
t.Parallel()
|
t.Parallel()
|
||||||
|
|
||||||
@@ -524,17 +488,10 @@ func checkWithCache(t *testing.T, testCases []cacheTestCase) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// destroy empty status directory
|
// destroy non-deterministic status files
|
||||||
if err := syscall.Rmdir(base.Append("status").String()); err != nil {
|
if err := os.RemoveAll(base.Append("status").String()); err != nil {
|
||||||
t.Error(expectsFrom(base.Append("status").String()))
|
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// destroy empty fault directory
|
|
||||||
if err := os.Remove(base.Append("fault").String()); err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
want := tc.want.hash()
|
want := tc.want.hash()
|
||||||
|
|
||||||
var checksum pkg.Checksum
|
var checksum pkg.Checksum
|
||||||
@@ -598,21 +555,6 @@ func cureMany(t *testing.T, c *pkg.Cache, steps []cureStep) {
|
|||||||
for _, step := range steps {
|
for _, step := range steps {
|
||||||
t.Log("cure step:", step.name)
|
t.Log("cure step:", step.name)
|
||||||
if pathname, checksum, err := c.Cure(step.a); !reflect.DeepEqual(err, step.err) {
|
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)
|
t.Fatalf("Cure: error = %v, want %v", err, step.err)
|
||||||
} else if step.pathname != ignorePathname && !pathname.Is(step.pathname) {
|
} else if step.pathname != ignorePathname && !pathname.Is(step.pathname) {
|
||||||
t.Fatalf("Cure: pathname = %q, want %q", pathname, step.pathname)
|
t.Fatalf("Cure: pathname = %q, want %q", pathname, step.pathname)
|
||||||
@@ -1117,14 +1059,8 @@ func TestCache(t *testing.T) {
|
|||||||
"_EmV5nsYZ2UWHgRmLDMU8i-rJWDx-kv5_1pFrzQI7vMMCM5mAXivO8UZtVfOqMR_",
|
"_EmV5nsYZ2UWHgRmLDMU8i-rJWDx-kv5_1pFrzQI7vMMCM5mAXivO8UZtVfOqMR_",
|
||||||
), want, nil},
|
), 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{
|
}, expectsFS{
|
||||||
".": {Mode: fs.ModeDir | 0700},
|
".": {Mode: fs.ModeDir | 0700},
|
||||||
|
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ const (
|
|||||||
Fakeroot
|
Fakeroot
|
||||||
Findutils
|
Findutils
|
||||||
Flex
|
Flex
|
||||||
FontUtil
|
|
||||||
Freetype
|
|
||||||
Fuse
|
Fuse
|
||||||
GMP
|
GMP
|
||||||
GLib
|
GLib
|
||||||
@@ -79,10 +77,7 @@ const (
|
|||||||
LIT
|
LIT
|
||||||
LibX11
|
LibX11
|
||||||
LibXau
|
LibXau
|
||||||
LibXdmcp
|
|
||||||
LibXext
|
LibXext
|
||||||
LibXfixes
|
|
||||||
LibXfont2
|
|
||||||
LibXrandr
|
LibXrandr
|
||||||
LibXrender
|
LibXrender
|
||||||
LibXxf86vm
|
LibXxf86vm
|
||||||
@@ -92,11 +87,9 @@ const (
|
|||||||
Libconfig
|
Libconfig
|
||||||
LibdisplayInfo
|
LibdisplayInfo
|
||||||
Libdrm
|
Libdrm
|
||||||
Libepoxy
|
|
||||||
Libev
|
Libev
|
||||||
Libexpat
|
Libexpat
|
||||||
Libffi
|
Libffi
|
||||||
Libfontenc
|
|
||||||
Libgd
|
Libgd
|
||||||
Libglvnd
|
Libglvnd
|
||||||
Libiconv
|
Libiconv
|
||||||
@@ -108,28 +101,17 @@ const (
|
|||||||
Libpsl
|
Libpsl
|
||||||
Libseccomp
|
Libseccomp
|
||||||
Libtasn1
|
Libtasn1
|
||||||
Libtirpc
|
|
||||||
Libtool
|
Libtool
|
||||||
Libucontext
|
Libucontext
|
||||||
Libunistring
|
Libunistring
|
||||||
Libva
|
|
||||||
LibxcbRenderUtil
|
|
||||||
LibxcbUtil
|
|
||||||
LibxcbUtilImage
|
|
||||||
LibxcbUtilKeysyms
|
|
||||||
LibxcbUtilWM
|
|
||||||
Libxcvt
|
|
||||||
Libxkbfile
|
|
||||||
Libxml2
|
|
||||||
Libxshmfence
|
Libxshmfence
|
||||||
|
Libxml2
|
||||||
Libxslt
|
Libxslt
|
||||||
Libxtrans
|
Libxtrans
|
||||||
LMSensors
|
|
||||||
M4
|
M4
|
||||||
MPC
|
MPC
|
||||||
MPFR
|
MPFR
|
||||||
Make
|
Make
|
||||||
Mesa
|
|
||||||
Meson
|
Meson
|
||||||
Mksh
|
Mksh
|
||||||
MuslFts
|
MuslFts
|
||||||
@@ -151,12 +133,10 @@ const (
|
|||||||
PerlPodParser
|
PerlPodParser
|
||||||
PerlSGMLS
|
PerlSGMLS
|
||||||
PerlTermReadKey
|
PerlTermReadKey
|
||||||
PerlTestCmd
|
|
||||||
PerlTextCharWidth
|
PerlTextCharWidth
|
||||||
PerlTextWrapI18N
|
PerlTextWrapI18N
|
||||||
PerlUnicodeLineBreak
|
PerlUnicodeLineBreak
|
||||||
PerlYAMLTiny
|
PerlYAMLTiny
|
||||||
Pixman
|
|
||||||
PkgConfig
|
PkgConfig
|
||||||
Procps
|
Procps
|
||||||
Python
|
Python
|
||||||
@@ -181,7 +161,6 @@ const (
|
|||||||
Rdfind
|
Rdfind
|
||||||
Readline
|
Readline
|
||||||
Rsync
|
Rsync
|
||||||
Ruby
|
|
||||||
Sed
|
Sed
|
||||||
SPIRVHeaders
|
SPIRVHeaders
|
||||||
SPIRVLLVMTranslator
|
SPIRVLLVMTranslator
|
||||||
@@ -200,12 +179,10 @@ const (
|
|||||||
WaylandProtocols
|
WaylandProtocols
|
||||||
XCB
|
XCB
|
||||||
XCBProto
|
XCBProto
|
||||||
|
XCBUtilKeysyms
|
||||||
XDGDBusProxy
|
XDGDBusProxy
|
||||||
XZ
|
XZ
|
||||||
Xkbcomp
|
|
||||||
XkeyboardConfig
|
|
||||||
XorgProto
|
XorgProto
|
||||||
Xserver
|
|
||||||
Zlib
|
Zlib
|
||||||
Zstd
|
Zstd
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
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,7 +62,6 @@ disable_test t7002-mv-sparse-checkout
|
|||||||
disable_test t1451-fsck-buffer
|
disable_test t1451-fsck-buffer
|
||||||
disable_test t4104-apply-boundary
|
disable_test t4104-apply-boundary
|
||||||
disable_test t4200-rerere
|
disable_test t4200-rerere
|
||||||
disable_test t5515-fetch-merge-logic
|
|
||||||
`,
|
`,
|
||||||
Check: []string{
|
Check: []string{
|
||||||
"-C t",
|
"-C t",
|
||||||
|
|||||||
@@ -189,18 +189,9 @@ func (t Toolchain) newSPIRVLLVMTranslator() (pkg.Artifact, string) {
|
|||||||
), &PackageAttr{
|
), &PackageAttr{
|
||||||
Patches: []KV{
|
Patches: []KV{
|
||||||
{"remove-early-prefix", `diff --git a/CMakeLists.txt b/CMakeLists.txt
|
{"remove-early-prefix", `diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index c000a77e..f18f3fde 100644
|
index c000a77e..86f79b03 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/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(
|
@@ -172,5 +172,5 @@ install(
|
||||||
FILES
|
FILES
|
||||||
${CMAKE_BINARY_DIR}/LLVMSPIRVLib.pc
|
${CMAKE_BINARY_DIR}/LLVMSPIRVLib.pc
|
||||||
@@ -208,7 +199,7 @@ index c000a77e..f18f3fde 100644
|
|||||||
- ${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}/pkgconfig
|
- ${CMAKE_INSTALL_PREFIX}/lib${LLVM_LIBDIR_SUFFIX}/pkgconfig
|
||||||
+ lib${LLVM_LIBDIR_SUFFIX}/pkgconfig
|
+ lib${LLVM_LIBDIR_SUFFIX}/pkgconfig
|
||||||
)
|
)
|
||||||
;`},
|
`},
|
||||||
},
|
},
|
||||||
|
|
||||||
// litArgs emits shell syntax
|
// litArgs emits shell syntax
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
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,10 +1,6 @@
|
|||||||
package rosa
|
package rosa
|
||||||
|
|
||||||
import (
|
import "hakurei.app/internal/pkg"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"hakurei.app/internal/pkg"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (t Toolchain) newLibglvnd() (pkg.Artifact, string) {
|
func (t Toolchain) newLibglvnd() (pkg.Artifact, string) {
|
||||||
const (
|
const (
|
||||||
@@ -16,22 +12,8 @@ func (t Toolchain) newLibglvnd() (pkg.Artifact, string) {
|
|||||||
"glvnd/libglvnd",
|
"glvnd/libglvnd",
|
||||||
"v"+version,
|
"v"+version,
|
||||||
checksum,
|
checksum,
|
||||||
), nil, &MesonHelper{
|
), nil, (*MesonHelper)(nil),
|
||||||
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
|
Binutils, // symbols check fail with llvm nm
|
||||||
Xserver, // test suite wants X server
|
|
||||||
|
|
||||||
LibXext,
|
|
||||||
), version
|
), version
|
||||||
}
|
}
|
||||||
func init() {
|
func init() {
|
||||||
@@ -42,10 +24,6 @@ func init() {
|
|||||||
Description: "The GL Vendor-Neutral Dispatch library",
|
Description: "The GL Vendor-Neutral Dispatch library",
|
||||||
Website: "https://gitlab.freedesktop.org/glvnd/libglvnd",
|
Website: "https://gitlab.freedesktop.org/glvnd/libglvnd",
|
||||||
|
|
||||||
Dependencies: P{
|
|
||||||
LibXext,
|
|
||||||
},
|
|
||||||
|
|
||||||
ID: 12098,
|
ID: 12098,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,180 +64,3 @@ func init() {
|
|||||||
ID: 1596,
|
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,27 +382,3 @@ func init() {
|
|||||||
ID: 3549,
|
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
package rosa
|
|
||||||
|
|
||||||
import (
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"hakurei.app/internal/pkg"
|
|
||||||
)
|
|
||||||
|
|
||||||
func (t Toolchain) newRuby() (pkg.Artifact, string) {
|
|
||||||
const (
|
|
||||||
version = "4.0.4"
|
|
||||||
checksum = "QyulcwFhodxYsuYu2MfMgk5nnVpsR5NO2NGsJ3AIMFJQdafn6ZkFBJhVp_XhU6gU"
|
|
||||||
)
|
|
||||||
return t.NewPackage("ruby", version, newTar(
|
|
||||||
"https://cache.ruby-lang.org/pub/ruby/"+
|
|
||||||
strings.Join(strings.SplitN(version, ".", 3)[:2], ".")+
|
|
||||||
"/ruby-"+version+".tar.gz",
|
|
||||||
checksum,
|
|
||||||
pkg.TarGzip,
|
|
||||||
), nil, &MakeHelper{
|
|
||||||
SkipCheck: true,
|
|
||||||
Configure: []KV{[2]string{"--disable-install-doc"}},
|
|
||||||
},
|
|
||||||
Libffi,
|
|
||||||
OpenSSL,
|
|
||||||
), version
|
|
||||||
}
|
|
||||||
func init() {
|
|
||||||
artifactsM[Ruby] = Metadata{
|
|
||||||
f: Toolchain.newRuby,
|
|
||||||
|
|
||||||
Name: "ruby",
|
|
||||||
Description: "a programming language",
|
|
||||||
Website: "https://www.ruby-lang.org/",
|
|
||||||
|
|
||||||
// TODO(ophestra): resolve runtime deps
|
|
||||||
|
|
||||||
ID: 4223,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -186,12 +186,12 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t Toolchain) newLibxcbUtilKeysyms() (pkg.Artifact, string) {
|
func (t Toolchain) newXCBUtilKeysyms() (pkg.Artifact, string) {
|
||||||
const (
|
const (
|
||||||
version = "0.4.1"
|
version = "0.4.1"
|
||||||
checksum = "-EEje12UEjtFBuIjb6Fy4cxEghV20BXwQ1BLvhtvSuVcrFkp_X-ZHRM48wAspXZ4"
|
checksum = "-EEje12UEjtFBuIjb6Fy4cxEghV20BXwQ1BLvhtvSuVcrFkp_X-ZHRM48wAspXZ4"
|
||||||
)
|
)
|
||||||
return t.NewPackage("libxcb-util-keysyms", version, newTar(
|
return t.NewPackage("xcb-util-keysyms", version, newTar(
|
||||||
"https://xcb.freedesktop.org/dist/xcb-util-keysyms-"+version+".tar.gz",
|
"https://xcb.freedesktop.org/dist/xcb-util-keysyms-"+version+".tar.gz",
|
||||||
checksum,
|
checksum,
|
||||||
pkg.TarGzip,
|
pkg.TarGzip,
|
||||||
@@ -202,10 +202,10 @@ func (t Toolchain) newLibxcbUtilKeysyms() (pkg.Artifact, string) {
|
|||||||
), version
|
), version
|
||||||
}
|
}
|
||||||
func init() {
|
func init() {
|
||||||
artifactsM[LibxcbUtilKeysyms] = Metadata{
|
artifactsM[XCBUtilKeysyms] = Metadata{
|
||||||
f: Toolchain.newLibxcbUtilKeysyms,
|
f: Toolchain.newXCBUtilKeysyms,
|
||||||
|
|
||||||
Name: "libxcb-util-keysyms",
|
Name: "xcb-util-keysyms",
|
||||||
Description: "standard X key constants and conversion to/from keycodes",
|
Description: "standard X key constants and conversion to/from keycodes",
|
||||||
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-keysyms",
|
Website: "https://gitlab.freedesktop.org/xorg/lib/libxcb-keysyms",
|
||||||
|
|
||||||
@@ -217,135 +217,6 @@ 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) {
|
func (t Toolchain) newLibX11() (pkg.Artifact, string) {
|
||||||
const (
|
const (
|
||||||
version = "1.8.13"
|
version = "1.8.13"
|
||||||
@@ -427,44 +298,6 @@ 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) {
|
func (t Toolchain) newLibXrender() (pkg.Artifact, string) {
|
||||||
const (
|
const (
|
||||||
version = "0.9.12"
|
version = "0.9.12"
|
||||||
@@ -613,264 +446,6 @@ 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) {
|
func (t Toolchain) newLibpciaccess() (pkg.Artifact, string) {
|
||||||
const (
|
const (
|
||||||
version = "0.19"
|
version = "0.19"
|
||||||
@@ -902,87 +477,3 @@ func init() {
|
|||||||
ID: 1703,
|
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