Rename osbuild2 package to osbuild
This commit is contained in:
parent
01d87b4e60
commit
9d4a351ca6
218 changed files with 474 additions and 475 deletions
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
"github.com/osbuild/osbuild-composer/internal/dnfjson"
|
"github.com/osbuild/osbuild-composer/internal/dnfjson"
|
||||||
"github.com/osbuild/osbuild-composer/internal/manifest"
|
"github.com/osbuild/osbuild-composer/internal/manifest"
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
"github.com/osbuild/osbuild-composer/internal/runner"
|
"github.com/osbuild/osbuild-composer/internal/runner"
|
||||||
)
|
)
|
||||||
|
|
@ -50,7 +50,7 @@ func RunPlayground(img ImageType, d distro.Distro, arch distro.Arch, repos map[s
|
||||||
|
|
||||||
store := path.Join(state_dir, "osbuild-store")
|
store := path.Join(state_dir, "osbuild-store")
|
||||||
|
|
||||||
_, err = osbuild2.RunOSBuild(bytes, store, "./", img.GetExports(), []string{"build"}, false, os.Stdout)
|
_, err = osbuild.RunOSBuild(bytes, store, "./", img.GetExports(), []string{"build"}, false, os.Stdout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintf(os.Stderr, "could not run osbuild: %s", err.Error())
|
fmt.Fprintf(os.Stderr, "could not run osbuild: %s", err.Error())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import (
|
||||||
|
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
"github.com/osbuild/osbuild-composer/internal/target"
|
"github.com/osbuild/osbuild-composer/internal/target"
|
||||||
"github.com/osbuild/osbuild-composer/internal/upload/koji"
|
"github.com/osbuild/osbuild-composer/internal/upload/koji"
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/upload/koji"
|
"github.com/osbuild/osbuild-composer/internal/upload/koji"
|
||||||
"github.com/osbuild/osbuild-composer/internal/worker"
|
"github.com/osbuild/osbuild-composer/internal/worker"
|
||||||
"github.com/osbuild/osbuild-composer/internal/worker/clienterrors"
|
"github.com/osbuild/osbuild-composer/internal/worker/clienterrors"
|
||||||
|
|
@ -145,7 +145,7 @@ func (impl *OSBuildKojiJobImpl) Run(job worker.Job) error {
|
||||||
result.JobError = clienterrors.WorkerClientError(clienterrors.ErrorBuildJob, err.Error())
|
result.JobError = clienterrors.WorkerClientError(clienterrors.ErrorBuildJob, err.Error())
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
result.OSBuildOutput, err = osbuild2.RunOSBuild(args.Manifest, impl.Store, outputDirectory, exports, nil, true, os.Stderr)
|
result.OSBuildOutput, err = osbuild.RunOSBuild(args.Manifest, impl.Store, outputDirectory, exports, nil, true, os.Stderr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/osbuild/osbuild-composer/internal/container"
|
"github.com/osbuild/osbuild-composer/internal/container"
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/upload/oci"
|
"github.com/osbuild/osbuild-composer/internal/upload/oci"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
|
@ -202,7 +202,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
|
||||||
// Initialize variable needed for reporting back to osbuild-composer.
|
// Initialize variable needed for reporting back to osbuild-composer.
|
||||||
var osbuildJobResult *worker.OSBuildJobResult = &worker.OSBuildJobResult{
|
var osbuildJobResult *worker.OSBuildJobResult = &worker.OSBuildJobResult{
|
||||||
Success: false,
|
Success: false,
|
||||||
OSBuildOutput: &osbuild2.Result{
|
OSBuildOutput: &osbuild.Result{
|
||||||
Success: false,
|
Success: false,
|
||||||
},
|
},
|
||||||
UploadStatus: "failure",
|
UploadStatus: "failure",
|
||||||
|
|
@ -306,7 +306,7 @@ func (impl *OSBuildJobImpl) Run(job worker.Job) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run osbuild and handle two kinds of errors
|
// Run osbuild and handle two kinds of errors
|
||||||
osbuildJobResult.OSBuildOutput, err = osbuild2.RunOSBuild(jobArgs.Manifest, impl.Store, outputDirectory, exports, nil, true, os.Stderr)
|
osbuildJobResult.OSBuildOutput, err = osbuild.RunOSBuild(jobArgs.Manifest, impl.Store, outputDirectory, exports, nil, true, os.Stderr)
|
||||||
// First handle the case when "running" osbuild failed
|
// First handle the case when "running" osbuild failed
|
||||||
if err != nil {
|
if err != nil {
|
||||||
osbuildJobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorBuildJob, "osbuild build failed")
|
osbuildJobResult.JobError = clienterrors.WorkerClientError(clienterrors.ErrorBuildJob, "osbuild build failed")
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/ostree"
|
"github.com/osbuild/osbuild-composer/internal/ostree"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
"github.com/osbuild/osbuild-composer/internal/target"
|
"github.com/osbuild/osbuild-composer/internal/target"
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,7 @@ import (
|
||||||
v2 "github.com/osbuild/osbuild-composer/internal/cloudapi/v2"
|
v2 "github.com/osbuild/osbuild-composer/internal/cloudapi/v2"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro/test_distro"
|
"github.com/osbuild/osbuild-composer/internal/distro/test_distro"
|
||||||
"github.com/osbuild/osbuild-composer/internal/kojiapi/api"
|
"github.com/osbuild/osbuild-composer/internal/kojiapi/api"
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
|
||||||
"github.com/osbuild/osbuild-composer/internal/target"
|
"github.com/osbuild/osbuild-composer/internal/target"
|
||||||
"github.com/osbuild/osbuild-composer/internal/test"
|
"github.com/osbuild/osbuild-composer/internal/test"
|
||||||
"github.com/osbuild/osbuild-composer/internal/worker"
|
"github.com/osbuild/osbuild-composer/internal/worker"
|
||||||
|
|
@ -589,7 +588,7 @@ func TestKojiJobTypeValidation(t *testing.T) {
|
||||||
initID, err := workers.EnqueueKojiInit(&initJob, "")
|
initID, err := workers.EnqueueKojiInit(&initJob, "")
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
manifest, err := json.Marshal(osbuild2.Manifest{})
|
manifest, err := json.Marshal(osbuild.Manifest{})
|
||||||
require.NoErrorf(t, err, "error marshalling empty Manifest to JSON")
|
require.NoErrorf(t, err, "error marshalling empty Manifest to JSON")
|
||||||
|
|
||||||
buildJobs := make([]worker.OSBuildJob, nImages)
|
buildJobs := make([]worker.OSBuildJob, nImages)
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro/test_distro"
|
"github.com/osbuild/osbuild-composer/internal/distro/test_distro"
|
||||||
"github.com/osbuild/osbuild-composer/internal/jobqueue/fsjobqueue"
|
"github.com/osbuild/osbuild-composer/internal/jobqueue/fsjobqueue"
|
||||||
distro_mock "github.com/osbuild/osbuild-composer/internal/mocks/distro"
|
distro_mock "github.com/osbuild/osbuild-composer/internal/mocks/distro"
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/ostree/mock_ostree_repo"
|
"github.com/osbuild/osbuild-composer/internal/ostree/mock_ostree_repo"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
"github.com/osbuild/osbuild-composer/internal/test"
|
"github.com/osbuild/osbuild-composer/internal/test"
|
||||||
|
|
@ -593,7 +593,7 @@ func TestComposeStatusSuccess(t *testing.T) {
|
||||||
|
|
||||||
res, err := json.Marshal(&worker.OSBuildJobResult{
|
res, err := json.Marshal(&worker.OSBuildJobResult{
|
||||||
Success: true,
|
Success: true,
|
||||||
OSBuildOutput: &osbuild2.Result{Success: true},
|
OSBuildOutput: &osbuild.Result{Success: true},
|
||||||
})
|
})
|
||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
package distro
|
package distro
|
||||||
|
|
||||||
import "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
import "github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
|
|
||||||
type RHSMSubscriptionStatus string
|
type RHSMSubscriptionStatus string
|
||||||
|
|
||||||
|
|
@ -12,13 +12,13 @@ const (
|
||||||
// ImageConfig represents a (default) configuration applied to the image
|
// ImageConfig represents a (default) configuration applied to the image
|
||||||
type ImageConfig struct {
|
type ImageConfig struct {
|
||||||
Timezone string
|
Timezone string
|
||||||
TimeSynchronization *osbuild2.ChronyStageOptions
|
TimeSynchronization *osbuild.ChronyStageOptions
|
||||||
Locale string
|
Locale string
|
||||||
Keyboard *osbuild2.KeymapStageOptions
|
Keyboard *osbuild.KeymapStageOptions
|
||||||
EnabledServices []string
|
EnabledServices []string
|
||||||
DisabledServices []string
|
DisabledServices []string
|
||||||
DefaultTarget string
|
DefaultTarget string
|
||||||
Sysconfig []*osbuild2.SysconfigStageOptions
|
Sysconfig []*osbuild.SysconfigStageOptions
|
||||||
|
|
||||||
// List of files from which to import GPG keys into the RPM database
|
// List of files from which to import GPG keys into the RPM database
|
||||||
GPGKeyFiles []string
|
GPGKeyFiles []string
|
||||||
|
|
@ -31,29 +31,29 @@ type ImageConfig struct {
|
||||||
|
|
||||||
// for RHSM configuration, we need to potentially distinguish the case
|
// for RHSM configuration, we need to potentially distinguish the case
|
||||||
// when the user want the image to be subscribed on first boot and when not
|
// when the user want the image to be subscribed on first boot and when not
|
||||||
RHSMConfig map[RHSMSubscriptionStatus]*osbuild2.RHSMStageOptions
|
RHSMConfig map[RHSMSubscriptionStatus]*osbuild.RHSMStageOptions
|
||||||
SystemdLogind []*osbuild2.SystemdLogindStageOptions
|
SystemdLogind []*osbuild.SystemdLogindStageOptions
|
||||||
CloudInit []*osbuild2.CloudInitStageOptions
|
CloudInit []*osbuild.CloudInitStageOptions
|
||||||
Modprobe []*osbuild2.ModprobeStageOptions
|
Modprobe []*osbuild.ModprobeStageOptions
|
||||||
DracutConf []*osbuild2.DracutConfStageOptions
|
DracutConf []*osbuild.DracutConfStageOptions
|
||||||
SystemdUnit []*osbuild2.SystemdUnitStageOptions
|
SystemdUnit []*osbuild.SystemdUnitStageOptions
|
||||||
Authselect *osbuild2.AuthselectStageOptions
|
Authselect *osbuild.AuthselectStageOptions
|
||||||
SELinuxConfig *osbuild2.SELinuxConfigStageOptions
|
SELinuxConfig *osbuild.SELinuxConfigStageOptions
|
||||||
Tuned *osbuild2.TunedStageOptions
|
Tuned *osbuild.TunedStageOptions
|
||||||
Tmpfilesd []*osbuild2.TmpfilesdStageOptions
|
Tmpfilesd []*osbuild.TmpfilesdStageOptions
|
||||||
PamLimitsConf []*osbuild2.PamLimitsConfStageOptions
|
PamLimitsConf []*osbuild.PamLimitsConfStageOptions
|
||||||
Sysctld []*osbuild2.SysctldStageOptions
|
Sysctld []*osbuild.SysctldStageOptions
|
||||||
DNFConfig []*osbuild2.DNFConfigStageOptions
|
DNFConfig []*osbuild.DNFConfigStageOptions
|
||||||
SshdConfig *osbuild2.SshdConfigStageOptions
|
SshdConfig *osbuild.SshdConfigStageOptions
|
||||||
Authconfig *osbuild2.AuthconfigStageOptions
|
Authconfig *osbuild.AuthconfigStageOptions
|
||||||
PwQuality *osbuild2.PwqualityConfStageOptions
|
PwQuality *osbuild.PwqualityConfStageOptions
|
||||||
WAAgentConfig *osbuild2.WAAgentConfStageOptions
|
WAAgentConfig *osbuild.WAAgentConfStageOptions
|
||||||
Grub2Config *osbuild2.GRUB2Config
|
Grub2Config *osbuild.GRUB2Config
|
||||||
DNFAutomaticConfig *osbuild2.DNFAutomaticConfigStageOptions
|
DNFAutomaticConfig *osbuild.DNFAutomaticConfigStageOptions
|
||||||
YumConfig *osbuild2.YumConfigStageOptions
|
YumConfig *osbuild.YumConfigStageOptions
|
||||||
YUMRepos []*osbuild2.YumReposStageOptions
|
YUMRepos []*osbuild.YumReposStageOptions
|
||||||
Firewall *osbuild2.FirewallStageOptions
|
Firewall *osbuild.FirewallStageOptions
|
||||||
UdevRules *osbuild2.UdevRulesStageOptions
|
UdevRules *osbuild.UdevRulesStageOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
// InheritFrom inherits unset values from the provided parent configuration and
|
// InheritFrom inherits unset values from the provided parent configuration and
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -19,33 +19,33 @@ func TestImageConfigInheritFrom(t *testing.T) {
|
||||||
name: "inheritance with overridden values",
|
name: "inheritance with overridden values",
|
||||||
distroConfig: &ImageConfig{
|
distroConfig: &ImageConfig{
|
||||||
Timezone: "America/New_York",
|
Timezone: "America/New_York",
|
||||||
TimeSynchronization: &osbuild2.ChronyStageOptions{
|
TimeSynchronization: &osbuild.ChronyStageOptions{
|
||||||
Timeservers: []string{"127.0.0.1"},
|
Timeservers: []string{"127.0.0.1"},
|
||||||
},
|
},
|
||||||
Locale: "en_US.UTF-8",
|
Locale: "en_US.UTF-8",
|
||||||
Keyboard: &osbuild2.KeymapStageOptions{
|
Keyboard: &osbuild.KeymapStageOptions{
|
||||||
Keymap: "us",
|
Keymap: "us",
|
||||||
},
|
},
|
||||||
EnabledServices: []string{"sshd"},
|
EnabledServices: []string{"sshd"},
|
||||||
DisabledServices: []string{"named"},
|
DisabledServices: []string{"named"},
|
||||||
DefaultTarget: "multi-user.target",
|
DefaultTarget: "multi-user.target",
|
||||||
Sysconfig: []*osbuild2.SysconfigStageOptions{
|
Sysconfig: []*osbuild.SysconfigStageOptions{
|
||||||
{
|
{
|
||||||
Kernel: &osbuild2.SysconfigKernelOptions{
|
Kernel: &osbuild.SysconfigKernelOptions{
|
||||||
UpdateDefault: true,
|
UpdateDefault: true,
|
||||||
DefaultKernel: "kernel",
|
DefaultKernel: "kernel",
|
||||||
},
|
},
|
||||||
Network: &osbuild2.SysconfigNetworkOptions{
|
Network: &osbuild.SysconfigNetworkOptions{
|
||||||
Networking: true,
|
Networking: true,
|
||||||
NoZeroConf: true,
|
NoZeroConf: true,
|
||||||
},
|
},
|
||||||
NetworkScripts: &osbuild2.NetworkScriptsOptions{
|
NetworkScripts: &osbuild.NetworkScriptsOptions{
|
||||||
IfcfgFiles: map[string]osbuild2.IfcfgFile{
|
IfcfgFiles: map[string]osbuild.IfcfgFile{
|
||||||
"eth0": {
|
"eth0": {
|
||||||
Device: "eth0",
|
Device: "eth0",
|
||||||
Bootproto: osbuild2.IfcfgBootprotoDHCP,
|
Bootproto: osbuild.IfcfgBootprotoDHCP,
|
||||||
OnBoot: common.BoolToPtr(true),
|
OnBoot: common.BoolToPtr(true),
|
||||||
Type: osbuild2.IfcfgTypeEthernet,
|
Type: osbuild.IfcfgTypeEthernet,
|
||||||
UserCtl: common.BoolToPtr(true),
|
UserCtl: common.BoolToPtr(true),
|
||||||
PeerDNS: common.BoolToPtr(true),
|
PeerDNS: common.BoolToPtr(true),
|
||||||
IPv6Init: common.BoolToPtr(false),
|
IPv6Init: common.BoolToPtr(false),
|
||||||
|
|
@ -57,8 +57,8 @@ func TestImageConfigInheritFrom(t *testing.T) {
|
||||||
},
|
},
|
||||||
imageConfig: &ImageConfig{
|
imageConfig: &ImageConfig{
|
||||||
Timezone: "UTC",
|
Timezone: "UTC",
|
||||||
TimeSynchronization: &osbuild2.ChronyStageOptions{
|
TimeSynchronization: &osbuild.ChronyStageOptions{
|
||||||
Servers: []osbuild2.ChronyConfigServer{
|
Servers: []osbuild.ChronyConfigServer{
|
||||||
{
|
{
|
||||||
Hostname: "169.254.169.123",
|
Hostname: "169.254.169.123",
|
||||||
Prefer: common.BoolToPtr(true),
|
Prefer: common.BoolToPtr(true),
|
||||||
|
|
@ -72,8 +72,8 @@ func TestImageConfigInheritFrom(t *testing.T) {
|
||||||
},
|
},
|
||||||
expectedConfig: &ImageConfig{
|
expectedConfig: &ImageConfig{
|
||||||
Timezone: "UTC",
|
Timezone: "UTC",
|
||||||
TimeSynchronization: &osbuild2.ChronyStageOptions{
|
TimeSynchronization: &osbuild.ChronyStageOptions{
|
||||||
Servers: []osbuild2.ChronyConfigServer{
|
Servers: []osbuild.ChronyConfigServer{
|
||||||
{
|
{
|
||||||
Hostname: "169.254.169.123",
|
Hostname: "169.254.169.123",
|
||||||
Prefer: common.BoolToPtr(true),
|
Prefer: common.BoolToPtr(true),
|
||||||
|
|
@ -85,29 +85,29 @@ func TestImageConfigInheritFrom(t *testing.T) {
|
||||||
LeapsecTz: common.StringToPtr(""),
|
LeapsecTz: common.StringToPtr(""),
|
||||||
},
|
},
|
||||||
Locale: "en_US.UTF-8",
|
Locale: "en_US.UTF-8",
|
||||||
Keyboard: &osbuild2.KeymapStageOptions{
|
Keyboard: &osbuild.KeymapStageOptions{
|
||||||
Keymap: "us",
|
Keymap: "us",
|
||||||
},
|
},
|
||||||
EnabledServices: []string{"sshd"},
|
EnabledServices: []string{"sshd"},
|
||||||
DisabledServices: []string{"named"},
|
DisabledServices: []string{"named"},
|
||||||
DefaultTarget: "multi-user.target",
|
DefaultTarget: "multi-user.target",
|
||||||
Sysconfig: []*osbuild2.SysconfigStageOptions{
|
Sysconfig: []*osbuild.SysconfigStageOptions{
|
||||||
{
|
{
|
||||||
Kernel: &osbuild2.SysconfigKernelOptions{
|
Kernel: &osbuild.SysconfigKernelOptions{
|
||||||
UpdateDefault: true,
|
UpdateDefault: true,
|
||||||
DefaultKernel: "kernel",
|
DefaultKernel: "kernel",
|
||||||
},
|
},
|
||||||
Network: &osbuild2.SysconfigNetworkOptions{
|
Network: &osbuild.SysconfigNetworkOptions{
|
||||||
Networking: true,
|
Networking: true,
|
||||||
NoZeroConf: true,
|
NoZeroConf: true,
|
||||||
},
|
},
|
||||||
NetworkScripts: &osbuild2.NetworkScriptsOptions{
|
NetworkScripts: &osbuild.NetworkScriptsOptions{
|
||||||
IfcfgFiles: map[string]osbuild2.IfcfgFile{
|
IfcfgFiles: map[string]osbuild.IfcfgFile{
|
||||||
"eth0": {
|
"eth0": {
|
||||||
Device: "eth0",
|
Device: "eth0",
|
||||||
Bootproto: osbuild2.IfcfgBootprotoDHCP,
|
Bootproto: osbuild.IfcfgBootprotoDHCP,
|
||||||
OnBoot: common.BoolToPtr(true),
|
OnBoot: common.BoolToPtr(true),
|
||||||
Type: osbuild2.IfcfgTypeEthernet,
|
Type: osbuild.IfcfgTypeEthernet,
|
||||||
UserCtl: common.BoolToPtr(true),
|
UserCtl: common.BoolToPtr(true),
|
||||||
PeerDNS: common.BoolToPtr(true),
|
PeerDNS: common.BoolToPtr(true),
|
||||||
IPv6Init: common.BoolToPtr(false),
|
IPv6Init: common.BoolToPtr(false),
|
||||||
|
|
@ -122,11 +122,11 @@ func TestImageConfigInheritFrom(t *testing.T) {
|
||||||
name: "empty image type configuration",
|
name: "empty image type configuration",
|
||||||
distroConfig: &ImageConfig{
|
distroConfig: &ImageConfig{
|
||||||
Timezone: "America/New_York",
|
Timezone: "America/New_York",
|
||||||
TimeSynchronization: &osbuild2.ChronyStageOptions{
|
TimeSynchronization: &osbuild.ChronyStageOptions{
|
||||||
Timeservers: []string{"127.0.0.1"},
|
Timeservers: []string{"127.0.0.1"},
|
||||||
},
|
},
|
||||||
Locale: "en_US.UTF-8",
|
Locale: "en_US.UTF-8",
|
||||||
Keyboard: &osbuild2.KeymapStageOptions{
|
Keyboard: &osbuild.KeymapStageOptions{
|
||||||
Keymap: "us",
|
Keymap: "us",
|
||||||
},
|
},
|
||||||
EnabledServices: []string{"sshd"},
|
EnabledServices: []string{"sshd"},
|
||||||
|
|
@ -136,11 +136,11 @@ func TestImageConfigInheritFrom(t *testing.T) {
|
||||||
imageConfig: &ImageConfig{},
|
imageConfig: &ImageConfig{},
|
||||||
expectedConfig: &ImageConfig{
|
expectedConfig: &ImageConfig{
|
||||||
Timezone: "America/New_York",
|
Timezone: "America/New_York",
|
||||||
TimeSynchronization: &osbuild2.ChronyStageOptions{
|
TimeSynchronization: &osbuild.ChronyStageOptions{
|
||||||
Timeservers: []string{"127.0.0.1"},
|
Timeservers: []string{"127.0.0.1"},
|
||||||
},
|
},
|
||||||
Locale: "en_US.UTF-8",
|
Locale: "en_US.UTF-8",
|
||||||
Keyboard: &osbuild2.KeymapStageOptions{
|
Keyboard: &osbuild.KeymapStageOptions{
|
||||||
Keymap: "us",
|
Keymap: "us",
|
||||||
},
|
},
|
||||||
EnabledServices: []string{"sshd"},
|
EnabledServices: []string{"sshd"},
|
||||||
|
|
@ -153,11 +153,11 @@ func TestImageConfigInheritFrom(t *testing.T) {
|
||||||
distroConfig: &ImageConfig{},
|
distroConfig: &ImageConfig{},
|
||||||
imageConfig: &ImageConfig{
|
imageConfig: &ImageConfig{
|
||||||
Timezone: "America/New_York",
|
Timezone: "America/New_York",
|
||||||
TimeSynchronization: &osbuild2.ChronyStageOptions{
|
TimeSynchronization: &osbuild.ChronyStageOptions{
|
||||||
Timeservers: []string{"127.0.0.1"},
|
Timeservers: []string{"127.0.0.1"},
|
||||||
},
|
},
|
||||||
Locale: "en_US.UTF-8",
|
Locale: "en_US.UTF-8",
|
||||||
Keyboard: &osbuild2.KeymapStageOptions{
|
Keyboard: &osbuild.KeymapStageOptions{
|
||||||
Keymap: "us",
|
Keymap: "us",
|
||||||
},
|
},
|
||||||
EnabledServices: []string{"sshd"},
|
EnabledServices: []string{"sshd"},
|
||||||
|
|
@ -166,11 +166,11 @@ func TestImageConfigInheritFrom(t *testing.T) {
|
||||||
},
|
},
|
||||||
expectedConfig: &ImageConfig{
|
expectedConfig: &ImageConfig{
|
||||||
Timezone: "America/New_York",
|
Timezone: "America/New_York",
|
||||||
TimeSynchronization: &osbuild2.ChronyStageOptions{
|
TimeSynchronization: &osbuild.ChronyStageOptions{
|
||||||
Timeservers: []string{"127.0.0.1"},
|
Timeservers: []string{"127.0.0.1"},
|
||||||
},
|
},
|
||||||
Locale: "en_US.UTF-8",
|
Locale: "en_US.UTF-8",
|
||||||
Keyboard: &osbuild2.KeymapStageOptions{
|
Keyboard: &osbuild.KeymapStageOptions{
|
||||||
Keymap: "us",
|
Keymap: "us",
|
||||||
},
|
},
|
||||||
EnabledServices: []string{"sshd"},
|
EnabledServices: []string{"sshd"},
|
||||||
|
|
@ -183,11 +183,11 @@ func TestImageConfigInheritFrom(t *testing.T) {
|
||||||
distroConfig: nil,
|
distroConfig: nil,
|
||||||
imageConfig: &ImageConfig{
|
imageConfig: &ImageConfig{
|
||||||
Timezone: "America/New_York",
|
Timezone: "America/New_York",
|
||||||
TimeSynchronization: &osbuild2.ChronyStageOptions{
|
TimeSynchronization: &osbuild.ChronyStageOptions{
|
||||||
Timeservers: []string{"127.0.0.1"},
|
Timeservers: []string{"127.0.0.1"},
|
||||||
},
|
},
|
||||||
Locale: "en_US.UTF-8",
|
Locale: "en_US.UTF-8",
|
||||||
Keyboard: &osbuild2.KeymapStageOptions{
|
Keyboard: &osbuild.KeymapStageOptions{
|
||||||
Keymap: "us",
|
Keymap: "us",
|
||||||
},
|
},
|
||||||
EnabledServices: []string{"sshd"},
|
EnabledServices: []string{"sshd"},
|
||||||
|
|
@ -196,11 +196,11 @@ func TestImageConfigInheritFrom(t *testing.T) {
|
||||||
},
|
},
|
||||||
expectedConfig: &ImageConfig{
|
expectedConfig: &ImageConfig{
|
||||||
Timezone: "America/New_York",
|
Timezone: "America/New_York",
|
||||||
TimeSynchronization: &osbuild2.ChronyStageOptions{
|
TimeSynchronization: &osbuild.ChronyStageOptions{
|
||||||
Timeservers: []string{"127.0.0.1"},
|
Timeservers: []string{"127.0.0.1"},
|
||||||
},
|
},
|
||||||
Locale: "en_US.UTF-8",
|
Locale: "en_US.UTF-8",
|
||||||
Keyboard: &osbuild2.KeymapStageOptions{
|
Keyboard: &osbuild.KeymapStageOptions{
|
||||||
Keymap: "us",
|
Keymap: "us",
|
||||||
},
|
},
|
||||||
EnabledServices: []string{"sshd"},
|
EnabledServices: []string{"sshd"},
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/disk"
|
"github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||||
"github.com/osbuild/osbuild-composer/internal/disk"
|
"github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||||
"github.com/osbuild/osbuild-composer/internal/disk"
|
"github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/disk"
|
"github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/disk"
|
"github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/ostree"
|
"github.com/osbuild/osbuild-composer/internal/ostree"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/disk"
|
"github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/disk"
|
"github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/ostree"
|
"github.com/osbuild/osbuild-composer/internal/ostree"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/disk"
|
"github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import (
|
||||||
|
|
||||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/kojiapi/api"
|
"github.com/osbuild/osbuild-composer/internal/kojiapi/api"
|
||||||
distro_mock "github.com/osbuild/osbuild-composer/internal/mocks/distro"
|
distro_mock "github.com/osbuild/osbuild-composer/internal/mocks/distro"
|
||||||
rpmmd_mock "github.com/osbuild/osbuild-composer/internal/mocks/rpmmd"
|
rpmmd_mock "github.com/osbuild/osbuild-composer/internal/mocks/rpmmd"
|
||||||
osbuild "github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/test"
|
"github.com/osbuild/osbuild-composer/internal/test"
|
||||||
"github.com/osbuild/osbuild-composer/internal/worker"
|
"github.com/osbuild/osbuild-composer/internal/worker"
|
||||||
"github.com/osbuild/osbuild-composer/internal/worker/clienterrors"
|
"github.com/osbuild/osbuild-composer/internal/worker/clienterrors"
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ package manifest
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/platform"
|
"github.com/osbuild/osbuild-composer/internal/platform"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
@ -140,24 +140,24 @@ func (p *Anaconda) serializeEnd() {
|
||||||
p.packageSpecs = nil
|
p.packageSpecs = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Anaconda) serialize() osbuild2.Pipeline {
|
func (p *Anaconda) serialize() osbuild.Pipeline {
|
||||||
if len(p.packageSpecs) == 0 {
|
if len(p.packageSpecs) == 0 {
|
||||||
panic("serialization not started")
|
panic("serialization not started")
|
||||||
}
|
}
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewRPMStage(osbuild2.NewRPMStageOptions(p.repos), osbuild2.NewRpmStageSourceFilesInputs(p.packageSpecs)))
|
pipeline.AddStage(osbuild.NewRPMStage(osbuild.NewRPMStageOptions(p.repos), osbuild.NewRpmStageSourceFilesInputs(p.packageSpecs)))
|
||||||
pipeline.AddStage(osbuild2.NewBuildstampStage(&osbuild2.BuildstampStageOptions{
|
pipeline.AddStage(osbuild.NewBuildstampStage(&osbuild.BuildstampStageOptions{
|
||||||
Arch: p.platform.GetArch().String(),
|
Arch: p.platform.GetArch().String(),
|
||||||
Product: p.product,
|
Product: p.product,
|
||||||
Variant: p.Variant,
|
Variant: p.Variant,
|
||||||
Version: p.version,
|
Version: p.version,
|
||||||
Final: true,
|
Final: true,
|
||||||
}))
|
}))
|
||||||
pipeline.AddStage(osbuild2.NewLocaleStage(&osbuild2.LocaleStageOptions{Language: "en_US.UTF-8"}))
|
pipeline.AddStage(osbuild.NewLocaleStage(&osbuild.LocaleStageOptions{Language: "en_US.UTF-8"}))
|
||||||
|
|
||||||
rootPassword := ""
|
rootPassword := ""
|
||||||
rootUser := osbuild2.UsersStageOptionsUser{
|
rootUser := osbuild.UsersStageOptionsUser{
|
||||||
Password: &rootPassword,
|
Password: &rootPassword,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -166,27 +166,27 @@ func (p *Anaconda) serialize() osbuild2.Pipeline {
|
||||||
installHome := "/root"
|
installHome := "/root"
|
||||||
installShell := "/usr/libexec/anaconda/run-anaconda"
|
installShell := "/usr/libexec/anaconda/run-anaconda"
|
||||||
installPassword := ""
|
installPassword := ""
|
||||||
installUser := osbuild2.UsersStageOptionsUser{
|
installUser := osbuild.UsersStageOptionsUser{
|
||||||
UID: &installUID,
|
UID: &installUID,
|
||||||
GID: &installGID,
|
GID: &installGID,
|
||||||
Home: &installHome,
|
Home: &installHome,
|
||||||
Shell: &installShell,
|
Shell: &installShell,
|
||||||
Password: &installPassword,
|
Password: &installPassword,
|
||||||
}
|
}
|
||||||
usersStageOptions := &osbuild2.UsersStageOptions{
|
usersStageOptions := &osbuild.UsersStageOptions{
|
||||||
Users: map[string]osbuild2.UsersStageOptionsUser{
|
Users: map[string]osbuild.UsersStageOptionsUser{
|
||||||
"root": rootUser,
|
"root": rootUser,
|
||||||
"install": installUser,
|
"install": installUser,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewUsersStage(usersStageOptions))
|
pipeline.AddStage(osbuild.NewUsersStage(usersStageOptions))
|
||||||
pipeline.AddStage(osbuild2.NewAnacondaStage(osbuild2.NewAnacondaStageOptions(p.Users)))
|
pipeline.AddStage(osbuild.NewAnacondaStage(osbuild.NewAnacondaStageOptions(p.Users)))
|
||||||
pipeline.AddStage(osbuild2.NewLoraxScriptStage(&osbuild2.LoraxScriptStageOptions{
|
pipeline.AddStage(osbuild.NewLoraxScriptStage(&osbuild.LoraxScriptStageOptions{
|
||||||
Path: "99-generic/runtime-postinstall.tmpl",
|
Path: "99-generic/runtime-postinstall.tmpl",
|
||||||
BaseArch: p.platform.GetArch().String(),
|
BaseArch: p.platform.GetArch().String(),
|
||||||
}))
|
}))
|
||||||
pipeline.AddStage(osbuild2.NewDracutStage(dracutStageOptions(p.kernelVer, p.Biosdevname, []string{
|
pipeline.AddStage(osbuild.NewDracutStage(dracutStageOptions(p.kernelVer, p.Biosdevname, []string{
|
||||||
"anaconda",
|
"anaconda",
|
||||||
"rdma",
|
"rdma",
|
||||||
"rngd",
|
"rngd",
|
||||||
|
|
@ -197,12 +197,12 @@ func (p *Anaconda) serialize() osbuild2.Pipeline {
|
||||||
"lunmask",
|
"lunmask",
|
||||||
"nfs",
|
"nfs",
|
||||||
})))
|
})))
|
||||||
pipeline.AddStage(osbuild2.NewSELinuxConfigStage(&osbuild2.SELinuxConfigStageOptions{State: osbuild2.SELinuxStatePermissive}))
|
pipeline.AddStage(osbuild.NewSELinuxConfigStage(&osbuild.SELinuxConfigStageOptions{State: osbuild.SELinuxStatePermissive}))
|
||||||
|
|
||||||
return pipeline
|
return pipeline
|
||||||
}
|
}
|
||||||
|
|
||||||
func dracutStageOptions(kernelVer string, biosdevname bool, additionalModules []string) *osbuild2.DracutStageOptions {
|
func dracutStageOptions(kernelVer string, biosdevname bool, additionalModules []string) *osbuild.DracutStageOptions {
|
||||||
kernel := []string{kernelVer}
|
kernel := []string{kernelVer}
|
||||||
modules := []string{
|
modules := []string{
|
||||||
"bash",
|
"bash",
|
||||||
|
|
@ -249,7 +249,7 @@ func dracutStageOptions(kernelVer string, biosdevname bool, additionalModules []
|
||||||
}
|
}
|
||||||
|
|
||||||
modules = append(modules, additionalModules...)
|
modules = append(modules, additionalModules...)
|
||||||
return &osbuild2.DracutStageOptions{
|
return &osbuild.DracutStageOptions{
|
||||||
Kernel: kernel,
|
Kernel: kernel,
|
||||||
Modules: modules,
|
Modules: modules,
|
||||||
Install: []string{"/.buildstamp"},
|
Install: []string{"/.buildstamp"},
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package manifest
|
package manifest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
"github.com/osbuild/osbuild-composer/internal/runner"
|
"github.com/osbuild/osbuild-composer/internal/runner"
|
||||||
)
|
)
|
||||||
|
|
@ -80,15 +80,15 @@ func (p *Build) serializeEnd() {
|
||||||
p.packageSpecs = nil
|
p.packageSpecs = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Build) serialize() osbuild2.Pipeline {
|
func (p *Build) serialize() osbuild.Pipeline {
|
||||||
if len(p.packageSpecs) == 0 {
|
if len(p.packageSpecs) == 0 {
|
||||||
panic("serialization not started")
|
panic("serialization not started")
|
||||||
}
|
}
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
pipeline.Runner = p.runner.String()
|
pipeline.Runner = p.runner.String()
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewRPMStage(osbuild2.NewRPMStageOptions(p.repos), osbuild2.NewRpmStageSourceFilesInputs(p.packageSpecs)))
|
pipeline.AddStage(osbuild.NewRPMStage(osbuild.NewRPMStageOptions(p.repos), osbuild.NewRpmStageSourceFilesInputs(p.packageSpecs)))
|
||||||
pipeline.AddStage(osbuild2.NewSELinuxStage(&osbuild2.SELinuxStageOptions{
|
pipeline.AddStage(osbuild.NewSELinuxStage(&osbuild.SELinuxStageOptions{
|
||||||
FileContexts: "etc/selinux/targeted/contexts/files/file_contexts",
|
FileContexts: "etc/selinux/targeted/contexts/files/file_contexts",
|
||||||
Labels: map[string]string{
|
Labels: map[string]string{
|
||||||
// TODO: make conditional
|
// TODO: make conditional
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package manifest
|
package manifest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
// OSTreeCommit represents an ostree with one commit.
|
// OSTreeCommit represents an ostree with one commit.
|
||||||
|
|
@ -40,31 +40,31 @@ func (p *OSTreeCommit) getBuildPackages() []string {
|
||||||
return packages
|
return packages
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *OSTreeCommit) serialize() osbuild2.Pipeline {
|
func (p *OSTreeCommit) serialize() osbuild.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
if p.treePipeline.OSTree == nil {
|
if p.treePipeline.OSTree == nil {
|
||||||
panic("tree is not ostree")
|
panic("tree is not ostree")
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewOSTreeInitStage(&osbuild2.OSTreeInitStageOptions{Path: "/repo"}))
|
pipeline.AddStage(osbuild.NewOSTreeInitStage(&osbuild.OSTreeInitStageOptions{Path: "/repo"}))
|
||||||
|
|
||||||
commitStageInput := new(osbuild2.OSTreeCommitStageInput)
|
commitStageInput := new(osbuild.OSTreeCommitStageInput)
|
||||||
commitStageInput.Type = "org.osbuild.tree"
|
commitStageInput.Type = "org.osbuild.tree"
|
||||||
commitStageInput.Origin = "org.osbuild.pipeline"
|
commitStageInput.Origin = "org.osbuild.pipeline"
|
||||||
commitStageInput.References = osbuild2.OSTreeCommitStageReferences{"name:" + p.treePipeline.Name()}
|
commitStageInput.References = osbuild.OSTreeCommitStageReferences{"name:" + p.treePipeline.Name()}
|
||||||
|
|
||||||
var parent string
|
var parent string
|
||||||
if p.treePipeline.OSTree.Parent != nil {
|
if p.treePipeline.OSTree.Parent != nil {
|
||||||
parent = p.treePipeline.OSTree.Parent.Checksum
|
parent = p.treePipeline.OSTree.Parent.Checksum
|
||||||
}
|
}
|
||||||
pipeline.AddStage(osbuild2.NewOSTreeCommitStage(
|
pipeline.AddStage(osbuild.NewOSTreeCommitStage(
|
||||||
&osbuild2.OSTreeCommitStageOptions{
|
&osbuild.OSTreeCommitStageOptions{
|
||||||
Ref: p.ref,
|
Ref: p.ref,
|
||||||
OSVersion: p.OSVersion,
|
OSVersion: p.OSVersion,
|
||||||
Parent: parent,
|
Parent: parent,
|
||||||
},
|
},
|
||||||
&osbuild2.OSTreeCommitStageInputs{Tree: commitStageInput}),
|
&osbuild.OSTreeCommitStageInputs{Tree: commitStageInput}),
|
||||||
)
|
)
|
||||||
|
|
||||||
return pipeline
|
return pipeline
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/platform"
|
"github.com/osbuild/osbuild-composer/internal/platform"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
@ -94,51 +94,51 @@ func (p *OSTreeCommitServer) serializeEnd() {
|
||||||
p.packageSpecs = nil
|
p.packageSpecs = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *OSTreeCommitServer) serialize() osbuild2.Pipeline {
|
func (p *OSTreeCommitServer) serialize() osbuild.Pipeline {
|
||||||
if len(p.packageSpecs) == 0 {
|
if len(p.packageSpecs) == 0 {
|
||||||
panic("serialization not started")
|
panic("serialization not started")
|
||||||
}
|
}
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewRPMStage(osbuild2.NewRPMStageOptions(p.repos), osbuild2.NewRpmStageSourceFilesInputs(p.packageSpecs)))
|
pipeline.AddStage(osbuild.NewRPMStage(osbuild.NewRPMStageOptions(p.repos), osbuild.NewRpmStageSourceFilesInputs(p.packageSpecs)))
|
||||||
pipeline.AddStage(osbuild2.NewLocaleStage(&osbuild2.LocaleStageOptions{Language: p.Language}))
|
pipeline.AddStage(osbuild.NewLocaleStage(&osbuild.LocaleStageOptions{Language: p.Language}))
|
||||||
|
|
||||||
htmlRoot := "/usr/share/nginx/html"
|
htmlRoot := "/usr/share/nginx/html"
|
||||||
repoPath := filepath.Join(htmlRoot, "repo")
|
repoPath := filepath.Join(htmlRoot, "repo")
|
||||||
pipeline.AddStage(osbuild2.NewOSTreeInitStage(&osbuild2.OSTreeInitStageOptions{Path: repoPath}))
|
pipeline.AddStage(osbuild.NewOSTreeInitStage(&osbuild.OSTreeInitStageOptions{Path: repoPath}))
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewOSTreePullStage(
|
pipeline.AddStage(osbuild.NewOSTreePullStage(
|
||||||
&osbuild2.OSTreePullStageOptions{Repo: repoPath},
|
&osbuild.OSTreePullStageOptions{Repo: repoPath},
|
||||||
osbuild2.NewOstreePullStageInputs("org.osbuild.pipeline", "name:"+p.commitPipeline.Name(), p.commitPipeline.ref),
|
osbuild.NewOstreePullStageInputs("org.osbuild.pipeline", "name:"+p.commitPipeline.Name(), p.commitPipeline.ref),
|
||||||
))
|
))
|
||||||
|
|
||||||
// make nginx log and lib directories world writeable, otherwise nginx can't start in
|
// make nginx log and lib directories world writeable, otherwise nginx can't start in
|
||||||
// an unprivileged container
|
// an unprivileged container
|
||||||
pipeline.AddStage(osbuild2.NewChmodStage(chmodStageOptions("/var/log/nginx", "a+rwX", true)))
|
pipeline.AddStage(osbuild.NewChmodStage(chmodStageOptions("/var/log/nginx", "a+rwX", true)))
|
||||||
pipeline.AddStage(osbuild2.NewChmodStage(chmodStageOptions("/var/lib/nginx", "a+rwX", true)))
|
pipeline.AddStage(osbuild.NewChmodStage(chmodStageOptions("/var/lib/nginx", "a+rwX", true)))
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewNginxConfigStage(nginxConfigStageOptions(p.nginxConfigPath, htmlRoot, p.listenPort)))
|
pipeline.AddStage(osbuild.NewNginxConfigStage(nginxConfigStageOptions(p.nginxConfigPath, htmlRoot, p.listenPort)))
|
||||||
|
|
||||||
return pipeline
|
return pipeline
|
||||||
}
|
}
|
||||||
|
|
||||||
func nginxConfigStageOptions(path, htmlRoot, listen string) *osbuild2.NginxConfigStageOptions {
|
func nginxConfigStageOptions(path, htmlRoot, listen string) *osbuild.NginxConfigStageOptions {
|
||||||
// configure nginx to work in an unprivileged container
|
// configure nginx to work in an unprivileged container
|
||||||
cfg := &osbuild2.NginxConfig{
|
cfg := &osbuild.NginxConfig{
|
||||||
Listen: listen,
|
Listen: listen,
|
||||||
Root: htmlRoot,
|
Root: htmlRoot,
|
||||||
Daemon: common.BoolToPtr(false),
|
Daemon: common.BoolToPtr(false),
|
||||||
PID: "/tmp/nginx.pid",
|
PID: "/tmp/nginx.pid",
|
||||||
}
|
}
|
||||||
return &osbuild2.NginxConfigStageOptions{
|
return &osbuild.NginxConfigStageOptions{
|
||||||
Path: path,
|
Path: path,
|
||||||
Config: cfg,
|
Config: cfg,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func chmodStageOptions(path, mode string, recursive bool) *osbuild2.ChmodStageOptions {
|
func chmodStageOptions(path, mode string, recursive bool) *osbuild.ChmodStageOptions {
|
||||||
return &osbuild2.ChmodStageOptions{
|
return &osbuild.ChmodStageOptions{
|
||||||
Items: map[string]osbuild2.ChmodStagePathOptions{
|
Items: map[string]osbuild.ChmodStagePathOptions{
|
||||||
path: {Mode: mode, Recursive: recursive},
|
path: {Mode: mode, Recursive: recursive},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package manifest
|
package manifest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
// An ISO represents a bootable ISO file created from an
|
// An ISO represents a bootable ISO file created from an
|
||||||
|
|
@ -37,17 +37,17 @@ func (p *ISO) getBuildPackages() []string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ISO) serialize() osbuild2.Pipeline {
|
func (p *ISO) serialize() osbuild.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewXorrisofsStage(xorrisofsStageOptions(p.Filename, p.treePipeline.isoLabel, p.ISOLinux), osbuild2.NewXorrisofsStagePipelineTreeInputs(p.treePipeline.Name())))
|
pipeline.AddStage(osbuild.NewXorrisofsStage(xorrisofsStageOptions(p.Filename, p.treePipeline.isoLabel, p.ISOLinux), osbuild.NewXorrisofsStagePipelineTreeInputs(p.treePipeline.Name())))
|
||||||
pipeline.AddStage(osbuild2.NewImplantisomd5Stage(&osbuild2.Implantisomd5StageOptions{Filename: p.Filename}))
|
pipeline.AddStage(osbuild.NewImplantisomd5Stage(&osbuild.Implantisomd5StageOptions{Filename: p.Filename}))
|
||||||
|
|
||||||
return pipeline
|
return pipeline
|
||||||
}
|
}
|
||||||
|
|
||||||
func xorrisofsStageOptions(filename, isolabel string, isolinux bool) *osbuild2.XorrisofsStageOptions {
|
func xorrisofsStageOptions(filename, isolabel string, isolinux bool) *osbuild.XorrisofsStageOptions {
|
||||||
options := &osbuild2.XorrisofsStageOptions{
|
options := &osbuild.XorrisofsStageOptions{
|
||||||
Filename: filename,
|
Filename: filename,
|
||||||
VolID: isolabel,
|
VolID: isolabel,
|
||||||
SysID: "LINUX",
|
SysID: "LINUX",
|
||||||
|
|
@ -56,7 +56,7 @@ func xorrisofsStageOptions(filename, isolabel string, isolinux bool) *osbuild2.X
|
||||||
}
|
}
|
||||||
|
|
||||||
if isolinux {
|
if isolinux {
|
||||||
options.Boot = &osbuild2.XorrisofsBoot{
|
options.Boot = &osbuild.XorrisofsBoot{
|
||||||
Image: "isolinux/isolinux.bin",
|
Image: "isolinux/isolinux.bin",
|
||||||
Catalog: "isolinux/boot.cat",
|
Catalog: "isolinux/boot.cat",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import (
|
||||||
|
|
||||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
// An ISOTree represents a tree containing the anaconda installer,
|
// An ISOTree represents a tree containing the anaconda installer,
|
||||||
|
|
@ -71,44 +71,44 @@ func (p *ISOTree) getBuildPackages() []string {
|
||||||
return packages
|
return packages
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *ISOTree) serialize() osbuild2.Pipeline {
|
func (p *ISOTree) serialize() osbuild.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
kspath := "/osbuild.ks"
|
kspath := "/osbuild.ks"
|
||||||
ostreeRepoPath := "/ostree/repo"
|
ostreeRepoPath := "/ostree/repo"
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewBootISOMonoStage(bootISOMonoStageOptions(p.anacondaPipeline.kernelVer,
|
pipeline.AddStage(osbuild.NewBootISOMonoStage(bootISOMonoStageOptions(p.anacondaPipeline.kernelVer,
|
||||||
p.anacondaPipeline.platform.GetArch().String(),
|
p.anacondaPipeline.platform.GetArch().String(),
|
||||||
p.UEFIVendor,
|
p.UEFIVendor,
|
||||||
p.anacondaPipeline.product,
|
p.anacondaPipeline.product,
|
||||||
p.anacondaPipeline.version,
|
p.anacondaPipeline.version,
|
||||||
p.isoLabel,
|
p.isoLabel,
|
||||||
kspath),
|
kspath),
|
||||||
osbuild2.NewBootISOMonoStagePipelineTreeInputs(p.anacondaPipeline.Name())))
|
osbuild.NewBootISOMonoStagePipelineTreeInputs(p.anacondaPipeline.Name())))
|
||||||
|
|
||||||
kickstartOptions, err := osbuild2.NewKickstartStageOptions(kspath, "", p.Users, p.Groups, makeISORootPath(ostreeRepoPath), p.osTreeRef, p.OSName)
|
kickstartOptions, err := osbuild.NewKickstartStageOptions(kspath, "", p.Users, p.Groups, makeISORootPath(ostreeRepoPath), p.osTreeRef, p.OSName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic("password encryption failed")
|
panic("password encryption failed")
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewKickstartStage(kickstartOptions))
|
pipeline.AddStage(osbuild.NewKickstartStage(kickstartOptions))
|
||||||
pipeline.AddStage(osbuild2.NewDiscinfoStage(&osbuild2.DiscinfoStageOptions{
|
pipeline.AddStage(osbuild.NewDiscinfoStage(&osbuild.DiscinfoStageOptions{
|
||||||
BaseArch: p.anacondaPipeline.platform.GetArch().String(),
|
BaseArch: p.anacondaPipeline.platform.GetArch().String(),
|
||||||
Release: p.Release,
|
Release: p.Release,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewOSTreeInitStage(&osbuild2.OSTreeInitStageOptions{Path: ostreeRepoPath}))
|
pipeline.AddStage(osbuild.NewOSTreeInitStage(&osbuild.OSTreeInitStageOptions{Path: ostreeRepoPath}))
|
||||||
pipeline.AddStage(osbuild2.NewOSTreePullStage(
|
pipeline.AddStage(osbuild.NewOSTreePullStage(
|
||||||
&osbuild2.OSTreePullStageOptions{Repo: ostreeRepoPath},
|
&osbuild.OSTreePullStageOptions{Repo: ostreeRepoPath},
|
||||||
osbuild2.NewOstreePullStageInputs("org.osbuild.source", p.osTreeCommit, p.osTreeRef),
|
osbuild.NewOstreePullStageInputs("org.osbuild.source", p.osTreeCommit, p.osTreeRef),
|
||||||
))
|
))
|
||||||
|
|
||||||
return pipeline
|
return pipeline
|
||||||
}
|
}
|
||||||
|
|
||||||
func bootISOMonoStageOptions(kernelVer, arch, vendor, product, osVersion, isolabel, kspath string) *osbuild2.BootISOMonoStageOptions {
|
func bootISOMonoStageOptions(kernelVer, arch, vendor, product, osVersion, isolabel, kspath string) *osbuild.BootISOMonoStageOptions {
|
||||||
comprOptions := new(osbuild2.FSCompressionOptions)
|
comprOptions := new(osbuild.FSCompressionOptions)
|
||||||
if bcj := osbuild2.BCJOption(arch); bcj != "" {
|
if bcj := osbuild.BCJOption(arch); bcj != "" {
|
||||||
comprOptions.BCJ = bcj
|
comprOptions.BCJ = bcj
|
||||||
}
|
}
|
||||||
var architectures []string
|
var architectures []string
|
||||||
|
|
@ -121,26 +121,26 @@ func bootISOMonoStageOptions(kernelVer, arch, vendor, product, osVersion, isolab
|
||||||
panic("unsupported architecture")
|
panic("unsupported architecture")
|
||||||
}
|
}
|
||||||
|
|
||||||
return &osbuild2.BootISOMonoStageOptions{
|
return &osbuild.BootISOMonoStageOptions{
|
||||||
Product: osbuild2.Product{
|
Product: osbuild.Product{
|
||||||
Name: product,
|
Name: product,
|
||||||
Version: osVersion,
|
Version: osVersion,
|
||||||
},
|
},
|
||||||
ISOLabel: isolabel,
|
ISOLabel: isolabel,
|
||||||
Kernel: kernelVer,
|
Kernel: kernelVer,
|
||||||
KernelOpts: fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", isolabel, kspath),
|
KernelOpts: fmt.Sprintf("inst.ks=hd:LABEL=%s:%s", isolabel, kspath),
|
||||||
EFI: osbuild2.EFI{
|
EFI: osbuild.EFI{
|
||||||
Architectures: architectures,
|
Architectures: architectures,
|
||||||
Vendor: vendor,
|
Vendor: vendor,
|
||||||
},
|
},
|
||||||
ISOLinux: osbuild2.ISOLinux{
|
ISOLinux: osbuild.ISOLinux{
|
||||||
Enabled: arch == distro.X86_64ArchName,
|
Enabled: arch == distro.X86_64ArchName,
|
||||||
Debug: false,
|
Debug: false,
|
||||||
},
|
},
|
||||||
Templates: "99-generic",
|
Templates: "99-generic",
|
||||||
RootFS: osbuild2.RootFS{
|
RootFS: osbuild.RootFS{
|
||||||
Size: 9216,
|
Size: 9216,
|
||||||
Compression: osbuild2.FSCompression{
|
Compression: osbuild.FSCompression{
|
||||||
Method: "xz",
|
Method: "xz",
|
||||||
Options: comprOptions,
|
Options: comprOptions,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/ostree"
|
"github.com/osbuild/osbuild-composer/internal/ostree"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
@ -59,7 +59,7 @@ func (m Manifest) GetPackageSetChains() map[string][]rpmmd.PackageSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m Manifest) Serialize(packageSets map[string][]rpmmd.PackageSpec) (distro.Manifest, error) {
|
func (m Manifest) Serialize(packageSets map[string][]rpmmd.PackageSpec) (distro.Manifest, error) {
|
||||||
pipelines := make([]osbuild2.Pipeline, 0)
|
pipelines := make([]osbuild.Pipeline, 0)
|
||||||
packages := make([]rpmmd.PackageSpec, 0)
|
packages := make([]rpmmd.PackageSpec, 0)
|
||||||
commits := make([]ostree.CommitSource, 0)
|
commits := make([]ostree.CommitSource, 0)
|
||||||
inline := make([]string, 0)
|
inline := make([]string, 0)
|
||||||
|
|
@ -81,10 +81,10 @@ func (m Manifest) Serialize(packageSets map[string][]rpmmd.PackageSpec) (distro.
|
||||||
}
|
}
|
||||||
|
|
||||||
return json.Marshal(
|
return json.Marshal(
|
||||||
osbuild2.Manifest{
|
osbuild.Manifest{
|
||||||
Version: "2",
|
Version: "2",
|
||||||
Pipelines: pipelines,
|
Pipelines: pipelines,
|
||||||
Sources: osbuild2.GenSources(packages, commits, inline),
|
Sources: osbuild.GenSources(packages, commits, inline),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package manifest
|
package manifest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
// An OCIContainer represents an OCI container, containing a filesystem
|
// An OCIContainer represents an OCI container, containing a filesystem
|
||||||
|
|
@ -31,23 +31,23 @@ func NewOCIContainer(m *Manifest,
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *OCIContainer) serialize() osbuild2.Pipeline {
|
func (p *OCIContainer) serialize() osbuild.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
options := &osbuild2.OCIArchiveStageOptions{
|
options := &osbuild.OCIArchiveStageOptions{
|
||||||
Architecture: p.treePipeline.GetPlatform().GetArch().String(),
|
Architecture: p.treePipeline.GetPlatform().GetArch().String(),
|
||||||
Filename: p.Filename,
|
Filename: p.Filename,
|
||||||
Config: &osbuild2.OCIArchiveConfig{
|
Config: &osbuild.OCIArchiveConfig{
|
||||||
Cmd: p.Cmd,
|
Cmd: p.Cmd,
|
||||||
ExposedPorts: p.ExposedPorts,
|
ExposedPorts: p.ExposedPorts,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
baseInput := new(osbuild2.OCIArchiveStageInput)
|
baseInput := new(osbuild.OCIArchiveStageInput)
|
||||||
baseInput.Type = "org.osbuild.tree"
|
baseInput.Type = "org.osbuild.tree"
|
||||||
baseInput.Origin = "org.osbuild.pipeline"
|
baseInput.Origin = "org.osbuild.pipeline"
|
||||||
baseInput.References = []string{"name:" + p.treePipeline.Name()}
|
baseInput.References = []string{"name:" + p.treePipeline.Name()}
|
||||||
inputs := &osbuild2.OCIArchiveStageInputs{Base: baseInput}
|
inputs := &osbuild.OCIArchiveStageInputs{Base: baseInput}
|
||||||
pipeline.AddStage(osbuild2.NewOCIArchiveStage(options, inputs))
|
pipeline.AddStage(osbuild.NewOCIArchiveStage(options, inputs))
|
||||||
|
|
||||||
return pipeline
|
return pipeline
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/common"
|
"github.com/osbuild/osbuild-composer/internal/common"
|
||||||
"github.com/osbuild/osbuild-composer/internal/disk"
|
"github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
"github.com/osbuild/osbuild-composer/internal/environment"
|
"github.com/osbuild/osbuild-composer/internal/environment"
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/platform"
|
"github.com/osbuild/osbuild-composer/internal/platform"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
"github.com/osbuild/osbuild-composer/internal/workload"
|
"github.com/osbuild/osbuild-composer/internal/workload"
|
||||||
|
|
@ -74,24 +74,24 @@ type OS struct {
|
||||||
Groups []blueprint.GroupCustomization
|
Groups []blueprint.GroupCustomization
|
||||||
Users []blueprint.UserCustomization
|
Users []blueprint.UserCustomization
|
||||||
Firewall *blueprint.FirewallCustomization
|
Firewall *blueprint.FirewallCustomization
|
||||||
// TODO: drop osbuild2 types from the API
|
// TODO: drop osbuild types from the API
|
||||||
Grub2Config *osbuild2.GRUB2Config
|
Grub2Config *osbuild.GRUB2Config
|
||||||
Sysconfig []*osbuild2.SysconfigStageOptions
|
Sysconfig []*osbuild.SysconfigStageOptions
|
||||||
SystemdLogind []*osbuild2.SystemdLogindStageOptions
|
SystemdLogind []*osbuild.SystemdLogindStageOptions
|
||||||
CloudInit []*osbuild2.CloudInitStageOptions
|
CloudInit []*osbuild.CloudInitStageOptions
|
||||||
Modprobe []*osbuild2.ModprobeStageOptions
|
Modprobe []*osbuild.ModprobeStageOptions
|
||||||
DracutConf []*osbuild2.DracutConfStageOptions
|
DracutConf []*osbuild.DracutConfStageOptions
|
||||||
SystemdUnit []*osbuild2.SystemdUnitStageOptions
|
SystemdUnit []*osbuild.SystemdUnitStageOptions
|
||||||
Authselect *osbuild2.AuthselectStageOptions
|
Authselect *osbuild.AuthselectStageOptions
|
||||||
SELinuxConfig *osbuild2.SELinuxConfigStageOptions
|
SELinuxConfig *osbuild.SELinuxConfigStageOptions
|
||||||
Tuned *osbuild2.TunedStageOptions
|
Tuned *osbuild.TunedStageOptions
|
||||||
Tmpfilesd []*osbuild2.TmpfilesdStageOptions
|
Tmpfilesd []*osbuild.TmpfilesdStageOptions
|
||||||
PamLimitsConf []*osbuild2.PamLimitsConfStageOptions
|
PamLimitsConf []*osbuild.PamLimitsConfStageOptions
|
||||||
Sysctld []*osbuild2.SysctldStageOptions
|
Sysctld []*osbuild.SysctldStageOptions
|
||||||
DNFConfig []*osbuild2.DNFConfigStageOptions
|
DNFConfig []*osbuild.DNFConfigStageOptions
|
||||||
SshdConfig *osbuild2.SshdConfigStageOptions
|
SshdConfig *osbuild.SshdConfigStageOptions
|
||||||
AuthConfig *osbuild2.AuthconfigStageOptions
|
AuthConfig *osbuild.AuthconfigStageOptions
|
||||||
PwQuality *osbuild2.PwqualityConfStageOptions
|
PwQuality *osbuild.PwqualityConfStageOptions
|
||||||
|
|
||||||
repos []rpmmd.RepoConfig
|
repos []rpmmd.RepoConfig
|
||||||
packageSpecs []rpmmd.PackageSpec
|
packageSpecs []rpmmd.PackageSpec
|
||||||
|
|
@ -211,7 +211,7 @@ func (p *OS) serializeEnd() {
|
||||||
p.packageSpecs = nil
|
p.packageSpecs = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *OS) serialize() osbuild2.Pipeline {
|
func (p *OS) serialize() osbuild.Pipeline {
|
||||||
if len(p.packageSpecs) == 0 {
|
if len(p.packageSpecs) == 0 {
|
||||||
panic("serialization not started")
|
panic("serialization not started")
|
||||||
}
|
}
|
||||||
|
|
@ -219,45 +219,45 @@ func (p *OS) serialize() osbuild2.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
if p.OSTree != nil && p.OSTree.Parent != nil {
|
if p.OSTree != nil && p.OSTree.Parent != nil {
|
||||||
pipeline.AddStage(osbuild2.NewOSTreePasswdStage("org.osbuild.source", p.OSTree.Parent.Checksum))
|
pipeline.AddStage(osbuild.NewOSTreePasswdStage("org.osbuild.source", p.OSTree.Parent.Checksum))
|
||||||
}
|
}
|
||||||
|
|
||||||
rpmOptions := osbuild2.NewRPMStageOptions(p.repos)
|
rpmOptions := osbuild.NewRPMStageOptions(p.repos)
|
||||||
if p.ExcludeDocs {
|
if p.ExcludeDocs {
|
||||||
if rpmOptions.Exclude == nil {
|
if rpmOptions.Exclude == nil {
|
||||||
rpmOptions.Exclude = &osbuild2.Exclude{}
|
rpmOptions.Exclude = &osbuild.Exclude{}
|
||||||
}
|
}
|
||||||
rpmOptions.Exclude.Docs = true
|
rpmOptions.Exclude.Docs = true
|
||||||
}
|
}
|
||||||
rpmOptions.GPGKeysFromTree = p.GPGKeyFiles
|
rpmOptions.GPGKeysFromTree = p.GPGKeyFiles
|
||||||
pipeline.AddStage(osbuild2.NewRPMStage(rpmOptions, osbuild2.NewRpmStageSourceFilesInputs(p.packageSpecs)))
|
pipeline.AddStage(osbuild.NewRPMStage(rpmOptions, osbuild.NewRpmStageSourceFilesInputs(p.packageSpecs)))
|
||||||
|
|
||||||
// If the /boot is on a separate partition, the prefix for the BLS stage must be ""
|
// If the /boot is on a separate partition, the prefix for the BLS stage must be ""
|
||||||
if p.PartitionTable == nil || p.PartitionTable.FindMountable("/boot") == nil {
|
if p.PartitionTable == nil || p.PartitionTable.FindMountable("/boot") == nil {
|
||||||
pipeline.AddStage(osbuild2.NewFixBLSStage(&osbuild2.FixBLSStageOptions{}))
|
pipeline.AddStage(osbuild.NewFixBLSStage(&osbuild.FixBLSStageOptions{}))
|
||||||
} else {
|
} else {
|
||||||
pipeline.AddStage(osbuild2.NewFixBLSStage(&osbuild2.FixBLSStageOptions{Prefix: common.StringToPtr("")}))
|
pipeline.AddStage(osbuild.NewFixBLSStage(&osbuild.FixBLSStageOptions{Prefix: common.StringToPtr("")}))
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewLocaleStage(&osbuild2.LocaleStageOptions{Language: p.Language}))
|
pipeline.AddStage(osbuild.NewLocaleStage(&osbuild.LocaleStageOptions{Language: p.Language}))
|
||||||
|
|
||||||
if p.Keyboard != nil {
|
if p.Keyboard != nil {
|
||||||
pipeline.AddStage(osbuild2.NewKeymapStage(&osbuild2.KeymapStageOptions{Keymap: *p.Keyboard}))
|
pipeline.AddStage(osbuild.NewKeymapStage(&osbuild.KeymapStageOptions{Keymap: *p.Keyboard}))
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewHostnameStage(&osbuild2.HostnameStageOptions{Hostname: p.Hostname}))
|
pipeline.AddStage(osbuild.NewHostnameStage(&osbuild.HostnameStageOptions{Hostname: p.Hostname}))
|
||||||
pipeline.AddStage(osbuild2.NewTimezoneStage(&osbuild2.TimezoneStageOptions{Zone: p.Timezone}))
|
pipeline.AddStage(osbuild.NewTimezoneStage(&osbuild.TimezoneStageOptions{Zone: p.Timezone}))
|
||||||
|
|
||||||
if len(p.NTPServers) > 0 {
|
if len(p.NTPServers) > 0 {
|
||||||
pipeline.AddStage(osbuild2.NewChronyStage(&osbuild2.ChronyStageOptions{Timeservers: p.NTPServers}))
|
pipeline.AddStage(osbuild.NewChronyStage(&osbuild.ChronyStageOptions{Timeservers: p.NTPServers}))
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(p.Groups) > 0 {
|
if len(p.Groups) > 0 {
|
||||||
pipeline.AddStage(osbuild2.NewGroupsStage(osbuild2.NewGroupsStageOptions(p.Groups)))
|
pipeline.AddStage(osbuild.NewGroupsStage(osbuild.NewGroupsStageOptions(p.Groups)))
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(p.Users) > 0 {
|
if len(p.Users) > 0 {
|
||||||
userOptions, err := osbuild2.NewUsersStageOptions(p.Users, false)
|
userOptions, err := osbuild.NewUsersStageOptions(p.Users, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// TODO: move encryption into weldr
|
// TODO: move encryption into weldr
|
||||||
panic("password encryption failed")
|
panic("password encryption failed")
|
||||||
|
|
@ -266,15 +266,15 @@ func (p *OS) serialize() osbuild2.Pipeline {
|
||||||
// for ostree, writing the key during user creation is
|
// for ostree, writing the key during user creation is
|
||||||
// redundant and can cause issues so create users without keys
|
// redundant and can cause issues so create users without keys
|
||||||
// and write them on first boot
|
// and write them on first boot
|
||||||
userOptionsSansKeys, err := osbuild2.NewUsersStageOptions(p.Users, true)
|
userOptionsSansKeys, err := osbuild.NewUsersStageOptions(p.Users, true)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// TODO: move encryption into weldr
|
// TODO: move encryption into weldr
|
||||||
panic("password encryption failed")
|
panic("password encryption failed")
|
||||||
}
|
}
|
||||||
pipeline.AddStage(osbuild2.NewUsersStage(userOptionsSansKeys))
|
pipeline.AddStage(osbuild.NewUsersStage(userOptionsSansKeys))
|
||||||
pipeline.AddStage(osbuild2.NewFirstBootStage(usersFirstBootOptions(userOptions)))
|
pipeline.AddStage(osbuild.NewFirstBootStage(usersFirstBootOptions(userOptions)))
|
||||||
} else {
|
} else {
|
||||||
pipeline.AddStage(osbuild2.NewUsersStage(userOptions))
|
pipeline.AddStage(osbuild.NewUsersStage(userOptions))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -291,7 +291,7 @@ func (p *OS) serialize() osbuild2.Pipeline {
|
||||||
}
|
}
|
||||||
if len(enabledServices) != 0 ||
|
if len(enabledServices) != 0 ||
|
||||||
len(disabledServices) != 0 || p.DefaultTarget != "" {
|
len(disabledServices) != 0 || p.DefaultTarget != "" {
|
||||||
pipeline.AddStage(osbuild2.NewSystemdStage(&osbuild2.SystemdStageOptions{
|
pipeline.AddStage(osbuild.NewSystemdStage(&osbuild.SystemdStageOptions{
|
||||||
EnabledServices: enabledServices,
|
EnabledServices: enabledServices,
|
||||||
DisabledServices: disabledServices,
|
DisabledServices: disabledServices,
|
||||||
DefaultTarget: p.DefaultTarget,
|
DefaultTarget: p.DefaultTarget,
|
||||||
|
|
@ -299,7 +299,7 @@ func (p *OS) serialize() osbuild2.Pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.Firewall != nil {
|
if p.Firewall != nil {
|
||||||
options := osbuild2.FirewallStageOptions{
|
options := osbuild.FirewallStageOptions{
|
||||||
Ports: p.Firewall.Ports,
|
Ports: p.Firewall.Ports,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -308,86 +308,86 @@ func (p *OS) serialize() osbuild2.Pipeline {
|
||||||
options.DisabledServices = p.Firewall.Services.Disabled
|
options.DisabledServices = p.Firewall.Services.Disabled
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewFirewallStage(&options))
|
pipeline.AddStage(osbuild.NewFirewallStage(&options))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, sysconfigConfig := range p.Sysconfig {
|
for _, sysconfigConfig := range p.Sysconfig {
|
||||||
pipeline.AddStage(osbuild2.NewSysconfigStage(sysconfigConfig))
|
pipeline.AddStage(osbuild.NewSysconfigStage(sysconfigConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, systemdLogindConfig := range p.SystemdLogind {
|
for _, systemdLogindConfig := range p.SystemdLogind {
|
||||||
pipeline.AddStage(osbuild2.NewSystemdLogindStage(systemdLogindConfig))
|
pipeline.AddStage(osbuild.NewSystemdLogindStage(systemdLogindConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, cloudInitConfig := range p.CloudInit {
|
for _, cloudInitConfig := range p.CloudInit {
|
||||||
pipeline.AddStage(osbuild2.NewCloudInitStage(cloudInitConfig))
|
pipeline.AddStage(osbuild.NewCloudInitStage(cloudInitConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, modprobeConfig := range p.Modprobe {
|
for _, modprobeConfig := range p.Modprobe {
|
||||||
pipeline.AddStage(osbuild2.NewModprobeStage(modprobeConfig))
|
pipeline.AddStage(osbuild.NewModprobeStage(modprobeConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, dracutConfConfig := range p.DracutConf {
|
for _, dracutConfConfig := range p.DracutConf {
|
||||||
pipeline.AddStage(osbuild2.NewDracutConfStage(dracutConfConfig))
|
pipeline.AddStage(osbuild.NewDracutConfStage(dracutConfConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, systemdUnitConfig := range p.SystemdUnit {
|
for _, systemdUnitConfig := range p.SystemdUnit {
|
||||||
pipeline.AddStage(osbuild2.NewSystemdUnitStage(systemdUnitConfig))
|
pipeline.AddStage(osbuild.NewSystemdUnitStage(systemdUnitConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.Authselect != nil {
|
if p.Authselect != nil {
|
||||||
pipeline.AddStage(osbuild2.NewAuthselectStage(p.Authselect))
|
pipeline.AddStage(osbuild.NewAuthselectStage(p.Authselect))
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.SELinuxConfig != nil {
|
if p.SELinuxConfig != nil {
|
||||||
pipeline.AddStage(osbuild2.NewSELinuxConfigStage(p.SELinuxConfig))
|
pipeline.AddStage(osbuild.NewSELinuxConfigStage(p.SELinuxConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.Tuned != nil {
|
if p.Tuned != nil {
|
||||||
pipeline.AddStage(osbuild2.NewTunedStage(p.Tuned))
|
pipeline.AddStage(osbuild.NewTunedStage(p.Tuned))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tmpfilesdConfig := range p.Tmpfilesd {
|
for _, tmpfilesdConfig := range p.Tmpfilesd {
|
||||||
pipeline.AddStage(osbuild2.NewTmpfilesdStage(tmpfilesdConfig))
|
pipeline.AddStage(osbuild.NewTmpfilesdStage(tmpfilesdConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, pamLimitsConfConfig := range p.PamLimitsConf {
|
for _, pamLimitsConfConfig := range p.PamLimitsConf {
|
||||||
pipeline.AddStage(osbuild2.NewPamLimitsConfStage(pamLimitsConfConfig))
|
pipeline.AddStage(osbuild.NewPamLimitsConfStage(pamLimitsConfConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, sysctldConfig := range p.Sysctld {
|
for _, sysctldConfig := range p.Sysctld {
|
||||||
pipeline.AddStage(osbuild2.NewSysctldStage(sysctldConfig))
|
pipeline.AddStage(osbuild.NewSysctldStage(sysctldConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, dnfConfig := range p.DNFConfig {
|
for _, dnfConfig := range p.DNFConfig {
|
||||||
pipeline.AddStage(osbuild2.NewDNFConfigStage(dnfConfig))
|
pipeline.AddStage(osbuild.NewDNFConfigStage(dnfConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.SshdConfig != nil {
|
if p.SshdConfig != nil {
|
||||||
pipeline.AddStage((osbuild2.NewSshdConfigStage(p.SshdConfig)))
|
pipeline.AddStage((osbuild.NewSshdConfigStage(p.SshdConfig)))
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.AuthConfig != nil {
|
if p.AuthConfig != nil {
|
||||||
pipeline.AddStage(osbuild2.NewAuthconfigStage(p.AuthConfig))
|
pipeline.AddStage(osbuild.NewAuthconfigStage(p.AuthConfig))
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.PwQuality != nil {
|
if p.PwQuality != nil {
|
||||||
pipeline.AddStage(osbuild2.NewPwqualityConfStage(p.PwQuality))
|
pipeline.AddStage(osbuild.NewPwqualityConfStage(p.PwQuality))
|
||||||
}
|
}
|
||||||
|
|
||||||
if pt := p.PartitionTable; pt != nil {
|
if pt := p.PartitionTable; pt != nil {
|
||||||
kernelOptions := osbuild2.GenImageKernelOptions(p.PartitionTable)
|
kernelOptions := osbuild.GenImageKernelOptions(p.PartitionTable)
|
||||||
kernelOptions = append(kernelOptions, p.KernelOptionsAppend...)
|
kernelOptions = append(kernelOptions, p.KernelOptionsAppend...)
|
||||||
pipeline = prependKernelCmdlineStage(pipeline, strings.Join(kernelOptions, " "), pt)
|
pipeline = prependKernelCmdlineStage(pipeline, strings.Join(kernelOptions, " "), pt)
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewFSTabStage(osbuild2.NewFSTabStageOptions(pt)))
|
pipeline.AddStage(osbuild.NewFSTabStage(osbuild.NewFSTabStageOptions(pt)))
|
||||||
|
|
||||||
var bootloader *osbuild2.Stage
|
var bootloader *osbuild.Stage
|
||||||
switch p.platform.GetArch() {
|
switch p.platform.GetArch() {
|
||||||
case platform.ARCH_S390X:
|
case platform.ARCH_S390X:
|
||||||
bootloader = osbuild2.NewZiplStage(new(osbuild2.ZiplStageOptions))
|
bootloader = osbuild.NewZiplStage(new(osbuild.ZiplStageOptions))
|
||||||
default:
|
default:
|
||||||
options := osbuild2.NewGrub2StageOptionsUnified(pt,
|
options := osbuild.NewGrub2StageOptionsUnified(pt,
|
||||||
p.kernelVer,
|
p.kernelVer,
|
||||||
p.platform.GetUEFIVendor() != "",
|
p.platform.GetUEFIVendor() != "",
|
||||||
p.platform.GetBIOSPlatform(),
|
p.platform.GetBIOSPlatform(),
|
||||||
|
|
@ -402,20 +402,20 @@ func (p *OS) serialize() osbuild2.Pipeline {
|
||||||
|
|
||||||
options.Config = cfg
|
options.Config = cfg
|
||||||
}
|
}
|
||||||
bootloader = osbuild2.NewGRUB2Stage(options)
|
bootloader = osbuild.NewGRUB2Stage(options)
|
||||||
}
|
}
|
||||||
|
|
||||||
pipeline.AddStage(bootloader)
|
pipeline.AddStage(bootloader)
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.SElinux != "" {
|
if p.SElinux != "" {
|
||||||
pipeline.AddStage(osbuild2.NewSELinuxStage(&osbuild2.SELinuxStageOptions{
|
pipeline.AddStage(osbuild.NewSELinuxStage(&osbuild.SELinuxStageOptions{
|
||||||
FileContexts: fmt.Sprintf("etc/selinux/%s/contexts/files/file_contexts", p.SElinux),
|
FileContexts: fmt.Sprintf("etc/selinux/%s/contexts/files/file_contexts", p.SElinux),
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.OSTree != nil {
|
if p.OSTree != nil {
|
||||||
pipeline.AddStage(osbuild2.NewOSTreePrepTreeStage(&osbuild2.OSTreePrepTreeStageOptions{
|
pipeline.AddStage(osbuild.NewOSTreePrepTreeStage(&osbuild.OSTreePrepTreeStageOptions{
|
||||||
EtcGroupMembers: []string{
|
EtcGroupMembers: []string{
|
||||||
// NOTE: We may want to make this configurable.
|
// NOTE: We may want to make this configurable.
|
||||||
"wheel", "docker",
|
"wheel", "docker",
|
||||||
|
|
@ -426,18 +426,18 @@ func (p *OS) serialize() osbuild2.Pipeline {
|
||||||
return pipeline
|
return pipeline
|
||||||
}
|
}
|
||||||
|
|
||||||
func prependKernelCmdlineStage(pipeline osbuild2.Pipeline, kernelOptions string, pt *disk.PartitionTable) osbuild2.Pipeline {
|
func prependKernelCmdlineStage(pipeline osbuild.Pipeline, kernelOptions string, pt *disk.PartitionTable) osbuild.Pipeline {
|
||||||
rootFs := pt.FindMountable("/")
|
rootFs := pt.FindMountable("/")
|
||||||
if rootFs == nil {
|
if rootFs == nil {
|
||||||
panic("root filesystem must be defined for kernel-cmdline stage, this is a programming error")
|
panic("root filesystem must be defined for kernel-cmdline stage, this is a programming error")
|
||||||
}
|
}
|
||||||
rootFsUUID := rootFs.GetFSSpec().UUID
|
rootFsUUID := rootFs.GetFSSpec().UUID
|
||||||
kernelStage := osbuild2.NewKernelCmdlineStage(osbuild2.NewKernelCmdlineStageOptions(rootFsUUID, kernelOptions))
|
kernelStage := osbuild.NewKernelCmdlineStage(osbuild.NewKernelCmdlineStageOptions(rootFsUUID, kernelOptions))
|
||||||
pipeline.Stages = append([]*osbuild2.Stage{kernelStage}, pipeline.Stages...)
|
pipeline.Stages = append([]*osbuild.Stage{kernelStage}, pipeline.Stages...)
|
||||||
return pipeline
|
return pipeline
|
||||||
}
|
}
|
||||||
|
|
||||||
func usersFirstBootOptions(usersStageOptions *osbuild2.UsersStageOptions) *osbuild2.FirstBootStageOptions {
|
func usersFirstBootOptions(usersStageOptions *osbuild.UsersStageOptions) *osbuild.FirstBootStageOptions {
|
||||||
cmds := make([]string, 0, 3*len(usersStageOptions.Users)+2)
|
cmds := make([]string, 0, 3*len(usersStageOptions.Users)+2)
|
||||||
// workaround for creating authorized_keys file for user
|
// workaround for creating authorized_keys file for user
|
||||||
// need to special case the root user, which has its home in a different place
|
// need to special case the root user, which has its home in a different place
|
||||||
|
|
@ -464,7 +464,7 @@ func usersFirstBootOptions(usersStageOptions *osbuild2.UsersStageOptions) *osbui
|
||||||
cmds = append(cmds, fmt.Sprintf("restorecon -rvF %s", varhome))
|
cmds = append(cmds, fmt.Sprintf("restorecon -rvF %s", varhome))
|
||||||
cmds = append(cmds, fmt.Sprintf("restorecon -rvF %s", roothome))
|
cmds = append(cmds, fmt.Sprintf("restorecon -rvF %s", roothome))
|
||||||
|
|
||||||
options := &osbuild2.FirstBootStageOptions{
|
options := &osbuild.FirstBootStageOptions{
|
||||||
Commands: cmds,
|
Commands: cmds,
|
||||||
WaitForNetwork: false,
|
WaitForNetwork: false,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
package manifest
|
package manifest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/platform"
|
"github.com/osbuild/osbuild-composer/internal/platform"
|
||||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||||
)
|
)
|
||||||
|
|
@ -18,7 +18,7 @@ type Pipeline interface {
|
||||||
getPackageSetChain() []rpmmd.PackageSet
|
getPackageSetChain() []rpmmd.PackageSet
|
||||||
serializeStart([]rpmmd.PackageSpec)
|
serializeStart([]rpmmd.PackageSpec)
|
||||||
serializeEnd()
|
serializeEnd()
|
||||||
serialize() osbuild2.Pipeline
|
serialize() osbuild.Pipeline
|
||||||
getPackageSpecs() []rpmmd.PackageSpec
|
getPackageSpecs() []rpmmd.PackageSpec
|
||||||
getOSTreeCommits() []osTreeCommit
|
getOSTreeCommits() []osTreeCommit
|
||||||
getInline() []string
|
getInline() []string
|
||||||
|
|
@ -95,11 +95,11 @@ func (p Base) serializeStart([]rpmmd.PackageSpec) {
|
||||||
func (p Base) serializeEnd() {
|
func (p Base) serializeEnd() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Serialize turns a given pipeline into an osbuild2.Pipeline object. This object is
|
// Serialize turns a given pipeline into an osbuild.Pipeline object. This object is
|
||||||
// meant to be treated as opaque and not to be modified further outside of the pipeline
|
// meant to be treated as opaque and not to be modified further outside of the pipeline
|
||||||
// package.
|
// package.
|
||||||
func (p Base) serialize() osbuild2.Pipeline {
|
func (p Base) serialize() osbuild.Pipeline {
|
||||||
pipeline := osbuild2.Pipeline{
|
pipeline := osbuild.Pipeline{
|
||||||
Name: p.name,
|
Name: p.name,
|
||||||
}
|
}
|
||||||
if p.build != nil {
|
if p.build != nil {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package manifest
|
package manifest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A QCOW2 turns a raw image file into qcow2 image.
|
// A QCOW2 turns a raw image file into qcow2 image.
|
||||||
|
|
@ -32,16 +32,16 @@ func NewQCOW2(m *Manifest,
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *QCOW2) serialize() osbuild2.Pipeline {
|
func (p *QCOW2) serialize() osbuild.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewQEMUStage(
|
pipeline.AddStage(osbuild.NewQEMUStage(
|
||||||
osbuild2.NewQEMUStageOptions(p.Filename,
|
osbuild.NewQEMUStageOptions(p.Filename,
|
||||||
osbuild2.QEMUFormatQCOW2,
|
osbuild.QEMUFormatQCOW2,
|
||||||
osbuild2.QCOW2Options{
|
osbuild.QCOW2Options{
|
||||||
Compat: p.Compat,
|
Compat: p.Compat,
|
||||||
}),
|
}),
|
||||||
osbuild2.NewQemuStagePipelineFilesInputs(p.imgPipeline.Name(), p.imgPipeline.Filename),
|
osbuild.NewQemuStagePipelineFilesInputs(p.imgPipeline.Name(), p.imgPipeline.Filename),
|
||||||
))
|
))
|
||||||
|
|
||||||
return pipeline
|
return pipeline
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package manifest
|
package manifest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
"github.com/osbuild/osbuild-composer/internal/platform"
|
"github.com/osbuild/osbuild-composer/internal/platform"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ func (p *RawImage) getBuildPackages() []string {
|
||||||
return p.treePipeline.PartitionTable.GetBuildPackages()
|
return p.treePipeline.PartitionTable.GetBuildPackages()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *RawImage) serialize() osbuild2.Pipeline {
|
func (p *RawImage) serialize() osbuild.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
pt := p.treePipeline.PartitionTable
|
pt := p.treePipeline.PartitionTable
|
||||||
|
|
@ -41,26 +41,26 @@ func (p *RawImage) serialize() osbuild2.Pipeline {
|
||||||
panic("no partition table in live image")
|
panic("no partition table in live image")
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, stage := range osbuild2.GenImagePrepareStages(pt, p.Filename, osbuild2.PTSfdisk) {
|
for _, stage := range osbuild.GenImagePrepareStages(pt, p.Filename, osbuild.PTSfdisk) {
|
||||||
pipeline.AddStage(stage)
|
pipeline.AddStage(stage)
|
||||||
}
|
}
|
||||||
|
|
||||||
inputName := "root-tree"
|
inputName := "root-tree"
|
||||||
copyOptions, copyDevices, copyMounts := osbuild2.GenCopyFSTreeOptions(inputName, p.treePipeline.Name(), p.Filename, pt)
|
copyOptions, copyDevices, copyMounts := osbuild.GenCopyFSTreeOptions(inputName, p.treePipeline.Name(), p.Filename, pt)
|
||||||
copyInputs := osbuild2.NewCopyStagePipelineTreeInputs(inputName, p.treePipeline.Name())
|
copyInputs := osbuild.NewCopyStagePipelineTreeInputs(inputName, p.treePipeline.Name())
|
||||||
pipeline.AddStage(osbuild2.NewCopyStage(copyOptions, copyInputs, copyDevices, copyMounts))
|
pipeline.AddStage(osbuild.NewCopyStage(copyOptions, copyInputs, copyDevices, copyMounts))
|
||||||
|
|
||||||
for _, stage := range osbuild2.GenImageFinishStages(pt, p.Filename) {
|
for _, stage := range osbuild.GenImageFinishStages(pt, p.Filename) {
|
||||||
pipeline.AddStage(stage)
|
pipeline.AddStage(stage)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch p.treePipeline.platform.GetArch() {
|
switch p.treePipeline.platform.GetArch() {
|
||||||
case platform.ARCH_S390X:
|
case platform.ARCH_S390X:
|
||||||
loopback := osbuild2.NewLoopbackDevice(&osbuild2.LoopbackDeviceOptions{Filename: p.Filename})
|
loopback := osbuild.NewLoopbackDevice(&osbuild.LoopbackDeviceOptions{Filename: p.Filename})
|
||||||
pipeline.AddStage(osbuild2.NewZiplInstStage(osbuild2.NewZiplInstStageOptions(p.treePipeline.kernelVer, pt), loopback, copyDevices, copyMounts))
|
pipeline.AddStage(osbuild.NewZiplInstStage(osbuild.NewZiplInstStageOptions(p.treePipeline.kernelVer, pt), loopback, copyDevices, copyMounts))
|
||||||
default:
|
default:
|
||||||
if grubLegacy := p.treePipeline.platform.GetBIOSPlatform(); grubLegacy != "" {
|
if grubLegacy := p.treePipeline.platform.GetBIOSPlatform(); grubLegacy != "" {
|
||||||
pipeline.AddStage(osbuild2.NewGrub2InstStage(osbuild2.NewGrub2InstStageOption(p.Filename, pt, grubLegacy)))
|
pipeline.AddStage(osbuild.NewGrub2InstStage(osbuild.NewGrub2InstStageOption(p.Filename, pt, grubLegacy)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package manifest
|
package manifest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A Tar represents the contents of another pipeline in a tar file
|
// A Tar represents the contents of another pipeline in a tar file
|
||||||
|
|
@ -32,14 +32,14 @@ func NewTar(m *Manifest,
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *Tar) serialize() osbuild2.Pipeline {
|
func (p *Tar) serialize() osbuild.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
tree := new(osbuild2.TarStageInput)
|
tree := new(osbuild.TarStageInput)
|
||||||
tree.Type = "org.osbuild.tree"
|
tree.Type = "org.osbuild.tree"
|
||||||
tree.Origin = "org.osbuild.pipeline"
|
tree.Origin = "org.osbuild.pipeline"
|
||||||
tree.References = []string{"name:" + p.inputPipeline.Name()}
|
tree.References = []string{"name:" + p.inputPipeline.Name()}
|
||||||
tarStage := osbuild2.NewTarStage(&osbuild2.TarStageOptions{Filename: p.Filename}, &osbuild2.TarStageInputs{Tree: tree})
|
tarStage := osbuild.NewTarStage(&osbuild.TarStageOptions{Filename: p.Filename}, &osbuild.TarStageInputs{Tree: tree})
|
||||||
|
|
||||||
pipeline.AddStage(tarStage)
|
pipeline.AddStage(tarStage)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package manifest
|
package manifest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A VMDK turns a raw image file into vmdk image.
|
// A VMDK turns a raw image file into vmdk image.
|
||||||
|
|
@ -30,14 +30,14 @@ func NewVMDK(m *Manifest,
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *VMDK) serialize() osbuild2.Pipeline {
|
func (p *VMDK) serialize() osbuild.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewQEMUStage(
|
pipeline.AddStage(osbuild.NewQEMUStage(
|
||||||
osbuild2.NewQEMUStageOptions(p.Filename, osbuild2.QEMUFormatVMDK, osbuild2.VMDKOptions{
|
osbuild.NewQEMUStageOptions(p.Filename, osbuild.QEMUFormatVMDK, osbuild.VMDKOptions{
|
||||||
Subformat: osbuild2.VMDKSubformatStreamOptimized,
|
Subformat: osbuild.VMDKSubformatStreamOptimized,
|
||||||
}),
|
}),
|
||||||
osbuild2.NewQemuStagePipelineFilesInputs(p.imgPipeline.Name(), p.imgPipeline.Filename),
|
osbuild.NewQemuStagePipelineFilesInputs(p.imgPipeline.Name(), p.imgPipeline.Filename),
|
||||||
))
|
))
|
||||||
|
|
||||||
return pipeline
|
return pipeline
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package manifest
|
package manifest
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/osbuild/osbuild-composer/internal/osbuild2"
|
"github.com/osbuild/osbuild-composer/internal/osbuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A VPC turns a raw image file into qemu-based image format, such as qcow2.
|
// A VPC turns a raw image file into qemu-based image format, such as qcow2.
|
||||||
|
|
@ -31,12 +31,12 @@ func NewVPC(m *Manifest,
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *VPC) serialize() osbuild2.Pipeline {
|
func (p *VPC) serialize() osbuild.Pipeline {
|
||||||
pipeline := p.Base.serialize()
|
pipeline := p.Base.serialize()
|
||||||
|
|
||||||
pipeline.AddStage(osbuild2.NewQEMUStage(
|
pipeline.AddStage(osbuild.NewQEMUStage(
|
||||||
osbuild2.NewQEMUStageOptions(p.Filename, osbuild2.QEMUFormatVPC, nil),
|
osbuild.NewQEMUStageOptions(p.Filename, osbuild.QEMUFormatVPC, nil),
|
||||||
osbuild2.NewQemuStagePipelineFilesInputs(p.imgPipeline.Name(), p.imgPipeline.Filename),
|
osbuild.NewQemuStagePipelineFilesInputs(p.imgPipeline.Name(), p.imgPipeline.Filename),
|
||||||
))
|
))
|
||||||
|
|
||||||
return pipeline
|
return pipeline
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type AnacondaStageOptions struct {
|
type AnacondaStageOptions struct {
|
||||||
// Kickstart modules to enable
|
// Kickstart modules to enable
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type AuthconfigStageOptions struct {
|
type AuthconfigStageOptions struct {
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type AuthselectStageOptions struct {
|
type AuthselectStageOptions struct {
|
||||||
Profile string `json:"profile"`
|
Profile string `json:"profile"`
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type BootISOMonoStageOptions struct {
|
type BootISOMonoStageOptions struct {
|
||||||
Product Product `json:"product"`
|
Product Product `json:"product"`
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
func NewBtrfsMount(name, source, target string) *Mount {
|
func NewBtrfsMount(name, source, target string) *Mount {
|
||||||
return &Mount{
|
return &Mount{
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type BuildstampStageOptions struct {
|
type BuildstampStageOptions struct {
|
||||||
// Build architecture
|
// Build architecture
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type ChmodStageOptions struct {
|
type ChmodStageOptions struct {
|
||||||
Items map[string]ChmodStagePathOptions `json:"items"`
|
Items map[string]ChmodStagePathOptions `json:"items"`
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type ClevisLuksBindStageOptions struct {
|
type ClevisLuksBindStageOptions struct {
|
||||||
Passphrase string `json:"passphrase"`
|
Passphrase string `json:"passphrase"`
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import "github.com/osbuild/osbuild-composer/internal/disk"
|
import "github.com/osbuild/osbuild-composer/internal/disk"
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type DiscinfoStageOptions struct {
|
type DiscinfoStageOptions struct {
|
||||||
// Build architecture
|
// Build architecture
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type DracutStageOptions struct {
|
type DracutStageOptions struct {
|
||||||
// List of target kernel versions
|
// List of target kernel versions
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
func NewExt4Mount(name, source, target string) *Mount {
|
func NewExt4Mount(name, source, target string) *Mount {
|
||||||
return &Mount{
|
return &Mount{
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
func NewFATMount(name, source, target string) *Mount {
|
func NewFATMount(name, source, target string) *Mount {
|
||||||
return &Mount{
|
return &Mount{
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type FirewallStageOptions struct {
|
type FirewallStageOptions struct {
|
||||||
Ports []string `json:"ports,omitempty"`
|
Ports []string `json:"ports,omitempty"`
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type FirstBootStageOptions struct {
|
type FirstBootStageOptions struct {
|
||||||
Commands []string `json:"commands"`
|
Commands []string `json:"commands"`
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
// A FixBLSStageOptions struct
|
// A FixBLSStageOptions struct
|
||||||
//
|
//
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"sort"
|
"sort"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import "github.com/osbuild/osbuild-composer/internal/blueprint"
|
import "github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type GrubISOStageOptions struct {
|
type GrubISOStageOptions struct {
|
||||||
Product Product `json:"product"`
|
Product Product `json:"product"`
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type HostnameStageOptions struct {
|
type HostnameStageOptions struct {
|
||||||
Hostname string `json:"hostname"`
|
Hostname string `json:"hostname"`
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
type Implantisomd5StageOptions struct {
|
type Implantisomd5StageOptions struct {
|
||||||
// Path in the ISO where the md5 checksum will be implanted
|
// Path in the ISO where the md5 checksum will be implanted
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
// Collection of Inputs for a Stage
|
// Collection of Inputs for a Stage
|
||||||
type Inputs interface {
|
type Inputs interface {
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
// KernelCmdlineStageOptions describe how to create kernel-cmdline stage
|
// KernelCmdlineStageOptions describe how to create kernel-cmdline stage
|
||||||
//
|
//
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
package osbuild2
|
package osbuild
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue