RSSAmplifier

Blog

blog/tags/planet

David Bremner

cs.unb.caRSS feed ↗68 posts

Latest posts

Hibernate on the pocket reform 13/n

Context See hibernate-pocket , hibernate-pocket-2 , hibernate-pocket-3 , hibernate-pocket-4 , hibernate-pocket-5 , hibernate-pocket-6 , hibernate-pocket-7 , hibernate-pocket-8 , hibernate-pocket-9 hibernate-pocket-10 hibernate-pocket-11 hibernate-pocket-12 Some progress upstream Recently Sebastian Reichel at Collabora [1] has made a few related commits, apparently inspired in part by my kvetching…

Hibernate on the pocket reform 12/n

Context See hibernate-pocket , hibernate-pocket-2 , hibernate-pocket-3 , hibernate-pocket-4 , hibernate-pocket-5 , hibernate-pocket-6 , hibernate-pocket-7 , hibernate-pocket-8 , hibernate-pocket-9 hibernate-pocket-10 hibernate-pocket-11 Update to latest rockchip-devel For some reason I decided to try re-applying the PCI series. Good news: the pci series finally applies cleanly. $ git fetch…

Hibernate on the pocket reform 11/n

Context See hibernate-pocket , hibernate-pocket-2 , hibernate-pocket-3 , hibernate-pocket-4 , hibernate-pocket-5 , hibernate-pocket-6 , hibernate-pocket-7 , hibernate-pocket-8 , hibernate-pocket-9 hibernate-pocket-10 Update to latest rockchip-devel rebase reform-patches on top of collabora/rockchip-devel pci reset series has new conflicts try dropping from rebase and re-applying $ b4 am 20250715…

Using git-annex for email and notmuch metadata

Introducing git-remote-notmuch Based on an idea and ruby implementation by Felipe Contreras, I have been developing a git remote helper for notmuch . I will soon post an updated version of the patchset to the notmuch mailing list (I wanted to refer to this post in my email). In this blog post I'll outline my experiments with using that tool, along with git-annex to store (and sync) a moderate…

Hibernate on the pocket reform 10/n

Context See hibernate-pocket , hibernate-pocket-2 , hibernate-pocket-3 , hibernate-pocket-4 , hibernate-pocket-5 , hibernate-pocket-6 , hibernate-pocket-7 , hibernate-pocket-8 , hibernate-pocket-9 Finally applying the pci reset series. $ b4 am 20250715 -pci-port-reset-v6-0-6f9cce94e7bb oss.qualcomm.com $ git am -3…

Hibernate on the pocket reform 9/n

Context See hibernate-pocket , hibernate-pocket-2 , hibernate-pocket-3 , hibernate-pocket-4 , hibernate-pocket-5 , hibernate-pocket-6 , hibernate-pocket-7 , hibernate-pocket-8 Sidequest: Install u-boot-menu Don't be like me and reboot without configuring u-boot-menu . Although the defaults make sense for most people, in my case I lost access to the serial console (because that custom config needed…

Hibernate on the pocket reform 8/n

Context See hibernate-pocket , hibernate-pocket-2 , hibernate-pocket-3 , hibernate-pocket-4 , hibernate-pocket-5 , hibernate-pocket-6 , hibernate-pocket-7 Sidequest: Fix patches continued 1001-pci_dw_rockchip_enable_l0s_capability.patch doesn't apply cleanly either b4 am 1744594051-209255-1-git-send-email-shawn.lin@rock-chips.com This one has a usable blob index 21dc99c git log --raw --all…

Hibernate on the pocket reform 7/n

Context See hibernate-pocket , hibernate-pocket-2 , hibernate-pocket-3 , hibernate-pocket-4 , hibernate-pocket-5 , hibernate-pocket-6 Building upstream-ish kernel Roughly following the "bisecting upstream linux" section of reform-debian-packages/README.md $ git clone https :// gitlab.collabora.com / hardware -enablement / rockchip -3588 / linux.git collabora $ cd collabora && git git switch -c…

Hibernate on the pocket reform 6/n

