Imported 2.735

No reason for CPC update specified.
impish
CloudBuilder 3 years ago
parent 89b46be770
commit 63c3ddfa47

@ -0,0 +1,23 @@
#!/bin/sh
set -eux
branch=$1
dir=$2
target="$(readlink -f "${3}")"
tmpdir="$(mktemp -d)"
cd "${tmpdir}"
cleanup () {
rm -rf "${tmpdir}"
}
trap cleanup EXIT
mkdir -p $target
git clone $branch checkout
for po in checkout/$dir/*.po; do
msgfmt "${po}" -o "${target}/$(basename "${po}" .po).mo"
done

16
debian/changelog vendored

@ -1,3 +1,19 @@
livecd-rootfs (2.735) impish; urgency=medium
* Get source catalog translations from subiquity git, as brz is in universe.
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 23 Aug 2021 15:42:33 +1200
livecd-rootfs (2.734) impish; urgency=medium
[ Ethan Hsieh ]
* Download snap packages with correct architecture.
[ Michael Hudson-Doyle ]
* Create source catalogs for the installable live server layers.
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Thu, 19 Aug 2021 16:49:26 +1200
livecd-rootfs (2.733) impish; urgency=medium
[ Michael Hudson-Doyle ]

1
debian/control vendored

@ -18,6 +18,7 @@ Depends: ${misc:Depends},
gdisk,
genisoimage,
germinate (>= 1.25.1),
gettext,
git,
gnupg,
grep-dctrl,

2
debian/install vendored

@ -4,3 +4,5 @@ get-ppa-fingerprint usr/share/livecd-rootfs
minimize-manual usr/share/livecd-rootfs
magic-proxy usr/share/livecd-rootfs
lp-in-release usr/share/livecd-rootfs
checkout-translations-branch usr/share/livecd-rootfs
update-source-catalog usr/share/livecd-rootfs

@ -810,6 +810,9 @@ case $PROJECT in
add_package ubuntu-server-minimal.ubuntu-server.installer.$flavor $kernel_metapkg
LIVE_PASSES="${LIVE_PASSES:+$LIVE_PASSES }ubuntu-server-minimal.ubuntu-server.installer.$flavor"
done
/usr/share/livecd-rootfs/checkout-translations-branch \
https://git.launchpad.net/subiquity po config/catalog-translations
;;
*)
echo "unrecognized subproject for server: '$SUBPROJECT'"

@ -548,7 +548,7 @@ _snap_preseed() {
sh -c "
set -x;
cd \"$CHROOT_ROOT/var/lib/snapd/seed\";
SNAPPY_STORE_NO_CDN=1 snap download \
UBUNTU_STORE_ARCH=${ARCH:-} SNAPPY_STORE_NO_CDN=1 snap download \
--cohort="${COHORT_KEY:-}" \
--channel=\"$CHANNEL\" \"$SNAP_NAME\"" || snap_download_failed=1
if [ $snap_download_failed = 1 ] ; then

@ -138,6 +138,16 @@ build_layered_squashfs () {
fi
create_squashfs "overlay.${pass}/" ${squashfs_f}
if [ -f config/$pass.catalog-in.yaml ]; then
echo "Expanding catalog entry template for $pass"
/usr/share/livecd-rootfs/update-source-catalog --output livecd.${PROJECT}.install-sources.yaml \
--template config/$pass.catalog-in.yaml \
--size $(du -B 1 -s chroot/ | cut -f1) --squashfs ${pass}.squashfs \
--translations config/catalog-translations
else
echo "No catalog entry template for $pass"
fi
fi
if [ -n "$lowerdirs" ]; then

@ -0,0 +1,7 @@
name: "Ubuntu Server (minimized)"
description: >-
This version has been customized to have a small runtime footprint
in environments where humans are not expected to log in.
id: ubuntu-server-minimal
type: fsimage
variant: server

@ -0,0 +1,8 @@
name: "Ubuntu Server"
description: >-
The default install contains a curated set of packages that provide
a comfortable experience for operating your server.
id: ubuntu-server
default: yes
type: fsimage-layered
variant: server

@ -0,0 +1,65 @@
#!/usr/bin/python3
import argparse
import gettext
import glob
import os
import sys
import yaml
parser = argparse.ArgumentParser()
parser.add_argument('--output', required=True)
parser.add_argument('--size', required=True)
parser.add_argument('--squashfs', required=True)
parser.add_argument('--translations', required=True)
parser.add_argument('--template', required=True)
opts = parser.parse_args(sys.argv[1:])
if os.path.exists(opts.output):
with open(opts.output) as fp:
output = yaml.safe_load(fp)
else:
output = []
with open(opts.template) as fp:
template = yaml.safe_load(fp)
template['size'] = int(opts.size)
template['path'] = opts.squashfs
en_name = template['name']
en_description = template['description']
template['name'] = {'en': en_name}
template['description'] = {'en': en_description}
for mo in glob.glob(os.path.join(opts.translations, '*.mo')):
with open(mo, 'rb') as fp:
t = gettext.GNUTranslations(fp=fp)
t_name = t.gettext(en_name)
if t_name != en_name:
lang = os.path.splitext(os.path.basename(mo))[0]
template['name'][lang] = t_name
t_description = t.gettext(en_description)
if t_description != en_description:
lang = os.path.splitext(os.path.basedescription(mo))[0]
template['description'][lang] = t_description
output.append(template)
default_count = 0
for entry in output:
if entry.get('default', False):
default_count += 1
if default_count > 1:
print("Too many defaults in source catalog!")
sys.exit(1)
with open(opts.output, 'w') as fp:
yaml.dump(output, fp)
Loading…
Cancel
Save