Dominique Dumont: Easier Lcdproc package upgrade with automatic configuration merge
Hello
This blog explains how next lcdproc package provide easier upgrader with automatic configuration merge.
Here s the current situation: lcdproc is shipped with several configuration files, including
*
* user is asked once by
* no further question are asked (no ucf style questions). For instance, here s an upgrade from
* check
* edit the configuration with a GUI (see Managing Lcdproc configuration with cme for more details) Here s a screenshot of the GUI:
More information
* libconfig-model-lcdproc-perl package page. This package provides a configuration model for
* This blog explains how this model is generated from upstream
* How to adapt a package to perform configuration upgrade with Config::Model Next steps Automatic configuration merge can be applied to other packages. But my free time is already taken by the maintenance of Config::Model and the existing models, there s no room for me to take over another package. On the other hand, I will definitely help people who want to provide automatic configuration merge on their packages. Feel free to contact me on:
* config-model-user mailing list
* debian-perl mailing list (where Config::Model is often used to maintain debian package file with
* #debian-perl IRC channel All the best
Tagged: config-model, configuration, debian, Perl, upgrade
/etc/LCDd.conf. This file is modified upstream at every lcdproc release to bring configuration for new lcdproc drivers. On the other hand, this file is always customized to suit the specific hardware of the user s system. So upgrading a package will always lead to a conflict during upgrade. User will always be required to choose whether to use current version or upstream version.
Next version of libconfig-model-lcdproc-perl will propose user whether to perform automatic merge of the configuration: upstream change are taken into account while preserving user change.
The configuration upgrade shown is based on Config::Model can be applied to other package.
Current lcdproc situation
To function properly, lcdproc configuration must always be adapted to suit the user s hardware. On the following upgrade, upstream configuration is often updated so user will often be shown this question:
Configuration file '/etc/LCDd.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** LCDd.conf (Y/I/N/O/D/Z) [default=N] ?
This question is asked in the middle of an upgrade and can be puzzling for an average user.
Next package with automatic merge
Starting from lcdproc 0.5.6, the configuration merge is handled automatically by the packaging script with the help of Config::Model::Lcdproc.
When lcdproc is upgraded to 0.5.6, the following changes are visible:*
lcdproc depends on libconfig-model-lcdproc-perl* user is asked once by
debconf whether to use automatic configuration upgrades or not.* no further question are asked (no ucf style questions). For instance, here s an upgrade from
lcdproc_0.5.5 to lcdproc_0.5.6:
$ sudo dpkg -i lcdproc_0.5.6-1_amd64.deb (Reading database ... 322757 files and directories currently installed.) Preparing to unpack lcdproc_0.5.6-1_amd64.deb ... Stopping LCDd: LCDd. Unpacking lcdproc (0.5.6-1) over (0.5.5-3) ... Setting up lcdproc (0.5.6-1) ... Changes applied to lcdproc configuration: - server ReportToSyslog: '' -> '1' # use standard value update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults Starting LCDd: LCDd. Processing triggers for man-db (2.6.6-1) ...Note: the automatic upgrade currently applies only to
LCDd.conf. The other configuration files of lcdproc are handled the usual way.
Other benefits
User will also be able to:* check
lcdproc configuration with sudo cme check lcdproc* edit the configuration with a GUI (see Managing Lcdproc configuration with cme for more details) Here s a screenshot of the GUI:
More information
* libconfig-model-lcdproc-perl package page. This package provides a configuration model for lcdproc.* This blog explains how this model is generated from upstream
LCDd.conf.* How to adapt a package to perform configuration upgrade with Config::Model Next steps Automatic configuration merge can be applied to other packages. But my free time is already taken by the maintenance of Config::Model and the existing models, there s no room for me to take over another package. On the other hand, I will definitely help people who want to provide automatic configuration merge on their packages. Feel free to contact me on:
* config-model-user mailing list
* debian-perl mailing list (where Config::Model is often used to maintain debian package file with
cme)* #debian-perl IRC channel All the best
Tagged: config-model, configuration, debian, Perl, upgrade
I will try to report my Debian activities here. I am trying to retake them
and as I'm usually busy at
That's it, I'm going to do it: I have now committed myself to writing a scalable, caching, reverse HTTP proxy.
The biggest question right now is implementation language; obviously "threading" of some kind is required so it is a choice between Perl's anyevent, Python's twisted, Rubys event machine, or node.js.
I'm absolutely, definitely, not going to use C, or C++.
Writing a
I have just released version 1.7.2 of
Core Rendering with Glamor
I ve hacked up the intel driver to bypass all of the UXA paths
when Glamor is enabled so I m currently running an X server that uses
only Glamor for all rendering. There are still too many fall backs, and
performance for some operations is not what I d like, but it s
entirely usable. It supports DRI3, so I even have GL applications
running.
Core Rendering Status
I ve continued to focus on getting the core X protocol rendering
operations complete and correct; those remain a critical part of many
X applications and are a poor match for GL. At this point, I ve got
accelerated versions of the basic spans functions, filled rectangles,
text and copies.
GL and Scrolling
OpenGL has been on a many-year vendetta against one of the most common
2D accelerated operations copying data within the same object, even
when that operation overlaps itself. This used to be the most
performance-critical operation in X; it was used for scrolling your
terminal windows and when moving windows around on the screen.
Reviewing the OpenGL 3.x spec, Eric and I both read the glCopyPixels
specification as clearly requiring correct semantics for overlapping
copy operations it says that the operation must be equivalent to
reading the pixels and then writing the pixels. My CopyArea
acceleration thus uses this path for the self-copy case. However, the
ARB decided that having a well defined blt operation was too nice to
the users, so the current 4.4 specification adds explicit language to
assert that this is not well defined anymore (even in the face of the
existing language which is pretty darn unambiguous).
I suspect we ll end up creating an extension that offers what we need
here; applications are unlikely to stop scrolling stuff around, and
GPUs (at least Intel) will continue to do what we want. This is the
kind of thing that makes GL maddening for 2D graphics the GPU does
what we want, and the GL doesn t let us get at it.
For implementations not capable of supporting the required semantic,
someone will presumably need to write code that creates a temporary
copy of the data.
PBOs for fall backs
For operations which Glamor can t manage, we need to fall back to
using a software solution. Direct-to-hardware acceleration
architectures do this by simply mapping the underlying GPU object to
the CPU. GL doesn t provide this access, and it s probably a good
thing as such access needs to be carefully synchronized with GPU
access, and attempting to access tiled GPU objects with the CPU
require either piles of CPU code to de-tile accesses (ala wfb), or
special hardware detilers (like the Intel GTT).
However, GL does provide a fairly nice abstraction called pixel buffer
objects (PBOs) which work to speed access to GPU data from the CPU.
The fallback code allocates a PBO for each relevant X drawable, asks
GL to copy pixels in, and then calls fb, with the drawable now
referencing the temporary buffer. On the way back out, any potentially
modified pixels are copied back through GL and the PBOs are freed.
This turns out to be dramatically faster than malloc ing temporary
buffers as it allows the GL to allocate memory that it likes, and for
it to manage the data upload and buffer destruction asynchronously.
Because X pixmaps can contain many X windows (the root pixmap being
the most obvious example), they are often significantly larger than
the actual rendering target area. As an optimization, the code only
copies data from the relevant area of the pixmap, saving considerable
time as a result. There s even an interface which further restricts
that to a subset of the target drawable which the Composite
function uses.
Using Scissoring for Clipping
The GL scissor operation provides a single clipping rectangle. X
provides a list of rectangles to clip to. There are two obvious ways
to perform clipping here either perform all clipping in software,
or hand each X clipping rectangle in turn to GL and re-execute the
entire rendering operation for each rectangle.
You d think that the former plan would be the obvious choice; clearly
re-executing the entire rendering operation potentially many times is
going to take a lot of time in the GPU.
However, the reality is that most X drawing occurs under a single
clipping rectangle. Accelerating this common case by using the
hardware clipper provides enough benefit that we definitely want to
use it when it works. We could duplicate all of the rendering paths
and perform CPU-based clipping when the number of rectangles was above
some threshold, but the additional code complexity isn t obviously
worth the effort, given how infrequently it will be used. So I haven t
bothered. Most operations look like this:
The GSoC student application period is over, and the last two days were pretty interesting.
For a few years now, 
Installing fresh hot
I ve made a new release of my curiously popular SteamOS derivative, and given it a new name: Stephenson s Rocket.
You can download the new release from
Since introduction of
I woke up at 2am, and then spent over an hour trying to get back to sleep. That
was phenomenally annoying. Then at 5am, Zoe's white noise app on her Nexus 7
decided to go a bit wonky (as it does from time to time), which caused her to
wake up. I couldn't convince her tablet to behave, so I just let her get in bed
with me, but neither of us went back to sleep. I think at about 6am I told her
she could turn on the TV so I could try and squeeze in a bit more rest.
I managed to forget to put the oats in the Thermomix when I made porridge this
morning. It took me a while to figure out why the consistency and colour didn't
look quite right when I dished it up. Yep, it was one of those mornings.
Zoe had her trial ballet class this morning, at 9:45am in Coorparoo. I managed
to get Zoe organised a bit early, so we were the first ones there. It's in a
church hall, and has a nice floor, with a mirrored wall and barres on each
long wall.
Eventually the other girls arrived, there were 5 regulars in total. A good
sized class.
I had mixed feelings when I discovered that parents weren't normally able to be
present in the dance studio to watch the classes. I was today, because it was a
trial, but once Zoe starts regular classes, I'll have to wait outside. I'm
disappointed I won't be able to watch, but it'll be nice to have 45 minutes to
myself.
Zoe did really well in the class today. She picked everything up very quickly,
and I don't think she'll be negatively impacted by having entered in Term 2.
She seemed very comfortable and looked like she enjoyed herself.
Not long after we arrived, the heavens opened in a massive downpour, which
continued when we had to leave. It was a fair dash back to the car. I'd had
plans of a picnic lunch in New Farm Park, but scrapped them on account of the
weather.
We got home, and had a late morning tea, and then Zoe wanted to play with her
Marble Run. After that, we gave Smudge a good brushing and then Zoe wanted to
do some craft and painting.
I let Zoe set herself up, and it was fun to see what bits and pieces she chose
to dig out of the arts and craft bins. She wanted to make another crown for
Mummy's boss, but we don't have any crown making stuff at home (yet), so she
ended up starting to decorate a wand and gluing a pom pom on a shoe box, before
moving on to painting her cardboard box cubby house and rocket. She wanted to
start doing some hand painting right around lunch time, but I managed to
convince her to do that after lunch.
We had some lunch, and then she did a little bit more painting and stickering
before her nap. She passed out for her nap very quickly.
After her nap, I asked her if she wanted to paint or do science, and without
hesitation, she chose science!
I delved into the "Weather" chapter of 365 Science Experiments and
we did a couple with ice cubes and salt and then she saw one where you stick a
balloon over the neck of a glass bottle and put it in hot water and the balloon
"inflates", so we did that one as well. We also popped a balloon to simulate
thunder. It was all nice and easy, without a lot of preparation required.
After that, we did a bit of a clean up and then Zoe watched some of her DVDs
from the library while she waited for Sarah to arrive to pick her up.
It was a good day today. No meltdowns.







