Chris Lamb: Free software activities in February 2017
Here is my monthly update covering what I have been doing in the free software world (previous month):
- Submitted a number of pull requests to the Django web development framework:
- Created an experimental patch against the Python interpreter in order to find reproducibility-related assumptions in dict handling in arbitrary Python code. (#29431)
- Filed two issues against dh-virtualenv, a tool to package Python virtualenv environments in Debian packages:
- Fixed a large number of spelling corrections in Samba, a free-software re-implementation of the Windows networking protocols.
- Reviewed and merged a pull request by @jheld for django-slack (my library to easily post messages to the Slack group-messaging utility) to support per-message backends and channels. (#63)
- Created a pull request for django-two-factor-auth, a complete Two-Factor Authentication (2FA) framework for projects using the Django web development framework to drop use of the @lazy_property decorator to ensure compatibility with Django 1.11. (#195)
- Filed, triaged and eventually merged a change from @evgeni to fix an autopkgtest-related issue in travis.debian.net, my hosted service for projects that host their Debian packaging on GitHub to use the Travis CI continuous integration platform to test builds on every code change) travis.debian.net. (#41)
- Submitted a pull request against social-core a library to allow Python applications to authenticate against third-party web services such as Facebook, Twitter, etc. to use the more-readable X if Y else Z construction over Y and X or Z. (#44)
- Filed an issue against freezegun (a tool to make it easier to write Python tests involving times) to report that dateutils was missing from requirements.txt. (#173)
- Submitted a pull request against the Hypothesis "QuickCheck"-like testing framework to make the build reproducible. (#440)
- Fixed an issue reported by @davidak in trydiffoscope (a web-based version of the diffoscope in-depth and content-aware diff utility) where the maximum upload size was incorrectly calculated. (#22)
- Created a pull request for the Mars Simulation Project to remove some embedded timestamps from the changelog.gz and mars-sim.1.gz files in order to make the build reproducible. (#24)
- Filed a bug against the cpio archiving utility to report that the testsuite fails when run in the UTC +1300 timezone. (Thread)
- Submitted a pull request against the "pnmixer" system-tray volume mixer in order to make the build reproducible. (#153)
- Sent a patch to Testfixtures (a collection of helpers and mock objects that are useful when writing Python unit tests or doctests) to make the build reproducible. (#56)
- Created a pull request for the "Cloud" Sphinx documentation theme in order to make the output reproducible. (#22)
Reproducible builds
Whilst anyone can inspect the source code of free software for malicious flaws, most software is distributed pre-compiled to end users.
The motivation behind the Reproducible Builds effort is to permit verification that no flaws have been introduced either maliciously or accidentally during this compilation process by promising identical results are always generated from a given source, thus allowing multiple third-parties to come to a consensus on whether a build was compromised.
(I have been awarded a grant from the Core Infrastructure Initiative to fund my work in this area.)
This month I:
I also made the following changes to our tooling:
- Was featured in episode #237 of the Changelog podcast.
- Submitted 10 patches to fix specific reproducibility issues in aprx, cloud-sptheme, fritzing-parts, moin, pnmixer, publicsuffix, python-hypothesis, python-testfixtures, samplv1 & sugar-physics-activity.
- Categorised a large number of packages and issues in the Reproducible Builds notes.git repository.
- Submitted an experimental patch against the CPython interpreter in order to find reproducibility-related assumptions in dictionary handling in arbitrary Python software.
- Worked on publishing our weekly reports. (#92, #93, #94, & #95)
I also made the following changes to our tooling:
diffoscope
diffoscope is our in-depth and content-aware diff utility that can locate and diagnose reproducibility issues.
- New features:
- Add a machine-readable JSON output format. (Closes: #850791).
- Add an --exclude option. (Closes: #854783).
- Show results from debugging packages last. (Closes: #820427).
- Extract archive members using an auto-incrementing integer avoiding the need to sanitise filenames. (Closes: #854723).
- Apply --max-report-size to --text output. (Closes: #851147).
- Specify <html lang="en"> in the HTML output. (re. #849411).
- Bug fixes:
- Fix errors when comparing directories with non-directories. (Closes: #835641).
- Device and RPM fallback comparisons require xxd. (Closes: #854593).
- Fix tests that call xxd on Debian Jessie due to change of output format. (Closes: #855239).
- Add missing Recommends for comparators. (Closes: #854655).
- Importing submodules (ie. parent.child) will attempt to import parent. (Closes: #854670).
- Correct logic of module_exists ensuring we correctly skip the debian.deb822 tests when python3-debian is not installed. (Closes: #854745).
- Clean all temporary files in the signal handler thread instead of attempting to pass the exception back to the main thread. (Closes: #852013).
- Fix behaviour of setting report maximums to zero (ie. no limit).
- Optimisations:
- Don't uselessly run xxd(1) on non-directories.
- No need to track libarchive directory locations.
- Optimise create_limited_print_func.
- Tests:
- When comparing two empty directories, ensure that the mtime of the directory is consistent to avoid non-deterministic failures.
- Ensure we can at least import the "deb_fallback" and "rpm_fallback" modules.
- Add test for symlink differing in destination.
- Add tests for --progress, --status-fd and profiling output options as well as the Deb Changes,Buildinfo,Dsc and RPM fallback comparisons.
- Add get_data and @skip_unless_module_exists test helpers.
- Mark impossible-to-reach code to improve test coverage.
buildinfo.debian.net
buildinfo.debian.net is my experiment into how to process, store and distribute .buildinfo files after the Debian archive software has processed them.
- Drop raw_text fields now as we've moved these to Amazon S3.
- Drop storage of Installed-Build-Depends and subsequently-orphaned Binary package instances to recover diskspace.
strip-nondeterminism
strip-nondeterminism is our tool to remove specific non-deterministic results from a completed build.
- Print log entry when fixing a file. (Closes: #777239).
- Run our entire testsuite in autopkgtests, not just the first test. (Closes: #852517).
- Don't test for stat(2)'s blksize and block attributes. (Closes: #854937).
- Use error() from Dh_Lib.pm over "manual" die().
Debian
Patches contributed
Debian LTS
This month I have been paid to work 13 hours on Debian Long Term Support (LTS). In that time I did the following:
- "Frontdesk" duties, triaging CVEs, etc.
- Issued DLA 817-1 for libphp-phpmailer, correcting a local file disclosure vulnerability where insufficient parsing of HTML messages could potentially be used by attacker to read a local file.
- Issued DLA 826-1 for wireshark which fixes a denial of service vulnerability in wireshark, where a malformed NATO Ground Moving Target Indicator Format ("STANAG 4607") capture file could cause a memory exhausion/infinite loop.
Uploads
I sponsored the following uploads:
- python-django (1:1.11~beta1-1) New upstream beta release.
- redis (3:3.2.8-1) New upstream release.
- gunicorn (19.6.0-11) Use $ misc:Pre-Depends to populate Pre-Depends for dpkg-maintscript-helper.
- dh-virtualenv (1.0-1~bpo8+1) Upload to jessie-backports.
- libpam-ldap (186-3) Make the build reproducible.
- dh-kpatches (0.99.36+nmu4) Make kernel kernel builds reproducible.
- cpio (2.12+dfsg-3) Remove rmt.8.gz to prevent a piuparts error.
- dot-forward (1:0.71-2.2) Correct a FTBFS; we don't install anything to /usr/sbin, so use GNU Make's $(wildcard ..) over the shell's own * expansion.
Debian bugs filed
I also filed 15 FTBFS bugs against binaryornot, chaussette, examl, ftpcopy, golang-codegangsta-cli, hiro, jarisplayer, libchado-perl, python-irc, python-stopit, python-stopit, python-stopit, python-websockets, rubocop & yash.
- debmirror: Please update mirror_size documentation file
- release.debian.org: Please unblock diffoscope/77
- dh-virtualenv: Please backport 1.0-1 to jessie-backports
- ftp.debian.org: Remove newbiedoc; far too outdated to be useful
- ftp.debian.org: Remove doc-linux-hr; far too outdated to be useful
- python-kdcproxy Accesses the internet during build
FTP Team
As a Debian FTP assistant I ACCEPTed 116 packages: autobahn-cpp, automat, bglibs, bitlbee, bmusb, bullet, case, certspotter, checkit-tiff, dash-el, dash-functional-el, debian-reference, el-x, elisp-bug-hunter, emacs-git-messenger, emacs-which-key, examl, genwqe-user, giac, golang-github-cloudflare-cfssl, golang-github-docker-goamz, golang-github-docker-libnetwork, golang-github-go-openapi-spec, golang-github-google-certificate-transparency, golang-github-karlseguin-ccache, golang-github-karlseguin-expect, golang-github-nebulouslabs-bolt, gpiozero, gsequencer, jel, libconfig-mvp-slicer-perl, libcrush, libdist-zilla-config-slicer-perl, libdist-zilla-role-pluginbundle-pluginremover-perl, libevent, libfunction-parameters-perl, libopenshot, libpod-weaver-section-generatesection-perl, libpodofo, libprelude, libprotocol-http2-perl, libscout, libsmali-1-java, libtest-abortable-perl, linux, linux-grsec, linux-signed, lockdown, lrslib, lua-curses, lua-torch-cutorch, mariadb-10.1, mini-buildd, mkchromecast, mocker-el, node-arr-exclude, node-brorand, node-buffer-xor, node-caller, node-duplexer3, node-ieee754, node-is-finite, node-lowercase-keys, node-minimalistic-assert, node-os-browserify, node-p-finally, node-parse-ms, node-plur, node-prepend-http, node-safe-buffer, node-text-table, node-time-zone, node-tty-browserify, node-widest-line, npd6, openoverlayrouter, pandoc-citeproc-preamble, pydenticon, pyicloud, pyroute2, pytest-qt, pytest-xvfb, python-biomaj3, python-canonicaljson, python-cgcloud, python-gffutils, python-h5netcdf, python-imageio, python-kaptan, python-libtmux, python-pybedtools, python-pyflow, python-scrapy, python-scrapy-djangoitem, python-signedjson, python-unpaddedbase64, python-xarray, qcumber, r-cran-urltools, radiant, repo, rmlint, ruby-googleauth, ruby-os, shutilwhich, sia, six, slimit, sphinx-celery, subuser, swarmkit, tmuxp, tpm2-tools, vine, wala & x265.
I additionally filed 8 RC bugs against packages that had incomplete debian/copyright files against: checkit-tiff, dash-el, dash-functional-el, libcrush, libopenshot, mkchromecast, pytest-qt & x265.
The
Following the
The x-axis is seconds used for the encode (note the logarithmic scale;
placebo takes 200 250 times as long as ultrafast).
The y-axis is SSIM dB, so up and to the left is better. The blue line is
8-bit, and the red line is 10-bit. (I ran most encodes five times and
averaged the results, but it doesn't really matter, due to the logarithmic
scale.)
The results are actually much stronger than I assumed; if you run on
(8-bit) ultrafast or superfast, you should stay with 8-bit, but from there
on, 10-bit is on the Pareto frontier. Actually, 10-bit veryfast (18.187 dB)
is better than 8-bit medium (18.111 dB), while being four times as fast!
But not all of us have a relation to dB quality, so I chose to also do a
test that maybe is a bit more intuitive, centered around bitrate needed for
constant quality. I locked quality to 18 dBm, ie., for each preset, I
adjusted the bitrate until the SSIM showed 18.000 dB plus/minus 0.001 dB.
(Note that this means faster presets get less of a speed advantage, because
they need higher bitrate, which means more time spent entropy coding.)
Then I measured the encoding time (again five times) and graphed the results:
x-axis is again seconds, and y-axis is bitrate needed in kbit/sec, so lower
and to the left is better. Blue is again 8-bit and red is again 10-bit.
If the previous graph was enough to make me intrigued, this is enough to make
me excited. In general, 10-bit gives 20-30% lower bitrate for the same
quality and CPU usage! (Compare this with the supposed up to 50% benefits
of HEVC over H.264, given infinite CPU usage.) The most dramatic example
is when comparing the medium presets directly, where 10-bit runs at
2648 kbit/sec versus 3715 kbit/sec (29% lower bitrate!) and is only 5%
slower. As one progresses towards the slower presets, the gap is somewhat
narrowed (placebo is 27% slower and only 24% lower bitrate), but in the
realistic middle range, the difference is quite marked. If you run 3 Mbit/sec
at 10-bit, you get the quality of 4 Mbit/sec at 8-bit.
So is 10-bit H.264 a no-brainer? Unfortunately, no; the client hardware support
is nearly nil. Not even Skylake, which can do 10-bit HEVC encoding in
hardware (and 10-bit VP9 decoding), can do 10-bit H.264 decoding in hardware.
Worse still, mobile chipsets generally don't support it. There are rumors
that iPhone 6s supports it, but these are unconfirmed; some Android chips
support it, but most don't.
I guess this explains a lot of the limited uptake; since it's in some ways
a new codec, implementers are more keen to get the full benefits of HEVC instead
(even though the licensing situation is really icky). The only ones I know
that have really picked it up as a distribution format is the anime scene,
and they're feeling quite specific pains due to unique content (large
gradients giving pronounced banding in undithered 8-bit).
So, 10-bit H.264: It's awesome, but you can't have it. Sorry :-)
Very strange. Verrrry strange.
Yesterday I wrote a
One of the products I have done some work on at Red Hat has recently been
released to customers and there have been a few things written about it:
I'm currently developing an nRF51822-based embedded device. Being one the Qt/Qt Creator maintainers in Debian I would of course try to use it for the development. Turns out it works pretty good... with some caveats.
I was wrong. After the other blog post
The other Murakami,
This collection of short stories is a consequent deconstruction of happiness, love, everything we believe to make our lives worthwhile. The protagonists are idealistic students loosing their faith, office ladies on aberrations, drunkards, movie directors, the usual mixture. But the topic remains constant the unfulfilled search for happiness and love.