Skip to content

Commit

Permalink
Initial support for openSUSE
Browse files Browse the repository at this point in the history
This adds support for SUSE based distributions and ensures they use
packaged Python libraries instead of PIP.
Primary target of this patch is openSUSE Tumbleweed.

Signed-off-by: Georg Pfuetzenreuter <mail@georg-pfuetzenreuter.net>
  • Loading branch information
tacerus committed Dec 31, 2023
1 parent 4c7cf69 commit 63a28cd
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 18 deletions.
2 changes: 1 addition & 1 deletion FORMULA
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: podman
os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Amazon, Oracle, Suse, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, Solaris, SmartOS, Windows, MacOS
os: Debian, Ubuntu, Raspbian, RedHat, Fedora, CentOS, Amazon, Oracle, SUSE, openSUSE, Gentoo, Funtoo, Arch, Manjaro, Alpine, FreeBSD, OpenBSD, Solaris, SmartOS, Windows, MacOS
os_family: Debian, RedHat, Suse, Gentoo, Arch, Alpine, FreeBSD, OpenBSD, Solaris, Windows, MacOS
version: 1.0.0
release: 1
Expand Down
5 changes: 5 additions & 0 deletions podman/package/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ Podman is installed:
Podman required packages are installed:
pkg.installed:
- pkgs: {{ podman.lookup.required_pkgs }}
{%- if podman.python_install_method == "pkg" %}
- reload_modules: true
{%- endif %}
{%- if podman.python_install_method == "pip" %}
Toml and Podman python libraries are installed:
pip.installed:
- pkgs:
Expand All @@ -103,6 +107,7 @@ Restart salt minion on installation of toml:
- bg: true
- onchanges:
- Toml and Podman python libraries are installed
{%- endif %}
# those are installed by the Debian package automatically
Podman unit files are installed:
Expand Down
2 changes: 2 additions & 0 deletions podman/package/salt/install.sls
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ Required packages to manage podman are installed:
- pkgs: {{ podman.lookup.salt_compat.pips | json }}
- reload_modules: true
{%- if podman.python_install_method == 'pip' %}
Restart salt minion on installation of docker-py:
cmd.run:
- name: 'salt-call service.restart salt-minion'
- bg: true
- onchanges:
- pip: Required packages to manage podman are installed
{%- endif %}
Podman socket is symlinked to docker socket:
file.symlink:
Expand Down
1 change: 1 addition & 0 deletions podman/parameters/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ values:
debian_experimental: false
debian_unstable: false
install_method: pkg
python_install_method: pip
salt_compat: false
service_enable: false
version: latest
Expand Down
12 changes: 12 additions & 0 deletions podman/parameters/os/SUSE.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
values:
lookup:
required_pkgs:
- python3-podman
- python3-toml
salt_compat:
sockets:
docker: /run/docker.sock
podman: /run/podman/podman.sock
python_install_method: pkg
...
10 changes: 1 addition & 9 deletions podman/parameters/os_family/Suse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,4 @@
values:
lookup:
pkg_manager: zypper
repos:
stable:
humanname: Podman stable
name: Podman stable
baseurl: https://FIXME/rpm/stable
key_url: https://FIXME/key.gpg
gpgcheck: 1
gpgautoimport: true
...
repos: {}
14 changes: 6 additions & 8 deletions test/integration/default/files/_mapdata/opensuse-tumbleweed.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,14 @@ values:
containers:
base: /opt/containers
required_pkgs:
- git
- python3-pip
- python3-podman
- python3-toml
salt_compat:
pips:
- docker
pkgs:
- python3-pip
pips: []
pkgs: []
sockets:
docker: /var/run/docker.sock
podman: /var/run/podman/podman.sock
docker: /run/docker.sock
podman: /run/podman/podman.sock
service:
name: podman
path: /etc/systemd/system/{name}.service
Expand Down

0 comments on commit 63a28cd

Please sign in to comment.