From c2fa148bc5d13066becad653ad23f96635270caf Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Thu, 18 Jan 2024 16:27:33 -0600 Subject: [PATCH] Be compliant with the current state of the deb822 Ubuntu implementation specification. --- common/modules/automirror/main.py | 61 +++++++++++++++----------- debian/changelog | 7 +++ lubuntu/modules/pkgselect_context.conf | 1 - 3 files changed, 43 insertions(+), 26 deletions(-) diff --git a/common/modules/automirror/main.py b/common/modules/automirror/main.py index db8e52a..f0ff5da 100644 --- a/common/modules/automirror/main.py +++ b/common/modules/automirror/main.py @@ -38,34 +38,51 @@ def get_sources_template(): return """# Automatically generated by Calamares on {date}. # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of {distro}. - +## Ubuntu distribution repository +## +## The following settings can be adjusted to configure which packages to use from Ubuntu. +## Mirror your choices (except for URIs and Suites) in the security section below to +## ensure timely security updates. +## +## Types: Append deb-src to enable the fetching of source package. +## URIs: A URL to the repository (you may add multiple URLs) +## Suites: The following additional suites can be configured +## -updates - Major bug fix updates produced after the final release of the +## distribution. +## -backports - software from this repository may not have been tested as +## extensively as that contained in the main release, although it includes +## newer versions of some applications which may provide useful features. +## Also, please note that software in backports WILL NOT receive any review +## or updates from the Ubuntu security team. +## Components: Aside from main, the following components can be added to the list +## restricted - Software that may not be under a free license, or protected by patents. +## universe - Community maintained packages. +## Software from this repository is only maintained and supported by Canonical +## for machines with Ubuntu Pro subscriptions. Without Ubuntu Pro, the Ubuntu +## community provides best-effort security maintenance. +## multiverse - Community maintained of restricted. Software from this repository is +## ENTIRELY UNSUPPORTED by the Ubuntu team, and may not be under a free +## licence. Please satisfy yourself as to your rights to use the software. +## Also, please note that software in multiverse WILL NOT receive any +## review or updates from the Ubuntu security team. +## +## See the sources.list(5) manual page for further settings. Types: deb URIs: {url} -Suites: {codename} {codename}-updates -Components: main universe +Suites: {codename} {codename}-updates {codename}-backports +Components: main universe restricted multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg -""" - -def get_sec_sources_template(): - return """Types: deb -URIs: http://security.ubuntu.com/ubuntu +## Ubuntu security updates. Aside from URIs and Suites, +## this should mirror your choices in the previous section. +Types: deb +URIs: http://security.ubuntu.com/ubuntu/ Suites: {codename}-security -Components: main universe +Components: main universe restricted multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg """ -def get_restricted_sources_template(): - return """Types: deb -URIs: {url} -Suites: {codename} {codename}-updates -Components: restricted multiverse -Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg -Enabled: no -""" - - def get_country_code(): if not libcalamares.globalstorage.value("hasInternet"): return "" @@ -103,12 +120,6 @@ def run(): sources = get_sources_template().format(date=strftime("%Y-%m-%d"), distro=libcalamares.job.configuration["distribution"], url=base_url, codename=codename) write_file(f"{root_mount_point}/etc/apt/sources.list.d/ubuntu.sources", sources) - sec_sources = get_sec_sources_template().format(codename=codename) - write_file(f"{root_mount_point}/etc/apt/sources.list.d/ubuntu_security.sources", sec_sources) - - restricted_sources = get_restricted_sources_template().format(url=base_url, codename=codename) - write_file(f"{root_mount_point}/etc/apt/sources.list.d/ubuntu_nonfree.sources", restricted_sources) - remove(f"{root_mount_point}/etc/apt/sources.list") libcalamares.globalstorage.insert("mirrorURL", base_url) diff --git a/debian/changelog b/debian/changelog index 5fc3484..25b53b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +calamares-settings-ubuntu (1:24.04.12) UNRELEASED; urgency=medium + + * Be compliant with the current state of the deb822 Ubuntu implementation + specification. + + -- Simon Quigley Thu, 18 Jan 2024 16:26:50 -0600 + calamares-settings-ubuntu (1:24.04.11) noble; urgency=medium * Update welcome slide for Noble. diff --git a/lubuntu/modules/pkgselect_context.conf b/lubuntu/modules/pkgselect_context.conf index e70b7b3..c9bc096 100644 --- a/lubuntu/modules/pkgselect_context.conf +++ b/lubuntu/modules/pkgselect_context.conf @@ -7,7 +7,6 @@ timeout: 300 - "apt-get -y autoremove" "packages.restrictedExtras": true: - - "sed -i 's/Enabled: no/Enabled: yes/g' /etc/apt/sources.list.d/ubuntu_nonfree.sources" - "apt-get update" - "apt-get -y install ubuntu-restricted-addons unrar" "packages.updateNow":