Opened 2 years ago

Closed 2 years ago

#1405 closed defect (fixed)

pkg-oss build is broken on Debian

Reported by: lvu@… Owned by: Andrei Belov
Priority: minor Milestone:
Component: nginx-package Version: 1.12.x
Keywords: Cc:
uname -a: Linux 647df8813db1 4.4.93-boot2docker #1 SMP Wed Oct 18 17:00:16 UTC 2017 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.12.2
built by gcc 6.3.0 20170516 (Debian 6.3.0-18)
built with OpenSSL 1.1.0f 25 May 2017
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-g -O2 -fdebug-prefix-map=/data/builder/debuild/nginx-1.12.2/debian/debuild-base/nginx-1.12.2=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fPIC' --with-ld-opt='-specs=/usr/share/dpkg/no-pie-link.specs -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -pie'

Description

When trying to build nginx-push-stream-module on Debian (tested on jessie and scratch) with ./build_module.sh -v 1.12.2 -n pushstream -y https://github.com/wandenberg/nginx-push-stream-module.git, I get the following error:

===> Building nginx-module-pushstream package
 dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package nginx-module-pushstream
dpkg-buildpackage: source version 1.12.2
dpkg-buildpackage: source distribution jessie
dpkg-buildpackage: source changed by Build Script <build.script@example.com>
 dpkg-source --before-build nginx-1.12.2
dpkg-buildpackage: host architecture amd64
 fakeroot debian/rules clean
dh_testdir
dh_testroot
dh_clean
rm -rf /root/debuild/nginx-1.12.2/debian/debuild-module-pushstream/nginx-1.12.2/debian/build-*
find /root/debuild/nginx-1.12.2/debian/debuild-module-pushstream/nginx-1.12.2 -maxdepth 1 -size 0 -delete
 dpkg-source -b nginx-1.12.2
dpkg-source: error: can't build with source format '3.0 (quilt)': non-native package version does not contain a revision
dpkg-buildpackage: error: dpkg-source -b nginx-1.12.2 gave error exit status 255
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc failed
real 1.12
user 0.75
sys 0.09
Makefile:304: recipe for target 'module-pushstream' failed
make: *** [module-pushstream] Error 29
build_module.sh: ERROR: Build failed

This happens because Debian wants non-native (whatever it means) packages to have a revision number in their version, separated by dash; and the chengelog file created by build_module.sh doesn't have one.

I've fixed it with a simple substitution made before running the script:
sed -i -e '/urgency=low/ s/(\${VERSION})/(${VERSION}-1)/' build_module.sh

Change History (2)

comment:1 by Andrei Belov, 2 years ago

Component: othernginx-package
Owner: set to Andrei Belov
Status: newassigned
Version: 1.13.x1.12.x

comment:2 by Andrei Belov, 2 years ago

Resolution: fixed
Status: assignedclosed

Thanks for reporting this.
Fixed in http://hg.nginx.org/pkg-oss/rev/00117833c2f2.

Note that package names have changed, e.g. in your case it should end up with something like the following:

[..]
build_module.sh: INFO: Module packages created
/home/vagrant/debuild/nginx-1.12.2/debian/debuild-module-pushstream/nginx-module-pushstream-dbg_1.12.2-1~jessie_amd64.deb
/home/vagrant/debuild/nginx-1.12.2/debian/debuild-module-pushstream/nginx-module-pushstream_1.12.2-1~jessie_amd64.deb
build_module.sh: INFO: Removing /tmp/build_module.sh.16166
Note: See TracTickets for help on using tickets.