LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-25-2013, 06:51 AM   #1
joenew
Member
 
Registered: Mar 2010
Distribution: slackware 15.0 64bit
Posts: 190

Rep: Reputation: 23
"Bugfix" for sane package in Slackware-14.0


Hi all!
I've sent two mail to slackware dev team:
One to: volkerdi at slackware dot com
And the other to: info at slackware dot com
Last mail is sent on june 18, but I have not received any reply yet.
So I've decided to report it on this forum, so that someone can help me to contact slack developers.
This first time I report a bug, so... hope there's some user knows how to report it to slackware team.

Anyway I'll report my mail message there, look at following lines
Sorry for my bad english in advance!!!
Bye!

Quote:
Hi!
I'm a slackware user. I've nocticed a problem with my USB scanner:
1- when I plug scanner after system boot all works fine.
2- when scanner is cannected before PC power on I can only use it as "root".

I've asked for a solution at slacky.eu/forum (an Italian/international slackware community). And I've found a similar behavior also on linuxquestion.org.
We have solved by editing udev rules file included in sane package:

sane-1.0.22-i486-5

An other user said you have add a bugfix to this udev rules file:
/lib/udev/rules.d/80-libsane.rules

But this fix affects just current branch of slackware.
---------------------------------------------
Tue Jun 11 21:36:35 UTC 2013

a/ntfs-3g-2013.1.13-i486-1.txz: Upgraded.
Removed the HAL 10-ntfs-3g-policy.fdi file.
xap/sane-1.0.23-i486-3.txz: Rebuilt.
Fixed the build script to apply the add|change fix to 80-libsane.rules
correctly. Thanks to Phil Bevan.
Removed the HAL 10-libsane.fdi file.

--------------------------------------------------------------------

I think there are many stable users too would like to use their scanners properly... ;-)

I've edited that files like your Sane slackbuild script does (I'll report slackbuild lines).

----------------------------------------------------------

# Add the default udev rules. Use group "lp" rather than "scanner" to avoid
# breaking CUPS access for multifunction printer/scanner devices (possibly
# the most common type of scanner these days)
#
# Use ACTION!="add|change" to avoid skipping these rules if coming from an
# initrd where udev was started.
mkdir -p $PKG/lib/udev/rules.d
cat tools/udev/libsane.rules \
| sed -e "s/GROUP=\"scanner\"/GROUP=\"lp\"/g" \
| sed -e "s/MODE=\"0664\"/MODE=\"0660\"/g" \
| sed -e "s/ACTION!=\"add\"/ACTION!=\"add|change\"/g" \
> $PKG/lib/udev/rules.d/80-libsane.rules

------------------------------------

Ok. For my needs I've solved just using ACTION="add|change" instead "ACTION!=add".
Now I can let my scanner connected to my pc usb port and use it also as simple user...
What do you think about a rebuilt of sane package also for slackware stable tree, as you have done for current one?

Hope this report could help you to make slackware better. Thanks for your work!
Sorrry, for my bad english, anyway hope it is clear enough...

Regards! :-D
 
Old 06-26-2013, 12:42 PM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
So, it doesn't work if you add yourself to the 'scanner' group ?
 
Old 06-26-2013, 06:27 PM   #3
joenew
Member
 
Registered: Mar 2010
Distribution: slackware 15.0 64bit
Posts: 190

