go packaging: binary renaming

A stupid fight with dh_exec

George Shuklin
OpsOps
1 min readOct 3, 2018

--

Meaningless snippet from the build log for debian package with dh-golang

I found a problem: out internal go package is named ‘network-utils’ (which is too big and pretensions for the thing it does). I renamed the package to golang-foo-network-utils (binary pacakge name is foo-network-utils), but dh-golang wanted to install /usr/bin/network-utils binary, which I wanted to be /usr/bin/foo-network-utils.

As usual I fought with dh-exec, but failed. I finished by adding this into my debian/rules:

It’s ugly, but it works.

--

--

George Shuklin
OpsOps

I work at Servers.com, most of my stories are about Ansible, Ceph, Python, Openstack and Linux. My hobby is Rust.