flexiondotorg / oab-java6

Create a local 'apt' repository for Sun Java 6 and/or Oracle Java 7 packages.
Other
625 stars 171 forks source link

remove imvirt dependency and fix openvz check #71

Closed shinji257 closed 11 years ago

shinji257 commented 11 years ago

imvirt doesn't work properly on openvz anymore so the script tries to run the entropy daemon anyways. I fixed the check to look for /proc/user_beancounters instead which only exists on openvz (to my knowledge). If it exists then it skips the parts relating to rngd only. It will still generate a key however. Before you blocked out the entire segment on openvz.

shinji257@0a34812#oab-java

Tested on OpenVZ and Xen PV.

Edit: Closed #70 since I have the pull request here.

shinji257 commented 11 years ago

The pull request will never apply cleanly but the essence of my request is to remove the imvirt usage and instead wrap rngd sections to check for /proc/user_beancounters as it is more reliable for openvz. No need to disable the whole section on openvz as gpg will work fine (albeit a little slower) on that platform.

New re-fork with change applied (and some additional spaces added thanks to my editor >.<) https://github.com/shinji257/oab-java6/commit/927fc6922b1a5a98201e181d8ee678e2603ad543

shinji257 commented 11 years ago

BTW This is why imvirt should not be used. Do you see "OpenVZ" in there? Didn't think so. The test will fail and it will still run the code anyways. Might as well change it to use something more appropriate and not cut off the gpg generation in the process. Nice thing is that gpg key generation only happens the first time you run the script and will not be re-run later. :)

shinji@casper:~$ imvirt pcilib: Cannot open /proc/bus/pci lspci: Cannot find any working access method. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/kernel.pm line 45. Use of uninitialized value $avail in concatenation (.) or string at /usr/share/perl5/ImVirt/Utils/dmidecode/pipe.pm line 44. Unknown

flexiondotorg commented 11 years ago

I've manually merged your removal of imvirt for OpenVZ into my development branch. It will be included in 0.2.8. Thanks for contributing.