From 4148642e5fe1b3990a842f0896562da33d08c36d Mon Sep 17 00:00:00 2001 From: Olli Janatuinen Date: Thu, 5 Jan 2023 09:55:41 +0000 Subject: [PATCH] v2.0.0-beta6 - Buildroot 2022.02.8 -- with cherry-picked memory leak fix for dhcpcd - Kernel 5.10.162 - Docker 23.0.0-rc.3 - System-docker 17.06.107 - Removed debugging tool system-docker-containerd-ctr - Build ros binary with Go version 1.19.5 - Improve debug mode by disabling auto reboot and asking resolution --- Dockerfile.dapper | 17 +++++++++-------- cmd/init/init.go | 1 + cmd/respawn/respawn.go | 2 +- .../cloudinit/config/validate/validate_test.go | 2 +- .../cloudinit/datasource/vmware/vmware_test.go | 2 ++ .../datasource/vmware/vmware_unsupported.go | 1 + config/cloudinit/network/is_go15_false_test.go | 1 + config/cloudinit/network/is_go15_true_test.go | 1 + config/cmdline/cmdline.go | 2 +- pkg/init/one/one.go | 1 + pkg/init/selinux/selinux.go | 1 + pkg/log/log.go | 3 ++- pkg/util/cutil.go | 1 + pkg/util/term.go | 1 + pkg/util/util_linux.go | 1 + scripts/global.cfg | 2 +- scripts/isolinux_label.cfg | 4 ++-- scripts/layout-initrd | 2 ++ 18 files changed, 30 insertions(+), 15 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 8f79c642..e3ff318a 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -63,7 +63,7 @@ ARG DISTRIB_ID=BurmillaOS ARG SELINUX_POLICY_URL=https://github.com/burmilla/refpolicy/releases/download/v0.0.3/policy.29 -ARG KERNEL_VERSION=5.10.129-burmilla +ARG KERNEL_VERSION=5.10.162-burmilla ARG KERNEL_URL_amd64=https://github.com/burmilla/os-kernel/releases/download/v${KERNEL_VERSION}/linux-${KERNEL_VERSION}-x86.tar.gz ARG KERNEL_URL_arm64=https://github.com/burmilla/os-kernel/releases/download/v${KERNEL_VERSION}/linux-${KERNEL_VERSION}-arm64.tar.gz @@ -79,17 +79,17 @@ ARG OS_CONSOLE=default ARG OS_AUTOFORMAT=false ARG OS_FIRMWARE=true -ARG OS_BASE_URL_amd64=https://github.com/burmilla/os-base/releases/download/v2022.02.3-1/os-base_amd64.tar.xz -ARG OS_BASE_URL_arm64=https://github.com/burmilla/os-base/releases/download/v2022.02.3-1/os-base_arm64.tar.xz +ARG OS_BASE_URL_amd64=https://github.com/burmilla/os-base/releases/download/v2022.02.8-2/os-base_amd64.tar.xz +ARG OS_BASE_URL_arm64=https://github.com/burmilla/os-base/releases/download/v2022.02.8-2/os-base_arm64.tar.xz -ARG OS_INITRD_BASE_URL_amd64=https://github.com/burmilla/os-initrd-base/releases/download/v2022.02.3-1/os-initrd-base-amd64.tar.gz -ARG OS_INITRD_BASE_URL_arm64=https://github.com/burmilla/os-initrd-base/releases/download/v2022.02.3-1/os-initrd-base-arm64.tar.gz +ARG OS_INITRD_BASE_URL_amd64=https://github.com/burmilla/os-initrd-base/releases/download/v2022.02.8-2/os-initrd-base-amd64.tar.gz +ARG OS_INITRD_BASE_URL_arm64=https://github.com/burmilla/os-initrd-base/releases/download/v2022.02.8-2/os-initrd-base-arm64.tar.gz -ARG SYSTEM_DOCKER_VERSION=17.06-ros6 +ARG SYSTEM_DOCKER_VERSION=17.06.107 ARG SYSTEM_DOCKER_URL_amd64=https://github.com/burmilla/os-system-docker/releases/download/${SYSTEM_DOCKER_VERSION}/docker-amd64-${SYSTEM_DOCKER_VERSION}.tgz ARG SYSTEM_DOCKER_URL_arm64=https://github.com/burmilla/os-system-docker/releases/download/${SYSTEM_DOCKER_VERSION}/docker-arm64-${SYSTEM_DOCKER_VERSION}.tgz -ARG USER_DOCKER_VERSION=22.06.0beta0 +ARG USER_DOCKER_VERSION=23.0.0rc3 ARG USER_DOCKER_ENGINE_VERSION=docker-${USER_DOCKER_VERSION} ARG AZURE_SERVICE=false @@ -109,7 +109,8 @@ ENV BUILD_DOCKER_URL=BUILD_DOCKER_URL_${ARCH} \ DISTRIB_ID=${DISTRIB_ID} \ DOWNLOADS=/usr/src/downloads \ GOPATH=/go \ - GO_VERSION=1.16.3 \ + GO_VERSION=1.19.5 \ + GO111MODULE=off \ GOARCH=$ARCH \ HOSTNAME_DEFAULT=${HOSTNAME_DEFAULT} \ IMAGE_NAME=${IMAGE_NAME} \ diff --git a/cmd/init/init.go b/cmd/init/init.go index 0824e974..9a649dbf 100644 --- a/cmd/init/init.go +++ b/cmd/init/init.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package init diff --git a/cmd/respawn/respawn.go b/cmd/respawn/respawn.go index aa34eb5f..949085b2 100644 --- a/cmd/respawn/respawn.go +++ b/cmd/respawn/respawn.go @@ -51,7 +51,7 @@ func Main() { } func setupSigterm() { - sigtermChan := make(chan os.Signal) + sigtermChan := make(chan os.Signal, 1) signal.Notify(sigtermChan, syscall.SIGTERM) go func() { for range sigtermChan { diff --git a/config/cloudinit/config/validate/validate_test.go b/config/cloudinit/config/validate/validate_test.go index a61bd5fb..7c7b3054 100644 --- a/config/cloudinit/config/validate/validate_test.go +++ b/config/cloudinit/config/validate/validate_test.go @@ -28,7 +28,7 @@ func TestParseCloudConfig(t *testing.T) { }{ {}, { - config: " ", + config: " ", entries: []Entry{{entryError, "found character that cannot start any token", 1}}, }, { diff --git a/config/cloudinit/datasource/vmware/vmware_test.go b/config/cloudinit/datasource/vmware/vmware_test.go index 5f34e7e9..9627db7e 100644 --- a/config/cloudinit/datasource/vmware/vmware_test.go +++ b/config/cloudinit/datasource/vmware/vmware_test.go @@ -1,4 +1,6 @@ +//go:build amd64 // +build amd64 + // Copyright 2015 CoreOS, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/config/cloudinit/datasource/vmware/vmware_unsupported.go b/config/cloudinit/datasource/vmware/vmware_unsupported.go index 9bac0813..3f632c61 100644 --- a/config/cloudinit/datasource/vmware/vmware_unsupported.go +++ b/config/cloudinit/datasource/vmware/vmware_unsupported.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build !amd64 // +build !amd64 package vmware diff --git a/config/cloudinit/network/is_go15_false_test.go b/config/cloudinit/network/is_go15_false_test.go index 85d5f0db..ebfc03c4 100644 --- a/config/cloudinit/network/is_go15_false_test.go +++ b/config/cloudinit/network/is_go15_false_test.go @@ -1,3 +1,4 @@ +//go:build !go1.5 // +build !go1.5 package network diff --git a/config/cloudinit/network/is_go15_true_test.go b/config/cloudinit/network/is_go15_true_test.go index 953836de..fdcf76c1 100644 --- a/config/cloudinit/network/is_go15_true_test.go +++ b/config/cloudinit/network/is_go15_true_test.go @@ -1,3 +1,4 @@ +//go:build go1.5 // +build go1.5 package network diff --git a/config/cmdline/cmdline.go b/config/cmdline/cmdline.go index 9fa55d26..42291614 100644 --- a/config/cmdline/cmdline.go +++ b/config/cmdline/cmdline.go @@ -126,7 +126,7 @@ func UnmarshalOrReturnString(value string) (result interface{}) { return } -//splitCmdLine splits on spaces except when a space is within a quoted or bracketed string. +// splitCmdLine splits on spaces except when a space is within a quoted or bracketed string. func splitCmdLine(cmdLine string) []string { lastRune := rune(0) f := func(c rune) bool { diff --git a/pkg/init/one/one.go b/pkg/init/one/one.go index 14f665c0..ab6c6802 100644 --- a/pkg/init/one/one.go +++ b/pkg/init/one/one.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package one diff --git a/pkg/init/selinux/selinux.go b/pkg/init/selinux/selinux.go index 869e523d..7ea48faf 100644 --- a/pkg/init/selinux/selinux.go +++ b/pkg/init/selinux/selinux.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package selinux diff --git a/pkg/log/log.go b/pkg/log/log.go index 0ab9ad3f..22813ce2 100644 --- a/pkg/log/log.go +++ b/pkg/log/log.go @@ -184,7 +184,8 @@ func innerInit(deferedHook bool) { // init.Main can't read /proc/cmdline at start. // and then fails due to the network not being up // TODO: create a "defered SyslogHook that always gets initialised, but if it fails to connect, stores the logs -// and retries connecting every time its triggered.... +// +// and retries connecting every time its triggered.... func AddRSyslogHook() { val := cmdline.GetCmdline("netconsole") netconsole := val.(string) diff --git a/pkg/util/cutil.go b/pkg/util/cutil.go index afea273b..72175835 100644 --- a/pkg/util/cutil.go +++ b/pkg/util/cutil.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package util diff --git a/pkg/util/term.go b/pkg/util/term.go index e196a037..866cff7e 100644 --- a/pkg/util/term.go +++ b/pkg/util/term.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package util diff --git a/pkg/util/util_linux.go b/pkg/util/util_linux.go index f8be7de5..9703c111 100644 --- a/pkg/util/util_linux.go +++ b/pkg/util/util_linux.go @@ -1,3 +1,4 @@ +//go:build linux // +build linux package util diff --git a/scripts/global.cfg b/scripts/global.cfg index e215c3ec..3548584e 100755 --- a/scripts/global.cfg +++ b/scripts/global.cfg @@ -1 +1 @@ -APPEND rancher.autologin=tty1 rancher.autologin=ttyS0 rancher.autologin=ttyS1 console=tty1 console=ttyS0 console=ttyS1 printk.devkmsg=on transparent_hugepage=never scsi_mod.use_blk_mq=1 panic=10 ${APPEND} +APPEND rancher.autologin=tty1 rancher.autologin=ttyS0 rancher.autologin=ttyS1 console=tty1 console=ttyS0 console=ttyS1 printk.devkmsg=on transparent_hugepage=never scsi_mod.use_blk_mq=1 ${APPEND} diff --git a/scripts/isolinux_label.cfg b/scripts/isolinux_label.cfg index c72c578e..3ce3b4c6 100644 --- a/scripts/isolinux_label.cfg +++ b/scripts/isolinux_label.cfg @@ -12,14 +12,14 @@ LABEL rancheros-${LABEL}-autologin MENU LABEL Autologin on tty1 and ttyS0 MENU INDENT 2 COM32 cmd.c32 - APPEND rancheros-${LABEL} rancher.autologin=tty1 rancher.autologin=ttyS0 + APPEND rancheros-${LABEL} panic=10 rancher.autologin=tty1 rancher.autologin=ttyS0 LABEL rancheros-${LABEL}-debug SAY rancheros-${LABEL}-debug: debug BurmillaOS ${VERSION} ${KERNEL_VERSION} MENU LABEL Debug logging MENU INDENT 2 COM32 cmd.c32 - APPEND rancheros-${LABEL} rancher.debug=true + APPEND rancheros-${LABEL} rancher.debug=true vga=ask LABEL rancheros-${LABEL}-debug-autologin SAY rancheros-${LABEL}-debug-autolgin: debug and autologin BurmillaOS ${VERSION} ${KERNEL_VERSION} diff --git a/scripts/layout-initrd b/scripts/layout-initrd index ccdbde55..6071ea1f 100755 --- a/scripts/layout-initrd +++ b/scripts/layout-initrd @@ -32,6 +32,8 @@ ln -s usr/sbin ${INITRD_DIR}/sbin curl -SL ${!SYSTEM_DOCKER_URL} | tar --strip-components=1 -xzvf - -C ${INITRD_DIR}/usr/bin/ # we have diabled the user-proxy so we get rid of system-docker-proxy rm -f ${INITRD_DIR}/usr/bin/system-docker-proxy +# reduce size by removing debugging tool system-docker-containerd-ctr +rm -f ${INITRD_DIR}/usr/bin/system-docker-containerd-ctr cat < ${INITRD_DIR}/usr/share/ros/os-release NAME="BurmillaOS"