Skip to content

Commit

Permalink
Improve scripts and minimize dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
mbugni committed Aug 10, 2024
1 parent fc2ca2d commit 8eab7ab
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 30 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
## [39.0.0] - 2024-06-02
## 39.0.1 - 2024-08-10
### Changed
- Build container is based on fedora-minimal
- Falkon replaces Konqueror browser
- Discover uses Flatpak as default backend
- Minimize dependencies

## 39.0.0 - 2024-06-02
### Changed
- Adopt kiwi-ng for builing images
### Removed
Expand Down
9 changes: 5 additions & 4 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM registry.fedoraproject.org/fedora:39
RUN dnf --assumeyes --setopt='tsflags=nodocs' --setopt='install_weak_deps=False' \
install bash-completion distribution-gpg-keys kiwi-cli kiwi-systemdeps && \
dnf --assumeyes clean all && \
FROM registry.fedoraproject.org/fedora-minimal:39
RUN microdnf --assumeyes --setopt='tsflags=nodocs' --setopt='install_weak_deps=False' \
install bash-completion distribution-gpg-keys python3-pip kiwi-systemdeps-iso-media && \
pip3 install kiwi==v10.1.1 --break-system-packages && \
microdnf --assumeyes clean all && \
rm /etc/rpm/* -rf
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ You can use a tool like [Ventoy][07] to build multiboot USB devices, or simply t
USB stick using the `dd` command:

```shell
$ dd if=/<target-path>/Fedora-Remix.x86_64-<version>.iso of=/dev/<stickdevice>
$ sudo dd if=/<target-path>/Fedora-Remix.x86_64-<version>.iso of=/dev/<stick-device>
```

## Post-install tasks
Expand Down
21 changes: 18 additions & 3 deletions kiwi-descriptions/components/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,44 @@
<profile name="CommonExtras" description="Extra packages"/>
</profiles>
<packages type="image" profiles="CommonCore">
<namedCollection name="core"/>
<!-- Core packages -->
<package name="binutils"/>
<package name="curl"/>
<package name="e2fsprogs"/>
<package name="man-db"/>
<package name="passwd"/>
<package name="policycoreutils"/>
<package name="procps-ng"/>
<package name="selinux-policy-targeted"/>
<package name="sudo"/>
<package name="util-linux"/>
<!-- Hardware support -->
<namedCollection name="hardware-support"/>
<package name="linux-firmware"/>
<package name="microcode_ctl"/>
<package name="fwupd"/>
<!-- Networking -->
<package name="NetworkManager-wifi"/>
<package name="firewalld"/>
<package name="systemd-resolved"/>
<!-- System -->
<!-- package name="systemd-oomd-defaults"/ -->
<package name="chrony"/>
<package name="plymouth-scripts"/>
<package name="rpm-plugin-systemd-inhibit"/>
<!-- package name="systemd-oomd-defaults"/ -->
<package name="zram-generator-defaults"/>
<!-- Tools -->
<package name="bash-completion"/>
<package name="bind-utils"/>
<package name="btrfs-progs"/>
<package name="net-tools"/>
<package name="pciutils"/>
<package name="psmisc"/>
<package name="clinfo"/>
<package name="exfatprogs"/>
<package name="htop"/>
<package name="nano-default-editor"/>
<package name="neofetch"/>
<package name="fastfetch"/>
<package name="rsync"/>
<package name="unar"/>
</packages>
Expand Down
25 changes: 19 additions & 6 deletions kiwi-descriptions/config.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/bash

set -euxo pipefail

Expand Down Expand Up @@ -42,8 +42,6 @@ echo "GRUB_DISABLE_RECOVERY=true" >> /etc/default/grub
#======================================
# Setup default services
#--------------------------------------
## Enable SSH
systemctl enable sshd.service
## Enable NetworkManager
systemctl enable NetworkManager.service
## Enable chrony
Expand Down Expand Up @@ -92,18 +90,24 @@ if [[ "$kiwi_profiles" == *"LiveSystemGraphical"* ]]; then
systemctl enable livesys.service livesys-late.service
# Set up KDE live session
echo 'livesys_session="kde"' > /etc/sysconfig/livesys
# Set up Flatpak
echo "Setting up Flathub repo..."
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# Avoid additional Fedora's Flatpak repos
systemctl disable flatpak-add-fedora-repos
fi

#======================================
# Remix localization
#--------------------------------------
echo "LANG=en_US.UTF-8" > /etc/default/locale
if [[ "$kiwi_profiles" == *"Localization"* ]]; then
livesys_locale="$(/bin/bash -c 'source /etc/locale.conf && echo $LANG')"
livesys_language="$(echo $livesys_locale | head -c 5)"
livesys_keymap="$(echo $livesys_locale | head -c 2)"
livesys_locale="${kiwi_language}.UTF-8"
livesys_language="${kiwi_language}"
livesys_keymap="${kiwi_keytable}"
echo "Set up language ${livesys_locale}"
# Setup system-wide locale
echo "LANG=${livesys_locale}" > /etc/default/locale
# Replace default locale settings
sed -i "s/^LANG=.*/LANG=${livesys_locale}/" /etc/xdg/plasma-localerc
sed -i "s/^LANGUAGE=.*/LANGUAGE="${livesys_language}"/" /etc/xdg/plasma-localerc
Expand All @@ -117,4 +121,13 @@ fi
#--------------------------------------
echo "install_weak_deps=False" >> /etc/dnf/dnf.conf

