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
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, 
Web cookies are meant to store user preferences for a website, but
they are often misused for evil purposes, such as tracking him,
sometimes across distinct websites.For the user, there is a simple solution to that problem: set up his
browser to refuse cookies by default, and use an extension such as
Today was a very busy day for me.
First up, I had my chiropractic adjustment. Then I had my half-yearly dental
checkup. Then I got stuck into cleaning the house. Fortunately I'd done a bit
the afternoon before, otherwise I'd never have gotten it done before my
massage. I'm starting to seriously consider getting a cleaner. I can make much
better use of the limited time I get than cleaning the house.
Zoe's Kindergarten has a Parent Advisory Group or something like that, which
meets monthly. I wasn't able to attend the first one, but the second one was
today, about an hour before pickup, so I grabbed a quick lunch after my massage
and biked over to Kindergarten early.
The meeting wasn't particularly interesting. The majority of it revolved around
fund raising.
At pickup time, Zoe was fast asleep again, and had another massive meltdown
when I woke her up. It took forever to get her out. She wanted to give Megan a
hug, but Megan had long gone. Then, rather fortuitously, Megan's Dad texted me
to tell me they were in the playground on the neighbouring school grounds, so I
managed to use that as an incentive to get Zoe moving.
I didn't know until today, but at the foothill of the neighbouring primary
school, there's some play equipment. A few of the Kindergarten kids seem to
have a play over there after Kindergarten. Megan and Zoe played there for a bit
before it was time to go.
Once we got home, we unpacked and then walked down to the Hawthorne Garage to
get some vegetables, and then, after buying some milk from the corner store and
another grumpy meltdown, I figured a quiet afternoon was in order, so Zoe
watched a DVD for a bit while I prepared dinner.
I'd bumped into the mother of Zoe's friends Eva and Layla from her old day care
while I was at the dentist in the morning, and arranged for her to drop by to
pick up a copy of the photos I'd taken at their 4th birthday party. I'd hoped
that she'd bring the girls with her, and had told Zoe they'd be dropping by,
but unfortunately she came on the way to picking them up from day care, so Zoe
was a bit disappointed. We did arrange to have them over for dinner next
Friday, so I'm sure that will be very exciting.
After that, we had dinner, and a fairly uneventful bedtime. It's hot again, so
I hope that doesn't mess with her sleep.
To provide geolocation-aware answers with
Moreover, caching makes the problem worse.
To solve this problem, a new
Not many authoritative servers support this extension (
When I installed