From d24804e7dda1589256cb82f799c3a32092113cbd Mon Sep 17 00:00:00 2001 From: Tomas Hrcka Date: Aug 09 2022 11:46:50 +0000 Subject: [PATCH 1/9] Branch Fedora 37 from rawhide Signed-off-by: Tomas Hrcka --- diff --git a/fedora-iot.ks b/fedora-iot.ks index a52cb86..cb1eeff 100644 --- a/fedora-iot.ks +++ b/fedora-iot.ks @@ -19,7 +19,7 @@ autopart --nohome --noswap --type=plain # Equivalent of %include fedora-repo.ks # Pull from the ostree repo that was created during the compose -ostreesetup --nogpg --osname=fedora-iot --remote=fedora-iot --url=https://kojipkgs.fedoraproject.org/compose/iot/repo/ --ref=fedora/rawhide/${basearch}/iot +ostreesetup --nogpg --osname=fedora-iot --remote=fedora-iot --url=https://kojipkgs.fedoraproject.org/compose/iot/repo/ --ref=fedora/devel/${basearch}/iot reboot @@ -45,14 +45,14 @@ fi # Set the origin to the "main ref", distinct from /updates/ which is where bodhi writes. # We want consumers of this image to track the two week releases. -ostree admin set-origin --index 0 fedora-iot https://dl.fedoraproject.org/iot/repo/ "fedora/rawhide/${arch}/iot" +ostree admin set-origin --index 0 fedora-iot https://dl.fedoraproject.org/iot/repo/ "fedora/devel/${arch}/iot" # Make sure the ref we're supposedly sitting on (according # to the updated origin) exists. -ostree refs "fedora-iot:fedora/rawhide/${arch}/iot" --create "fedora-iot:fedora/rawhide/${arch}/iot" +ostree refs "fedora-iot:fedora/devel/${arch}/iot" --create "fedora-iot:fedora/devel/${arch}/iot" # Remove the old ref so that the commit eventually gets cleaned up. -ostree refs "fedora-iot:fedora/rawhide/${arch}/iot" --delete +ostree refs "fedora-iot:fedora/devel/${arch}/iot" --delete # delete/add the remote with new options to enable gpg verification # and to point them at the cdn url diff --git a/fedora-repo.ks b/fedora-repo.ks index 9c7dfff..a0232f0 100644 --- a/fedora-repo.ks +++ b/fedora-repo.ks @@ -3,7 +3,7 @@ # Exactly one of the following should be uncommented # For the master branch the following should be uncommented -%include fedora-repo-rawhide.ks +#%include fedora-repo-rawhide.ks # For non-master branches the following should be uncommented -# %include fedora-repo-not-rawhide.ks +%include fedora-repo-not-rawhide.ks From 6bdafa15043b2fb27ee9a112136c2b246e535247 Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Aug 15 2022 10:59:28 +0000 Subject: [PATCH 2/9] Python Classroom: Don't exclude java* as that matches javascriptcoregtk4 as well Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2118267 --- diff --git a/fedora-python-classroom-gnome-common.ks b/fedora-python-classroom-gnome-common.ks index a3d1d22..28d02ab 100644 --- a/fedora-python-classroom-gnome-common.ks +++ b/fedora-python-classroom-gnome-common.ks @@ -48,7 +48,7 @@ desktop-backgrounds-gnome # Drop the Java plugin and Java -icedtea-web --java* +-*openjdk* # No printing -@printing From 9896e482f6d04f77cfe6cb468ebe10add082ccd8 Mon Sep 17 00:00:00 2001 From: Luya Tshimbalanga Date: Aug 19 2022 15:07:14 +0000 Subject: [PATCH 3/9] design suite: temporarity drop gnome-books --- diff --git a/fedora-design-suite-common.ks b/fedora-design-suite-common.ks index e3b641f..ec1d212 100644 --- a/fedora-design-suite-common.ks +++ b/fedora-design-suite-common.ks @@ -10,7 +10,7 @@ deja-dup deja-dup-nautilus # Add extra gnome applications -gnome-books +#gnome-books gnome-calendar gnome-photos gnome-pomodoro @@ -27,6 +27,5 @@ powerline-fonts # temporarily removing conflicting application -mypaint -sparkleshare --blender-luxcorerender %end From edce50a60dd646d73b0d11a90385700494006415 Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Aug 28 2022 13:09:26 +0000 Subject: [PATCH 4/9] astronomy: drop obsolete python3-astroML-addons Previously python3-astroML had Provides: python3-astroML-addons but it was dropped: https://src.fedoraproject.org/rpms/python-astroML/c/e298df40fac05a377450f9bb029553e9369abb49 Remove this obsoleted Requires. --- diff --git a/fedora-live-astronomy_kde.ks b/fedora-live-astronomy_kde.ks index 1dceaea..221140f 100644 --- a/fedora-live-astronomy_kde.ks +++ b/fedora-live-astronomy_kde.ks @@ -78,7 +78,6 @@ astropy-tools ginga python3-astropy python3-astroML -python3-astroML-addons python3-astroquery python3-astroscrappy python3-APLpy From 96c9895671e162d0bfcfc749c8253efe68461ccf Mon Sep 17 00:00:00 2001 From: Peter Boy Date: Sep 06 2022 19:00:41 +0000 Subject: [PATCH 5/9] Initial kickstart file for new Fedora Server VM image --- diff --git a/fedora-server-vm-full.ks b/fedora-server-vm-full.ks new file mode 100755 index 0000000..820335a --- /dev/null +++ b/fedora-server-vm-full.ks @@ -0,0 +1,180 @@ +# fedora-server-vm-full.ks +# Kickstart file to build a Fedora Server Edition VM disk image. +# The image aims to resemble as close as technically possible the +# full features of a Fedora Server Edition in a virtual machine. +# +# At first boot it opens a test based basic configuration screen. +# +# This kickstart file is designed to be used with ImageFactory (in Koji). +# +# To build the image locally, you need to install ImageFactory and +# various additional helpers and configuration files. +# See Fedora Server Edition user documentation tutorial. + + +# Keyboard layouts +keyboard 'us' + +# Root password +rootpw --iscrypted --lock locked + +# System language +lang en_US.UTF-8 + +# Shutdown after installation +shutdown + +# Use text mode install +text + +# Network information +network --bootproto=dhcp --device=link --activate --onboot=on + +# Firewall configuration +firewall --enabled --service=mdns + +# System timezone +# set time zone to GMT (Etcetera/UTC) +timezone Etc/UTC --utc + +# Run the Setup Agent on first boot +firstboot --reconfig + +# SELinux configuration +selinux --enforcing + +# System services +# message: error enabling initial-setup, initial-setup does not exist +services --enabled="sshd,NetworkManager,chronyd,initial-setup" + +# System bootloader configuration +bootloader --location=mbr --timeout=1 --append="console=tty1 console=ttyS0,115200n8" + +# Partition Information. Use default partitioning as configured in Anaconda on +# Server Edition distribution media +autopart --noswap +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel --disklabel=msdos + +%post --erroronfail + +# Find the architecture we are on +arch=$(uname -m) + +# Import RPM GPG key, during installation saved in /etc/pki +echo "Import RPM GPG key" +releasever=$(rpm --eval '%{fedora}') +basearch=$(uname -i) +rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-$basearch + +# See the systemd-random-seed.service man page that says: +# " It is recommended to remove the random seed from OS images intended +# for replication on multiple systems" +# The newly installed instance should make it's own +echo "Removing random-seed so it's not the same in every image." +rm -f /var/lib/systemd/random-seed + +# When we build the image a networking config file gets left behind. +# Let's clean it up. +echo "Cleanup leftover networking configuration" +rm -f /etc/NetworkManager/system-connections/*.nmconnection + +dnf -y remove dracut-config-generic + +# Remove machine-id on pre generated images +rm -f /etc/machine-id +touch /etc/machine-id + +# Truncate the /etc/resolv.conf left over from NetworkManager during the +# kickstart. This causes delays in boot with cloud-init because the +# 192.168.122.1 DNS server cannot be reached. +truncate -s 0 /etc/resolv.conf + +# linux-firmware is installed by default and is quite large. As of mid 2020: +# Total download size: 97 M +# Installed size: 268 M +# So far we've been fine shipping without it so let's continue. +# More discussion about this in #1234504. +echo "Removing linux-firmware package." +rpm -e linux-firmware + +echo "Packages within this disk image" +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* + + +if [[ $arch == "aarch64" ]] || [[ $arch == "armv7l" ]]; then + +# Anaconda adds console=tty0 to the grub boot line on all images. this is problematic +# when you are using fedora via serial console as you do not get any output post grub +# linux does a good job of knowing what consoles need to be enabled. +# https://bugzilla.redhat.com/show_bug.cgi?id=2022757 +sed -i -e 's|console=tty0||g' /boot/loader/entries/*conf + +fi + + +# Cleanup dnf packages +echo "Cleaning old yum repodata." +dnf clean all + +echo "Zeroing out empty space." +# Create zeros file with nodatacow and no compression +touch /var/tmp/zeros +chattr +C /var/tmp/zeros +# This forces the filesystem to reclaim space from deleted files +dd bs=1M if=/dev/zero of=/var/tmp/zeros || : +echo "(Don't worry -- that out-of-space error was expected.)" +# Force sync to disk +sync / +rm -f /var/tmp/zeros +sync / + +%end + + +%post + +# setup systemd to boot to the right runlevel +echo -n "Setting default runlevel to multiuser text mode" +rm -f /etc/systemd/system/default.target +ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target +echo . + +%end + +%packages --inst-langs=en + +@server-product +@core +@headless-management +@standard +@networkmanager-submodules +##@container-management +@domain-client +@guest-agents + +# All arm-tools packages install on aarch64/armhfp only +# TODO: on a x86_64 devel environment are @arm-tools not available +# and cause a build error. +# @arm-tools + +# Standard Fedora Package Groups +## dracut-config-generic ## included in =core= +glibc-all-langpacks +initial-setup +kernel-core +-dracut-config-rescue +-generic-release* +-initial-setup-gui +-kernel +-plymouth +# pulled in by @standard +-smartmontools +-smartmontools-selinux + +%end From 734e000de5c3ff5fa34d7d32d0676856be3933e4 Mon Sep 17 00:00:00 2001 From: Peter Boy Date: Sep 06 2022 19:00:41 +0000 Subject: [PATCH 6/9] Added missing fedora-repo include. --- diff --git a/fedora-server-vm-full.ks b/fedora-server-vm-full.ks old mode 100755 new mode 100644 index 820335a..c487880 --- a/fedora-server-vm-full.ks +++ b/fedora-server-vm-full.ks @@ -1,8 +1,10 @@ -# fedora-server-vm-full.ks +# fedora-server-vm-full.ks (rel. 1.0) # Kickstart file to build a Fedora Server Edition VM disk image. # The image aims to resemble as close as technically possible the # full features of a Fedora Server Edition in a virtual machine. # +# The image uses GPT partition type as of default in Fedora 37 +# # At first boot it opens a test based basic configuration screen. # # This kickstart file is designed to be used with ImageFactory (in Koji). @@ -12,20 +14,29 @@ # See Fedora Server Edition user documentation tutorial. +# Use text mode install +text + # Keyboard layouts keyboard 'us' +# System language +lang en_US.UTF-8 + +# System timezone +# set time zone to GMT (Etcetera/UTC) +timezone Etc/UTC --utc + + # Root password rootpw --iscrypted --lock locked -# System language -lang en_US.UTF-8 +# SELinux configuration +selinux --enforcing -# Shutdown after installation -shutdown -# Use text mode install -text +# System bootloader configuration +bootloader --location=mbr --timeout=1 --append="console=tty1 console=ttyS0,115200n8" # Network information network --bootproto=dhcp --device=link --activate --onboot=on @@ -33,32 +44,71 @@ network --bootproto=dhcp --device=link --activate --onboot=on # Firewall configuration firewall --enabled --service=mdns -# System timezone -# set time zone to GMT (Etcetera/UTC) -timezone Etc/UTC --utc + +# System services +# message: error enabling initial-setup, initial-setup does not exist +services --enabled="sshd,NetworkManager,chronyd,initial-setup" # Run the Setup Agent on first boot firstboot --reconfig -# SELinux configuration -selinux --enforcing +# Partition Information. Use GPT by default (since Fedora 37) +# Resemble the Partitioning used for Fedora Server Install media +clearpart --all --initlabel --disklabel=gpt +part biosboot --size=1 --fstype=biosboot +part /boot --size=1000 --fstype=xfs --label=boot +part pv.007 --size=4000 --grow +volgroup sysvg pv.007 +logvol / --vgname=sysvg --size=4000 --grow --maxsize=16000 --fstype=xfs --name=root --label=sysroot -# System services -# message: error enabling initial-setup, initial-setup does not exist -services --enabled="sshd,NetworkManager,chronyd,initial-setup" -# System bootloader configuration -bootloader --location=mbr --timeout=1 --append="console=tty1 console=ttyS0,115200n8" +# Include URLs for network installation dynamically, dependent from Fedora release +# and imagefactory runtime environment +%include fedora-repo.ks + +# Shutdown after installation +shutdown + + + +##### begin package list ############################################# +%packages --inst-langs=en + +@server-product +@core +@headless-management +@standard +@networkmanager-submodules +##@container-management +@domain-client +@guest-agents + +# All arm-tools packages install on aarch64/armhfp only +# TODO: on a x86_64 devel environment are @arm-tools not available +# and cause a build error. +# @arm-tools + +# Standard Fedora Package Groups +## dracut-config-generic ## included in =core= +glibc-all-langpacks +initial-setup +kernel-core +-dracut-config-rescue +-generic-release* +-initial-setup-gui +-kernel +-linux-firmware +-plymouth +# pulled in by @standard +-smartmontools +-smartmontools-selinux + +%end +##### end package list ############################################### -# Partition Information. Use default partitioning as configured in Anaconda on -# Server Edition distribution media -autopart --noswap -# Clear the Master Boot Record -zerombr -# Partition clearing information -clearpart --all --initlabel --disklabel=msdos -%post --erroronfail +##### begin kickstart post script #################################### +%post --erroronfail --log=/root/anaconda-post-1.log # Find the architecture we are on arch=$(uname -m) @@ -81,25 +131,21 @@ rm -f /var/lib/systemd/random-seed echo "Cleanup leftover networking configuration" rm -f /etc/NetworkManager/system-connections/*.nmconnection -dnf -y remove dracut-config-generic - -# Remove machine-id on pre generated images -rm -f /etc/machine-id -touch /etc/machine-id - # Truncate the /etc/resolv.conf left over from NetworkManager during the -# kickstart. This causes delays in boot with cloud-init because the -# 192.168.122.1 DNS server cannot be reached. +# kickstart because the DNS server is environment specific. truncate -s 0 /etc/resolv.conf +echo "Cleaning repodata to save space." +dnf clean all + # linux-firmware is installed by default and is quite large. As of mid 2020: # Total download size: 97 M # Installed size: 268 M -# So far we've been fine shipping without it so let's continue. -# More discussion about this in #1234504. +# Not needed in virtual environment. echo "Removing linux-firmware package." rpm -e linux-firmware + Will ever anybody see this? echo "Packages within this disk image" rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn @@ -107,20 +153,26 @@ rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn rm -f /var/lib/rpm/__db* + Do we need a serial terminal with a VM? if [[ $arch == "aarch64" ]] || [[ $arch == "armv7l" ]]; then + # Anaconda adds console=tty0 to the grub boot line on all images. this is problematic + # when you are using fedora via serial console as you do not get any output post grub + # linux does a good job of knowing what consoles need to be enabled. + # https://bugzilla.redhat.com/show_bug.cgi?id=2022757 + sed -i -e 's|console=tty0||g' /boot/loader/entries/*conf +fi -# Anaconda adds console=tty0 to the grub boot line on all images. this is problematic -# when you are using fedora via serial console as you do not get any output post grub -# linux does a good job of knowing what consoles need to be enabled. -# https://bugzilla.redhat.com/show_bug.cgi?id=2022757 -sed -i -e 's|console=tty0||g' /boot/loader/entries/*conf -fi +# Remove machine-id on pre generated images +rm -f /etc/machine-id +touch /etc/machine-id +%end +##### end kickstart post script ##################################### -# Cleanup dnf packages -echo "Cleaning old yum repodata." -dnf clean all + +##### begin custom post script (after base) ######################### +%post echo "Zeroing out empty space." # Create zeros file with nodatacow and no compression @@ -134,11 +186,6 @@ sync / rm -f /var/tmp/zeros sync / -%end - - -%post - # setup systemd to boot to the right runlevel echo -n "Setting default runlevel to multiuser text mode" rm -f /etc/systemd/system/default.target @@ -146,35 +193,4 @@ ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target echo . %end - -%packages --inst-langs=en - -@server-product -@core -@headless-management -@standard -@networkmanager-submodules -##@container-management -@domain-client -@guest-agents - -# All arm-tools packages install on aarch64/armhfp only -# TODO: on a x86_64 devel environment are @arm-tools not available -# and cause a build error. -# @arm-tools - -# Standard Fedora Package Groups -## dracut-config-generic ## included in =core= -glibc-all-langpacks -initial-setup -kernel-core --dracut-config-rescue --generic-release* --initial-setup-gui --kernel --plymouth -# pulled in by @standard --smartmontools --smartmontools-selinux - -%end +##### end custom post script ######################################## From fda88e6c425317bdc4010618276fa25b81f544c8 Mon Sep 17 00:00:00 2001 From: Peter Boy Date: Sep 06 2022 19:00:41 +0000 Subject: [PATCH 7/9] Fixed missing # signs --- diff --git a/fedora-server-vm-full.ks b/fedora-server-vm-full.ks index c487880..c985111 100644 --- a/fedora-server-vm-full.ks +++ b/fedora-server-vm-full.ks @@ -145,7 +145,7 @@ dnf clean all echo "Removing linux-firmware package." rpm -e linux-firmware - Will ever anybody see this? +# Will ever anybody see this? echo "Packages within this disk image" rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn @@ -153,7 +153,7 @@ rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn rm -f /var/lib/rpm/__db* - Do we need a serial terminal with a VM? +# Do we need a serial terminal with a VM? if [[ $arch == "aarch64" ]] || [[ $arch == "armv7l" ]]; then # Anaconda adds console=tty0 to the grub boot line on all images. this is problematic # when you are using fedora via serial console as you do not get any output post grub From 7ffe93ee98cd8af0e7892f192eebe7aa843c4abd Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Sep 07 2022 14:05:28 +0000 Subject: [PATCH 8/9] workstation: Adapt to renamed gnome-software autostart file name It's now 'org.gnome.Software.desktop' instead of 'gnome-software-service.desktop' so we need to update the rm to match. --- diff --git a/fedora-live-workstation.ks b/fedora-live-workstation.ks index ceed277..aa3aeaa 100644 --- a/fedora-live-workstation.ks +++ b/fedora-live-workstation.ks @@ -25,7 +25,7 @@ download-updates=false FOE # don't autostart gnome-software session service -rm -f /etc/xdg/autostart/gnome-software-service.desktop +rm -f /etc/xdg/autostart/org.gnome.Software.desktop # disable the gnome-software shell search provider cat >> /usr/share/gnome-shell/search-providers/org.gnome.Software-search-provider.ini << FOE From 708668758af86fd62472798503f5e21bf6081120 Mon Sep 17 00:00:00 2001 From: Peter Boy Date: Sep 08 2022 12:40:46 +0000 Subject: [PATCH 9/9] Replaced part biosboot and part /boot by reqpart --add-boot to cover different requirements by differen archs --- diff --git a/fedora-server-vm-full.ks b/fedora-server-vm-full.ks index c985111..463f895 100644 --- a/fedora-server-vm-full.ks +++ b/fedora-server-vm-full.ks @@ -1,4 +1,4 @@ -# fedora-server-vm-full.ks (rel. 1.0) +# fedora-server-vm-full.ks (rel. 1.01) # Kickstart file to build a Fedora Server Edition VM disk image. # The image aims to resemble as close as technically possible the # full features of a Fedora Server Edition in a virtual machine. @@ -12,6 +12,9 @@ # To build the image locally, you need to install ImageFactory and # various additional helpers and configuration files. # See Fedora Server Edition user documentation tutorial. +# Changelog +# 1.01 modified partitioning to "reqpart --add-boot" to cover architecture +# specific differences # Use text mode install @@ -55,8 +58,9 @@ firstboot --reconfig # Partition Information. Use GPT by default (since Fedora 37) # Resemble the Partitioning used for Fedora Server Install media clearpart --all --initlabel --disklabel=gpt -part biosboot --size=1 --fstype=biosboot -part /boot --size=1000 --fstype=xfs --label=boot +##part biosboot --size=1 --fstype=biosboot +##part /boot --size=1000 --fstype=xfs --label=boot +reqpart --add-boot part pv.007 --size=4000 --grow volgroup sysvg pv.007 logvol / --vgname=sysvg --size=4000 --grow --maxsize=16000 --fstype=xfs --name=root --label=sysroot