Artix Linux Forum

Artix Linux => Package management => Topic started by: fungalnet on 13 June 2019, 09:12:33

Title: who owns rendom-seed
Post by: fungalnet on 13 June 2019, 09:12:33
I know of pacman -Qo **filename** and pacman -Fo which I believe does the same thing but searches the repository, not just installed pkgs.  Neither returns an owner of /var/lib/random-seed

I suspect it is a python related file but which,where,how,what ..?
Title: Re: who owns rendom-seed
Post by: nous on 13 June 2019, 17:53:28
Code: [Select]
grep -r random-seed /etc/
Title: Re: who owns rendom-seed
Post by: fungalnet on 14 June 2019, 00:47:00
very confusing results, between my old openrc installation switched to runit, a newer runit installation, and your late openrc mate live image.  Also differences with artix-runit and void-runit.
The file is produced during init for the rwfs-random process, in some as /var/lib/random-seed in others as /var/lib/misc/random-seed, some make it into a 1/2 MB file, some as a 4MB, some don't make it at all???  If something changes in the init system in reference to this file this zombie file is left in the system from before the change? 
Title: Re: who owns rendom-seed
Post by: konimex on 14 June 2019, 07:48:54
very confusing results, between my old openrc installation switched to runit, a newer runit installation, and your late openrc mate live image.  Also differences with artix-runit and void-runit.
The file is produced during init for the rwfs-random process, in some as /var/lib/random-seed in others as /var/lib/misc/random-seed, some make it into a 1/2 MB file, some as a 4MB, some don't make it at all???

I don't know about OpenRC but both Void (https://github.com/void-linux/void-runit/blob/0566391df8c9c93f75ad99d94c8a19abe379908b/core-services/05-misc.sh#L5) and Artix (https://github.com/artix-linux/runit-rc/blob/e5a7e96e924266e67c204548042f8b17605ca0b7/sv.d/random-seed.in#L7) uses the same command and file (/var/lib/random-seed and not /var/lib/misc/random-seed), the difference between filesize probably comes from /proc/sys/kernel/random/poolsize, which is parsed.
Title: Re: who owns rendom-seed
Post by: artoo on 14 June 2019, 12:48:53
I don't know about OpenRC but both Void (https://github.com/void-linux/void-runit/blob/0566391df8c9c93f75ad99d94c8a19abe379908b/core-services/05-misc.sh#L5) and Artix (https://github.com/artix-linux/runit-rc/blob/e5a7e96e924266e67c204548042f8b17605ca0b7/sv.d/random-seed.in#L7) uses the same command and file (/var/lib/random-seed and not /var/lib/misc/random-seed), the difference between filesize probably comes from /proc/sys/kernel/random/poolsize, which is parsed.

https://github.com/OpenRC/openrc/blob/master/init.d/urandom.in#L12

Default is /var/lib/misc/random-seed on openrc.
Title: Re: who owns rendom-seed
Post by: fungalnet on 14 June 2019, 16:37:33
Maybe 4KB difference but maybe you can remember to add it somehow to artix-sysvcompat or somewhere so when one replaces the one with the other the old file is erased.  Otherwise there will be two. 

In both I think the init runs a dd command where it creates a new one with urandom as input and random-seed as output and somehow this is a source of random digits for various tasks, like creating new uuid's.