Navigation Menu

Skip to content

Commit

Permalink
Add OpenMandriva support as guest and host (RHBZ#1694268).
Browse files Browse the repository at this point in the history
  • Loading branch information
berolinux authored and rwmjones committed Apr 3, 2019
1 parent f190e08 commit a4ef671
Show file tree
Hide file tree
Showing 8 changed files with 96 additions and 13 deletions.
15 changes: 8 additions & 7 deletions appliance/hostfiles.in
Expand Up @@ -5,13 +5,14 @@ dnl
dnl This file is processed by m4 with one of the
dnl following symbols defined (depending on the distro):
dnl
dnl REDHAT=1 For Fedora, RHEL, EPEL and workalikes.
dnl DEBIAN=1 For Debian.
dnl UBUNTU=1 For Ubuntu.
dnl ARCHLINUX=1 For Archlinux.
dnl SUSE=1 For OpenSUSE.
dnl FRUGALWARE=1 For Frugalware.
dnl MAGEIA=1 For Mageia.
dnl REDHAT=1 For Fedora, RHEL, EPEL and workalikes.
dnl DEBIAN=1 For Debian.
dnl UBUNTU=1 For Ubuntu.
dnl ARCHLINUX=1 For Archlinux.
dnl SUSE=1 For OpenSUSE.
dnl FRUGALWARE=1 For Frugalware.
dnl MAGEIA=1 For Mageia.
dnl OPENMANDRIVA=1 For OpenMandriva.

/etc/ld.so.cache
/lib/lsb/*
Expand Down
30 changes: 30 additions & 0 deletions appliance/packagelist.in
Expand Up @@ -227,6 +227,36 @@ ifelse(MAGEIA,1,
xz
)

ifelse(OPENMANDRIVA,1,
augeas
cryptsetup
chkconfig /* for /etc/init.d */
cdrkit-genisoimage
cdrkit-isotools
dhcp-client
extlinux
grub2
lib64hivex0
hivex
iproute2
iputils
libcap
libjansson4
lib64jansson4 /* lib64jansson4 does not provide libjansson4 */
libldm
libtirpc
dnl syslinux uses mtools without depending on it
mtools
nilfs-utils
ntfs-3g
openssh-clients
pcre
libselinux
systemd /* for /sbin/reboot and udevd */
vim-minimal
xz
)

acl
attr
bash
Expand Down
6 changes: 5 additions & 1 deletion daemon/inspect_fs.ml
Expand Up @@ -264,6 +264,7 @@ and check_package_format { distro } =
| Some DISTRO_MANDRIVA
| Some DISTRO_MEEGO
| Some DISTRO_NEOKYLIN
| Some DISTRO_OPENMANDRIVA
| Some DISTRO_OPENSUSE
| Some DISTRO_ORACLE_LINUX
| Some DISTRO_REDHAT_BASED
Expand Down Expand Up @@ -370,7 +371,10 @@ and check_package_management { distro; version } =
Some PACKAGE_MANAGEMENT_APK

| Some DISTRO_VOID_LINUX ->
Some PACKAGE_MANAGEMENT_XBPS;
Some PACKAGE_MANAGEMENT_XBPS

| Some DISTRO_OPENMANDRIVA ->
Some PACKAGE_MANAGEMENT_DNF

| Some DISTRO_BUILDROOT
| Some DISTRO_CIRROS
Expand Down
9 changes: 9 additions & 0 deletions daemon/inspect_fs_unix.ml
Expand Up @@ -54,6 +54,8 @@ let re_openbsd = PCRE.compile "^OpenBSD (\\d+|\\?)\\.(\\d+|\\?)"
let re_frugalware = PCRE.compile "Frugalware (\\d+)\\.(\\d+)"
let re_pldlinux = PCRE.compile "(\\d+)\\.(\\d+) PLD Linux"
let re_neokylin_version = PCRE.compile "^V(\\d+)Update(\\d+)$"
let re_openmandriva =
PCRE.compile "OpenMandriva.*release (\\d+)\\.(\\d+)\\.?(\\d+)? .*"

