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:
commit
258b7926ef
@ -10,7 +10,7 @@ if [ -e /dev/mapper/dmroot ] ; then
|
|||||||
echo "Qubes: FATAL error: /dev/mapper/dmroot already exists?!"
|
echo "Qubes: FATAL error: /dev/mapper/dmroot already exists?!"
|
||||||
fi
|
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() {
|
die() {
|
||||||
echo "$@" >&2
|
echo "$@" >&2
|
||||||
@ -47,7 +47,7 @@ if [ `cat /sys/class/block/$ROOT_DEV/ro` = 1 ] ; then
|
|||||||
if [ $VOLATILE_SIZE -lt $SWAP_SIZE ]; then
|
if [ $VOLATILE_SIZE -lt $SWAP_SIZE ]; then
|
||||||
die "volatile.img smaller than 1GB, cannot continue"
|
die "volatile.img smaller than 1GB, cannot continue"
|
||||||
fi
|
fi
|
||||||
sfdisk -q --unit S /dev/xvdc >/dev/null <<EOF
|
/sbin/sfdisk -q --unit S /dev/xvdc >/dev/null <<EOF
|
||||||
1,$SWAP_SIZE,S
|
1,$SWAP_SIZE,S
|
||||||
,,L
|
,,L
|
||||||
EOF
|
EOF
|
||||||
@ -56,29 +56,29 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
while ! [ -e /dev/xvdc1 ]; do sleep 0.1; done
|
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
|
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" | \
|
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; }
|
/sbin/dmsetup create dmroot || { echo "Qubes: FATAL: cannot create dmroot!"; exit 1; }
|
||||||
dmsetup mknodes dmroot
|
/sbin/dmsetup mknodes dmroot
|
||||||
echo Qubes: done.
|
echo Qubes: done.
|
||||||
else
|
else
|
||||||
echo "Qubes: Doing R/W setup for TemplateVM..."
|
echo "Qubes: Doing R/W setup for TemplateVM..."
|
||||||
while ! [ -e /dev/xvdc ]; do sleep 0.1; done
|
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
|
1,$SWAP_SIZE,S
|
||||||
EOF
|
EOF
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
die "Qubes: failed to setup partitions on volatile device"
|
die "Qubes: failed to setup partitions on volatile device"
|
||||||
fi
|
fi
|
||||||
while ! [ -e /dev/xvdc1 ]; do sleep 0.1; done
|
while ! [ -e /dev/xvdc1 ]; do sleep 0.1; done
|
||||||
mkswap /dev/xvdc1
|
/sbin/mkswap /dev/xvdc1
|
||||||
ln -s ../$ROOT_DEV /dev/mapper/dmroot
|
ln -s ../$ROOT_DEV /dev/mapper/dmroot
|
||||||
echo Qubes: done.
|
echo Qubes: done.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
modprobe ext4
|
/sbin/modprobe ext4
|
||||||
|
|
||||||
mkdir -p /sysroot
|
mkdir -p /sysroot
|
||||||
mount /dev/mapper/dmroot /sysroot -o ro
|
mount /dev/mapper/dmroot /sysroot -o ro
|
||||||
@ -104,4 +104,4 @@ fi
|
|||||||
|
|
||||||
umount /dev /sys /proc
|
umount /dev /sys /proc
|
||||||
|
|
||||||
exec switch_root $NEWROOT /sbin/init
|
exec /sbin/switch_root $NEWROOT /sbin/init
|
||||||
|
@ -5,13 +5,26 @@ check() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
depends() {
|
depends() {
|
||||||
echo busybox dm
|
echo dm
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
install() {
|
install() {
|
||||||
inst $moddir/init.sh /init
|
inst $moddir/init.sh /init
|
||||||
inst_multiple \
|
inst_multiple \
|
||||||
|
basename \
|
||||||
|
readlink \
|
||||||
|
uname \
|
||||||
|
grep \
|
||||||
|
kmod \
|
||||||
|
modprobe \
|
||||||
|
ln \
|
||||||
|
switch_root \
|
||||||
|
mount \
|
||||||
|
umount \
|
||||||
|
mkdir \
|
||||||
|
rmdir \
|
||||||
|
sleep \
|
||||||
sfdisk \
|
sfdisk \
|
||||||
mkswap
|
mkswap
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,6 @@ URL: http://www.qubes-os.org
|
|||||||
|
|
||||||
Requires: dracut
|
Requires: dracut
|
||||||
Requires: dkms
|
Requires: dkms
|
||||||
Requires: busybox
|
|
||||||
|
|
||||||
%define _builddir %(pwd)
|
%define _builddir %(pwd)
|
||||||
|
|
||||||
|
@ -15,7 +15,11 @@ URL: http://www.qubes-os.org
|
|||||||
Requires: udev
|
Requires: udev
|
||||||
Requires: %{name}-libs
|
Requires: %{name}-libs
|
||||||
Requires: ImageMagick
|
Requires: ImageMagick
|
||||||
|
%if 0%{?rhel} >= 7
|
||||||
|
Requires: python34-qubesimgconverter
|
||||||
|
%else
|
||||||
Requires: python3-qubesimgconverter
|
Requires: python3-qubesimgconverter
|
||||||
|
%endif
|
||||||
BuildRequires: qubes-libvchan-devel
|
BuildRequires: qubes-libvchan-devel
|
||||||
BuildRequires: python-setuptools
|
BuildRequires: python-setuptools
|
||||||
%if 0%{?rhel} >= 7
|
%if 0%{?rhel} >= 7
|
||||||
@ -35,26 +39,38 @@ Common Linux files for Qubes Dom0 and VM
|
|||||||
Summary: Python package qubesimgconverter
|
Summary: Python package qubesimgconverter
|
||||||
Requires: python
|
Requires: python
|
||||||
Requires: pycairo
|
Requires: pycairo
|
||||||
|
%if 0%{?rhel} >= 7
|
||||||
|
Requires: python-pillow
|
||||||
|
Requires: numpy
|
||||||
|
%else
|
||||||
Requires: python2-pillow
|
Requires: python2-pillow
|
||||||
Requires: python2-numpy
|
Requires: python2-numpy
|
||||||
|
%endif
|
||||||
|
|
||||||
%description -n python2-qubesimgconverter
|
%description -n python2-qubesimgconverter
|
||||||
Python package 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
|
%package -n python3-qubesimgconverter
|
||||||
Summary: Python package qubesimgconverter
|
Summary: Python package qubesimgconverter
|
||||||
%if 0%{?rhel} >= 7
|
|
||||||
Requires: python34
|
|
||||||
Requires: pycairo
|
|
||||||
%else
|
|
||||||
Requires: python3
|
Requires: python3
|
||||||
Requires: python3-cairo
|
Requires: python3-cairo
|
||||||
%endif
|
|
||||||
Requires: python3-pillow
|
Requires: python3-pillow
|
||||||
Requires: python3-numpy
|
Requires: python3-numpy
|
||||||
|
|
||||||
%description -n python3-qubesimgconverter
|
%description -n python3-qubesimgconverter
|
||||||
Python package qubesimgconverter
|
Python package qubesimgconverter
|
||||||
|
%endif
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development headers for qubes-utils
|
Summary: Development headers for qubes-utils
|
||||||
@ -120,7 +136,11 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{python_sitelib}/qubesimgconverter/test_integ.py*
|
%{python_sitelib}/qubesimgconverter/test_integ.py*
|
||||||
%{python_sitelib}/qubesimgconverter-%{version}-py?.?.egg-info
|
%{python_sitelib}/qubesimgconverter-%{version}-py?.?.egg-info
|
||||||
|
|
||||||
|
%if 0%{?rhel} >= 7
|
||||||
|
%files -n python34-qubesimgconverter
|
||||||
|
%else
|
||||||
%files -n python3-qubesimgconverter
|
%files -n python3-qubesimgconverter
|
||||||
|
%endif
|
||||||
%{python3_sitelib}/qubesimgconverter/__init__.py
|
%{python3_sitelib}/qubesimgconverter/__init__.py
|
||||||
%{python3_sitelib}/qubesimgconverter/imggen.py
|
%{python3_sitelib}/qubesimgconverter/imggen.py
|
||||||
%{python3_sitelib}/qubesimgconverter/test.py
|
%{python3_sitelib}/qubesimgconverter/test.py
|
||||||
|
Loading…
Reference in New Issue
Block a user