Skip to content

Commit 36f71f1

Browse files
committed
Revert "Merge remote-tracking branch 'upstream/main' into 477-import-selinux"
This reverts commit a419de4, reversing changes made to 6f9bf5f.
1 parent 7960a5b commit 36f71f1

40 files changed

+90
-2381
lines changed

.github/ISSUE_TEMPLATE/release-checklist.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ RHCOS packaging for the current RHCOS development release:
7474
- [ ] Get the PR reviewed and merge it
7575
- [ ] Update your local repo and run `rhpkg build`
7676
- [ ] File ticket similar to [this one](https://issues.redhat.com/browse/ART-3711) to sync the new version to mirror.openshift.com
77-
- [ ] Wait until mirror.openshift.com is updated and confirm the new version is correct
7877

7978
CentOS Stream 9 packaging:
8079
- [ ] Create a `rebase-c9s-butane` issue in the internal team-operations repo and follow the steps there

.github/workflows/go.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
name: Test
2121
strategy:
2222
matrix:
23-
go-version: [1.20.x, 1.21.x]
23+
go-version: [1.18.x, 1.19.x, 1.20.x]
2424
os: [ubuntu-latest]
2525
include:
26-
- go-version: 1.21.x
26+
- go-version: 1.20.x
2727
os: macos-latest
28-
- go-version: 1.21.x
28+
- go-version: 1.20.x
2929
os: windows-latest
3030
runs-on: ${{ matrix.os }}
3131
steps:
@@ -48,7 +48,7 @@ jobs:
4848
uses: golangci/golangci-lint-action@v3
4949
if: runner.os == 'Linux'
5050
with:
51-
version: v1.55.1
51+
version: v1.52.2
5252
args: -E=gofmt --timeout=30m0s
5353
regenerate:
5454
name: Regenerate
@@ -59,7 +59,7 @@ jobs:
5959
- name: Set up Go 1.x
6060
uses: actions/setup-go@v4
6161
with:
62-
go-version: 1.21.x
62+
go-version: 1.20.x
6363
- name: Regenerate
6464
run: ./generate
6565
- name: Check whether generated output is current

config/common/errors.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,8 @@ var (
5454
ErrMountPointForbidden = errors.New("path must be under /etc or /var if with_mount_unit is true")
5555

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

6360
// partition
6461
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")

config/config.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,14 @@ import (
2525
fcos1_4 "github.com/coreos/butane/config/fcos/v1_4"
2626
fcos1_5 "github.com/coreos/butane/config/fcos/v1_5"
2727
fcos1_6_exp "github.com/coreos/butane/config/fcos/v1_6_exp"
28-
fiot1_0 "github.com/coreos/butane/config/fiot/v1_0"
29-
fiot1_1_exp "github.com/coreos/butane/config/fiot/v1_1_exp"
3028
flatcar1_0 "github.com/coreos/butane/config/flatcar/v1_0"
3129
flatcar1_1 "github.com/coreos/butane/config/flatcar/v1_1"
3230
flatcar1_2_exp "github.com/coreos/butane/config/flatcar/v1_2_exp"
3331
openshift4_10 "github.com/coreos/butane/config/openshift/v4_10"
3432
openshift4_11 "github.com/coreos/butane/config/openshift/v4_11"
3533
openshift4_12 "github.com/coreos/butane/config/openshift/v4_12"
3634
openshift4_13 "github.com/coreos/butane/config/openshift/v4_13"
37-
openshift4_14 "github.com/coreos/butane/config/openshift/v4_14"
38-
openshift4_15_exp "github.com/coreos/butane/config/openshift/v4_15_exp"
35+
openshift4_14_exp "github.com/coreos/butane/config/openshift/v4_14_exp"
3936
openshift4_8 "github.com/coreos/butane/config/openshift/v4_8"
4037
openshift4_9 "github.com/coreos/butane/config/openshift/v4_9"
4138
r4e1_0 "github.com/coreos/butane/config/r4e/v1_0"
@@ -74,13 +71,10 @@ func init() {
7471
RegisterTranslator("openshift", "4.11.0", openshift4_11.ToConfigBytes)
7572
RegisterTranslator("openshift", "4.12.0", openshift4_12.ToConfigBytes)
7673
RegisterTranslator("openshift", "4.13.0", openshift4_13.ToConfigBytes)
77-
RegisterTranslator("openshift", "4.14.0", openshift4_14.ToConfigBytes)
78-
RegisterTranslator("openshift", "4.15.0-experimental", openshift4_15_exp.ToConfigBytes)
74+
RegisterTranslator("openshift", "4.14.0-experimental", openshift4_14_exp.ToConfigBytes)
7975
RegisterTranslator("r4e", "1.0.0", r4e1_0.ToIgn3_3Bytes)
8076
RegisterTranslator("r4e", "1.1.0", r4e1_1.ToIgn3_4Bytes)
8177
RegisterTranslator("r4e", "1.2.0-experimental", r4e1_2_exp.ToIgn3_5Bytes)
82-
RegisterTranslator("fiot", "1.0.0", fiot1_0.ToIgn3_4Bytes)
83-
RegisterTranslator("fiot", "1.1.0-experimental", fiot1_1_exp.ToIgn3_5Bytes)
8478
RegisterTranslator("rhcos", "0.1.0", unsupportedRhcosVariant)
8579
}
8680

config/fcos/v1_6_exp/schema.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ type BootDevice struct {
3333

3434
type BootDeviceLuks struct {
3535
Discard *bool `yaml:"discard"`
36-
Device *string `yaml:"device"`
3736
Tang []base.Tang `yaml:"tang"`
3837
Threshold *int `yaml:"threshold"`
3938
Tpm2 *bool `yaml:"tpm2"`

config/fcos/v1_6_exp/translate.go

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ func (c Config) processBootDevice(config *types.Config, ts *translate.Translatio
144144
wantEFIPart = true
145145
case *layout == "ppc64le":
146146
wantPRePPart = true
147-
case *layout == "s390x-eckd" || *layout == "s390x-virt" || *layout == "s390x-zfcp":
148147
default:
149148
// should have failed validation
150149
panic("unknown layout")
@@ -251,17 +250,9 @@ func (c Config) processBootDevice(config *types.Config, ts *translate.Translatio
251250

252251
// encrypted root partition
253252
if wantLuks {
254-
var luksDevice string
255-
switch {
256-
//Luks Device for dasd and zFCP-scsi
257-
case layout != nil && *layout == "s390x-eckd":
258-
luksDevice = *c.BootDevice.Luks.Device + "2"
259-
case layout != nil && *layout == "s390x-zfcp":
260-
luksDevice = *c.BootDevice.Luks.Device + "4"
261-
case wantMirror:
253+
luksDevice := "/dev/disk/by-partlabel/root"
254+
if wantMirror {
262255
luksDevice = "/dev/md/md-root"
263-
default:
264-
luksDevice = "/dev/disk/by-partlabel/root"
265256
}
266257
clevis, ts2, r2 := translateBootDeviceLuks(c.BootDevice.Luks, options)
267258
rendered.Storage.Luks = []types.Luks{{

config/fcos/v1_6_exp/validate.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ import (
2727
const rootDevice = "/dev/disk/by-id/coreos-boot-disk"
2828

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

3331
// We can't define a Validate function directly on Disk because that's defined in base,
3432
// so we use a Validate function on the top-level Config instead.
@@ -54,28 +52,9 @@ func (d BootDevice) Validate(c path.ContextPath) (r report.Report) {
5452
if d.Layout != nil {
5553
switch *d.Layout {
5654
case "aarch64", "ppc64le", "x86_64":
57-
case "s390x-eckd":
58-
if util.NilOrEmpty(d.Luks.Device) {
59-
r.AddOnError(c.Append(*d.Layout), common.ErrNoLuksBootDevice)
60-
} else if !dasdRe.MatchString(*d.Luks.Device) {
61-
r.AddOnError(c.Append(*d.Layout), common.ErrLuksBootDeviceBadName)
62-
}
63-
case "s390x-zfcp":
64-
if util.NilOrEmpty(d.Luks.Device) {
65-
r.AddOnError(c.Append(*d.Layout), common.ErrNoLuksBootDevice)
66-
} else if !sdRe.MatchString(*d.Luks.Device) {
67-
r.AddOnError(c.Append(*d.Layout), common.ErrLuksBootDeviceBadName)
68-
}
69-
case "s390x-virt":
7055
default:
7156
r.AddOnError(c.Append("layout"), common.ErrUnknownBootDeviceLayout)
7257
}
73-
74-
if *d.Layout == "s390x-eckd" || *d.Layout == "s390x-zfcp" || *d.Layout == "s390x-virt" {
75-
if len(d.Mirror.Devices) > 0 {
76-
r.AddOnError(c.Append(*d.Layout), common.ErrMirrorNotSupport)
77-
}
78-
}
7958
}
8059
r.Merge(d.Mirror.Validate(c.Append("mirror")))
8160
return

config/fiot/v1_0/schema.go

Lines changed: 0 additions & 23 deletions
This file was deleted.

config/fiot/v1_0/translate.go

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)