Skip to contentSkip to conversation

pynfs: install xdrlib3

PATCH In review Jeff Layton 3 participants 4 messages Feb 11, 2025 – Feb 12, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 pynfs: install xdrlib3

As of python 3.13, xdrlib is no longer included. Install xdrlib3, which is a fork of the original xdrlib module.

---
Changes in v2:
- use ansible pip module instead of running shell command
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 playbooks/roles/pynfs/tasks/main.yml | 5 +++++
 1 file changed, 5 insertions(+)
playbooks/roles/pynfs/tasks/main.yml +5 -0
index c6add8e47fec298e2c7351805a42307ee8398e3c..d3b8832409b17fbc03a2a3e625e0d319a45af919 100644
@@ -70,6 +70,11 @@
   when:
     - not kdevops_workflows_dedicated_workflow|bool
 
+- name: Install xdrlib3
+  tags: [ 'pynfs' ]
+  ansible.builtin.pip:
+    name: xdrlib3
+
 - name: Build pynfs
   tags: [ 'pynfs' ]
   command: ./setup.py build

---
base-commit: 447b2ca0ac70d6538e62c05a3216434f12418470
change-id: 20250211-xdrlib-bd75594d67dc

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>
Reviewed-by on v2 1/1
#1 lore raw
Quoted 33 lines · Jeff Layton

As of python 3.13, xdrlib is no longer included. Install xdrlib3, which is a fork of the original xdrlib module.

---
Changes in v2:
- use ansible pip module instead of running shell command
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 playbooks/roles/pynfs/tasks/main.yml | 5 +++++
 1 file changed, 5 insertions(+)
playbooks/roles/pynfs/tasks/main.yml +5 -1
index c6add8e47fec298e2c7351805a42307ee8398e3c..d3b8832409b17fbc03a2a3e625e0d319a45af919 100644
@@ -70,6 +70,11 @@
   when:
     - not kdevops_workflows_dedicated_workflow|bool
 
+- name: Install xdrlib3
+  tags: [ 'pynfs' ]
+  ansible.builtin.pip:
+    name: xdrlib3
+
 - name: Build pynfs
   tags: [ 'pynfs' ]
   command: ./setup.py build
 
---

base-commit: 447b2ca0ac70d6538e62c05a3216434f12418470
change-id: 20250211-xdrlib-bd75594d67dc

Quoted 1 line

Best regards,

Signature · 1 line
Chuck Lever
#2 lore raw
In reply to Jeff Layton
Quoted 17 lines · Jeff Layton

As of python 3.13, xdrlib is no longer included. Install xdrlib3, which is a fork of the original xdrlib module.

---
Changes in v2:
- use ansible pip module instead of running shell command
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 playbooks/roles/pynfs/tasks/main.yml | 5 +++++
 1 file changed, 5 insertions(+)
playbooks/roles/pynfs/tasks/main.yml +0 -0
index c6add8e47fec298e2c7351805a42307ee8398e3c..d3b8832409b17fbc03a2a3e625e0d319a45af919 100644

playbooks/roles/pynfs/tasks/main.yml line 77

Quoted 8 lines
playbooks/roles/pynfs/tasks/main.yml +5 -0
@@ -70,6 +70,11 @@
   when:
     - not kdevops_workflows_dedicated_workflow|bool
 
+- name: Install xdrlib3
+  tags: [ 'pynfs' ]
+  ansible.builtin.pip:
+    name: xdrlib3
+

Why is this not part of the install-deps specific distro tasks? In Debian at least, you cannot use pip unless you use "--break-system-packages" [1].

On the other hand, we should try to avoid using pip as we are always relying on distro packages when possible. Debian provides python3-standard-xdr-lib [2] package.

[1] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pip_module.html#parameter-break_system_packages
[2] https://packages.debian.org/trixie/python3-standard-xdrlib

Quoted 12 lines
playbooks/roles/pynfs/tasks/main.yml +0 -1
 - name: Build pynfs
   tags: [ 'pynfs' ]
   command: ./setup.py build
 
---

base-commit: 447b2ca0ac70d6538e62c05a3216434f12418470
change-id: 20250211-xdrlib-bd75594d67dc

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>
#3 lore raw
Quoted 30 lines · Daniel Gomez
Quoted 17 lines · Jeff Layton

As of python 3.13, xdrlib is no longer included. Install xdrlib3, which is a fork of the original xdrlib module.

---
Changes in v2:
- use ansible pip module instead of running shell command
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 playbooks/roles/pynfs/tasks/main.yml | 5 +++++
 1 file changed, 5 insertions(+)
playbooks/roles/pynfs/tasks/main.yml +0 -0
index c6add8e47fec298e2c7351805a42307ee8398e3c..d3b8832409b17fbc03a2a3e625e0d319a45af919 100644

playbooks/roles/pynfs/tasks/main.yml line 77

Quoted 8 lines
playbooks/roles/pynfs/tasks/main.yml +5 -0
@@ -70,6 +70,11 @@
   when:
     - not kdevops_workflows_dedicated_workflow|bool
 
+- name: Install xdrlib3
+  tags: [ 'pynfs' ]
+  ansible.builtin.pip:
+    name: xdrlib3
+

Why is this not part of the install-deps specific distro tasks? In Debian at least, you cannot use pip unless you use "--break-system-packages" [1].

Quoted 3 lines

On the other hand, we should try to avoid using pip as we are always relying on distro packages when possible. Debian provides python3-standard-xdr-lib [2] package.

Fedora/RHEL currently does not package xdrlib3, and the HEAD version of pynfs will need this module even on older distributions that might not have xdrlib3 packaged.

But I agree that perhaps the installation belongs in install-deps instead.

Quoted 15 lines

[1] https://docs.ansible.com/ansible/latest/collections/ansible/builtin/pip_module.html#parameter-break_system_packages
[2] https://packages.debian.org/trixie/python3-standard-xdrlib

Quoted 12 lines
playbooks/roles/pynfs/tasks/main.yml +0 -1
 - name: Build pynfs
   tags: [ 'pynfs' ]
   command: ./setup.py build
 
---

base-commit: 447b2ca0ac70d6538e62c05a3216434f12418470
change-id: 20250211-xdrlib-bd75594d67dc

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>
Signature · 1 line
Chuck Lever