Context See hibernate-pocket , hibernate-pocket-2 , hibernate-pocket-3 , hibernate-pocket-4 , hibernate-pocket-5 Another kernel patch? Confused about prerequisites, I wrote A reply from Niklas Cassel suggested I look at https://lore.kernel.org/linux-pci/1744940759-23823-1-git-send-email-shawn.lin@rock-chips.com/ EDIT It turns out that this patch is already shipped as part of the mnt research…

Hibernate on the pocket reform 5/n

Context See hibernate-pocket , hibernate-pocket-2 hibernate-pocket-3 hibernate-pocket-4 A Kernel Patch The follow patch looks potentially relevant: https://patchwork.kernel.org/project/linux-rockchip/patch/20250509-b4-pci_dwc_reset_support-v3-1-37e96b4692e7@wdc.com/ git clone https://github.com/torvalds/linux.git (Is there a better place? kernel.org is pretty opaque) are the pre-reqs in mnt…

Hibernate on the pocket reform 4/n

Context See hibernate-pocket , hibernate-pocket-2 hibernate-pocket-3 Log from (failed) platform test After some fun I got the serial console working and re-ran the platform test. After a bit of reading the serial console, I realized that rmmod dwc3 was causing more problems than it solved, in particularly reliable hard lockup on one of the CPUs. My revised test script is set -x echo platform > /…

Hibernate on the pocket reform 3/n

Context See hibernate-pocket , hibernate-pocket-2 Serial console hardware Manual is unclear about name of connector (J16 in schematics, J17 in manual). Also numbering of pins is not given afaict. Clone https://source.mnt.re/reform/pocket-reform.git Look at pocket-reform-motherboard.kicad_pcb From the PCB I can confirm J16 and pins numbered left (sysctl) to right. attach "dtech" prolific PL2303…

Hibernate on the pocket reform 2/n

Context See hibernate-pocket Testing continued following a suggestion of gordon1 , unload the mediatek module first. The following seems to work, either from the console or under sway echo devices > / sys / power / pm_test echo reboot > / sys / power / disk rmmod mt76x2u echo disk > / sys / power / state modprobe mt76x2u It even works via ssh (on wired ethernet) if you are a bit more patient for…

Hibernate on the pocket reform 1/n

Configuration script: https://docs.kernel.org/power/basic-pm-debugging.html kernel is 6.15.4-1~exp1+reform20250628T170930Z State of things normal reboot works Either from the console, or from sway, the intial test of reboot mode hibernate fails. In both cases it looks very similar to halting. the screen is dark (but not completely black) the keyboard is still illuminated the system-controller…

Generating ikiwiki markdown from org

My web pages are (still) in ikiwiki, but lately I have started authoring things like assignments and lectures in org-mode so that I can have some literate programming facilities. There is is org-mode export built-in, but it just exports source blocks as examples (i.e. unhighlighted verbatim). I added a custom exporter to mark up source blocks in a way ikiwiki can understand. Luckily this is not…

Added a derived backend for org export

See web-stacker for the background. yantar92 on #org-mode pointed out that a derived backend would be a cleaner solution. I had initially thought it was too complicated, but I have to agree the example in the org-mode documentation does pretty much what I need. This new approach has the big advantage that the generation of URLs happens at export time, so it's not possible for the displayed program…

Generating links to a web IDE from org-beamer

