pve-container (1.0-27) unstable; urgency=medium
+ * add support for Fedora 22
+
* add/restore firewall config with vzdump
* warn when trying to delete non-existent options
my $custom_idmap = grep { $_->[0] eq 'lxc.id_map' } @{$conf->{lxc}};
my $ostype = $conf->{ostype} || die "missing 'ostype' - internal error";
- if ($ostype =~ /^(?:debian | ubuntu | centos | archlinux)$/x) {
+ if ($ostype =~ /^(?:debian | ubuntu | centos | fedora | archlinux)$/x) {
$raw .= "lxc.include = /usr/share/lxc/config/$ostype.common.conf\n";
if ($unprivileged || $custom_idmap) {
$raw .= "lxc.include = /usr/share/lxc/config/$ostype.userns.conf\n"
use PVE::LXC::Setup::Debian;
use PVE::LXC::Setup::Ubuntu;
use PVE::LXC::Setup::Redhat;
+use PVE::LXC::Setup::Fedora;
use PVE::LXC::Setup::ArchLinux;
my $plugins = {
debian => 'PVE::LXC::Setup::Debian',
ubuntu => 'PVE::LXC::Setup::Ubuntu',
redhat => 'PVE::LXC::Setup::Redhat',
+ fedora => 'PVE::LXC::Setup::Fedora',
archlinux => 'PVE::LXC::Setup::ArchLinux',
};
if (-f "$rootdir/etc/debian_version") {
return "debian";
+ } elsif (-f "$rootdir/etc/fedora-release") {
+ return "fedora";
} elsif (-f "$rootdir/etc/redhat-release") {
return "redhat";
} elsif (-f "$rootdir/etc/arch-release") {
--- /dev/null
+package PVE::LXC::Setup::Fedora;
+
+use strict;
+use warnings;
+
+use PVE::LXC::Setup::Redhat;
+
+use base qw(PVE::LXC::Setup::Redhat);
+
+sub new {
+ my ($class, $conf, $rootdir) = @_;
+
+ my $release = PVE::Tools::file_read_firstline("$rootdir/etc/fedora-release");
+ die "unable to read version info\n" if !defined($release);
+
+ my $version;
+
+ if ($release =~ m/release\s+(\d+(?:\.\d+)?)(\.\d+)?/) {
+ if ($1 >= 22 && $1 < 23) {
+ $version = $1;
+ }
+ }
+
+ die "unsupported fedora release '$release'\n" if !$version;
+
+ my $self = { conf => $conf, rootdir => $rootdir, version => $version };
+
+ $conf->{ostype} = "fedora";
+
+ return bless $self, $class;
+}
+
+1;
-SOURCES=Base.pm Debian.pm Ubuntu.pm Redhat.pm ArchLinux.pm
+SOURCES=Base.pm Debian.pm Ubuntu.pm Redhat.pm Fedora.pm ArchLinux.pm
.PHONY: install
install: