teythoon@europa /tmp % export GOPATH= pwd teythoon@europa /tmp % go get bitbucket.org/teythoon/hurdtest teythoon@europa /tmp % bin/hurdtest Usage: hurdtest [options] <command> [<arguments...>]Currently it has the following subcommands:
teythoon@europa ~/repos/hurd/hurd-tests % bin/hurdtest update 2013/06/22 19:59:45 starting kvm [-drives file=image.qcow2,cache=writeback,snapshot=on -serial unix:/tmp/285813369/serial -monitor unix:/tmp/285813369/monitor -nographic -m 512] 2013/06/22 19:59:45 Waiting for grub... 2013/06/22 19:59:46 Waiting for login prompt... 2013/06/22 20:00:05 Updating system 2013/06/22 20:02:52 Get: 1 http://www.local unstable InRelease [8279 B] Get: 2 http://http.debian.net sid InRelease [205 kB] Get: 3 http://ftp.debian-ports.org unreleased InRelease [23.9 kB] [...] Setting up perl (5.14.2-21) ... Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Reading task descriptions... 2013/06/22 20:02:52 Update successful. Snapshotting system... 2013/06/22 20:02:53 Rebooting system... 2013/06/22 20:02:54 Waiting for grub... 2013/06/22 20:02:59 Waiting for login prompt... 2013/06/22 20:03:16 Running main.testTrue... 2013/06/22 20:03:16 Running main.testFalse... 2013/06/22 20:03:17 Running main.testClean... [...] 2013/06/22 20:03:18 Running main.testNetwork... 2013/06/22 20:03:18 Running main.testResolver... 2013/06/22 20:03:20 Running main.testAptitudeInstall... 2013/06/22 20:03:46 Test successful. Reverting system... 2013/06/22 20:03:48 Halting system... 2013/06/22 20:03:53 Committing changes... 2013/06/22 20:03:57 Creating snapshot... 2013/06/22 20:04:04 All done. bin/hurdtest update 157.31s user 69.71s system 87% cpu 4:18.94 totalThe overlay command implements my work flow. I can edit scripts or drop hacked up executables onto my VM and see the results without any manual intervention. There's the -interactive flag that does this in a loop, avoiding the VM startup time using qemu snapshots. With this I can apply an overlay and see the results of the test suite in about a minute on my system. From early experiments I knew that simply running /etc/rcS.d/S* prevented the system from booting correctly, so I figured my first task should be to figure out what went wrong there. Using my tool (and developing it in that process) and many iterations later I came up with a surprisingly small diff of scripts in the initscripts and utilities shipped with the hurd package. For your convenience here is a tarball that you can extract to the root of your Debian/Hurd installation to reproduce my results (of course I invite you to use my tool for that purpose):
% bin/hurdtest overlay test 2013/06/22 21:35:31 starting kvm [-drive file=image.qcow2,cache=writeback,snapshot=on -serial unix:/tmp/345188134/serial -monitor unix:/tmp/345188134/monitor -nographic -m 512] 2013/06/22 21:35:31 Waiting for grub... 2013/06/22 21:35:31 Waiting for login prompt... 2013/06/22 21:35:48 Creating tarball... ./ ./etc/ ./etc/hurd/ ./etc/hurd/rc ./etc/init.d/ ./etc/init.d/checkroot.sh ./etc/init.d/mountall.sh ./runme ./lib/ ./lib/init/ ./lib/init/mount-functions.sh ./sbin/ ./sbin/swapon ./bin/ ./bin/mount 2013/06/22 21:35:48 Extracting overlay... 2013/06/22 21:35:49 Rebooting system... 2013/06/22 21:35:49 Waiting for grub... 2013/06/22 21:35:55 Writing log to /tmp/bootlog-802006344 2013/06/22 21:35:55 Waiting for login prompt... 2013/06/22 21:36:20 Booting successful. 2013/06/22 21:36:20 Running main.testTrue... 2013/06/22 21:36:21 Running main.testFalse... 2013/06/22 21:36:21 Running main.testClean... 2013/06/22 21:36:21 Running anonymous function... 2013/06/22 21:36:21 Running anonymous function... 2013/06/22 21:36:21 Running anonymous function... 2013/06/22 21:36:21 Running anonymous function... 2013/06/22 21:36:21 Running anonymous function... 2013/06/22 21:36:22 Running anonymous function... 2013/06/22 21:36:22 Running main.testUname... 2013/06/22 21:36:22 Running main.testNetwork... 2013/06/22 21:36:22 Running main.testResolver... 2013/06/22 21:36:23 Running main.testAptitudeInstall... bin/hurdtest overlay ../hurd-tests-old/test 44.20s user 20.01s system 82% cpu 1:17.94 totalAnd here is the boot log:
Loading GNU Mach ...
Loading the Hurd ...
GNU Mach 1.3.99-486
AT386 boot: physical memory map from 0x0 to 0x9f400
AT386 boot: physical memory map from 0x100000 to 0x1fffe000
AT386 boot: physical memory from 0x0 to 0x1fffe000
Enabling FXSR
pcibios_init : BIOS32 Service Directory structure at 0xfcff0
pcibios_init : BIOS32 Service Directory entry at 0xfc7ba
pcibios_init : PCI BIOS revision 2.10 entry at 0xfc78c
Probing PCI hardware.
ide: Intel 82371 PIIX3 (dual FIFO) DMA Bus Mastering IDE
Controller on PCI bus 0 function 9
ide: BM-DMA feature is not enabled (BIOS), enabling
ide0: BM-DMA at 0xc100-0xc107
ide1: BM-DMA at 0xc108-0xc10f
hd0: got CHS=762/128/63 CTL=c8 from BIOS
hd0: QEMU HARDDISK, 3001MB w/256kB Cache, CHS=762/128/63, DMA
hd2: QEMU DVD-ROM, ATAPI CDROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
Floppy drive(s): fd0 is 1.44M
FDC 0 is a S82078B
probing scsi 0/22: advansys probing scsi 1/22: BusLogic probing scsi 2/22: UltraStor 14F/34F rev. 4.33.00 probing scsi 3/22: UltraStor 14F/24F/34F probing scsi 4/22: Adaptec 152x SCSI driver; $Revision: 1.1 $ probing scsi 5/22: Adaptec 1542 Invalid address for shpnt with 1542.
Invalid address for shpnt with 1542.
probing scsi 6/22: Adaptec 174x (EISA) probing scsi 7/22: probing scsi 8/22: Always IN2000 probing scsi 9/22: probing scsi 10/22: probing scsi 11/22: probing scsi 12/22: Trantor T128/T128F/T228 probing scsi 13/22: DTC 3180/3280 probing scsi 14/22: Tekram DC390(T) V1.11 Feb-05-1997 probing scsi 15/22: probing scsi 16/22: ncr53c8xx - revision 2.5f.1 probing scsi 17/22: EATA (Extended Attachment) PIO driver probing scsi 18/22: Western Digital WD-7000 Failed initialization of WD-7000 SCSI card!
probing scsi 19/22: EATA/DMA 2.0x rev. 4.33.00 probing eata on 1f0EATA0: address 0x1f0 in use, skipping probe.
probing eata on 1c88probing eata on 2c88probing eata on 3c88probing eata on 4c88probing eata on 5c88probing eata on 6c88probing eata on 7c88probing eata on 8c88probing eata on 9c88probing eata on ac88probing eata on bc88probing eata on cc88probing eata on dc88probing eata on ec88probing eata on fc88probing eata on 170EATA0: address 0x170 in use, skipping probe.
probing eata on 230probing eata on 330probing scsi 20/22: AM53C974 probing scsi 21/22: Iomega parport ZIP drive ppa: Version 1.42
ppa: Probing port 03bc
ppa: Probing port 0378
ppa: SPP port present
ppa: PS/2 bidirectional port present
ppa: Probing port 0278
done
scsi : 0 hosts.
scsi : detected total.
Partition check (DOS partitions):
hd0: hd0s1 hd0s2 < hd0s5 >
lpr0: at atbus0, port = 378, spl = 6, pic = 7.
module 0: ext2fs --readonly --multiboot-command-line=$ kernel-command-line --host-priv-port=$ host-port --device-master-port=$ device-port --exec-server-task=$ exec-task -T typed $ root $(task-create) $(task-resume) module 1: exec /hurd/exec $(exec-task=task-create) 2 multiboot modules task loaded: ext2fs --readonly --multiboot-command-line=root=device:hd0s1 console=com0 --host-priv-port=1 --device-master-port=2 --exec-server-task=3 -T typed device:hd0s1
task loaded: exec /hurd/exec
start ext2fs: Hurd server bootstrap: ext2fs[device:hd0s1] exec init proc auth
Using makefile-style concurrent boot in runlevel S.
ERROR: could not open /proc/stat: No such file or directory
Activating swap...done.
Checking root file system...fsck from util-linux 2.20.1
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
end_request: I/O error, dev 02:00, sector 0
ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/hd0s1 is mounted.
/dev/hd0s1: clean, 44328/181056 files, 288266/723200 blocks
done.
Cleaning up temporary files... /tmp.
mount: /run: Unknown device or filesystem
mount: /run/lock: Unknown device or filesystem
mount: /proc: Unknown device or filesystem
mount: /run/shm: Unknown device or filesystem
/etc/rcS.d/S06mtab.sh: 48: /etc/rcS.d/S06mtab.sh: cannot open /proc/mounts: No such file
Activating lvm and md swap...(default pager): Already paging to partition hd0s5!
done.
Checking file systems...fsck from util-linux 2.20.1
hd2 : tray open or drive not ready
hd2 : tray open or drive not ready
end_request: I/O error, dev 02:00, sector 0
done.
Mounting local filesystems...mount: invalid option -- 'O'
Try mount --help' or mount --usage' for more information.
failed.
Activating swapfile swap...(default pager): Already paging to partition hd0s5!
done.
df: Warning: cannot read table of mounted file systems: No such file or directory
Cleaning up temporary files....
Configuring network interfaces...inetutils-ifconfig: invalid arguments
ifup: failed to open pid file /run/network/ifup-/dev/eth0.pid: No such file or directory
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
can't create /var/lib/dhcp/dhclient./dev/eth0.leases: No such file or directory
Listening on Socket//dev/eth0
Sending on Socket//dev/eth0
DHCPDISCOVER on /dev/eth0 to 255.255.255.255 port 67 interval 5
DHCPREQUEST on /dev/eth0 to 255.255.255.255 port 67
DHCPOFFER from 10.0.2.2
DHCPACK from 10.0.2.2
can't create /var/lib/dhcp/dhclient./dev/eth0.leases: No such file or directory
bound to 10.0.2.15 -- renewal in 36884 seconds.
done.
Cleaning up temporary files....
Setting up X socket directories... /tmp/.X11-unix /tmp/.ICE-unix.
Using makefile-style concurrent boot in runlevel 2.
Starting enhanced syslogd: rsyslogd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: cron.
Starting system message bus: dbusFailed to set socket option"/var/run/dbus/system_bus_socket": Protocol not available.
Starting OpenBSD Secure Shell server: sshd.
GNU 0.3 (debian) (console)
login:
I know it isn't that pretty, but it yields a working Debian/Hurd
system that is more like a Debian/Linux system. For example /dev/shm
and /run ,/* are connected to a tmpfs translator. I think this is
a rather encouraging first result. I added my findings to the list of
open issues.
Another nice thing about hurdtest is that it is not even Hurd
specific (only a tiny bit GNU Mach specific). I'm going to make it
work nicely with Debian/Linux and Debian/kFreeBSD, since this is a
very handy tool for anyone hacking on the Debian boot process (and
with some changes for any OS). If anyone tries it out, I'd love to get
feedback and patches.
The tool requires the guest to be configured to use the first serial
console for grub, the kernel and the userspace. The password for the
user root must be empty. The guest has to have a working network
connection setup at boot time. I will provide a suitable image as soon
as I devise a good way to zero-fill the free space on the virtual
disk. Is there any better way than to fill the disk with a huge file
containing zeros? Without doing that the image is too large even
compressed with xz.
So this was my first week working for Debian. Next week I will focus
on getting patches for the hurd and initscripts package in shape,
I need to add some functionality to the mount utility shipped with
the hurd package. It provides a mount-like experience on the Hurd,
on which binding a translator (e. g. /hurd/ext2fs) to a filesystem
node is an operation that does not involve the kernel (GNU Mach) at
all, and is in fact a operation that any unprivileged user may
perform. That is one of the nice features the Hurd has, it empowers
its users.
If you re a Debian user, you are probably already familiar with some of the awesome icons for IceWeasel (rebranded Mozilla Firefox), IceDove (rebranded Mozilla Thunderbird) and IceApe (rebranded Mozilla SeaMonkey).
![]()
I was pretty ambivalent about the decision to rebrand Firefox until I saw some of proposed the IceWeasel icons which in my humble opinion were just too cute, and awesome, to pass up.
Until very recently however, IceOwl (rebranded Mozilla Sundbird) had no such awesome icon. Quite a while ago, I filed bug #658664 in Debian complaining that iceowl does not include awesome icy owl icons. I wrote:
I was extremely disappointed when I installed Iceowl and discovered that it does not ship with an awesome logo or icons showing a picture of an IceOwl. Instead, it seems to be represented by picture of a (boring) paper calendar which is very generic and not awesome at all. IceWeasel, IceDove, and IceApe each include extremely awesome logos/icons that have really cool looking white illustrations of icy weasels, doves, and apes. IceOwl needs a similarly awesome logo to use as its icon. This bug seems particularly egregious because owls actually live in icy climates and come in white versions! For example: https://commons.wikimedia.org/wiki/File:Snowy_Owl_-_Schnee-Eule.jpg While illustrators need to imagine what an ice ape or ice weasel might look like, there is no such need for imagination in the case of an ice owl! As far as I m concerned, this bug should be release critical. Hopefully, someone will upload a patch quickly!Finally, after many months of all of us suffering in silence, Nick Morrott came along and fixed the bug with the creation of this new, incredibly awesome, icy owl logo!
Today, she's introduced new laws in the parliament aiming to further bastardization of intelligent, skilled and educated workers and anybody who associates with them, including Australian employers.
Unwarranted attention on a minority of IT workers
This is not just some random bill before the parliament. There are just two weeks left before the parliament concludes and an election campaign begins. It is clear that what we are seeing now is the Real Julia coming though, choosing to make the small minority of foreign workers in our country at the center of people's thoughts as they go to vote in September.
A debt of gratitude to foreign workers
These verses from our national anthem, Advance Australia Fair say a lot about how Australia became what it is today:
For those who've come across the seasThe last 200 years of Australia's history has been a story of immigration. It is not something to be afraid of: our forefathers celebrated it. Foreign workers: why Australia needs you Australia has had some appalling flops in IT and engineering:
We've boundless plains to share;
With courage let us all combine
To Advance Australia Fair.
A Queensland pensioner made international headlines recently when he was caught sending bullets in the mail to the Prime Minister. His demands were clear: stop immigration.
While most world leaders refuse to let nutcases like this dictate their actions, Gillard appears to have been transcribing his racist letters directly into these newest immigration laws. It is a sad reality that Australian politics regularly seeks to appeal to the worst instincts in people like bullet man.
The ultimate political failure
When politicians stoop to the level of demonizing immigrants it is usually a clue that the politicians themselves are past their use-by dates and out of fresh policy ideas.
When former French president Sarkozy tried to play the racist card in his campaign for re-election, it bit him in the bum and he was swept from power by the socialists.
As always in politics, there is an element of hypocrisy at work: neither our Head of Government (the Prime Minister) nor our Head of State (the Queen) was born in Australia. Gillard was born in Wales and migrated to Australia as a child. If Australians don't vote for her in September, will she be given 28 days notice to pack her bags and go back home'?
From the frying pan and into the fire
The scariest thing is that if Australians see through this racist charade and refuse to vote for it, we could end up with something equally obnoxious: the other major political party is now gaining worldwide attention for their campaign linking gay marriage and homosexuals to bestiality.
Which prejudice is the lesser evil: racism or homophobia?
Recently, there's been discussions on IRC and the debian-devel mailing
list about how to notify users, typically from a cron script or a
system daemon needing to tell the user their hard drive is about to
expire. The current way is generally "send email to root" and for
some bits "pop up a notification bubble, hoping the user will see
it". Emailing me means I get far too many notifications. They're
often not actionable (apt-get update failed two days ago) and
they're not aggregated.
I think we need a system that at its core has level and edge triggers
and some way of doing flap detection. Level interrupts means "tell me
if a disk is full right now". Edge means "tell me if the checksums
have changed, even if they now look ok". Flap detection means "tell
me if the nightly apt-get update fails more often than once a week".
It would be useful if it could extrapolate some notifications too, so
it could tell me "your disk is going to be full in $period unless you
add more space".
The system needs to be able to take in input in a variety of formats:
syslog, unstructured output from cron scripts (including their exit
codes), snmp, nagios notifications, sockets and fifos and so on.
Based on those inputs and any correlations it can pull out of it, it
should try to reason about what's happening on the system. If the
conclusion there is "something is broken", it should see if it's
something that it can reasonably fix by itself. If so, fix it and
record it (so it can be used for notification if appropriate: I want
to be told if you restart apache every two minutes). If it can't fix
it, notify the admin.
It should also group similar messages so a single important message
doesn't drown in a million unimportant ones. Ideally, this should be
cross-host aggregation. The notifications should be possible to
escalate if they're not handled within some time period.
I'm not aware of such a tool. Maybe one could be rigged together by
careful application of logstash, nagios, munin/ganglia/something and
sentry. If anybody knows of such a tool, let me know, or if you're
working on one, also please let me know.
I found the following news item; if you can read Spanish, you will most probably prefer the original version in the Proceso magazine's site. The subject? The federal police (PGR) and army arrest 17 artisans for making money out of Spiderman.
The following translation is mine. Done past midnight, and being quite tired, and translated so this news item can reach a broader audience. All errors are mine (except those carried out by the security forces, that is).
June 13, 2013 Cuernavaca, Morelos. Policement from the General Republic Attorney (Procuradur a General de la Rep blica, PGR) and the Army entered and searched the "3 de mayo" neighbourhood, in the municipality of Emiliano Zapata, detaining 17 ceramist artisans that sold candies, dolls and pi atas shaped like Spiderman. This search was done on the evening of last Wednesday, around 16:00. Federal ministerial policement and army soldiers closed a street with several informal stores and detained workers taht were selling this Marvel Comics character, following said company's denounce. As a result for this operation, 17 artisants were detained, although the same day five of them were freed. The policemen also seized 12 bags of candies, pi atas, ceramics and wooden figures of the superhero. PGR closed down 11 stores where ceramics with this same figure was being sold, accusing the detainees of plagiarizing Spiderman's image, protected under the copyright law. The 12 that remained under detention were put at the Federal Justice's disposal, which prompted that this Thursday, around 10AM, hundreds of sellers of "3 de mayo" went out to PGR's building to demand their friends' freedom, who are facing a bail of up to 200,000 pesos (~USD$18,000). Outraged because they said they were treated as if they were part of a drug ring, hundreds of artisans closed intermitently Avenida Cuauhn huac, where the PGR representation in Morelos state is located. The artisans' pressure helped for the amount of the bail to be lowered from MX$200,000 to MX$16,000, and so they were set free. Francisco Fern ndez Flores, president of the Ceramists Association, criticized the operation because, he said, it was as strong as if they were "drug dealers". The artisans explained that they don't even make the Spiderman figures, they are made by the interns of the Centro Estatal de Reinserci n Social de Atlacholoaya (prision), located in the Xochitepec municipality, who offered them to the ceramists so they could be sold. "The Atlacholoaya inmates do them, we buy them to support them, and turns out we are the delinquents now", said Miriam Monroy, sister of one of the detainees. This information was contradicted by Jes s Valencia Valencia, responsible for Morelos' state prision system, who assured that in said prision no ceramics are done. Fern ndez Flores insisted though that from within the prision they are being offered pi atas, candies and "piggy banks" with Spiderman's shape. Jos Luis Pozo, vicepresident of the Ceramists Union, said that to avoid more such federal operations for copyright breaches, they have committed not to produce or commercialize Marvel superhero figures, and any other characters the authority demands. "We do commit to, from now on, those products singled out to us will not be commercialized", he said. Pozo said that the PGR operation caused losses not just to the detained producers and salesmen, but to over 200 ceramists that had to close their stores in solidarity with their friends. Acording to the artisans, the products were a success until the PGR came, seized the products and detained the salesmen.And yes, the copyright insanity does not stop. Spiderman is by today a clear part of popular culture. Marvel brilliantly succeeded in creating such a popular icon that everybody recognizes, that everybody identifies with And that everybody should be able to recreate. We are not talking about brand protection. Marvel does not, and will never, commercialize pi atas, ceramics or wooden toys. And even if they were plastic-cast While Spiderman is still under the protection of copyright, as the Berne Convention defines it (and of course, as the much stricter Mexican laws agree), that does not mean that any and every product resembling a Spiderman should be protected. Many ceramists and pi ata makers will create unique pieces of art Ok, handicraft. But reading the copyright law more strictly, Spiderman is more treated as a trademark than as a copyright. And it is a trademark that should be declared as having passed on to the public domain.
Recently, I ate at the somewhat famous London vegetarian restaurant Indian Veg Bhelpoori House in Islington (often referred to simply as Indian Veg ).
I couldn t help but imagine that the restaurant had hired Emanuel Bronner as their interior decorator.
Normally Skype isn't mentioned by name on this blog, but today I'm making an exception.
When a new scandal broke out in the Australian Army today, one of the first questions asked was how does it compare to the Skype Scandal which had everybody talking (and blushing) in 2011. A concise military reply direct from the General:
"I'd say it's worse than the Skype matter"
(the original Skype Scandal cadets are going on trial in six weeks)
Jedi Council brings cultural change in the Army: from Skype to email
Since the original scandal, there have been plenty of PR-orchestrated headlines about cultural change in the Army. Sadly, it seems that several ranking officers believed that was a cue to simply start using email instead of live feeds
Operating under the operational code name Jedi Council, they've apparently been swapping annotated images of female colleagues and members of the public service.
A more detailed account summarises it:
"They were calling themselves the Jedi Council but they were doing the exact opposite of what Jedis are supposed to do"
While the Skype scandal involved cadets behaving much like college kids elsewhere, this latest scandal involves the officer corp, the most senior officer implicated is allegedly a Lieutenant Colonel. Senior ranking officers like this have given many years of dedicated service to the country. They are widely respected and the vast majority of officers in these positions are unlikely to ever be implicated in such a scandal.
Officers are in leadership roles, it should be no surprise if they have top secret security clearances.
After the revelation that Australia has a direct and high-volume data sharing arrangement with the US Government (and in turn Facebook, Google, etc), there are all kinds of questions about whether a couple of rogue officers have access to pursue their private Jedi Council project using tools like PRISM and Boundless Informant. It's already been confirmed that they were keeping their own Jedi database of their victim's names, phone numbers, home addresses and various clothing measurements and if they are already emailing these photos about on Defence computers, does it seem improbable that they would be using PRISM or other sources to cross-reference their data?
Behavior described as systematic and predatory
It can't be ruled out that some defence computer systems may have direct access to NSA copies of images from those invasive airport body scanners - like these pictures that were not supposed to exist. Just like the British undercover cops stealing the identities of dead children and fully engaging with impressionable young women from environment campaign groups, there are a long list of possible abuses when the security state is over-empowered.
While this latest Army example involves private pursuits, it is not hard to imagine many other permutations: perhaps a couple of rogue Government employees making unauthorised use of PRISM data for a commercial objective and gaining the upper hand on private sector competitors who have no such data feed.
100% trust?
In every organisation there will always be a few people bending the rules. It's human nature, if it wasn't that way, we'd all be robots (or drones). The Army and the Catholic Church tend to be hammered a lot more in the public eye when these transgressions are discovered although statistically their crime rates are no higher than average. The bottom line is that no organisation is perfect and people have to take some responisbility to object to the excessive growth of the security state and keep our data to ourselves as you just never know who you can trust.
My hunch has just been exposed rather dramatically today: Top secret data center under construction to house all our secrets.
"There has been no discussion of the project in Senate estimates committee hearings, and the public reports of Parliament's joint committee on intelligence and security make no reference to it."
The news story also suggests that the relationship is bi-directional, with data harvested from Australian ISPs cross referenced against US databases from Facebook and Google.
From a human rights perspective, the implications of this data sharing are much more dramatic than the NSA just snooping on US citizens within the US. While Australia often tries to portray the image that it is a safe and happy country, it has a dark side. Police are kept busy investigating politicians and Government officials: Prime Minister and her associates connected to a union slush fund, the central bank's banknote printing agency's chief executive and 8 colleagues on conspiracy charges and even a senator on good old fashioned shoplifting and assault charges
Exporting PRISM data to a human rights backwater
As an Australian, my own rights and those of my family are more heavily protected and respected living in Europe than if I lived in my country of birth. Australia does not have a bill of rights like the US (where PRISM data is harvested) or the European Convention of Human Rights. Once US data is exported to Australia, it can be used to support sinister programs like the indefinite detention of coloured people in sinister desert camps. Just this week, the Government left over 50 bodies of poor refugees for the sharks to eat. For someone with such a lack of a conscience, can you imagine them thinking twice about using PRISM data for unscrupulous purposes?
Is US PRISM data at greater risk?
Despite the stench of corruption and lip service to human rights, is there any hard evidence that PRISM data will be at greater risk if allowed into the hands of Australians?
Death by SMS
One former Australian official (having dual-citizenship with Sri Lanka) is accused of facilitating war crimes in the Sri Lankan civil war. At present he is Sri Lanka's ambassador at the UN, giving him the benefit of diplomatic immunity. When he was working for Australia, how much data did he have access to? Isn't it ludicrous that in the name of stopping terrorism, data may have been collected and handed to war criminals on a silver platter?
Behind enemy lines
Like James Bond in reverse, an Australian official was exposed unofficially engaging in a relationship with a Vietnamese spy colonel. In addition to the $20 million in bribery to win a bank note printing contract, is data being used as a tool to leverage trade negotiations, officially or otherwise? If an Australian official with top-secret clearance ends up under the control of a foreign agent, what is the risk that they would be exploited to obtain PRISM data?
Defence minister resignation in Chinese spy scandal
In 2009 Australia's defence minister was identified having close links to a Chinese-Australian business woman including all the usual little luxuries: first class flights, apartment rental and joint business deals with family members. He subsequently resigned. Little details were made public. How much PRISM data was directly available to political officials like the defence minister?
Disappearing Prime Ministers
The disappearance of a serving Prime Minister, Harold Holt, during the cold war remains an unsolved mystery to this day. People continue to ask was he swept out to sea or voluntarily whisked away in a Chinese or Soviet nuclear submarine. While Australia has traditionally had strong ties to Britain and the US, there have been exceptions to the rule. Fortunately this all happened before PRISM and Harold Holt red submarine rumours are no more well-founded than the UFO theories of his abduction.
Where did all the data go?
As the music industry has found out the hard way, digital data can be copied at will with the originator having no control.
The revelations that Britain and Australia are in on the PRISM shenanigans only confirms that this data is seen as a new form of currency for exchange in geo-political posturing. While used weapons take decades to work their way down the chain, data can spread at the speed of light.
Migrating a Debian installation between architectures has always been difficult. The recommended way to
crossgrade an i386 Debian to amd64 Debian was to reinstall the system, move over data and configuration.
For the more brave, in-place crossgrades usually involved chroots, rescue CDs, a lot of ar p tar xf - data.tar.gz and
luck.
I have never been brave when it comes to system administration, have done a lot of architecture migrations with
reinstallation, and have always taken the opportunity to clear out the contamination that accumulates itself when a
system is running for a long time. I would even recommend doing this to most people even now. However, I have a few very
ugly systems in place that are still on i386 because I didn t dare going the reinstallation path.
Doing in-place crossgrades has become a lot easier since wheezy s release, since once now can have both i386 and
amd64 libraries installed in parallel, which allows to replace foo:i386 with foo:amd64 without influencing the other
parts of the system. The process is still full of pitfalls:
So we have an i386 system running an x86_64 kernel. Next, we add amd64 as an additional architecture which allows us to install amd64 packages. We download the amd64 packages files. Note that dpkg still considers this an i386 system with amd64 as a foreign arch.mh@swivel:~$ ssh wheezyarch.zugschlus.de $ uname -a Linux wheezyarch 3.9.4-zgsrv2008064 #2 SMP PREEMPT Wed Jun 5 12:57:51 UTC 2013 x86_64 GNU/Linux $ dpkg --print-architecture i386 $ dpkg --print-foreign-architectures $ dpkg --list grep i386 wc -l 175 $ dpkg --list grep amd64 wc -l 0 $ sudo dpkg --get-selections grep install awk print $1 sed s/:.*//;s/$/:amd64 install/; > get-selections.pre
Next, download everything that is necessary to migrate dpkg and apt from i386 and amd64. We cannot directly apt things as the remove-install cycle used by apt will leave us without working dpkg. One could work around this by un-aring the dpkg.deb and directly forcing the amd64 files upon the system, but I think this approach is much cleaner. apt-get download will not resolve dependices while apt-get --download install does. After the download, dpkg --install the packages. dpkg is not particularly smart about installation order, so Pre-Depends may fail or not. If they fail, dpkg will give a list of deb files that were affected, which is an easy help to finish their installation. One could also choose the easy way (which I did here) and repeat the dpkg --install *.deb command. Since the Pre-Depends will already be installed, the second install run will succeed.$ sudo dpkg --add-architecture amd64 $ sudo apt-get update Get:1 http://security.debian.org wheezy/updates Release.gpg [836 B] ( ) Fetched 6.155 kB in 4s (1.400 kB/s) Reading package lists... Done $ dpkg --print-architecture i386 $ dpkg --print-foreign-architectures amd64 $ dpkg --list grep i386 wc -l 175 $ dpkg --list grep amd64 wc -l 0
From dpkg s point of view, the system is now already amd64, with i386 being a foreign arch. However, the majory of packages is still i386.$ sudo apt-get --download-only install dpkg:amd64 apt:amd64 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: gcc-4.7-base:amd64 libapt-pkg4.12:amd64 libbz2-1.0:amd64 libc6:amd64 libgcc1:amd64 liblzma5:amd64 libselinux1:amd64 libstdc++6:amd64 zlib1g:amd64 Suggested packages: aptitude:amd64 synaptic:amd64 wajig:amd64 dpkg-dev:amd64 apt-doc:amd64 python-apt:amd64 glibc-doc:amd64 locales:amd64 The following packages will be REMOVED: apt cron-apt dpkg The following NEW packages will be installed: apt:amd64 dpkg:amd64 gcc-4.7-base:amd64 libapt-pkg4.12:amd64 libbz2-1.0:amd64 libc6:amd64 libgcc1:amd64 liblzma5:amd64 libselinux1:amd64 libstdc++6:amd64 zlib1g:amd64 0 upgraded, 11 newly installed, 3 to remove and 0 not upgraded. Need to get 10,0 MB of archives. After this operation, 14,9 MB of additional disk space will be used. Do you want to continue [Y/n]? Get:1 http://debian.debian.zugschlus.de/debian/ wheezy/main gcc-4.7-base amd64 4.7.2-5 [144 kB] ( ) Fetched 10,0 MB in 2s (3.535 kB/s) Download complete and in download only mode $ sudo dpkg --install /var/cache/apt/archives/*.deb (Reading database ... 16586 files and directories currently installed.) Preparing to replace apt 0.9.7.8 (using .../archives/apt_0.9.7.8_amd64.deb) ... Unpacking replacement apt ... dpkg: regarding .../dpkg_1.16.10_amd64.deb containing dpkg, pre-dependency problem: dpkg pre-depends on libbz2-1.0 dpkg: error processing /var/cache/apt/archives/dpkg_1.16.10_amd64.deb (--install): pre-dependency problem - not installing dpkg Selecting previously unselected package gcc-4.7-base:amd64. ( ) Errors were encountered while processing: /var/cache/apt/archives/dpkg_1.16.10_amd64.deb $ sudo dpkg --install /var/cache/apt/archives/*.deb (Reading database ... 16905 files and directories currently installed.) Preparing to replace apt 0.9.7.8 (using .../archives/apt_0.9.7.8_amd64.deb) ... Unpacking replacement apt ... ( ) $
The apt resolver is currently in a very bad broken state since the system is missing most essential packages in its native architecture. This is not easily solved by apt-get -f install, as this would zap most of the existing system . We let apt-get --download-only -f install download the packages that it wants to replace with its amd64 counterparts and their dependencies, and, again, use dpkg --install *.deb to install them.$ dpkg --print-architecture amd64 $ dpkg --print-foreign-architectures i386 $ dpkg --list grep i386 wc -l 173 $ dpkg --list grep amd64 wc -l 11 $
The concluding apt-get clean prevents packages from being reinstalled again in the next dpkg --install *.deb run. Now, the apt resolver is kind of fixed, but apt will still want to remove most of the system. I haven t found a way to get out of this mess short of allowing apt to de-install those packages and to manually install their amd64 counterparts later. First, we see what apt wants to do, and paste the The following packages will be removed part of apt-get s output into a sed expression which fixes the architecture strings for us so that we can use the resulting file as input for the following installation procedure. After that, we let apt-get do what itself considers a bad thing and requires us to type a consent sentence. The key is that this deinstallation of essential packages breaks the system, but not apt and dpkg, which allows us to un-break the system afterwards.$ sudo apt-get --download-only -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: cpio gettext-base:i386 klibc-utils libapt-inst1.5 libasprintf0c2:i386 libcurl3-gnutls:i386 libfreetype6:i386 libfuse2:i386 libklibc libreadline5:i386 Use apt-get autoremove to remove them. The following extra packages will be installed: acpid aide bsd-mailx cpio cron curl daemon dctrl-tools exim4-base exim4-daemon-light initscripts insserv kbd klibc-utils less libbsd0 libcomerr2 libcurl3 libdb5.1 libexpat1 libgcrypt11 libgdbm3 libgnutls26 libgpg-error0 libgssapi-krb5-2 libidn11 libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-3 libkrb5support0 libldap-2.4-2 liblockfile1 libncursesw5 libnewt0.52 libp11-kit0 libpam-modules libpam0g libpcre3 libpopt0 libreadline6 librtmp0 libsasl2-2 libslang2 libsqlite3-0 libssh2-1 libssl1.0.0 libtasn1-3 libterm-readkey-perl libtinfo5 openssl perl perl-base python2.7 python2.7-minimal sysvinit-utils whiptail Suggested packages: libarchive1 anacron logrotate checksecurity debtags mail-reader eximon4 exim4-doc-html exim4-doc-info spf-tools-perl swaks bootchart2 rng-tools krb5-doc krb5-user libpam-doc perl-doc make python2.7-doc binutils binfmt-support bootlogd sash Recommended packages: exim4 postfix mail-transport-agent psmisc mailx ca-certificates krb5-locales libgpm2 libfribidi0 libsasl2-modules libpng12-0 The following packages will be REMOVED: acpid:i386 aide:i386 aptitude:i386 bsd-mailx:i386 cpio:i386 cron:i386 curl:i386 daemon:i386 dctrl-tools:i386 debsecan dmsetup:i386 e2fsprogs:i386 exim4-base:i386 exim4-daemon-light:i386 git:i386 grub-common:i386 grub-pc:i386 grub-pc-bin:i386 grub2-common:i386 ifupdown:i386 initramfs-tools initscripts:i386 insserv:i386 ippl:i386 jed:i386 kbd:i386 klibc-utils:i386 less:i386 libdevmapper-event1.02.1:i386 libdevmapper1.02.1:i386 libklibc:i386 libnewt0.52:i386 libparted0debian1:i386 libterm-readkey-perl:i386 lsof:i386 lvm2:i386 molly-guard ntp:i386 openssh-server:i386 openssl:i386 parted:i386 perl:i386 perl-base:i386 procps:i386 python-apt:i386 python2.7:i386 python2.7-minimal:i386 rsyslog:i386 sysvinit:i386 sysvinit-utils:i386 udev:i386 util-linux:i386 whiptail:i386 The following NEW packages will be installed: acpid aide bsd-mailx cpio cron curl daemon dctrl-tools exim4-base exim4-daemon-light initscripts insserv kbd klibc-utils less libbsd0 libcomerr2 libcurl3 libdb5.1 libexpat1 libgcrypt11 libgdbm3 libgnutls26 libgpg-error0 libgssapi-krb5-2 libidn11 libk5crypto3 libkeyutils1 libklibc libkmod2 libkrb5-3 libkrb5support0 libldap-2.4-2 liblockfile1 libncursesw5 libnewt0.52 libp11-kit0 libpam-modules libpam0g libpcre3 libpopt0 libreadline6 librtmp0 libsasl2-2 libslang2 libsqlite3-0 libssh2-1 libssl1.0.0 libtasn1-3 libterm-readkey-perl libtinfo5 openssl perl perl-base python2.7 python2.7-minimal sysvinit-utils whiptail 0 upgraded, 58 newly installed, 53 to remove and 0 not upgraded. Need to get 23,4 MB of archives. After this operation, 17,5 MB disk space will be freed. Do you want to continue [Y/n]? Y Get:1 http://security.debian.org/debian-security/ wheezy/updates/main libgnutls26 amd64 2.12.20-7 [619 kB] ( ) Fetched 23,4 MB in 11s (2.038 kB/s) Download complete and in download only mode $ sudo dpkg --install /var/cache/apt/archives/*.deb (Reading database ... 16905 files and directories currently installed.) Preparing to replace acpid 1:2.0.16-1+deb7u1 (using .../acpid_1%3a2.0.16-1+deb7u1_amd64.deb) ... ( ) Selecting previously unselected package libpam-modules:amd64. dpkg: regarding .../libpam-modules_1.1.3-7.1_amd64.deb containing libpam-modules:amd64, pre-dependency problem: libpam-modules pre-depends on libdb5.1 libdb5.1:amd64 is unpacked, but has never been configured. dpkg: error processing /var/cache/apt/archives/libpam-modules_1.1.3-7.1_amd64.deb (--install): pre-dependency problem - not installing libpam-modules:amd64 Selecting previously unselected package libpcre3:amd64. Unpacking libpcre3:amd64 (from .../libpcre3_1%3a8.30-5_amd64.deb) ... ( ) Errors were encountered while processing: /var/cache/apt/archives/libpam-modules_1.1.3-7.1_amd64.deb $ sudo dpkg --install /var/cache/apt/archives/libpam-modules_1.1.3-7.1_amd64.deb (Reading database ... 17007 files and directories currently installed.) Unpacking libpam-modules:amd64 (from .../libpam-modules_1.1.3-7.1_amd64.deb) ... Setting up libpam-modules:amd64 (1.1.3-7.1) ... $ sudo apt-get clean $ dpkg --print-architecture amd64 $ dpkg --print-foreign-architectures i386 $ dpkg --list grep i386 wc -l 151 $ dpkg --list grep amd64 wc -l 66 $
This process may re-ask some debconf questions that you have already answered during initial system setup. I find it comforting to actually see that my answers were preserved, but you can always export DEBIAN_FRONTEND=noninteractive if you want installation to be silent. If you know how this step can be done more elegantly, please comment. We now, finally, have the resolver in a consistent state.$ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: gettext-base:i386 libapt-inst1.5 libasprintf0c2:i386 libcurl3-gnutls:i386 libfreetype6:i386 libfuse2:i386 libreadline5:i386 Use apt-get autoremove to remove them. The following extra packages will be installed: sysvinit-utils:i386 Suggested packages: bootlogd:i386 sash:i386 The following packages will be REMOVED: adduser aide-common aptitude:i386 bsd-mailx console-common console-data console-log cron curl debian-goodies debsecan dmsetup:i386 e2fsprogs:i386 exim4-base exim4-config exim4-daemon-light git:i386 grub-common:i386 grub-pc:i386 grub-pc-bin:i386 grub2-common:i386 ifupdown:i386 initramfs-tools initscripts ippl:i386 jed:i386 libcurl3 libdevmapper-event1.02.1:i386 libdevmapper1.02.1:i386 liberror-perl libfile-find-rule-perl libnumber-compare-perl libparted0debian1:i386 libswitch-perl libterm-readkey-perl libterm-readline-perl-perl libtext-glob-perl libtimedate-perl locales lsof:i386 lvm2:i386 molly-guard ntp:i386 openssh-client:i386 openssh-server:i386 openssl openssl-blacklist openssl-blacklist-extra parted:i386 perl perl-modules procps:i386 python-apt:i386 rsyslog:i386 stow sysv-rc sysvinit:i386 sysvinit-utils tzdata ucf udev:i386 util-linux:i386 The following NEW packages will be installed: sysvinit-utils:i386 WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! e2fsprogs:i386 util-linux:i386 (due to e2fsprogs:i386) sysvinit:i386 sysvinit-utils tzdata (due to util-linux:i386) 0 upgraded, 1 newly installed, 62 to remove and 0 not upgraded. Need to get 97,1 kB of archives. After this operation, 131 MB disk space will be freed. You are about to do something potentially harmful. To continue type in the phrase Yes, do as I say! ? (abort with Ctrl-C) $ sed s/:i386//g > removedpkg (paste The following packages will be REMOVED: stanza here and type Ctrl-D afterwards) adduser aide-common aptitude:i386 bsd-mailx console-common console-data console-log cron curl debian-goodies debsecan dmsetup:i386 e2fsprogs:i386 exim4-base exim4-config exim4-daemon-light git:i386 grub-common:i386 grub-pc:i386 grub-pc-bin:i386 grub2-common:i386 ifupdown:i386 initramfs-tools initscripts ippl:i386 jed:i386 libcurl3 libdevmapper-event1.02.1:i386 libdevmapper1.02.1:i386 liberror-perl libfile-find-rule-perl libnumber-compare-perl libparted0debian1:i386 libswitch-perl libterm-readkey-perl libterm-readline-perl-perl libtext-glob-perl libtimedate-perl locales lsof:i386 lvm2:i386 molly-guard ntp:i386 openssh-client:i386 openssh-server:i386 openssl openssl-blacklist openssl-blacklist-extra parted:i386 perl perl-modules procps:i386 python-apt:i386 rsyslog:i386 stow sysv-rc sysvinit:i386 sysvinit-utils tzdata ucf udev:i386 util-linux:i386 $ cat removedpkg adduser aide-common aptitude bsd-mailx console-common console-data console-log cron curl debian-goodies debsecan dmsetup e2fsprogs exim4-base exim4-config exim4-daemon-light git grub-common grub-pc grub-pc-bin grub2-common ifupdown initramfs-tools initscripts ippl jed libcurl3 libdevmapper-event1.02.1 libdevmapper1.02.1 liberror-perl libfile-find-rule-perl libnumber-compare-perl libparted0debian1 libswitch-perl libterm-readkey-perl libterm-readline-perl-perl libtext-glob-perl libtimedate-perl locales lsof lvm2 molly-guard ntp openssh-client openssh-server openssl openssl-blacklist openssl-blacklist-extra parted perl perl-modules procps python-apt rsyslog stow sysv-rc sysvinit sysvinit-utils tzdata ucf udev util-linux $ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: gettext-base:i386 libapt-inst1.5 libasprintf0c2:i386 libcurl3-gnutls:i386 libfreetype6:i386 libfuse2:i386 libreadline5:i386 Use apt-get autoremove to remove them. The following extra packages will be installed: sysvinit-utils:i386 Suggested packages: bootlogd:i386 sash:i386 The following packages will be REMOVED: adduser aide-common aptitude:i386 bsd-mailx console-common console-data console-log cron curl debian-goodies debsecan dmsetup:i386 e2fsprogs:i386 exim4-base exim4-config exim4-daemon-light git:i386 grub-common:i386 grub-pc:i386 grub-pc-bin:i386 grub2-common:i386 ifupdown:i386 initramfs-tools initscripts ippl:i386 jed:i386 libcurl3 libdevmapper-event1.02.1:i386 libdevmapper1.02.1:i386 liberror-perl libfile-find-rule-perl libnumber-compare-perl libparted0debian1:i386 libswitch-perl libterm-readkey-perl libterm-readline-perl-perl libtext-glob-perl libtimedate-perl locales lsof:i386 lvm2:i386 molly-guard ntp:i386 openssh-client:i386 openssh-server:i386 openssl openssl-blacklist openssl-blacklist-extra parted:i386 perl perl-modules procps:i386 python-apt:i386 rsyslog:i386 stow sysv-rc sysvinit:i386 sysvinit-utils tzdata ucf udev:i386 util-linux:i386 The following NEW packages will be installed: sysvinit-utils:i386 WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! e2fsprogs:i386 util-linux:i386 (due to e2fsprogs:i386) sysvinit:i386 sysvinit-utils tzdata (due to util-linux:i386) 0 upgraded, 1 newly installed, 62 to remove and 0 not upgraded. Need to get 97,1 kB of archives. After this operation, 131 MB disk space will be freed. You are about to do something potentially harmful. To continue type in the phrase Yes, do as I say! ?] Yes, do as I say! (actually type this!) Get:1 http://debian.debian.zugschlus.de/debian/ wheezy/main sysvinit-utils i386 2.88dsf-41 [97,1 kB] Fetched 97,1 kB in 0s (687 kB/s) (Reading database ... 17050 files and directories currently installed.) Removing aide-common ... ( ) dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. Removing e2fsprogs ... Removing sysv-rc ... dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. Removing sysvinit ... dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. Removing sysvinit-utils ... dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. Removing ucf ... dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. Removing libdevmapper1.02.1:i386 ... Removing libswitch-perl ... Removing perl ... dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. Removing dmsetup ... Removing perl-modules ... dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. Removing util-linux ... Removing tzdata ... Processing triggers for mime-support ... Selecting previously unselected package sysvinit-utils. (Reading database ... 9802 files and directories currently installed.) Unpacking sysvinit-utils (from .../sysvinit-utils_2.88dsf-41_i386.deb) ... Setting up sysvinit-utils (2.88dsf-41) ... $ sudo apt-get install $(cat removedpkg) Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libasprintf0c2:i386 libcurl3-gnutls:i386 libfreetype6:i386 libfuse2:i386 libreadline5:i386 Use apt-get autoremove to remove them. The following extra packages will be installed: e2fslibs gettext-base libapt-inst1.5 libasprintf0c2 libattr1 libblkid1 libboost-iostreams1.49.0 libcap2 libcurl3-gnutls libcwidget3 libedit2 libept1.4.12 libfreetype6 libfuse2 libgpm2 libncurses5 libopts25 libprocps0 libreadline5 libsepol1 libsigc++-2.0-0c2a libss2 libudev0 libuuid1 libwrap0 libxapian22 logrotate Suggested packages: liblocale-gettext-perl tasksel debtags unicode-data anacron checksecurity popularity-contest xdg-utils zenity gpart e2fsck-static mail-reader eximon4 exim4-doc-html exim4-doc-info spf-tools-perl swaks git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn git-email git-gui gitk gitweb multiboot-doc grub-emu xorriso desktop-base isc-dhcp-client dhcp-client ppp rdnssd net-tools gpm libcwidget-dev fuse libparted0-dev libparted0-i18n xapian-tools ntp-doc ssh-askpass libpam-ssh keychain monkeysphere rssh ufw parted-doc perl-doc make libpod-plainer-perl python-apt-dbg python-gtk2 python-vte python-apt-doc rsyslog-mysql rsyslog-pgsql rsyslog-doc rsyslog-gnutls rsyslog-gssapi rsyslog-relp doc-base sysv-rc-conf bum bootlogd sash util-linux-locales dosfstools Recommended packages: aptitude-doc-en aptitude-doc apt-xapian-index libparse-debianchangelog-perl exim4 postfix mail-transport-agent psmisc mailx patch rsync ssh-client os-prober busybox busybox-initramfs busybox-static ca-certificates uuid-runtime xauth ncurses-term iso-codes usbutils The following packages will be REMOVED: gettext-base:i386 libboost-iostreams1.49.0:i386 libcwidget3:i386 libept1.4.12:i386 libopts25:i386 libxapian22:i386 logrotate:i386 sysvinit-utils:i386 The following NEW packages will be installed: adduser aide-common aptitude bsd-mailx console-common console-data console-log cron curl debian-goodies debsecan dmsetup e2fslibs e2fsprogs exim4-base exim4-config exim4-daemon-light gettext-base git grub-common grub-pc grub-pc-bin grub2-common ifupdown initramfs-tools initscripts ippl jed libapt-inst1.5 libasprintf0c2 libattr1 libblkid1 libboost-iostreams1.49.0 libcap2 libcurl3 libcurl3-gnutls libcwidget3 libdevmapper-event1.02.1 libdevmapper1.02.1 libedit2 libept1.4.12 liberror-perl libfile-find-rule-perl libfreetype6 libfuse2 libgpm2 libncurses5 libnumber-compare-perl libopts25 libparted0debian1 libprocps0 libreadline5 libsepol1 libsigc++-2.0-0c2a libss2 libswitch-perl libterm-readkey-perl libterm-readline-perl-perl libtext-glob-perl libtimedate-perl libudev0 libuuid1 libwrap0 libxapian22 locales logrotate lsof lvm2 molly-guard ntp openssh-client openssh-server openssl openssl-blacklist openssl-blacklist-extra parted perl perl-modules procps python-apt rsyslog stow sysv-rc sysvinit sysvinit-utils tzdata ucf udev util-linux WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! sysvinit-utils:i386 0 upgraded, 89 newly installed, 8 to remove and 0 not upgraded. Need to get 55.3 MB of archives. After this operation, 134 MB of additional disk space will be used. You are about to do something potentially harmful. To continue type in the phrase Yes, do as I say! ?] Yes, do as I say! (actually type this!) Get:1 http://debian.debian.zugschlus.de/debian/ wheezy/main e2fslibs amd64 1.42.5-1.1 [197 kB] ( ) Fetched 55.3 MB in 20s (2648 kB/s) perl: warning: Setting locale failed. ( )
Now we can force-crossgrade all i386 packages that are still left on the system. Again, we use the apt-get --download install, dpkg --install stunt as coreutils gets crossgraded at this step and dpkg is less than happy if it finds itself without /bin/rm. Remember, with --download, nothing is actually removed during this step even if apt-get claims to remove things. Apt will also complain that many of these packages are already installed. Those are libs that were pulled in previously. The first dpkg --install run in this step will complain about gazillions of dependency problems, which will all be resolved in concluding apt-get -f install after the second dpkg --install run, this time a manual one.$ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libasprintf0c2:i386 libcurl3-gnutls:i386 libfreetype6:i386 libfuse2:i386 libreadline5:i386 Use apt-get autoremove to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. $ dpkg --print-architecture amd64 $ dpkg --print-foreign-architectures i386 $ dpkg --list grep i386 wc -l 121 $ dpkg --list grep amd64 wc -l 119 $
We have completed the actual crossgrade. All non-multiarch packages are now amd64. The resolver is now fine as well. At this current state, all i386 packages that are still installed should be unneeded libs. We can safely nuke them. Careful minds may inspect the list of packages to be removed for important or non-lib items. After completion of the command, a second call of the same command verifies that we were successful.$ sudo apt-get --download-only install $(dpkg --list awk if( $1 == ii && $4 == i386 ) print $2 sed s/:i386// ) Reading package lists... Done Building dependency tree Reading state information... Done ( ) The following packages were automatically installed and are no longer required: libasprintf0c2:i386 libcurl3-gnutls:i386 libfreetype6:i386 libfuse2:i386 libreadline5:i386 Use apt-get autoremove to remove them. Suggested packages: powermgmt-base bash-doc bzip2-doc diffutils-doc wdiff mlocate locate gnupg-doc xloadimage imagemagick eog libpcsclite1 iproute-doc resolvconf avahi-autoipd nfs-common ncompress indent Recommended packages: bsdmainutils gnupg-curl libatm1 The following packages will be REMOVED: anacron:i386 apt-utils:i386 base-files:i386 base-passwd:i386 bash:i386 ( ) The following NEW packages will be installed: anacron apt-utils base-files base-passwd bash bsdutils busybox bzip2 ( ) 0 upgraded, 56 newly installed, 49 to remove and 0 not upgraded. Need to get 24,1 MB of archives. After this operation, 2.030 kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://debian.debian.zugschlus.de/debian/ wheezy/main kmod amd64 9-3 [60,5 kB] ( ) Fetched 24,1 MB in 11s (2.120 kB/s) Download complete and in download only mode $ sudo dpkg --install /var/cache/apt/archives/*.deb (Reading database ... 17098 files and directories currently installed.) Preparing to replace adduser 3.113+nmu3 (using .../adduser_3.113+nmu3_all.deb) ... Unpacking replacement adduser ... ( ) Errors were encountered while processing: /var/cache/apt/archives/bash_4.2+dfsg-0.1_amd64.deb /var/cache/apt/archives/coreutils_8.13-3.5_amd64.deb initscripts lvm2 procps rsyslog sysvinit sysv-rc udev util-linux aide-common dmsetup e2fsprogs ifupdown initramfs-tools libdevmapper1.02.1:amd64 libdevmapper-event1.02.1:amd64 libparted0debian1:amd64 molly-guard openssh-server parted grub-common grub-pc grub-pc-bin grub2-common $ sudo dpkg --install /var/cache/apt/archives/bash_4.2+dfsg-0.1_amd64.deb /var/cache/apt/archives/coreutils_8.13-3.5_amd64.deb (Reading database ... 17129 files and directories currently installed.) Preparing to replace bash 4.2+dfsg-0.1 (using .../bash_4.2+dfsg-0.1_amd64.deb) ... Unpacking replacement bash ... Preparing to replace coreutils 8.13-3.5 (using .../coreutils_8.13-3.5_amd64.deb) ... Unpacking replacement coreutils ... Setting up bash (4.2+dfsg-0.1) ... update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode Setting up coreutils (8.13-3.5) ... $ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: libasprintf0c2:i386 libcurl3-gnutls:i386 libfreetype6:i386 libfuse2:i386 libreadline5:i386 Use apt-get autoremove to remove them. The following extra packages will be installed: sysvinit-utils Suggested packages: bootlogd sash The following packages will be REMOVED: libslang2-modules:i386 sysvinit-utils:i386 The following NEW packages will be installed: sysvinit-utils WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! sysvinit-utils:i386 0 upgraded, 1 newly installed, 2 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/99,5 kB of archives. After this operation, 328 kB disk space will be freed. You are about to do something potentially harmful. To continue type in the phrase Yes, do as I say! ?] Yes, do as I say! (actually type this!) dpkg: warning: overriding problem because --force enabled: This is an essential package - it should not be removed. (Reading database ... 17129 files and directories currently installed.) Removing sysvinit-utils ... Selecting previously unselected package sysvinit-utils. (Reading database ... 17105 files and directories currently installed.) Unpacking sysvinit-utils (from .../sysvinit-utils_2.88dsf-41_amd64.deb) ... Setting up sysvinit-utils (2.88dsf-41) ... Setting up sysv-rc (2.88dsf-41) ... Setting up initscripts (2.88dsf-41) ... Setting up util-linux (2.20.1-5.3) ... Setting up e2fsprogs (1.42.5-1.1) ... Setting up sysvinit (2.88dsf-41) ... sysvinit: restarting... done. (Reading database ... 17129 files and directories currently installed.) Removing libslang2-modules:i386 ... Setting up ifupdown (0.7.8) ... Setting up procps (1:3.3.3-3) ... [ ok ] Setting kernel variables ... /etc/sysctl.conf...done. Setting up udev (175-7.2) ... [ ok ] Stopping the hotplug events dispatcher: udevd. [ ok ] Starting the hotplug events dispatcher: udevd. update-initramfs: deferring update (trigger activated) Setting up rsyslog (5.8.11-3) ... [ ok ] Stopping enhanced syslogd: rsyslogd. [ ok ] Starting enhanced syslogd: rsyslogd. Setting up aide-common (0.15.1-8) ... Setting up initramfs-tools (0.109.1) ... update-initramfs: deferring update (trigger activated) Setting up openssh-server (1:6.0p1-4) ... [ ok ] Restarting OpenBSD Secure Shell server: sshd. Setting up molly-guard (0.4.5-1) ... Setting up libdevmapper1.02.1:amd64 (2:1.02.74-7) ... Setting up libdevmapper-event1.02.1:amd64 (2:1.02.74-7) ... Setting up libparted0debian1:amd64 (2.3-12) ... Setting up grub-common (1.99-27+deb7u1) ... Setting up grub2-common (1.99-27+deb7u1) ... Setting up grub-pc-bin (1.99-27+deb7u1) ... Setting up grub-pc (1.99-27+deb7u1) ... Installation finished. No error reported. Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.9.4-zgsrv2008064 Found initrd image: /boot/initrd.img-3.9.4-zgsrv2008064 done Setting up parted (2.3-12) ... Setting up dmsetup (2:1.02.74-7) ... update-initramfs: deferring update (trigger activated) Setting up lvm2 (2.02.95-7) ... [ ok ] Setting up LVM Volume Groups...done. update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools ... update-initramfs: Generating /boot/initrd.img-3.9.4-zgsrv2008064 Found 12 processes using old versions of upgraded files ( ) $ sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libasprintf0c2:i386 libcurl3-gnutls:i386 libfreetype6:i386 libfuse2:i386 libreadline5:i386 Use apt-get autoremove to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. $ dpkg --print-architecture amd64 $ dpkg --print-foreign-architectures i386 $ dpkg --list grep i386 wc -l 72 $ dpkg --list grep amd64 wc -l 175 $
To finally make the packages really vanish from the system, we purge all packages that dpkg --list still reports in state rc , which means removed, configuration still present . Thankfully, dpkg seems to handle the case where a dpkg-conffile belongs to a transitioned package gracefully.$ sudo apt-get remove $(dpkg --list awk if( $1 == ii && $4 == i386 ) print $2 ) Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: e2fslibs:i386 gcc-4.7-base:i386 libacl1:i386 libapt-inst1.5:i386 libapt-pkg4.12:i386 libasprintf0c2:i386 libattr1:i386 libblkid1:i386 libbsd0:i386 libbz2-1.0:i386 libc6:i386 libcap2:i386 libcomerr2:i386 libcurl3:i386 libcurl3-gnutls:i386 libdb5.1:i386 libedit2:i386 libexpat1:i386 libfreetype6:i386 libfuse2:i386 libgcc1:i386 libgcrypt11:i386 libgdbm3:i386 libgnutls26:i386 libgpg-error0:i386 libgpm2:i386 libgssapi-krb5-2:i386 libidn11:i386 libk5crypto3:i386 libkeyutils1:i386 libkmod2:i386 libkrb5-3:i386 libkrb5support0:i386 libldap-2.4-2:i386 liblockfile1:i386 liblzma5:i386 libmagic1:i386 libncurses5:i386 libncursesw5:i386 libp11-kit0:i386 libpam-modules:i386 libpam0g:i386 libpci3:i386 libpcre3:i386 libpng12-0:i386 libpopt0:i386 libprocps0:i386 libreadline5:i386 libreadline6:i386 librtmp0:i386 libsasl2-2:i386 libselinux1:i386 libsemanage1:i386 libsepol1:i386 libsigc++-2.0-0c2a:i386 libslang2:i386 libsqlite3-0:i386 libss2:i386 libssh2-1:i386 libssl1.0.0:i386 libstdc++6:i386 libtasn1-3:i386 libtinfo5:i386 libudev0:i386 libusb-0.1-4:i386 libustr-1.0-1:i386 libuuid1:i386 libwrap0:i386 linux-image-3.9.4-zgsrv2008064:i386 zlib1g:i386 0 upgraded, 0 newly installed, 70 to remove and 0 not upgraded. After this operation, 67,5 MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 17111 files and directories currently installed.) Removing e2fslibs:i386 ... ( ) $ sudo apt-get remove $(dpkg --list awk if( $1 == ii && $4 == i386 ) print $2 ) Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. $ dpkg --print-architecture amd64 $ dpkg --print-foreign-architectures i386 $ dpkg --list grep i386 wc -l 70 $ dpkg --list grep amd64 wc -l 175 $
We now verify that all packages we have are either arch all or arch amd64.$ sudo dpkg --purge $(dpkg --list awk if ($1 == rc ) print $2 ) (Reading database ... 15868 files and directories currently installed.) Removing e2fslibs:i386 ... Purging configuration files for e2fslibs:i386 ... ( ) $ dpkg --print-architecture amd64 $ dpkg --print-foreign-architectures i386 $ dpkg --list grep i386 wc -l 0 $ dpkg --list grep amd64 wc -l 175 $
As I found myself suddenly without e2fsprogs during one of my experiments, I check for e2fsprogs being present. If this package is missing, you ll only find out after rebooting.$ dpkg --list grep -v \(amd64 all\) Desired=Unknown/Install/Remove/Purge/Hold Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend / Err?=(none)/Reinst-required (Status,Err: uppercase=bad) / Name Version Architecture Description +++-===============================-=========================-============-========================================================================
My locally built amd64 kernel with 32 bit support was an arch i386 package as well, so it got zapped in the migration process. Replace it with a real amd64 kernel. This step will vary if you use Debian kernels. Do not forget the firmwares.$ dpkg --list e2fsprogs Desired=Unknown/Install/Remove/Purge/Hold Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend / Err?=(none)/Reinst-required (Status,Err: uppercase=bad) / Name Version Architecture Description +++-==============-============-============-================================= ii e2fsprogs 1.42.5-1.1 amd64 ext2/ext3/ext4 file system utilit
I now make sure that the initrd I have built contains all file system modules and is of the right architecture:$ sudo apt-get -t wheezy-zg-experimental install kernel-image-zgserver linux-firmware-image Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: cpio initramfs-tools kernel-image-zgsrv20080 klibc-utils libklibc linux-image-3.9.4-zgsrv20080 Suggested packages: libarchive1 The following NEW packages will be installed: cpio initramfs-tools kernel-image-zgserver kernel-image-zgsrv20080 klibc-utils libklibc linux-firmware-image linux-image-3.9.4-zgsrv20080 0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded. Need to get 11,2 MB of archives. After this operation, 30,5 MB of additional disk space will be used. Do you want to continue [Y/n]? Get:1 http://zg20110.debian.zugschlus.de/ wheezy-zg-experimental/main linux-image-3.9.4-zgsrv20080 amd64 3.9.4.20130605.0 [10,4 MB] ( )
As the last step, remove i386 as an architecture and reboot into the newly migrated system. We verify that the system considers itself amd64 with no foreign architectures.$ cd /tmp $ < /boot/initrd.img-3.9.4-zgsrv20080 gunzip cpio -i 32053 blocks $ find . -name *ext*.ko ./lib/modules/3.9.4-zgsrv20080/kernel/fs/ext3/ext3.ko ./lib/modules/3.9.4-zgsrv20080/kernel/fs/ext2/ext2.ko ./lib/modules/3.9.4-zgsrv20080/kernel/fs/ext4/ext4.ko $ file ./lib/modules/3.9.4-zgsrv20080/kernel/fs/ext4/ext4.ko ./lib/modules/3.9.4-zgsrv20080/kernel/fs/ext4/ext4.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), BuildID[sha1]=0x259a642448805c9597932ee25c62c8e6a00a32ad, not stripped $ cd
We now check whether we have lost any packages in this process:$ sudo dpkg --remove-architecture i386 $ dpkg --print-architecture amd64 $ $ dpkg --print-foreign-architectures $ dpkg --list grep i386 wc -l 0 $ dpkg --list grep amd64 wc -l 181 $ sudo shutdown -r now Broadcast message from root@wheezyarch (pts/0) (Wed Jun 12 16:09:24 2013): The system is going down for reboot NOW! $ Connection to wheezyarch.zugschlus.de closed by remote host. Connection to wheezyarch.zugschlus.de closed. $ ssh wheezyarch.zugschlus.de Linux wheezyarch 3.9.4-zgsrv20080 #2 SMP PREEMPT Wed Jun 5 13:12:04 UTC 2013 x86_64 $ dpkg --print-architecture amd64 $
So we have not actually lost things, but we have gained the pure amd64 kernel and the packages that are needed to build a proper initrd. These were missing from the initial install of the i386 test VM. The downside of the process is that we have lost most of the automatically installed markers in aptitude which make sure to remove a library once nothing depends on it any more. If you make a point in having those markers correctly set, as I do, this is tedious work to set it on every package in the aptitude curses interface, making aptitude suggest removing the entire system, and then again remove it from the packages you actually intend to keep. This should not result in anything being removed, otherwise you have goofed previously. All Done! I am now off perfecting my upgrade process so that the i386 lenny and squeeze machines can first be moved to wheezy and then to amd64.$ sudo dpkg --get-selections grep install awk print $1 sed s/:.*//;s/$/:amd64 install/; > get-selections.post $ wc -l get-selections.* 234 get-selections.post 226 get-selections.pre $ diff --unified=0 get-selections.pre get-selections.post --- get-selections.pre 2013-06-12 19:47:40.278176000 +0200 +++ get-selections.post 2013-06-12 20:28:51.389874000 +0200 @@ -22,0 +23 @@ +cpio:amd64 install @@ -58,0 +60 @@ +initramfs-tools:amd64 install @@ -68,0 +71,3 @@ +kernel-image-zgserver:amd64 install +kernel-image-zgsrv20080:amd64 install +klibc-utils:amd64 install @@ -108,0 +114 @@ +libklibc:amd64 install @@ -163,0 +170,2 @@ +linux-firmware-image:amd64 install +linux-image-3.9.4-zgsrv20080:amd64 install
DebConf13 is aiming to feature a half-day track on Free real-time communications with a focus on the way free operating systems, particularly Debian (and it's derivatives like Ubuntu) are fundamental to rolling out an alternative to the status quo.
Federated VoIP is also a confirmed feature of the upcoming Fedora 19 release and will eventually work it's way into EPEL. This is another great way for people who work in an RPM environment to start getting more active deploying SIP as a standard service in their environment.
The real-time communication (RTC) quick-start guide is currently being updated and will include a convenient web-checker to help people test their federated connectivity.
Can you help? Not sure where to begin?
Come and join us on the Free RTC discussion list that has been sponsored by the FSF Europe or join the discussion list of one of your favourite free RTC applications.
The left column, Urgent items, typically must be executed by a certain date (e.g. buying a gift before a birthday or installing a new SSL certificate before the old one expires). A security update or Acrobat reader update does not have this same characteristic. Under this model:
| Urgent | Non-urgent | |
|---|---|---|
| Important | Replace SSL certificate Buy birthday gift |
Security update Run backup job |
| Not important | Register for conference before deadline for free gift | Non-security update for Acrobat reader |
Australia's close ties with the US
Australia has had particularly close ties with the US for many years and just as the British GCHQ has been linked to PRISM, it seems Australia's ASIO is also in on the act. For those not familiar with the depth of this alliance, it is worth checking up on Pine Gap, the ECHELON program and the recent exposure (by Wikileaks) of one of our senators with unauthorised US spy connections - he quietly resigned for family reasons'.

For email extensions such as SPF, DKIM and DMARC, I think the most flexible and portable system is the milter protocol. Originally developed for Sendmail, it is now also supported by Postfix, and it allows to plug specific filters in the mail server without the hassle of the previous systems like SMTP proxies.
I ll be presenting Authoritative linked data descriptions of debian source packages using ADMS.SW at OSS 2013.
Here s the abstract :
The Debian Package Tracking System is a Web dashboard for Debian contributors and advanced users. This central tool publishes the status of subsequent releases of source packages in the Debian distribution. It has been improved to generate RDF meta-data documenting the source packages, their releases and links to other packaging artifacts, using the ADMS.SW 1.0 model. This constitutes an authoritative source of machine-readable Debian facts and proposes a reference URI naming scheme for Linked Data resources about Debian packages. This should enable the interlinking of these Debian package descriptions with other ADMS.SW or DOAP descriptions of FLOSS projects available on the Semantic Web also using Linked Data principles. This will be particularly interesting for traceability with upstream projects whose releases are packaged in Debian, derivative distributions reusing Debian source packages, or with other FLOSS distributions.If you are interested, a previous paper which describes the same experiment is available online. See also previous installments on ADMS.SW in this blog.
In a previous blog entry, I posed the question whether open source communications software is really free and came to the conclusion that additional principles need to be defined for free communications, above and beyond the normal expectations of free software.
This is a fundamental problem that projects like the FreedomBox, Lumicall and other privacy-enabling free communications solutions must be familiar with. Otherwise there is a risk that development will never end as there is no finish line in sight.
Practical solutions are not so easily defined though: so let's just imagine a perfect solution for a moment. Later, we can contemplate the trade-offs that are necessary to make it practical.
Perfect privacy
Here are some attributes that may exist for a perfect solution:
Privacy must be the default: the user should not have to explicitly request privacy. If there is a risk that an incoming communication will establish a session without full privacy, the user should be able to decline the opportunity to participate.
Only participants to a communication can receive the communication
A third party should not be able to replay, modify or forge any aspect of the communication or the request to initiate a session
Only participants to a communication are aware that a communication occurred
Only participants to the communication are aware of who participated in the communication
A participant may be anonymous: but in this case, all other participants will be aware that there is an anonymous party present in the communication
Participants may not deduce any information about the other participants that is not explicitly shared (e.g. location, type of device, service provider)
In the case of real-time communication, a participant may leave the communication without any other party even realising that they left or why.
Communication is off-the-record: No participant can save and reproduce a copy of the communication in such a way that a third-party will know it was authentic.
Anonymous reception of communications - the perfect post-office box: someone may create an anonymous identifier that allows other people to call them without being able to trace their location or identity
Some consequences of a perfect solution
Just imagine if all communications worked in this manner.
There are many potential consequences. For example, if you call somebody and the call is not connected, you will get no feedback about whether their line is busy, out of service or whether they deliberately chose to reject your call.
Another example is somebody who is driving while talking on a telephone. If they have an accident, there will be no way to prove that they were using the phone. This may already be the case if somebody uses a VoIP app on their phone - the police investigating the accident later will simply find no records of calls through the mobile phone account.
Conclusion
The perfect solution described here is something of a holy grail rather than a recipe that a developer can implement. It is unlikely that such a solution will fall out of the sky in the immediate future. Most software products that offer secure communications only address less than half the issues described above: for example, digital mobile phones prevent eavesdropping with arbitrary radio receivers, but they don't prevent shops detecting the IMEI (serial numbers) of phones that pass through their store and using that information to identify repeat visits to their store.
Completing the DRI3 Extension
This week marks a pretty significant milestone for the glorious
DRI3000 future. The first of the two new extensions is complete
and running both full Gnome and KDE desktops.
DRI3 Extension Overview
The DRI3 extension provides facilities for building direct rendering
libraries to work with the X window system. DRI3 provides three basic
mechanisms:
DRI3Open
drawable: DRAWABLE
driverType: DRI3DRIVER
provider: PROVIDER
nfd: CARD8
driver: STRING
device: FD
Errors: Drawable, Value, Match
This requests that the X server open the direct rendering
device associated with drawable, driverType and RandR
provider. The provider must support SourceOutput or SourceOffload.
The direct rendering library used to implement the specified
'driverType' is returned in 'driver'. The file
descriptor for the device is returned in 'device'. 'nfd' will
be set to one (this is strictly a convenience for XCB which
otherwise would need request-specific information about how
many file descriptors were associated with this reply).
Sharing Kernel Pixel Buffers
An explicit non-goal of DRI3 is support for sharing buffers that don t
map directly to regular X pixmaps. So, GL ancillary buffers like depth
and stencil just don t apply here.
The shared buffers in DRI3 are regular X pixmaps in the X server. This
provides a few obvious benefits over the DRI2 scheme: In the kernel,
the buffers are referenced by DMA-BUF handles, which provides a nice
driver-independent mechanism.
DRI3PixmapFromBuffer
pixmap: PIXMAP
drawable: DRAWABLE
size: CARD32
width, height, stride: CARD16
depth, bpp: CARD8
buffer: FD
Errors: Alloc, Drawable, IDChoice, Value, Match
Creates a pixmap for the direct rendering object associated
with 'buffer'. Changes to pixmap will be visible in that
direct rendered object and changes to the direct rendered
object will be visible in the pixmap.
'size' specifies the total size of the buffer bytes. 'width',
'height' describe the geometry (in pixels) of the underlying
buffer. 'stride' specifies the number of bytes per scanline in
the buffer. The pixels within the buffer may not be arranged
in a simple linear fashion, but 'size' will be at least
'height' * 'stride'.
Precisely how any additional information about the buffer is
shared is outside the scope of this extension.
If buffer cannot be used with the screen associated with
drawable, a Match error is returned.
If depth or bpp are not supported by the screen, a Value error
is returned.
To provide for texture-from-pixmap, the application takes the pixmap
ID and passes that to the X server which returns the a file descriptor
for a DMA-BUF which is associated with the underlying kernel buffer.
DRI3BufferFromPixmap
pixmap: PIXMAP
depth: CARD8
size: CARD32
width, height, stride: CARD16
depth, bpp: CARD8
buffer: FD
Errors: Pixmap, Match
Pass back a direct rendering object associated with
pixmap. Changes to pixmap will be visible in that
direct rendered object and changes to the direct rendered
object will be visible in the pixmap.
'size' specifies the total size of the buffer bytes. 'width',
'height' describe the geometry (in pixels) of the underlying
buffer. 'stride' specifies the number of bytes per scanline in
the buffer. The pixels within the buffer may not be arranged
in a simple linear fashion, but 'size' will be at least
'height' * 'stride'.
Precisely how any additional information about the buffer is
shared is outside the scope of this extension.
If buffer cannot be used with the screen associated with
drawable, a Match error is returned.
Tracking Window Size Changes
When Eric Anholt and I first started discussing DRI3, we hoped to
avoid needing to learn about the window size from the X server. The
thought was that the union of all of the viewports specified by the
application would form the bounds of the drawing area. When the window
size changed, we expected the application would change the viewport.
Alas, this simple plan isn t sufficient here a few GL functions
are not limited to the viewport. So, we need to track the actual
window size and monitor changes to it.
DRI2 does this by delivering invalidate events to the application
whenever the current buffer isn t valid; the application discovers
that this event has been delivered and goes to as the X server for the
new buffers. There are a couple of problems with this approach:
/**
* @brief Listen for a special event
*/
xcb_special_event_t *xcb_register_for_special_event(xcb_connection_t *c,
uint8_t extension,
uint16_t evtype,
uint32_t eid,
uint32_t *stamp);
This creates a special event queue which will contain only events
matching the specified extension/type/event-id triplet.
/**
* @brief Returns the next event from a special queue
*/
xcb_generic_event_t *xcb_check_for_special_event(xcb_connection_t *c,
xcb_special_event_t *se);
This pulls an event from a special event queue. These events will not
appear in the regular X event queue and so applications will never see them.
There s one more piece of magic here the stamp value passed to
xcbregisterforspecialevent. This pointer refers to a location in
memory which will be incremented every time an event is placed in the
special event queue. The application can cheaply monitor this memory
location for changes and known when to check the queue for events.
Within GL, the value used is the existing dri2 stamp value. That is
checked at the top of the rendering operation; if it has changed, the
drawing buffers will be re-acquired. Part of the buffer acquisition
process is a check for special events related to the window.
For now, I ve placed these events in the DRI3 extension. However, they
will move to the Present extension once that is working.
DRI3SelectInput
eventContext: DRI3EVENTID
window: WINDOW
eventMask: SETofDRI3EVENT
Errors: Window, Value, Match, IDchoice
Selects the set of DRI3 events to be delivered for the
specified window and event context. DRI3SelectInput can
create, modify or delete event contexts. An event context is
associated with a specific window; using an existing event
context with a different window generates a Match error.
If eventContext specifies an existing event context, then if
eventMask is empty, DRI3SelectInput deletes the specified
context, otherwise the specified event context is changed to
select a different set of events.
If eventContext is an unused XID, then if eventMask is empty
no operation is performed. Otherwise, a new event context is
created selecting the specified events.
The events themselves look a lot like a configure notify event:
DRI3ConfigureNotify
type: CARD8 XGE event type (35)
extension: CARD8 DRI3 extension request number
length: CARD16 2
evtype: CARD16 DRI3_ConfigureNotify
eventID: DRI3EVENTID
window: WINDOW
x: INT16
y: INT16
width: CARD16
height: CARD16
off_x: INT16
off_y: INT16
pixmap_width: CARD16
pixmap_height: CARD16
pixmap_flags: CARD32
'x' and 'y' are the parent-relative location of 'window'.
Note that there are a couple of odd additional fields offx, offy,
pixmapwidth, pixmapheight and pixmap_flags are all place-holders for
what I expect to end up in the Present extension. For now, in DRI3,
they should be ignored.
Synchronization
The DRM application needs to know when various X requests related to
its buffers have finished. In particular, when performing a buffer
swap, the client wants to know when that completes, and be able to
block until it has. DRI2 does this by having the application make a
synchronous request from the X server to get the names of the new back
buffer for drawing the next frame. This has two problems:
DRI3FenceFromFD
drawable: DRAWABLE
fence: FENCE
initially-triggered: BOOL
fd: FD
Errors: IDchoice, Drawable
Creates a Sync extension Fence that provides the regular Sync
extension semantics along with a file descriptor that provides
a device-specific mechanism to manipulate the fence directly.
Details about the mechanism used with this file descriptor are
outside the scope of the DRI3 extension.
For the current GEM kernel interface, because all GPU access is
serialized at the kernel API, it s sufficient to serialize access to
the kernel itself to ensure operations are serialized on the GPU. So,
for GEM, I m using a shared memory futex for the DRI3 synchronization
primitive. That does not mean that all GPUs will share this same
mechanism. Eliminate the kernel serialization guarantee and some more
GPU-centric design will be required.
What about Swap Buffers?
None of the above stuff actually gets bits onto the screen. For now,
the GL implementation is simply taking the X pixmap and copying it to
the window at SwapBuffers time. This is sufficient to run
applications, but doesn t provide for all of the fancy swap options,
like limiting to frame rate or optimizing full-screen swaps.
I ve decided to relegate all of that functionality to the
as-yet-unspecified Present extension.
Because the whole goal of DRI3 was to get direct rendered application
contents into X pixmaps, the Present extension will operate on those
X objects directly. This means it will also be usable with non-DRM
applications that use simple X pixmap based double buffering, a class
which includes most existing non-GL based Gtk+ and Qt applications.
So, I get to reduce the size of the DRI3 extension while providing
additional functionality for non direct-rendered applications.
Current Status
As I said above, all of the above functionality is running on my
systems and has booted both complete KDE and Gnome sessions. There
have been some recent DMA-BUF related fixes in the kernel, so you ll
need to run the latest 3.9.x stable release or a 3.10 release
candidate.
Here s references to all of the appropriate git repositories:
DRI3 protocol and spec:
git://people.freedesktop.org/~keithp/dri3proto master
XCB protocol
git://people.freedesktop.org/~keithp/xcb/proto.git dri3
XCB library
git://people.freedesktop.org/~keithp/xcb/libxcb.git dri3
xshmfence library:
git://people.freedesktop.org/~keithp/libxshmfence.git master
X server:
git://people.freedesktop.org/~keithp/xserver.git dri3
Mesa:
git://people.freedesktop.org/~keithp/mesa.git dri3
Next Steps
Now it s time to go write the Present extension and get that
working. I ll start coding and should have another posting here next
week.
Next.