During his DebConf15 keynote, Jacob Applebaum -observed -that those listening on the Internet lines would have good reason to -believe a computer have a given security hole if it download a -security fix from a Debian mirror. This is a good reason to always -use encrypted connections to the Debian mirror, to make sure those -listening do not know which IP address to attack. In August, Richard -Hartmann observed that encryption was not enough, when it was possible -to interfere download size to security patches or the fact that -download took place shortly after a security fix was released, and -proposed -to always use Tor to download packages from the Debian mirror. He -was not the first to propose this, as the apt-transport-tor -package by Tim Retout already existed to make it easy to convince apt -to use Tor, but I was not -aware of that package when I read the blog post from Richard.
- -Richard discussed the idea with Peter Palfrader, one of the Debian -sysadmins, and he set up a Tor hidden service on one of the central -Debian mirrors using the address vwakviie2ienjx6t.onion, thus making -it possible to download packages directly between two tor nodes, -making sure the network traffic always were encrypted.
- -Here is a short recipe for enabling this on your machine, by -installing apt-transport-tor and replacing http and https -urls with tor+http and https, and using the hidden service instead of -the official Debian mirror site. I recommend installing -etckeeper before you start to have a history of the changes -done in /etc/.
- -- --apt install apt-transport-tor -sed -i 's% http://ftp.debian.org/%tor+http://vwakviie2ienjx6t.onion/%' /etc/apt/sources.list -sed -i 's% http% tor+http%' /etc/apt/sources.list -
If you have more sources listed in /etc/apt/sources.list.d/, run -the sed commands for these too. The sed command is assuming your are -using the ftp.debian.org Debian mirror. Adjust the command (or just -edit the file manually) to match your mirror.
- -This work in Debian Jessie and later. Note that tools like -apt-file only recently started using the apt transport -system, and do not work with these tor+http URLs. For -apt-file you need the version currently in experimental, -which need a recent apt version currently only in unstable. So if you -need a working apt-file, this is not for you.
- -Another advantage from this change is that your machine will start -using Tor regularly and at fairly random intervals (every time you -update the package lists or upgrade or install a new package), thus -masking other Tor traffic done from the same machine. Using Tor will -become normal for the machine in question.
- -On Freedombox, APT -is set up by default to use apt-transport-tor when Tor is -enabled. It would be great if it was the default on any Debian -system.
+ +Jeg ble så imponert over +dagens +gladnyhet på NRK, om at Forbrukerrådet klager inn vilkårene for +bruk av aktivitetsbånd fra Fitbit, Garmin, Jawbone og Mio til +Datatilsynet og forbrukerombudet, at jeg sendte følgende brev til +forbrukerrådet for å uttrykke min støtte: + +
+ ++ +Jeg ble veldig glad over å lese at Forbrukerrådet +klager +inn flere aktivitetsbånd til Datatilsynet for dårlige vilkår. Jeg +har ønsket meg et aktivitetsbånd som kan måle puls, bevegelse og +gjerne også andre helserelaterte indikatorer en stund nå. De eneste +jeg har funnet i salg gjør, som dere også har oppdaget, graverende +inngrep i privatsfæren og sender informasjonen ut av huset til folk og +organisasjoner jeg ikke ønsker å dele aktivitets- og helseinformasjon +med. Jeg ønsker et alternativ som _ikke_ sender informasjon til +skyen, men derimot bruker +en +fritt og åpent standardisert protokoll (eller i det minste en +dokumentert protokoll uten patent- og opphavsrettslige +bruksbegrensinger) til å kommunisere med datautstyr jeg kontrollerer. +Er jo ikke interessert i å betale noen for å tilrøve seg +personopplysninger fra meg. Desverre har jeg ikke funnet noe +alternativ så langt.
+ +Det holder ikke å endre på bruksvilkårene for enhetene, slik +Datatilsynet ofte legger opp til i sin behandling, når de gjør slik +f.eks. Fitbit (den jeg har sett mest på). Fitbit krypterer +informasjonen på enheten og sender den kryptert til leverandøren. Det +gjør det i praksis umulig både å sjekke hva slags informasjon som +sendes over, og umulig å ta imot informasjonen selv i stedet for +Fitbit. Uansett hva slags historie som forteller i bruksvilkårene er +en jo både prisgitt leverandørens godvilje og at de ikke tvinges av +sitt lands myndigheter til å lyve til sine kunder om hvorvidt +personopplysninger spres ut over det bruksvilkårene sier. Det er +veldokumentert hvordan f.eks. USA tvinger selskaper vha. såkalte +National security letters til å utlevere personopplysninger samtidig +som de ikke får lov til å fortelle dette til kundene sine.
+ +Stå på, jeg er veldig glade for at dere har sett på saken. Vet +dere om aktivitetsbånd i salg i dag som ikke tvinger en til å utlevere +aktivitets- og helseopplysninger med leverandøren?
+ +
Jeg håper en konkurrent som respekterer kundenes privatliv klarer å +nå opp i markedet, slik at det finnes et reelt alternativ for oss som +har full tillit til at skyleverandører vil prioritere egen inntjening +og myndighetspålegg langt over kundenes rett til privatliv. Jeg har +ingen tiltro til at Datatilsynet vil kreve noe mer enn at vilkårene +endres slik at de forklarer eksplisitt i hvor stor grad bruk av +produktene utraderer privatsfæren til kundene. Det vil nok gjøre de +innklagede armbåndene "lovlige", men fortsatt tvinge kundene til å +dele sine personopplysninger med leverandøren.
Det kommer stadig nye løsninger for å ta lagre unna innslag fra NRK -for å se på det senere. For en stund tilbake kom jeg over et script -nrkopptak laget av Ingvar Hagelund. Han fjernet riktignok sitt script -etter forespørsel fra Erik Bolstad i NRK, men noen tok heldigvis og -gjorde det tilgjengelig -via github.
- -Scriptet kan lagre som MPEG4 eller Matroska, og bake inn -undertekster i fila på et vis som blant annet VLC forstår. For å -bruke scriptet, kopier ned git-arkivet og kjør
+ +In July +I +wrote how to get the Signal Chrome/Chromium app working without +the ability to receive SMS messages (aka without a cell phone). It is +time to share some experiences and provide an updated setup.
+ +The Signal app have worked fine for several months now, and I use +it regularly to chat with my loved ones. I had a major snag at the +end of my summer vacation, when the the app completely forgot my +setup, identity and keys. The reason behind this major mess was +running out of disk space. To avoid that ever happening again I have +started storing everything in userdata/ in git, to be able to +roll back to an earlier version if the files are wiped by mistake. I +had to use it once after introducing the git backup. When rolling +back to an earlier version, one need to use the 'reset session' option +in Signal to get going, and notify the people you talk with about the +problem. I assume there is some sequence number tracking in the +protocol to detect rollback attacks. The git repository is rather big +(674 MiB so far), but I have not tried to figure out if some of the +content can be added to a .gitignore file due to lack of spare +time.
+ +I've also hit the 90 days timeout blocking, and noticed that this +make it impossible to send messages using Signal. I could still +receive them, but had to patch the code with a new timestamp to send. +I believe the timeout is added by the developers to force people to +upgrade to the latest version of the app, even when there is no +protocol changes, to reduce the version skew among the user base and +thus try to keep the number of support requests down.
+ +Since my original recipe, the Signal source code changed slightly, +making the old patch fail to apply cleanly. Below is an updated +patch, including the shell wrapper I use to start Signal. The +original version required a new user to locate the JavaScript console +and call a function from there. I got help from a friend with more +JavaScript knowledge than me to modify the code to provide a GUI +button instead. This mean that to get started you just need to run +the wrapper and click the 'Register without mobile phone' to get going +now. I've also modified the timeout code to always set it to 90 days +in the future, to avoid having to patch the code regularly.
+ +So, the updated recipe for Debian Jessie:
+ +-
+
+
- First, install required packages to get the source code and the
+browser you need. Signal only work with Chrome/Chromium, as far as I
+know, so you need to install it.
-
-nrkopptak/bin/nrk-opptak k
+https://tv.nrk.no/serie/bmi-turne/MUHH45000115/sesong-1/episode-1 - +apt install git tor chromium +git clone https://github.com/WhisperSystems/Signal-Desktop.git +
+
+ - Modify the source code using command listed in the the patch +block below. + +
- Start Signal using the run-signal-app wrapper (for example using +`pwd`/run-signal-app). + +
- Click on the 'Register without mobile phone', will in a phone +number you can receive calls to the next minute, receive the +verification code and enter it into the form field and press +'Register'. Note, the phone number you use will be user Signal +username, ie the way others can find you on Signal. + +
- You can now use Signal to contact others. Note, new contacts do +not show up in the contact list until you restart Signal, and there is +no way to assign names to Contacts. There is also no way to create or +update chat groups. I suspect this is because the web app do not have +a associated contact database. + +
I am still a bit uneasy about using Signal, because of the way its +main author moxie0 reject federation and accept dependencies to major +corporations like Google (part of the code is fetched from Google) and +Amazon (the central coordination point is owned by Amazon). See for +example +the +LibreSignal issue tracker for a thread documenting the authors +view on these issues. But the network effect is strong in this case, +and several of the people I want to communicate with already use +Signal. Perhaps we can all move to Ring +once it work on my +laptop? It already work on Windows and Android, and is included +in Debian and +Ubuntu, but not +working on Debian Stable.
+ +Anyway, this is the patch I apply to the Signal code to get it +working. It switch to the production servers, disable to timeout, +make registration easier and add the shell wrapper:
-URL-eksemplet er dagens toppsak på tv.nrk.no. Argument 'k' ber -scriptet laste ned og lagre som Matroska. Det finnes en rekke andre -muligheter for valg av kvalitet og format.
++cd Signal-Desktop; cat <<EOF | patch -p1 +diff --git a/js/background.js b/js/background.js +index 24b4c1d..579345f 100644 +--- a/js/background.js ++++ b/js/background.js +@@ -33,9 +33,9 @@ + }); + }); + +- var SERVER_URL = 'https://textsecure-service-staging.whispersystems.org'; ++ var SERVER_URL = 'https://textsecure-service-ca.whispersystems.org'; + var SERVER_PORTS = [80, 4433, 8443]; +- var ATTACHMENT_SERVER_URL = 'https://whispersystems-textsecure-attachments-staging.s3.amazonaws.com'; ++ var ATTACHMENT_SERVER_URL = 'https://whispersystems-textsecure-attachments.s3.amazonaws.com'; + var messageReceiver; + window.getSocketStatus = function() { + if (messageReceiver) { +diff --git a/js/expire.js b/js/expire.js +index 639aeae..beb91c3 100644 +--- a/js/expire.js ++++ b/js/expire.js +@@ -1,6 +1,6 @@ + ;(function() { + 'use strict'; +- var BUILD_EXPIRATION = 0; ++ var BUILD_EXPIRATION = Date.now() + (90 * 24 * 60 * 60 * 1000); + + window.extension = window.extension || {}; + +diff --git a/js/views/install_view.js b/js/views/install_view.js +index 7816f4f..1d6233b 100644 +--- a/js/views/install_view.js ++++ b/js/views/install_view.js +@@ -38,7 +38,8 @@ + return { + 'click .step1': this.selectStep.bind(this, 1), + 'click .step2': this.selectStep.bind(this, 2), +- 'click .step3': this.selectStep.bind(this, 3) ++ 'click .step3': this.selectStep.bind(this, 3), ++ 'click .callreg': function() { extension.install('standalone') }, + }; + }, + clearQR: function() { +diff --git a/options.html b/options.html +index dc0f28e..8d709f6 100644 +--- a/options.html ++++ b/options.html +@@ -14,7 +14,10 @@ + <div class='nav'> + <h1>{{ installWelcome }}</h1> + <p>{{ installTagline }}</p> +- <div> <a class='button step2'>{{ installGetStartedButton }}</a> </div> ++ <div> <a class='button step2'>{{ installGetStartedButton }}</a> ++ <br> <a class="button callreg">Register without mobile phone</a> ++ ++ </div> + <span class='dot step1 selected'></span> + <span class='dot step2'></span> + <span class='dot step3'></span> +--- /dev/null 2016-10-07 09:55:13.730181472 +0200 ++++ b/run-signal-app 2016-10-10 08:54:09.434172391 +0200 +@@ -0,0 +1,12 @@ ++#!/bin/sh ++set -e ++cd $(dirname $0) ++mkdir -p userdata ++userdata="`pwd`/userdata" ++if [ -d "$userdata" ] && [ ! -d "$userdata/.git" ] ; then ++ (cd $userdata && git init) ++fi ++(cd $userdata && git add . && git commit -m "Current status." || true) ++exec chromium \ ++ --proxy-server="socks://localhost:9050" \ ++ --user-data-dir=$userdata --load-and-launch-app=`pwd` +EOF +chmod a+rx run-signal-app +-
Jeg foretrekker dette scriptet fremfor youtube-dl, som - -nevnt i 2014 støtter NRK og en rekke andre videokilder, på grunn -av at nrkopptak samler undertekster og video i en enkelt fil, hvilket -gjør håndtering enklere på disk.
+As usual, if you use Bitcoin and want to show your support of my +activities, please send Bitcoin donations to my address +15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b.
When I was a kid, we used to collect "car numbers", as we used to -call the car license plate numbers in those days. I would write the -numbers down in my little book and compare notes with the other kids -to see how many region codes we had seen and if we had seen some -exotic or special region codes and numbers. It was a fun game to pass -time, as we kids have plenty of it.
- -A few days I came across -the OpenALPR -project, a free software project to automatically discover and -report license plates in images and video streams, and provide the -"car numbers" in a machine readable format. I've been looking for -such system for a while now, because I believe it is a bad idea that the -automatic -number plate recognition tool only is available in the hands of -the powerful, and want it to be available also for the powerless to -even the score when it comes to surveillance and sousveillance. I -discovered the developer -wanted to get the tool into -Debian, and as I too wanted it to be in Debian, I volunteered to -help him get it into shape to get the package uploaded into the Debian -archive.
- -Today we finally managed to get the package into shape and uploaded -it into Debian, where it currently -waits -in the NEW queue for review by the Debian ftpmasters.
- -I guess you are wondering why on earth such tool would be useful -for the common folks, ie those not running a large government -surveillance system? Well, I plan to put it in a computer on my bike -and in my car, tracking the cars nearby and allowing me to be notified -when number plates on my watch list are discovered. Another use case -was suggested by a friend of mine, who wanted to set it up at his home -to open the car port automatically when it discovered the plate on his -car. When I mentioned it perhaps was a bit foolhardy to allow anyone -capable of placing his license plate number of a piece of cardboard to -open his car port, men replied that it was always unlocked anyway. I -guess for such use case it make sense. I am sure there are other use -cases too, for those with imagination and a vision.
- -If you want to build your own version of the Debian package, check -out the upstream git source and symlink ./distros/debian to ./debian/ -before running "debuild" to build the source. Or wait a bit until the -package show up in unstable.
+ +NRK +lanserte +for noen uker siden en ny +varslerportal som bruker +SecureDrop til å ta imot tips der det er vesentlig at ingen +utenforstående får vite at NRK er tipset. Det er et langt steg +fremover for NRK, og når en leser bloggposten om hva de har tenkt på +og hvordan løsningen er satt opp virker det som om de har gjort en +grundig jobb der. Men det er ganske mye ekstra jobb å motta tips via +SecureDrop, så varslersiden skriver "Nyhetstips som ikke krever denne +typen ekstra vern vil vi gjerne ha på nrk.no/03030", og 03030-siden +foreslår i tillegg til et webskjema å bruke epost, SMS, telefon, +personlig oppmøte og brevpost. Denne artikkelen handler disse andre +metodene.
+ +Når en sender epost til en @nrk.no-adresse så vil eposten sendes ut +av landet til datamaskiner kontrollert av Microsoft. En kan sjekke +dette selv ved å slå opp epostleveringsadresse (MX) i DNS. For NRK er +dette i dag "nrk-no.mail.protection.outlook.com". NRK har som en ser +valgt å sette bort epostmottaket sitt til de som står bak outlook.com, +dvs. Microsoft. En kan sjekke hvor nettverkstrafikken tar veien +gjennom Internett til epostmottaket vha. programmet +traceroute, og finne ut hvem som eier en Internett-adresse +vha. whois-systemet. Når en gjør dette for epost-trafikk til @nrk.no +ser en at trafikken fra Norge mot nrk-no.mail.protection.outlook.com +går via Sverige mot enten Irland eller Tyskland (det varierer fra gang +til gang og kan endre seg over tid).
+ +Vi vet fra +introduksjonen av +FRA-loven at IP-trafikk som passerer grensen til Sverige avlyttes +av Försvarets radioanstalt (FRA). Vi vet videre takket være +Snowden-bekreftelsene at trafikk som passerer grensen til +Storbritannia avlyttes av Government Communications Headquarters +(GCHQ). I tillegg er er det nettopp lansert et forslag i Norge om at +forsvarets E-tjeneste skal få avlytte trafikk som krysser grensen til +Norge. Jeg er ikke kjent med dokumentasjon på at Irland og Tyskland +gjør det samme. Poenget er uansett at utenlandsk etterretning har +mulighet til å snappe opp trafikken når en sender epost til @nrk.no. +I tillegg er det selvsagt tilgjengelig for Microsoft som er underlagt USAs +jurisdiksjon og +samarbeider +med USAs etterretning på flere områder. De som tipser NRK om +nyheter via epost kan dermed gå ut fra at det blir kjent for mange +andre enn NRK at det er gjort.
+ +Bruk av SMS og telefon registreres av blant annet telefonselskapene +og er tilgjengelig i følge lov og forskrift for blant annet Politi, +NAV og Finanstilsynet, i tillegg til IT-folkene hos telefonselskapene +og deres overordnede. Hvis innringer eller mottaker bruker +smarttelefon vil slik kontakt også gjøres tilgjengelig for ulike +app-leverandører og de som lytter på trafikken mellom telefon og +app-leverandør, alt etter hva som er installert på telefonene som +brukes.
+ +Brevpost kan virke trygt, og jeg vet ikke hvor mye som registreres +og lagres av postens datastyrte postsorteringssentraler. Det vil ikke +overraske meg om det lagres hvor i landet hver konvolutt kommer fra og +hvor den er adressert, i hvert fall for en kortere periode. Jeg vet +heller ikke hvem slik informasjon gjøres tilgjengelig for. Det kan +være nok til å ringe inn potensielle kilder når det krysses med hvem +som kjente til aktuell informasjon og hvor de befant seg (tilgjengelig +f.eks. hvis de bærer mobiltelefon eller bor i nærheten).
+ +Personlig oppmøte hos en NRK-journalist er antagelig det tryggeste, +men en bør passe seg for å bruke NRK-kantina. Der bryter de nemlig +Sentralbanklovens +paragraf 14 og nekter folk å betale med kontanter. I stedet +krever de at en varsle sin bankkortutsteder om hvor en befinner seg +ved å bruke bankkort. Banktransaksjoner er tilgjengelig for +bankkortutsteder (det være seg VISA, Mastercard, Nets og/eller en +bank) i tillegg til politiet og i hvert fall tidligere med Se & Hør +(via utro tjenere, slik det ble avslørt etter utgivelsen av boken +«Livet, det forbannede» av Ken B. Rasmussen). Men hvor mange kjenner +en NRK-journalist personlig? Besøk på NRK på Marienlyst krever at en +registrerer sin ankost elektronisk i besøkssystemet. Jeg vet ikke hva +som skjer med det datasettet, men har grunn til å tro at det sendes ut +SMS til den en skal besøke med navnet som er oppgitt. Kanskje greit å +oppgi falskt navn.
+ +Når så tipset er kommet frem til NRK skal det behandles +redaksjonelt i NRK. Der vet jeg via ulike kilder at de fleste +journalistene bruker lokalt installert programvare, men noen bruker +Google Docs og andre skytjenester i strid med interne retningslinjer +når de skriver. Hvordan vet en hvem det gjelder? Ikke vet jeg, men +det kan være greit å spørre for å sjekke at journalisten har tenkt på +problemstillingen, før en gir et tips. Og hvis tipset omtales internt +på epost, er det jo grunn til å tro at også intern eposten vil deles +med Microsoft og utenlands etterretning, slik tidligere nevnt, men det +kan hende at det holdes internt i NRKs interne MS Exchange-løsning. +Men Microsoft ønsker å få alle Exchange-kunder over "i skyen" (eller +andre folks datamaskiner, som det jo innebærer), så jeg vet ikke hvor +lenge det i så fall vil vare.
+ +I tillegg vet en jo at +NRK +har valgt å gi nasjonal sikkerhetsmyndighet (NSM) tilgang til å se på +intern og ekstern Internett-trafikk hos NRK ved oppsett av såkalte +VDI-noder, på tross av +protester +fra NRKs journalistlag. Jeg vet ikke om den vil kunne snappe opp +dokumenter som lagres på interne filtjenere eller dokumenter som lages +i de interne webbaserte publiseringssystemene, men vet at hva noden +ser etter på nettet kontrolleres av NSM og oppdateres automatisk, slik +at det ikke gir så mye mening å sjekke hva noden ser etter i dag når +det kan endres automatisk i morgen.
+ +Personlig vet jeg ikke om jeg hadde turt tipse NRK hvis jeg satt på +noe som kunne være en trussel mot den bestående makten i Norge eller +verden. Til det virker det å være for mange åpninger for +utenforstående med andre prioriteter enn NRKs journalistiske fokus. +Og den største truslen for en varsler er jo om metainformasjon kommer +på avveie, dvs. informasjon om at en har vært i kontakt med en +journalist. Det kan være nok til at en kommer i myndighetenes +søkelys, og de færreste har nok operasjonell sikkerhet til at vil tåle +slik flombelysning på sitt privatliv.
Around three years ago, I created -the isenkram -system to get a more practical solution in Debian for handing -hardware related packages. A GUI system in the isenkram package will -present a pop-up dialog when some hardware dongle supported by -relevant packages in Debian is inserted into the machine. The same -lookup mechanism to detect packages is available as command line -tools in the isenkram-cli package. In addition to mapping hardware, -it will also map kernel firmware files to packages and make it easy to -install needed firmware packages automatically. The key for this -system to work is a good way to map hardware to packages, in other -words, allow packages to announce what hardware they will work -with.
- -I started by providing data files in the isenkram source, and -adding code to download the latest version of these data files at run -time, to ensure every user had the most up to date mapping available. -I also added support for storing the mapping in the Packages file in -the apt repositories, but did not push this approach because while I -was trying to figure out how to best store hardware/package mappings, -the -appstream system was announced. I got in touch and suggested to -add the hardware mapping into that data set to be able to use -appstream as a data source, and this was accepted at least for the -Debian version of appstream.
- -A few days ago using appstream in Debian for this became possible, -and today I uploaded a new version 0.20 of isenkram adding support for -appstream as a data source for mapping hardware to packages. The only -package so far using appstream to announce its hardware support is my -pymissile package. I got help from Matthias Klumpp with figuring out -how do add the required -metadata -in pymissile. I added a file debian/pymissile.metainfo.xml with -this content:
- -- --<?xml version="1.0" encoding="UTF-8"?> -<component> - <id>pymissile</id> - <metadata_license>MIT</metadata_license> - <name>pymissile</name> - <summary>Control original Striker USB Missile Launcher</summary> - <description> - <p> - Pymissile provides a curses interface to control an original - Marks and Spencer / Striker USB Missile Launcher, as well as a - motion control script to allow a webcamera to control the - launcher. - </p> - </description> - <provides> - <modalias>usb:v1130p0202d*</modalias> - </provides> -</component> -
The key for isenkram is the component/provides/modalias value, -which is a glob style match rule for hardware specific strings -(modalias strings) provided by the Linux kernel. In this case, it -will map to all USB devices with vendor code 1130 and product code -0202.
- -Note, it is important that the license of all the metadata files -are compatible to have permissions to aggregate them into archive wide -appstream files. Matthias suggested to use MIT or BSD licenses for -these files. A challenge is figuring out a good id for the data, as -it is supposed to be globally unique and shared across distributions -(in other words, best to coordinate with upstream what to use). But -it can be changed later or, so we went with the package name as -upstream for this project is dormant.
- -To get the metadata file installed in the correct location for the -mirror update scripts to pick it up and include its content the -appstream data source, the file must be installed in the binary -package under /usr/share/appdata/. I did this by adding the following -line to debian/pymissile.install:
- -- --debian/pymissile.metainfo.xml usr/share/appdata -
With that in place, the command line tool isenkram-lookup will list -all packages useful on the current computer automatically, and the GUI -pop-up handler will propose to install the package not already -installed if a hardware dongle is inserted into the machine in -question.
- -Details of the modalias field in appstream is available from the -DEP-11 proposal.
- -To locate the modalias values of all hardware present in a machine, -try running this command on the command line:
- -+ +-cat $(find /sys/devices/|grep modalias) -
The Isenkram +system provide a practical and easy way to figure out which +packages support the hardware in a given machine. The command line +tool isenkram-lookup and the tasksel options provide a +convenient way to list and install packages relevant for the current +hardware during system installation, both user space packages and +firmware packages. The GUI background daemon on the other hand provide +a pop-up proposing to install packages when a new dongle is inserted +while using the computer. For example, if you plug in a smart card +reader, the system will ask if you want to install pcscd if +that package isn't already installed, and if you plug in a USB video +camera the system will ask if you want to install cheese if +cheese is currently missing. This already work just fine.
+ +But Isenkram depend on a database mapping from hardware IDs to +package names. When I started no such database existed in Debian, so +I made my own data set and included it with the isenkram package and +made isenkram fetch the latest version of this database from git using +http. This way the isenkram users would get updated package proposals +as soon as I learned more about hardware related packages.
+ +The hardware is identified using modalias strings. The modalias +design is from the Linux kernel where most hardware descriptors are +made available as a strings that can be matched using filename style +globbing. It handle USB, PCI, DMI and a lot of other hardware related +identifiers.
+ +The downside to the Isenkram specific database is that there is no +information about relevant distribution / Debian version, making +isenkram propose obsolete packages too. But along came AppStream, a +cross distribution mechanism to store and collect metadata about +software packages. When I heard about the proposal, I contacted the +people involved and suggested to add a hardware matching rule using +modalias strings in the specification, to be able to use AppStream for +mapping hardware to packages. This idea was accepted and AppStream is +now a great way for a package to announce the hardware it support in a +distribution neutral way. I wrote +a +recipe on how to add such meta-information in a blog post last +December. If you have a hardware related package in Debian, please +announce the relevant hardware IDs using AppStream.
+ +In Debian, almost all packages that can talk to a LEGO Mindestorms +RCX or NXT unit, announce this support using AppStream. The effect is +that when you insert such LEGO robot controller into your Debian +machine, Isenkram will propose to install the packages needed to get +it working. The intention is that this should allow the local user to +start programming his robot controller right away without having to +guess what packages to use or which permissions to fix.
+ +But when I sat down with my son the other day to program our NXT +unit using his Debian Stretch computer, I discovered something +annoying. The local console user (ie my son) did not get access to +the USB device for programming the unit. This used to work, but no +longer in Jessie and Stretch. After some investigation and asking +around on #debian-devel, I discovered that this was because udev had +changed the mechanism used to grant access to local devices. The +ConsoleKit mechanism from /lib/udev/rules.d/70-udev-acl.rules +no longer applied, because LDAP users no longer was added to the +plugdev group during login. Michael Biebl told me that this method +was obsolete and the new method used ACLs instead. This was good +news, as the plugdev mechanism is a mess when using a remote user +directory like LDAP. Using ACLs would make sure a user lost device +access when she logged out, even if the user left behind a background +process which would retain the plugdev membership with the ConsoleKit +setup. Armed with this knowledge I moved on to fix the access problem +for the LEGO Mindstorms related packages.
+ +The new system uses a udev tag, 'uaccess'. It can either be +applied directly for a device, or is applied in +/lib/udev/rules.d/70-uaccess.rules for classes of devices. As the +LEGO Mindstorms udev rules did not have a class, I decided to add the +tag directly in the udev rules files included in the packages. Here +is one example. For the nqc C compiler for the RCX, the +/lib/udev/rules.d/60-nqc.rules file now look like this: + +
+SUBSYSTEM=="usb", ACTION=="add", ATTR{idVendor}=="0694", ATTR{idProduct}=="0001", \ + SYMLINK+="rcx-%k", TAG+="uaccess" ++ +
The key part is the 'TAG+="uaccess"' at the end. I suspect all +packages using plugdev in their /lib/udev/rules.d/ files should be +changed to use this tag (either directly or indirectly via +70-uaccess.rules). Perhaps a lintian check should be created +to detect this?
+ +I've been unable to find good documentation on the uaccess feature. +It is unclear to me if the uaccess tag is an internal implementation +detail like the udev-acl tag used by +/lib/udev/rules.d/70-udev-acl.rules. If it is, I guess the +indirect method is the preferred way. Michael +asked for more +documentation from the systemd project and I hope it will make +this clearer. For now I use the generic classes when they exist and +is already handled by 70-uaccess.rules, and add the tag +directly if no such class exist.
To learn more about the isenkram system, please check out my blog posts tagged isenkram.
+ +To help out making life for LEGO constructors in Debian easier, +please join us on our IRC channel +#debian-lego and join +the Debian +LEGO team in the Alioth project we created yesterday. A mailing +list is not yet created, but we are working on it. :)
+ +As usual, if you use Bitcoin and want to show your support of my +activities, please send Bitcoin donations to my address +15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b.