Commit 71b483f3 authored by James Cowgill's avatar James Cowgill
Browse files

Fix FTBFS caused by nodejs setting O_NONBLOCK on the build log pipe

Nodejs (used by the CSS minimizer) sets O_NONBLOCK on its output streams
during execution but doesn't set them back afterwards. If make later
writes a lot of data to the log at once, it might fail to do so with
EAGAIN instead of blocking. This commit prevents this by creating a
temporary pipe which nodejs runs in and set O_NONBLOCK on without
breaking the rest of the build.

See: https://github.com/nodejs/node/issues/14752
Closes: #895154
parent 1b45b38c
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -206,7 +206,11 @@ override_dh_auto_clean:
override_dh_auto_build-indep:
	dh_auto_build -i --sourcedirectory=debian/standard -- apidoc
	# Create the minified CSS files.
	lessc debian/missing-sources/ffmpeg-web/src/less/style.less | cleancss > debian/standard/doc/style.min.css
	#  Due to https://github.com/nodejs/node/issues/14752 where nodejs will
	#  leave set O_NONBLOCK on stderr, we pipe stderr through cat which will
	#  create a temporary pipe so this doesn't break the rest of the build.
	#  See: #895154
	(lessc debian/missing-sources/ffmpeg-web/src/less/style.less | cleancss > debian/standard/doc/style.min.css) 2>&1 | cat >&2

override_dh_auto_build-arch:
	# Copy built object files to avoid building them again for the extra flavor.