[opensuse-buildservice] python 3.5 build problems in OBS
hello, so i've been researching the problems related to getrandom() and python 3.5 all week (see bsc#949816 [1] for details). TL;DR: python switched from reading /dev/urandom directly to calling the new syscall getrandom(). For this to work, you need to collect 128 bits of true entropy first. Buildservice VMs don't have entropy. Therefore, most builds depending on python 3.5 will simply hang and wait to be killed by the scheduler many hours later. In addition, Adrian suggested that actually *using* randomness in the build is a bad idea because then the build is not reproducible. We suppose that packages don't need it for anything, but there's a lot of packages and i'd be surprised if none of them did something weird... Now, I have a package that, when present, solves both problems at once. It sets PYTHONHASHSEED to 0, to disable python's hash randomization, and monkey-patches os.urandom() to return a string of zero bytes instead of accessing urandom. My question is, how to get this package to be used during all builds that depend on python 3.5? At the moment, i added the package to d:l:python3 project (see [2]), and I want to require it through prjconf for all builds. Is this a good idea? Would it be applicable to Factory? Is there a better way to accomplish what i'm trying to do (that is, modify python's environment specifically for buildservice builds)? thanks m. [1] http://bugzilla.suse.com/show_bug.cgi?id=949816 [2] https://build.opensuse.org/package/show/devel:languages:python3/python3-buil... -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Freitag, 16. Oktober 2015, 19:48:28 CEST wrote jan matejek:
hello,
so i've been researching the problems related to getrandom() and python 3.5 all week (see bsc#949816 [1] for details).
TL;DR: python switched from reading /dev/urandom directly to calling the new syscall getrandom(). For this to work, you need to collect 128 bits of true entropy first. Buildservice VMs don't have entropy. Therefore, most builds depending on python 3.5 will simply hang and wait to be killed by the scheduler many hours later.
In addition, Adrian suggested that actually *using* randomness in the build is a bad idea because then the build is not reproducible. We suppose that packages don't need it for anything, but there's a lot of packages and i'd be surprised if none of them did something weird...
Now, I have a package that, when present, solves both problems at once. It sets PYTHONHASHSEED to 0, to disable python's hash randomization, and monkey-patches os.urandom() to return a string of zero bytes instead of accessing urandom.
My question is, how to get this package to be used during all builds that depend on python 3.5?
one way would be to checkout for existens /.build . If this exists, you are inside of an environment created by our build script.
At the moment, i added the package to d:l:python3 project (see [2]), and I want to require it through prjconf for all builds.
Is this a good idea? Would it be applicable to Factory? Is there a better way to accomplish what i'm trying to do (that is, modify python's environment specifically for buildservice builds)?
thanks m.
[1] http://bugzilla.suse.com/show_bug.cgi?id=949816 [2] https://build.opensuse.org/package/show/devel:languages:python3/python3-buil...
-- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (2)
-
Adrian Schröter
-
jan matejek