I moved my blog around a bit and it appears that static pages are now
in favour, so I switched to that, by way of
Hugo. CSS and such needs more tweaking, but
it ll make do for now.
As part of this, RSS feeds and such changed, if you want to subscribe
to this (very seldomly updated) blog, use
https://err.no/personal/blog/index.xml
Since mid-2015 we were using the dep11-generator in Debian to build AppStream metadata about available software components in the distribution.
Getting rid of dep11-generator
Unfortunately, the old Python-based dep11-generator was hitting some hard limits pretty soon. For example, using multiprocessing with Python was a pain, since it resulted in some very hard-to-track bugs. Also, the multiprocessing approach (as opposed to multithreading) made it impossible to use the underlying LMDB database properly (it was basically closed and reopened in each forked off process, since pickling the Python LMDB object caused some really funny bugs, which usually manifested themselves in the application hanging forever without any information on what was going on). Additionally to that, the Python-based generator forced me to maintain two implementations of the AppStream YAML spec, one in C and one in Python, which consumes quite some time. There were also some other issues (e.g. no unit-tests) in the implementation, which made me think about rewriting the generator.
Adventures in Go / Rust / D
Since I didn t want to write this new piece of software in C (or basically, writing it in C was my last option
), I explored Go and Rust for this purpose and also did a small prototype in the D programming language, when I was starting to feel really adventurous. And while I never intended to write the new generator in D (I was pretty fixated on Go ), this is what happened. The strong points for D for this particular project were its close relation to C (and ease of using existing C code), its super-flat learning curve for someone who knows and likes C and C++ and its pretty powerful implementations of the concurrent and parallel programming paradigms. That being said, not all is great in D and there are some pretty dark spots too, mainly when it comes to the standard library and compilers. I will dive into my experiences with D in a separate blogpost.
What good to expect from appstream-generator?
So, what can the new appstream-generator do for you? Basically, the same as the old dep11-generator: It will extract metadata from a distribution s package archive, download and resize screenshots, search for icons and size them properly and generate reports in JSON and HTML of found metadata and issues.
LibAppStream-based parsing, generation of YAML or XML, multi-distro support,
As opposed to the old generator, the new generator utilizes the metadata parsers and writers of libappstream. This allows it to return the extracted metadata as AppStream YAML (for Debian) or XML (everyone else) It is also written in a distribution-agnostic way, so if someone wants to use it in a different distribution than Debian, this is possible now. It just requires a very small distribution-specific backend to be written, all of the details of the metadata extraction are abstracted away (just two interfaces need to be implemented). While I do not expect anyone except Debian to use this in the near future (most distros have found a solution to generate metadata already), the frontend-backend split is a much cleaner design than what was available in the previous code. It also allows to unit-test the code properly, without providing a Debian archive in the testsuite.
Feature Flags, Optipng,
The new generator also allows to enable and disable certain sets of features in a standardized way. E.g. Ubuntu uses a language-pack system for translations, which Debian doesn t use. Features like this can be implemented as disableable separate modules in the generator. We use this at time to e.g. allow descriptions from packages to be used as AppStream descriptions, or for running optipng on the generated PNG images and icons.
No more Contents file dependency
Another issue the old generator had was that it used the Contents file from the Debian archive to find matching icons for an application. We could never be sure whether the contents in the Contents file actually matched the contents of the package we were currently dealing with. What made things worse is that at Ubuntu, the archive software is only updating the Contents file
Flying over the airport at Moundridge, KS
Memories
Back when I was a child, maybe about the age my children are now, I d be outside in the evening and see this orange plane flying overhead. Our neighbor Don had a small ultralight plane and a grass landing strip next to his house. I remember longing to be up in the sky with Don, exploring the world from up there. At that age, I didn t know all the details of why that wouldn t work I just knew I wanted to ride in it.
It wasn t until I was about 11 that I flew for the first time. I still remember that TWA flight with my grandma, taking off early in the morning and flying just a little ways above the puffy clouds lit up all yellow and orange by the sunrise. Even 25 years later, that memory still holds as one of the most beautiful scenes I have ever seen.
Exploring
I have always been an explorer.
When I go past something interesting, I love to go see what it looks like inside. I enjoy driving around Kansas with Laura, finding hidden waterfalls, old county courthouses, ghost towns, beautiful old churches, even small-town restaurants. I explore things around me, too once taking apart a lawnmower engine as a child, nowadays building HF antennas in my treetops or writing code for Linux. If there is little to learn about something, it becomes less interesting to me.
I see this starting to build in my children, too. Since before they could walk, if we were waiting for something in a large building, we d go exploring.
A patch of rain over Hillsboro, KS
The New World
A pilot once told me, Nobody can become a pilot without it changing the way they see the world and then, changing their life.
I doubted that. But it was true. One of the most poetic sights I know is flying a couple thousand feet above an interstate highway at night, following it to my destination. All those red and white lights, those metal capsules of thousands of lives and thousands of stories, stretching out as far as the eye can see in either direction.
Kansas sunset from the plane
When you re in a plane, that small town nowhere near a freeway that always seemed so far away suddenly is only a 15-minute flight away, not even enough time to climb up to a high cruise altitude. Two minutes after takeoff, any number of cities that are an hour s drive away are visible simultaneously, their unique features already recognizable: a grain elevator, oil refinery, college campus, lake, whatever.
And all the houses you fly over each with people in them. Some pretty similar to you, some apparently not. But pretty soon you realize that we all are humans, and we aren t all that different. You can t tell a liberal from a conservative from the sky, nor a person s race or religion, nor even see the border between states. Towns and cities are often nameless from the sky, unless you re really low; only your navigation will tell you where you are.
I ve had the privilege to fly to small out-of-the-way airports, the kind that have a car that pilots can use for free to go into town and get lunch, and leave the key out for them. There I ve met many friendly people. I ve also landed my little Cessna at a big commercial airport where I probably used only 1/10th of the runway, on a grass runway that was barely maintained at all. I ve flown to towns I d driven to or through many times, discovering the friendly folks at the small airport out of town. I ve flown to parts of Kansas I ve never been to before, discovered charming old downtowns and rolling hills, little bursts of rain and beautiful sunsets that seem to turn into a sea.
Parked at the Smith Center, KS airport terminal, about to meet some wonderful people
For a guy that loves exploring the nooks and crannies of the world that everyone else drives by on their way to a major destination, being a pilot has meant many soul-filling moments.
Hard Work
I knew becoming a pilot would be a lot of hard work, and thankfully I remembered stories like that when I finally concluded it would be worth it. I found that I had an aptitude for a lot of things that many find difficult about being a pilot: my experience with amateur radio made me a natural at talking to ATC, my fascination with maps and navigation meant I already knew how to read aviation sectional maps before I even started my training and knew how to process that information in the cockpit, my years as a system administrator and programmer trained me with a careful and methodical decision-making process. And, much to the surprise of my flight instructor, I couldn t wait to begin the part of training about navigating using VORs (VHF radio beacons). I guess he, like many student pilots, had struggled with that, but I was fascinated by this pre-GPS technology (which I still routinely use in my flight planning, as a backup in case the GPS constellation or a GPS receiver fails). So that left the reflexes of flight, the art of it, as the parts I had to work on the hardest.
The exam with the FAA is not like getting your driver s license. It s a multi-stage and difficult process. So when the FAA Designated Pilot Examiner said congratulations, pilot! and later told my flight instructor that you did a really good job with this one, I felt a true sense of accomplishment.
Some of my prep materials
Worth It
Passengers in a small plane can usually hear all the radio conversations going on. My family has heard me talking to air traffic control, to small and big planes. My 6-year-old son Oliver was playing yesterday, and I saw him pick up a plane and say this:
Two-four-niner-golf requesting to land on runway one-seven . Two-four-niner-golf back-taxi on one-seven Two-four-niner-golf ready to takeoff on runway one-seven!
That was a surprisingly accurate representation of some communication a pilot might have (right down to the made-up tailnumber with the spelling alphabet!)
It just got more involved from there!
Jacob and Oliver love model train shows. I couldn t take them to one near us, but there was one in Joplin, MO. So the day before Easter, while Laura was working on her Easter sermon, two excited boys and I (frankly also excited) climbed into a plane and flew to Joplin.
We had a great time at the train show, discovered a restaurant specializing in various kinds of hot dogs (of course they both wanted to eat there), played in a park, explored the city, and they enjoyed the free cookies at the general aviation terminal building while I traded tips on fun places to fly with other pilots.
When it comes right down to it, the smiles of the people I fly with are the most beautiful thing in the air.
Jacob after his first father-son flight with me
Let's Encrypt is a certificate authority (CA) that just
left beta stage, that provides domain
name-validated (DV) X.509 certificates for free and in an
automated way: users just have to run a piece of software on their
server to get and install a certificate, resulting in a valid TLS
setup.
A threat to other certificate authorities
By providing certificates for free and automatically, Let's Encrypt
is probably a threat a other CAs, a least for part of their activity.
Indeed, for people that are satisfied with DV certificates, there are
not many reasons to pay a commercial CA to get certificates in a
non-automated way. For the CAcert non-commercial CA, that may mean a slow death, as
this is their main activity .
For people that want organization-validated (OV) or extended
validation (EV) certificates, Let's Encrypt is not suitable, so
it will not change anything regarding that.
An opportunity for the most reactive
The entrance of Let's Encrypt is also a significant opportunity for
the certificate authorities that will be reactive enough to take
advantage of their innovation. Indeed, they introduced automation in
both domain name validation and certificate issuance (and revocation),
by defining an open
protocol that is meant to become an Internet standard. That
protocol, named ACME, is not tied to Let's Encrypt and has several free
software implementations, so it could be used for the same
purpose by commercial CAs.
A certification authority could, for instance:
The first time I was paid to do software development came as something of a surprise to me. I was working as a sysadmin in a computational physics research group when a friend asked me if I'd be willing to talk to her PhD supervisor. I had nothing better to do, so said yes. And that was how I started the evening having dinner with David MacKay, and ended the evening better fed, a little drunker and having agreed in principle to be paid to write free software.Apr 13 10:10:59 <do-droplet> postfix/smtp[23469]: connect to mail.<mydomain>[<ipv6-address>]:25: Connection timed outAfter some more research [1], I realized that the folks out there at DO really apply some port blockings to IPv6 networks, but not to IPv4 networks. Pardon me? From my DO droplets, I can nmap any port on my mail server (25,80,143,443, 465, 587, etc.) via the IPv4 connection, but not over the IPv6 connection. Wait, not fully true: ports 80 and 443 are not blocked, but the other aforementioned ports are definitely blocked. Is Digital Ocean a professional ISP or a WiFi hotspot provider at my nearest coffee place? (This really makes me scratch my head...). Routing only the first 16 addresses of allocated /64 prefixes The above was the second IPv6 brokeness I learned about DO, recently. An earlier issue with DO's IPv6 support, I encountered while I was deploying an IPv6 capable OpenVPN internet gateway via a droplet hosted at DO. Digital Ocean assigns full IPv6 /64 prefixes to each individual droplet (which is great), but only properly routes the first 16 IP addresses of such a /64 prefix [2]. Urgh? I had to work around this flaw by adding an IPv6-over-IPv4 tunnel and attaching an IPv6 /56 prefix obtained from Hurricane Electrics' tunnel broker service [3] to the OpenVPN server. Thanks, Digital Ocean, for reminding me about giving feedback So, today, I luckily received a reminder mail about DO's yet-another-survey survey. My opportunity!!! Here is the feedback, I gave:
DO service is basically good. BUT: You as a provider SUCK when it comes to IPv6. (1) http://pixelschatten.net/blocked-ipv6-ports/ -> SMTP/IMAP traffic blocked over IPv6, but not over IPv4... WTF?). I normally have all my systems report back to my main mail server. I expect this to work as it is the default on all Linux hosts nowadays, and that is: prefer IPv6 over IPv4. (2) https://digitalocean.uservoice.com/forums/136585-digitalocean/suggestion... -> Droplets get a full /64 prefix assigned, but only the first 16 addresses (or such) get routed properly. WTF? Please do your homework on IPv6 and don't cripple your service by offering crippled IPv6 support. I tell people, DO is great, but their IPv6 support is broken-by-design. Let me know, once this is about to change. Mike Gabriel (aka sunweaver at debian dot org, Debian Developer)Apology for the tone of the wording Now reading the feedback given, I realize that my tone has been quite impolite. I am sorry about this. However, the experienced IPv6 issues are indeed annoying. So please excuse me for having expressed my annoyance with such harsh words. And... I am still annoyed about myself paying an ISP for such a crippled IPv6 support. (I need to consider migrating the VMs to another hoster, unless there will be some dynamics observable in the near future). @Digital Ocean: Keep up the good work that you do in the realm of VM hosting. Evolve and grow up in the realm of IPv6 networking. Thank you! light+love
That s a longer title than I d like, but I want to try and catch the attention of anyone who might have missed more directed notifications about this. If you re not an SPI contributing member there s probably nothing to see here
Although I decided not to stand for re-election at the Software in the Public Interest (SPI) board elections last July, I haven t stopped my involvement with the organisation. In particular I ve spent some time working on an overhaul of the members website and rolling it out. One of the things this has enabled is implementation of 2009-11-04.jmd.1: Contributing membership expiry, by tracking activity in elections and providing an easy way for a member to indicate they consider themselves active even if they haven t voted.
The plan is that this will run at some point after the completion of every board election. A first pass of cleanups was completed nearly a month ago, contacting all contributing members who d never been seen to vote and asking them to update their status if they were still active. A second round, of people who didn t vote in the last board election (in 2014), is currently under way. Affected members will have been emailed directly and there was a mail to spi-announce, but I m aware people often overlook these things or filter mail off somewhere that doesn t get read often.
If you are an SPI Contributing member who considers themselves an active member I strongly recommend you login to the SPI Members Website and check the Last active date displayed is after 2014-07-14 (i.e. post the start of the last board election). If it s not, click on the Update link beside the date. The updated date will be shown once you ve done so.
Why does pruning inactive members matter? The 2015 X.Org election results provide at least one indication of why ensuring you have an engaged membership is important - they failed to make a by-laws change that a vast majority of votes were in favour of, due to failing to make quorum. (If you re an X.org member, go vote!)
That s a longer title than I d like, but I want to try and catch the attention of anyone who might have missed more directed notifications about this. If you re not an SPI contributing member there s probably nothing to see here
Although I decided not to stand for re-election at the Software in the Public Interest (SPI) board elections last July, I haven t stopped my involvement with the organisation. In particular I ve spent some time working on an overhaul of the members website and rolling it out. One of the things this has enabled is implementation of 2009-11-04.jmd.1: Contributing membership expiry, by tracking activity in elections and providing an easy way for a member to indicate they consider themselves active even if they haven t voted.
The plan is that this will run at some point after the completion of every board election. A first pass of cleanups was completed nearly a month ago, contacting all contributing members who d never been seen to vote and asking them to update their status if they were still active. A second round, of people who didn t vote in the last board election (in 2014), is currently under way. Affected members will have been emailed directly and there was a mail to spi-announce, but I m aware people often overlook these things or filter mail off somewhere that doesn t get read often.
If you are an SPI Contributing member who considers themselves an active member I strongly recommend you login to the SPI Members Website and check the Last active date displayed is after 2014-07-14 (i.e. post the start of the last board election). If it s not, click on the Update link beside the date. The updated date will be shown once you ve done so.
Why does pruning inactive members matter? The 2015 X.Org election results provide at least one indication of why ensuring you have an engaged membership is important - they failed to make a by-laws change that a vast majority of votes were in favour of, due to failing to make quorum. (If you re an X.org member, go vote!)
SOURCE_DATE_EPOCH variable, and the Javadoc task use en as the default locale if none was specified and SOURCE_DATE_EPOCH is set.SOURCE_DATE_EPOCH.hostname command with the fixed string "localhost"..oct files.-fdebug-prefix-map to clang to match GCC, another patch against gcc-5 to backport the removal of -fdebug-prefix-map from DW_AT_producer, and finally by proposing the addition of a normalizedebugpath to the reproducible feature set of dpkg-buildflags that would use -fdebug-prefix-map to replace the current directory with . using -fdebug-prefix-map.
Sergey Poznyakoff merged the --clamp-mtime option so that it will be featured in the next Tar release. This option is likely to be used by dpkg-deb to implement deterministic mtimes for packaged files.
Packages fixed
The following packages have become reproducible due to changes in their
build dependencies:
augeas,
gmtkbabel,
ktikz,
octave-control,
octave-general,
octave-image,
octave-ltfat,
octave-miscellaneous,
octave-mpi,
octave-nurbs,
octave-octcdf,
octave-sockets,
octave-strings,
openlayers,
python-structlog,
signond.
The following packages became reproducible after getting fixed:
i386 build nodes have been setup by converting 2 of the 4 amd64 nodes to i386. (h01ger)
Package reviews
92 reviews have been removed, 66 added and 31 updated in the previous week.
New issues: timestamps_generated_by_xbean_spring, timestamps_generated_by_mangosdk_spiprocessor.
Chris Lamb filed 7 FTBFS bugs.
Misc.
On March 20th, Chris Lamb gave a talk at FOSSASIA 2016 in Singapore.
The very same day, but a few timezones apart, h01ger did a presentation at LibrePlanet 2016 in Cambridge, Massachusetts.
Seven GSoC/Outreachy applications were made by potential interns to work on various aspects of the reproducible builds effort. On top of interacting with several applicants, prospective mentors gathered to review the applications.
Here are some tweaks to git log that I have found useful. It might
depend on the workflow of individual projects how applicable this is.
Git stores separate author and committer information for each commit.
How these are generated and updated is sometimes mysterious but
generally makes sense. For example, if you cherry-pick a commit to a
different branch, the author information stays the same but the
committer information is updated. git log defaults to showing the
author information. But I generally care less about that than the
committer information, because I m usually interested in when the
commit arrived in my or the public repository, not when it was
initially thought about. So let s try to change the default git log
format to show the committer information instead. Again, depending on
the project and the workflow, there can be other preferences.
To create a different default format for git log, first create a new
format by setting the Git configuration item pretty.somename. I
chose pretty.cmedium because it s almost the same as the default
medium but with the author information replaced by the committer
information.
[pretty]
cmedium="format:%C(auto,yellow)commit %H%C(auto,reset)%nCommit: %cn <%ce>%nCommitDate: %cd%n%n%w(0,4,4)%s%n%+b"
Unfortunately, the default git log formats are not defined in terms
of these placeholders but are hardcoded in the source, so this is my
best reconstruction using the available means.
You can use this as git log --pretty=cmedium, and you can set this
as the default using
[format]
pretty=cmedium
If you find this useful and you re the sort of person who is more
interested in their own timeline than the author s history, you might
also like two more tweaks.
First, add %cr for relative date, so it looks like
[pretty]
cmedium="format:%C(auto,yellow)commit %H%C(auto,reset)%nCommit: %cn <%ce>%nCommitDate: %cd (%cr)%n%n%w(0,4,4)%s%n%+b"
This adds a relative designation like 2 days ago to the commit date.
Second, set
[log]
date=local
to have all timestamps converted to your local time.
When you put all this together, you turn this
commit e2c117a28f767c9756d2d620929b37651dbe43d1
Author: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue Apr 5 08:16:01 2016 -0700
into this
commit e2c117a28f767c9756d2d620929b37651dbe43d1
Commit: Paul Eggert <eggert@cs.ucla.edu>
CommitDate: Tue Apr 5 11:16:01 2016 (3 days ago)
PS: If this is lame, there is always this:
http://fredkschott.com/post/2014/02/git-log-is-so-2005/
I've been working on TPMTOTP a little this weekend. I merged a pull request that adds command-line argument handling, which includes the ability to choose the set of PCRs you want to seal to without rebuilding the tools, and also lets you print the base32 encoding of the secret rather than the qr code so you can import it into a wider range of devices. More importantly it also adds support for setting the expected PCR values on the command line rather than reading them out of the TPM, so you can now re-seal the secret against new values before rebooting.
Started in 2008, lldpd is an implementation of
IEEE 802.1AB-2005 (aka LLDP) written in C. While it contains some
unit tests, like many other network-related software at the time, the
coverage of those is pretty poor: they are hard to write because the
code is written in an imperative style and tighly coupled with the
system. It would require extensive mocking1. While a rewrite
(complete or iterative) would help to make the code more
test-friendly, it would be quite an effort and it will likely
introduce operational bugs along the way.
To get better test coverage, the major features of lldpd are now
verified through integration tests. Those tests leverage Linux
network namespaces to setup a lightweight and isolated environment
for each test. They run through pytest, a powerful testing tool.
assert keyword,class testArithmetics(unittest.TestCase): def test_addition(self): self.assertEqual(1 + 3, 4)
def test_addition(): assert 1 + 3 == 4
class testInVM(unittest.TestCase): def setUp(self): self.vm = VM('Test-VM') self.vm.start() self.ssh = SSHClient() self.ssh.connect(self.vm.public_ip) def tearDown(self): self.ssh.close() self.vm.destroy() def test_hello(self): stdin, stdout, stderr = self.ssh.exec_command("echo hello") stdin.close() self.assertEqual(stderr.read(), b"") self.assertEqual(stdout.read(), b"hello\n")
tearDown() method won t be invoked. The VM
will be left running.
Instead, with pytest, we could do this:
@pytest.yield_fixture def vm(): r = VM('Test-VM') r.start() yield r r.destroy() @pytest.yield_fixture def ssh(vm): ssh = SSHClient() ssh.connect(vm.public_ip) yield ssh ssh.close() def test_hello(ssh): stdin, stdout, stderr = ssh.exec_command("echo hello") stdin.close() stderr.read() == b"" stdout.read() == b"hello\n"
@pytest.mark.parametrize("n1, n2, expected", [ (1, 3, 4), (8, 20, 28), (-4, 0, -4)]) def test_addition(n1, n2, expected): assert n1 + n2 == expected
lldpd process in each namespace.lldpcli we get the expected result in the other.@pytest.mark.skipif('LLDP-MED' not in pytest.config.lldpd.features, reason="LLDP-MED not supported") @pytest.mark.parametrize("classe, expected", [ (1, "Generic Endpoint (Class I)"), (2, "Media Endpoint (Class II)"), (3, "Communication Device Endpoint (Class III)"), (4, "Network Connectivity Device")]) def test_med_devicetype(lldpd, lldpcli, namespaces, links, classe, expected): links(namespaces(1), namespaces(2)) with namespaces(1): lldpd("-r") with namespaces(2): lldpd("-M", str(classe)) with namespaces(1): out = lldpcli("-f", "keyvalue", "show", "neighbors", "details") assert out['lldp.eth0.lldp-med.device-type'] == expected
lldpd was compiled with
LLDP-MED support. Second, the test is parametrized. We will execute
four distinct tests, one for each role that lldpd should be able to
take as an LLDP-MED-enabled endpoint.
The signature of the test has four parameters that are not covered by
the parametrize() decorator: lldpd, lldpcli, namespaces and
links. They are fixtures. A lot of magic happen in those to keep
the actual tests short:
lldpd is a factory to spawn an instance of lldpd. When called,
it will setup the current namespace (setting up the chroot,
creating the user and group for privilege separation, replacing
some files to be distribution-agnostic, ), then call lldpd
with the additional parameters provided. The output is recorded and
added to the test report in case of failure. The module also
contains the creation of the pytest.config.lldpd object that is
used to record the features supported by lldpd and skip
non-matching tests. You can read
fixtures/programs.py for more details.
lldpcli is also a factory, but it spawns instances of lldpcli,
the client to query lldpd. Moreover, it will parse the output in
a dictionary to reduce boilerplate.
namespaces is one of the most interesting pieces. It is a
factory for Linux namespaces. It will spawn a new namespace or
refer to an existing one. It is possible to switch from one namespace
to another (with with) as they are contexts. Behind the scene,
the factory maintains the appropriate file descriptors for each
namespace and switch to them with setns(). Once the test is done,
everything is wipped out as the file descriptors are garbage
collected. You can read fixtures/namespaces.py
for more details. It is quite reusable in other
projects2.
links contains helpers to handle network interfaces: creation of
virtual ethernet link between namespaces, creation of bridges,
bonds and VLAN, etc. It relies on the pyroute2 module. You can
read fixtures/network.py for more details.
pytest -n 10 --boxed. To
catch even more bugs, both the address sanitizer (ASAN) and the
undefined behavior sanitizer (UBSAN) are enabled. In case of a
problem, notably a memory leak, the faulty program will exit with a
non-zero exit code and the associated test will fail.
root and
_lldpd). Therefore, the tests have to run as root.
The second limitation is with the PID namespace. It s
not possible for a process to switch from one PID
namespace to another. When you call setns() on a PID
namespace, only children of the current process will
be in the new PID namespace. The PID namespace is
convenient to ensure everyone gets killed once the
tests are terminated but you must keep in mind that
/proc must be mounted in children only. The third
limitation is that, for some namespaces (PID and
user), all threads of a process must be part of the
same namespace. Therefore, don t use threads in
tests. Use multiprocessing module instead.
Debian LTS
March was the eleventh month I contributed to Debian LTS under the
Freexian umbrella. In total I spent 13 hours (of allocated 11.00 +
5.25h from last month) working on preparing for wheezy-lts:
Do you fancy a hack-camp in a place like this?
As you might have heard by now, Ana (Guerrero) and I are organising a small
Debian event this spring: the Debian SunCamp 2016.
It is going to be different to most other Debian events. Instead of a busy
schedule of talks, SunCamp will focus on the hacking and socialising aspect.
We have tried to make this event the simplest event possible, both for
organisers and attendees. There will be no schedule, except for the meal times
at the hotel. But these can be ignored too, there is a lovely bar that serves
snacks all day long, and plenty of restaurants and caf s around the village.
One of the things that makes the event simple, is that we have negotiated a
flat price for accommodation that includes usage of all the facilities in the
hotel, and optionally food. We will give you a booking code, and then you
arrange your accommodation as you please, you can even stay longer if you feel
like it!
The rooms are simple but pretty, and everything has been renovated very
recently.
We are not preparing a talks programme, but we will provide the space and
resources for talks if you feel inclined to prepare one.
You will have a huge meeting room, divided in 4 areas to reduce noise, where
you can hack, have team discussions, or present talks.
Of course, some people will prefer to move their discussions to the outdoor
area.
Or just skip the discussion, and have a good time with your Debian friends,
playing p tanque, pool, air hockey, arcades, or board games.
Do you want to see more pictures? Check the full gallery
Debian SunCamp 2016 Hotel Anabel, LLoret de Mar, Province of Girona, Catalonia, Spain May 26-29, 2016
The Debian repository format was designed a long time ago. The oldest
versions of it were produced with the help of tools such as
dpkg-scanpackages and consumed by dselect access methods such as
dpkg-ftp. The access methods just fetched a Packages file (perhaps
compressed) and used it as an index of which packages were available; each
package had an MD5 checksum to defend against transport errors, but being
from a more innocent age there was no repository signing or other protection
against man-in-the-middle attacks.
An important and intentional feature of the early format was that, apart
from the top-level Packages file, all other files were static in the
sense that, once published, their content would never change without also
changing the file name. This means that repositories can be efficiently
copied around using rsync without having to tell it to re-checksum all
files, and it avoids network races when fetching updates: the repository
you re updating from might change in the middle of your update, but as long
as the repository maintenance software keeps superseded packages around for
a suitable grace period, you ll still be able to fetch them.
The repository format evolved rather organically over time as different
needs arose, by what one might call distributed consensus among the
maintainers of the various client tools that consumed it. Of course all
sorts of fields were added to the index files themselves, which have an
extensible format so that this kind of thing is usually easy to do. At some
point a Sources index for source packages was added, which worked pretty
much the same way as Packages except for having a different set of fields.
But by far the most significant change to the repository structure was the
package pools project.
The original repository layout put the packages themselves under the
dists/ tree along with the index files. The dists/ tree is organised by
suite (modern examples of which would be stable , stable-updates ,
testing , unstable , xenial , xenial-updates , and so on). This meant
that making a release of Debian tended to involve copying lots of data
around, and implementing the testing suite would have been very costly.
Package pools solved this problem by moving individual package files out of
dists/ and into a new pool/ tree, allowing those files to be shared
between multiple suites with only a negligible cost in disk space and mirror
bandwidth. From a database design perspective this is obviously much more
sensible. As part of this project, the original Debian dinstall
repository maintenance scripts were
replaced
by da-katie or dak , which among other things used a new apt-ftparchive
program to build the index files; this replaced dpkg-scanpackages and
dpkg-scansources, and included its own database cache which made a big
difference to performance at the scale of a distribution.
A few months after the initial implementation of package pools, Release
files were added. These formed a sort of meta-index for each suite, telling
APT which index files were available (main/binary-i386/Packages,
non-free/source/Sources, and so on) and what their checksums were.
Detached signatures were added alongside that (Release.gpg) so that it was
now possible to fetch packages securely given a public key for the
repository, and client-side verification
support for
this eventually made its way into Debian and Ubuntu. The repository
structure stayed more or less like this for several years.
At some point along the way, those of us by now involved in repository
maintenance realised that an important property had been lost. I mentioned
earlier that the original format allowed race-free updates, but this was no
longer true with the introduction of the Release file. A client now had
to fetch Release and then fetch whichever other index files such as
Packages they wanted, typically in separate HTTP transactions. If a
client was unlucky, these transactions would fall on either side of a mirror
update and they d get a Hash Sum Mismatch error from APT. Worse, if a
mirror was unlucky and also didn t go to special lengths to verify index
integrity (most don t), its own updates could span an update of its upstream
mirror and then all its clients would see mismatches until the next mirror
update. This was compounded by using detached signatures, so Release and
Release.gpg were fetched separately and could be out of sync.
Fixing this has been a long road (the first time I remember talking about
this was in late 2007!), and we ve had to take care to maintain
client/server compatibility along the way. The first step was to add
inline-signed versions of the Release file, called InRelease, so that
there would no longer be a race between fetching Release and fetching its
signature. APT has had this for a while, Debian s repository supports it as
of stretch, and we finally implemented it for
Ubuntu six months ago.
Dealing with the other index files is more complicated, though; it isn t
sensible to inline them, as clients usually only need to fetch a small
fraction of all the indexes available for a given suite.
The solution we ve ended up with, thanks to Michael Vogt s work implementing
it in APT, is called
by-hash
and should be familiar in concept to people who ve used git: with the
exception of the top-level InRelease file, index files for suites that
support the by-hash mechanism may now be fetched using a URL based on one of
their hashes listed in InRelease. This means that clients can now operate
like this:
dists/xenial/InReleasedists/xenial/main/binary-amd64/by-hash/SHA256/46316a202cdae76a73b555414741b11d08c66620b76c470a1623cedcc8a14740
(and so on)debmirror doesn t support by-hash yet; apt-cacher-ng only supports it as
of xenial, although there s an easy configuration
workaround. Full archive mirrors must make
sure that they put new by-hash files in place before new InRelease files
(I just fixed our recommended two-stage sync
script to do this;
ubumirror still needs some work; Debian s
ftpsync is almost correct but
needs a tweak for its handling of translation files, which I ve sent to its
maintainers). Other mirrors and proxies that have specific handling of the
repository format may need similar changes.
Please let me know if you see strange things happening as a result of this
change. It s useful to check the output of apt -o
Debug::Acquire::http=true update to see exactly what requests are being issued.
Next.