{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/16132","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/16132/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/16132/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/16132/events","html_url":"https://github.com/NixOS/nixpkgs/pull/16132","id":159721563,"number":16132,"title":"tt-rss service: init at 16.3","user":{"login":"zohl","id":6067895,"avatar_url":"https://avatars.githubusercontent.com/u/6067895?v=3","gravatar_id":"","url":"https://api.github.com/users/zohl","html_url":"https://github.com/zohl","followers_url":"https://api.github.com/users/zohl/followers","following_url":"https://api.github.com/users/zohl/following{/other_user}","gists_url":"https://api.github.com/users/zohl/gists{/gist_id}","starred_url":"https://api.github.com/users/zohl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zohl/subscriptions","organizations_url":"https://api.github.com/users/zohl/orgs","repos_url":"https://api.github.com/users/zohl/repos","events_url":"https://api.github.com/users/zohl/events{/privacy}","received_events_url":"https://api.github.com/users/zohl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/8.has:%20module%20(new)","name":"8.has: module (new)","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-10T20:53:58Z","updated_at":"2016-06-11T18:40:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/NixOS/nixpkgs/pulls/16132","html_url":"https://github.com/NixOS/nixpkgs/pull/16132","diff_url":"https://github.com/NixOS/nixpkgs/pull/16132.diff","patch_url":"https://github.com/NixOS/nixpkgs/pull/16132.patch"},"body":"This patch adds Tiny Tiny RSS service.\r\nI tested only basic functionality (i.e. without Sphinx, email notifications etc.), but added the corresponding options.\r\n\r\nThe service does only half a job (database initialization and feed updates). In order to access the interface there should be a web-server with php application server and a database with already created user.\r\nHere is example how to do it with `nginx` and `php-fpm`:\r\nhttps://gist.github.com/zohl/05c1e5830dc0c898a8808204fedbf76b\r\n\r\nSince db initialization scripts are quite aggressive (they purge all the data and create the schema from scratch), they will be called only if the database contains no data. There is a little chance that the output format of `psql` or `mysql` will be different and the things will go wrong. But even so, the only non-desirable effect would be missed schema initialization.\r\n\r\n###### Things done\r\n\r\n- [ ] Tested using sandboxing\r\n  ([nix.useSandbox](http://nixos.org/nixos/manual/options.html#opt-nix.useSandbox) on NixOS,\r\n    or option `build-use-sandbox` in [`nix.conf`](http://nixos.org/nix/manual/#sec-conf-file)\r\n    on non-NixOS)\r\n- Built on platform(s)\r\n   - [X] NixOS\r\n   - [ ] OS X\r\n   - [ ] Linux\r\n- [ ] Tested compilation of all pkgs that depend on this change using `nix-shell -p nox --run \"nox-review wip\"`\r\n- [X] Tested execution of all binary files (usually in `./result/bin/`)\r\n- [ ] Fits [CONTRIBUTING.md](https://github.com/NixOS/nixpkgs/blob/master/.github/CONTRIBUTING.md).\r\n\r\n---\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/225382553","html_url":"https://github.com/NixOS/nixpkgs/pull/16132#issuecomment-225382553","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/16132","id":225382553,"user":{"login":"zohl","id":6067895,"avatar_url":"https://avatars.githubusercontent.com/u/6067895?v=3","gravatar_id":"","url":"https://api.github.com/users/zohl","html_url":"https://github.com/zohl","followers_url":"https://api.github.com/users/zohl/followers","following_url":"https://api.github.com/users/zohl/following{/other_user}","gists_url":"https://api.github.com/users/zohl/gists{/gist_id}","starred_url":"https://api.github.com/users/zohl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zohl/subscriptions","organizations_url":"https://api.github.com/users/zohl/orgs","repos_url":"https://api.github.com/users/zohl/repos","events_url":"https://api.github.com/users/zohl/events{/privacy}","received_events_url":"https://api.github.com/users/zohl/received_events","type":"User","site_admin":false},"created_at":"2016-06-11T18:40:43Z","updated_at":"2016-06-11T18:40:43Z","body":"@groxxda, thank you very much for your review! Looks like I shall pay more attention to the details before commit :)\r\nI updated the PR according to your recomendations, but the only thing I would disagree with is the checking mechanism in `preStart` script.\r\n\r\nThe difference between the directory containing tt-rss stuff and the database is that the former can be easily restored while the latter don't. The one can naturally assume that deleting the directory won't affect the feeds (as they stored physically in different location), but in reality the next `nixos-rebuild` will wipe this data. And this would be very frustrating. I might be a paranoid a little bit (or just too lazy to make a backup before system update), but I prefer to keep more complex check in order to prevent such a scenario.\r\n\r\nAlso there is a change in `user` parameter. We can avoid granting `777` to files, but both the service and the web-application should have write access to the directory. I think the simplest way is to run the service and the application under the same account (like `nginx`or `http`). No more extra users and `777`s :)\r\n"}}
{"actor":{"display_login":"zohl"}}