owncloud-config-apache Debian package: local configuration is removed on each update
Steps to reproduce:
- Install owncloud-config-apache
- "a2dismod owncloud" because we have lots of virtual hosts, and most certainly do not want owncloud on all of them.
- Update the owncloud packages
Expected behavior: The apache configuration is unaltered, in accordance with the usual Debian practice which states that configuration changes performed by the local admin have to be preserved.
Actual behavior: The apache module is re-enabled, breaking our overall configuration (as we suddenly again have owncloud in all our virtual hosts).
More details:
The problem is that "a2enconf owncloud" is called each time the package is configured.
I tried to go further and delete /etc/apache2/conf-available/owncloud.conf, but that doesn't help either. Nor does emptying that file. The issue: the file is not marked as a CONFFILE for dpkg, so any changes are overwritten on each installation.
@jnweiger
Just wanted to confirm that I also experienced this problem after doing an apt-get upgrade this evening. Completely blew away my SSL settings and such.
I've attached my apt history.log, in case it's of use.
Start-Date: 2015-03-10 22:31:09
Commandline: apt-get upgrade
Upgrade: owncloud-app-templateeditor:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-firstrunwizard:amd64 (8.0.0-6, 8.0.0-9), owncloud:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-files-sharing:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-user-ldap:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-files-versions:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-user-webdavauth:amd64 (8.0.0-6, 8.0.0-9), libmariadbclient18:amd64 (10.0.16+maria-1~wheezy, 10.0.17+maria-1~wheezy), owncloud-3rdparty:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-updater:amd64 (8.0.0-6, 8.0.0-9), mariadb-common:amd64 (10.0.16+maria-1~wheezy, 10.0.17+maria-1~wheezy), libmysqlclient18:amd64 (10.0.16+maria-1~wheezy, 10.0.17+maria-1~wheezy), owncloud-app-gallery:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-files-external:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-files-locking:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-activity:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-provisioning-api:amd64 (8.0.0-6, 8.0.0-9), owncloud-server:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-files-videoviewer:amd64 (8.0.0-6, 8.0.0-9), mariadb-server:amd64 (10.0.16+maria-1~wheezy, 10.0.17+maria-1~wheezy), mariadb-server-10.0:amd64 (10.0.16+maria-1~wheezy, 10.0.17+maria-1~wheezy), owncloud-app-files-pdfviewer:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-external:amd64 (8.0.0-6, 8.0.0-9), mariadb-client-10.0:amd64 (10.0.16+maria-1~wheezy, 10.0.17+maria-1~wheezy), mariadb-server-core-10.0:amd64 (10.0.16+maria-1~wheezy, 10.0.17+maria-1~wheezy), mariadb-client-core-10.0:amd64 (10.0.16+maria-1~wheezy, 10.0.17+maria-1~wheezy), owncloud-config-apache:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-user-external:amd64 (8.0.0-6, 8.0.0-9), mysql-common:amd64 (10.0.16+maria-1~wheezy, 10.0.17+maria-1~wheezy), owncloud-app-files-texteditor:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-files-trashbin:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-files:amd64 (8.0.0-6, 8.0.0-9), owncloud-app-files-encryption:amd64 (8.0.0-6, 8.0.0-9)
End-Date: 2015-03-10 22:32:32
Fixed in upcoming 8.0.2 packages. Flagged as conffiles
/etc/apache2/conf-available/owncloud.conf
/var/www/owncloud/.htaccess
8.0.2 is public now.
https://software.opensuse.org/download.html?project=isv:ownCloud:community:8.0&package=owncloud http://download.opensuse.org/repositories/isv:ownCloud:community:8.0/ https://build.opensuse.org/package/show/isv:ownCloud:community:8.0/owncloud
The bug is not fixed, though:
$ cat conf-enabled/owncloud.conf
#Alias /owncloud "/var/www/owncloud/"
#<Directory "/var/www/owncloud">
# Options +FollowSymLinks
# AllowOverride All
#</Directory>
$ sudo aptitude reinstall owncloud-config-apache
...
$ cat conf-enabled/owncloud.conf
Alias /owncloud "/var/www/owncloud/"
<Directory "/var/www/owncloud">
Options +FollowSymLinks
AllowOverride All
</Directory>
There are no files flagged as conffiles in the package: the control.tar.gz does not even contain a "conffiles".
I cannot reopen the issue, it seems. Should I report a new one?
Ouch. OBS did not check in all files. The conffiles file and one other were left behind here on my working copy. Pushed 8.0.2-5
Upgraded to 8.0.2-5 and conf-available/owncloud.conf is not overwritten any more, great! But the following warning persists:
Restarting web server: apache2 [Thu Mar 19 21:08:54 2015] [warn] The Alias directive in /etc/apache2/conf.d/owncloud.conf.old at line 1 will probably never match because it overlaps an earlier Alias.
But both files are just symlinks to the same file:
$ ls -l /etc/apache2/conf.d/owncloud.conf*
lrwxrwxrwx. 1 root root 31 Mar 19 21:08 /etc/apache2/conf.d/owncloud.conf -> ../conf-available/owncloud.conf
lrwxrwxrwx. 1 root root 31 Mar 18 23:21 /etc/apache2/conf.d/owncloud.conf.old -> ../conf-available/owncloud.conf
This has been present in earlier OC versions (on Debian) as well, I just somehow hoped that this too would've been fixed by 8.0.2-5.
@ckujau see #14610
Confirmed that the fix works, thanks a lot :)