Skip to content

Commit

Permalink
Inline upstream fedora kickstarts
Browse files Browse the repository at this point in the history
  • Loading branch information
sharpenedblade committed May 2, 2024
1 parent 2321753 commit 0cf3a44
Show file tree
Hide file tree
Showing 18 changed files with 1,040 additions and 19 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
[submodule "fedora-kickstarts"]
path = fedora-kickstarts
url = https://pagure.io/fedora-kickstarts
branch = "f38"
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ trap cleanup EXIT

for ks in "${kickstarts[@]}"; do
ks_builddir="$builddir/$ks"; mkdir -p $ks_builddir; cd "$ks_builddir"
cp -r /repo/fedora-kickstarts/* .; cp -f /repo/*.ks .
echo '%include t2linux-fedora-common.ks' >> "$ks.ks"
sudo ksflatten --config "$ks.ks" --output "$ks-flat.ks" --version F40
sudo ksflatten --config "/repo/$ks.ks" --output "$ks-flat.ks" --version F40
livemedia-creator \
--make-iso \
--iso-only \
Expand Down
45 changes: 45 additions & 0 deletions fedora-kde-common.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

%packages
# install env-group to resolve RhBug:1891500
@^kde-desktop-environment

@firefox
@kde-apps
@kde-media
@kde-pim
# Ensure we have Anaconda initial setup using kwin
@kde-spin-initial-setup
@libreoffice
# add libreoffice-draw and libreoffice-math (pagureio:fedora-kde/SIG#103)
libreoffice-draw
libreoffice-math

fedora-release-kde

-@admin-tools

# drop tracker stuff pulled in by gtk3 (pagureio:fedora-kde/SIG#124)
-tracker-miners
-tracker

### The KDE-Desktop

### fixes

# minimal localization support - allows installing the kde-l10n-* packages
kde-l10n

# Additional packages that are not default in kde-* groups, but useful
fuse
mediawriter

### space issues
-ktorrent # kget has also basic torrent features (~3 megs)
-digikam # digikam has duplicate functionality with gwenview (~28 megs)
-kipi-plugins # ~8 megs + drags in Marble
-krusader # ~4 megs
-k3b # ~15 megs

## avoid serious bugs by omitting broken stuff

%end
1 change: 0 additions & 1 deletion fedora-kickstarts
Submodule fedora-kickstarts deleted from f9ac9f
113 changes: 113 additions & 0 deletions fedora-live-base.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# fedora-live-base.ks
#
# Defines the basics for all kickstarts in the fedora-live branch
# Does not include package selection (other then mandatory)
# Does not include localization packages or configuration
#
# Does includes "default" language configuration (kickstarts including
# this template can override these settings)

lang en_US.UTF-8
keyboard us
timezone US/Eastern
selinux --enforcing
firewall --enabled --service=mdns
xconfig --startxonboot
zerombr
clearpart --all
part / --size 5120 --fstype ext4
services --enabled=NetworkManager,ModemManager --disabled=sshd
network --bootproto=dhcp --device=link --activate
rootpw --lock --iscrypted locked
shutdown
bootloader --append="intel_iommu=on iommu=pt mem_sleep=s2idle"

%include fedora-repo.ks

repo --name="copr_copr.fedorainfracloud.org_sharpenedblade_t2linux" --cost=80 --baseurl=https://download.copr.fedorainfracloud.org/results/sharpenedblade/t2linux/fedora-$releasever-$basearch/

%packages
# Explicitly specified here:
# <notting> walters: because otherwise dependency loops cause yum issues.
kernel-[0-9]*.t2.*
kernel-modules-[0-9]*.t2.*
kernel-modules-extra-[0-9]*.t2.*

# The point of a live image is to install
anaconda
anaconda-install-env-deps
anaconda-live
@anaconda-tools
# Anaconda has a weak dep on this and we don't want it on livecds, see
# https://fedoraproject.org/wiki/Changes/RemoveDeviceMapperMultipathFromWorkstationLiveCD
-fcoe-utils
-device-mapper-multipath
-sdubby

# Need aajohan-comfortaa-fonts for the SVG rnotes images
aajohan-comfortaa-fonts

# Without this, initramfs generation during live image creation fails: #1242586
dracut-live

# anaconda needs the locales available to run for different locales
glibc-all-langpacks

# provide the livesys scripts
livesys-scripts

copr-sharpenedblade-t2linux-release
t2linux-config
%end

%post
# Enable livesys services
systemctl enable livesys.service
systemctl enable livesys-late.service
# enable tmpfs for /tmp
systemctl enable tmp.mount
# make it so that we don't do writing to the overlay for things which
# are just tmpdirs/caches
# note https://bugzilla.redhat.com/show_bug.cgi?id=1135475
cat >> /etc/fstab << EOF
vartmp /var/tmp tmpfs defaults 0 0
EOF
# work around for poor key import UI in PackageKit
rm -f /var/lib/rpm/__db*
echo "Packages within this LiveCD"
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
# Note that running rpm recreates the rpm db files which aren't needed or wanted
rm -f /var/lib/rpm/__db*
# go ahead and pre-make the man -k cache (#455968)
/usr/bin/mandb
# make sure there aren't core files lying around
rm -f /core*
# remove random seed, the newly installed instance should make it's own
rm -f /var/lib/systemd/random-seed
# convince readahead not to collect
# FIXME: for systemd
echo 'File created by kickstart. See systemd-update-done.service(8).' \
| tee /etc/.updated >/var/.updated
# Drop the rescue kernel and initramfs, we don't need them on the live media itself.
# See bug 1317709
rm -f /boot/*-rescue*
# Disable network service here, as doing it in the services line
# fails due to RHBZ #1369794
systemctl disable network
# Remove machine-id on pre generated images
rm -f /etc/machine-id
touch /etc/machine-id
%end

25 changes: 25 additions & 0 deletions fedora-live-kde-base.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Maintained by the Fedora KDE SIG:
# http://fedoraproject.org/wiki/SIGs/KDE
# mailto:[email protected]

%include fedora-live-base.ks
%include fedora-kde-common.ks

%post
# set default GTK+ theme for root (see #683855, #689070, #808062)
cat > /root/.gtkrc-2.0 << EOF
include "/usr/share/themes/Adwaita/gtk-2.0/gtkrc"
include "/etc/gtk-2.0/gtkrc"
gtk-theme-name="Adwaita"
EOF
mkdir -p /root/.config/gtk-3.0
cat > /root/.config/gtk-3.0/settings.ini << EOF
[Settings]
gtk-theme-name = Adwaita
EOF
# set livesys session type
sed -i 's/^livesys_session=.*/livesys_session="kde"/' /etc/sysconfig/livesys
%end
17 changes: 17 additions & 0 deletions fedora-live-kde.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# fedora-livecd-kde.ks
#
# Description:
# - Fedora Live Spin with the K Desktop Environment (KDE), default 1.4 GB version
#
# Maintainer(s):
# - Sebastian Vahl <[email protected]>
# - Fedora KDE SIG, http://fedoraproject.org/wiki/SIGs/KDE, [email protected]

