[sane-devel] As instructed by /etc/udev/rules.d/libsane.rules

m. allan noah kitno455 at gmail.com
Mon Nov 16 13:41:33 UTC 2009

On Mon, Nov 16, 2009 at 12:04 AM, Alesh Slovak <alesh.slovak at avasys.jp> wrote:
> Hi Allan,
> Thanks for your comments.
> m. allan noah wrote:
>>> We can't use a static rules file because each distro uses slightly
>>> different
>>> syntax. And even then, we can't keep up with all the changes distros
>>> themselves keep making to their udev rules files resulting in breakage
>>> nearly every time a new version of a distro is released. This happened
>>> again
>>> with this months round of distro updates.
>> Have you ever noticed that SANE itself does not have this problem-
>> Why? Because we use a license that allows the distros to repackage our
>> code, and they generate the rules in the proper format. Perhaps you
>> could do the same? (though, they may not release often enough to keep
>> up with you)
> epkowa uses exactly the same license and some distros do package it. This is
> not the issue. The problem is, as you mention, that our main goal is to
> provide day one support for devices. We can't do this by having distros
> package our driver. That is the only thing standing in the way of epkowa
> being a part of SANE as far as we are concerned. Even if we were to include
> epkowa in SANE, we would still need to release our own packages to meet our
> hardware release schedules. iscan, the SANE frontend for epkowa that we
> ship, is a different matter because it requires some proprietary bits, but
> it is irrelevant to this discussion.

I was under the impression that certain scanners also required
proprietary plugins, but that is irrelevant to this discussion.

>>> I have been thinking about modifying SANE's udev rules generation script
>>> in
>>> some way to allow for adding new rules and trying somehow to convince
>>> distros to package that up so third parties could use it in their install
>>> scripts to safely add new rules, maybe to a "third party" rules file or
>>> something.
>>> What do people think about this idea?
>> That's fine, but it would require that the distro patch our tool to
>> output their preferred format. I assume most of them do this already,
>> but cannot be sure.
> As far as I understood, they do this already, and if they don't, there
> shouldn't be any need to start if the additions/changes I am suggesting were
> to be made. The only difference for distributors is that they would need to
> start packaging the udev rules generation script whereas now they only use
> it once to generate the rules files they package.

well, its more than just udev, it is also hal .fdi files too. but
certainly the distros could compile the script such that its default
output was proper type and location for their system.

>>> Another possibility might be to convince distros to ship the desc files
>>> and
>>> the udev rules generation script and have third parties add their desc
>>> files
>>> to a folder and trigger a regeneration of the rules.
>> Sounds dangerous.
> More dangerous than third parties directly fiddling with udev rules files
> like we do now in epkowa? Or having the user scan as root?
> By dangerous are you thinking about malicious or incorrectly written .desc
> files? Or something else?

I think re-writing a distro provided rules file is a bad idea. I would
make more sense for a third party to make a small rules file for only
its equipment. I don't have a problem with sane supplying a script to
make that easier.

"The truth is an offense, but not a sin"

More information about the sane-devel mailing list