diff --git a/openstack/octavia-tempest-plugin/octavia-tempest-plugin.spec.j2 b/openstack/octavia-tempest-plugin/octavia-tempest-plugin.spec.j2 index 50acf395a..08222f129 100644 --- a/openstack/octavia-tempest-plugin/octavia-tempest-plugin.spec.j2 +++ b/openstack/octavia-tempest-plugin/octavia-tempest-plugin.spec.j2 @@ -43,7 +43,7 @@ pushd octavia_tempest_plugin/contrib/httpd # we don't want to ship a binary blob that we didn't build ourself rm -f httpd.bin %if 0%{?suse_version} -go build -ldflags '-linkmode=external' -o httpd.bin httpd.go +CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-s -w -extldflags -static' -o httpd.bin httpd.go %else # NOTE(jpena): the CentOS 8 build fails without this flag go build -ldflags '-linkmode=external -compressdwarf=false' -o httpd.bin httpd.go