On 17-01-20 14:26:23, Ludovic Courtès wrote: > contact....@cryptolab.net skribis: > > > I've been changing this service back and forth and back again, now > > running on one computer, and leaving aside all confusion you will see > > in there, gnunet needs at least a .config/gnunet file, the rest should > > be automatically created. unless it isn't, which was the case > > here. And all shepherd gives me on the computer where I run the branch > > is: starting service gnunet. couldn't start service gnunet. > > You can use > > (make-forkexec-constructor … #:log-file "/var/log/gnunet.log") > > to log stdout/stderr from GNUnet. > > HTH! > > Ludo’.
Okay, it seems that the various subsystems of gnunet can not access the log file to write into it. -rw-r--r-- 1 root root 39590 Feb 24 21:35 gnunet.log Can this be fixed for services, or do I have to move this elsewhere? As far as I know it didn't work in /var/lib/gnunet/ either, so it maybe I'm suid'ing wrong? I'll append the current version of the patch and log of it, I didn't work very much on it recently but I hope to fix it in the next 3 weeks because this commit is getting annoyingly old.
Feb 24 21:35:50-362013 gnunet-daemon-topology-3420 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-362055 gnunet-daemon-topology-3420 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-362091 dht-3422 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-362119 dht-3422 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-362126 dht-3422 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-362197 nse-3423 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-362236 nse-3423 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-362244 nse-3423 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-363970 revocation-3426 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-363997 revocation-3426 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-364005 revocation-3426 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-364397 fs-3425 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-364425 fs-3425 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-364433 fs-3425 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-364974 mesh-3424 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-365001 mesh-3424 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-365009 mesh-3424 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-365024 mesh-3424 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:50-365875 nse-3429 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-365906 nse-3429 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-365916 nse-3429 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-366007 util-3421 WARNING `open' failed on file `/var/lib/gnunet/hostlist/learned.txt' at disk.c:1727 with error: Permission denied Feb 24 21:35:50-366534 dht-3428 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-366569 dht-3428 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-366577 dht-3428 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-367209 revocation-3430 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-367235 revocation-3430 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-367244 revocation-3430 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-367989 gnunet-daemon-topology-3427 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-368013 gnunet-daemon-topology-3427 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-368738 transport-3431 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-368767 transport-3431 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-368775 transport-3431 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-369000 fs-3432 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-369030 fs-3432 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-369038 fs-3432 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-369028 core-3435 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-369063 core-3435 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-369070 core-3435 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-369609 statistics-3433 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-369637 statistics-3433 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-369656 statistics-3433 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-370845 nse-3437 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-370873 nse-3437 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-370880 nse-3437 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-371385 dht-3438 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-371415 dht-3438 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-371410 revocation-3439 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-371423 dht-3438 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-371431 revocation-3439 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-371438 revocation-3439 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-372293 mesh-3434 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-372328 mesh-3434 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-372336 mesh-3434 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-372346 mesh-3434 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:50-372585 core-3441 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-372612 core-3441 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-372620 core-3441 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-373698 gnunet-daemon-topology-3442 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-373726 gnunet-daemon-topology-3442 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-373824 statistics-3444 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-373848 statistics-3444 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-373857 statistics-3444 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-374329 fs-3445 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-374351 fs-3445 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-374358 fs-3445 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-374829 transport-3440 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-374852 transport-3440 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-374859 transport-3440 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-376522 core-3447 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-376551 core-3447 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-376560 core-3447 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-376604 mesh-3446 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-376638 mesh-3446 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-376649 mesh-3446 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-376662 mesh-3446 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:50-376909 nse-3448 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-376934 nse-3448 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-376943 nse-3448 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-377938 revocation-3449 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-377964 revocation-3449 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-377972 revocation-3449 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-378153 statistics-3451 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-378174 statistics-3451 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-378181 statistics-3451 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-378907 dht-3450 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-378943 dht-3450 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-378952 dht-3450 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-378958 transport-3452 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-378986 transport-3452 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-378994 transport-3452 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-380302 gnunet-daemon-topology-3453 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-380328 gnunet-daemon-topology-3453 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-380820 fs-3454 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-380844 fs-3454 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-380851 fs-3454 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-382356 core-3455 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-382378 core-3455 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-382385 core-3455 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-382872 mesh-3456 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-382901 mesh-3456 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-382908 mesh-3456 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-382917 mesh-3456 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:50-383733 statistics-3457 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-383751 statistics-3457 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-383760 statistics-3457 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-384816 transport-3458 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-384842 transport-3458 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-384849 transport-3458 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-386744 nse-3459 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-386774 nse-3459 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-386780 nse-3459 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-388080 revocation-3460 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-388107 revocation-3460 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-388114 revocation-3460 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-389034 dht-3461 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-389061 dht-3461 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-389068 dht-3461 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-390525 gnunet-daemon-topology-3462 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-390547 gnunet-daemon-topology-3462 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-391253 fs-3463 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-391290 fs-3463 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-391299 fs-3463 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-392298 core-3465 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-392326 core-3465 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-392334 core-3465 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-393132 mesh-3466 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-393156 mesh-3466 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-393163 mesh-3466 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-393171 mesh-3466 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:50-393338 statistics-3467 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-393363 statistics-3467 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-393372 statistics-3467 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-394711 transport-3468 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-394737 transport-3468 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-394743 transport-3468 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-404576 nse-3469 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-404605 nse-3469 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-404614 nse-3469 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-406249 revocation-3470 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-406272 revocation-3470 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-406279 revocation-3470 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-407208 dht-3471 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-407237 dht-3471 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-407244 dht-3471 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-408661 gnunet-daemon-topology-3472 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-408689 gnunet-daemon-topology-3472 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-409568 fs-3473 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-409593 fs-3473 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-409600 fs-3473 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-410253 core-3474 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-410284 core-3474 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-410292 core-3474 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-411123 statistics-3476 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-411150 statistics-3476 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-411160 statistics-3476 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-411425 mesh-3475 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-411451 mesh-3475 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-411460 mesh-3475 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-411479 mesh-3475 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:50-412704 transport-3477 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-412728 transport-3477 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-412734 transport-3477 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-438564 nse-3478 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-438588 nse-3478 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-438594 nse-3478 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-440266 revocation-3479 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-440284 revocation-3479 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-440291 revocation-3479 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-441412 dht-3480 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-441441 dht-3480 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-441447 dht-3480 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-443043 gnunet-daemon-topology-3481 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-443071 gnunet-daemon-topology-3481 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-444221 core-3483 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-444231 fs-3482 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-444255 core-3483 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-444261 fs-3482 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-444265 core-3483 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-444270 fs-3482 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-444812 statistics-3484 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-444828 statistics-3484 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-444835 statistics-3484 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-445710 mesh-3485 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-445743 mesh-3485 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-445750 mesh-3485 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-445762 mesh-3485 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:50-446569 transport-3486 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-446594 transport-3486 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-446601 transport-3486 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-504599 nse-3487 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-504624 nse-3487 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-504630 nse-3487 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-506328 revocation-3488 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-506349 revocation-3488 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-506356 revocation-3488 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-507613 dht-3489 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-507642 dht-3489 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-507649 dht-3489 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-509307 gnunet-daemon-topology-3490 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-509337 gnunet-daemon-topology-3490 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-510362 core-3491 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-510390 core-3491 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-510398 core-3491 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-510619 statistics-3493 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-510635 statistics-3493 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-510641 statistics-3493 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-510946 fs-3492 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-510979 fs-3492 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-510988 fs-3492 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-511963 mesh-3494 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-511985 mesh-3494 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-511992 mesh-3494 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-512002 mesh-3494 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:50-512495 transport-3495 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-512523 transport-3495 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-512530 transport-3495 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-634601 nse-3496 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-634625 nse-3496 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-634632 nse-3496 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-636192 revocation-3497 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-636225 revocation-3497 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-636232 revocation-3497 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-637835 dht-3498 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-637866 dht-3498 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-637873 dht-3498 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-639597 gnunet-daemon-topology-3499 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-639621 gnunet-daemon-topology-3499 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-640459 statistics-3500 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-640482 statistics-3500 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-640490 statistics-3500 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-640529 core-3501 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-640549 core-3501 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-640556 core-3501 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-641571 fs-3502 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-641604 fs-3502 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-641614 fs-3502 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-642192 mesh-3503 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-642218 mesh-3503 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-642225 mesh-3503 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-642234 mesh-3503 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:50-642363 transport-3504 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-642390 transport-3504 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-642399 transport-3504 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-892610 nse-3505 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-892634 nse-3505 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-892641 nse-3505 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-894340 revocation-3506 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-894366 revocation-3506 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-894373 revocation-3506 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-896056 dht-3507 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-896084 dht-3507 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-896091 dht-3507 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-898007 gnunet-daemon-topology-3508 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-898034 gnunet-daemon-topology-3508 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-898186 statistics-3509 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-898212 statistics-3509 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-898229 statistics-3509 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-898485 core-3510 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-898511 core-3510 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-898521 core-3510 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-900246 fs-3511 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-900277 fs-3511 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-900285 fs-3511 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-900336 transport-3513 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-900361 transport-3513 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-900368 transport-3513 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-900430 mesh-3512 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:50-900457 mesh-3512 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:50-900465 mesh-3512 ERROR Assertion failed at service.c:1444. Feb 24 21:35:50-900479 mesh-3512 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:51-407138 nse-3515 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:51-407168 nse-3515 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:51-407175 nse-3515 ERROR Assertion failed at service.c:1444. Feb 24 21:35:51-408537 revocation-3516 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:51-408564 revocation-3516 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:51-408570 revocation-3516 ERROR Assertion failed at service.c:1444. Feb 24 21:35:51-410283 dht-3517 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:51-410314 dht-3517 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:51-410322 dht-3517 ERROR Assertion failed at service.c:1444. Feb 24 21:35:51-411914 statistics-3519 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:51-411935 statistics-3519 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:51-411942 statistics-3519 ERROR Assertion failed at service.c:1444. Feb 24 21:35:51-412402 core-3520 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:51-412433 core-3520 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:51-412427 gnunet-daemon-topology-3518 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:51-412441 core-3520 ERROR Assertion failed at service.c:1444. Feb 24 21:35:51-412450 gnunet-daemon-topology-3518 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:51-414750 transport-3523 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:51-414777 transport-3523 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:51-414784 transport-3523 ERROR Assertion failed at service.c:1444. Feb 24 21:35:51-414959 mesh-3521 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:51-414989 mesh-3521 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:51-415007 mesh-3521 ERROR Assertion failed at service.c:1444. Feb 24 21:35:51-415019 mesh-3521 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:51-415312 fs-3522 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:51-415335 fs-3522 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:51-415342 fs-3522 ERROR Assertion failed at service.c:1444. Feb 24 21:35:52-434056 nse-3524 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:52-434079 nse-3524 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:52-434086 nse-3524 ERROR Assertion failed at service.c:1444. Feb 24 21:35:52-434743 revocation-3525 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:52-434768 revocation-3525 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:52-434775 revocation-3525 ERROR Assertion failed at service.c:1444. Feb 24 21:35:52-436394 dht-3526 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:52-436421 dht-3526 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:52-436428 dht-3526 ERROR Assertion failed at service.c:1444. Feb 24 21:35:52-437612 statistics-3527 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:52-437632 statistics-3527 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:52-437639 statistics-3527 ERROR Assertion failed at service.c:1444. Feb 24 21:35:52-438654 core-3529 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:52-438681 core-3529 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:52-438689 core-3529 ERROR Assertion failed at service.c:1444. Feb 24 21:35:52-438920 gnunet-daemon-topology-3528 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:52-438943 gnunet-daemon-topology-3528 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:52-440941 transport-3531 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:52-440968 transport-3531 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:52-440975 transport-3531 ERROR Assertion failed at service.c:1444. Feb 24 21:35:52-441300 mesh-3532 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:52-441328 mesh-3532 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:52-441336 mesh-3532 ERROR Assertion failed at service.c:1444. Feb 24 21:35:52-441351 mesh-3532 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:52-441736 fs-3533 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:52-441761 fs-3533 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:52-441768 fs-3533 ERROR Assertion failed at service.c:1444. Feb 24 21:35:54-486190 revocation-3534 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:54-486216 revocation-3534 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:54-486223 revocation-3534 ERROR Assertion failed at service.c:1444. Feb 24 21:35:54-486403 nse-3535 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:54-486432 nse-3535 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:54-486450 nse-3535 ERROR Assertion failed at service.c:1444. Feb 24 21:35:54-486748 dht-3536 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:54-486769 dht-3536 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:54-486775 dht-3536 ERROR Assertion failed at service.c:1444. Feb 24 21:35:54-487869 statistics-3538 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:54-487895 statistics-3538 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:54-487903 statistics-3538 ERROR Assertion failed at service.c:1444. Feb 24 21:35:54-488415 core-3539 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:54-488434 core-3539 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:54-488441 core-3539 ERROR Assertion failed at service.c:1444. Feb 24 21:35:54-489158 gnunet-daemon-topology-3540 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:54-489181 gnunet-daemon-topology-3540 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:54-491053 transport-3541 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:54-491081 transport-3541 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:54-491087 transport-3541 ERROR Assertion failed at service.c:1444. Feb 24 21:35:54-491637 mesh-3542 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:54-491666 mesh-3542 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:54-491674 mesh-3542 ERROR Assertion failed at service.c:1444. Feb 24 21:35:54-491691 mesh-3542 ERROR Assertion failed at gnunet-service-mesh.c:177. Feb 24 21:35:54-492142 fs-3543 ERROR `open' failed on file `/var/log/gnunet.log' at common_logging.c:388 with error: Permission denied Feb 24 21:35:54-492168 fs-3543 WARNING Failed to create or access directory for log file `/var/log/gnunet.log' Feb 24 21:35:54-492175 fs-3543 ERROR Assertion failed at service.c:1444. Feb 24 21:35:55-274118 util-3421 WARNING `open' failed on file `/var/lib/gnunet/hostlist/learned.txt' at disk.c:1727 with error: Permission denied Feb 24 21:35:55-274141 hostlist-3421 WARNING Could not open file `/var/lib/gnunet/hostlist/learned.txt' for writing to save hostlists: Permission denied
>From d46cf6f6ce6b152e7794665417cfa9ce91120a98 Mon Sep 17 00:00:00 2001 From: ng0 <n...@we.make.ritual.n0.is> Date: Mon, 12 Sep 2016 12:26:52 +0000 Subject: [PATCH] gnu: services: Add gnunet-service. --- doc/guix.texi | 36 +++++++++++++ gnu/services/networking.scm | 126 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 161 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index be11096a4..42884fe1c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -9289,6 +9289,42 @@ Package object of the Open vSwitch. @end table @end deftp +@cindex GNUnet +@cindex gnunet +@subsubheading GNUnet Service + +@deffn {Scheme Variable} gnunet-service-type +This is the type of the @uref{https://gnunet.org, GNUnet} +service, whose value should be an @code{gnunet-configuration} object +as in this example: + +@example +(service gnunet-service-type + (gnunet-configuration + (config-file (local-file "./gnunet.conf")))) +@end example +@end deffn + +@deftp {Data Type} gnunet-configuration +Data type representing the configuration of GNUnet. + +@table @asis +@item @code{package} (default: @var{gnunet}) +Package object of the GNUnet service. + +@item @code{config-file} (default: @var{%default-gnunet-file}) +File-like object of the GNUnet configuration file to use. For NAT is +assumes by default that you are behind a NAT (@var{BEHIND_NAT = YES}) +and enables UPNP (@var{ENABLE_UPNP = YES}). +The hostlist is configured with the options @var{-b} (bootstrap using +configured hostlist servers) and @var{-e} (enable learning advertised hostlists). +Read the configuration files in @var{"~/.guix-profile/share/gnunet/config.d/"} +for more information. These files also set the defaults when you don't set +any explicit values to override them. + +@end table +@end deftp + @node X Window @subsubsection X Window diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 18bce2a2b..2eac1ba06 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Efraim Flashner <efr...@flashner.co.il> ;;; Copyright © 2016 John Darrington <j...@gnu.org> ;;; Copyright © 2017 Clément Lassieur <clem...@lassieur.org> +;;; Copyright © 2017 ng0 <contact....@cryptolab.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,6 +29,7 @@ #:use-module (gnu system pam) #:use-module (gnu packages admin) #:use-module (gnu packages connman) + #:use-module (gnu packages gnunet) #:use-module (gnu packages linux) #:use-module (gnu packages tor) #:use-module (gnu packages messaging) @@ -84,7 +86,12 @@ wpa-supplicant-service-type openvswitch-service-type - openvswitch-configuration)) + openvswitch-configuration + + gnunet-configuration + gnunet-configuration? + gnunet-service-type + %default-gnunet-config-file)) ;;; Commentary: ;;; @@ -947,4 +954,121 @@ configure networking." (service-extension shepherd-root-service-type openvswitch-shepherd-service))))) +;;; +;;; GNUnet +;;; + +(define-record-type* <gnunet-configuration> + gnunet-configuration make-gnunet-configuration + gnunet-configuration? + (package gnunet-configuration-package + (default gnunet)) + (config-file gnunet-configuration-config-file + (default %default-gnunet-config-file))) + +(define %default-gnunet-config-file + (plain-file "gnunet.conf" " +[PATHS] +SERVICEHOME = /var/lib/gnunet +GNUNET_CONFIG_HOME = /var/lib/gnunet + +[arm] +SYSTEM_ONLY = NO +USER_ONLY = NO + +[nat] +BEHIND_NAT = YES +ENABLE_UPNP = YES + +[hostlist] +OPTIONS = -b -e +")) + +(define gnunet-shepherd-service + (match-lambda + (($ <gnunet-configuration> package config-file) + (list (shepherd-service + (provision '(gnunet)) + (requirement '(user-processes loopback networking)) + (documentation "Run the GNUnet service.") + (start + (let ((gnunet + (file-append package "/lib/gnunet/libexec/gnunet-service-arm"))) + #~(make-forkexec-constructor + (list #$gnunet "-c" #$config-file) + #:pid-file "/var/run/gnunet.pid" + #:user "gnunet" + #:group "gnunet" + ;;#:log-file "/var/lib/gnunet/gnunet.log"))) + #:log-file "/var/log/gnunet.log"))) + (stop + #~(make-kill-destructor))))))) + +(define %gnunet-accounts + (list (user-group + (name "gnunetdns") + (system? #t)) + (user-group + (name "gnunet") + (system? #t)) + (user-account + (name "gnunet") + (group "gnunet") + (system? #t) + (comment "GNUnet system user") + (home-directory "/var/empty") + (shell (file-append shadow "/sbin/nologin"))))) + +(define gnunet-activation + (match-lambda + (($ <gnunet-configuration> package config-file) + (let ((gnunet + (file-append package "/lib/gnunet/libexec/gnunet-service-arm"))) + #~(begin + (use-modules (guix build utils)) + (define %user (getpw "gnunet")) + (mkdir-p "/var/lib/gnunet/") + (chown "/var/lib/gnunet" (passwd:uid %user) (passwd:gid %user)) + ;;(chmod "/var/lib/gnunet/" #o755) + (mkdir-p "/var/lib/gnunet/.local/share/gnunet") + (mkdir-p "/var/lib/gnunet/.cache/gnunet") + (mkdir-p "/var/lib/gnunet/hostlist") + (mkdir-p "/var/lib/gnunet/.config/gnunet") + (chown "/var/lib/gnunet/.local/share/gnunet" (passwd:uid %user) (passwd:gid %user)) + (chown "/var/lib/gnunet/.cache/gnunet" (passwd:uid %user) (passwd:gid %user)) + (chown "/var/lib/gnunet/hostlist" (passwd:uid %user) (passwd:gid %user)) + ;;(chown "/var/lib/gnunet/gnunet.conf" (passwd:uid %user) (passwd:gid %user)) + (chown "/var/lib/gnunet/.config/gnunet" (passwd:uid %user) (passwd:gid %user))))))) + ;;(chmod "/var/lib/gnunet/.config/gnunet" #o755) + ;;(chmod "/var/lib/gnunet/.cache/gnunet" #o755) + ;;(chmod "/var/lib/gnunet/.local/share/gnunet" #o755)))))) + +;; SUID_ROOT_HELPERS="exit nat-server nat-client transport-bluetooth transport-wlan vpn" +;; set chmod u+s for those above. +;; chmodown_execbin ${libexec}/gnunet-helper-dns 4750 root:gnunetdns +;; chmodown_execbin ${libexec}/gnunet-service-dns 2750 gnunet:gnunetdns +(define gnunet-setuid-programs + (match-lambda + (($ <gnunet-configuration> package) + (list (file-append package "/lib/gnunet/libexec/gnunet-helper-exit") + (file-append package "/lib/gnunet/libexec/gnunet-helper-nat-server") + (file-append package "/lib/gnunet/libexec/gnunet-helper-nat-client") + (file-append package "/lib/gnunet/libexec/gnunet-helper-transport-bluetooth") + (file-append package "/lib/gnunet/libexec/gnunet-helper-transport-wlan") + (file-append package "/lib/gnunet/libexec/gnunet-helper-vpn"))))) + +(define gnunet-service-type + (service-type + (name 'gnunet) + (extensions (list (service-extension account-service-type + (const %gnunet-accounts)) + (service-extension activation-service-type + gnunet-activation) + (service-extension profile-service-type + (compose list gnunet-configuration-package)) + (service-extension setuid-program-service-type + gnunet-setuid-programs) + (service-extension shepherd-root-service-type + gnunet-shepherd-service))))) + ;;; networking.scm ends here -- 2.11.1