Skip to content

Commit

Permalink
Merge pull request #10551 from mlschroe/master
Browse files Browse the repository at this point in the history
[backend] bs_worker: support the new --vmdisk-filesystem-options para…
  • Loading branch information
mlschroe committed Dec 14, 2020
2 parents 68ef741 + de4205c commit 13bf609
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/obs-server.spec
Expand Up @@ -165,7 +165,7 @@ BuildRequires: perl(Test::Simple) > 1
PreReq: /usr/sbin/useradd /usr/sbin/groupadd
BuildArch: noarch
Requires(pre): obs-common
Requires: %{__obs_build_package_name} >= 20200110
Requires: %{__obs_build_package_name} >= 20201211
Requires: perl-BSSolv >= 0.36
Requires: perl(Date::Parse)
# Required by source server
Expand Down
8 changes: 8 additions & 0 deletions src/backend/bs_worker
Expand Up @@ -87,6 +87,7 @@ my $vm_worker_instance;
my $vmdisk_rootsize;
my $vmdisk_swapsize;
my $vmdisk_filesystem;
my $vmdisk_filesystem_options;
my $vmdisk_mount_options;
my $vmdisk_clean;
my $emulator_script;
Expand Down Expand Up @@ -530,6 +531,11 @@ while (@ARGV) {
$vmdisk_filesystem = shift @ARGV;
next;
}
if ($ARGV[0] eq '--vmdisk-filesystem-options') {
shift @ARGV;
$vmdisk_filesystem_options = shift @ARGV;
next;
}
if ($ARGV[0] eq '--vmdisk-mount-options') {
shift @ARGV;
$vmdisk_mount_options = shift @ARGV;
Expand Down Expand Up @@ -3242,6 +3248,7 @@ sub dobuild {
if ($vm =~ /(xen|kvm|zvm|emulator|pvm)/) {
# allow overriding the filesystem type via the build config
my $filesystemtype = $bconf->{'buildflags:vmfstype'} || $vmdisk_filesystem;
my $filesystemoptions = $bconf->{'buildflags:vmfsoptions'} || $vmdisk_filesystem_options;
mkdir("$buildroot/.mount") unless -d "$buildroot/.mount";
push @args, '--root', "$buildroot/.mount";
push @args, '--vm-type', $vm;
Expand All @@ -3259,6 +3266,7 @@ sub dobuild {
push @args, '--vmdisk-rootsize', $vmdisk_rootsize if $vmdisk_rootsize;
push @args, '--vmdisk-swapsize', $vmdisk_swapsize if $vmdisk_swapsize;
push @args, '--vmdisk-filesystem', $filesystemtype if $filesystemtype;
push @args, '--vmdisk-filesystem-options', $filesystemoptions if $filesystemoptions;
push @args, "--vmdisk-mount-options=$vmdisk_mount_options" if $vmdisk_mount_options;
push @args, '--vmdisk-clean'if $vmdisk_clean;
push @args, '--hugetlbfs', $hugetlbfs if $hugetlbfs;
Expand Down

0 comments on commit 13bf609

Please sign in to comment.