Linux

Whenever I want to work on some package, I usually clone its git repository, make my changes, then push and upload the Debian package. I don’t keep those repositories around in order to avoid cruft and also to have a 100% clean, up-to-da...
Whenever I want to work on some package, I usually clone its git repository, make my changes, then push and upload the Debian package. I don’t keep those repositories around in order to avoid cruft and also to have a 100% clean, up-to-date setup whenever I start working on something. Everytime I clone such a repository, I struggle with the setup. For example, I usually forget the --pristine-tar flag for gbp-clone. Also, I usually forget to push other branches (working on “debian”, forgetting “upstream”) and, even more often, I forget pushing tags. I spent some time on this and figured out that one can use the following to make --pristine-tar the default: cat >> ~/.gbp.conf Avoiding my other pain points is not so easy apparently, so I wrote a little shell function (only tested with zsh!) which uses debcheckout to get the git URL, gbp-clone to actually clone it and a few git config calls to make me able to just “git push” when I am done and not worry about anything: # Clones the git sources of a Debian package # needs debcheckout from devscripts and gbp-clone from git-buildpackage function d-clone() { local package=$1 if debcheckout --print $package >/dev/null then set -- $(debcheckout --print $package) if [ "$1" != "git" ] then echo "$package does not use git, but $1 instead." return fi echo "cloning $2" gbp-clone $2 || return # Change to the newest git repository cd $(dirname $(ls -1td */.git | head -1)) || return # This tells git to push all branches at once, # i.e. if you changed upstream and debian (after git-import-orig), # both upstream and debian will be pushed when running “git push”. git config push.default matching || return # This tells git to push tags automatically, # so you don’t have to use “git push; git push --tags”. git config --add remote.origin.push "+refs/heads/*:refs/remotes/origin/*" || return git config --add remote.origin.push "+refs/tags/*:refs/tags/*" || return echo "d-clone set up everything successfully." else echo "debcheckout $package failed. Is $package missing Vcs tags?" fi } With that function, starting work on a package becomes as easy as “d-clone golang-doc”.
about 2 hours ago
I've run into quite a problem the last few days. I bought three new laptops for my parents and a few others. I bought Packard Bell Easynote LV to run Kubuntu on and use as their home computer. But I am completely unable to figure ...
I've run into quite a problem the last few days. I bought three new laptops for my parents and a few others. I bought Packard Bell Easynote LV to run Kubuntu on and use as their home computer. But I am completely unable to figure out how to install Linux on it. The computer is preinstalled with Windows 8, and I suspect it uses UEFI instead of a BIOS to boot. The problem is that I am unable to get it to PXE boot, and unable to get it to boot the Linux installer from my USB stick. I have yet to try the DVD install, and still hope it will work. when I turn on the computer, there is no information on what buttons to press to get the normal boot menu. I expect to get some boot menu to select PXE or USB stick booting. When booting, it first ask for the language to use, then for some regional settings, and finally if I will accept the Windows 8 terms of use. As these terms are completely unacceptable to me, I have no other choice but to turn off the computer and try again to get it to boot the Linux installer. I have gathered my findings so far on a Linlap page about the Packard Bell EasyNote LV model. If you have any idea how to get Linux installed on this machine, please get in touch or update that wiki page. If I can't find a way to install Linux, I will have to return the laptop to the seller and find another machine for my parents. I wonder, is this the way Linux will be forced out of the marked using UEFI and "secure boot" by making it impossible to install Linux on new Laptops?
about 4 hours ago
I recently had a TeX itch to scratch: I am working on a paper that has several multi-line continued equalities¹ where, depending on the size of the expressions and the explanations of each step, I chose among a few layouts. But implement...
I recently had a TeX itch to scratch: I am working on a paper that has several multi-line continued equalities¹ where, depending on the size of the expressions and the explanations of each step, I chose among a few layouts. But implementing the layout together with the actual code was inefficient, as switching the layout involved changing every line. So I came up with the package conteq which allows you to typeset continued equations in a simple declarative manner, e.g. \begin{conteq} e^{\pi\cdot i} \\ = -1 & Euler's formula \\ and allows you to select the layout via an parameter to the environment, or globally, or either. Also, the styling of the explanations (italics? wrapped in {...}?) can be configured simply by redefining a macro. For more details and an overview of the various styles, check out the package documentation. If this sounds useful to you, fetch the conteq package from CTAN. But beware: It uses quite current features of the expl3 package, so you need at least the version from 2012/07/02 (TeXLive 2013 is good). You can file bug reports at the GitHub mirror of my git repository. I’d like to thank Bruno Le Floch and Joseph Wright, who made me aware of expl3 on various TeX Exchange questions. ¹ I haven’t heard of this term before, but supposedly it is the right translation for the German word „Gleichungskette“.
about 7 hours ago
On saturday 25. of May I gave a talk about FreedomBox at the "Claim back your device" track of LinuxTag in Berlin. LinuxTag is a fairly big annual conference about (yes, you guessed right) Linux and related topics. The FreedomBox is a ...
On saturday 25. of May I gave a talk about FreedomBox at the "Claim back your device" track of LinuxTag in Berlin. LinuxTag is a fairly big annual conference about (yes, you guessed right) Linux and related topics. The FreedomBox is a project to help non-geeks care about their personal privacy when online, same ways as geeks have practiced for a decade or more. Concrete goal is to design a small, cheap physical box similar to an internet gateway or wifi router but with three additions: Easy and intuitive to setup and personalize for non-geeks Offers routines to help you protect your privacy Offers routines to let you help others in need of privacy "Privacy" is commonly mistaken as "secrecy": Privacy is to keep you in control of your information, so that sharing or keeping to yourself is truly your own choice. Thanks a lot especially to Matthias Kirschner for inviting me as a speaker! Slides (sources) for the event.
about 7 hours ago
Microsoft and Google have put aside their differences and agreed to work together to finally give Windows Phone users an official YouTube app.Microsoft had incurred Google's wrath by launching its own YouTube app which did not serve adve...
Microsoft and Google have put aside their differences and agreed to work together to finally give Windows Phone users an official YouTube app.Microsoft had incurred Google's wrath by launching its own YouTube app which did not serve advertisements, leading the search giant to demand its removal.Microsoft responded by saying it would be happy to work with Google, but cannot add advertisements without the company's technical know-how.It seems the olive branch was well received at Mountain View and the two sides will now align for a forthcoming, shiny, official YouTube app.Come togetherMicrosoft said: "Microsoft and YouTube are working together to update the new YouTube for Windows Phone app to enable compliance with YouTube's API terms of service, including enabling ads, in the coming weeks. "Microsoft will replace the existing YouTube app in Windows Phone Store with the previous version during this time."During the dispute Google was also a little stroppy about the option to download videos from within the Windows Phone YouTube app, and Microsoft has since removed that feature.
about 13 hours ago
Wouter still does not like the 3.0 (quilt) packaging format. And as he writes on his blog, I shall answer on mine. And what if one of the blogs becomes unreachable with time? Aha! That's one of the weaknesses, Wouter, on yuor closing...
Wouter still does not like the 3.0 (quilt) packaging format. And as he writes on his blog, I shall answer on mine. And what if one of the blogs becomes unreachable with time? Aha! That's one of the weaknesses, Wouter, on yuor closing comment: I have all my packages stored in git with a proper Vcs-Git: header; if people really want to look at individual patches, they can just use debcheckout, kthxbye. I am aware this would not be so much of an argument, or so much of a change. But the way I view a shipped package is that it should, by itself, be as a snapshot with its whole, full description. Say that three years from now Apple has scrubbed your brain and you went to work with them. And you decided to pull all of your non-iOS repositories. They have convinced you working for Debian is bad for mankind. So you erase all of your Git repos, including those in Alioth or whatever. But Debian Wheezy has some of your packages. And three years from now, I decided to be the maintainer. So, having fully commented and individually marked patches is a sort-of-way to avoid a situation akin to the tentacles of evil. Now, it's not that I'm criticizing your workflow. I have sen many ways to manage patches in quite a natural way, and I undestand it might be way easier when dealing with complex packages (FWIW I usually deal with very little complexity). Still, it is an argument.
about 18 hours ago
(Posted 24 May 2013 by gg234)
(Posted 24 May 2013 by gg234)
about 19 hours ago
The Radix Heap is a priority queue that has better caching behavior than the well-known binary heap, but also two restrictions: (a) that all the keys in the heap are integers and (b) that you can never insert a new item that is smaller t...
The Radix Heap is a priority queue that has better caching behavior than the well-known binary heap, but also two restrictions: (a) that all the keys in the heap are integers and (b) that you can never insert a new item that is smaller than all the other items currently in the heap. These restrictions are not that severe. The Radix Heap still works in many algorithms that use heaps as a subroutine: Dijkstra’s shortest-path algorithm, Prim’s minimum spanning tree algorithm, various sweepline algorithms in computational geometry. Here is how it works. If we assume that the keys are 32 bit integers, the radix heap will have 33 buckets, each one containing a list of items. We also maintain one global value last_deleted, which is initially MIN_INT and otherwise contains the last value extracted from the queue. The invariant is this: The items in bucket $k$ differ from last_deleted in bit $k - 1$, but not in bit $k$ or higher. The items in bucket 0 are equal to last_deleted. For example, if we compare an item from bucket 10 to last_deleted, we will find that bits 31–10 are equal, bit 9 is different, and bits 8–0 may or may not be different. Here is an example of a radix heap where the last extracted value was 7: As an example, consider the item 13 in bucket 4. The bit pattern of 7 is 0111 and the bit pattern of 13 is 1101, so the highest bit that is different is bit number 3. Therefore the item 13 belongs in bucket $3 + 1 = 4$. Buckets 1, 2, and 3 are empty, but that’s because a number that differs from 7 in bits 0, 1, or 2 would be smaller than 7 and so isn’t allowed in the heap according to restriction (b). Operations When a new item is inserted, it has to be added to the correct bucket. How can we compute the bucket number? We have to find the highest bit where the new item differs from last_deleted. This is easily done by XORing them together and then finding the highest bit in the result. Adding one then gives the bucket number: bucket_no = highest_bit (new_element XOR last_deleted) + 1 where highest_bit(x) is a function that returns the highest set bit of x, or $-1$ if x is 0. Inserting the item clearly preserves the invariant because the new item will be in the correct bucket, and last_deleted didn’t change, so all the existing items are still in the right place. Extracting the minimum involves first finding the minimal item by walking the lowest-numbered non-empty bucket and finding the minimal item in that bucket. Then that item is deleted and last_deleted is updated. Then the bucket is walked again and all the items are redistributed into new buckets according to the new last_deleted item. The extracted item will be the minimal one in the data structure because we picked the minimal item in the redistributed bucket, and all the buckets with lower numbers are empty. And if there were a smaller item in one of the buckets with higher numbers, it would be differing from last_deleted in one of the more significant bits, say bit $k$. But since the items in the redistributed bucket are equal to last_deleted in bit $k$, the hypothetical smaller item would then have to also be smaller than last_deleted, which it can’t be because of restriction (b) mentioned in the introduction. Note that this argument also works for two-complement signed integers. We have to be sure this doesn’t violate the invariant. First note that all the items that are being redistributed will satisfy the invariant because they are simply being inserted. The items in a bucket with a higher number $k$ were all different from the old last_deleted in the $(k-1)$th bit. This bit must then necessarily also be different from the $(k-1)$th bit in the new last_deleted, because if it weren’t, the new last_deleted would itself have belonged in bucket $k$. And finally, since the bucket being redistributed is the lowest-numbered non-empty one, there can’t be any items in a bucket with a lower number. So the invariant still holds. In the example above, if we ext
about 21 hours ago
If you see a bunch of X.org packages upgrades pending in your Squeeze or brand new Wheezy system, don't panic! Ilja van Sprundel, a security researcher from IOActive, has discovered a large number of issues in the various X client l...
If you see a bunch of X.org packages upgrades pending in your Squeeze or brand new Wheezy system, don't panic! Ilja van Sprundel, a security researcher from IOActive, has discovered a large number of issues in the various X client libraries and he has worked with X.Org's security team to analyze, confirm, and fix these issues. You can find more information in the security avisory from X.org. The Debian Security and X.org teams have quickly updated all the affected packages in Squeeze and Wheezy. You can see the full list of updates in the debian-security-announce mailing list archives.
about 21 hours ago
DeviceGuru writes "BeagleBoard.org has begun shipping its faster, cheaper BeagleBone Black SBC with a new Linux 3.8 kernel, supporting Device Tree technology for more streamlined ARM development. The $45 BeagleBone Black runs Linux or An...
DeviceGuru writes "BeagleBoard.org has begun shipping its faster, cheaper BeagleBone Black SBC with a new Linux 3.8 kernel, supporting Device Tree technology for more streamlined ARM development. The $45 BeagleBone Black runs Linux or Android on a 1GHz TI Sitara AM3359 SOC, doubles the RAM to 512MB of its predecessor, and adds a micro-HDMI port. The updated kernel gives the BeagleBone Black access to a new Direct Rendering Manager (DRM) display driver architecture, as well as full support for the Device Tree data structure introduced to streamline ARM development in Linux 3.7. The project was hesitant to move up to such a recent kernel, but decided it was time to bite the bullet and support the Device Tree. By doing the hard work of switching to Device Tree now, BeagleBoard.org and its developer community can save a lot of configuration and maintenance headaches down the line, says BeagleBoard.org co-founder Jason Kridner. Fortunately, a modified 3.2 kernel 'coming soon' should provide the necessary bridge from the old cape driver architecture to the new one." Read more of this story at Slashdot.
about 21 hours ago