let arch_binaries =
[ "/bin/bash"; "/bin/ls"; "/bin/echo"; "/bin/rm"; "/bin/sh" ]
Expand Down Expand Up @@ -143,6 +145,7 @@ and distro_of_os_release_id = function
| "kali" -> Some DISTRO_KALI_LINUX
| "mageia" -> Some DISTRO_MAGEIA
| "neokylin" -> Some DISTRO_NEOKYLIN
| "openmandriva" -> Some DISTRO_OPENMANDRIVA
| "opensuse" -> Some DISTRO_OPENSUSE
| s when String.is_prefix s "opensuse-" -> Some DISTRO_OPENSUSE
| "pld" -> Some DISTRO_PLD_LINUX
Expand Down Expand Up @@ -376,6 +379,12 @@ let linux_root_tests : tests = [

(* Now we enter the Wild West ... *)

(* OpenMandriva includes a [/etc/redhat-release] symlink, hence their
* checks need to be performed before the Red-Hat one.
*)
"/etc/openmandriva-release", parse_generic ~rex:re_openmandriva
DISTRO_OPENMANDRIVA;

(* RHEL-based distros include a [/etc/redhat-release] file, hence their
* checks need to be performed before the Red-Hat one.
*)
Expand Down
2 changes: 2 additions & 0 deletions daemon/inspect_types.ml
Expand Up @@ -87,6 +87,7 @@ and distro =
| DISTRO_NEOKYLIN
| DISTRO_NETBSD
| DISTRO_OPENBSD
| DISTRO_OPENMANDRIVA
| DISTRO_OPENSUSE
| DISTRO_ORACLE_LINUX
| DISTRO_PARDUS
Expand Down Expand Up @@ -218,6 +219,7 @@ and string_of_distro = function
| DISTRO_NEOKYLIN -> "neokylin"
| DISTRO_NETBSD -> "netbsd"
| DISTRO_OPENBSD -> "openbsd"
| DISTRO_OPENMANDRIVA -> "openmandriva"
| DISTRO_OPENSUSE -> "opensuse"
| DISTRO_ORACLE_LINUX -> "oraclelinux"
| DISTRO_PARDUS -> "pardus"
Expand Down
1 change: 1 addition & 0 deletions daemon/inspect_types.mli
Expand Up @@ -94,6 +94,7 @@ and distro =
| DISTRO_NEOKYLIN
| DISTRO_NETBSD
| DISTRO_OPENBSD
| DISTRO_OPENMANDRIVA
| DISTRO_OPENSUSE
| DISTRO_ORACLE_LINUX
| DISTRO_PARDUS
Expand Down
3 changes: 2 additions & 1 deletion m4/guestfs-appliance.m4
Expand Up @@ -106,7 +106,8 @@ AC_ARG_WITH([distro],
AS_CASE([$DISTRO],
[FEDORA | RHEL | CENTOS],[DISTRO=REDHAT],
[OPENSUSE* | SLED | SLES],[DISTRO=SUSE],
[ARCH],[DISTRO=ARCHLINUX])
[ARCH],[DISTRO=ARCHLINUX],
[OPENMANDRIVA],[DISTRO=OPENMANDRIVA])
AC_MSG_RESULT([$DISTRO (from /etc/os-release)])
else
AC_MSG_ERROR([/etc/os-release not available, please specify the distro using --with-distro=DISTRO])
Expand Down
43 changes: 39 additions & 4 deletions p2v/dependencies.m4
Expand Up @@ -4,10 +4,11 @@ dnl
dnl This file is processed by m4 with only one of the following
dnl symbols defined (depending on the target distro):
dnl
dnl REDHAT=1 Fedora, RHEL, CentOS, SL and workalikes
dnl DEBIAN=1 Debian and Ubuntu
dnl ARCHLINUX=1 Arch Linux
dnl SUSE=1 SUSE, OpenSUSE
dnl REDHAT=1 Fedora, RHEL, CentOS, SL and workalikes
dnl DEBIAN=1 Debian and Ubuntu
dnl ARCHLINUX=1 Arch Linux
dnl SUSE=1 SUSE, OpenSUSE
dnl OPENMANDRIVA=1 OpenMandriva
dnl
dnl NB 1: Must be one package name per line. Blank lines are ignored.
dnl
Expand Down Expand Up @@ -124,6 +125,40 @@ ifelse(SUSE,1,
SuSEfirewall2
)

ifelse(OPENMANDRIVA,1,
dnl Used by the virt-p2v binary.
pcre
libxml2
gtk`'GTK_VERSION
dbus-libs

dnl Run as external programs by the p2v binary.
/usr/bin/ssh
/usr/bin/qemu-nbd
which

dnl Generally useful tools to use within xterm
vim-enhanced

dnl X11 environment
/usr/bin/xinit
/usr/bin/Xorg
xorg-x11-drivers
xorg-x11-fonts-Type1
dejavu-sans-fonts
dejavu-sans-mono-fonts
mesa-dri-drivers
kwin_x11

NetworkManager
nm-connection-editor
network-manager-applet
dnl dbus is required by nm-applet, but not a dependency in Fedora
dbus-x11
dnl sysadmins prefer ifconfig
net-tools
)

dnl Run as external programs by the p2v binary.
curl
ethtool
Expand Down

0 comments on commit a4ef671

Please sign in to comment.