Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Add OSTree dependencies to pulp_installer #967

Closed
pulpbot opened this issue Jan 17, 2022 · 1 comment · Fixed by #968
Closed

Add OSTree dependencies to pulp_installer #967

pulpbot opened this issue Jan 17, 2022 · 1 comment · Fixed by #968
Labels

Comments

@pulpbot
Copy link
Member

pulpbot commented Jan 17, 2022

Author: @lubosmj (lmjachky)

Redmine Issue: 9212, https://pulp.plan.io/issues/9212


The pulp_ostree plugin needs some prerequisites, similarly to pulp_rpm https://github.com/pulp/pulp_installer/tree/master/roles/pulp_rpm_prerequisites.

The required packages to install are:

  1. ostree (a client application that enables management of OSTree repositories)
  2. ostree-libs (a library that enables pulp_ostree to run OSTree commands via python bindings)
@pulpbot pulpbot added the Task label Jan 17, 2022
@fao89 fao89 transferred this issue from pulp/pulpcore Mar 22, 2022
@lubosmj
Copy link
Member

lubosmj commented Mar 22, 2022

For an unpinned PyGObject requirement:

[lmjachky@localhost pulp_ostree]$ cat requirements.txt
pulpcore>=3.15.0
PyGObject

I was able to spin up a new VM with the following changes:

diff --git a/example.dev-config.yml b/example.dev-config.yml
index 2963fab..d448ee9 100644
--- a/example.dev-config.yml
+++ b/example.dev-config.yml
@@ -13,8 +13,10 @@ pulp_install_plugins:
   #   # git_revision: "0.7.3"  # optional specific branch/tag/commit
   # pulp-certguard:
   #   source_dir: "/home/vagrant/devel/pulp-certguard"
   # pulp-container:
   #   source_dir: "/home/vagrant/devel/pulp_container"
+  pulp-ostree:
+    source_dir: "/home/vagrant/devel/pulp_ostree"
   # pulp-cookbook:
   #   source_dir: "/home/vagrant/devel/pulp_cookbook"
   # pulp-deb:
diff --git a/roles/pulp_common/tasks/install_pip.yml b/roles/pulp_common/tasks/install_pip.yml
index 5a72e79..18c45f5 100644
--- a/roles/pulp_common/tasks/install_pip.yml
+++ b/roles/pulp_common/tasks/install_pip.yml
@@ -329,6 +329,20 @@
       tags:
         - molecule-idempotence-notest
 
+    - name: Install Pycairo
+      pip:
+        name: pycairo
+        state: present
+        virtualenv: '{{ pulp_install_dir }}'
+        virtualenv_command: '{{ pulp_python_interpreter }} -m venv'
+
+    - name: Install PyGObject
+      pip:
+        name: PyGObject
+        state: present
+        virtualenv: '{{ pulp_install_dir }}'
+        virtualenv_command: '{{ pulp_python_interpreter }} -m venv'
+
     - name: Install Pulp plugins from source
       pip:
         name: '{{ item.value.source_dir }}'
@@ -362,6 +376,7 @@
         virtualenv: '{{ pulp_install_dir }}'
         virtualenv_command: '{{ pulp_python_interpreter }} -m venv'
 
   become: true
   become_user: '{{ pulp_user }}'
 ...
diff --git a/roles/pulp_common/vars/Fedora.yml b/roles/pulp_common/vars/Fedora.yml
index 3581ff8..36d17f6 100644
--- a/roles/pulp_common/vars/Fedora.yml
+++ b/roles/pulp_common/vars/Fedora.yml
@@ -10,6 +10,12 @@ pulp_preq_packages:
   - git                 # For source install, and SELinux policy install
   - sudo
   - gnupg2              # For the signing service via the gpg python module
+  - gobject-introspection-devel
+  - cairo-gobject-devel
+  - pkg-config
+  - python3-devel
+  - gtk3
+  - ostree
 
 # Pulp requires Python 3.8+.
 pulp_python_interpreter: /usr/bin/python3

Not sure what is really needed and what are the least viable installation requirements. Problems may arise during the installation of PyGObject (therefore, it is necessary to add more dependencies to other distros, like in https://pygobject.readthedocs.io/en/latest/getting_started.html#fedora-logo-fedora).

fao89 added a commit to fao89/pulp_installer that referenced this issue Mar 22, 2022
fao89 added a commit to fao89/pulp_installer that referenced this issue Mar 22, 2022
fao89 added a commit that referenced this issue Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants