Skip to content

Owncloud latest#10514

Closed
aborsu wants to merge 678 commits intoNixOS:masterfrom
aborsu:owncloud-latest
Closed

Owncloud latest#10514
aborsu wants to merge 678 commits intoNixOS:masterfrom
aborsu:owncloud-latest

Conversation

@aborsu
Copy link
Contributor

@aborsu aborsu commented Oct 21, 2015

Update owncloud to 8.1.3
Add ca-bundle.crt to config folder
Add url prefix option set with "/owncloud" as default value
Fix document root to only be set if there is no url prefix defined

This has not been tested with existing owncloud instances so if anyone has the courage to do that it would be interesting.
Example config using this change can be found here.
https://github.com/aborsu/dotfiles-nix/blob/master/acelpb.nix

@lucabrunox
Copy link
Contributor

Note there's owncloud 8.2 :P

@aborsu
Copy link
Contributor Author

aborsu commented Oct 21, 2015

Indeed it just came out. I'll update that.

@domenkozar
Copy link
Member

cc @offlinehacker @matejc

@jagajaga
Copy link
Member

Awesome! But please rename commits to follow our guides in CONTRIBUTING.md.

@aborsu
Copy link
Contributor Author

aborsu commented Oct 22, 2015

@lethalman I updated to 8.2.0
@jagajaga Like this?

Updating to 8.2.0 seems to work but I now have a bug where I need to restart the httpd server after the initial update to be able to use my password.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mediawikiRoot?

@aborsu
Copy link
Contributor Author

aborsu commented Oct 22, 2015

I blame it on careless rebasing ...

@matejc
Copy link
Contributor

matejc commented Oct 22, 2015

I would not merge this, because to my experience upgrading the package is not enough if not tested the migration scripts from 7.x to 8.x. The migration scripts are not working here (probably NixOS related problem), therefore there are 2 ways to do this:

  1. test and fix migration scripts
  2. divide owncloud to owncloud7 and owncloud8 packages and maybe even nixos module (service), or just set owncloud package somewhere in module configuration

And one more thing, @aborsu does WebDAV works? I had problems with it on 8.x versions.

@aborsu
Copy link
Contributor Author

aborsu commented Oct 22, 2015

@matejc I didn't test WebDAV in version 8 yet, and I have a few issues as everytime I try to upgrade my server it freezes but that is an unrelated issue (... I think?).
I tried creating a 7.0.5 server and update it to 7.0.10 and I run in this issue
{"app":"PHP","message":"touch(): Unable to create file /nix/store/awcfzxf2dfdjh36yjpmlbwfs2zmq4v47-owncloud-7.0.10/data/owncloud.log because No such file or directory at /nix/store/awcfzxf2dfdjh36yjpmlbwfs2zmq4v47-owncloud-7.0.10/lib/private/log/owncloud.php#49","level":3,"time":"2015-10-22T20:28:33+00:00"}
Apparently when running the update from the command line it doesn't find the config.php and therefore tries to create an owncloud.log file in the read-only filesystem.
Maybe we could hardcode the log file in base.php when creating the package?
What do you think?

@matejc
Copy link
Contributor

matejc commented Oct 22, 2015

@aborsu this log should be already inside /var/lib/owncloud/data directory according to the OC_CONFIG_PATH variable which is set here https://github.com/aborsu/nixpkgs/blob/owncloud-latest/nixos/modules/services/web-servers/apache-httpd/owncloud.nix#L361

probably this replace does not match anymore in the newer version https://github.com/aborsu/nixpkgs/blob/owncloud-latest/pkgs/servers/owncloud/default.nix#L17

@matejc
Copy link
Contributor

matejc commented Oct 22, 2015

@aborsu about the freezing thingie .. make sure that it is not freezing at this point: https://github.com/aborsu/nixpkgs/blob/owncloud-latest/nixos/modules/services/web-servers/apache-httpd/owncloud.nix#L576

this line "should" do the database migration but I think this is also the likely suspect for freezing

@aborsu
Copy link
Contributor Author

aborsu commented Oct 23, 2015

I tried a few things last night but unfortunately I haven't been able to get it to work reliably.
I've changed my pull request to only add an option for urlPrefix and the default is set to "" so there is no behavior change from the current situation.
I'll work some more on the update part when I have time and will let you know how it goes.

@aborsu
Copy link
Contributor Author

aborsu commented Nov 5, 2015

@matejc
I've successfully updated a test owncloud from 7.0.5 to 7.0.10 many times. I only have one issue left, that the version number in the admin interface doesn't update, but the version number in the php config is correct and if I rerun the update script it confirms the database is up to date.
As you said, webdav doesn't seem to work in owncloud 8+ so I propose that we update to version 7.0.10 while that gets sorted.

@matejc
Copy link
Contributor

matejc commented Nov 5, 2015

@aborsu yes, lets update to 7.0.10 for now. I think that WebDav issue is related only to Nix/NixOS, some paths are probably not set correctly in the owncloud code.

and again, @aborsu nice work! I will merge when I test things on my server, but this might take some time. If someone beats me to it, do merge.

@rickynils rickynils added update-package 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS labels Nov 16, 2015
@vcunat
Copy link
Member

vcunat commented Nov 16, 2015

Ping.

@matejc
Copy link
Contributor

matejc commented Nov 18, 2015

@vcunat tnx for ping

@aborsu when accessing clean environment with default owncloud I get this error and I can not continue

You are accessing the server from an untrusted domain.

Please contact your administrator. If you are an administrator of this instance, configure the "trusted_domain" setting in config/config.php. An example configuration is provided in config/config.sample.php.
Depending on your configuration, as an administrator you might also be able to use the button below to trust this domain. 

my config.php has

'trusted_domains' => array('aborsu.local'),

and my configuration.nix has

    httpd = {
      enable = true;
      adminAddr="some@email.beje";
      enablePHP = true;

      virtualHosts = [
        {
          hostName = "aborsu.local";
          extraSubservices = [
            {
              trustedDomain = "aborsu.local";
              serviceType = "owncloud";
              dbUser = "owncloud";
              dbPassword = "SECRET";
              adminUser = "aborsu";
              adminPassword = "SECRET";
            }
          ];
        }
      ];
    };

@matejc
Copy link
Contributor

matejc commented Nov 18, 2015

@aborsu also.. it would be awesome if someone could set owncloudPackage from the configuration.. example:

          extraSubservices = [
            {
              trustedDomain = "aborsu.local";
              owncloudPackage = pkgs.owncloud705;
              serviceType = "owncloud";
              dbUser = "owncloud";
              dbPassword = "SECRET";
              adminUser = "aborsu";
              adminPassword = "SECRET";
            }
          ];

this makes sense as multiple ownclouds are packaged

@matejc
Copy link
Contributor

matejc commented Nov 18, 2015

ps: I hope I am not too demanding :)

@aborsu
Copy link
Contributor Author

aborsu commented Nov 26, 2015

Oups, not sure the rebase thing was a good idea...
@matejc about the trusted domain issue, if a trusted domain is set, you need to be accessing owncloud using that adress. So if you set trusted domain to aborsu.local, that is what you should type in your browser's address bar. (Or was that what you were doing? in which case I don't have that problem.)
I fixed an issue were if you didn't set it, it would require an empty string as a domain name.
If you unset it now it should accept connections using any domain name.
I also added the possibility to change the package used, it is set to owncloud70 by default.

@aborsu
Copy link
Contributor Author

aborsu commented Nov 26, 2015

And sorry it took me so long to respond.

@matejc
Copy link
Contributor

matejc commented Dec 2, 2015

No worries about the long response. What happen to rebase? :D No worries about that also, I will fix it by creating a new pull request with your commits, so you will not loose author data. The merge is near.

@matejc matejc mentioned this pull request Dec 2, 2015
@matejc matejc closed this Dec 2, 2015
@aborsu aborsu deleted the owncloud-latest branch January 2, 2016 07:14
@Janik-Haag Janik-Haag added the 12.first-time contribution This PR is the author's first one; please be gentle! label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.