SHA256
1
0
forked from pool/libguestfs

- Include mkinitrd from 13.1 when building appliance for 13.2 or

later because dracut can not be used as replacement for mkinitrd
  and supermin is not ready yet

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=252
This commit is contained in:
Olaf Hering 2014-01-16 21:11:35 +00:00 committed by Git OBS Bridge
parent f7073632ba
commit 6e1bf6bd40
3 changed files with 33 additions and 3 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jan 16 21:29:47 CET 2014 - ohering@suse.de
- Include mkinitrd from 13.1 when building appliance for 13.2 or
later because dracut can not be used as replacement for mkinitrd
and supermin is not ready yet
-------------------------------------------------------------------
Tue Jan 7 14:22:52 CET 2014 - ohering@suse.de

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:82185e3f7204a84e95306ca7df3500838cefa5b21ff386e7b70663588b8fe41c
size 81391

View File

@ -69,6 +69,11 @@ Release: 0
%define _configure_python --disable-python
%define _configure_ruby --disable-ruby
%if %suse_version > 1310
%define use_included_mkinitrd 1
%else
%define use_included_mkinitrd 0
%endif
# /lib/udev is a symlink in 12.3+, package the full directory
%if %suse_version > 1220
%define udevrulesdir /usr/lib/udev/rules.d
@ -148,6 +153,7 @@ License: GPL-2.0
Group: System/Filesystems
Patch1000: 1000-force-virtio_blk-in-old-guest-kernel.patch
Source0: %{name}-%{version}.tar.xz
Source42: libguestfs.mkinitrd.tar.bz2
Source789653: Pod-Simple-3.23.tar.xz
Source10: libguestfs.mkinitrd.boot.sh
Source11: libguestfs.mkinitrd.setup.sh
@ -353,7 +359,9 @@ BuildRequires: jfsutils
BuildRequires: kernel-default
BuildRequires: lvm2
BuildRequires: mdadm
%if !%{use_included_mkinitrd}
BuildRequires: mkinitrd
%endif
BuildRequires: module-init-tools
BuildRequires: ntfs-3g
BuildRequires: ntfsprogs
@ -432,7 +440,7 @@ virtual machines.
%prep
: _ignore_exclusive_arch '%{?_ignore_exclusive_arch}'
%setup -q -a 789653
%setup -q -a 789653 -a 42
%patch1000 -p1
%build
@ -589,8 +597,20 @@ do
fi
done
head -n 1234 ext_cmds.txt missing_cmds.txt
%if %{use_included_mkinitrd}
ln -sfvbn mkinitrd-2.8.1 mkinitrd
ln -sfvbn mkinitrd/sbin/mkinitrd_setup mkinitrd_setup.sh
ln -sfvbn mkinitrd/sbin/mkinitrd mkinitrd.sh
cp -avb /lib/mkinitrd/scripts/* mkinitrd/scripts
mkdir -vp mkinitrd/setup mkinitrd/boot
ln -sfvbn lib/mkinitrd/bin mkinitrd/bin
sed -i~ "s@^INITRD_PATH=/lib/mkinitrd@INITRD_PATH=$PWD/mkinitrd@" mkinitrd/sbin/mkinitrd
%else
rm -rf mkinitrd
cp -av /lib/mkinitrd .
ln -sfvbn /sbin/mkinitrd_setup mkinitrd_setup.sh
ln -sfvbn /sbin/mkinitrd mkinitrd.sh
%endif
for bad in \
setup-storage.sh \
boot-storage.sh \
@ -637,7 +657,7 @@ done
test -n "$patched"
%endif
/sbin/mkinitrd_setup \
./mkinitrd_setup.sh \
-s $PWD/mkinitrd/scripts \
-i $PWD/mkinitrd
mkdir mkinitrd/boot_tmp
@ -663,7 +683,7 @@ additional_modules="
"
env PATH=${RPM_BUILD_ROOT}/usr/bin:${RPM_BUILD_ROOT}/usr/sbin:${PATH} \
bash -x \
/sbin/mkinitrd \
./mkinitrd.sh \
-l $PWD/mkinitrd \
-k vmlinuz.${arch} \
-i initramfs.${arch}.img \