I’m trying to build the latest opennebula-5.10.2 from source as per the instructions from GitHub (https://github.com/OpenNebula/packages). I’ve never had issues in the past with building the opennebula packages (I’m trying to build the rpm ones). I should mention that the build process is conducted on the same machine I used for the builds before so I’m pretty sure I have all the necessary build packages installed.
virt1 opt # git clone https://github.com/OpenNebula/one opennebula-5.10.2
virt1 opt # cd opennebula-5.10.2/
virt1 opennebula-5.10.2 # git checkout tags/release-5.10.2
virt1 opennebula-5.10.2 # cd share/man/
virt1 man # ./build.sh
ln: failed to create symbolic link ‘/tmp/tmp.kjaAgRnxL1/lib/sunstone/public/dist/main.js’: No such file or directory
econe-upload(1) -- Uploads an image to OpenNebula
/usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- ipaddress (LoadError)
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /tmp/tmp.kjaAgRnxL1/lib/ruby/cloud/CloudClient.rb:19:in `<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /tmp/tmp.kjaAgRnxL1/lib/ruby/cloud/econe/EC2QueryClient.rb:24:in `<top (required)>'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
from /tmp/tmp.kjaAgRnxL1/bin/econe-upload:37:in `<main>'
roff: ./econe-upload.1
html: ./econe-upload.1.html +man,toc
I had issues with the configuration of mock and needed to add the following at the beginning of /etc/mock/epel-7-x86_64.cfg(I am using CentOS7 to build):
Apparently that did the trick. There was a symlink for main.js pointing to some temporary file. After deleting that, everything seems to work althgough there is still one warning stating something about a folder named patches/
Anyway, continuing with the build:
virt1 public # cd ../../../../
virt1 opt # tar -czf opennebula-5.10.2.tar.gz opennebula-5.10.2/
virt1 opt # cd packages/
virt1 packages # ./centos7.sh ../opennebula-5.10.2.tar.gz
***** Prepare sources
cp: cannot stat ‘/tmp/opennebula-5.10.2.tar.gz’: No such file or directory
virt1 packages # cp ../opennebula-5.10.2.tar.gz /tmp/opennebula-5.10.2.tar.gz
virt1packages # ./centos7.sh ../opennebula-5.10.2.tar.gz
***** Prepare sources
So I had to manually copy opennebula-5.10.2.tar.gz to /tmp/opennebula-5.10.2.tar.gz. The the build process started. So I guess they still have to work a little bit on the documentation.
At least building el7 rpms on el7 following instructions currently fails for me. I’ll have a look and try to sort it out when I have a chance. (I may be able to help with rpm stuff generally as a Fedora maintainer, albeit rather disillusioned now…)
I’ll have another look and suggest a fix for the instructions and/or script, but try the following for rpm packages in the meantime. (I haven’t tried dpkg.) It seems you need to rebuild the distributed tarball with the right contents and name, and use an absolute path to it. It’s annoying that the mock root gets deleted, but I can’t immediately see where that’s coming from. Building for el8 on el7 fails, despite the bootstrap stage, but I’m not sure if that works at all currently.
I won’t distribute rpms, as a courtesy, but hope that helps if you need new packages.
virt1 packages-release-5.10.2 # ./centos7.sh opennebula-5.10.2.tar.gz
***** Prepare sources
cp: cannot stat ‘/tmp/tmp.l7wjLDIG0i/opennebula-5.10.2.tar.gz’: No such file or directory
virt1 packages-release-5.10.2 #
I’ve created an issue on GitHub as well on your packages repo.
Actually, the correct command is: virt1 packages-release-5.10.2 # ./centos7.sh $(pwd)/opennebula-5.10.2.tar.gz
Wow, thank you. Found it. It’s like a Quest game on PS4 to find that file. I was trying to create .rpm packages as per your github documentation not to play a “find the sneaky tar” game. Thanks anyway
[My emailed response yesterday never got posted for some reason, so I’m pasting it for completeness, though the instructions don’t seem to be doing much good.]
I’ve created an issue on GitHub as well on your packages repo. Same as
I was saying before, I have to copy the .tar.gz file to tmp so that
centos7.sh will actually work
Not if you use an absolute path, as I posted.
I’d have raised an issue, maybe with a patch, but I haven’t had a time,
and that might count as work I shouldn’t do during the university
strike. I don’t know what “your packages repo” is.