# fix build (debuginfo package is empty...): # (we don't build anything, but we're arched b/c we include binaries from the # system into an image) %define debug_package %{nil} # (tmb) mga#4876: use version for stable, and cauldron for devel in iso name %if "%distro_branch" == "Cauldron" %global image_ver %{distro_branch} %else %global image_ver %{distro_release} %endif # start of image name %global image_name %{distribution}-%{image_ver} %if "%distro_section" == "nonfree" %global build_nonfree 1 # end of image name %global image_name_end nonfree-%{distro_arch} %global suffix2 "-nonfree" %else %global build_nonfree 0 # end of image name %global image_name_end %{distro_arch} %global suffix2 %nil %endif # enable this if you want to debug stage2 %define debug 0 %define theme Default %define kernel_version 6.12.63 %define kernel_release 1.mga10 %define main_kernel_version %{kernel_version}-%{kernel_release} %define kernels kernel-desktop-%main_kernel_version %global __requires_exclude (libcom32|libgpl|libutil)\\.c32 Summary: DrakX installer images Name: drakx-installer-images Version: 2.94 Release: %mkrel 12 Source0: %{name}-%{version}.tar.xz # NO PATCH ALLOWED License: GPL Group: Development/Other Url: https://wiki.mageia.org/en/Stage_One_install BuildRequires: %kernels kernel-firmware %ifarch %ix86 x86_64 BuildRequires: memtest86+ BuildRequires: grub BuildRequires: syslinux >= 6.03-6 %endif %ifarch x86_64 BuildRequires: grub2-efi >= 2.02.0-7 BuildRequires: grub2-mageia-theme %endif BuildRequires: drakx-installer-binaries >= 2.62-2 BuildRequires: drakx-kbd-mouse-x11 BuildRequires: ldetect-lst >= 0.6.25-1 BuildRequires: mageia-theme-%{theme} BuildRequires: pcmciautils BuildRequires: perl(XML::Parser) BuildRequires: sha3sum BuildRequires: xorriso BuildRequires: mknod-m600 BuildRequires: mtools BuildRequires: dracut >= 108-7 BuildRequires: strace bluez %if %debug BuildRequires: busybox %endif #Buildrequires: ka-deploy-source-node BuildRequires: dosfstools # For network-legacy dracut module BuildRequires: iproute2 sed gawk grep procps-ng coreutils iputils dhcp-client # Network tools BuildRequires: iputils BuildRequires: rp-pppoe BuildRequires: ppp BuildRequires: nfs-utils BuildRequires: wpa_supplicant # Libs needed as a side effect of including NFS tools: BuildRequires: nss_mdns # Firmwares: BuildRequires: zd1211-firmware BuildRequires: b43-openfwwf # BR for nonfree iso %if %{build_nonfree} BuildRequires: kernel-firmware-nonfree BuildRequires: atmel-firmware BuildRequires: ipw2100-firmware BuildRequires: ipw2200-firmware BuildRequires: iwlwifi-firmware BuildRequires: iwlwifi-agn-ucode BuildRequires: microcode >= 0.20180807-1 BuildRequires: ralink-firmware BuildRequires: rtlwifi-firmware BuildRequires: radeon-firmware %endif ExclusiveArch: x86_64 %{ix86} %description images needed to build %_vendor installer (DrakX) %if %{build_nonfree} The iso also includes nonfree firmware %endif Can be rebuilt with debug support. %if %{build_nonfree} %package nonfree Summary: DrakX installer images with nonfree firmware %description nonfree iso image needed run %_vendor installer (DrakX) with nonfree firmwares. %endif %prep %autosetup -p1 %build %if %debug # Example for building an automatic boot.iso: # export BOOT_AUTOMATIC_METHOD="method:http,ser:192.168.0.10,dir:/mageia/unstable,netw:dhcp" # Same example with workaround for slow VirtualBox (mga#44): # export BOOT_AUTOMATIC_METHOD="method:http,ser:192.168.0.10,dir:/mageia/unstable,netw:dhcp divider=0 " # Same example with skipping "useless" steps and forcing the locale to french: # export BOOT_AUTOMATIC_METHOD="method:http,ser:192.168.0.10,dir:/mageia/unstable,netw:dhcp divider=0 useless_thing_accepted flang=fr keyboard=fr lang=fr " # Same example with using your keyboard mapping with english install: # export BOOT_AUTOMATIC_METHOD="method:http,ser:192.168.0.10,dir:/mageia/unstable,netw:dhcp divider=0 useless_thing_accepted flang=en_US keyboard=fr lang=en_US " # Same example with faster but unsafe install (no fsync): # export BOOT_AUTOMATIC_METHOD="method:http,ser:192.168.0.10,dir:/mageia/unstable,netw:dhcp divider=0 useless_thing_accepted flang=en_US keyboard=fr lang=en_US tune-rpm " # Same example with light speed install (no real install, like rpm --justdb): # export BOOT_AUTOMATIC_METHOD="method:http,ser:192.168.0.10,dir:/mageia/unstable,netw:dhcp divider=0 useless_thing_accepted flang=en_US keyboard=fr lang=en_US tune-rpm justdb " perl -pi -e 's!compress=xz!compress=gzip!' images/dracut.conf export DEBUGSTAGE1=1 %endif THEME=%_vendor-%{theme} make -C images KERNELS="%{kernels}" %install %if %debug export DEBUGSTAGE1=1 %endif dest=$RPM_BUILD_ROOT%{_libdir}/%name mkdir -p $dest make -C images install ROOTDEST=$dest pushd $dest/install/images/ # add kernel version info echo kernel-%{kernel_version}-%{kernel_release}>VERSION # rename images mv boot.iso %{image_name}-netinstall-%{image_name_end}.iso mv all.img %{image_name}-all-%{image_name_end}.img mv hd_grub.img %{image_name}-hd_grub-%{image_name_end}.img rm -f $dest/install/images/{MD5SUM,SHA512SUM} %if %{build_nonfree} # move all.rdz to safety mv $dest/isolinux/%{_arch}/all.rdz $dest/all-nonfree.rdz # nuke everything but boot.iso, all.img and hd_grub.img rm -rf $dest/isolinux/* $dest/install/images/alternatives # restore all.rdz to correct path mkdir -p $dest/isolinux/%{_arch} mv $dest/all-nonfree.rdz $dest/isolinux/%{_arch}/ %endif # images renamed, so recreate md5, sha512 # now as separate files like we do for liveDVDs and Classic Installer isos for imgfile in *.img *.iso; do md5sum $imgfile >$imgfile.md5 sha512sum $imgfile >$imgfile.sha512 sha3-512sum $imgfile >$imgfile.sha3 done %if !%{build_nonfree} # create compat symlink ln -s %{image_name}-hd_grub-%{image_name_end}.img hd_grub.img %endif popd %if %{build_nonfree} %files nonfree %else %files %endif %{_libdir}/%name