add agama-live image
This commit is contained in:
parent
0458e7093d
commit
728095762a
35
agama-live/README.md
Normal file
35
agama-live/README.md
Normal file
@ -0,0 +1,35 @@
|
||||
# Live ISO
|
||||
|
||||
This directory contains a set of files that are used to build the Agama Live ISO
|
||||
image.
|
||||
|
||||
## Sources
|
||||
|
||||
The sources are maintained in the [Agama Git
|
||||
repository](https://github.com/openSUSE/agama/tree/master/live) repository.
|
||||
|
||||
## Building the ISO
|
||||
|
||||
To build the ISO locally run the
|
||||
|
||||
```shell
|
||||
osc build -M <build_flavor> images
|
||||
```
|
||||
|
||||
command. See the [_multibuild](_multibuild) file for the list of configured
|
||||
build flavors. To build for example the openSUSE flavor run this command:
|
||||
|
||||
```shell
|
||||
osc build -M openSUSE images
|
||||
```
|
||||
|
||||
Note: For building an ISO image you need a lot of free space at the `/var`
|
||||
partition. Make sure there is at least 25GiB free space otherwise the build
|
||||
might fail.
|
||||
|
||||
## Changes
|
||||
|
||||
Please *do not* change any file in the OBS repository. The files are
|
||||
automatically uploaded from the [Agama Git
|
||||
repository](https://github.com/openSUSE/agama/tree/master/live), your manual
|
||||
changes will be lost at the next update.
|
7
agama-live/_constraints
Normal file
7
agama-live/_constraints
Normal file
@ -0,0 +1,7 @@
|
||||
<constraints>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">25</size>
|
||||
</disk>
|
||||
</hardware>
|
||||
</constraints>
|
4
agama-live/_multibuild
Normal file
4
agama-live/_multibuild
Normal file
@ -0,0 +1,4 @@
|
||||
<multibuild>
|
||||
<flavor>openSUSE</flavor>
|
||||
<flavor>openSUSE-Playwright</flavor>
|
||||
</multibuild>
|
183
agama-live/agama-live.changes
Normal file
183
agama-live/agama-live.changes
Normal file
@ -0,0 +1,183 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jun 14 10:36:52 UTC 2024 - Ladislav Slezák <lslezak@suse.com>
|
||||
|
||||
- Experimental Agama self-update (gh#openSUSE/agama#1341)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 13 16:07:08 UTC 2024 - Ladislav Slezák <lslezak@suse.com>
|
||||
|
||||
- Added Tumbleweed OSS and Agama Staging repositories to the Live
|
||||
system itself (gh#openSUSE/agama#1332)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 11 21:39:51 UTC 2024 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Add the jq package to the image (gh#openSUSE/agama#1314).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jun 6 14:30:19 UTC 2024 - Ladislav Slezák <lslezak@suse.com>
|
||||
|
||||
- Automatically generate the root password (gh#openSUSE/agama#1292)
|
||||
- Allow setting the default root password in ISO metadata
|
||||
(gh#openSUSE/agama#1290)
|
||||
- Alloe setting teh root password from boot command line or set
|
||||
it interactively during boot (gh#openSUSE/agama#1288)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 5 15:40:43 UTC 2024 - Knut Anderssen <kanderssen@suse.com>
|
||||
|
||||
- Fix the cd.ikr content for booting the s390x iso
|
||||
(gh#openSUSE/agama#1289).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 21 10:38:39 UTC 2024 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Add the procps4 package to the image (gh#openSUSE/agama#1245).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 17 09:52:27 UTC 2024 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Version 8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 9 16:16:29 UTC 2024 - Ladislav Slezák <lslezak@suse.com>
|
||||
|
||||
- Image size reduced:
|
||||
- Removed translations and locale definitions for unsupported
|
||||
languages, removed translations for unused tools
|
||||
- Removed sound card and TV card drivers (not needed for the installer)
|
||||
- Removed alsa packages
|
||||
- Removed unused firmware files
|
||||
- Require 25GB disk space for build (PXE build might fail with
|
||||
just 20GB)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 1 08:27:29 UTC 2024 - Josef Reidinger <jreidinger@suse.com>
|
||||
|
||||
- Improve multipath experience: preload kernel module and set probing
|
||||
to smart option (bsc#1215598)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 21 15:43:06 UTC 2023 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Version 7
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 4 16:03:08 UTC 2023 - José Iván López González <jlopez@suse.com>
|
||||
|
||||
- Remove dependencies included by Agama packages (related to
|
||||
gh#openSUSE/agama#911).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 1 14:23:09 UTC 2023 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Version 6
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 13 18:02:39 UTC 2023 - Josef Reidinger <jreidinger@suse.com>
|
||||
|
||||
- Use by default zram to allow having 2GiB memory requirements
|
||||
(jsc#PED-7303)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 6 08:30:01 UTC 2023 - Marcus Schäfer <marcus.schaefer@suse.com>
|
||||
|
||||
- Fix s390 PXE build by using 'custom' bootloader for s390 target
|
||||
There is an error inside grub2-zipl-setup which calls zipl that
|
||||
then complains with "Unable to create temporary device node: No such device or address".
|
||||
We don't see this issue with zipl in the kiwi integration test from here:
|
||||
https://build.opensuse.org/project/show/Virtualization:Appliances:Images:Testing_s390:tumbleweed
|
||||
Thus I don't think it's an issue with kiwi but most probably a conflict
|
||||
between the zipl setup and the raw btrfs filesystem usage in this case.
|
||||
Long story short, the zipl issue needs extra inspection and the fix
|
||||
here is simple because we actually don't need a bootloader to be installed
|
||||
into the disk image because it is expected to be deployed via a remote
|
||||
boot infrastructure. Therefore this change disables the bootloader
|
||||
install for s390 by setting the attribute: bootloader="custom"
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 24 08:04:07 UTC 2023 - Marcus Schäfer <marcus.schaefer@suse.com>
|
||||
|
||||
- Add new profile ALP-PXE which builds a variant of the agama
|
||||
installer that is an oem disk image which can be remote deployed
|
||||
into a ramdisk to boot into the agama installation. The size constraints
|
||||
are similar to the live-iso size. For more details please refer
|
||||
to README.pxe
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Mon Oct 23 12:03:55 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Add adobe-sourcehansans-jp-fonts
|
||||
- Version 5
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Thu Oct 19 20:19:11 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Add libstorage-ng translations
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Wed Sep 27 08:45:26 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Version 4
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Tue Sep 26 07:55:34 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Clean-up zypper logs
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Tue Sep 26 05:28:35 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Added nvme-cli requested by https://bugzilla.suse.com/show_bug.cgi?id=1215572
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Wed Aug 30 09:44:04 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Add microos-tools package and enable proxy setup services.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Tue Aug 29 09:19:26 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Enable ppc64le images
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Thu Aug 03 10:23:49 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Disable building the ALP image for ppc64le
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Wed Aug 02 10:37:21 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Version 3
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Tue Aug 01 09:56:42 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Replace "default" flavor with a new "openSUSE" flavor that only includes
|
||||
openSUSE-based products.
|
||||
- Replace ALP-build-key with suse-build-key.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Mon Jul 31 11:34:26 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Replace ALP-build-key with suse-build-key
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Tue Jul 25 14:43:39 UTC 2023 - José Iván López González <jlopez@suse.com>
|
||||
|
||||
- Update filtering
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Wed Jul 05 08:27:33 UTC 2023 - Imobach González Sosa <igonzalezsosa@suse.com>
|
||||
|
||||
- Bump version to match Agama
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Thu Jun 08 14:12:15 UTC 2023 - Josef Reidinger <jreidinger@suse.com>
|
||||
|
||||
- add to live image also dbus services written in rust
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
Thu Jun 01 14:05:13 UTC 2023 - Ladislav Slezák <lslezak@suse.com>
|
||||
|
||||
- osc copypac from project:YaST:Head:Agama package:agama-live revision:13
|
139
agama-live/agama-live.kiwi
Normal file
139
agama-live/agama-live.kiwi
Normal file
@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- OBS-ExclusiveArch: aarch64 ppc64le x86_64 s390x -->
|
||||
<!-- OBS-Profiles: @BUILD_FLAVOR@ -->
|
||||
|
||||
<image schemaversion="7.5" name="agama-live">
|
||||
<description type="system">
|
||||
<author>YaST Team</author>
|
||||
<contact>yast2-maintainers@suse.de</contact>
|
||||
<specification>Agama Live ISO</specification>
|
||||
</description>
|
||||
<profiles>
|
||||
<profile name="openSUSE" description="openSUSE multiproduct image" import="true" />
|
||||
<profile name="openSUSE-Playwright" description="openSUSE image with Playwright integration tests" arch="aarch64,x86_64" />
|
||||
</profiles>
|
||||
<preferences>
|
||||
<version>8.0.0</version>
|
||||
<packagemanager>zypper</packagemanager>
|
||||
<locale>en_US</locale>
|
||||
<keytable>us</keytable>
|
||||
<timezone>Europe/Berlin</timezone>
|
||||
<rpm-excludedocs>true</rpm-excludedocs>
|
||||
<rpm-check-signatures>false</rpm-check-signatures>
|
||||
<bootsplash-theme>bgrt</bootsplash-theme>
|
||||
<bootloader-theme>openSUSE</bootloader-theme>
|
||||
</preferences>
|
||||
<preferences arch="ppc64le" profiles="openSUSE">
|
||||
<type image="iso" flags="dmsquash" firmware="ofw" mediacheck="true" volid="agama" editbootconfig="fix_bootconfig">
|
||||
<bootloader name="grub2" console="serial" timeout="10"/>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences arch="aarch64,x86_64" profiles="openSUSE,openSUSE-Playwright">
|
||||
<type image="iso" flags="dmsquash" firmware="uefi" mediacheck="true" volid="agama" editbootconfig="fix_bootconfig">
|
||||
<bootloader name="grub2" timeout="10"/>
|
||||
</type>
|
||||
</preferences>
|
||||
<preferences arch="s390x" profiles="openSUSE">
|
||||
<type image="iso" flags="dmsquash" volid="agama" editbootconfig="fix_bootconfig">
|
||||
<bootloader name="custom" />
|
||||
</type>
|
||||
</preferences>
|
||||
<users>
|
||||
<!-- the password is configured during boot -->
|
||||
<user password="!*" home="/root" name="root" groups="root"/>
|
||||
</users>
|
||||
<repository type="rpm-md">
|
||||
<source path="obsrepositories:/"/>
|
||||
</repository>
|
||||
<packages type="image">
|
||||
<package name="avahi"/>
|
||||
<package name="bind-utils"/>
|
||||
<package name="patterns-openSUSE-base"/>
|
||||
<package name="systemd"/>
|
||||
<package name="grub2-branding-openSUSE" arch="aarch64,x86_64"/>
|
||||
<package name="procps4"/>
|
||||
<package name="iputils"/>
|
||||
<package name="vim"/>
|
||||
<package name="grub2"/>
|
||||
<package name="grub2-arm64-efi" arch="aarch64"/>
|
||||
<package name="grub2-x86_64-efi" arch="x86_64"/>
|
||||
<package name="grub2-i386-pc" arch="x86_64"/>
|
||||
<package name="grub2-s390x-emu" arch="s390x" />
|
||||
<package name="grub2-powerpc-ieee1275" arch="ppc64le"/>
|
||||
<package name="syslinux" arch="x86_64"/>
|
||||
<package name="fontconfig"/>
|
||||
<package name="fonts-config"/>
|
||||
<package name="adobe-sourcecodepro-fonts"/>
|
||||
<package name="adobe-sourcehansans-jp-fonts"/>
|
||||
<package name="openssh"/>
|
||||
<package name="iproute2"/>
|
||||
<package name="less"/>
|
||||
<package name="bash-completion"/>
|
||||
<package name="dhcp-client"/>
|
||||
<package name="which"/>
|
||||
<package name="kernel-default"/>
|
||||
<!-- the firmware files not referenced by any kernel driver are removed from the image -->
|
||||
<package name="kernel-firmware"/>
|
||||
<package name="adaptec-firmware"/>
|
||||
<package name="atmel-firmware"/>
|
||||
<package name="bluez-firmware"/>
|
||||
<package name="ipw-firmware"/>
|
||||
<package name="mpt-firmware"/>
|
||||
<package name="zd1211-firmware"/>
|
||||
<package name="systemd-zram-service"/> <!--- needed for zram -->
|
||||
<package name="shim" arch="aarch64,x86_64"/>
|
||||
<package name="timezone"/>
|
||||
<package name="dracut-kiwi-live"/>
|
||||
<package name="blog" arch="s390x" />
|
||||
<package name="libblogger2" arch="s390x" />
|
||||
<package name="xauth"/>
|
||||
<package name="patterns-base-x11"/>
|
||||
<namedCollection name="x11"/>
|
||||
<package name="patterns-yast-yast2_basis"/>
|
||||
<package name="MozillaFirefox" arch="aarch64,x86_64"/>
|
||||
<package name="MozillaFirefox-branding-openSUSE" arch="aarch64,x86_64"/>
|
||||
<package name="libpwquality-tools"/>
|
||||
<package name="NetworkManager"/>
|
||||
<package name="ruby3.3-rubygem-byebug"/>
|
||||
<package name="ruby3.3-rubygem-agama-yast"/>
|
||||
<package name="agama"/>
|
||||
<package name="agama-web-ui"/>
|
||||
<package name="agama-cli"/>
|
||||
<package name="agama-auto"/>
|
||||
<package name="microos-tools"/>
|
||||
<package name="staging-build-key"/>
|
||||
<package name="icewm-lite"/>
|
||||
<package name="xinit"/>
|
||||
<package name="psmisc"/>
|
||||
<package name="joe"/>
|
||||
<package name="checkmedia"/>
|
||||
<package name="spice-vdagent"/>
|
||||
<package name="libtss2-tcti-device0"/>
|
||||
<package name="jq"/>
|
||||
<archive name="root.tar.xz"/>
|
||||
</packages>
|
||||
<!-- additional packages for the openSUSE flavors -->
|
||||
<packages type="image" profiles="openSUSE,openSUSE-Playwright">
|
||||
<package name="agama-products-opensuse"/>
|
||||
<package name="openSUSE-build-key"/>
|
||||
</packages>
|
||||
<!-- additional packages for the Playwright flavors -->
|
||||
<packages type="image" profiles="openSUSE-Playwright">
|
||||
<package name="playwright"/>
|
||||
<package name="agama-playwright"/>
|
||||
<!-- Playwright does not work with the openSUSE Firefox, -->
|
||||
<!-- install the chromium browser for running the tests -->
|
||||
<!-- unfortunately it is not available for s390x -->
|
||||
<package name="chromium"/>
|
||||
</packages>
|
||||
<packages type="bootstrap">
|
||||
<package name="udev"/>
|
||||
<package name="filesystem"/>
|
||||
<package name="glibc-locale"/>
|
||||
<package name="cracklib-dict-full"/>
|
||||
<package name="ca-certificates"/>
|
||||
<package name="ca-certificates-mozilla"/>
|
||||
<package name="openSUSE-release"/>
|
||||
<package name="openSUSE-release-ftp"/>
|
||||
</packages>
|
||||
</image>
|
BIN
agama-live/config-cdroot.tar.xz
Normal file
BIN
agama-live/config-cdroot.tar.xz
Normal file
Binary file not shown.
172
agama-live/config.sh
Normal file
172
agama-live/config.sh
Normal file
@ -0,0 +1,172 @@
|
||||
#! /bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# KIWI functions
|
||||
test -f /.kconfig && . /.kconfig
|
||||
test -f /.profile && . /.profile
|
||||
|
||||
# greeting
|
||||
echo "Configure image: [$kiwi_iname]..."
|
||||
|
||||
# setup baseproduct link
|
||||
suseSetupProduct
|
||||
|
||||
# configure the repositories in the Live system
|
||||
# import the OBS key for the systemsmanagement OBS project
|
||||
rpm --import /tmp/systemsmanagement_key.gpg
|
||||
rm /tmp/systemsmanagement_key.gpg
|
||||
# import the openSUSE keys
|
||||
rpm --import /usr/lib/rpm/gnupg/keys/*.asc
|
||||
|
||||
# activate services
|
||||
systemctl enable sshd.service
|
||||
systemctl enable NetworkManager.service
|
||||
systemctl enable avahi-daemon.service
|
||||
systemctl enable agama.service
|
||||
systemctl enable agama-web-server.service
|
||||
systemctl enable agama-auto.service
|
||||
systemctl enable agama-hostname.service
|
||||
systemctl enable agama-proxy-setup.service
|
||||
systemctl enable agama-certificate-issue.path
|
||||
systemctl enable agama-certificate-wait.service
|
||||
systemctl enable agama-welcome-issue.service
|
||||
systemctl enable agama-avahi-issue.service
|
||||
systemctl enable agama-ssh-issue.service
|
||||
systemctl enable agama-self-update.service
|
||||
systemctl enable live-password-cmdline.service
|
||||
systemctl enable live-password-dialog.service
|
||||
systemctl enable live-password-iso.service
|
||||
systemctl enable live-password-random.service
|
||||
systemctl enable live-password-systemd.service
|
||||
systemctl enable setup-systemd-proxy-env.path
|
||||
systemctl enable x11-autologin.service
|
||||
systemctl enable spice-vdagentd.service
|
||||
systemctl enable zramswap
|
||||
|
||||
# default target
|
||||
systemctl set-default graphical.target
|
||||
|
||||
# disable snapshot cleanup
|
||||
systemctl disable snapper-cleanup.timer
|
||||
systemctl disable snapper-timeline.timer
|
||||
|
||||
# disable unused services
|
||||
systemctl disable YaST2-Firstboot.service
|
||||
systemctl disable YaST2-Second-Stage.service
|
||||
|
||||
### setup dracut for live system
|
||||
label=${kiwi_install_volid:-$kiwi_iname}
|
||||
arch=$(uname -m)
|
||||
|
||||
echo "Setting default live root: live:LABEL=$label"
|
||||
mkdir /etc/cmdline.d
|
||||
echo "root=live:LABEL=$label" >/etc/cmdline.d/10-liveroot.conf
|
||||
echo "root_disk=live:LABEL=$label" >>/etc/cmdline.d/10-liveroot.conf
|
||||
# if there's a default network location, add it here
|
||||
# echo "root_net=" >> /etc/cmdline.d/10-liveroot.conf
|
||||
echo 'install_items+=" /etc/cmdline.d/10-liveroot.conf "' >/etc/dracut.conf.d/10-liveroot-file.conf
|
||||
echo 'add_dracutmodules+=" dracut-menu "' >>/etc/dracut.conf.d/10-liveroot-file.conf
|
||||
|
||||
if [ "${arch}" = "s390x" ];then
|
||||
# workaround for custom bootloader setting
|
||||
touch /config.bootoptions
|
||||
fi
|
||||
|
||||
# replace the @@LIVE_MEDIUM_LABEL@@ with the real Live partition label name from KIWI
|
||||
sed -i -e "s/@@LIVE_MEDIUM_LABEL@@/$label/g" /usr/bin/live-password
|
||||
|
||||
################################################################################
|
||||
# Reducing the used space
|
||||
|
||||
# Clean-up logs
|
||||
rm /var/log/zypper.log /var/log/zypp/history
|
||||
|
||||
du -h -s /usr/{share,lib}/locale/
|
||||
|
||||
# Agama expects that the same locales available in the installation system can
|
||||
# be also used later in the installed system and offers them in the web UI to
|
||||
# select. But to make the Live ISO smaller it makes sense to delete the locales
|
||||
# not supported by Agama itself. To solve this problem the list of available
|
||||
# locales is saved to a file before deleting the locales not supported by Agama.
|
||||
# Agama then reads this file instead of running the "localectl list-locales"
|
||||
# command.
|
||||
mkdir -p /etc/agama.d
|
||||
# emulate "localectl list-locales" call, it cannot be used here because it
|
||||
# insists on running systemd as PID 1 :-/
|
||||
ls -1 -d /usr/lib/locale/*.utf8 | sed -e "s#/usr/lib/locale/##" -e "s#utf8#UTF-8#" > /etc/agama.d/locales
|
||||
|
||||
# delete translations and unusupported languages (makes ISO about 22MiB smaller)
|
||||
# build list of ignore options for "ls" with supported languages like "-I cs* -I de* -I es* ..."
|
||||
readarray -t IGNORE_OPTS < <(ls /usr/share/agama/web_ui/po.*.js.gz | sed -e "s#/usr/share/agama/web_ui/po\.\(.*\)\.js\.gz#-I\n\\1*#")
|
||||
# additionally keep the en_US translations
|
||||
ls -1 "${IGNORE_OPTS[@]}" -I en_US /usr/share/locale/ | xargs -I% sh -c "echo 'Removing translations %...' && rm -rf /usr/share/locale/%"
|
||||
|
||||
# delete locale definitions for unsupported languages (explicitly keep the C and en_US locales)
|
||||
ls -1 "${IGNORE_OPTS[@]}" -I "en_US*" -I "C.*" /usr/lib/locale/ | xargs -I% sh -c "echo 'Removing locale %...' && rm -rf /usr/lib/locale/%"
|
||||
|
||||
# delete unused translations (MO files)
|
||||
for t in zypper gettext-runtime p11-kit; do
|
||||
rm /usr/share/locale/*/LC_MESSAGES/$t.mo
|
||||
done
|
||||
du -h -s /usr/{share,lib}/locale/
|
||||
|
||||
# remove documentation
|
||||
du -h -s /usr/share/doc/packages/
|
||||
rm -rf /usr/share/doc/packages/*
|
||||
# remove man pages
|
||||
du -h -s /usr/share/man
|
||||
rm -rf /usr/share/man/*
|
||||
|
||||
## removing drivers and firmware makes the Live ISO about 370MiB smaller
|
||||
#
|
||||
# Agama does not use sound, added by icewm dependencies
|
||||
rpm -e --nodeps alsa alsa-utils alsa-ucm-conf || true
|
||||
|
||||
# driver and firmware cleanup
|
||||
# Note: openSUSE Tumbleweed Live completely removes firmware for some server
|
||||
# network cars, because you very likely won't run TW KDE Live on a server.
|
||||
# But for Agama installer it makes more sense to run on server. So we keep it
|
||||
# and remove the drivers for sound cards and TV cards instead. Those do not
|
||||
# make sense on a server.
|
||||
du -h -s /lib/modules /lib/firmware
|
||||
# delete sound drivers
|
||||
rm -rfv /lib/modules/*/kernel/sound
|
||||
# delete TV cards and radio cards
|
||||
rm -rfv /lib/modules/*/kernel/drivers/media/
|
||||
|
||||
# remove the unused firmware (not referenced by kernel drivers)
|
||||
/tmp/fw_cleanup.rb --delete
|
||||
# remove the script, not needed anymore
|
||||
rm /tmp/fw_cleanup.rb
|
||||
du -h -s /lib/modules /lib/firmware
|
||||
|
||||
################################################################################
|
||||
# The rest of the file was copied from the openSUSE Tumbleweed Live ISO
|
||||
# https://build.opensuse.org/package/view_file/openSUSE:Factory:Live/livecd-tumbleweed-kde/config.sh?expand=1
|
||||
#
|
||||
|
||||
# disable the services included by dependencies
|
||||
for s in purge-kernels; do
|
||||
systemctl -f disable $s || true
|
||||
done
|
||||
|
||||
# Only used for OpenCL and X11 acceleration on vmwgfx (?), saves ~50MiB
|
||||
rpm -e --nodeps Mesa-gallium || true
|
||||
# Too big and will have to be dropped anyway (unmaintained, known security issues)
|
||||
rm -rf /usr/lib*/libmfxhw*.so.* /usr/lib*/mfx/
|
||||
|
||||
# the new, optional nvidia gsp firmware blobs are huge - ~ 70MB
|
||||
du -h -s /lib/firmware/nvidia
|
||||
find /lib/firmware/nvidia -name gsp | xargs -r rm -rf
|
||||
du -h -s /lib/firmware/nvidia
|
||||
# The gems are unpackaged already, no need to store them twice
|
||||
du -h -s /usr/lib*/ruby/gems/*/cache/
|
||||
rm -rf /usr/lib*/ruby/gems/*/cache/
|
||||
|
||||
# Not needed, boo#1166406
|
||||
rm -f /boot/vmlinux*.[gx]z
|
||||
rm -f /lib/modules/*/vmlinux*.[gx]z
|
||||
|
||||
# Remove generated files (boo#1098535)
|
||||
rm -rf /var/cache/zypp/* /var/lib/zypp/AnonymousUniqueId /var/lib/systemd/random-seed
|
89
agama-live/fix_bootconfig
Normal file
89
agama-live/fix_bootconfig
Normal file
@ -0,0 +1,89 @@
|
||||
#! /bin/bash
|
||||
|
||||
# This script uses the KIWI 'editbootconfig' hook to modify the Live layout
|
||||
# and ISO generation.
|
||||
#
|
||||
# Note that the 'editbootconfig' hook runs before the initrd is generated -
|
||||
# this is too early for our purposes. So we have to do some gray area
|
||||
# trickery:
|
||||
#
|
||||
# 1. Inject our modification scripts via config-cdroot.tar.xz into the Live tree.
|
||||
# 2. Inject a 'xorriso' wrapper script into /usr/local/bin to hook into the ISO
|
||||
# creation directly.
|
||||
# This script (a) adjusts the boot config, (b) runs xorriso, and (c) makes
|
||||
# it zIPL bootable on s390x.
|
||||
#
|
||||
|
||||
# KIWI config
|
||||
test -f .profile && . .profile
|
||||
|
||||
dst=${1#iso:}
|
||||
|
||||
arch=`uname -m`
|
||||
|
||||
# removing live root setting from command line - it's in /etc/cmdline.d instead
|
||||
if [ -f $dst/boot/grub2/grub.cfg ] ; then
|
||||
sed -i -E -e 's/\s+root=\S+//' -e 's/\s+rd.live\.image//' $dst/boot/grub2/grub.cfg
|
||||
fi
|
||||
|
||||
bootfix=$dst/fix_bootconfig.$arch
|
||||
if [ -f $bootfix ] ; then
|
||||
echo "bootconfig script found: \"$bootfix\""
|
||||
fi
|
||||
|
||||
if [ $arch = ppc64le ] ; then
|
||||
mkdir -p $dst/boot/grub2
|
||||
cp -r usr/share/grub2/powerpc-ieee1275 $dst/boot/grub2
|
||||
mv $dst/boot/grub2/powerpc-ieee1275/grub.elf $dst/boot/grub2
|
||||
fi
|
||||
|
||||
cat <<XXX >/usr/local/bin/xorriso
|
||||
#! /bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
# get ISO file name and ISO volume id from xorriso parameters
|
||||
for i in "\$@" ; do
|
||||
if [ -n "\$iso_opt" ] ; then
|
||||
iso_opt=
|
||||
export iso="\$i"
|
||||
continue
|
||||
fi
|
||||
if [ -n "\$volid_opt" ] ; then
|
||||
volid_opt=
|
||||
export volid="\$i"
|
||||
continue
|
||||
fi
|
||||
if [ "\$i" = "-outdev" ] ; then
|
||||
iso_opt=1
|
||||
continue
|
||||
fi
|
||||
if [ "\$i" = "-volid" ] ; then
|
||||
volid_opt=1
|
||||
continue
|
||||
fi
|
||||
done
|
||||
|
||||
volid=${kiwi_install_volid:-$kiwi_iname}
|
||||
|
||||
[ -x $bootfix ] && $bootfix $dst
|
||||
rm -f $dst/fix_bootconfig.*
|
||||
|
||||
case $arch in
|
||||
s390x)
|
||||
/usr/bin/xorriso "\$@" -volid "\$volid" -boot_image any bin_path=boot/s390x/cd.ikr -boot_image any boot_info_table=off -boot_image any load_size=512
|
||||
err=\$?
|
||||
[ -x /usr/bin/isozipl ] && isozipl "\$iso"
|
||||
;;
|
||||
ppc64le)
|
||||
/usr/bin/xorriso "\$@" -volid "\$volid" -boot_image any chrp_boot_part=on
|
||||
err=\$?
|
||||
;;
|
||||
*)
|
||||
/usr/bin/xorriso "\$@" -volid "\$volid"
|
||||
esac
|
||||
|
||||
exit \$err
|
||||
XXX
|
||||
|
||||
chmod +x /usr/local/bin/xorriso
|
19
agama-live/images.sh
Normal file
19
agama-live/images.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#! /bin/bash
|
||||
|
||||
echo 'add memory size check for livenetroot installation'
|
||||
|
||||
[[ -f /usr/lib/dracut/modules.d/90livenet/livenetroot.sh ]] || exit 1
|
||||
|
||||
echo 'let memsize=$(($(sed -n "s/MemTotal: *\([[:digit:]]*\).*/\1/p" /proc/meminfo) / 1024))' > /tmp/livenetroot-mod
|
||||
echo 'let imgsize=$(($(curl -sI "$liveurl" | sed -n "s/Content-Length: *\([[:digit:]]*\).*/\1/p") / (1024 * 1024)))' >> /tmp/livenetroot-mod
|
||||
echo '' >> /tmp/livenetroot-mod
|
||||
echo 'if [ $((memsize - imgsize)) -lt 1024 ]; then' >> /tmp/livenetroot-mod
|
||||
echo " sed -i 'N;/echo \"\$RDSOSREPORT\"/s/echo$/echo\\" >> /tmp/livenetroot-mod
|
||||
echo ' echo Warning!!!\' >> /tmp/livenetroot-mod
|
||||
echo ' echo The memory size of your system is too small for this live image.\' >> /tmp/livenetroot-mod
|
||||
echo ' echo Expect killed processes due to out of memory conditions.\' >> /tmp/livenetroot-mod
|
||||
echo " echo /' usr/bin/dracut-emergency" >> /tmp/livenetroot-mod
|
||||
echo ' emergency_shell' >> /tmp/livenetroot-mod
|
||||
echo 'fi' >> /tmp/livenetroot-mod
|
||||
|
||||
sed -i '/info "fetching $liveurl"$/ r /tmp/livenetroot-mod' /usr/lib/dracut/modules.d/90livenet/livenetroot.sh
|
BIN
agama-live/root.tar.xz
Normal file
BIN
agama-live/root.tar.xz
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user