How can I build libvirt deb package on ubuntu

Asked by Eli Qiao

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:
Last query:
Last reply:

This question was reopened

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
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).

Revision history for this message
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.

Revision history for this message
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).

Revision history for this message
Eli Qiao (taget-9) said :
#8

@Manfred

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

Revision history for this message
Eli Qiao (taget-9) said :
#9

Thanks Manfred Hampl, that solved my question.

Revision history for this message
Eli Qiao (taget-9) said :
#10

I can close this now.