%include fedora-live-kde-base.ks
%include fedora-live-minimization.ks

# DVD payload
part / --size=9000

%post
%end
9 changes: 9 additions & 0 deletions fedora-live-minimization.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Common packages removed from comps
# For F14, these removals should be moved to comps itself

%packages

# save some space
-hplip

%end
32 changes: 32 additions & 0 deletions fedora-live-sway.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# fedora-livecd-sway.ks
#
# Description:
# - Fedora Live Spin with the tiling window manager Sway
#
# Maintainer(s):
# - Aleksei Bavshin <[email protected]>
# - Jiří Konečný <[email protected]>
# - Anthony Rabbito <[email protected]>
# - Fabio Alessandro Locati <[email protected]>

%include fedora-live-base.ks
%include fedora-live-minimization.ks
%include fedora-sway-common.ks

%packages
# To be able to show installation instructions on background
nwg-wrapper
%end

%post
# create /etc/sysconfig/desktop (needed for installation)
cat > /etc/sysconfig/desktop <<EOF
PREFERRED=/usr/bin/sway
DISPLAYMANAGER=/bin/sddm
EOF
# set livesys session type
sed -i 's/^livesys_session=.*/livesys_session="sway"/' /etc/sysconfig/livesys
%end

24 changes: 24 additions & 0 deletions fedora-live-workstation.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Maintained by the Fedora Workstation WG:
# http://fedoraproject.org/wiki/Workstation
# mailto:[email protected]

%include fedora-live-base.ks
%include fedora-workstation-common.ks
#
# Disable this for now as packagekit is causing compose failures
# by leaving a gpg-agent around holding /dev/null open.
#
#include snippets/packagekit-cached-metadata.ks

part / --size 8192

%packages
gnome-initial-setup
%end

