Skip to content

Commit bef4661

Browse files
committed
pynfs: Fix the xdrlib dependency for Debian
When running "make pynfs" in the current directory, I get to the "Install pynfs build dependencies" task, which fails with the message "No package matching 'python3-standard-xdrlib' is available". The test system is running Debian 11. Python 3.13 removed xdrlib (PEP 594), and we recently adjusted install-deps/redhat/main.yml to accommodate that. I found that the xdrlib module is already part of Python 3.9's standard library on Debian 11. The package python3-standard-xdrlib doesn't exist on Debian 11 because xdrlib is included by default. Remove the python3-standard-xdrlib package and adopt the solution used by install-deps/redhat/main.yml, which is to pull in xdrlib3 when xdrlib is not included in the standard Python library (this should be only on Debian 13). Signed-off-by: Chuck Lever <[email protected]>
1 parent 2d47a77 commit bef4661

File tree

1 file changed

+13
-2
lines changed
  • playbooks/roles/pynfs/tasks/install-deps/debian

1 file changed

+13
-2
lines changed

playbooks/roles/pynfs/tasks/install-deps/debian/main.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
- name: Install pynfs build dependencies
33
become: true
4-
become_method: sudo
4+
become_method: ansible.builtin.sudo
55
ansible.builtin.apt:
66
name:
77
- gcc
@@ -13,7 +13,18 @@
1313
- swig
1414
- python3-gssapi
1515
- python3-ply
16-
- python3-standard-xdrlib
1716
state: present
1817
update_cache: true
1918
tags: ["pynfs", "deps"]
19+
20+
# xdrlib was removed from Python 3.13; Debian packages it as python3-mda-xdrlib
21+
- name: Install xdrlib from Debian package on Debian 13+
22+
become: true
23+
become_method: ansible.builtin.sudo
24+
ansible.builtin.apt:
25+
name:
26+
- python3-mda-xdrlib
27+
state: present
28+
tags: ["pynfs", "deps"]
29+
when:
30+
- ansible_distribution_major_version | int >= 13

0 commit comments

Comments
 (0)