Clean up Calamares settings.

Summary:
This resolves T107

Refactor automirror

Add donate button url and geoip to welcome

Adjust locale.conf geoip format

Set default filesystem type and no user swap choices

Add defaults to settings to eliminate warnings

Add efi mount options to fstab.conf

Set restart mode in finished.conf to new style

Set bootloader entry name to Ubuntu and slideshowAPI to 1

Test Plan:
Test Calamares installation for proper location detection.

Test Calamares installation for proper efi mount.

Test Calamares installation for proper bootloader entry.

Reviewers: tsimonq2, wxl, apt-ghetto

Reviewed By: tsimonq2, wxl

Subscribers: apt-ghetto

Maniphest Tasks: T107

Differential Revision: https://phab.lubuntu.me/D33
ubuntu/focal ubuntu/19.10.4
Dan Simmons 5 years ago committed by Walter Lapchynski
parent 1a4f60968a
commit cd7fa92d15

@ -5,7 +5,6 @@
all: all:
# Desktop file # Desktop file
(cd lubuntu/po/ && make) (cd lubuntu/po/ && make)
chmod +x lubuntu/*.desktop
# Slideshow # Slideshow
(cd lubuntu/branding/lubuntu/lang/ && make) (cd lubuntu/branding/lubuntu/lang/ && make)
# Get rid of the unnecessary files # Get rid of the unnecessary files

@ -5,7 +5,9 @@
baseUrl: archive.ubuntu.com baseUrl: archive.ubuntu.com
# URL used for IP address lookup # URL used for IP address lookup
geoIpUrl: https://ipapi.co/json geoip:
style: "json"
url: "https://ipapi.co/json"
# Distribution that this is based off of. # Distribution that this is based off of.
# This is so we can make safe assumptions for the contents of # This is so we can make safe assumptions for the contents of

@ -106,13 +106,13 @@ def getcountrycode():
an empty string. an empty string.
""" """
if libcalamares.globalstorage.value("hasInternet"): if libcalamares.globalstorage.value("hasInternet"):
geoipurl = libcalamares.job.configuration["geoIpUrl"] geoipurl = libcalamares.job.configuration["geoip"]["url"]
try: try:
with urllib.request.urlopen(geoipurl, timeout=75) as url: with urllib.request.urlopen(geoipurl, timeout=75) as url:
localedata = json.loads(url.read().decode()) localedata = json.loads(url.read().decode())
except HTTPError as error: except HTTPError as error:
logging.error("Data of %s not retrieved because %s - URL: %s", logging.error("Data not retrieved because %s - URL: %s",
name, error, url) error, url)
except URLError as error: except URLError as error:
if isinstance(error.reason, socket.timeout): if isinstance(error.reason, socket.timeout):
logging.error("Socket timed out - URL %s", url) logging.error("Socket timed out - URL %s", url)

@ -0,0 +1,3 @@
# The .desktop file uses bash to run firefox as the local
# user. bash is included in the system.
calamares-settings-lubuntu: desktop-command-not-in-package usr/share/applications/lubuntu-calamares.desktop bash

38
debian/changelog vendored

@ -1,3 +1,41 @@
calamares-settings-ubuntu (1:19.10.4) eoan; urgency=medium
[ Dan Simmons ]
* Bump Standards-Version to 4.4.0, no changes needed.
* Bump debhelper to 12, no changes needed.
* Adjust automirror config to new style. Change automirror module
to allow for new config style.
* Add setting for donate button in welcome.
* Add geoip for welcome.
* Adjust locale.conf to new geoip style.
* Set userSwapChoices to none in partition.conf.
* Set defaultFileSystemType to "ext4" in partition.conf.
* Set default dont-chroot, oem-setup, disable-cancel, to
eliminate warnings from settings.conf.
* Add efiMountOptions: umask=0077 to fstab.conf.
* Set restart mode to new style in finished.conf.
* Set bootloader entry name to Ubuntu.
* Set slide show API to 1 to eliminate warnings.
* Fix lintian errors and warnings.
- Add depends for python3 in calamares-settings-ubuntu-common.
- Adjust depends for calamares-settings-lubuntu.
- Add further description to extended description for
calamares-settings-lubuntu and calamares-settings-ubuntu.
- Add lintian override for bash in .desktop file.
- Remove unusual-interpreter in .desktop file.
- Adjust Makefile so .desktop file so it is not executable.
- Add keywords to .desktop file.
- Remove executable flag from automirror.conf and module.desc.
- Adjust debian/rules dpkg-architecture-variable.
[ apt-ghetto ]
* Fix small issues in automirror module
- Remove whitespace before index bracket.
- Remove undefined variable.
- Fix over-indented block.
-- Dan Simmons <kc2bez@lubuntu.me> Tue, 20 Aug 2019 19:59:12 -0400
calamares-settings-ubuntu (1:19.10.3) eoan; urgency=medium calamares-settings-ubuntu (1:19.10.3) eoan; urgency=medium
* Short version name is eoan. * Short version name is eoan.

2
debian/compat vendored

@ -1 +1 @@
11 12

18
debian/control vendored

@ -3,21 +3,31 @@ Section: devel
Priority: optional Priority: optional
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com> Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
Uploaders: Simon Quigley <tsimonq2@ubuntu.com> Uploaders: Simon Quigley <tsimonq2@ubuntu.com>
Build-Depends: debhelper (>= 11), intltool, qttools5-dev-tools Build-Depends: debhelper (>= 12),
Standards-Version: 4.2.0 intltool,
qttools5-dev-tools
Standards-Version: 4.4.0
Homepage: https://code.launchpad.net/ubuntu-calamares-settings Homepage: https://code.launchpad.net/ubuntu-calamares-settings
Vcs-Git: https://git.launchpad.net/ubuntu-calamares-settings Vcs-Git: https://git.launchpad.net/ubuntu-calamares-settings
Vcs-Browser: https://git.launchpad.net/ubuntu-calamares-settings Vcs-Browser: https://git.launchpad.net/ubuntu-calamares-settings
Package: calamares-settings-lubuntu Package: calamares-settings-lubuntu
Architecture: all Architecture: all
Depends: calamares-settings-ubuntu-common (= ${binary:Version}), Depends: calamares-settings-ubuntu-common (>= ${binary:Version}),
${misc:Depends} ${misc:Depends}
Description: Lubuntu Calamares Settings and Branding Description: Lubuntu Calamares Settings and Branding
This package contains the Calamares settings and branding for Lubuntu. This package contains the Calamares settings and branding for Lubuntu.
As part of the branding the installer slideshow is contained within.
The settings ensure a proper Lubuntu desktop is installed with the
LXQt desktop environment.
Package: calamares-settings-ubuntu-common Package: calamares-settings-ubuntu-common
Architecture: any Architecture: any
Depends: calamares, squashfs-tools, ${misc:Depends} Depends: calamares,
squashfs-tools,
python3,
${misc:Depends}
Description: Common Calamares Settings Description: Common Calamares Settings
This package contains the common Calamares settings for all flavors. This package contains the common Calamares settings for all flavors.
There is also a automirror Python script to set sources based on
geolocation.

4
debian/rules vendored

@ -1,6 +1,6 @@
#!/usr/bin/make -f #!/usr/bin/make -f
DEB_HOST_MULTIARCH = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
%: %:
dh $@ dh $@
@ -10,3 +10,5 @@ override_dh_missing:
mkdir -pv debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules mkdir -pv debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules
cp -vr common/modules/* debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules cp -vr common/modules/* debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules
chmod -R 755 debian/calamares-settings-ubuntu-common/usr/lib/ chmod -R 755 debian/calamares-settings-ubuntu-common/usr/lib/
chmod 644 debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules/automirror/automirror.conf
chmod 644 debian/calamares-settings-ubuntu-common/usr/lib/$(DEB_HOST_MULTIARCH)/calamares/modules/automirror/module.desc

@ -10,7 +10,7 @@ strings:
shortVersion: eoan shortVersion: eoan
versionedName: Lubuntu versionedName: Lubuntu
shortVersionedName: Lubuntu 19.10 shortVersionedName: Lubuntu 19.10
bootloaderEntryName: Lubuntu 19.10 bootloaderEntryName: Ubuntu
productUrl: https://lubuntu.me/ productUrl: https://lubuntu.me/
supportUrl: https://lubuntu.me/links/ supportUrl: https://lubuntu.me/links/
@ -21,6 +21,8 @@ images:
slideshow: "show.qml" slideshow: "show.qml"
slideshowAPI: 1
style: style:
sidebarBackground: "#808080" sidebarBackground: "#808080"
sidebarText: "#FFFFFF" sidebarText: "#FFFFFF"

@ -1,4 +1,3 @@
#!/usr/bin/env xdg-open
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Version=1.0 Version=1.0
@ -10,3 +9,4 @@ Icon=calamares
Terminal=false Terminal=false
StartupNotify=true StartupNotify=true
Categories=Qt;System; Categories=Qt;System;
Keywords=installer;calamares;system;

@ -1,4 +1,6 @@
--- ---
baseUrl: archive.ubuntu.com baseUrl: archive.ubuntu.com
distribution: Lubuntu distribution: Lubuntu
geoIpUrl: https://ipapi.co/json geoip:
style: "json"
url: "https://ipapi.co/json"

@ -1,4 +1,3 @@
--- ---
restartNowChecked: true restartNowMode: user-checked
restartNowEnabled: true
restartNowCommand: "systemctl -i reboot" restartNowCommand: "systemctl -i reboot"

@ -8,3 +8,4 @@ ssdExtraMountOptions:
swap: discard swap: discard
btrfs: discard,compress=lzo btrfs: discard,compress=lzo
crypttabOptions: luks,keyscript=/bin/cat crypttabOptions: luks,keyscript=/bin/cat
efiMountOptions: umask=0077

@ -2,6 +2,7 @@
region: "America" region: "America"
zone: "New_York" zone: "New_York"
localeGenPath: "/etc/locale.gen" localeGenPath: "/etc/locale.gen"
geoipUrl: "https://ipapi.co/json" geoip:
geoipStyle: "json" style: "json"
geoipSelector: "timezone" url: "https://ipapi.co/json"
selector: "timezone"

@ -1,4 +1,5 @@
efiSystemPartition: "/boot/efi" efiSystemPartition: "/boot/efi"
enableLuksAutomatedPartitioning: true enableLuksAutomatedPartitioning: true
neverCreateSwap: true userSwapChoices: none
drawNestedPartitions: true drawNestedPartitions: true
defaultFileSystemType: "ext4"

@ -2,6 +2,7 @@
showSupportUrl: true showSupportUrl: true
showKnownIssuesUrl: true showKnownIssuesUrl: true
showReleaseNotesUrl: true showReleaseNotesUrl: true
showDonateUrl: https://lubuntu.me/donate/
requirements: requirements:
requiredStorage: 8 requiredStorage: 8
@ -18,3 +19,7 @@ requirements:
- root - root
- storage - storage
- ram - ram
geoip:
style: "json"
url: "https://ipapi.co/json"
selector: "country"

@ -57,3 +57,7 @@ sequence:
branding: lubuntu branding: lubuntu
prompt-install: true prompt-install: true
dont-chroot: false
oem-setup: false
disable-cancel: false
disable-cancel-during-exec: false

Loading…
Cancel
Save