From 56b4080710070f05ca305d2857afc2abc9c442f0 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 5 Aug 2021 17:35:46 +0200 Subject: [PATCH] fix(suse): fix support to install compose from PackageHub on SLES 15 To actually install the packages, you need to set the following in your pillar because the PackageHub repos are not enabled by default on SLES. ```YAML docker: pkg: docker: use_upstream: 'package' compose: use_upstream: 'package' ``` --- docker/codenamemap.yaml | 12 ++++++++++++ docker/osfamilymap.yaml | 4 ++++ test/integration/archive/controls/archive_spec.rb | 9 ++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/docker/codenamemap.yaml b/docker/codenamemap.yaml index 3be078ab..1b30cb77 100644 --- a/docker/codenamemap.yaml +++ b/docker/codenamemap.yaml @@ -22,3 +22,15 @@ precise: deps: - linux-image-generic-lts-raring - linux-headers-generic-lts-raring + +SUSE Linux Enterprise Server 15: + pkg: + compose: + commands: + - docker-compose + +SUSE Linux Enterprise Server 15 SP1: + pkg: + compose: + commands: + - docker-compose diff --git a/docker/osfamilymap.yaml b/docker/osfamilymap.yaml index eedb872c..5aea53f5 100644 --- a/docker/osfamilymap.yaml +++ b/docker/osfamilymap.yaml @@ -73,6 +73,10 @@ Suse: - gzip docker: name: docker + compose: + # https://packagehub.suse.com/packages/python-docker-compose/ + commands: + - python-docker-compose MacOS: identity: diff --git a/test/integration/archive/controls/archive_spec.rb b/test/integration/archive/controls/archive_spec.rb index e457de92..f1800f40 100644 --- a/test/integration/archive/controls/archive_spec.rb +++ b/test/integration/archive/controls/archive_spec.rb @@ -6,6 +6,13 @@ impact 1.0 title 'should be installed' + case platform[:family] + when 'suse' + compose_bin = '/usr/local/bin/python-docker-compose' + else + compose_bin = '/usr/local/bin/docker-compose' + end + describe file('/usr/local/docker-19.03.9/bin') do it { should exist } it { should be_directory } @@ -86,7 +93,7 @@ its('mode') { should cmp '0755' } its('type') { should eq :file } end - describe file('/usr/local/bin/docker-compose') do + describe file(compose_bin) do it { should be_symlink } it { should be_file } it { should_not be_directory }