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

m. allan noah kitno455 at gmail.com
Mon Nov 16 01:57:52 UTC 2009


On Sun, Nov 15, 2009 at 6:53 PM, Alesh Slovak <alesh.slovak at avasys.jp> wrote:
> m. allan noah wrote:
>>
>> agreed. I have just had the same discussion in the bug tracker with a
>> user of the proprietary brother backend. I think it is time that these
>> external drivers started providing their own proper installation,
>> instead of relying on us.
>
> Easy for you to say. In reality this is very difficult to do properly. I
> know, we've been trying to do this in epkowa for years. In an attempt to
> follow distro policy, epkowa generates its udev rules file from the libsane
> one it finds installed on the system. This has gotten us and our users
> burned several times.
>
> 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)

> 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.

> If I were to do the legwork on this, what would be the chances that
> something like this could make it into SANE? Getting distros to package the
> script is another issue and third parties to actually use it, yet another.

Sure- I don't think it hurts to ship another binary.

> I suppose at least one possible benefit to SANE would be that the number of
> users coming to you for support relating to this problem should be
> drastically reduced.

I don't know about that. We will just end up telling users to download
a .desc file from someplace, and run a script as root, but then the
vendor has not patched the script, and it makes the wrong format, or
they blow away the wrong udev file, etc etc...

> 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.

> Any thoughts, or is this going outside the scope of SANE?

Well, you've seen yourself just how many random variations there are
on device perms. So, I'm inclined to give the distros the info they
need, and make specific rule generation their problem. That should
encourage a bit more standardization on their part. If we find the man
power to release sane a little more frequently, that would also help.

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



More information about the sane-devel mailing list