Skip to content

Commit f583650

Browse files
authored
Repeatable iPXE build, update deps and build with go-1.19 (#10)
1 parent 96e5fed commit f583650

File tree

1,870 files changed

+151
-627700
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,870 files changed

+151
-627700
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020
name: Build
2121
runs-on: ubuntu-latest
2222
steps:
23-
- name: Set up Go 1.18
23+
- name: Set up Go 1.19
2424
uses: actions/setup-go@v2
2525
with:
26-
go-version: 1.18
26+
go-version: 1.19
2727
id: go
2828

2929
- name: Check out code into the Go module directory

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ cmd/pixiecore/pixiecore
33
dhcp4/dhcp4.test
44
pcap/pcap.test
55
pixiecore/pixiecore.test
6+
ipxe/ipxe
67
vendor/
78
build/
89
.vscode

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
FROM golang:1.18-buster as builder
2-
COPY . /work/
1+
FROM golang:1.19-bullseye as builder
32
WORKDIR /work
4-
RUN make
3+
COPY . .
4+
RUN apt update \
5+
&& apt install --yes --no-install-recommends \
6+
liblzma-dev \
7+
&& make ipxe pixie
58

69
FROM alpine:3.16
710
RUN apk -U add ca-certificates

Makefile

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ifneq ($(wildcard Makefile.defaults),)
1212
include Makefile.defaults
1313
endif
1414

15-
all: pixie
15+
all: ipxe pixie
1616

1717
.PHONY: pixie
1818
pixie: test
@@ -33,20 +33,24 @@ test:
3333
lint:
3434
$(GOMODULECMD) tool vet .
3535

36-
.PHONY: update-ipxe
37-
update-ipxe:
38-
# rm -rf third_party/ipxe
39-
# (cd third_party && git clone git://git.ipxe.org/ipxe.git)
40-
# (cd third_party/ipxe && git rev-parse HEAD >COMMIT-ID)
41-
# rm -rf third_party/ipxe/.git
42-
(cd third_party/ipxe/src &&\
36+
37+
IPXE_COMMIT_SHA := $(shell cat ipxe/IPXE_COMMIT_SHA)
38+
39+
# Note: requires liblzma-dev package installed
40+
.PHONY: ipxe
41+
ipxe:
42+
rm -rf ipxe/ipxe
43+
(cd ipxe \
44+
&& git clone https://github.com/ipxe/ipxe.git \
45+
&& cd ipxe \
46+
&& git checkout $(IPXE_COMMIT_SHA) \
47+
)
48+
cp ipxe/branding.h ipxe/ipxe/src/config/local/branding.h
49+
(cd ipxe/ipxe/src &&\
4350
make bin/ipxe.pxe bin/undionly.kpxe bin-x86_64-efi/ipxe.efi bin-i386-efi/ipxe.efi EMBED=../../../pixiecore/boot.ipxe)
44-
(rm -rf third_party/ipxe/bin && mkdir third_party/ipxe/bin)
45-
mv -f third_party/ipxe/src/bin/ipxe.pxe third_party/ipxe/bin/ipxe.pxe
46-
mv -f third_party/ipxe/src/bin/undionly.kpxe third_party/ipxe/bin/undionly.kpxe
47-
mv -f third_party/ipxe/src/bin-x86_64-efi/ipxe.efi third_party/ipxe/bin/ipxe-x86_64.efi
48-
mv -f third_party/ipxe/src/bin-i386-efi/ipxe.efi third_party/ipxe/bin/ipxe-i386.efi
49-
go-bindata -o third_party/ipxe/ipxe-bin.go -pkg ipxe -nometadata -nomemcopy -prefix third_party/ipxe/bin/ third_party/ipxe/bin
50-
gofmt -s -w third_party/ipxe/ipxe-bin.go
51-
rm -rf third_party/ipxe/bin
52-
(cd third_party/ipxe/src && make veryclean)
51+
(rm -rf ipxe/ipxe/bin && mkdir ipxe/ipxe/bin)
52+
mv -f ipxe/ipxe/src/bin/ipxe.pxe ipxe/ipxe/bin/ipxe.pxe
53+
mv -f ipxe/ipxe/src/bin/undionly.kpxe ipxe/ipxe/bin/undionly.kpxe
54+
mv -f ipxe/ipxe/src/bin-x86_64-efi/ipxe.efi ipxe/ipxe/bin/ipxe-x86_64.efi
55+
mv -f ipxe/ipxe/src/bin-i386-efi/ipxe.efi ipxe/ipxe/bin/ipxe-i386.efi
56+
(cd ipxe/ipxe/src && make veryclean)

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
package main
1616

1717
import (
18+
"github.com/metal-stack/pixie/ipxe"
1819
"github.com/metal-stack/pixie/pixiecore"
1920
"github.com/metal-stack/pixie/pixiecore/cli"
20-
"github.com/metal-stack/pixie/third_party/ipxe"
2121
)
2222

2323
func main() {

go.mod

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ module github.com/metal-stack/pixie
33
go 1.18
44

55
require (
6-
github.com/metal-stack/metal-api v0.18.0
6+
github.com/metal-stack/metal-api v0.21.1
77
github.com/metal-stack/v v1.0.3
8-
github.com/pin/tftp v0.0.0-20210809155059-0161c5dd2e96
9-
github.com/prometheus/client_golang v1.12.2
10-
github.com/spf13/cobra v1.4.0
11-
github.com/spf13/viper v1.12.0
12-
github.com/stretchr/testify v1.7.2
13-
go.uber.org/zap v1.21.0
14-
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
15-
golang.org/x/net v0.0.0-20220607020251-c690dde0001d
16-
google.golang.org/grpc v1.47.0
8+
github.com/pin/tftp/v3 v3.0.0
9+
github.com/prometheus/client_golang v1.13.0
10+
github.com/spf13/cobra v1.5.0
11+
github.com/spf13/viper v1.13.0
12+
github.com/stretchr/testify v1.8.0
13+
go.uber.org/zap v1.23.0
14+
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90
15+
golang.org/x/net v0.0.0-20220909164309-bea034e7d591
16+
google.golang.org/grpc v1.49.0
1717
)
1818

1919
require (
@@ -24,28 +24,28 @@ require (
2424
github.com/fsnotify/fsnotify v1.5.4 // indirect
2525
github.com/golang/protobuf v1.5.2 // indirect
2626
github.com/hashicorp/hcl v1.0.0 // indirect
27-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
27+
github.com/inconshreveable/mousetrap v1.0.1 // indirect
2828
github.com/magiconair/properties v1.8.6 // indirect
2929
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
3030
github.com/mitchellh/mapstructure v1.5.0 // indirect
3131
github.com/pelletier/go-toml v1.9.5 // indirect
32-
github.com/pelletier/go-toml/v2 v2.0.1 // indirect
32+
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
3333
github.com/pmezard/go-difflib v1.0.0 // indirect
3434
github.com/prometheus/client_model v0.2.0 // indirect
35-
github.com/prometheus/common v0.34.0 // indirect
36-
github.com/prometheus/procfs v0.7.3 // indirect
37-
github.com/spf13/afero v1.8.2 // indirect
35+
github.com/prometheus/common v0.37.0 // indirect
36+
github.com/prometheus/procfs v0.8.0 // indirect
37+
github.com/spf13/afero v1.9.2 // indirect
3838
github.com/spf13/cast v1.5.0 // indirect
3939
github.com/spf13/jwalterweatherman v1.1.0 // indirect
4040
github.com/spf13/pflag v1.0.5 // indirect
41-
github.com/subosito/gotenv v1.3.0 // indirect
42-
go.uber.org/atomic v1.9.0 // indirect
41+
github.com/subosito/gotenv v1.4.1 // indirect
42+
go.uber.org/atomic v1.10.0 // indirect
4343
go.uber.org/multierr v1.8.0 // indirect
44-
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
44+
golang.org/x/sys v0.0.0-20220913175220-63ea55921009 // indirect
4545
golang.org/x/text v0.3.7 // indirect
46-
google.golang.org/genproto v0.0.0-20220531173845-685668d2de03 // indirect
47-
google.golang.org/protobuf v1.28.0 // indirect
48-
gopkg.in/ini.v1 v1.66.6 // indirect
46+
google.golang.org/genproto v0.0.0-20220913154956-18f8339a66a5 // indirect
47+
google.golang.org/protobuf v1.28.1 // indirect
48+
gopkg.in/ini.v1 v1.67.0 // indirect
4949
gopkg.in/yaml.v2 v2.4.0 // indirect
5050
gopkg.in/yaml.v3 v3.0.1 // indirect
5151
)

0 commit comments

Comments
 (0)