dmacvicar / terraform-provider-libvirt

Terraform provider to provision infrastructure with Linux's KVM using libvirt
Apache License 2.0
1.6k stars 458 forks source link

Deb package fails to install on Ubuntu 20.04 #818

Open invidian opened 3 years ago

invidian commented 3 years ago

System Information

Linux distribution

# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.1 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.1 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Checklist

Description of Issue/Question

Deb package fails to install due to missing files in the package:

Setting up libgssapi3-heimdal:amd64 (7.7.0+dfsg-1ubuntu1) ...
Setting up libldap-2.4-2:amd64 (2.4.49+dfsg-2ubuntu1.5) ...
Setting up libcurl3-gnutls:amd64 (7.68.0-1ubuntu2.2) ...
Setting up libvirt0:amd64 (6.0.0-0ubuntu8.5) ...
Setting up terraform-provider-libvirt (0.6.3+git.1604843676.67f4f2aa-4.1) ...
/bin/chown: cannot access '/usr/share/doc/terraform-provider-libvirt/README.md': No such file or directory
/bin/chown: cannot access '/usr/share/doc/terraform-provider-libvirt/LICENSE': No such file or directory
dpkg: error processing package terraform-provider-libvirt (--configure):
 installed terraform-provider-libvirt package post-installation script subprocess returned error exit status 1
Setting up liblvm2cmd2.03:amd64 (2.03.07-1ubuntu1) ...
Setting up dmeventd (2:1.02.167-1ubuntu1) ...
Setting up lvm2 (2.03.07-1ubuntu1) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
Processing triggers for libc-bin (2.31-0ubuntu9.1) ...
Errors were encountered while processing:
 terraform-provider-libvirt

Steps to Reproduce Issue

  1. Run the following commands:
    
    cat <<EOF > Dockerfile
    FROM ubuntu:focal

RUN apt update && apt install -y wget

RUN wget https://download.opensuse.org/repositories/systemsmanagement:/terraform/Ubuntu_20.04/amd64/terraform-provider-libvirt_0.6.3+git.1604843676.67f4f2aa-4.1_amd64.deb

RUN apt install -y ./terraform-provider-libvirt_0.6.3+git.1604843676.67f4f2aa-4.1_amd64.deb EOF

docker build .


### Workaround

To workaround, run the following command and retry installation:

touch /usr/share/doc/terraform-provider-libvirt/README.md /usr/share/doc/terraform-provider-libvirt/LICENSE

MalloZup commented 3 years ago

spec FILE is here:

https://build.opensuse.org/package/view_file/systemsmanagement:terraform/terraform-provider-libvirt/terraform-provider-libvirt.spec?expand=1

if anyone want to help: https://en.opensuse.org/openSUSE:Build_Service_Collaboration

https://duncan.codes/tutorials/rpm-packaging/#the-open-build-service

or any question on RPM related welcome.

But for helping on this, we just need to modify the Spec file which builds also deb pkg.

Let me know if any question or someone wants to take ownership on this issue

scabala commented 2 months ago

I think this issue could be closed since provider is available in official terraform registry