Skip to content

Commit

Permalink
Revert "Merge remote-tracking branch 'upstream/main' into 477-import-…
Browse files Browse the repository at this point in the history
…selinux"

This reverts commit a419de4, reversing
changes made to 6f9bf5f.
  • Loading branch information
yasminvalim committed Jan 9, 2024
1 parent 7960a5b commit 36f71f1
Show file tree
Hide file tree
Showing 40 changed files with 90 additions and 2,381 deletions.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ RHCOS packaging for the current RHCOS development release:
- [ ] Get the PR reviewed and merge it
- [ ] Update your local repo and run `rhpkg build`
- [ ] File ticket similar to [this one](https://issues.redhat.com/browse/ART-3711) to sync the new version to mirror.openshift.com
- [ ] Wait until mirror.openshift.com is updated and confirm the new version is correct
CentOS Stream 9 packaging:
- [ ] Create a `rebase-c9s-butane` issue in the internal team-operations repo and follow the steps there
10 changes: 5 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
name: Test
strategy:
matrix:
go-version: [1.20.x, 1.21.x]
go-version: [1.18.x, 1.19.x, 1.20.x]
os: [ubuntu-latest]
include:
- go-version: 1.21.x
- go-version: 1.20.x
os: macos-latest
- go-version: 1.21.x
- go-version: 1.20.x
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -48,7 +48,7 @@ jobs:
uses: golangci/golangci-lint-action@v3
if: runner.os == 'Linux'
with:
version: v1.55.1
version: v1.52.2
args: -E=gofmt --timeout=30m0s
regenerate:
name: Regenerate
Expand All @@ -59,7 +59,7 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: 1.21.x
go-version: 1.20.x
- name: Regenerate
run: ./generate
- name: Check whether generated output is current
Expand Down
5 changes: 1 addition & 4 deletions config/common/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ var (
ErrMountPointForbidden = errors.New("path must be under /etc or /var if with_mount_unit is true")

// boot device
ErrUnknownBootDeviceLayout = errors.New("layout must be one of: aarch64, ppc64le, s390x-eckd, s390x-virt, s390x-zfcp, x86_64")
ErrUnknownBootDeviceLayout = errors.New("layout must be one of: aarch64, ppc64le, x86_64")
ErrTooFewMirrorDevices = errors.New("mirroring requires at least two devices")
ErrNoLuksBootDevice = errors.New("device is required for layouts: s390x-eckd, s390x-zfcp")
ErrMirrorNotSupport = errors.New("mirroring not supported on layouts: s390x-eckd, s390x-zfcp, s390x-virt")
ErrLuksBootDeviceBadName = errors.New("device name must start with /dev/dasd on s390x-eckd layout or /dev/sd on s390x-zfcp layout")

// partition
ErrReuseByLabel = errors.New("partitions cannot be reused by label; number must be specified except on boot disk (/dev/disk/by-id/coreos-boot-disk) or when wipe_table is true")
Expand Down
10 changes: 2 additions & 8 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,14 @@ import (
fcos1_4 "github.com/coreos/butane/config/fcos/v1_4"
fcos1_5 "github.com/coreos/butane/config/fcos/v1_5"
fcos1_6_exp "github.com/coreos/butane/config/fcos/v1_6_exp"
fiot1_0 "github.com/coreos/butane/config/fiot/v1_0"
fiot1_1_exp "github.com/coreos/butane/config/fiot/v1_1_exp"
flatcar1_0 "github.com/coreos/butane/config/flatcar/v1_0"
flatcar1_1 "github.com/coreos/butane/config/flatcar/v1_1"
flatcar1_2_exp "github.com/coreos/butane/config/flatcar/v1_2_exp"
openshift4_10 "github.com/coreos/butane/config/openshift/v4_10"
openshift4_11 "github.com/coreos/butane/config/openshift/v4_11"
openshift4_12 "github.com/coreos/butane/config/openshift/v4_12"
openshift4_13 "github.com/coreos/butane/config/openshift/v4_13"
openshift4_14 "github.com/coreos/butane/config/openshift/v4_14"
openshift4_15_exp "github.com/coreos/butane/config/openshift/v4_15_exp"
openshift4_14_exp "github.com/coreos/butane/config/openshift/v4_14_exp"
openshift4_8 "github.com/coreos/butane/config/openshift/v4_8"
openshift4_9 "github.com/coreos/butane/config/openshift/v4_9"
r4e1_0 "github.com/coreos/butane/config/r4e/v1_0"
Expand Down Expand Up @@ -74,13 +71,10 @@ func init() {
RegisterTranslator("openshift", "4.11.0", openshift4_11.ToConfigBytes)
RegisterTranslator("openshift", "4.12.0", openshift4_12.ToConfigBytes)
RegisterTranslator("openshift", "4.13.0", openshift4_13.ToConfigBytes)
RegisterTranslator("openshift", "4.14.0", openshift4_14.ToConfigBytes)
RegisterTranslator("openshift", "4.15.0-experimental", openshift4_15_exp.ToConfigBytes)
RegisterTranslator("openshift", "4.14.0-experimental", openshift4_14_exp.ToConfigBytes)
RegisterTranslator("r4e", "1.0.0", r4e1_0.ToIgn3_3Bytes)
RegisterTranslator("r4e", "1.1.0", r4e1_1.ToIgn3_4Bytes)
RegisterTranslator("r4e", "1.2.0-experimental", r4e1_2_exp.ToIgn3_5Bytes)
RegisterTranslator("fiot", "1.0.0", fiot1_0.ToIgn3_4Bytes)
RegisterTranslator("fiot", "1.1.0-experimental", fiot1_1_exp.ToIgn3_5Bytes)
RegisterTranslator("rhcos", "0.1.0", unsupportedRhcosVariant)
}

Expand Down
1 change: 0 additions & 1 deletion config/fcos/v1_6_exp/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ type BootDevice struct {

type BootDeviceLuks struct {
Discard *bool `yaml:"discard"`
Device *string `yaml:"device"`
Tang []base.Tang `yaml:"tang"`
Threshold *int `yaml:"threshold"`
Tpm2 *bool `yaml:"tpm2"`
Expand Down
13 changes: 2 additions & 11 deletions config/fcos/v1_6_exp/translate.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ func (c Config) processBootDevice(config *types.Config, ts *translate.Translatio
wantEFIPart = true
case *layout == "ppc64le":
wantPRePPart = true
case *layout == "s390x-eckd" || *layout == "s390x-virt" || *layout == "s390x-zfcp":
default:
// should have failed validation
panic("unknown layout")
Expand Down Expand Up @@ -251,17 +250,9 @@ func (c Config) processBootDevice(config *types.Config, ts *translate.Translatio

// encrypted root partition
if wantLuks {
var luksDevice string
switch {
//Luks Device for dasd and zFCP-scsi
case layout != nil && *layout == "s390x-eckd":
luksDevice = *c.BootDevice.Luks.Device + "2"
case layout != nil && *layout == "s390x-zfcp":
luksDevice = *c.BootDevice.Luks.Device + "4"
case wantMirror:
luksDevice := "/dev/disk/by-partlabel/root"
if wantMirror {
luksDevice = "/dev/md/md-root"
default:
luksDevice = "/dev/disk/by-partlabel/root"
}
clevis, ts2, r2 := translateBootDeviceLuks(c.BootDevice.Luks, options)
rendered.Storage.Luks = []types.Luks{{
Expand Down
21 changes: 0 additions & 21 deletions config/fcos/v1_6_exp/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ import (
const rootDevice = "/dev/disk/by-id/coreos-boot-disk"

var allowedMountpoints = regexp.MustCompile(`^/(etc|var)(/|$)`)
var dasdRe = regexp.MustCompile("(/dev/dasd[a-z]$)")
var sdRe = regexp.MustCompile("(/dev/sd[a-z]$)")

// We can't define a Validate function directly on Disk because that's defined in base,
// so we use a Validate function on the top-level Config instead.
Expand All @@ -54,28 +52,9 @@ func (d BootDevice) Validate(c path.ContextPath) (r report.Report) {
if d.Layout != nil {
switch *d.Layout {
case "aarch64", "ppc64le", "x86_64":
case "s390x-eckd":
if util.NilOrEmpty(d.Luks.Device) {
r.AddOnError(c.Append(*d.Layout), common.ErrNoLuksBootDevice)
} else if !dasdRe.MatchString(*d.Luks.Device) {
r.AddOnError(c.Append(*d.Layout), common.ErrLuksBootDeviceBadName)
}
case "s390x-zfcp":
if util.NilOrEmpty(d.Luks.Device) {
r.AddOnError(c.Append(*d.Layout), common.ErrNoLuksBootDevice)
} else if !sdRe.MatchString(*d.Luks.Device) {
r.AddOnError(c.Append(*d.Layout), common.ErrLuksBootDeviceBadName)
}
case "s390x-virt":
default:
r.AddOnError(c.Append("layout"), common.ErrUnknownBootDeviceLayout)
}

if *d.Layout == "s390x-eckd" || *d.Layout == "s390x-zfcp" || *d.Layout == "s390x-virt" {
if len(d.Mirror.Devices) > 0 {
r.AddOnError(c.Append(*d.Layout), common.ErrMirrorNotSupport)
}
}
}
r.Merge(d.Mirror.Validate(c.Append("mirror")))
return
Expand Down
23 changes: 0 additions & 23 deletions config/fiot/v1_0/schema.go

This file was deleted.

54 changes: 0 additions & 54 deletions config/fiot/v1_0/translate.go

This file was deleted.

Loading

0 comments on commit 36f71f1

Please sign in to comment.