After tinkering a bit with it,
I found that the squashfs image seems good.
If I extract the image to a directory and run certbot from there,
it runs.
The trick is to run it with the shipped python,
I argue this is because it knows where to look for the necessary python modules shipped with it.
18:29:53 ~/TMP/SNAP/squashfs-root/bin -1- $ ./python certbot
The following error was encountered:
[Errno 13] Permission denied: '/var/log/letsencrypt/.certbot.lock'
Either run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/certbot-log-0q5dczcz/log or re-run Certbot with -v for more details.
18:30:05 ~/TMP/SNAP/squashfs-root/bin -1- $
18:30:05 ~/TMP/SNAP/squashfs-root/bin -1- $ sudo ./python certbot
[sudo] password for ychaouche:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: owncloud.local
2: owncloud.lan
3: pydio.local
4: mantis.radioalgerie.dz
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): c
Please specify --domains, or --installer that will help in domain names autodiscovery, or --cert-name for an existing certificate name.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
18:33:00 ~/TMP/SNAP/squashfs-root/bin -1- $
what OS are you on ? you didnt mention this (best is to always attach the output of snap version in such posts) systemd is responsible for mounting the snaps, snap packages generate a lot of stuff during install for their system integration, one of these are the systemd mount units … then systemd should care for the mounting, if this does not work, it points to a general problem with snapd integration in your OS …
I too suspect this is simply a mount issue,
because it’s back on.
Thanks for the nice tipe. Here’s snap version
$ snap version
snap 2.60.4
snapd 2.60.4
series 16
ubuntu 14.04
kernel 4.4.0-98-generic
$
I’m thinking of mounting them manually in case the automatic (systemd?) mount doesn’t work.
Is there any command that does that?
I figure it’s not just about creating the loop device and mount the images as squashfs somewhere under /snap/
if only for the binaries to be put in in /snap/bin/
But since they’re just symlinks to /usr/bin/snap,
would that mean that if I put a symlink with the corresponding snap name
then snap (the system) will ultimately find it in the right snap (the mounted image)?
$ ls /snap/bin/
total 0
lrwxrwxrwx 1 root root 13 Nov 23 15:57 certbot -> /usr/bin/snap
$