%post
# set livesys session type
sed -i 's/^livesys_session=.*/livesys_session="gnome"/' /etc/sysconfig/livesys
%end
4 changes: 4 additions & 0 deletions fedora-repo-not-rawhide.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
repo --name=fedora --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
repo --name=updates --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch
#repo --name=updates-testing --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-testing-f$releasever&arch=$basearch
url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch
2 changes: 2 additions & 0 deletions fedora-repo-rawhide.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
repo --name=rawhide --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
url --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=$basearch
9 changes: 9 additions & 0 deletions fedora-repo.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Include the appropriate repo definitions

# Exactly one of the following should be uncommented

# For the master branch the following should be uncommented
# %include fedora-repo-rawhide.ks

# For non-master branches the following should be uncommented
%include fedora-repo-not-rawhide.ks
17 changes: 17 additions & 0 deletions fedora-sway-common.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# fedora-livecd-sway.ks
#
# Description:
# - Fedora Live Spin with the tiling window manager Sway
#
# Maintainer(s):
# - Aleksei Bavshin <[email protected]>
# - Jiří Konečný <[email protected]>
# - Anthony Rabbito <[email protected]>
# - Fabio Alessandro Locati <[email protected]>

%packages
fedora-release-sway
@^sway-desktop-environment
@firefox
@swaywm-extended
%end
15 changes: 15 additions & 0 deletions fedora-workstation-common.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
%packages

# Exclude unwanted groups that fedora-live-base.ks pulls in
-@dial-up
-@input-methods
-@standard

# Install workstation-product-environment to resolve RhBug:1891500
@^workstation-product-environment

# Exclude unwanted packages from @anaconda-tools group
-gfs2-utils
-reiserfs-utils

%end
53 changes: 53 additions & 0 deletions snippets/packagekit-cached-metadata.ks
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# %post script to include initial metadata for PackageKit

%post --nochroot
# Copy over files needed for networking inside the chroot
for f in /etc/resolv.conf /etc/hosts ; do
test -f $f && cp $f /mnt/sysimage/$f.kickstart
done
%end

%post
# Use host machine's resolv.conf and hosts files
for f in /etc/resolv.conf /etc/hosts ; do
test -f $f && mv $f $f.orig
test -f $f.kickstart && mv -f $f.kickstart $f
done
PK_PREFIX=`mktemp -d`
mkdir -p $PK_PREFIX/etc/yum.repos.d
if [ -f /etc/yum.repos.d/fedora.repo ] ; then
cp /etc/yum.repos.d/fedora.repo $PK_PREFIX/etc/yum.repos.d/
sed -i -e 's|^metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch|baseurl=https://kojipkgs.fedoraproject.org/compose/branched/latest-Fedora-/compose/Everything/$basearch/os/|' \
$PK_PREFIX/etc/yum.repos.d/fedora.repo
fi
if [ -f /etc/yum.repos.d/fedora-updates.repo ] ; then
cp /etc/yum.repos.d/fedora-updates.repo $PK_PREFIX/etc/yum.repos.d/
sed -i -e 's|^metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch|baseurl=https://kojipkgs.fedoraproject.org/mash/updates/f$releasever-updates/$basearch/|' \
$PK_PREFIX/etc/yum.repos.d/fedora-updates.repo
fi
if [ -f /etc/yum.repos.d/fedora-updates-testing.repo ] ; then
cp /etc/yum.repos.d/fedora-updates-testing.repo $PK_PREFIX/etc/yum.repos.d/
sed -i -e 's|^metalink=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch|baseurl=https://kojipkgs.fedoraproject.org/mash/updates/f$releasever-updates-testing/$basearch/|' \
$PK_PREFIX/etc/yum.repos.d/fedora-updates-testing.repo
fi
if [ -f /etc/yum.repos.d/fedora-rawhide.repo ] ; then
cp /etc/yum.repos.d/fedora-rawhide.repo $PK_PREFIX/etc/yum.repos.d/
sed -i -e 's|^metalink=https://mirrors.fedoraproject.org/metalink?repo=rawhide&arch=$basearch|baseurl=https://kojipkgs.fedoraproject.org/compose/rawhide/latest-Fedora-/compose/Everything/$basearch/os/|' \
$PK_PREFIX/etc/yum.repos.d/fedora-rawhide.repo
fi
rpm --root=$PK_PREFIX --initdb
DESTDIR=$PK_PREFIX /usr/libexec/packagekit-direct refresh
if [ -d /var/cache/PackageKit ] ; then
mv $PK_PREFIX/var/cache/PackageKit/* /var/cache/PackageKit/
fi
rm -rf $PK_PREFIX
# Restore original resolv.conf and hosts files
for f in /etc/resolv.conf /etc/hosts ; do
rm -f $f
test -f $f.orig && mv $f.orig $f
done
%end
Loading

0 comments on commit 0cf3a44

Please sign in to comment.