Make /usr/local writable on core
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Opinion
|
Wishlist
|
Unassigned |
Bug Description
Hi,
I'm currently doing some experiments with a raspberry pi 4 and Ubuntu core core20 20220318
Ubuntu core comes with python, but not pip to install modules, and since ansible installation sometimes requires to have some python modules installed, I was figuring out how to teach a core system use python modules. Since core doesn't come with the ensure-pip module, the method of choice is to download https:/
The problem:
Although the script works and installs a running pip command, it doesn't find a place (other than it's help page, it takes the --prefix=/usr/local argument) to install it to a place, where both root and users can access it. It ends with installing it to /root/.local/bin, which is accessible to root only.
Strangely, core comes with empty dirs
/usr/local/
/usr/local/share
/usr/local/
but write protected, so there is nothing in, and not possible, to install anything in. Unclear, what they are good for and why core comes with.
Actually, it is easy to create a /writable/python and install it into it, but that's really ugly.
So my proposal is to make /usr/local a writable directory, i.e. bind-mount some subdir of /writable (as with other paths) to /usr/local
That would also allow to install other important programs that are not available as snaps, e.g. git, in a common and usual place where every user can access it and will find it by default.
summary: |
- Make /usr/local writable + Make /usr/local writable on core |
Interestingly, /etc/fstab and /etc/system- image/writable- paths refer to
# See writable-paths(5) for full details.
but core does not come with man-pages. Instead, it asks to visit https:/ /manpages. ubuntu. com/ , which does not offer man pages for ubuntu core.