tir. 16. mai 2023, 19:03 skrev Ilya Maximets <[email protected]>:

> On 5/16/23 17:39, Lazuardi Nasution wrote:
> > Hi,
> >
> > I'm trying to rebuild OVS package by using "dpkg-buildpackage -b"
> command.
> > But the built binary size is always much bigger than repo binary. Is
> there
> > any official way to do that so the rebuilt binary will be near the repo
> > binary?
>
> The official way is documented here:
>   https://docs.openvswitch.org/en/latest/intro/install/debian/
>
> >
> > Rebuilt Binary:
> > ubuntu@jammy:~$ ls -lah
> ./openvswitch-3.0.3/_debian/vswitchd/ovs-vswitchd
> > -rwxr-xr-x 1 ubuntu ubuntu *17M* May 16 22:25
> > ./openvswitch-3.0.3/_debian/vswitchd/ovs-vswitchd
> >
> > Repo Binary:
> > ubuntu@jammy:~$ ls -lah /usr/lib/openvswitch-switch/ovs-vswitchd
> > -rwxr-xr-x 1 root root *2.7M* Feb 27 20:18
> > /usr/lib/openvswitch-switch/ovs-vswitchd
>
> I'm not sure what exactly dpkg-buildpackage does and why you end up
> with a different size binary.  Most likely your binary doesn't have
> debuginfo stripped out while the official one does.  It might also
> be possible that your package is built with DPDK, while the official
> openvswitch-switch package is not.
>

The upstream OVS packages make use of debhelper [0], just like Debian and
Ubuntu. Recent versions of debhelper will automatically strip out debug
information and put into separate packages at package build time.

I see you are comparing file sizes using the artifact in the build tree
above, and I think you'll find that the binary size is smaller if you look
inside the built deb in the ../ directory instead.

0: https://manpages.ubuntu.com/manpages/kinetic/man7/debhelper.7.html

--
Frode Nordahl

Best regards, Ilya Maximets.
> _______________________________________________
> dev mailing list
> [email protected]
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to