You are not logged in.
After upgrading nextcloud from 17.0.1-1 to 17.0.2-1 config.php seems to have been deleted. How can that happen? Seems like it has happened before https://bbs.archlinux.org/viewtopic.php?id=241206, but that is the only other occurence of that problem I (google) could find.
I also posted this here https://help.nextcloud.com/t/config-php … date/67586.
I do not have a backup of config.php because I thought it is enough to backup /usr/share/webapps/nextcloud preserving symlinks btw
Last edited by cadaeib (2020-01-16 09:13:24)
Offline
It's not in the PKGBUILD.
Offline
The package appears to use /etc/webapps/nextcloud/config , not the path you mention .
# move config to /etc
install -d "$pkgdir"/etc/webapps/${pkgname}
mv "$pkgdir"/usr/share/webapps/${pkgname}/config "$pkgdir"/etc/webapps/${pkgname}/config
chown -R http:http "$pkgdir"/etc/webapps/${pkgname}
ln -s /etc/webapps/${pkgname}/config "$pkgdir"/usr/share/webapps/${pkgname}/config
chown -R root:http "$pkgdir"/usr/share/webapps/${pkgname}
These commands from its package() function do look like they may result in overriding usermade changes in /etc/webapps/nextcloud/config .
The code snippet feels weitd to me though, and I may be completely misunderstanding it.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
Sorry I thought archlinux.org would notify me of posts.
Yes, it was in /etc/webapps/nextcloud/config and got overwritten by an almost empty config.php. If its the PKGBUILDs fault, then why has it not happened at other upgades?
In any case, I now rewrote the config.php as well as I could and it seems to work so far. Even though I did not specify the salt parameter and I took the instance id that was in the new config.php.
Offline
You didn't read or understand JWR's post. So again, it's not in the the PKGBUILD
To make it more clear pacnew
And to make it even more clear, here's a PKGBUILD with backup PKGBUILD-with-backup
So if you still think it's a bug, create a bug report for the Nextcloud package.
But, I would say create your own PKGBUILD facilitating exactly what you like, to backup all files you like, see second PKGBUILD I posted..
Always backup always;)
Offline
strange thing is the nextcloud package doesnt include /etc/webapps/nextcloud/config/config.php as its a user created file, /etc/webapps/nextcloud/config/config.sample.php is included in the package, so no idea how it got overwritten.
Offline
Sorry I don't know exactly how pacman works. Do I understand correctly, that if config.php would be part of the package, then pacman would overwrite it with every update, because its not specified in the PKGBUILD, that it should be saved?
But then, actually config.php is not part of the package, so pacman would never overwrite it?
Last edited by cadaeib (2020-01-14 09:28:50)
Offline
The backup is not part of the PKGBUILD if you want that, create your own.
I cannot say why your config was overwritten, Sherlock the heck out of it and try to find out why that happened...
It should not have been that way sure but it did according to you, so figure it out.
Learn how your package manager works should be one of the first things if you want to use Arch successful.
But I keep saying it you should always backup configs if for whatever reason they get overwritten and 'whatever' clearly happened, to you
Offline
Sorry I don't know exactly how pacman works. Do I understand correctly, that if config.php would be part of the package, then pacman would overwrite it with every update, because its not specified in the PKGBUILD, that it should be saved?
Correct. pacman will overwrite every file in the package, unless that file is specified as a "backup" file.
But then, actually config.php is not part of the package, so pacman would never overwrite it?
Also correct. I've listed the contents of every version of nextcloud going back to nextcloud-15.0.1-1-any.pkg.tar.xz, and all of them install etc/webapps/nextcloud/config/config.sample.php but none of them install etc/webapps/nextcloud/config/config.php
So upgrading would update the sample file, but nothing else. Deleting the package would remove the sample file, but not touch the actual config file, and then it would refuse to remove the etc/webapps/nextcloud/config/ directory because there are still files in it that are not being removed within that pacman transaction.
Managing AUR repos The Right Way -- aurpublish (now a standalone tool)
Offline
ok, thank you
Offline