From 8247b33a98de61ee5281fdc10ca4ad853626267b456e70611d120e8401ecace6 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Tue, 12 Nov 2024 18:34:16 +0000 Subject: [PATCH] ironic-ipa-ramdisk: add new/renamed package To align with isv:SUSE:Edge:Metal3:Ironic:2024.2 --- .obs/workflows.yml | 4 + ironic-ipa-ramdisk/_constraints | 8 + ironic-ipa-ramdisk/config.sh | 105 +++++++++++++ ironic-ipa-ramdisk/ironic-ipa-ramdisk.kiwi | 173 +++++++++++++++++++++ ironic-ipa-ramdisk/ironic-ipa-ramdisk.spec | 167 ++++++++++++++++++++ ironic-ipa-ramdisk/root.tar.bz2 | Bin 0 -> 3866 bytes 6 files changed, 457 insertions(+) create mode 100644 ironic-ipa-ramdisk/_constraints create mode 100644 ironic-ipa-ramdisk/config.sh create mode 100644 ironic-ipa-ramdisk/ironic-ipa-ramdisk.kiwi create mode 100644 ironic-ipa-ramdisk/ironic-ipa-ramdisk.spec create mode 100644 ironic-ipa-ramdisk/root.tar.bz2 diff --git a/.obs/workflows.yml b/.obs/workflows.yml index af2407f..8c923ad 100644 --- a/.obs/workflows.yml +++ b/.obs/workflows.yml @@ -230,3 +230,7 @@ staging_build: source_package: kube-rbac-proxy-image source_project: isv:SUSE:Edge:Factory target_project: isv:SUSE:Edge:Factory:Staging + - branch_package: + source_package: ironic-ipa-ramdisk + source_project: isv:SUSE:Edge:Factory + target_project: isv:SUSE:Edge:Factory:Staging diff --git a/ironic-ipa-ramdisk/_constraints b/ironic-ipa-ramdisk/_constraints new file mode 100644 index 0000000..19d0995 --- /dev/null +++ b/ironic-ipa-ramdisk/_constraints @@ -0,0 +1,8 @@ + + + 4 + + 12 + + + diff --git a/ironic-ipa-ramdisk/config.sh b/ironic-ipa-ramdisk/config.sh new file mode 100644 index 0000000..8285ba4 --- /dev/null +++ b/ironic-ipa-ramdisk/config.sh @@ -0,0 +1,105 @@ +#!/bin/bash + +test -f /.kconfig && . /.kconfig +test -f /.profile && . /.profile + +#====================================== +# Greeting... +#-------------------------------------- +echo "Configure image: [$kiwi_iname]..." + +#========================================== +# setup build day +#------------------------------------------ +baseSetupBuildDay + +#====================================== +# Mount system filesystems +#-------------------------------------- +#baseMount + +#========================================== +# remove unneded kernel files +#------------------------------------------ +suseStripKernel +baseStripLocales en_US.utf-8 C.utf8 + +#====================================== +# Setup baseproduct link +#-------------------------------------- +suseSetupProduct + +#====================================== +# Add missing gpg keys to rpm +#-------------------------------------- +suseImportBuildKey + +#====================================== +# Activate services +#-------------------------------------- +baseInsertService openstack-ironic-python-agent +baseInsertService suse-ironic-image-setup +baseInsertService suse-network-setup +baseInsertService sshd +baseInsertService NetworkManager +#suseInsertService sshd +#suseInsertService openstack-ironic-python-agent +#suseInsertService suse-ironic-image-setup + +echo 'DEFAULT_TIMEZONE="UTC"' >> /etc/sysconfig/clock +baseUpdateSysConfig /etc/sysconfig/clock HWCLOCK "-u" +baseUpdateSysConfig /etc/sysconfig/clock TIMEZONE UTC +baseUpdateSysConfig /etc/sysconfig/network/dhcp DHCLIENT_SET_HOSTNAME no +baseUpdateSysConfig /etc/sysconfig/network/dhcp WRITE_HOSTNAME_TO_HOSTS no + +#========================================== +# generate autologin@ service +# based on getty@ service +#------------------------------------------ +#sed 's/^ExecStart=.*/\0 --autologin root/' /usr/lib/systemd/system/getty@.service > /etc/systemd/system/autologin\@.service +sed -E 's/^(ExecStart=.*\/agetty).*(--noclear.*)/\1 \2 --autologin root/' /usr/lib/systemd/system/getty@.service > /etc/systemd/system/autologin\@.service + +#========================================== +# add fstab entry for tmpfs based /tmp +#------------------------------------------ +echo 'tmpfs /tmp tmpfs size=3G 0 0' >> /etc/fstab + +#========================================== +# remove package docs and manuals +#------------------------------------------ +#baseStripDocs +#baseStripMans +#baseStripInfos + +#====================================== +# only basic version of vim is +# installed; no syntax highlighting +#-------------------------------------- +sed -i -e's/^syntax on/" syntax on/' /etc/vimrc + +#====================================== +# Remove yast if not in use +#-------------------------------------- +#suseRemoveYaST + +#====================================== +# Remove package manager +#-------------------------------------- +#suseStripPackager + +#rm -f usr/lib/perl5/*/*/auto/Encode/??/??.so # 9MB + +#====================================== +# Umount kernel filesystems +#-------------------------------------- +#baseCleanMount + +ln -s /sbin/init /init + +#========================================== +# umount +#------------------------------------------ +umount /proc >/dev/null 2>&1 + +exit 0 + diff --git a/ironic-ipa-ramdisk/ironic-ipa-ramdisk.kiwi b/ironic-ipa-ramdisk/ironic-ipa-ramdisk.kiwi new file mode 100644 index 0000000..315d4d0 --- /dev/null +++ b/ironic-ipa-ramdisk/ironic-ipa-ramdisk.kiwi @@ -0,0 +1,173 @@ + + + + Cloud developers + cloud-devel@suse.de + kernel and ramdisk image for metal3 + + + + + + en_US + zypper + false + UTC + 1.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ironic-ipa-ramdisk/ironic-ipa-ramdisk.spec b/ironic-ipa-ramdisk/ironic-ipa-ramdisk.spec new file mode 100644 index 0000000..2e4232a --- /dev/null +++ b/ironic-ipa-ramdisk/ironic-ipa-ramdisk.spec @@ -0,0 +1,167 @@ +# +# spec file for package openstack-ironic-image +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# +# needsrootforbuild +# needsbinariesforbuild + + +Name: ironic-ipa-ramdisk +Version: 3.0.0 +Release: 0 +Summary: Kernel and ramdisk image for OpenStack Ironic +License: SUSE-EULA +Group: System/Management +URL: https://github.com/SUSE-Cloud/ +Source0: config.sh +Source10: ironic-ipa-ramdisk.kiwi +Source20: root.tar.bz2 + +BuildRequires: -post-build-checks +BuildRequires: bash +BuildRequires: kiwi +BuildRequires: kiwi-tools +BuildRequires: zypper +BuildArch: noarch + +BuildRequires: checkmedia +BuildRequires: acl +BuildRequires: ca-certificates +BuildRequires: cracklib-dict-full +BuildRequires: cron +BuildRequires: dbus-1 +BuildRequires: elfutils +BuildRequires: filesystem +BuildRequires: fipscheck +BuildRequires: fontconfig +BuildRequires: fonts-config +BuildRequires: gptfdisk +BuildRequires: grub2 +BuildRequires: grub2-x86_64-efi +BuildRequires: haveged +BuildRequires: hdparm +BuildRequires: hwinfo +BuildRequires: ipmitool +BuildRequires: iproute2 +BuildRequires: iputils +BuildRequires: kernel-default +BuildRequires: kernel-firmware +BuildRequires: lvm2 +BuildRequires: net-tools +BuildRequires: ntp +BuildRequires: open-iscsi +BuildRequires: openssh +BuildRequires: openstack-ironic-python-agent +BuildRequires: pam-config +BuildRequires: parted +BuildRequires: patterns-base-minimal_base +BuildRequires: pinentry +BuildRequires: pkgconfig +BuildRequires: Mesa-gallium +BuildRequires: plymouth +BuildRequires: plymouth-scripts +BuildRequires: python311-proliantutils +BuildRequires: psmisc +BuildRequires: qemu-tools +BuildRequires: sg3_utils +BuildRequires: sles-release +BuildRequires: sudo +BuildRequires: suse-build-key +BuildRequires: systemd-presets-branding-SLE +BuildRequires: timezone +BuildRequires: udev +BuildRequires: vim +BuildRequires: wpa_supplicant +BuildRequires: dhcp-client +BuildRequires: which +BuildRequires: NetworkManager +BuildRequires: nm-configurator-030 +BuildRequires: logrotate +BuildRequires: plymouth-dracut +BuildRequires: plymouth-theme-bgrt +BuildRequires: dracut-kiwi-oem-dump +BuildRequires: dracut-kiwi-oem-repart +BuildRequires: gfxboot-branding-SLE +BuildRequires: grub2-branding-SLE +BuildRequires: open-iscsi +BuildRequires: plymouth-branding-SLE +BuildRequires: lshw +BuildRequires: kbd +%ifarch aarch64 +BuildRequires: dmidecode +BuildRequires: efibootmgr +%endif +%ifarch x86_64 +BuildRequires: dmidecode +BuildRequires: efibootmgr +BuildRequires: syslinux +%endif + +%description +Kernel and ramdisk image for use with Metal3 + +%package %{_arch} +Summary: Kernel and ramdisk image for Metal3 +Group: System/Management +Provides: openstack-ironic-python-agent = %{version} +Obsoletes: openstack-ironic-python-agent < %{version} + +%description %{_arch} +Kernel and ramdisk image for use with Metal3 +For %{_arch} + +%prep +mkdir -p /tmp/openstack-ironic-image/build /tmp/openstack-ironic-image/root /tmp/openstack-ironic-image/img + +cp -a %{SOURCE0} /tmp/openstack-ironic-image/config.sh + +cp -a %{SOURCE10} /tmp/openstack-ironic-image/config.kiwi + +tar -xC /tmp/openstack-ironic-image/root -f %{SOURCE20} + +%build +if ! which kiwi; then + cat <&2 +kiwi not found in \$PATH; most likely this build was missing +the --userootforbuild option. If you are invoking osc build +manually, please use 'make buildlocal' instead. +EOF + exit 1 +fi + +kiwi-ng --debug --profile default system build --description /tmp/openstack-ironic-image --target-dir /tmp/openstack-ironic-image/img + +%install +TDIR=`mktemp -d /tmp/openstack-ironic-image.XXXXX` +cd /tmp/openstack-ironic-image/img/build/image-root +find . | cpio --create --format=newc --quiet > $TDIR/initrdtmp +cd $TDIR +gzip -9 -f initrdtmp +INITRDGZ=`ls *.gz | head -1` +gzip -cd $INITRDGZ | xz --check=crc32 -c9 > initrd.xz +INITRD=`ls *.xz | head -1` + +ls /tmp/openstack-ironic-image/img/openstack-ironic-image* +KERNEL=`ls /tmp/openstack-ironic-image/img/openstack-ironic-image*default*kernel | head -1` + +mkdir -p %{buildroot}/srv/tftpboot/openstack-ironic-image +install -p -m 644 $KERNEL $INITRD %{buildroot}/srv/tftpboot/openstack-ironic-image/ + +%files %{_arch} +%defattr(644,root,root) +%dir %attr(755, root, root) /srv/tftpboot/openstack-ironic-image +%attr(644, root, root) /srv/tftpboot/openstack-ironic-image/* + +%changelog diff --git a/ironic-ipa-ramdisk/root.tar.bz2 b/ironic-ipa-ramdisk/root.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000000000000000000000000000..b7be89a56cef5e1a5db424f5919a5260afcfcdd1f963159fa6d1fc6067566dcd GIT binary patch literal 3866 zcmV+#59RPeT4*^jL0KkKS@@}yBmf1Q|DDd&C8&P?|NsC0-=F{g|NjgEAOIi%0uTrY zU=X{j>E5~)1Dx%*T{~cO0d}ED9Sdh#H(=`66aqj1F7FJ8ASS8$H9UfzCe+l_@_42x zTRleWi-t|^iNaLHdEAkntFzZsK^GUCV?_&jT%$+6!b@w+G&*aG}?!$>Ux?6 zK*;q0iRBFj2r>o@CPej60iXah&;~=&217t-XahhPOql=x1e%fvm`_Nd>VB!^8hVC+ z1|gBOhJXM7001<^Jwe8XfHVL!0000Q00001kN^P00U}KZ6GCJY34#;U)bvk8(l?!G|)5#Moa!401%=91m@?2&XzRVh-hYJbZ0$3vBG^zg3K}q!}SPwq0T`e zkvD=50|0IaG=Ug9omf=O(Z8#gA=!FrDzSQ(DUc$oZ3JrEs zbKV?3h@Ef{CSO#65OHj5%`9<{Laxv@zQ$Vh=u9nU?|Jd163tZYY`=z-6br_C>Pgh` z2I^Q9X$XQ(GlUd2vXYKdSGGAgb>k=K!?%WWSn1HxcH`aw;L`*`5=bgYC#D`Qym^@; z9v-CrcPDWkrJE9cH$CVfjVOwdph$?Ie-y7`OL|Fbl1ERGC->G+f~mwz$rmKeaLS_U zBORKI(lG;}!~lp)i<;_^K1`EgAqEZ+KCRp{zNi3t3{)!;%B`_`<#a9{R64dMV^Fja zhw?Shav~xNqKRo(_*Pu6hMTq7QcPaYu3z(mOXB7XlNAB+M@v=Y0*ZCW~^fBH<@B3j2v3AlZW$xXLwbS zi`l(U^|xBoe4bI#btK5L)F_#;cy0Kjtp#m^xUPeo^#{0hT4g+RF1rKHdHKn$YMsp@ zOA`aVE<-I3(UqyQIUP%+V(V*z zTn|&TKOh)wCkhJYdvd>dr)FAYmf{eTKuhvD2+|G30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