17
0

1 Commits

Author SHA256 Message Date
d7c2399335 Sync changes to SLFO-1.2 branch 2025-08-20 09:04:04 +02:00
5 changed files with 46 additions and 19 deletions

View File

@@ -0,0 +1,4 @@
^/LiveOS/squashfs\.img$
^/EFI/BOOT/.*\.efi$
^/boot/.*/initrd$
^/boot/.*/linux$

View File

@@ -1,3 +1,17 @@
-------------------------------------------------------------------
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>

View File

@@ -17,15 +17,17 @@
Name: baseiso-containment
Version: 0.2.5
Version: 0.2.6
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
BuildRequires: filesystem
BuildArch: noarch
Requires: mkisofs
%description
Wraps Agama build as base image for product composer
@@ -33,11 +35,13 @@ 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 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
%changelog

View File

@@ -1,6 +1,13 @@
# 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
Url: http://www.suse.com/
Name: baseiso-__NAME____FLAVOR__
@@ -35,8 +42,9 @@ 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}
for file in $(isoinfo -R -i %{buildroot}%{install_dir}/*.iso -find -type f -print | grep -Ef %{tftpbootpatterns_path}); do
isoinfo -R -i %{buildroot}%{install_dir}/*.iso -x ${file} > %{buildroot}%{pxeboot_dir}/$(basename ${file})
done
%endif
if [ -n "__FLAVOR__" ]; then

View File

@@ -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
@@ -97,3 +87,10 @@ if [ -e $TOPDIR/RPMS/noarch/tftpboot-$iso_name$FLAVOR-$ARCH-$iso_version-$iso_bu
mv $TOPDIR/RPMS/noarch/tftpboot-$iso_name$FLAVOR-$ARCH-$iso_version-$iso_build.noarch.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