diff --git a/dependencies.yaml b/dependencies.yaml index eed487d2d716..1753ec92916e 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -86,7 +86,6 @@ devel_requires: main_requires: '%assetpack_requires': git-core: - openssh-common: # for Build Service Authentication hostname: # for script/configure-web-proxy bsdtar: # for extraction feature of OpenQA::Downloader perl(aliased): diff --git a/dist/rpm/openQA.spec b/dist/rpm/openQA.spec index 0e76bb28d1cc..6d2740e6b877 100644 --- a/dist/rpm/openQA.spec +++ b/dist/rpm/openQA.spec @@ -199,6 +199,8 @@ Recommends: qemu Recommends: rsync # Optionally enabled with USE_PNGQUANT=1 Recommends: pngquant +# for Build Service Authentication +Recommends: openssh-common %if 0%{?suse_version} >= 1330 Requires(pre): group(nogroup) %endif diff --git a/lib/OpenQA/WebAPI/Plugin/ObsRsync.pm b/lib/OpenQA/WebAPI/Plugin/ObsRsync.pm index fcd135b98729..86d099c20820 100644 --- a/lib/OpenQA/WebAPI/Plugin/ObsRsync.pm +++ b/lib/OpenQA/WebAPI/Plugin/ObsRsync.pm @@ -8,7 +8,7 @@ use Mojo::File; use Mojo::URL; use Mojo::UserAgent; use POSIX 'strftime'; - +use File::Which qw(which); use OpenQA::Log qw(log_error); my $dirty_status_filename = '.dirty_status'; @@ -40,6 +40,9 @@ sub register { my $plugin_r = $app->routes->find('ensure_operator'); my $plugin_api_r = $app->routes->find('api_ensure_operator'); + # ssh-keygen is needed for the Build Service authentication. + die("ssh-keygen is not availabe. Aborting.\n") unless which('ssh-keygen'); + if (!$plugin_r) { $app->log->error('Routes not configured, plugin ObsRsync will be disabled') unless $plugin_r; }