mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-07 08:51:50 +00:00
Imported 2.740
No reason for CPC update specified.
This commit is contained in:
parent
426e3be14e
commit
f15ab7433b
18
debian/changelog
vendored
18
debian/changelog
vendored
@ -1,3 +1,21 @@
|
|||||||
|
livecd-rootfs (2.740) impish; urgency=medium
|
||||||
|
|
||||||
|
[ Thomas Bechtold ]
|
||||||
|
* magic-proxy: fix TypeError when trying to call get_uri() LP:#1944906
|
||||||
|
|
||||||
|
-- Steve Langasek <steve.langasek@ubuntu.com> Mon, 27 Sep 2021 08:38:00 -0700
|
||||||
|
|
||||||
|
livecd-rootfs (2.739) impish; urgency=medium
|
||||||
|
|
||||||
|
[ Daniel Bungert ]
|
||||||
|
* Correct the 'type' in the source catalog entries for the desktop ISOs.
|
||||||
|
|
||||||
|
[ Michael Hudson-Doyle ]
|
||||||
|
* Record information about locale support (in particular, whether to install
|
||||||
|
langpacks and which languages have pre-baked squashfses).
|
||||||
|
|
||||||
|
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Mon, 27 Sep 2021 11:10:46 +1300
|
||||||
|
|
||||||
livecd-rootfs (2.738) impish; urgency=medium
|
livecd-rootfs (2.738) impish; urgency=medium
|
||||||
|
|
||||||
[ Thomas Bechtold ]
|
[ Thomas Bechtold ]
|
||||||
|
@ -204,12 +204,28 @@ add_snap ()
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_seeded_languages () {
|
||||||
|
# We assume any seed name of the form ${no_lang_seed}-${foo} where
|
||||||
|
# ${foo} is only two or three characters long is a default language
|
||||||
|
# seed.
|
||||||
|
langs=''
|
||||||
|
for no_lang_seed in "$@"; do
|
||||||
|
seed_regex="${no_lang_seed}"'-[^-.]{2,3}$'
|
||||||
|
for seed in $(ls config/germinate-output | grep -E "${seed_regex}"); do
|
||||||
|
lang=$(echo "${seed}" | grep -oE '[^-.]{2,3}$')
|
||||||
|
langs="$langs $lang"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
echo $langs | tr ' ' '\n' | sort -u | tr '\n' ' '
|
||||||
|
}
|
||||||
|
|
||||||
derive_language_layers () {
|
derive_language_layers () {
|
||||||
# create special layers for each default language
|
# create special layers for each default language
|
||||||
#
|
#
|
||||||
# $1 base pass
|
# $1 base pass
|
||||||
# $2 base seed (without any languages)
|
# $2 base seed (without any languages)
|
||||||
# $3 default language seed
|
# $3 default language seed
|
||||||
|
# $4 space separated list of default languages
|
||||||
# e.g.:
|
# e.g.:
|
||||||
# derive_language_layers minimal desktop-minimal desktop-minimal-default-languages
|
# derive_language_layers minimal desktop-minimal desktop-minimal-default-languages
|
||||||
# derive_language_layers minimal.standard desktop desktop-default-languages
|
# derive_language_layers minimal.standard desktop desktop-default-languages
|
||||||
@ -243,29 +259,26 @@ derive_language_layers () {
|
|||||||
# support for all languages from the base layer. We also create a
|
# support for all languages from the base layer. We also create a
|
||||||
# layer than has support for all languages removed, which can be used
|
# layer than has support for all languages removed, which can be used
|
||||||
# for the base of an install for a non-default language.
|
# for the base of an install for a non-default language.
|
||||||
local pass base_pass=$1 no_lang_seed=$2 def_lang_seed=$3
|
local pass base_pass=$1 no_lang_seed=$2 def_lang_seed=$3 langs=$4
|
||||||
_check_immutable_passes_to_layers
|
_check_immutable_passes_to_layers
|
||||||
_check_layers_only_API "derive_language_layers"
|
_check_layers_only_API "derive_language_layers"
|
||||||
|
|
||||||
pass=$base_pass.no-languages
|
for lang in $langs; do
|
||||||
_register_pass ${pass}
|
pass="${base_pass}.${lang}"
|
||||||
# Remove all packages from the default language seed that are not in
|
|
||||||
# the no_lang_seed from the no-languages layer.
|
|
||||||
subtract_package_lists ${def_lang_seed} ${no_lang_seed} >> config/package-lists/livecd-rootfs.removal-list.chroot_${pass}
|
|
||||||
|
|
||||||
# We assume any seed name of the form ${no_lang_seed}-${foo} where
|
|
||||||
# ${foo} is only two or three characters long is a default language
|
|
||||||
# seed.
|
|
||||||
seed_regex="${no_lang_seed}"'-[^-.]{2,3}$'
|
|
||||||
|
|
||||||
for seed in $(ls config/germinate-output | grep -E "${seed_regex}"); do
|
|
||||||
lang=$(echo "${seed}" | grep -oE '[^-.]{2,3}$')
|
|
||||||
pass="${1}.${lang}"
|
|
||||||
_register_pass ${pass}
|
_register_pass ${pass}
|
||||||
# Remove packages from the default language seed that are not
|
# Remove packages from the default language seed that are not
|
||||||
# in the language specific seed from the language specific layer.
|
# in the language specific seed from the language specific layer.
|
||||||
subtract_package_lists ${def_lang_seed} ${seed} >> config/package-lists/livecd-rootfs.removal-list.chroot_$pass
|
# I find this expression helps a little to make this make sense:
|
||||||
|
# ((base) + (en fr de)) - ( (en fr de) - (fr)) == (base + fr)
|
||||||
|
# `layer will all langs' `def_lang_seed' `lang' `what we want to install'
|
||||||
|
subtract_package_lists ${def_lang_seed} ${no_lang_seed}-${lang} >> config/package-lists/livecd-rootfs.removal-list.chroot_$pass
|
||||||
done
|
done
|
||||||
|
|
||||||
|
no_lang_pass=$base_pass.no-languages
|
||||||
|
_register_pass ${no_lang_pass}
|
||||||
|
# Remove all packages from the default language seed that are not in
|
||||||
|
# the no_lang_seed from the no-languages layer.
|
||||||
|
subtract_package_lists ${def_lang_seed} ${no_lang_seed} >> config/package-lists/livecd-rootfs.removal-list.chroot_${no_lang_pass}
|
||||||
}
|
}
|
||||||
|
|
||||||
add_chroot_hook ()
|
add_chroot_hook ()
|
||||||
@ -650,23 +663,27 @@ case $PROJECT in
|
|||||||
remove_package minimal.standard.live ubiquity-frontend-gtk
|
remove_package minimal.standard.live ubiquity-frontend-gtk
|
||||||
add_snap minimal.standard.live ubuntu-desktop-installer/classic
|
add_snap minimal.standard.live ubuntu-desktop-installer/classic
|
||||||
|
|
||||||
derive_language_layers minimal desktop-minimal desktop-minimal-default-languages
|
seeded_langs="$(get_seeded_languages desktop-minimal desktop)"
|
||||||
derive_language_layers minimal.standard desktop desktop-default-languages
|
echo "$seeded_langs" | tr ' ' ',' > config/seeded-languages
|
||||||
|
derive_language_layers minimal desktop-minimal desktop-minimal-default-languages "$seeded_langs"
|
||||||
|
derive_language_layers minimal.standard desktop desktop-default-languages "$seeded_langs"
|
||||||
cat <<-EOF > config/minimal.catalog-in.yaml
|
cat <<-EOF > config/minimal.catalog-in.yaml
|
||||||
name: "Ubuntu Desktop (minimized)"
|
name: "Ubuntu Desktop (minimized)"
|
||||||
description: >-
|
description: >-
|
||||||
A minimal but usable Ubuntu Desktop.
|
A minimal but usable Ubuntu Desktop.
|
||||||
id: ubuntu-desktop-minimal
|
id: ubuntu-desktop-minimal
|
||||||
type: fsimage
|
type: fsimage-layered
|
||||||
variant: desktop
|
variant: desktop
|
||||||
|
locale_support: langpack
|
||||||
EOF
|
EOF
|
||||||
cat <<-EOF > config/minimal.standard.catalog-in.yaml
|
cat <<-EOF > config/minimal.standard.catalog-in.yaml
|
||||||
name: "Ubuntu Desktop"
|
name: "Ubuntu Desktop"
|
||||||
description: >-
|
description: >-
|
||||||
A full featured Ubuntu Desktop.
|
A full featured Ubuntu Desktop.
|
||||||
id: ubuntu-desktop
|
id: ubuntu-desktop
|
||||||
type: fsimage
|
type: fsimage-layered
|
||||||
variant: desktop
|
variant: desktop
|
||||||
|
locale_support: langpack
|
||||||
default: yes
|
default: yes
|
||||||
EOF
|
EOF
|
||||||
/usr/share/livecd-rootfs/checkout-translations-branch \
|
/usr/share/livecd-rootfs/checkout-translations-branch \
|
||||||
|
@ -141,10 +141,14 @@ build_layered_squashfs () {
|
|||||||
|
|
||||||
if [ -f config/$pass.catalog-in.yaml ]; then
|
if [ -f config/$pass.catalog-in.yaml ]; then
|
||||||
echo "Expanding catalog entry template for $pass"
|
echo "Expanding catalog entry template for $pass"
|
||||||
/usr/share/livecd-rootfs/update-source-catalog --output livecd.${PROJECT}.install-sources.yaml \
|
usc_opts="--output livecd.${PROJECT}.install-sources.yaml \
|
||||||
--template config/$pass.catalog-in.yaml \
|
--template config/$pass.catalog-in.yaml \
|
||||||
--size $(du -B 1 -s chroot/ | cut -f1) --squashfs ${pass}.squashfs \
|
--size $(du -B 1 -s chroot/ | cut -f1) --squashfs ${pass}.squashfs \
|
||||||
--translations config/catalog-translations
|
--translations config/catalog-translations"
|
||||||
|
if [ -f config/seeded-languages ]; then
|
||||||
|
usc_opts="$usc_opts --langs $(cat config/seeded-languages)"
|
||||||
|
fi
|
||||||
|
/usr/share/livecd-rootfs/update-source-catalog $usc_opts
|
||||||
else
|
else
|
||||||
echo "No catalog entry template for $pass"
|
echo "No catalog entry template for $pass"
|
||||||
fi
|
fi
|
||||||
|
@ -5,3 +5,4 @@ description: >-
|
|||||||
id: ubuntu-server-minimal
|
id: ubuntu-server-minimal
|
||||||
type: fsimage
|
type: fsimage
|
||||||
variant: server
|
variant: server
|
||||||
|
locale_support: none
|
||||||
|
@ -6,3 +6,4 @@ id: ubuntu-server
|
|||||||
default: yes
|
default: yes
|
||||||
type: fsimage-layered
|
type: fsimage-layered
|
||||||
variant: server
|
variant: server
|
||||||
|
locale_support: locale-only
|
||||||
|
@ -814,8 +814,14 @@ class ProxyingHTTPRequestHandler(http.server.BaseHTTPRequestHandler):
|
|||||||
It is important to understand that there is no status 3xx HTTP redirect
|
It is important to understand that there is no status 3xx HTTP redirect
|
||||||
happening here, the client does not know that what it receives is not
|
happening here, the client does not know that what it receives is not
|
||||||
exactly what it requested."""
|
exactly what it requested."""
|
||||||
|
host = self.headers.get("host")
|
||||||
|
|
||||||
|
# the host does not start with http(s):// which result in urlparse
|
||||||
|
# to not detect the host & path correctly (LP:#1944906)
|
||||||
|
if not host.startswith("http"):
|
||||||
|
host = "http://{}".format(host)
|
||||||
|
uri = host + self.path
|
||||||
|
|
||||||
uri = self.headers.get("host") + self.path
|
|
||||||
parsed = urllib.parse.urlparse(uri)
|
parsed = urllib.parse.urlparse(uri)
|
||||||
|
|
||||||
self.sanitize_requestline()
|
self.sanitize_requestline()
|
||||||
|
@ -13,6 +13,7 @@ parser.add_argument('--size', required=True)
|
|||||||
parser.add_argument('--squashfs', required=True)
|
parser.add_argument('--squashfs', required=True)
|
||||||
parser.add_argument('--translations', required=True)
|
parser.add_argument('--translations', required=True)
|
||||||
parser.add_argument('--template', required=True)
|
parser.add_argument('--template', required=True)
|
||||||
|
parser.add_argument('--langs', default=None)
|
||||||
|
|
||||||
opts = parser.parse_args(sys.argv[1:])
|
opts = parser.parse_args(sys.argv[1:])
|
||||||
|
|
||||||
@ -47,6 +48,8 @@ for mo in glob.glob(os.path.join(opts.translations, '*.mo')):
|
|||||||
if t_description != en_description:
|
if t_description != en_description:
|
||||||
lang = os.path.splitext(os.path.basedescription(mo))[0]
|
lang = os.path.splitext(os.path.basedescription(mo))[0]
|
||||||
template['description'][lang] = t_description
|
template['description'][lang] = t_description
|
||||||
|
if opts.langs is not None:
|
||||||
|
template['preinstalled_langs'] = opts.langs.split(',')
|
||||||
|
|
||||||
output.append(template)
|
output.append(template)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user