The Emacs part is superceded by a cleaner approach I the upcoming term I want to use KC Lu's web based stacker tool . The key point is that it takes (small) programs encoded as part of the url. Yesterday I spent some time integrating it into my existing org-beamer workflow. In my init.el I have ( defun org-babel-execute :stacker ( body params ) ( let * (( table '( ? ? \n ? : ? / ?? ? # ? [ ? ] ? ?…

Installing Debian using the OVH rescue environment

Problem description(s) For some of its cheaper dedicated servers, OVH does not provide a KVM (in the virtual console sense) interface. Sometimes when a virtual console is provided, it requires a horrible java applet that won't run on modern systems without a lot of song and dance. Although OVH provides a few web based ways of installing, I prefer to use the debian installer image I'm used to and…

Why won't crusty old host recognize my shiny new terminal emulator?

Spiffy new terminal emulators seem to come with their own terminfo definitions. Venerable hosts that I ssh into tend not to know about those. kitty comes with a thing to transfer that definition, but it breaks if the remote host is running tcsh (don't ask). Similary the one liner for alacritty on the arch wiki seems to assume the remote shell is bash. Forthwith, a dumb shell script that works to…

Baby steps towards schroot and slurm cooperation.

Unfortunately schroot does not maintain CPU affinity 1 . This means in particular that parallel builds have the tendency to take over an entire slurm managed server, which is kindof rude. I haven't had time to automate this yet, but following demonstrates a simple workaround for interactive building. ╭─ simplex:~ ╰─% schroot --preserve-environment -r -c polymake (unstable-amd64-sbuild)bremner…

git-annex and ikiwiki, not as hard as I expected

Background So apparently there's this pandemic thing, which means I'm teaching "Alternate Delivery" courses now. These are just like online courses, except possibly more synchronous, definitely less polished, and the tuition money doesn't go to the College of Extended Learning. I figure I'll need to manage share videos, and our learning management system, in the immortal words of Marie Kondo, does…

Tangling multiple files

I have lately been using org-mode literate programming to generate example code and beamer slides from the same source. I hit a wall trying to re-use functions in multiple files, so I came up with the following hack. Thanks 'ngz' on #emacs and Charles Berry on the org-mode list for suggestions and discussion. ( defun db-extract-tangle-includes () ( goto-char ( point-min )) ( let ((…

Yet another buildinfo database.

What? I previously posted about my extremely quick-and-dirty buildinfo database using buildinfo-sqlite . This year at DebConf , I re-implimented this using PostgreSQL backend, added into some new features. There is already buildinfo and buildinfos . I was informed I need to think up a name that clearly distinguishes from those two. Thus I give you builtin-pho . There's a README for how to set up a…

Dear UNB: please leave my email alone.

1 Background Apparently motivated by recent phishing attacks against @unb.ca addresses, UNB's Integrated Technology Services unit (ITS) recently started adding banners to the body of email messages. Despite (cough) several requests, they have been unable and/or unwilling to let people opt out of this. Recently ITS has reduced the size of banner; this does not change the substance of what is…

Debcamp activities 2018

Emacs 2018-07-23 NMUed cdargs NMUed silversearcher-ag-el Uploaded the partially unbundled emacs-goodies-el to Debian unstable packaged and uploaded graphviz-dot-mode 2018-07-24 packaged and uploaded boxquote-el uploaded apache-mode-el Closed bugs in graphviz-dot-mode that were fixed by the new version. filed lintian bug about empty source package fields 2018-07-25 packaged and uploaded…

Indexing Debian's buildinfo

Introduction Debian is currently collecting buildinfo but they are not very conveniently searchable. Eventually Chris Lamb's buildinfo.debian.net may solve this problem, but in the mean time, I decided to see how practical indexing the full set of buildinfo files is with sqlite. Hack First you need a copy of the buildinfo files. This is currently about 2.6G, and unfortunately you need to be a…

Converting PDFs to DJVU

Today I was wondering about converting a pdf made from scan of a book into djvu, hopefully to reduce the size, without too much loss of quality. My initial experiments with pdf2djvu were a bit discouraging, so I invested some time building gsdjvu in order to be able to run djvudigital . Watching the messages from djvudigital I realized that the reason it was achieving so much better compression…

Offline key signing with caff

After a mildly ridiculous amount of effort I made a bootable-usb key. I then layered a bash script on top of a perl script on top of gpg. What could possibly go wrong? #!/bin/bash infile=$1 keys=$(gpg --with-colons $infile | sed -n 's/^pub//p' | cut -f5 -d: ) gpg --homedir $HOME/.caff/gnupghome --import $infile caff -R -m no "${keys[*]}" today=$(date +"%Y-%m-%d") output="$(pwd)/keys-$today.tar"…

Bootable Debian USB

Umm. Somehow I thought this would be easier than learning about live-build. Probably I was wrong. There are probably many better tutorials on the web. Two useful observations: zeroing the key can eliminate mysterious grub errors, and systemd-nspawn is pretty handy. One thing that should have been obvious, but wasn't to me is that it's easier to install grub onto a device outside of any container.…

Dear Lenovo, it's not me, it's you.

I've been a mostly happy Thinkpad owner for almost 15 years. My first Thinkpad was a 570, followed by an X40, an X61s, and an X220. There might have been one more in there, my archives only go back a decade. Although it's lately gotten harder to buy Thinkpads at UNB as Dell gets better contracts with our purchasing people, I've persevered, mainly because I'm used to the Trackpoint, and I like the…

Exporting Debian packaging patches from git, (redux)*

(Debian) packaging and Git. The big picture is as follows. In my view, the most natural way to work on a packaging project in version control [1] is to have an upstream branch which either tracks upstream Git/Hg/Svn, or imports of tarballs (or some combination thereof, and a Debian branch where both modifications to upstream source and commits to stuff in ./debian are added [2]. Deviations from…

First Steps with Argyll and ColorHug

In April of 2012 I bought a ColorHug colorimeter. I got a bit discouraged when the first thing I realized was that one of my monitors needed replacing, and put the the colorhug in a drawer until today. With quite a lot of help and encouragment from Pascal de Bruijn , I finally got it going. Pascal has written an informative blog post on color management. That's a good place to look for background.…

Free OpenCL Implementations

It's spring, and young(ish?) hackers' minds turn to OpenCL. What is the state of things? I haven't the faintest idea, but I thought I'd try to share what I find out. So far, just some links. Details to be filled in later, particularly if you, dear reader, tell them to me. Specification khronos LLVM based front ends libclc pocl clover Mesa backend Rumours/hopes of something working in mesa 8.1?…

Converting nauty packaging to git-debpatch

I've been experimenting with a new packaging tool/workflow based on marking certain commits on my integration branch for export as quilt patches. In this post I'll walk though converting the package nauty to this workflow. Add a control file for the gitpkg export hook, and enable the hook: (the package is already 3.0 (quilt)) % echo ':debpatch: upstream..master' > debian/source/git-patches % git…

First steps with Racket PLoT

I have been in the habit of using R to make e.g. histograms of test scores in my courses. The main problem is that I don't really need (or am too ignorant to know that I need) the vast statistical powers of R, and I use it rarely enough that its always a bit of a struggle to get the plot I want. racket is a programming language in the scheme family, distinguished from some of its more spartan…

Debugging Duplicity Duplication

It seems kind of unfair, given the name, but duplicity really doesn't like to be run in parallel. This means that some naive admin (not me of course, but uh, this guy I know ;) ) who writes a crontab @daily duplicity incr $ARGS $SRC $DEST @weekly duplicity full $ARGS $SRC $DEST is in for a nasty surprise when both fire at the same time. In particular one of them will terminate with the not very…

Yet another git+quilt Debian packaging workflow

As of version 0.17, gitpkg ships with a hook called quilt-patches-deb-export-hook. This can be used to export patches from git at the time of creating the source package. This is controlled by a file debian/source/git-patches. Each line contains a range suitable for passing to git-format-patch(1). The variables UPSTREAM_VERSION and DEB_VERSION are replaced with values taken from debian/changelog.…

Beamer overlays in highlighted source code

I use a lot of code in my lectures, in many different programming languages. I use highlight to generate HTML (via ikiwiki ) for web pages. For class presentations, I mostly use the beamer LaTeX class. In order to simplify generating overlays, I wrote a perl script hl-beamer.pl to preprocess source code. An htmlification of the documention/man-page follows. NAME hl-beamer - Preprocessor for…

Which git commits should I send to upstream?

I recently decided to try maintaining a Debian package (bibutils) without committing any patches to Git. One of the disadvantages of this approach is that the patches for upstream are not nicely sorted out in ./debian/patches. I decided to write a little tool to sort out which commits should be sent to upstream. I'm not too happy about the length of it, or the name "git-classify", but I'm posting…

Converting META.yml to META.json

Before I discovered you could just point your browser at http://search.cpan.org/meta/Dist-Name-0.007/META.json to automagically convert META.yml and META.json, I wrote a script to do it. Anyway, it goes with my "I hate the cloud" prejudices :). use CPAN :: Meta ; use CPAN :: Meta :: Converter ; use Data :: Dumper ; my $meta = CPAN :: Meta- > load_file ( "META.yml" ); my $cmc = CPAN :: Meta ::…

Extracting text from pdf with pdfedit

It turns out that pdfedit is pretty good at extracting text from pdf files. Here is a script I wrote to do that in batch mode. #!/bin/sh # Print the text from a pdf document on stdout # Copyright: (c) 2006-2010 PDFedit team <http://sourceforge.net/projects/pdfedit> # Copyright: (c) 2010, David Bremner <david tethera.net> # Licensed under version 2 or later of the GNU GPL set -e if [ $# -lt 1 ];…

Tags are notmuch the point

Dear Julien ; After using notmuch for a while, I came to the conclusion that tags are mostly irelevant. What is a game changer for me is fast global search. And yes, I changed from using dovecot search, so I mean much faster than that. Actually I remember that from the Human Computer Interface course that I took in the early Neolithic era that speed of response has been measured as a key factor in…

Batch processing mails from caff

What is it? I was a bit daunted by the number of mails from people signing my gpg keys at debconf, so I wrote a script to mass process them. The workflow, for those of you using notmuch is as follows: $ notmuch show --format=mbox tag:keysign > sigs.mbox $ ffac sigs.mbox where previously I have tagged keysigning emails as "keysign" if I want to import them. You also need to run gpg-agent, since I…

Yet another tale of converting Debian packaging to Git

racket (previously known as plt-scheme) is an interpreter/JIT-compiler/development environment with about 6 years of subversion history in a converted git repo. Debian packaging has been done in subversion, with only the contents of ./debian in version control. I wanted to merge these into a single git repository. The first step is to create a repo and fetch the relevant history. TMPDIR =/ var /…

Distributed Issue Tracking with Git

I'm thinking about distributed issue tracking systems that play nice with git. I don't care about other version control systems anymore :). I also prefer command line interfaces, because as commentators on the blog have mentioned, I'm a Luddite (in the imprecise, slang sense). So far I have found a few projects, and tried to guess how much of a going concern they are. Git Specific ticgit I don't…

Functional programming on the JVM

I'm collecting information (or at least links) about functional programming languages on the the JVM. I'm going to intentionally leave "functional programming language" undefined here, so that people can have fun debating :). Functional Languages CAL clojure Fantom jaskell kawa sisc scala OCaml Languages and Libraries with functional features jruby jython javascript functional java Projects and…

Mirroring a gitolite collection

You have a gitolite install on host $MASTER, and you want a mirror on $SLAVE. Here is one way to do that. $CLIENT is your workstation, that need not be the same as $MASTER or $SLAVE. On $CLIENT, install gitolite on $SLAVE. It is ok to re-use your gitolite admin key here, but make sure you have both public and private key in .ssh, or confusion ensues. Note that when gitolite asks you to double…

Reading MPS files with glpk

Recently I was asked how to read mps (old school linear programming input) files. I couldn't think of a completely off the shelf way to do, so I write a simple c program to use the glpk library. Of course in general you would want to do something other than print it out again.

Remote invocation of sbuild

So this is in some sense a nadir for shell scripting. 2 lines that do something out of 111. Mostly cargo-culted from cowpoke by ron, but much less fancy. rsbuild foo.dsc should do the trick. #!/bin/sh # Start a remote sbuild process via ssh. Based on cowpoke from devscripts. # Copyright (c) 2007-9 Ron <ron debian.org> # Copyright (c) David Bremner 2009 <david tethera.net> # # Distributed according…

Counting symbols from a debian symbols file

I am currently making a shared library out of some existing C code, for eventual inclusion in Debian. Because the author wasn't thinking about things like ABIs and APIs, the code is not too careful about what symbols it exports, and I decided clean up some of the more obviously private symbols exported. I wrote the following simple script because I got tired of running grep by hand. If you run it…