#======================================
# Remix fixes and tweaks
#--------------------------------------
## Remove preferred browser icon in KDE taskmanager
if [ -f /usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml ]; then
sed -i -e 's/\,preferred:\/\/browser//' \
/usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml
fi

exit 0
8 changes: 6 additions & 2 deletions kiwi-descriptions/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</description>
<preferences>
<release-version>39</release-version>
<version>39.0.0</version>
<version>39.0.1</version>
<packagemanager>dnf</packagemanager>
<rpm-check-signatures>true</rpm-check-signatures>
<locale>en_US</locale>
Expand All @@ -26,6 +26,10 @@
<include from="this://./platforms/workstation.xml"/>
<packages type="bootstrap">
<package name="basesystem"/>
<package name="filesystem"/>
<package name="coreutils"/>
<package name="dnf"/>
<package name="dnf-plugins-core"/>
<package name="fedora-release-identity-kde"/>
<package name="rootfiles"/>
</packages>
</image>
15 changes: 7 additions & 8 deletions kiwi-descriptions/platforms/desktop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@
<requires profile="Localization-it_IT"/>
</profile>
</profiles>
<packages type="bootstrap" profiles="Desktop">
<package name="fedora-release-identity-kde"/>
</packages>
<packages type="image" profiles="Desktop">
<!-- Display server (see @base-x) -->
<!-- Display server -->
<package name="xorg-x11-server-Xorg"/>
<package name="xorg-x11-xauth"/>
<package name="xorg-x11-xinit"/>
<!-- Display drivers (see @base-x) -->
<!-- Display drivers -->
<package name="libva-vdpau-driver"/>
<package name="libvdpau-va-gl"/>
<package name="mesa-dri-drivers"/>
<package name="mesa-omx-drivers"/>
<package name="mesa-vulkan-drivers"/>
<package name="xorg-x11-drivers"/>
<package name="xorg-x11-drv-amdgpu"/>
<!-- Display tools (see @base-x) -->
<!-- Display tools -->
<package name="dbus-x11"/>
<package name="egl-utils"/>
<package name="glx-utils"/>
Expand Down Expand Up @@ -71,8 +68,8 @@
<package name="ark"/>
<package name="breeze-gtk"/>
<package name="dolphin"/>
<package name="falkon"/>
<package name="featherpad"/>
<package name="fedora-release-identity-kde"/>
<package name="ffmpegthumbs"/>
<package name="flatpak-kcm"/>
<package name="gwenview"/>
Expand All @@ -83,9 +80,9 @@
<package name="kde-gtk-config"/>
<package name="kde-style-breeze"/>
<package name="kdeplasma-addons"/>
<package name="khelpcenter"/>
<package name="kinfocenter"/>
<package name="kgamma"/>
<package name="konqueror"/>
<package name="konsole5"/>
<package name="kscreen"/>
<package name="kwalletmanager5"/>
Expand All @@ -95,6 +92,7 @@
<package name="plasma-breeze"/>
<package name="plasma-desktop"/>
<package name="plasma-discover-flatpak"/>
<package name="plasma-discover-packagekit"/>
<package name="plasma-discover-notifier"/>
<package name="plasma-milou"/>
<package name="plasma-nm"/><!-- Network Manager -->
Expand All @@ -112,6 +110,7 @@
<package name="sweeper"/>
<package name="upower"/>
<package name="xdg-desktop-portal-kde"/>
<package name="xdg-desktop-portal-gnome"/>
</packages>
<packages type="image" profiles="Desktop-it_IT">
<package name="kde-l10n-it"/>
Expand Down
3 changes: 0 additions & 3 deletions kiwi-descriptions/platforms/minimal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,4 @@
<users profiles="Minimal">
<user password="L1ve1$b3@ut1fu!" home="/home/liveuser" name="liveuser" groups="wheel" pwdformat="plain" />
</users>
<packages type="image" profiles="Minimal">
<package name="fedora-release"/>
</packages>
</image>
2 changes: 2 additions & 0 deletions kiwi-descriptions/root/etc/xdg/discoverrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[ResourcesModel]
currentApplicationBackend=flatpak-backend
8 changes: 6 additions & 2 deletions kiwi-descriptions/root/var/lib/livesys/livesys-session-extra
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ fi
sed -i "s/^Session=.*/Session=plasmax11.desktop/" /etc/sddm.conf

if [ -f /usr/share/applications/calamares.desktop ]; then
#
# Copy installer icon on desktop
cp -a /usr/share/applications/calamares.desktop /home/liveuser/Desktop/
#
# Set executable bit disable KDE security warning
chmod +x /home/liveuser/Desktop/calamares.desktop
fi

if [ -f /usr/share/applications/liveinst.desktop ]; then
# Replace Discover icon in KDE taskmanager
sed -i -e 's/applications:org.kde.discover.desktop/applications:liveinst.desktop/' \
/usr/share/plasma/plasmoids/org.kde.plasma.taskmanager/contents/config/main.xml
fi

0 comments on commit 8eab7ab

Please sign in to comment.