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 Oct 14, 2024
1 parent 8eab7ab commit a90c3ad
Show file tree
Hide file tree
Showing 13 changed files with 81 additions and 27 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 39.0.2 - 2024-10-14
### Added
- Custom user Flatpak setup
- Custom machine setup
### Changed
- Improve scan and print support
- Better live system cleanup
- Minimize dependencies

## 39.0.1 - 2024-08-10
### Changed
- Build container is based on fedora-minimal
Expand Down
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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 && \
pip3 install kiwi==v10.1.14 --break-system-packages && \
microdnf --assumeyes clean all && \
rm /etc/rpm/* -rf
20 changes: 7 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ This project is a [Fedora Remix][01] and aims to offer a complete system for mul
You can [download a live image][02] and try the software, and then install it in your PC if you want.
You can also customize the image starting from available scripts.

Other goals of this remix are:
* adding common extra-repos
* supporting multimedia and office (printers and scanners)
Main goals of this remix are:
* Flatpak apps usage
* adding common extra-repos
* supporting printers and scanners

## How to build the LiveCD
[See a detailed description][03] about how to build the live media.
Expand Down Expand Up @@ -101,25 +101,19 @@ $ sudo dd if=/<target-path>/Fedora-Remix.x86_64-<version>.iso of=/dev/<stick-dev
```

## Post-install tasks
After installation, you can remove live system resources to save space by running:
After installation, remove live system resources to save space by running:

```shell
$ source /usr/local/libexec/remix/livesys-cleanup
```

A Flatpak quick setup script is provided:

```shell
$ source /usr/local/libexec/remix/flatpak-setup
```

## ![Bandiera italiana][04] Per gli utenti italiani
Questo è un [Remix di Fedora][01] con il supporto in italiano per lingua e tastiera. Nell'[immagine .iso][02] che si ottiene sono già installati i pacchetti e le configurazioni per il funzionamento in italiano delle varie applicazioni (come l'ambiente grafico, i repo extra etc).

Il remix ha come obiettivi anche:
* aggiunta dei repository comuni
* supporto per applicazioni multimediali e da ufficio (stampanti e scanner)
Il remix ha come obiettivi principali:
* utilizzo delle applicazioni Flatpak
* aggiunta dei repository comuni
* supporto per stampanti e scanner

## Change Log
All notable changes to this project will be documented in the [`CHANGELOG.md`](CHANGELOG.md) file.
Expand Down
1 change: 1 addition & 0 deletions kiwi-descriptions/components/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
<package name="bash-completion"/>
<package name="bind-utils"/>
<package name="btrfs-progs"/>
<package name="dmidecode"/>
<package name="net-tools"/>
<package name="pciutils"/>
<package name="psmisc"/>
Expand Down
4 changes: 4 additions & 0 deletions kiwi-descriptions/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ if [[ "$kiwi_profiles" == *"LiveSystemGraphical"* ]]; then
# Set up Flatpak
echo "Setting up Flathub repo..."
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
# Enable Flatpak user settings
systemctl --global enable flatpak-setup.service
# Avoid additional Fedora's Flatpak repos
systemctl disable flatpak-add-fedora-repos
fi
Expand Down Expand Up @@ -124,6 +126,8 @@ echo "install_weak_deps=False" >> /etc/dnf/dnf.conf
#======================================
# Remix fixes and tweaks
#--------------------------------------
## Enable machine system settings
systemctl enable machine-setup
## 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//' \
Expand Down
6 changes: 3 additions & 3 deletions kiwi-descriptions/config.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>

<image schemaversion="7.4" name="Fedora-Remix" displayname="Fedora 39 Remix">
<image schemaversion="7.6" name="Fedora-Remix" displayname="Fedora 39 Remix">
<description type="system">
<author>Massimiliano Bugni</author>
<contact>massi.ergosum@gmail.com</contact>
<specification>Fedora Remix</specification>
</description>
<preferences>
<release-version>39</release-version>
<version>39.0.1</version>
<packagemanager>dnf</packagemanager>
<version>39.0.2</version>
<packagemanager>dnf4</packagemanager>
<rpm-check-signatures>true</rpm-check-signatures>
<locale>en_US</locale>
<keytable>us</keytable>
Expand Down
10 changes: 4 additions & 6 deletions kiwi-descriptions/platforms/desktop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
</profile>
</profiles>
<packages type="image" profiles="Desktop">
<!-- Display server -->
<package name="xorg-x11-server-Xorg"/>
<package name="xorg-x11-xauth"/>
<package name="xorg-x11-xinit"/>
<!-- Display drivers -->
<package name="libva-vdpau-driver"/>
<package name="libvdpau-va-gl"/>
Expand Down Expand Up @@ -63,6 +59,8 @@
<package name="libva-intel-driver"/>
<package name="mesa-va-drivers-freeworld"/>
<package name="mesa-vdpau-drivers-freeworld"/>
<!-- Networking -->
<package name="firewall-config"/>
<!-- KDE -->
<package name="aha"/><!-- Convert terminal output to HTML for KDE tools -->
<package name="ark"/>
Expand All @@ -72,13 +70,13 @@
<package name="featherpad"/>
<package name="ffmpegthumbs"/>
<package name="flatpak-kcm"/>
<package name="gwenview"/>
<package name="ibus-uniemoji"/>
<package name="kcalc"/>
<package name="kcharselect"/>
<package name="kcm_systemd"/>
<package name="kde-gtk-config"/>
<package name="kde-style-breeze"/>
<package name="kdegraphics-thumbnailers"/>
<package name="kdeplasma-addons"/>
<package name="khelpcenter"/>
<package name="kinfocenter"/>
Expand All @@ -87,7 +85,6 @@
<package name="kscreen"/>
<package name="kwalletmanager5"/>
<package name="kwin"/>
<package name="okular"/>
<package name="pam-kwallet"/>
<package name="plasma-breeze"/>
<package name="plasma-desktop"/>
Expand All @@ -102,6 +99,7 @@
<package name="plasma-workspace"/>
<package name="plasma-workspace-x11"/>
<package name="polkit-kde"/>
<package name="powerdevil"/>
<package name="sddm-x11"/>
<package name="sddm-breeze"/>
<package name="sddm-kcm"/>
Expand Down
5 changes: 5 additions & 0 deletions kiwi-descriptions/platforms/workstation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@
<package name="bluez-obexd"/>
<package name="bluez-tools"/>
<!-- Connectivity -->
<package name="ipp-usb"/>
<package name="kde-connect"/>
<package name="kio_mtp"/>
<!-- Hardware support -->
<package name="iscan-firmware"/>
<package name="libsane-hpaio"/>
<!-- Networking -->
<namedCollection name="networkmanager-submodules"/>
<package name="plasma-nm-l2tp"/>
Expand All @@ -28,6 +32,7 @@
<package name="cups-lpd"/>
<package name="kde-print-manager"/>
<!-- Scanning -->
<package name="sane-backends-daemon"/>
<package name="sane-backends-drivers-cameras"/>
<package name="sane-backends-drivers-scanners"/>
</packages>
Expand Down
12 changes: 12 additions & 0 deletions kiwi-descriptions/root/etc/systemd/system/machine-setup.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Machine system settings

[Service]
Type=oneshot
Restart=no
RemainAfterExit=no
ExecStart=/usr/local/libexec/remix/machine-setup

[Install]
WantedBy=multi-user.target
WantedBy=graphical.target
12 changes: 12 additions & 0 deletions kiwi-descriptions/root/etc/systemd/user/flatpak-setup.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=Flatpak user settings
PartOf=graphical-session.target

[Service]
Type=oneshot
Restart=no
RemainAfterExit=no
ExecStart=/usr/local/libexec/remix/flatpak-setup

[Install]
WantedBy=graphical-session.target
11 changes: 9 additions & 2 deletions kiwi-descriptions/root/usr/local/libexec/remix/flatpak-setup
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Flatpak setup commands
echo "Sharing user Gtk settings with apps..."
#!/usr/bin/bash
#
# flatpak: user settings

echo "Sharing KDE custom Gtk settings with apps"
flatpak override --user --filesystem=xdg-config/gtkrc:ro
flatpak override --user --filesystem=xdg-config/gtkrc-2.0:ro
flatpak override --user --filesystem=xdg-config/gtk-3.0:ro
flatpak override --user --filesystem=xdg-config/gtk-4.0:ro

# https://bugzilla.mozilla.org/show_bug.cgi?id=1882641
echo "Inhibit idle when Firefox is playing full screen video"
flatpak override --user --talk-name=org.freedesktop.ScreenSaver org.mozilla.firefox
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# livesys cleanup commands

echo "Cleaning up livesys resources..."
echo "Cleaning up livesys resources"
sudo sh -c 'systemctl disable livesys.service; systemctl disable livesys-late.service;
dnf --assumeyes remove anaconda\* livesys-scripts;
dnf --assumeyes remove anaconda\* livesys-scripts dracut-live;
rm /etc/sysconfig/livesys* -rf; rm /var/lib/livesys -rf'
12 changes: 12 additions & 0 deletions kiwi-descriptions/root/usr/local/libexec/remix/machine-setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/bash
#
# machine: system settings

system_product_name="$(dmidecode --string system-product-name)"
if [ "$system_product_name" == "HP 250 G8 Notebook PC" ]; then
# When closing laptop lid airplane mode comes on and won't go off:
# https://bugzilla.redhat.com/show_bug.cgi?id=1628353
# https://askubuntu.com/questions/965595/why-does-airplane-mode-keep-toggling-on-my-hp-laptop-in-ubuntu-18-04
echo "HP 250 G8 - Fix airplane mode when closing laptop lid"
setkeycodes e057 240 e058 240
fi

0 comments on commit a90c3ad

Please sign in to comment.