How can I build libvirt deb package on ubuntu

Asked by Eli Qiao on 2016-05-23

How can I build libvirt deb package on ubuntu?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu libvirt Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2016-05-23
Last query:
2016-05-23
Last reply:
2016-05-23

This question was reopened

Manfred Hampl (m-hampl) said : #1

Why do you want to build a libvirt deb package? Such package is available in the Ubuntu repositories.

With the commands
sudo apt-get install build-essential
apt-get source --compile libvirt
you should be able to build the package locally, but it will most probably be identical to the one in the repositories.

If you are looking for 1.3.4 for xenial, I suggest you try manually installing the yakkety package. Maybe that works.

Eli Qiao (taget-9) said : #2

@Manfred
Thanks for you answer, my requirement is to build latest libvirt from source code locally, also would like to install it on multiple environment, to make sure the binary are same, I need to pack it as a deb package.

the following solution doesn't work:

>> apt-get source --compile libvirt
it only builds 1.3.1 libvirt.
>> If you are looking for 1.3.4 for xenial, I suggest you try manually installing the yakkety package.
I don't find yakkety on xenial :(
taget@taget-desktop:~$ sudo apt search yakkety
Sorting... Done
Full Text Search... Done

I am looking for a way to build deb just like redhat do "make rpm"

Eli.

Manfred Hampl (m-hampl) said : #3

yakkety is the code name of the development version Ubuntu 16.10

What I wanted to recommend is manually downloading the libvirt package(s) for yakkety from https://launchpad.net/ubuntu/+source/libvirt/1.3.4-1ubuntu3

You can build a deb package from source with the dpkg-buildpackage command (certain prerequisites are to be met).

Eli Qiao (taget-9) said : #4

That's so bad, upstream libvirt seems doesn't support build deb package, when I run dpkg-buildpackage, I see that it requires debian/changelog, which is maintained by ubuntu itself.

I noticed that most of libvirt maintainers are from Redhat.

Thanks for your answer Manfred.

Eli.

Best Manfred Hampl (m-hampl) said : #5

Try combining the upstream source and the contents of the debian additions from the 1.3.1 package (eventually you have to remove some patches that have already been incorporated in the new source).

Eli Qiao (taget-9) said : #8

@Manfred

Thanks for your kindly answer, I understand what your mean, I will take a try.

Eli Qiao (taget-9) said : #9

Thanks Manfred Hampl, that solved my question.

Eli Qiao (taget-9) said : #10

I can close this now.