Message ID | 20250211-xdrlib-v2-1-95a39f4e8b02@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [v2] pynfs: install xdrlib3 | expand |
On 2/11/25 11:38 AM, Jeff Layton wrote: > As of python 3.13, xdrlib is no longer included. Install xdrlib3, which > is a fork of the original xdrlib module. > > Signed-off-by: Jeff Layton <jlayton@kernel.org> > --- > Changes in v2: > - use ansible pip module instead of running shell command > - Link to v1: https://lore.kernel.org/r/20250211-xdrlib-v1-1-71e9c96948a8@kernel.org > --- > playbooks/roles/pynfs/tasks/main.yml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/playbooks/roles/pynfs/tasks/main.yml b/playbooks/roles/pynfs/tasks/main.yml > index c6add8e47fec298e2c7351805a42307ee8398e3c..d3b8832409b17fbc03a2a3e625e0d319a45af919 100644 > --- a/playbooks/roles/pynfs/tasks/main.yml > +++ b/playbooks/roles/pynfs/tasks/main.yml > @@ -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, Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
On Tue, Feb 11, 2025 at 11:38:19AM +0100, Jeff Layton wrote: > As of python 3.13, xdrlib is no longer included. Install xdrlib3, which > is a fork of the original xdrlib module. > > Signed-off-by: Jeff Layton <jlayton@kernel.org> > --- > Changes in v2: > - use ansible pip module instead of running shell command > - Link to v1: https://lore.kernel.org/r/20250211-xdrlib-v1-1-71e9c96948a8@kernel.org > --- > playbooks/roles/pynfs/tasks/main.yml | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/playbooks/roles/pynfs/tasks/main.yml b/playbooks/roles/pynfs/tasks/main.yml > index c6add8e47fec298e2c7351805a42307ee8398e3c..d3b8832409b17fbc03a2a3e625e0d319a45af919 100644 > --- a/playbooks/roles/pynfs/tasks/main.yml > +++ b/playbooks/roles/pynfs/tasks/main.yml > @@ -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 > - name: Build pynfs > tags: [ 'pynfs' ] > command: ./setup.py build > > --- > base-commit: 447b2ca0ac70d6538e62c05a3216434f12418470 > change-id: 20250211-xdrlib-bd75594d67dc > > Best regards, > -- > Jeff Layton <jlayton@kernel.org> >
On 2/12/25 2:41 AM, Daniel Gomez wrote: > On Tue, Feb 11, 2025 at 11:38:19AM +0100, Jeff Layton wrote: >> As of python 3.13, xdrlib is no longer included. Install xdrlib3, which >> is a fork of the original xdrlib module. >> >> Signed-off-by: Jeff Layton <jlayton@kernel.org> >> --- >> Changes in v2: >> - use ansible pip module instead of running shell command >> - Link to v1: https://lore.kernel.org/r/20250211-xdrlib-v1-1-71e9c96948a8@kernel.org >> --- >> playbooks/roles/pynfs/tasks/main.yml | 5 +++++ >> 1 file changed, 5 insertions(+) >> >> diff --git a/playbooks/roles/pynfs/tasks/main.yml b/playbooks/roles/pynfs/tasks/main.yml >> index c6add8e47fec298e2c7351805a42307ee8398e3c..d3b8832409b17fbc03a2a3e625e0d319a45af919 100644 >> --- a/playbooks/roles/pynfs/tasks/main.yml >> +++ b/playbooks/roles/pynfs/tasks/main.yml >> @@ -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. 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. > [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 > >> - name: Build pynfs >> tags: [ 'pynfs' ] >> command: ./setup.py build >> >> --- >> base-commit: 447b2ca0ac70d6538e62c05a3216434f12418470 >> change-id: 20250211-xdrlib-bd75594d67dc >> >> Best regards, >> -- >> Jeff Layton <jlayton@kernel.org> >>
diff --git a/playbooks/roles/pynfs/tasks/main.yml b/playbooks/roles/pynfs/tasks/main.yml index c6add8e47fec298e2c7351805a42307ee8398e3c..d3b8832409b17fbc03a2a3e625e0d319a45af919 100644 --- a/playbooks/roles/pynfs/tasks/main.yml +++ b/playbooks/roles/pynfs/tasks/main.yml @@ -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
As of python 3.13, xdrlib is no longer included. Install xdrlib3, which is a fork of the original xdrlib module. Signed-off-by: Jeff Layton <jlayton@kernel.org> --- Changes in v2: - use ansible pip module instead of running shell command - Link to v1: https://lore.kernel.org/r/20250211-xdrlib-v1-1-71e9c96948a8@kernel.org --- playbooks/roles/pynfs/tasks/main.yml | 5 +++++ 1 file changed, 5 insertions(+) --- base-commit: 447b2ca0ac70d6538e62c05a3216434f12418470 change-id: 20250211-xdrlib-bd75594d67dc Best regards,