Update and workaround squashfs.img on non-s390x #1
14
agama-installer.tftpbootlinks.txt
Normal file
14
agama-installer.tftpbootlinks.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
/EFI/BOOT/MokManager.efi
|
||||
/EFI/BOOT/bootaa64.efi
|
||||
/EFI/BOOT/bootx64.efi
|
||||
/EFI/BOOT/grub.efi
|
||||
/boot/aarch64/loader/initrd
|
||||
/boot/aarch64/loader/linux
|
||||
/boot/x86_64/loader/initrd
|
||||
/boot/x86_64/loader/linux
|
||||
/boot/s390x/initrd
|
||||
/boot/s390x/linux
|
||||
/boot/ppc64le/initrd
|
||||
/boot/ppc64le/linux
|
||||
/LiveOS/squashfs.img
|
||||
|
||||
14
agama-installer.tftpbootpatterns.txt
Normal file
14
agama-installer.tftpbootpatterns.txt
Normal file
@@ -0,0 +1,14 @@
|
||||
^/LiveOS/squashfs\.img$
|
||||
^/EFI/BOOT/.*\.efi$
|
||||
^/boot/.*/initrd$
|
||||
^/boot/.*/linux$
|
||||
^/suse\.ins$
|
||||
^/susehmc\.ins$
|
||||
^/boot/s390x/cd\.ikr$
|
||||
^/boot/s390x/initrd\.off$
|
||||
^/boot/s390x/initrd\.siz$
|
||||
^/boot/s390x/parmfile$
|
||||
^/boot/s390x/parmfile\.hmc$
|
||||
^/boot/s390x/sles\.exec$
|
||||
^/boot/s390x/suse\.ins$
|
||||
^/boot/s390x/zipl\.map$
|
||||
@@ -1,3 +1,32 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 10 09:20:15 UTC 2025 - Max Lin <mlin@suse.com>
|
||||
|
||||
- Only add squashfs.img to CD1 if s390x architecture
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 5 21:29:52 UTC 2025 - Eugenio Paolantonio <eugenio.paolantonio@suse.com>
|
||||
|
||||
- 0.2.7
|
||||
* tftpboot: package s390x specific files
|
||||
* maintain the directory structure rather than putting everything inside
|
||||
the loader/ directory. Files are also symlinked into loader/ to
|
||||
keep old configurations working
|
||||
* add skelcd package that can be extracted in ftp-trees (bsc#1248800)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 2 09:13:28 UTC 2025 - Eugenio Paolantonio <eugenio.paolantonio@suse.com>
|
||||
|
||||
- 0.2.6
|
||||
* rework tftpboot rpm generation: extract the whole live squashfs
|
||||
filesystem from the standard agama-installer iso, rather than
|
||||
using the purpose-built PXE images (which will be likely dropped
|
||||
soon)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 24 13:27:33 CEST 2025 - Ruediger Oertel <ro@suse.de>
|
||||
|
||||
* copy milestone files along with the created rpms if they exist
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 28 09:59:09 UTC 2025 - Giacomo Leidi <giacomo.leidi@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package baseiso-containment
|
||||
#
|
||||
# Copyright (c) 2025 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -17,15 +17,18 @@
|
||||
|
||||
|
||||
Name: baseiso-containment
|
||||
Version: 0.2.5
|
||||
Version: 0.2.7
|
||||
Release: 0
|
||||
Summary: Wraps Agama build for product composer
|
||||
License: MIT
|
||||
Group: System/Management
|
||||
Source1: baseiso.spec.in
|
||||
Source2: baseiso_post_run
|
||||
Source3: agama-installer.tftpbootpatterns.txt
|
||||
Source4: agama-installer.tftpbootlinks.txt
|
||||
BuildRequires: filesystem
|
||||
BuildArch: noarch
|
||||
Requires: mkisofs
|
||||
|
||||
%description
|
||||
Wraps Agama build as base image for product composer
|
||||
@@ -33,11 +36,15 @@ Wraps Agama build as base image for product composer
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/build/post_build.d
|
||||
install -m 644 %{S:1} %{buildroot}%{_prefix}/lib/build/
|
||||
install -m 644 %{S:3} %{buildroot}%{_prefix}/lib/build/
|
||||
install -m 644 %{S:4} %{buildroot}%{_prefix}/lib/build/
|
||||
install -m 755 %{S:2} %{buildroot}%{_prefix}/lib/build/post_build.d/
|
||||
|
||||
%files
|
||||
%dir %{_prefix}/lib/build/post_build.d
|
||||
%{_prefix}/lib/build/post_build.d/*_post_run
|
||||
%{_prefix}/lib/build/baseiso.spec.in
|
||||
%{_prefix}/lib/build/*.tftpbootpatterns.txt
|
||||
%{_prefix}/lib/build/*.tftpbootlinks.txt
|
||||
|
||||
%changelog
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
# needsrootforbuild
|
||||
|
||||
%bcond pxeboot 0
|
||||
# Keep this as a bcond for the future, but always
|
||||
# enable it by default as baseiso-containment only
|
||||
# works for agama-installer ISOs currently
|
||||
%bcond pxeboot 1
|
||||
|
||||
# Patterns file name can be specified by defining %{tftpbootpatterns_name},
|
||||
# or it defaults to "agama-installer".
|
||||
%define tftpbootpatterns_path /usr/lib/build/%{?tftpbootpatterns_name}%{!?tftpbootpatterns_name:agama-installer}.tftpbootpatterns.txt
|
||||
%define tftpbootlinks_path /usr/lib/build/%{?tftpbootpatterns_name}%{!?tftpbootpatterns_name:agama-installer}.tftpbootlinks.txt
|
||||
|
||||
Url: http://www.suse.com/
|
||||
Name: baseiso-__NAME____FLAVOR__
|
||||
@@ -11,10 +19,12 @@ Group: System/Management
|
||||
License: SUSE-EULA
|
||||
Provides: baseiso(__NAME____FLAVOR__)
|
||||
|
||||
%define install_dir %{_libexecdir}/base-isos
|
||||
%define tftpboot_dir /usr/share/tftpboot-installation
|
||||
%define product_dir %{tftpboot_dir}/__NAME____FLAVOR__
|
||||
%define pxeboot_dir %{product_dir}/%{_arch}/loader
|
||||
%define install_dir %{_libexecdir}/base-isos
|
||||
%define tftpboot_dir /usr/share/tftpboot-installation
|
||||
%define product_dir %{tftpboot_dir}/__NAME____FLAVOR__
|
||||
%define pxeboot_dir %{product_dir}/%{_arch}
|
||||
%define skelcd_dir /usr/lib/skelcd
|
||||
%define skelcd_cd1_dir %{skelcd_dir}/CD1
|
||||
|
||||
%description
|
||||
Images to be used by product composer as a base. It is designed
|
||||
@@ -29,14 +39,50 @@ BuildArch: noarch
|
||||
Loaders that can be used for PXE boot, extracted from the installer
|
||||
content.
|
||||
|
||||
%package -n skelcd-__NAME____FLAVOR__
|
||||
Summary: Product Composer Base Images (skeleton data)
|
||||
Group: System/Management
|
||||
|
||||
%description -n skelcd-__NAME____FLAVOR__
|
||||
Loaders that can be extracted in ftp-trees.
|
||||
|
||||
%install
|
||||
mkdir -p %buildroot%{install_dir}
|
||||
cp -a /usr/src/packages/KIWI/* %buildroot%install_dir
|
||||
|
||||
|
||||
%if %{with pxeboot}
|
||||
mkdir -p %{buildroot}%{pxeboot_dir}
|
||||
tar -xvf %{buildroot}%{install_dir}/__NAME__*.install.tar -C %{buildroot}%{pxeboot_dir} --transform 's/__NAME__.%{_arch}-__VERSION__./pxe-installer./' --show-transformed-names
|
||||
ls -ltha %{buildroot}%{pxeboot_dir}
|
||||
mkdir -p %{buildroot}%{skelcd_cd1_dir}
|
||||
for file in $(isoinfo -R -i %{buildroot}%{install_dir}/*.iso -find -type f -print | grep -Ef %{tftpbootpatterns_path}); do
|
||||
mkdir -p %{buildroot}%{pxeboot_dir}/$(dirname ${file})
|
||||
if [[ ! "$file" =~ "squashfs.img" ]]; then
|
||||
mkdir -p %{buildroot}%{skelcd_cd1_dir}/$(dirname ${file})
|
||||
else
|
||||
if [ "%{_arch}" == "s390x" ]; then
|
||||
mkdir -p %{buildroot}%{skelcd_cd1_dir}/$(dirname ${file})
|
||||
fi
|
||||
fi
|
||||
isoinfo -R -i %{buildroot}%{install_dir}/*.iso -x ${file} > %{buildroot}%{pxeboot_dir}/${file}
|
||||
if [[ ! "$file" =~ "squashfs.img" ]]; then
|
||||
cp %{buildroot}%{pxeboot_dir}/${file} %{buildroot}%{skelcd_cd1_dir}/${file}
|
||||
else
|
||||
if [ "%{_arch}" == "s390x" ]; then
|
||||
cp %{buildroot}%{pxeboot_dir}/${file} %{buildroot}%{skelcd_cd1_dir}/${file}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Create compatibility symlinks with the directory structure used by older
|
||||
# baseiso-containment releases.
|
||||
# They will go in %{pxeboot_dir}/loader. This is only needed only for
|
||||
# the tftpboot- packages.
|
||||
if [ -e %{tftpbootlinks_path} ]; then
|
||||
mkdir -p %{buildroot}%{pxeboot_dir}/loader
|
||||
cat %{tftpbootlinks_path} | while read file; do
|
||||
[ ! -e %{buildroot}%{pxeboot_dir}/${file} ] || ln -s %{pxeboot_dir}/${file} %{buildroot}%{pxeboot_dir}/loader/$(basename ${file})
|
||||
done
|
||||
fi
|
||||
%endif
|
||||
|
||||
if [ -n "__FLAVOR__" ]; then
|
||||
@@ -61,6 +107,11 @@ fi
|
||||
%defattr(-,root,root)
|
||||
%dir %attr(0755,tftp,tftp) %tftpboot_dir
|
||||
%tftpboot_dir
|
||||
|
||||
%files -n skelcd-__NAME____FLAVOR__
|
||||
%defattr(-,root,root)
|
||||
%dir %skelcd_dir
|
||||
%skelcd_cd1_dir
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
@@ -35,25 +35,15 @@ ARCH="$(uname -m)"
|
||||
|
||||
set +e # we have set -e, so on Minimal VMs this needs to fail silently
|
||||
iso_file=`ls -1 /usr/src/packages/KIWI/agama-installer*.iso 2>/dev/null`
|
||||
pxe_file=`ls -1 /usr/src/packages/KIWI/agama-installer*.install.tar 2>/dev/null`
|
||||
milestone_file=`ls -1 /usr/src/packages/KIWI/agama-installer*.milestone 2>/dev/null`
|
||||
set -e
|
||||
|
||||
# nothing to do for us
|
||||
if [ -z "$iso_file" ] && [ -z "$pxe_file" ]; then
|
||||
if [ -z "$iso_file" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -n "$pxe_file" ]; then
|
||||
PXEBOOT_BCOND="--with pxeboot"
|
||||
else
|
||||
PXEBOOT_BCOND="--without pxeboot"
|
||||
fi
|
||||
|
||||
if [ -n "$iso_file" ]; then
|
||||
main_file=${iso_file##*/}
|
||||
else
|
||||
main_file=${pxe_file##*/}
|
||||
fi
|
||||
main_file=${iso_file##*/}
|
||||
|
||||
iso_name=${main_file%.$ARCH*}
|
||||
iso_version=${main_file#*$ARCH-}
|
||||
@@ -84,9 +74,9 @@ sed -e "s@__NAME__@$iso_name@g" \
|
||||
cp -v $TOPDIR/SOURCES/*.changes $BUILD_DIR/image.changes
|
||||
|
||||
if [ -z "$BUILD_DISTURL" ]; then
|
||||
rpmbuild --target $ARCH -ba $PXEBOOT_BCOND $BUILD_DIR/image.spec
|
||||
rpmbuild --target $ARCH -ba $BUILD_DIR/image.spec
|
||||
else
|
||||
rpmbuild --target $ARCH -ba $PXEBOOT_BCOND --define "disturl $BUILD_DISTURL" $BUILD_DIR/image.spec
|
||||
rpmbuild --target $ARCH -ba --define "disturl $BUILD_DISTURL" $BUILD_DIR/image.spec
|
||||
fi
|
||||
|
||||
# required for the BS to find the rpm, because it is
|
||||
@@ -96,4 +86,14 @@ mv $TOPDIR/RPMS/$ARCH/baseiso-$iso_name$FLAVOR-$iso_version-$iso_build.$ARCH.rpm
|
||||
if [ -e $TOPDIR/RPMS/noarch/tftpboot-$iso_name$FLAVOR-$ARCH-$iso_version-$iso_build.noarch.rpm ]; then
|
||||
mv $TOPDIR/RPMS/noarch/tftpboot-$iso_name$FLAVOR-$ARCH-$iso_version-$iso_build.noarch.rpm $TOPDIR/OTHER/
|
||||
fi
|
||||
if [ -e $TOPDIR/RPMS/$ARCH/skelcd-$iso_name$FLAVOR-$iso_version-$iso_build.$ARCH.rpm ]; then
|
||||
mv $TOPDIR/RPMS/$ARCH/skelcd-$iso_name$FLAVOR-$iso_version-$iso_build.$ARCH.rpm $TOPDIR/OTHER/
|
||||
fi
|
||||
mv $TOPDIR/SRPMS/baseiso-$iso_name$FLAVOR-$iso_version-$iso_build.src.rpm $TOPDIR/OTHER/
|
||||
if [ -e "$milestone_file" ]; then
|
||||
for rpmpack in $TOPDIR/OTHER/*rpm ; do
|
||||
test -e $rpmpack || continue
|
||||
cp -a $milestone_file ${rpmpack%.rpm}.milestone
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user