Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#80048 - [netplan] /usr/libexec error

Attached to Project: Arch Linux
Opened by Gregory (rollenwiese) - Sunday, 22 October 2023, 00:58 GMT
Last edited by David Runge (dvzrv) - Sunday, 19 November 2023, 12:47 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To David Runge (dvzrv)
Christian Rebischke (Shibumi)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

netplan 0.107-2

I receive this error:

sudo netplan try

An error occurred: [Errno 2] No such file or directory: '/usr/libexec/netplan/generate'


For some reason it's looking in /usr/libexec/netplan, rather than the correct directory



Additional info:
* package version(s):
* config and/or log files etc.
* link to upstream bug report, if any

Steps to reproduce:
This task depends upon

Closed by  David Runge (dvzrv)
Sunday, 19 November 2023, 12:47 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed with netplan 0.107-3
Comment by Toolybird (Toolybird) - Sunday, 22 October 2023, 02:04 GMT
$ grep libexec /usr/share/netplan/netplan_cli/cli/utils.py
return os.environ.get('NETPLAN_GENERATE_PATH', '/usr/libexec/netplan/generate')

Related  FS#79574 
Comment by Ville Aakko (Wild_Penguin) - Tuesday, 14 November 2023, 12:36 GMT
So, how are used supposed to fix this in the interim? Should we edit the right path into utils.py?
Comment by Gregory (rollenwiese) - Saturday, 18 November 2023, 14:19 GMT
@Ville Aakko (Wild_Penguin)

If you haven't figured out the work-around, you need to create a symlink, like this:

cd /usr
ln -sfv -T lib libexec

Comment by Ville Aakko (Wild_Penguin) - Sunday, 19 November 2023, 11:54 GMT
@Gregory,

Thanks for the tip, but in case everyone else comes here: I think it is extremely bad idea to touch system directories (non-configurable ones) by hand, outside a package manager.

So, my recommendation is not do do that, but YMMV.
Comment by David Runge (dvzrv) - Sunday, 19 November 2023, 12:34 GMT
@Gregory: Thanks for the ticket.

AFAICT you can workaround this with the help of the environment variable `NETPLAN_GENERATE_PATH` (as hinted at by @Toolybird).
E.g. you would call `NETPLAN_GENERATE_PATH=/usr/lib/netplan/generate netplan`.

FTR: Please do not modify your root filesystem by creating a symlink for /usr/libexec.
The goal here should be to fix this in packaging, e.g. via patching that particular file, so that the default will be `/usr/lib/netplan/generate` if the `NETPLAN_GENERATE_PATH` environment variable is not set.

Loading...