Merge remote-tracking branch 'qubesos/pr/33'

* qubesos/pr/33:
  drop busybox dependance
  centos: fix python packages names
  Remove busybox as it is not provided in RHEL7 anymore
  Fix python3 package names with respect to CentOS for consistency with python34 names
This commit is contained in:
Marek Marczykowski-Górecki 2018-02-25 21:15:46 +01:00
commit 258b7926ef
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
4 changed files with 48 additions and 16 deletions

View File

@ -10,7 +10,7 @@ if [ -e /dev/mapper/dmroot ] ; then
echo "Qubes: FATAL error: /dev/mapper/dmroot already exists?!"
fi
modprobe xenblk || modprobe xen-blkfront || echo "Qubes: Cannot load Xen Block Frontend..."
/sbin/modprobe xenblk || /sbin/modprobe xen-blkfront || echo "Qubes: Cannot load Xen Block Frontend..."
die() {
echo "$@" >&2
@ -47,7 +47,7 @@ if [ `cat /sys/class/block/$ROOT_DEV/ro` = 1 ] ; then
if [ $VOLATILE_SIZE -lt $SWAP_SIZE ]; then
die "volatile.img smaller than 1GB, cannot continue"
fi
sfdisk -q --unit S /dev/xvdc >/dev/null <<EOF
/sbin/sfdisk -q --unit S /dev/xvdc >/dev/null <<EOF
1,$SWAP_SIZE,S
,,L
EOF
@ -56,29 +56,29 @@ EOF
exit 1
fi
while ! [ -e /dev/xvdc1 ]; do sleep 0.1; done
mkswap /dev/xvdc1
/sbin/mkswap /dev/xvdc1
while ! [ -e /dev/xvdc2 ]; do sleep 0.1; done
echo "0 `cat /sys/class/block/$ROOT_DEV/size` snapshot /dev/$ROOT_DEV /dev/xvdc2 N 16" | \
dmsetup create dmroot || { echo "Qubes: FATAL: cannot create dmroot!"; exit 1; }
dmsetup mknodes dmroot
/sbin/dmsetup create dmroot || { echo "Qubes: FATAL: cannot create dmroot!"; exit 1; }
/sbin/dmsetup mknodes dmroot
echo Qubes: done.
else
echo "Qubes: Doing R/W setup for TemplateVM..."
while ! [ -e /dev/xvdc ]; do sleep 0.1; done
sfdisk -q --unit S /dev/xvdc >/dev/null <<EOF
/sbin/sfdisk -q --unit S /dev/xvdc >/dev/null <<EOF
1,$SWAP_SIZE,S
EOF
if [ $? -ne 0 ]; then
die "Qubes: failed to setup partitions on volatile device"
fi
while ! [ -e /dev/xvdc1 ]; do sleep 0.1; done
mkswap /dev/xvdc1
/sbin/mkswap /dev/xvdc1
ln -s ../$ROOT_DEV /dev/mapper/dmroot
echo Qubes: done.
fi
modprobe ext4
/sbin/modprobe ext4
mkdir -p /sysroot
mount /dev/mapper/dmroot /sysroot -o ro
@ -104,4 +104,4 @@ fi
umount /dev /sys /proc
exec switch_root $NEWROOT /sbin/init
exec /sbin/switch_root $NEWROOT /sbin/init

View File

@ -5,13 +5,26 @@ check() {
}
depends() {
echo busybox dm
echo dm
return 0
}
install() {
inst $moddir/init.sh /init
inst_multiple \
basename \
readlink \
uname \
grep \
kmod \
modprobe \
ln \
switch_root \
mount \
umount \
mkdir \
rmdir \
sleep \
sfdisk \
mkswap
}

View File

@ -37,7 +37,6 @@ URL: http://www.qubes-os.org
Requires: dracut
Requires: dkms
Requires: busybox
%define _builddir %(pwd)

View File

@ -15,7 +15,11 @@ URL: http://www.qubes-os.org
Requires: udev
Requires: %{name}-libs
Requires: ImageMagick
%if 0%{?rhel} >= 7
Requires: python34-qubesimgconverter
%else
Requires: python3-qubesimgconverter
%endif
BuildRequires: qubes-libvchan-devel
BuildRequires: python-setuptools
%if 0%{?rhel} >= 7
@ -35,26 +39,38 @@ Common Linux files for Qubes Dom0 and VM
Summary: Python package qubesimgconverter
Requires: python
Requires: pycairo
%if 0%{?rhel} >= 7
Requires: python-pillow
Requires: numpy
%else
Requires: python2-pillow
Requires: python2-numpy
%endif
%description -n python2-qubesimgconverter
Python package qubesimgconverter
%if 0%{?rhel} >= 7
%package -n python34-qubesimgconverter
Summary: Python package qubesimgconverter
Requires: python34
Requires: python34-cairo
Requires: python34-pillow
Requires: python34-numpy
%description -n python34-qubesimgconverter
Python package qubesimgconverter
%else
%package -n python3-qubesimgconverter
Summary: Python package qubesimgconverter
%if 0%{?rhel} >= 7
Requires: python34
Requires: pycairo
%else
Requires: python3
Requires: python3-cairo
%endif
Requires: python3-pillow
Requires: python3-numpy
%description -n python3-qubesimgconverter
Python package qubesimgconverter
%endif
%package devel
Summary: Development headers for qubes-utils
@ -120,7 +136,11 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitelib}/qubesimgconverter/test_integ.py*
%{python_sitelib}/qubesimgconverter-%{version}-py?.?.egg-info
%if 0%{?rhel} >= 7
%files -n python34-qubesimgconverter
%else
%files -n python3-qubesimgconverter
%endif
%{python3_sitelib}/qubesimgconverter/__init__.py
%{python3_sitelib}/qubesimgconverter/imggen.py
%{python3_sitelib}/qubesimgconverter/test.py