mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-04 19:56:32 +02:00
2411.99.0
This commit is contained in:
parent
f7087eebc7
commit
63b20552cb
@ -39,12 +39,12 @@ disabled = true
|
||||
[coreos]
|
||||
location = /var/lib/portage/coreos-overlay
|
||||
sync-type = git
|
||||
sync-uri = https://github.com/coreos/coreos-overlay.git
|
||||
sync-uri = https://github.com/flatcar-linux/coreos-overlay.git
|
||||
|
||||
[portage-stable]
|
||||
location = /var/lib/portage/portage-stable
|
||||
sync-type = git
|
||||
sync-uri = https://github.com/coreos/portage-stable.git
|
||||
sync-uri = https://github.com/flatcar-linux/portage-stable.git
|
||||
EOF
|
||||
|
||||
# Now set the correct profile
|
||||
|
||||
@ -11,6 +11,7 @@ import re
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import time
|
||||
import uuid
|
||||
|
||||
# First sector we can use.
|
||||
@ -433,11 +434,22 @@ def FormatFat(part, device):
|
||||
def PartitionLoop(options, partition):
|
||||
"""Allocate (and automatically free) loop devices for a partition."""
|
||||
|
||||
loop_dev = subprocess.check_output(['sudo', 'losetup',
|
||||
'--offset', str(partition['first_byte']),
|
||||
'--sizelimit', str(partition['bytes']),
|
||||
'--find', '--show', options.disk_image])
|
||||
loop_dev = loop_dev.strip()
|
||||
for i in range(0,5):
|
||||
try:
|
||||
loop_dev = subprocess.check_output(['sudo', 'losetup',
|
||||
'--offset', str(partition['first_byte']),
|
||||
'--sizelimit', str(partition['bytes']),
|
||||
'--find', '--show', options.disk_image])
|
||||
loop_dev = loop_dev.strip()
|
||||
err = None
|
||||
break
|
||||
except subprocess.CalledProcessError as error:
|
||||
print("Failed to set up loopback, attempt %d" % i)
|
||||
err = error
|
||||
time.sleep(5)
|
||||
|
||||
if err is not None:
|
||||
raise err
|
||||
|
||||
try:
|
||||
yield loop_dev
|
||||
@ -586,9 +598,22 @@ def Mount(options):
|
||||
mount_opts.append('subvol=%s' % mount['fs_subvolume'])
|
||||
|
||||
Sudo(['mkdir', '-p', full_path])
|
||||
Sudo(['mount', '-t', mount.get('fs_type', 'auto'),
|
||||
'-o', ','.join(mount_opts),
|
||||
options.disk_image, full_path])
|
||||
# This tends to fail, retry if it does
|
||||
err = None
|
||||
for i in range(0,5):
|
||||
try:
|
||||
Sudo(['mount', '-t', mount.get('fs_type', 'auto'),
|
||||
'-o', ','.join(mount_opts),
|
||||
options.disk_image, full_path])
|
||||
err = None
|
||||
break
|
||||
except subprocess.CalledProcessError as e:
|
||||
print("Error mounting %s, attempt %d" % (full_path, i))
|
||||
err = e
|
||||
time.sleep(5)
|
||||
|
||||
if err is not None:
|
||||
raise err
|
||||
|
||||
for src, dst in mount.get('binds', {}).iteritems():
|
||||
# src may be relative or absolute, os.path.join handles this.
|
||||
|
||||
@ -31,12 +31,7 @@ OS_ID="flatcar"
|
||||
OS_ID_LIKE="coreos"
|
||||
OS_PRETTY_NAME="$OS_NAME $FLATCAR_VERSION (${OS_CODENAME})"
|
||||
|
||||
# temporarily point arm at a different appid until update support
|
||||
# is completed in update_engine and the CoreUpdate service.
|
||||
FLATCAR_APPID="{e96281a6-d1af-4bde-9a0a-97b76e56dc57}"
|
||||
if [[ "${FLAGS_board}" == arm64-* ]]; then
|
||||
FLATCAR_APPID="{103867da-e3a2-4c92-b0b3-7fbd7f7d8b71}"
|
||||
fi
|
||||
|
||||
# DISTRIB_* are the standard lsb-release names
|
||||
sudo mkdir -p "${ROOT_FS_DIR}/usr/share/flatcar" "${ROOT_FS_DIR}/etc/flatcar"
|
||||
|
||||
@ -8,6 +8,7 @@ GLSA_WHITELIST=(
|
||||
201909-01 # perl
|
||||
201909-08 # dbus
|
||||
201904-13 # git
|
||||
201911-01 # package too old to even have the affected USE flag
|
||||
)
|
||||
|
||||
glsa_image() {
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
|
||||
set -eux
|
||||
|
||||
declare -A APPID
|
||||
APPID[amd64-usr]=e96281a6-d1af-4bde-9a0a-97b76e56dc57
|
||||
APPID[arm64-usr]=103867da-e3a2-4c92-b0b3-7fbd7f7d8b71
|
||||
APPID=e96281a6-d1af-4bde-9a0a-97b76e56dc57
|
||||
|
||||
declare -A RELEASE_CHANNEL
|
||||
RELEASE_CHANNEL[alpha]=Alpha
|
||||
@ -92,7 +90,7 @@ upload() {
|
||||
"$(dirname $0)/../core_roller_upload" \
|
||||
--user="${ROLLER_USERNAME}" \
|
||||
--api_key="${ROLLER_API_KEY}" \
|
||||
--app_id="${APPID[${board}]}" \
|
||||
--app_id="${APPID}" \
|
||||
--board="${board}" \
|
||||
--version="${version}" \
|
||||
--payload="${payload}"
|
||||
@ -111,7 +109,7 @@ upload() {
|
||||
--user="${ROLLER_USERNAME}" \
|
||||
--key="${ROLLER_API_KEY}" \
|
||||
channel update \
|
||||
--app-id="${APPID[${board}]}" \
|
||||
--app-id="${APPID}" \
|
||||
--channel="${canary_channel}" \
|
||||
--version="${version}"
|
||||
fi
|
||||
@ -130,7 +128,7 @@ ready() {
|
||||
--user="${ROLLER_USERNAME}" \
|
||||
--key="${ROLLER_API_KEY}" \
|
||||
group percent \
|
||||
--app-id="${APPID[${board}]}" \
|
||||
--app-id="${APPID}" \
|
||||
--group-id="${channel}" \
|
||||
--update-percent=0
|
||||
|
||||
@ -141,7 +139,7 @@ ready() {
|
||||
--user="${ROLLER_USERNAME}" \
|
||||
--key="${ROLLER_API_KEY}" \
|
||||
channel update \
|
||||
--app-id="${APPID[${board}]}" \
|
||||
--app-id="${APPID}" \
|
||||
--channel="${RELEASE_CHANNEL[${channel}]}" \
|
||||
--publish=true \
|
||||
--version="${version}"
|
||||
@ -162,7 +160,7 @@ roll() {
|
||||
--user="${ROLLER_USERNAME}" \
|
||||
--key="${ROLLER_API_KEY}" \
|
||||
group percent \
|
||||
--app-id="${APPID[${board}]}" \
|
||||
--app-id="${APPID}" \
|
||||
--group-id="${channel}" \
|
||||
--update-percent=100
|
||||
else
|
||||
@ -174,7 +172,7 @@ roll() {
|
||||
--user="${ROLLER_USERNAME}" \
|
||||
--key="${ROLLER_API_KEY}" \
|
||||
rollout create linear \
|
||||
--app-id="${APPID[${board}]}" \
|
||||
--app-id="${APPID}" \
|
||||
--group-id="${channel}" \
|
||||
--duration="${seconds}" \
|
||||
--frame-size="60"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user