jstaf / onedriver

A native Linux filesystem for Microsoft OneDrive
GNU General Public License v3.0
1.94k stars 96 forks source link

Errors in RedHat 7 install #185

Closed wwnetwrk closed 2 years ago

wwnetwrk commented 2 years ago

When trying to install this on RedHat 7, we get the error [Errno socket error][SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c.618). This is after installing dnf and enabling copr. How can we get around this?

jstaf commented 2 years ago

There is currently no active COPR repository for Red Hat/CentOS 7. I'll need to add one. (Not sure where the SSL error is coming from, but make sure your ca-certificates package is up-to-date, there was a big cert expiration with Let's Encrypt the other day).

wwnetwrk commented 2 years ago

Will do, thank you for adding to the COPR repo for RHEL 7. I will test after you've added it.

wwnetwrk commented 2 years ago

Looks like the copr repo has been loaded, but can't find OneDriver:

Error: Unable to find a match: OneDriver

jstaf commented 2 years ago

Yeah I created the repo, but the package requires some extra love to build on EL7 it looks like. I'll post back here once I actually get the rpm to build successfully on EL7.

jstaf commented 2 years ago

It works now - try it out. Note- there are some unreleased changes the other builds don't have yet (I just built it off the current master), but as of 0.12.0, the EL7 build will be the same as the other builds. Let me know if there are any issues :slightly_smiling_face:

simmsj4 commented 2 years ago

In RHEL 7 it crashes/closes when I try to point it to a created folder but I'll try again tomorrow, it's pretty late.

simmsj4 commented 2 years ago

Tried again today. I launch OneDriver, click the + button to add an account, select a folder to mount to and when I click the "Select" button the application just vanishes. Below are the logs from /var/log/messages

Oct 29 10:19:53 josh-vm1 dbus[708]: [system] Activating via systemd: service name='org.freedesktop.Avahi' unit='dbus-org.freedesktop.Avahi.service'
Oct 29 10:19:53 josh-vm1 dbus[708]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit not found.
Oct 29 10:19:54 josh-vm1 journal: Could not create systemd dbus proxy: Error calling StartServiceByName for org.freedesktop.systemd1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org$
Oct 29 10:19:54 josh-vm1 kernel: traps: onedriver-launc[3246] trap int3 ip:7f1154402be1 sp:7ffdae276a10 error:0 in libglib-2.0.so.0.5600.1[7f11543b1000+114000]
Oct 29 10:19:54 josh-vm1 abrt-hook-ccpp: Process 3246 (onedriver-launcher) of user 22382 killed by SIGTRAP - dumping core
Oct 29 10:19:54 josh-vm1 abrt-server: Package 'onedriver' isn't signed with proper key
Oct 29 10:19:54 josh-vm1 abrt-server: 'post-create' on '/var/spool/abrt/ccpp-2021-10-29-10:19:54-3246' exited with 1
Oct 29 10:19:54 josh-vm1 abrt-server: Deleting problem directory '/var/spool/abrt/ccpp-2021-10-29-10:19:54-3246'
wwnetwrk commented 2 years ago

Can we get this re-opened?

jstaf commented 2 years ago

I did some further looking into this tonight and after some serious head-scratching I figured out why there wasn't an EL7 build until now - it turns out that systemd's user sessions are completely disabled in EL7: https://bugs.centos.org/view.php?id=8767

This breaks most of the actual onedriver RPM package - the GUI sessions rely on systemd user sessions to run the filesystem as normal (non-root) users. Likewise, enabling the filesystem between boots via the CLI also relies on starting a systemd user unit as the user who's mounted the filesystem. I'm removing the EL7 packages because neither of these workflows will work properly without systemd user sessions.


If you are interested in using onedriver on EL7, the actual filesystem itself does work, but the tooling that supports mount persistence between boots/GUI (systemd user sessions) does not. The filesystem binary is all you need if you want to run on CentOS 7.

You can compile and use the filesystem on CentOS 7 via the following:

yum install epel-release
yum install gcc pkgconfig webkitgtk4-devel
go build

# mount the filesystem
./onedriver path/to/mountpoint

# you can also copy around the "onedriver" binary to your other centos7 hosts -
# the only runtime dependency is webkitgtk4
abraunegg commented 2 years ago

@jstaf

If you are interested in using onedriver on EL7, the actual filesystem itself does work, but the tooling that supports mount persistence between boots/GUI (systemd user sessions) does not.

Whilst --user is not supported for CentOS etc, this method does work for starting a specific service as a particular user:

systemctl enable <servicename>@<username>.service

See: https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#onedrive-service-running-as-a-non-root-user-via-systemd-all-linux-distributions

The '@' service file contents example:

[Unit]
Description=OneDrive Free Client for %i
Documentation=https://github.com/abraunegg/onedrive
After=network-online.target
Wants=network-online.target

[Service]
ExecStart=@prefix@/bin/onedrive --monitor --confdir=/home/%i/.config/onedrive
User=%i
Group=users
Restart=on-failure
RestartSec=3
RestartPreventExitStatus=3

[Install]
WantedBy=multi-user.target

I have not investigated if this will work for 'onedriver' however

jstaf commented 2 years ago

Yes, but then the GUI needs to run as root+change which dbus bus the GUI connect tos+rewrites for all of the other distros (since we currently use the same technique to determine the mountpoint, not which user it runs under).

I may revisit this when looking into Flatpak packaging (it would nice to not be tied to systemd, but would need another way of launching processes at boot that was cross-distro + also maybe mac/BSD).