Original Poster
Rep: Reputation: 23
Hi!
First of all, I've solved. Hope It was clear.
Exactly, it itsn't a problem strictly related to groups but anyway it ragards permissions of scanner device file...
I think right group user must belong is "lp" not "scanner"
Udev should change that file permissions to "root:lp" if I well remember.
And it does it when you plug scanner via usb after system boot.
But it does not if scanner is connected before boot, in this case you have to replug usb scanner cable to use it as simple user, otherwise it works just as root.
I'll report my actual fine working permissions etc:
Code:
root@darkstar:~# lsusb |grep Mustek
Bus 001 Device 005: ID 055f:0002 Mustek Systems, Inc. ScanExpress 600 CU
root@darkstar:~# ls -l /dev/bus/usb/001/005
crw-rw-r-- 1 root lp 189, 4 giu 26 09:15 /dev/bus/usb/001/005
root@darkstar:~# grep -A10 -i mustek.*600.*cu /lib/udev/rules.d/80-libsane.rules |grep 0002
ATTRS{idVendor}=="055f", ATTRS{idProduct}=="0002", MODE="0660", GROUP="lp", ENV{libsane_matched}="yes"
But I've now solved by editing udev rule file. Before this permissions were:
Code:
crw-rw-r-- 1 root root 189, 4 giu 26 09:15 /dev/bus/usb/001/005
Udev rule file involved is
Code:
/lib/udev/rules.d/80-libsane.rules
Above you can see what exactly Pat patch does:
Code:
cat tools/udev/libsane.rules \
| sed -e "s/GROUP=\"scanner\"/GROUP=\"lp\"/g" \
| sed -e "s/MODE=\"0664\"/MODE=\"0660\"/g" \
| sed -e "s/ACTION!=\"add\"/ACTION!=\"add|change\"/g" \
> $PKG/lib/udev/rules.d/80-libsane.rules
I've manually solved by editing that udev rule file changing:
Code:
ACTION!="add"
in
Code:
ACTION!="add|change"
Now udev changes group owning from "root" to "lp" even when scanner is connected before I power on my PC.

A part of this explained.
My post was for ask how exactly let staff know about this bug and suggest to patch also stable branch of slackware not only current one.

How to report a bug (not security related) and suggest a solution to slackware development team?

Anyway thanks for your reply!
 
Old 06-26-2013, 06:36 PM   #4
ljb643
Member
 
Registered: Nov 2003
Posts: 526

Rep: Reputation: Disabled
Sounds like the same issue as discussed in this thread. A USB scanner was generating a CHANGE rather than ADD action, which did not trigger the sane-provided rule to set the permissions. It is probably specific to certain scanners and/or PCs.
 
Old 06-27-2013, 03:56 AM   #5
joenew
Member
 
Registered: Mar 2010
Distribution: slackware 15.0 64bit
Posts: 190

Original Poster
Rep: Reputation: 23
Yes, I've read that thread when I've noticed this problem.
But look at slackware current changelog:
http://slackware.com/changelog/current.php?cpu=i386
I'll report lines about sane package:
Code:
+--------------------------+
Tue Jun 11 21:36:35 UTC 2013
a/ntfs-3g-2013.1.13-i486-1.txz: Upgraded.
       Removed the HAL 10-ntfs-3g-policy.fdi file.
xap/sane-1.0.23-i486-3.txz: Rebuilt.
       Fixed the build script to apply the add|change fix to 80-libsane.rules
       correctly. Thanks to Phil Bevan.
       Removed the HAL 10-libsane.fdi file.
+--------------------------+
So, Pat patched this "bug" about 20 days ago.
If you look at my post above I've reported also a piece of Pat sane slackbuild in which you can see how exactly 80-libsane.rules is edited to fix this bug.
Now, the question is:
why slackware stable branch sane package has not been involved by this fix?
How can I report this directly to slackware staff?
 
Old 06-27-2013, 07:47 AM   #6
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
Quote:
why slackware stable branch sane package has not been involved by this fix?
Traditionally, Slackware stable releases are only patched with security updates.
A fix for an idiosyncratic local device that can be readily implemented with a custom udev rule does not constitute a security update.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Self-built Slackware package "PACKAGE DESCRIPTION" shows nothing catkin Slackware 5 10-24-2010 01:39 PM
Building a Slackware Package when trackinstall -i="make install" fails Alexvader Slackware 2 12-12-2009 01:39 PM
How to build "OpenOffice_3.x_tr" (Turkish) package for Slackware? sertmusluman Slackware 5 12-03-2008 06:04 AM
LXer: Slackware's "magic package maker" LXer Syndicated Linux News 0 11-30-2007 12:11 PM
"base package check failed" flightgear on Slackware 12 cdale77 Linux - Games 0 08-18-2007 12:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration