From 453459190c50e500caaa254dd8cd9060e0a19e30 Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Thu, 5 Aug 2021 17:35:46 +0200 Subject: [PATCH 1/2] 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..1e5eea1a 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 os[:name] + when 'opensuse' + 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 } From 07345860bff6b52d481a636620a823deab8ffadb Mon Sep 17 00:00:00 2001 From: Robin Schneider Date: Sun, 6 Feb 2022 13:19:11 +0100 Subject: [PATCH 2/2] ci: workaround for #313 --- test/integration/archive/inspec.yml | 2 +- test/integration/clean/inspec.yml | 2 +- test/integration/package/inspec.yml | 2 +- test/integration/share/inspec.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/integration/archive/inspec.yml b/test/integration/archive/inspec.yml index aeaf6cea..de778567 100644 --- a/test/integration/archive/inspec.yml +++ b/test/integration/archive/inspec.yml @@ -15,7 +15,7 @@ supports: - platform-name: centos - platform-name: fedora - platform-name: opensuse - - platform-name: suse + # - platform-name: suse - platform-name: freebsd - platform-name: openbsd - platform-name: amazon diff --git a/test/integration/clean/inspec.yml b/test/integration/clean/inspec.yml index f6ea4918..f2bf3fa3 100644 --- a/test/integration/clean/inspec.yml +++ b/test/integration/clean/inspec.yml @@ -15,7 +15,7 @@ supports: - platform-name: centos - platform-name: fedora - platform-name: opensuse - - platform-name: suse + # - platform-name: suse - platform-name: freebsd - platform-name: openbsd - platform-name: amazon diff --git a/test/integration/package/inspec.yml b/test/integration/package/inspec.yml index bddb05ee..3b09356e 100644 --- a/test/integration/package/inspec.yml +++ b/test/integration/package/inspec.yml @@ -15,7 +15,7 @@ supports: - platform-name: centos - platform-name: fedora - platform-name: opensuse - - platform-name: suse + # - platform-name: suse - platform-name: freebsd - platform-name: openbsd - platform-name: amazon diff --git a/test/integration/share/inspec.yml b/test/integration/share/inspec.yml index ee200809..29e52d16 100644 --- a/test/integration/share/inspec.yml +++ b/test/integration/share/inspec.yml @@ -12,7 +12,7 @@ supports: - platform-name: centos - platform-name: fedora - platform-name: opensuse - - platform-name: suse + # - platform-name: suse - platform-name: freebsd - platform-name: openbsd - platform-name: amazon