From Gentoo Wiki
Jump to:navigation Jump to:search

Recommended USE flags

Talk status
This discussion is done as of 2023-06-20.

I guess the text "Generally recommended USE flags are bz2 gmp bcmath exif intl sysvipc." has an error in use flags, bz2 should be named bzip2? — The preceding unsigned comment was added by Nyback (talkcontribs) 11:36, June 19, 2023‎

Yes, that is an error. I have fixed it in several locations: 1) original draft that someone copied, then 2) someone else copied that copy (now deleted), and 3) it ended up being published to the main namespace here. There's still a bit of work to do in order to get this article operational. --Maffblaster (talk) 08:56, 20 June 2023 (UTC)

Migrations From Older Versions of Nextcloud

Talk status
This discussion is still ongoing.

If anyone has any experience migrating, some mention and/or tips would be helpful. For example, if migration is automated by Nextcloud when you install a newer version, that would be helpful to know. Or, will something in web-app handle it? I'm in a position where I installed Nextcloud, v. 23, some years ago and have not used it. Now I think I'd like to have it, so I'm looking at v. 28 (because my PHP on the server has risen from v. 7.3 which was acceptable for Nextcloud v. 23, to PHP 8.+ which is not compatible with my older Nextcloud install) and wondering if migration can be accomplished with ease.

Jlpoole (talk) 16:31, 14 March 2024 (UTC)

Nextcloud Client Configuration Included ?

Note: The approach here of inserting into /etc/fstab a URL as the first option will prevent a Xen Virtual Machine from launching because Xen reads the /etc/fstab and doesn't know what to do with the "http:" reference, Xen is expecting devices under /dev. I had performed below, and on reboot of the Xen server, the creation of the guest domain where the nextcloud URL was in its /etc/fstab file hung at "start /init". When I commented out the nextcloud entry in /etc/fstab, then the guest domain launched successfully. This is a pretty big "gotcha" which either should be documented, or weigh in as a "con" for this approach... especially if you use virtual machines. [Edit: this cautionary paragraph added 4/12]

The documentation for implementing a Nextcloud client on a Linux system is scant. I have two different guis: KDE Plasma and XFCE. The official [documentation] seems to focus upon Gnome's Nautilius and KDE's Dolphin. I tried the KDE Dolphin and could not get past a failure (with no helpful error messages) of the "KDE Add a Network Folder..." dialog which kept failing no matter what various fields I provided. I searching around for help on this failure point and was not able to find anything, either in Nextcloud's documentation, or KDE's. So I came back to Gentoo and opted for the more console-centric way, installing net-fs/davfs2, as set forth below which worked, but not without some gotchas. Here's what I have for a recipe for installing the net-fs/davfs2 package:

   emerge net-fs/davfs2  

no configuration needed. However, this package also brings in two other packages that create a user and group: davfs2. As root, add yourself, the user, to the group davfs2.

   gpasswd -a [username] davfs2

Modify /etc/fstab to add the webdav mount. Example line:

    https://[server name or IP]/nextcloud/remote.php/dav/files/[nextcloud username]/ /home/[Gentoo user]/nextcloud davfs user,rw,auto 0 0
   nano /etc/fstab

Here's the tricky part: adding a user to a new group does not take effect until the user logs in anew. The way to cause the new group addition with the new user added to take effect in an existing console is for a given user (not root) to execute in their console the newgrp command with the name of the group:

    newgrp davfs2

As the user with sudo privileges (not root), do the following:

    cd ~
    mkdir nextcloud
    mkdir ~/.davfs2
    sudo cp  /etc/davfs2/secrets ~/.davfs2/secrets
    sudo chown [username]:  ~/.davfs2/secrets
    sudo chmod 600 ~/.davfs2/secrets

Add at the end a line in file secrets three fields delimited by white space: 1)the path, 2) nextcloud username & 3) password such as: /home/user/nextcloud [nextcloud username] [nextcloud's password]

    nano ~/.davfs2/secrets

Then, as the Gentoo user, you will try to mount the webdav connection. As user:

    mount /home/[username]/nextcloud

(Note: one instruction suggests using "mount ~/nextcloud" -- that did not work, I had to use the full path, e.g. /home/[username]/nextcloud.) You will then go through a password challenge providing your nextcloud username, nextcloud uername's password. After completing the password challenge, the contents of your nextcloud tree should appear in the directory you specified, e.g. /home/[username]/nextcloud.

Note: if you go the route of using the Web browser to establish a connection to your Nextcloud server, after you give your browser permission and access to your desktop, the path that the browser will create will be "/home/[username]/Nextcloud" with a capital "N". The above instructions specify lowercase "n", so be aware of this distinction.

(The above does not reconcile the fact that the file "secrets" is suppose to have the authentication information, yet in the current console where I created the connection, I had to go through a password challenge. Perhaps the authentication information will serve upon a new login to the machine?)

The two tricky parts are 1) getting a current session to incorporate the effect of newly addition of the user to the new group using the command "newgrp [group name]", and 2) using a full path for the mount. One can execute "newgrp" without anything and there will be no error message and the command will give the impression of a successful execution, so it is necessary for the user to specify the name of the group when executing "newgrp", e.g. "newgrp davfs2".

Perhaps someone with more experience/know-how can distill the above. Nonetheless, installing a client for Nextcloud is not a simple matter and the Gentoo documentation for Nextcloud would do well to have a section regarding the client install. I'm slowly migrating away from Window 7, so Nextcloud is an important tool for me. Others considering migration might find Nextcloud helpful to use, too.

Jlpoole (talk) 21:50, 9 April 2024 (UTC)