Univention Bugzilla – Bug 44994
provide static UCR binary
Last modified: 2020-07-03 20:54:51 CEST
A static UCR binary could be copied into a non-UCS docker image, and be used to configure it. No Python installation should be required.
I created a working UCR binary using the Apache licensed nuitka project (http://www.nuitka.net/): I ran this in a UCS 4.2: # wget http://nuitka.net/releases/nuitka_0.5.26.4+ds-1_all.deb # dpkg -i nuitka_0.5.26.4+ds-1_all.deb # apt-get install -f # nuitka --standalone --recurse-directory /etc/univention/templates/modules --show-progress --show-memory --show-modules /usr/sbin/ucr This will create a directory ucr.dist which contains the executable ucr.exe (the .exe can be removed from the name) and all needed Python and C library files. ucr.dist : 46 MB ucr.tar.bz: 15 MB I created a tarball, copied and extracted it in a Gentoo system and could run the binary without problems. Try for yourself: https://billy.knut.univention.de/~dtroeder/ucr.tar.bz The ucr modules that were in /etc/univention/templates/modules at that time are inside ucr.exe. That does probably make no sense, as they were meant for the system it was compiled in. I don't know if new ucr modules can just be put into the target systems /etc/univention/templates/modules and will be loaded, but I guess it will work. So... the "--recurse-directory /etc/univention/templates/modules" should be removed from the command above.
This issue has been filed against UCS 4.2. UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.