Skip to content

Commit

Permalink
local build test
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Hallyn <[email protected]>
  • Loading branch information
hallyn committed Dec 23, 2023
1 parent 0e2c5b7 commit e04840f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ORAS_VERSION := 1.0.0-rc.1
REGCTL := $(TOOLSDIR)/bin/regctl
REGCTL_VERSION := 0.5.0
TOPDIR := $(shell git rev-parse --show-toplevel)
BOOTKIT_VERSION ?= "v0.0.18.231121"
BOOTKIT_VERSION ?= "v0.0.19-serge1"
ROOTFS_VERSION = $(BOOTKIT_VERSION)

archout = $(shell arch)
Expand Down
3 changes: 2 additions & 1 deletion layers/install/stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ install-base:
build_only: true
from:
type: docker
url: "docker://zothub.io/machine/bootkit/rootfs:${{ROOTFS_VERSION}}-squashfs"
url: "oci:/home/serge/src/project-machine/build-bootkit/oci:rootfs-squashfs"
#url: "docker://zothub.io/machine/bootkit/rootfs:${{ROOTFS_VERSION}}-squashfs"

install-rootfs-pkg:
build_only: true
Expand Down
3 changes: 2 additions & 1 deletion layers/provision/stacker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ provision-base:
build_only: true
from:
type: docker
url: "docker://zothub.io/machine/bootkit/rootfs:${{ROOTFS_VERSION}}-squashfs"
url: "oci:/home/serge/src/project-machine/build-bootkit/oci:rootfs-squashfs"
#url: "docker://zothub.io/machine/bootkit/rootfs:${{ROOTFS_VERSION}}-squashfs"

provision-rootfs-pkg:
build_only: true
Expand Down
3 changes: 2 additions & 1 deletion pkg/mosconfig/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ func (i *ImportFile) HasTarget(name string) bool {

func (i *ImportFile) CompleteTargets(keyProject string) (UserTargets, error) {
if !i.HasTarget("hostfs") {
s := fmt.Sprintf("docker://zothub.io/machine/bootkit/demo-target-rootfs:%s-squashfs", trust.RelVersion)
//s := fmt.Sprintf("docker://zothub.io/machine/bootkit/demo-target-rootfs:%s-squashfs", trust.RelVersion)
s := "oci:/home/serge/src/project-machine/mos/oci:demo-target-rootfs-squashfs"
newT := UserTarget{
ServiceName: "hostfs",
ServiceType: "hostfs",
Expand Down
8 changes: 4 additions & 4 deletions pkg/mosconfig/mkboot.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ product: "%s"
update_type: complete
targets:
- service_name: livecd
source: "docker://zothub.io/machine/bootkit/provision-rootfs:%s-squashfs"
source: "oci:/home/serge/src/project-machine/mos/oci:provision-rootfs-squashfs"
version: %s
service_type: fs-only
nsgroup: "none"
Expand All @@ -453,7 +453,7 @@ product: "%s"
update_type: complete
targets:
- service_name: livecd
source: "docker://zothub.io/machine/bootkit/install-rootfs:%s-squashfs"
source: "oci:/home/serge/src/project-machine/mos/oci:install-rootfs-squashfs"
version: %s
service_type: fs-only
nsgroup: "none"
Expand Down Expand Up @@ -488,7 +488,7 @@ func BuildProvisioner(keysetName, projectName, isofile string) error {
if err != nil {
return errors.Wrapf(err, "Failed to read project uuid (%q)", pPath)
}
manifestText := fmt.Sprintf(provisionManifestTemplate, string(productUUID), LayerVersion, LayerVersion)
manifestText := fmt.Sprintf(provisionManifestTemplate, string(productUUID), LayerVersion)

manifestpath := filepath.Join(dir, "manifest.yaml")
err = os.WriteFile(manifestpath, []byte(manifestText), 0600)
Expand Down Expand Up @@ -547,7 +547,7 @@ func BuildInstaller(keysetName, projectName, isofile string) error {
if err != nil {
return errors.Wrapf(err, "Failed to read project uuid (%q)", pPath)
}
manifestText := fmt.Sprintf(installManifestTemplate, string(productUUID), LayerVersion, LayerVersion)
manifestText := fmt.Sprintf(installManifestTemplate, string(productUUID), LayerVersion)

manifestpath := filepath.Join(dir, "manifest.yaml")
err = os.WriteFile(manifestpath, []byte(manifestText), 0600)
Expand Down
2 changes: 1 addition & 1 deletion pkg/trust/artifacts.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ func SetupBootkit(keysetName, bootkitVersion, mosctlPath string) error {
utils.EnsureDir(ociDir)
cachedOci := fmt.Sprintf("oci:%s:%s", ociDir, bootkitLayer)
err = lib.ImageCopy(lib.ImageCopyOpts{
Src: fmt.Sprintf("docker://zothub.io/machine/bootkit/%s", bootkitLayer),
Src: "oci:/home/serge/src/project-machine/build-bootkit/oci:bootkit-squashfs",
Dest: cachedOci,
Progress: os.Stdout,
})
Expand Down

0 comments on commit e04840f

Please sign in to comment.