Summary: A system for simplifying diskless cluster management Name: onesis Version: 2.0.5 Release: 2.liv1%{?dist} License: GPLv2+ URL: http://onesis.org Source0: https://downloads.sourceforge.net/onesis/oneSIS-%{version}.tar.gz Patch1: onesis-nofqdn.patch Patch2: onesis-r532.patch Patch3: onesis-r534.patch Patch4: onesis-r535.patch BuildRequires: perl(ExtUtils::MakeMaker) # The initramfs tarballs have machine-specific binaries, but they # could potentially be used from other arches. (The initramfs package # can't be arched under a noarch one anyhow.) BuildArch: noarch %define filelist %{name}-%{version}-filelist %description oneSIS is a powerful, flexible, and easy to use system for deploying and maintaining diskless systems. It enables a single system image to be used without change to manage any number of (functionally different) diskless machines. %package initramfs-%_arch Summary: initramfs template for %name BuildRequires: busybox ethtool wireless-tools pciutils %description initramfs-%_arch An initramfs template for %name using q static busybox and some glibc utils. %prep %setup -q -n oneSIS-%{version} %patch1 -p0 %patch2 -p0 %patch3 -p0 %patch4 -p0 # The binaries in here are free software, but without the specific # source. Purge them and copy in replacements from the current # distribution. (Jumping through the hoop that stops you unpacking # the tar file without the permission to deal with device nodes in # ./dev.) rm initramfs-templates/x86-uclibc.tar.gz mkdir initramfs pushd initramfs gunzip ../initramfs-templates/%_arch-glibc.tar.gz mkdir -p %_lib bin sbin usr/share/hwdata # Overwrite these in an update tar ft ../initramfs-templates/%_arch-glibc.tar|grep '\./lib64/.'|xargs touch cp -p /sbin/busybox bin cp -p /sbin/lspci sbin/lspci.real cp -p /sbin/ethtool /sbin/ifrename sbin install -p /usr/share/hwdata/pci.ids usr/share/hwdata/ gzip usr/share/hwdata/pci.ids cat <sbin/lspci #!/bin/ash #gunzip /usr/share/hwdata/pci.ids.gz rm -f /sbin/lspci mv /sbin/lspci.real /sbin/lspci exec /sbin/lspci $@ EOF chmod +x sbin/lspci cp -p /lib64/libc.so.6 /lib64/ld-linux-x86-64.so.2 /lib64/libiw.so.* /lib64/libm.so.6 lib64 tar uf ../initramfs-templates/%_arch-glibc.tar ./lib64 ./sbin ./usr ./bin popd gzip --best initramfs-templates/%_arch-glibc.tar %build make %install prefix=$RPM_BUILD_ROOT make install find $RPM_BUILD_ROOT -name ".packlist" -exec rm -f {} \; find $RPM_BUILD_ROOT -type f -print \ | sed -e "s|$RPM_BUILD_ROOT||" \ -e "s|\(/usr/share/man.*\)/\(.*\)|\1/\2.gz|" \ > %{filelist} %files -f %{filelist} %doc doc/oneSIS-manual doc/oneSIS-manual.pdf %{_sysconfdir}/sysimage.conf %{_sysconfdir}/oneSIS/initramfs.conf %exclude /usr/share/oneSIS/initramfs-templates/%_arch-glibc.tar.gz %config(noreplace) %{_sysconfdir}/sysimage.conf %config(noreplace) %{_sysconfdir}/oneSIS/initramfs.conf %files initramfs-%_arch %_datadir/oneSIS/initramfs-templates/%_arch-glibc.tar.gz %changelog * Tue Jun 4 2019 Dave Love - 2.0.5-2.liv1 - Fix initramfs template * Tue May 21 2019 Dave Love - 2.0.5-1.liv1 - New version