mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
Include CentOS 9 Stream and CentOS 8 Stream, in addition to updating the openSUSE instructions to cover upstream vagrant package installation. Closes: #1429 Closes: #1537
125 lines
4.4 KiB
HTML
125 lines
4.4 KiB
HTML
libssh issue:
|
|
```
|
|
/opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': /opt/vagrant/embedded/lib64/libcrypto.so.1.1: version `OPENSSL_1_1_1b' not found (required by /lib64/libssh.so.4) - /home/xxx/.vagrant.d/gems/2.4.6/gems/ruby-libvirt-0.7.1/lib/_libvirt.so (LoadError)
|
|
```
|
|
Solution identified thanks to James Reynolds (see [https://github.com/hashicorp/vagrant/issues/11020#issuecomment-540043472](https://github.com/hashicorp/vagrant/issues/11020#issuecomment-540043472)).
|
|
|
|
libk5crypto issue:
|
|
```
|
|
/opt/vagrant/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': /usr/lib64/libk5crypto.so.3: undefined symbol: EVP_KDF_ctrl, version OPENSSL_1_1_1b - /home/rbelgrave/.vagrant.d/gems/2.4.9/gems/ruby-libvirt-0.7.1/lib/_libvirt.so (LoadError)
|
|
```
|
|
Solution identified thanks to Marco Bevc (see [https://github.com/hashicorp/vagrant/issues/11020#issuecomment-625801983](https://github.com/hashicorp/vagrant/issues/11020#issuecomment-625801983)).
|
|
|
|
Compile libraries to replaced those bundled with Vagrant to allow linking ruby-libvirt against
|
|
vagrant's embedded ruby and the system libvirt (updated originals to be generic):
|
|
|
|
```bash
|
|
mkdir patches
|
|
pushd patches
|
|
{%- case include.distro %}
|
|
{%- when "centos" %}
|
|
|
|
[[ ! -d centos-git-common ]] && git clone https://git.centos.org/centos-git-common
|
|
export PATH=$(readlink -f ./centos-git-common):$PATH
|
|
chmod a+x ./centos-git-common/*.sh
|
|
|
|
git clone https://git.centos.org/rpms/libssh
|
|
{%- else %}
|
|
|
|
mkdir libssh
|
|
{%- endcase %}
|
|
pushd libssh
|
|
{%- case include.distro %}
|
|
{%- when "fedora" %}
|
|
nvr=$(rpm -q --queryformat "libssh-%{version}-%{release}" libssh)
|
|
nv=$(rpm -q --queryformat "libssh-%{version}" libssh)
|
|
dnf download --source libssh
|
|
rpm2cpio ${nvr}.src.rpm | cpio -imdV
|
|
rm -rf ${nv}
|
|
tar xf ${nv}.tar.*z
|
|
{%- when "centos" %}
|
|
nvr=$(rpm -q --queryformat "libssh-%{version}-%{release}" libssh)
|
|
nv=$(rpm -q --queryformat "libssh-%{version}" libssh)
|
|
git checkout $(git tag -l | grep "${nvr}\$" | tail -n1)
|
|
into_srpm.sh -d c8s
|
|
pushd BUILD
|
|
tar xf ../SOURCES/${nv}.tar.*z
|
|
{%- when "opensuse" %}
|
|
nvr=$(rpm -q --queryformat "libssh-%{version}-%{release}" libssh4)
|
|
nv=$(rpm -q --queryformat "libssh-%{version}" libssh4)
|
|
|
|
repository=$(zypper --quiet --no-refresh --xmlout search --type srcpackage --match-exact --details libssh | xpath -q -e 'string(//solvable/@repository)')
|
|
url=$(zypper --quiet --xmlout repos | xpath -q -e "//repo[@name='${repository}']/url/text()")
|
|
|
|
wget ${url}/src/${nvr}.src.rpm
|
|
rpm2cpio ${nvr}.src.rpm | cpio -imdV
|
|
rm -rf ${nv}
|
|
tar xf ${nv}.tar.*z
|
|
{%- else %}
|
|
|
|
*******Missing the correct distro for patch commands********
|
|
{%- endcase %}
|
|
|
|
mkdir libssh-build
|
|
pushd libssh-build
|
|
cmake ../${nv} -DOPENSSL_ROOT_DIR=/opt/vagrant/embedded/
|
|
make
|
|
sudo cp lib/libssh* /opt/vagrant/embedded/lib64
|
|
popd
|
|
popd
|
|
{%- if include.distro == "centos" %}
|
|
|
|
popd
|
|
{%- endif %}
|
|
|
|
{%- case include.distro %}
|
|
{%- when "centos" %}
|
|
|
|
git clone https://git.centos.org/rpms/krb5
|
|
{%- else %}
|
|
|
|
mkdir krb5
|
|
{%- endcase %}
|
|
pushd krb5
|
|
{%- case include.distro %}
|
|
{%- when "fedora" %}
|
|
nvr=$(rpm -q --queryformat "krb5-%{version}-%{release}" krb5-libs)
|
|
nv=$(rpm -q --queryformat "krb5-%{version}" krb5-libs)
|
|
dnf download --source krb5-libs
|
|
rpm2cpio ${nvr}.src.rpm | cpio -imdV
|
|
tar xf ${nv}.tar.*z
|
|
{%- when "centos" %}
|
|
nvr=$(rpm -q --queryformat "krb5-%{version}-%{release}" krb5-libs)
|
|
nv=$(rpm -q --queryformat "krb5-%{version}" krb5-libs)
|
|
git checkout $(git tag -l | grep "${nvr}\$" | tail -n1)
|
|
into_srpm.sh -d c8s
|
|
pushd BUILD
|
|
tar xf ../SOURCES/${nv}.tar.*z
|
|
{%- when "opensuse" %}
|
|
nvr=$(rpm -q --queryformat "krb5-%{version}-%{release}\n" krb5 | uniq)
|
|
nv=$(rpm -q --queryformat "krb5-%{version}\n" krb5 | uniq)
|
|
repository=$(zypper --quiet --no-refresh --xmlout search --type srcpackage --match-exact --details krb5 | xpath -q -e 'string(//solvable/@repository)')
|
|
url=$(zypper --quiet --xmlout repos | xpath -q -e "//repo[@name='${repository}']/url/text()")
|
|
|
|
[[ ! -e ${nvr}.src.rpm ]] && wget ${url}/src/${nvr}.src.rpm
|
|
rpm2cpio ${nvr}.src.rpm | cpio -imdV
|
|
rm -rf ${nv}
|
|
tar xf ${nv}.tar.*z
|
|
{%- else %}
|
|
*******Missing the correct distro for patch commands********
|
|
{%- endcase %}
|
|
|
|
pushd ${nv}/src
|
|
./configure
|
|
make
|
|
sudo cp -P lib/crypto/libk5crypto.* /opt/vagrant/embedded/lib64/
|
|
popd
|
|
popd
|
|
{%- if include.distro == "centos" %}
|
|
|
|
popd
|
|
{%- endif %}
|
|
|
|
popd
|
|
```
|