Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vdr: revisited version of https://github.com/NixOS/nixpkgs/pull/32050 #52686

Merged
merged 2 commits into from Dec 23, 2018

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Dec 22, 2018

Motivation for this change
  • rebased version of Initial VDR integration #32050
  • current status, stops after start:
    ● vdr.service - VDR
    Loaded: loaded (/nix/store/m1ncnwmkrwjr06k43psyh3xdr0i83qd7-unit-vdr.service/vdr.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since Sat 2018-12-22 16:51:35 CET; 19min ago
    Process: 15152 ExecStart=/nix/store/7267sbr3ddqaqlmg97g6vgv4h59pppxr-vdr-2.4.0/bin/vdr --video=/srv/vdr/video --config=/var/lib/vdr (code=exited, status=2)
    Main PID: 15152 (code=exited, status=2)

Dec 22 16:51:35 turingmachine systemd[1]: vdr.service: Service RestartSec=100ms expired, scheduling restart.
Dec 22 16:51:35 turingmachine systemd[1]: vdr.service: Scheduled restart job, restart counter is at 5.
Dec 22 16:51:35 turingmachine systemd[1]: Stopped VDR.
Dec 22 16:51:35 turingmachine systemd[1]: vdr.service: Start request repeated too quickly.
Dec 22 16:51:35 turingmachine systemd[1]: vdr.service: Failed with result 'exit-code'.
Dec 22 16:51:35 turingmachine systemd[1]: Failed to start VDR.

@ck3d I squashed your commits and added systemd-tmpfile rules to automatically create the video directory on startup. However the services still fails, when
I add services.vdr.enable = true;. What else do I need? I do not own any video/dvb-t devices.

@Mic92
Copy link
Member Author

Mic92 commented Dec 22, 2018

@GrahamcOfBorg build vdr

@ck3d
Copy link
Contributor

ck3d commented Dec 22, 2018

First of all, I expect following error (should be visible in journal):

vdr: error while reading '/var/lib/vdr/sources.conf'
vdr: error while reading '/var/lib/vdr/channels.conf'
vdr: no primary device found - using first device!

A good default for sources.conf can be found in ${pkgs.vdr}/share/vdr/conf or http://www.vdr-wiki.de/wiki/index.php/Sources.conf .
Channels.conf depends on the DVB source you want to use. If you have german DVB-S, you can use the channels.conf which is in the same folder as the sources.conf or you can start creating our own. I can recommend following page http://vdr-wiki.de/wiki/index.php/Channels.conf .

But the main issue is not having a DVB device. It seems that vdr doesn't start if no DVB device is available.

@Mic92
Copy link
Member Author

Mic92 commented Dec 22, 2018

Yes I got the very same error message.
Is there some volatile state that is stored in /var/lib/vcr? Otherwise it could be managed in /etc/vcr by nix itself? Apart from that, can you check wether I have broke something else in my pull request?

@ck3d
Copy link
Contributor

ck3d commented Dec 22, 2018

/var/lib/vdr is the place where vdr also stores recording timers in timer.conf and user settings in setup.conf . Vdr can also update channel names and add new channels in channels.conf . All other files are more or less static, but it is not possible to set different config paths . For more information following page gives an good overview http://vdr-wiki.de/wiki/index.php/Struktur .

I got this PR on my media PC perfectly running. The tmprule looks good.

@Mic92 Mic92 merged commit 633bc1d into NixOS:master Dec 23, 2018
@ck3d
Copy link
Contributor

ck3d commented Dec 23, 2018

@Mic92 Thanks a lot for helping! Great that you merged the PR!
I do not know why I did not see it yesterday, but today my recordings have been deleted! I think something is wired with the tmprules. We should remove the tmprules or fix is?!

@Mic92 Mic92 deleted the vdr branch December 23, 2018 17:51

config = mkIf cfg.enable {
systemd.tmpfiles.rules = [
"d ${cfg.videoDir} 0755 vdr vdr 0"
Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry this should be -:

"d ${cfg.videoDir} 0755 vdr vdr -"

@Mic92
Copy link
Member Author

Mic92 commented Dec 23, 2018

fixed in 044ff3d

@ck3d
Copy link
Contributor

ck3d commented Dec 23, 2018

Thanks for the fast fix. Now I understand the 0. ... I hope I can recover my recordings. Nevertheless thanks a lot for bringing the PR into Nixpkgs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants