Jonathan Dowland: R.I.P. Terry Pratchett
Terry Pratchett dies, aged
66.
It looks like his last novel will be The Long Utopia, the fourth book in the
Long Earth series, co-written with Stephen Baxter.
Terry Pratchett dies, aged
66.
It looks like his last novel will be The Long Utopia, the fourth book in the
Long Earth series, co-written with Stephen Baxter.
TZ=GMT+24 date +%Y%m%d"
Ex;
#!/bin/bash -x
x= TZ=GMT+24 date +%Y%m%d
delcnt=0
for files in find /path/of/file/to/eraser/ -name \*$x*.bin.gz
do
echo "Deleting file $files"
/bin/rm -rf $files
delcnt=$(($delcnt + 1))
done
Best regards
Charles E. Rivera
Solaris Server Specialist Engeeneer
But then, Linux.com still aggregates Phoronix, so their focus is
not exactly on quality.
Dear Planet Debian,
the Debian Zsh Packaging Team (consisting of Michael Prokop, Frank
Terbeck, Richard Hartmann and myself) wonders if there s still a reason
to build and ship a zsh-static package in Debian.
There are multiple reasons:
the problem is that user/group lookups are disabled in the -static build because glibc s NSS ABI is unstable and static binaries still need to load NSS modules dynamically.One solution here would be to compile against dietlibc, but for that we d need an ncurses library built against dietlibc (#471208), too.
Do you need Debian s zsh-static package? If so, please send an e-mail to us Debian Zsh Maintainers <pkg-zsh-devel@lists.alioth.debian.org> and state that you use zsh-static, and, if you want, please also state why or how you re using it. Thanks in advance! Mika, Frank, RichiH and Axel
Dear Planet Debian,
the Debian Zsh Packaging Team (consisting of Michael Prokop, Frank
Terbeck, Richard Hartmann and myself) wonders if there s still a reason
to build and ship a zsh-static package in Debian.
There are multiple reasons:
the problem is that user/group lookups are disabled in the -static build because glibc s NSS ABI is unstable and static binaries still need to load NSS modules dynamically.One solution here would be to compile against dietlibc, but for that we d need an ncurses library built against dietlibc (#471208), too.
Do you need Debian s zsh-static package? If so, please send an e-mail to us Debian Zsh Maintainers <pkg-zsh-devel@lists.alioth.debian.org> and state that you use zsh-static, and, if you want, please also state why or how you re using it. Thanks in advance! Mika, Frank, RichiH and Axel
I thinking archiving is important, archive.org is
great, and I'm proud of what little contribution I've made to
date.
Someone recently pointed out that an upload I had made is now inaccessible.
In it's place is a short message: this item is unavailable due to issues with its content.What issues are not made clear. I've never been contacted by
archive.org about this, not even to be
admonished, should they have felt that to be necessary. I've tried contacting
them to find out what the issues are but have heard nothing back.
It's worth remembering: Just because it's available now, even on archive.org,
doesn't mean it will be Tomorrow!
After seeing what the Wildfly (formerly JBoss AS) and Liferay combo does to /tmp, and somewhat attempting to fix it, I saw JVM_TMP in the Debian tomcat7 init script and thought, oh no, not another one.
Is that even safe, what they do here, or is that a possibility to instantly pwn?
The net is full of literature for how to obtain temporary files and directories, but there is nothing about how to reliably obtain paths under /tmp or, more generally, directories not just writable for one single user (think the g+w thing that got FusionForge CVE-2013-1423).
The scenario here is: I am root, and I want to start something as another user, and pass it a stable path, such as /tmp/liferay. So I can just mkdir /tmp/liferay die; chown thatuser /tmp/liferay and, in the stop process, rm -rf /tmp/liferay, right? (Of course not. Also, bad example, as the liferay thing can also be started as thatuser, and our devs regularily need to do that, the init script is there just for the admin convenience and reboot-safety. But I still am interested if there is a secure way to achieve this.)
The tomcat7 scenario is trivial : on That Other Init System , it would just get its private /tmp declared in the .service file, and good is, no more hassle. That s one I have to give you. (No idea if this is actually shipped in jessie. Our production systems run wheezy anyway, so there is not even the slightest bit of temptation. Plus, it would not solve the liferay issue, see above. Still, a point for going into the right direction.)
The idea here is the same. It creates a directory on start and tears it down on stop. If there was nothing to do on start, the init script could just use mktemp -d. Heck, maybe it still should, but it would need to note down, and communicate to the stop instance, the actual name used. What a drag
This is something I see popping up from time to time. I want to use stable paths for SSH session multiplexing control sockets in my ssh_config(5) file, but have them on tmpfs (Linux) or mfs (BSD) so they get properly removed on reboot. No Unix traditionally has per-user temporary directories that are clean and created after reboot. (Adjusting the paths is trivial once you have them.) Android has it worse, what with not having a world-writable tmp directory, which the shell needs e.g. for here documents; there are two components here, to have a directory the current user can write to, and to know its location. Some fail at the first, some at the second, some at both, and the classic /tmp is not the cure, as we have seen. (But if you ever see mksh erroring out due to lack of write permissions somewhere (including /sqlite_stmt_journals which used to be it) as non-root on Android, or even as root, set TMPDIR to something writable; it s tracked, so the change gets active immediately.)
I've been playing around with Debian and Docker a little bit. I
found Joey Hess' post about Docker trust interesting reading, in particular this advice:
I'd recommend only trusting docker images you build yourself. I have some docker images published somewhere that are built with 100% straight debootstrap with no modifications (...) But I'm not going to link to them, because again, you should only trust docker images you built yourself.On that advice, I did exactly that. I've pushed the basic scripts I used to build my images to github:jmtd/debian-docker. Suggestions welcome! However, I am planning to share the images I build, at least for my own convenience, on the Docker repository. I'm hoping to publish some PGP-signed sums somewhere so you could verify the binary images on the Docker registry if you so wish. The three images I'm currently maintaining are:
jmtd/debian:buildd: a sid image, variant buildd, to use as the base
for package buildsjmtd/debian:wheezy: a minbase wheezyjmtd/debian:wheezy-i386: a minbase wheezy, i386
A few months ago I decided it would be good to re-rip my CD collection,
retaining a lossless digital copy, and set about planning the project. I
then realised I hadn't the time to take the project on for the time being
and parked it, but not before figuring a few bits and pieces out.
Starting at the beginning, with ripping the CDs. The most widely used CD
ripping software on Linux systems is still cdparanoia, which is pretty good,
but it's still possible to get bad CD rips, and I've had several in a very
small sample size. On Windows systems, the recommended ripper is Exact Audio
Copy, or EAC for short. EAC calculates checksums of ripped CDs or tracks
and compares them against an online database of rips called AccurateRip. It
also calibrates your CD drive against the same database and uses the calculated
offset during the rip.
I wasn't aware of any AccurateRip-supporting rippers until recently when
Mark Brown introduced me to
morituri. I've done some
tentative experiments and it appears to be produce identical rips to EAC for
some sample CDs (with different CD reading hardware too).
Fundamentally, AccurateRip is a proprietary database, and so I think the
longer term goal in the F/OSS community should be to create an alternative,
open database of rip checksums and drive offsets. The audio community has
already been burned by the CDDB database going proprietary, but at least
we now have the far superior MusicBrainz.
A few months ago, I wrote
the definitive guide about Python method declaration,
which had quite a good success. I still fight every day in
OpenStack to have the developers declare their methods
correctly in the patches they submit.
Automation plan
The thing is, I really dislike doing the same things over and over again.
Furthermore, I'm not perfect either, and I miss a lot of these kind of problems
in the reviews I made. So I decided to replace me by a program a more
scalable and less error-prone version of my brain.
In OpenStack, we rely on flake8 to
do static analysis of our Python code in order to spot common programming
mistakes.
But we are really pedantic, so we wrote some extra hacking rules that we
enforce on our code. To that end, we wrote a flake8 extension called
hacking. I really like these rules, I
even recommend to apply them in your own project. Though I might be biased or
victim of Stockholm syndrome. Your call.
Anyway, it's pretty clear that I need to add a check for method declaration in
hacking. Let's write a flake8 extension!
Typical error
The typical error I spot is the following:
class Foo(object):
# self is not used, the method does not need
# to be bound, it should be declared static
def bar(self, a, b, c):
return a + b - c
class Foo(object):
@staticmethod
def bar(a, b, c):
return a + b - c
To check correctly if all the methods in a Python file are correctly declared,
we need to do the following:
ast.ClassDef)ast.FunctionDef) of that class
statement to check if it is already declared with @staticmethod or notself) is used somewhere in the methodsetup.cfg:
[entry_points]
flake8.extension =
[ ]
H904 = hacking.checks.other:StaticmethodChecker
H905 = hacking.checks.other:StaticmethodChecker
@core.flake8ext
class StaticmethodChecker(object):
def __init__(self, tree, filename):
self.tree = tree
def run(self):
pass
run() and yield the problem we discover following pep8
expected signature, which is a tuple of (lineno, col_offset, error_string,
code).
This AST is made for walking
The ast module provides the walk function, that allow to iterate easily on
a tree. We'll use that to run through the AST. First, let's write a loop that
ignores the statement that are not class definition.
@core.flake8ext
class StaticmethodChecker(object):
def __init__(self, tree, filename):
self.tree = tree
def run(self):
for stmt in ast.walk(self.tree):
# Ignore non-class
if not isinstance(stmt, ast.ClassDef):
continue
for stmt in ast.walk(self.tree):
# Ignore non-class
if not isinstance(stmt, ast.ClassDef):
continue
# If it's a class, iterate over its body member to find methods
for body_item in stmt.body:
# Not a method, skip
if not isinstance(body_item, ast.FunctionDef):
continue
body_item. First, we need to
check if it's already declared as static. If so, we don't have to do any
further check and we can bail out.
for stmt in ast.walk(self.tree):
# Ignore non-class
if not isinstance(stmt, ast.ClassDef):
continue
# If it's a class, iterate over its body member to find methods
for body_item in stmt.body:
# Not a method, skip
if not isinstance(body_item, ast.FunctionDef):
continue
# Check that it has a decorator
for decorator in body_item.decorator_list:
if (isinstance(decorator, ast.Name)
and decorator.id == 'staticmethod'):
# It's a static function, it's OK
break
else:
# Function is not static, we do nothing for now
pass
for/else form of Python, where the else is
evaluated unless we used break to exit the for loop.
for stmt in ast.walk(self.tree):
# Ignore non-class
if not isinstance(stmt, ast.ClassDef):
continue
# If it's a class, iterate over its body member to find methods
for body_item in stmt.body:
# Not a method, skip
if not isinstance(body_item, ast.FunctionDef):
continue
# Check that it has a decorator
for decorator in body_item.decorator_list:
if (isinstance(decorator, ast.Name)
and decorator.id == 'staticmethod'):
# It's a static function, it's OK
break
else:
try:
first_arg = body_item.args.args[0]
except IndexError:
yield (
body_item.lineno,
body_item.col_offset,
"H905: method misses first argument",
"H905",
)
# Check next method
continue
self argument, therefore we raise the
H905 code to signal a method that misses its first argument.
Now you know why we registered this second pep8 code along with H904 in
setup.cfg. We have here a good opportunity to kill two birds with one stone.
The next step is to check if that first argument is used in the code of the
method.
for stmt in ast.walk(self.tree):
# Ignore non-class
if not isinstance(stmt, ast.ClassDef):
continue
# If it's a class, iterate over its body member to find methods
for body_item in stmt.body:
# Not a method, skip
if not isinstance(body_item, ast.FunctionDef):
continue
# Check that it has a decorator
for decorator in body_item.decorator_list:
if (isinstance(decorator, ast.Name)
and decorator.id == 'staticmethod'):
# It's a static function, it's OK
break
else:
try:
first_arg = body_item.args.args[0]
except IndexError:
yield (
body_item.lineno,
body_item.col_offset,
"H905: method misses first argument",
"H905",
)
# Check next method
continue
for func_stmt in ast.walk(body_item):
if six.PY3:
if (isinstance(func_stmt, ast.Name)
and first_arg.arg == func_stmt.id):
# The first argument is used, it's OK
break
else:
if (func_stmt != first_arg
and isinstance(func_stmt, ast.Name)
and func_stmt.id == first_arg.id):
# The first argument is used, it's OK
break
else:
yield (
body_item.lineno,
body_item.col_offset,
"H904: method should be declared static",
"H904",
)
ast.walk again and we look for the use of the
same variable named (usually self, but if could be anything, like cls for
@classmethod) in the body of the function. If not found, we finally yield the
H904 error code. Otherwise, we're good.
Conclusion
I've
submitted this patch to hacking,
and, finger crossed, it might be merged one day. If it's not I'll create a new
Python package with that check for flake8. The actual submitted code is a bit
more complex to take into account the use of
abc module and include some
tests.
As you may have notice, the code walks over the module AST definition several
times. There might be a couple of optimization to browse the AST in only one
pass, but I'm not sure it's worth it considering the actual usage of the tool.
I'll let that as an exercise for the reader interested in contributing to
OpenStack.
Happy hacking!
$ v4l2-ctl -d /dev/video1 --list-formats-ext... and motion:
[..]
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUV 4:2:2 (YUYV)
[..]
Size: Discrete 1280x720
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.133s (7.500 fps)
Interval: Discrete 0.200s (5.000 fps)
[..]
Index : 1
Type : Video Capture
Pixel Format: 'MJPG' (compressed)
Name : MJPEG
[..]
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.042s (24.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.133s (7.500 fps)
Interval: Discrete 0.200s (5.000 fps)
[..]
$ motionOk, so both formats
[..]
[1] [NTC] [VID] v4l2_set_pix_format: Config palette index 17 (YU12) doesn't work.
[1] [NTC] [VID] v4l2_set_pix_format: Supported palettes:
[1] [NTC] [VID] v4l2_set_pix_format: (0) YUYV (YUV 4:2:2 (YUYV))
[1] [NTC] [VID] v4l2_set_pix_format: 0 - YUV 4:2:2 (YUYV) (compressed : 0) (0x56595559)
[1] [NTC] [VID] v4l2_set_pix_format: (1) MJPG (MJPEG)
[1] [NTC] [VID] v4l2_set_pix_format: 1 - MJPEG (compressed : 1) (0x47504a4d)
[1] [NTC] [VID] v4l2_set_pix_format Selected palette YUYV
[1] [NTC] [VID] v4l2_do_set_pix_format: Testing palette YUYV (1280x720)
[1] [NTC] [VID] v4l2_do_set_pix_format: Using palette YUYV (1280x720) bytesperlines 2560 sizeimage 1843200 colorspace 00000008
[..]
YUYV and MJPG are supported and recognized and I can choose both via the v4l2palette configuration variable, citing motion.conf: # v4l2_palette allows to choose preferable palette to be use by motionNow motion uses
# to capture from those supported by your videodevice. (default: 17)
# E.g. if your videodevice supports both V4L2_PIX_FMT_SBGGR8 and
# V4L2_PIX_FMT_MJPEG then motion will by default use V4L2_PIX_FMT_MJPEG.
# Setting v4l2_palette to 2 forces motion to use V4L2_PIX_FMT_SBGGR8
# instead.
#
# Values :
# V4L2_PIX_FMT_SN9C10X : 0 'S910'
# V4L2_PIX_FMT_SBGGR16 : 1 'BYR2'
# V4L2_PIX_FMT_SBGGR8 : 2 'BA81'
# V4L2_PIX_FMT_SPCA561 : 3 'S561'
# V4L2_PIX_FMT_SGBRG8 : 4 'GBRG'
# V4L2_PIX_FMT_SGRBG8 : 5 'GRBG'
# V4L2_PIX_FMT_PAC207 : 6 'P207'
# V4L2_PIX_FMT_PJPG : 7 'PJPG'
# V4L2_PIX_FMT_MJPEG : 8 'MJPEG'
# V4L2_PIX_FMT_JPEG : 9 'JPEG'
# V4L2_PIX_FMT_RGB24 : 10 'RGB3'
# V4L2_PIX_FMT_SPCA501 : 11 'S501'
# V4L2_PIX_FMT_SPCA505 : 12 'S505'
# V4L2_PIX_FMT_SPCA508 : 13 'S508'
# V4L2_PIX_FMT_UYVY : 14 'UYVY'
# V4L2_PIX_FMT_YUYV : 15 'YUYV'
# V4L2_PIX_FMT_YUV422P : 16 '422P'
# V4L2_PIX_FMT_YUV420 : 17 'YU12'
#
v4l2_palette 17
YUYV as default mode as shown by its output. So it seems that all I have to do is to choose MJPEG in my motion.conf: v4l2_palette 8Testing again ...
$ motion... and another issue is turning up :( The output above goes on and on and on and there is no video capturing. So accordingly to $searchengine the above happens to a lot of people. I just found one often suggested fix: pre-load v4l2convert.so from libv4l-0:
[..]
[1] [NTC] [VID] vid_v4lx_start: Using V4L2
[1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1 items
[1] [NTC] [VID] v4l2_set_control: setting control "Brightness" to 25 (ret 0 )
Corrupt JPEG data: 5 extraneous bytes before marker 0xd6
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
[1] [NTC] [VID] v4l2_set_control: setting control "Brightness" to 14 (ret 0 )
Corrupt JPEG data: 1 extraneous bytes before marker 0xd5
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
[1] [NTC] [VID] v4l2_set_control: setting control "Brightness" to 36 (ret 0 )
Corrupt JPEG data: 3 extraneous bytes before marker 0xd2
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
[1] [NTC] [VID] v4l2_set_control: setting control "Brightness" to 58 (ret 0 )
Corrupt JPEG data: 1 extraneous bytes before marker 0xd7
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
[1] [NTC] [VID] v4l2_set_control: setting control "Brightness" to 80 (ret 0 )
Corrupt JPEG data: 4 extraneous bytes before marker 0xd7
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
[1] [ERR] [ALL] motion_init: Error capturing first image
[1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 16 items
Corrupt JPEG data: 4 extraneous bytes before marker 0xd1
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 11 extraneous bytes before marker 0xd1
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 3 extraneous bytes before marker 0xd4
[1] [CRT] [VID] mjpegtoyuv420p: Corrupt image ... continue
Corrupt JPEG data: 7 extraneous bytes before marker 0xd1
[..]
$ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4l/v4l2convert.so motionBut the problem persists
MJPEG format and don't get 30 fps at 1280x720 pixelsYU12) and pre-loading v4l2convert.so makes use of YU12 and the framerate at least raises to 24 fps: $ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libv4lg/v4l2convert.so motionFinally! :) The results are nice. It would maybe even be a good idea to limit the framerate a bit, to e.g. 20. So that is a tested configuration for the Logitech C910 running at a resolution of 1280x720 pixels:
[..]
[1] [NTC] [VID] v4l2_do_set_pix_format: Testing palette YU12 (1280x720)
[1] [NTC] [VID] v4l2_do_set_pix_format: Using palette YU12 (1280x720) bytesperlines 1280 sizeimage 1382400 colorspace 00000008
[..]
[1] [NTC] [EVT] event_new_video FPS 24
[..]
v4l2_palette 17Now all this made me curious, which framerate is possible at a resolution of 1920x1080 pixels now and how the results look like. Although I get 24 fps too, the resulting movie suffers of jumps every few frames. So here I got pretty good results with a more conservative setting. By increasing framerate - tested up to 15 fps with good results - pre_capture needed to be decreased accordingly to values between 1..3 to minimize jumps:
width 1280
height 720
framerate 20
minimum_frame_time 0
pre_capture 10 # 0,5 seconds pre-recording
post_capture 50 # 2,5 seconds after-recording
auto_brightness on
ffmpeg_variable_bitrate 2 # best quality
v4l2_palette 17Both configurations lead to satisfying results. Of course the latter will easily fill your hardrive :) TODOI guess, the results can be optimzed further by playing around with ffmpeg_bps and ffmpeg_variable_bitrate. Maybe then it is possible to record without jumps at higher framerates too(?). I also didn't test the various norm settings (PAL, NTSC, etc.).
width 1920
height 1080
framerate 12
minimum_frame_time 0
pre_capture 6 # 0,5 seconds pre-recording
post_capture 30 # 2,5 seconds after-recording
auto_brightness on
ffmpeg_variable_bitrate 2 # best quality
I found an interesting side-effect of the Juniper firewalls when you introduce IPv6. In hindsight it appears perfectly reasonable but if you are not aware of it in the first place you may have a much more permissive firewall than you thought. My setup is such that my internet address changes every time I connect to an ISP. I have services behind the Juniper that I want to expose onto the Internet, in this case a mailserver.
Most of the documentation states to have a reasonably open firewall rule and a nat rule.
[edit security nat]
destination
pool mailserver-smtp
address 10.1.1.1/32 port 25;
[edit security policies]
from-zone Internet to-zone Internal
policy Mailserver
match
source-address any;
destination-address any;
application smtp;
then
permit;
Pretty standard stuff and its documented in plenty of places. We cannot set a destination address because its dynamic, so set it to all. My next step was, ok my mailserver is on IPv4 and IPv6, how do I let the IPv6 connections in?
Any means ANY
That s where I noticed I had a problem, they could already get in. In fact anyone could get to the mailserver (good) and anything else that had an open SMTP port on my network and used IPv6 (bad). It seems that any destination address means ANY IPv4 or IPv6 address. Both myself and the writers of the documentation hadn t initially thought of what happens when you add IPv6.
The solution is to not let any destination, but any IPv4 and the specific mailserver destination. First create an addressbook entry for the IPv6 address of the mailserver.
[edit security address-book global] address mailserver-ipv6 2001:Db8:1111:2222::100/128;then adjust the rule
[edit security policies]
from-zone Internet to-zone Internal
policy Mailserver
match
source-address any;
destination-address [ any-ipv4 mailserver-ipv6];
application smtp;
then
permit;
That way there is access to the mailserver using either IPv4 or IPv6. I m also going to try to see if I adjust the rule so the destination only includes the mailserver address (both IPv4 and IPv6) even though the IPv4 is NATed and see if that works.
acpi -V as
well as via the KDE widget. Hibernation via systemctl
hibernate works as well.
What does not work is the warning when my battery is low, or
automagic hibernation when shutting the lid or when the battery
level is critical.
From what I gather, something in the communication between
upower and KDE broke down, but I can't find what it is. I have also
been told that Cinnamon is affected as well, so this seems to be a
more general problem
Sadly, me and anyone else who's affected has been unable to fix
this.
So, dear lazyweb, please help.
In loosely related news, this old status is still
valid. UMTS is stable-ish now but even though I saved the SIM's
PIN, KDE always displays a "SIM PIN unlock request" prompt after
booting or hibernating. Once I enter that PIN, systemd tells me
that a system policy prevents the change and wants my user
password. If anyone knows how to get rid of that, I would
also appreciate any pointers.
Four years ago, whilst looking for something unrelated, I stumbled across
Tom Morton's port of "Frontier: Elite
II" for the Atari to i386/OpenGL.
This took me right back to playing Frontier on my Amiga in the mid-nineties. I
spent a bit of time replaying Frontier and its sequel, First Encounters, for
which there exists an interesting family of community-written game engines
based on a reverse-engineering of the original DOS release.
I made some scrappy notes about engines, patches etc. at the time, which are on
my frontier page.
With the recent release of Elite: Dangerous, I thought I'd pick up where I
left in 2010 and see if I could get the Thargoid ship. I'm nowhere near yet,
but I've spent some time trying to maximize income during the game's initial
Soholian Fever period. My record in a JJFFE-derived engine (and winning the
Wiccan Ware race during the same period) is currently 727,800. Can you do
better?
$ gpg --keyserver keyring.debian.org --send-keys 24B17D29#
# be sure to do "apt-get install python-gnupg"
#
import gnupg
import datetime
def check_keys(keyring, tab = ""):
gpg = gnupg.GPG(keyring = keyring)
gpg.decode_errors = 'replace' # see: https://bugs.debian.org/738483
keys = gpg.list_keys()
now = datetime.datetime.now()
for key in keys:
uids = key['uids']
uid = uids[0]
if key['expires'] != '':
expire = datetime.datetime.fromtimestamp(int(key['expires']))
diff = expire - now
if diff.days < 0:
print(u' EXPIRED: Key of expired days ago.'.format(tab, uid, -diff.days))
mangled_uids = [ u for u in uids if u'\ufffd' in u ]
if len(mangled_uids) > 0:
print(u' MANGLED: Key of has some mangled uids: '.format(tab, uid, mangled_uids))
keyrings = [
"/usr/share/keyrings/debian-keyring.gpg",
"/usr/share/keyrings/debian-maintainers.gpg"
]
for keyring in keyrings:
print(u"CHECKING ".format(keyring))
check_keys(keyring, tab = " ")
I ve been meaning to move away from Movable Type for a while; they no longer provide the Open Source variant, I ve had some issues with the commenting side of things (more the fault of spammers than Movable Type itself) and there are a few minor niggles that I wanted to resolve. Nothing has been particularly pressing me to move and I haven t been blogging as much so while I ve been keeping an eye open for a replacement I haven t exerted a lot of energy into the process. I have a little bit of time at present so I asked around on IRC for suggestions. One was ikiwiki, which I use as part of helping maintain the SPI website (and think is fantastic for that), the other was Jekyll. Both are available as part of Debian Jessie.
Jekyll looked a bit fancier out of the box (I m no web designer so pre-canned themes help me a lot), so I decided to spend some time investigating it a bit more. I d found a Movable Type to ikiwiki converter which provided a starting point for exporting from the SQLite3 DB I was using for MT. Most of my posts are in markdown, the rest (mostly from my Blosxom days) are plain HTML, so there wasn t any need to do any conversion on the actual content. A minor amount of poking convinced Jekyll to use the same URL format (permalink: /:year/:month/:title.html in the _config.yml did what I wanted) and I had to do a few bits of fix up for some images that had been uploaded into MT, but overall fairly simple stuff.
Next I had to think about comments. My initial thought was to just ignore them for the moment; they weren t really working on the MT install that well so it s not a huge loss. I then decided I should at least see what the options were. Google+ has the ability to embed in your site, so I had a play with that. It worked well enough but I didn t really want to force commenters into the Google ecosystem. Next up was Disqus, which I ve seen used in various places. It seems to allow logins via various 3rd parties, can cope with threading and deals with the despamming. It was easy enough to integrate to play with, and while I was doing so I discovered that it could cope with importing comments. So I tweaked my conversion script to generate a WXR based file of the comments. This then imported easily into Disqus (and also I double checked that the export system worked).
I m sure the use of a third party to handle comments will put some people off, but given the ability to export I m confident if I really feel like dealing with despamming comments again at some point I can switch to something locally hosted. I do wish it didn t require Javascript, but again it s a trade off I m willing to make at present.
Anyway. Thanks to Tollef for the pointer (and others who made various suggestions). Hopefully I haven t broken (or produced a slew of new posts for) any of the feed readers pointed at my site (but you should update to use feed.xml rather than any of the others - I may remove them in the future once I see usage has died down).
(On the off chance it s useful to someone else the conversion script I ended up with is available. There s a built in Jekyll importer that may be a better move, but I liked ending up with a git repository containing a commit for each post.)
Earlier today I came across some classical sheet music that included a "playalong" CD, just like a regular recording except it omits the solo cello part. After a quick listen it became clear there were two problems:
Next, we rip the material from the CD:
$ sudo apt-get install ripit flac [..] $ ripit --coder 2 --eject --nointeraction [..]
$ apt-get install sox libsox-fmt-mp3 [..] $ sox 01.flac 01.mp3 pitch -7.85 tempo 1.00 # (Tuning notes) $ sox 02.flac 02.mp3 pitch -7.85 tempo 0.95 # Too fast! $ sox 03.flac 03.mp3 pitch -7.85 tempo 1.01 # Close.. $ sox 04.flac 04.mp3 pitch -7.85 tempo 1.03 # Too slow!
Unfortunately I could not go on stage at the 31st Chaos Communication
Congress
to present reproducible builds in
Debian alongside Mike Perry
from the Tor Project and Seth Schoen from the Electronic Frontier
Foundation. I've tried to make it up for it, though and we have made
amazing progress.
Wiki reorganization
What was a massive and frightening wiki
page
now looks really more welcoming:
Depending on what one is looking for, it should be much easier to find.
There's now a high-level status overview given on the landing page,
maintainers can learn how to make their packages
reproducible,
enthusiasts can more easily find what can help the
project,
and we have even started writing some
history.
.buildinfo for all packages
New year's eve saw me hacking Perl to write
dpkg-genbuildinfo.
Similar to dpkg-genchanges, it's run by dpkg-buildpackage to produce
.buildinfo control
files.
This is where the build environment, and hash of source and binary
packages are recorded. This script, integrated with dpkg, replace the
previous debhelper interim solution written by Niko Tyni.
We used to fix mtimes in control.tar and
data.tar
using a specific addition to debhelper named dh_fixmtimes. To better
support the ALWAYS_EXCLUDE environment variable and for pragramtic
reasons, we moved the process in
dh_builddeb.
Both changes were quickly pushed to our continuous integration
platform. Before, only packages using
dh would create a .buildinfo and
thus eventually be considered reproducible. With these modifications,
many more packages had their chance and this shows:
Yes, with our experimental
toolchain
we are now at more than eighty percent! That's more than 17200 source
packages!
srebuild
Another big item on the todo-list was crossed over by Johannes Schauer.
srebuild
is a wrapper around sbuild:
Given aUnderstanding problems Over 1700 packages have now been reviewed to understand why build results could not be reproduced on our experimental platform. The variations between the two builds are currently limited to time and file ordering, but this still has uncovered many problems. There are still toolchain fixes to be made (more than 180 packages for the PHP registry) which can make many packages reproducible at once, but others like C pre-processor macros will require many individual changes. debbindiff, the main tool used to understand differences, has gained support for.buildinfofile, it first finds a timestamp of Debian Sid from snapshot.debian.org which contains the requested packages in their exact versions. It then runs sbuild with the right architecture as given by the.buildinfofile and the right base system to upgrade from, as given by the version of thebase-filespackage version in the.buildinfofile. Using two hooks it will install the right package versions and verify that the installed packages are in the right version before the build starts.
.udeb, TrueType and
OpenType fonts, PNG and PDF files. It's less likely to crash on problems
with encoding or external tool. But most importantly for large package,
it has been made a lot faster, thanks to Reiner Herrmann and Helmut
Grohne. Helmut has also been able to spot cross-compilation
issues by using debbindiff!
Targeting our efforts
It gives warm fuzzy feelings to hit the 80% mark, but it would be a bit
irrelevant if this would not concern packages that matter. Thankfully,
Holger worked on producing statistics for more specific package
sets. Mattia
Rizzolo has also done great work to improve the scripts generating the
various pages visible on
reproducible.debian.net.
All
essential
and
build-esential
packages, except gcc and bash, are considered reproducible or have
patches ready. After some lengthy builds, I also managed to come up
with a patch to make
linux build reproducibly.
Miscellaneous
After my initial attempt to modify
r-base to remove a timestamp
in R packages, Dirk Eddelbuettel discussed the issue with upstream and
came up with a better patch. The latter has already been merged
upstream!
Dirk's solution is to allow timestamps to be set using an external
environment variable. This is also how I modified
FontForge to make it possible to
reproduce
fonts.
Identifiers generated by
xsltproc have also been an
issue. After reviewing my initial patch, Andrew Awyer came up with a
much nicer solution. Its potential performance implications need to be
evaluated before submission, though.
Chris West has been working on packages built with
Maven
amongst other things.
PDF generated by
GhostScript,
another painful source of troubles, is being worked on by Peter De
Wachter.
Holger got X.509 certificates signed by the CA cartel for
jenkins.debian.net and reproducible.debian.net. No more scary
security messages now. Let's hope next year we will be able to get
certificates through Let's Encrypt!
Let's make a difference together
As you can imagine with all that happened in the past weeks, the
#debian-reproducible IRC channel has been a cool place to hang out.
It's very energizing to get together and share contributions, exchange
tips and discuss hardest points. Mandatory quote:
* h01ger is very happy to see again and again how this is a nice
learning circle...! i've learned a whole lot here too... in
just 3 months... and its going on...!
Reproducible builds are not going to change anything for most of our
users. They simply don't care how they get software on their computer.
But they care to get the right software without having to worry about
it. That's our responsibility, as developers. Enabling users to
trust their software is important and a major contribution, we as
Debian, can make to the wider free software movement. Once Jessie is
released, we should make a collective effort to make reproducible builds
an highlight of our next release.
Next.