[Bug 463464] New: sane-backends package cannot be build from source rpm

https://bugzilla.novell.com/show_bug.cgi?id=463464 Summary: sane-backends package cannot be build from source rpm Product: openSUSE 11.1 Version: Final Platform: Other OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dieter.jurzitza@t-online.de QAContact: qa@suse.de Found By: --- Due to an erratic line in the spec file it is impossible to build the sane-backends package. Obviously nobody ever has build this package from this source. I wonder how this could happen. Patch attached. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c1 --- Comment #1 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-04 13:23:02 MST --- Created an attachment (id=263120) --> (https://bugzilla.novell.com/attachment.cgi?id=263120) Comment a line that should not be present because it prevents the build -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c2 --- Comment #2 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-05 02:24:52 MST --- Well, I have been diving a little further into this. Two points here: 1.) IMHO there is too much sed-magic in the spec-file. Nothing against sed, but I think we've got that much that I decided to do some adaptations - look and see whether you like it. 2.) IMHO there is no need to treat USB scanners different from SCSI scanners and vice versa. Therefore I did some more: -> change permissions to 0660 root.lp for both types of scanner devices (other people do not need access anyway) -> add a logic that detects scsi-scanner devices - but no magic for autodetection, just set permissions owner and group accordingly. To wrap up: with this each scanner interface, be it USB, SCSI or lp is treated in the same manner and has the same owner, group and permissions, what makes sense from a consisitency point of view. A part of the sed-magic has been moved into sane-desc.c, this is where it belongs IMHO. Dieter Jurzitza -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c3 --- Comment #3 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-05 02:26:05 MST --- Created an attachment (id=263157) --> (https://bugzilla.novell.com/attachment.cgi?id=263157) This is the adapted create_scanner_database Now, if someone should change the location of the build directory in the spec-file nothing bad happens. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c4 --- Comment #4 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-05 02:27:37 MST --- Created an attachment (id=263158) --> (https://bugzilla.novell.com/attachment.cgi?id=263158) Here you can see my modifications on the specfile. I think a lot of the comments regarding the suse-stuff might go into a README.opensuse or something similar in the main directory of sane-backends. Just my 2 cents here. The spec file is much larger than neccessary what makes reading less easy. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c5 --- Comment #5 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-05 02:28:44 MST --- Created an attachment (id=263159) --> (https://bugzilla.novell.com/attachment.cgi?id=263159) patch for sane-desc.c This is required to get rid of a part of the sed-lines in the specfile and to adapt the permissions of SCSI-scanners accordingly - without touching anything else. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 Marcus Meissner <meissner@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.provo.novell.com |jsmeix@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c6 Johannes Meixner <jsmeix@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Component|Basesystem |Other Priority|P5 - None |P3 - Medium Summary|sane-backends package cannot be build from |sane-backends: fixes for SCSI and package does |source rpm |not build from source rpm --- Comment #6 from Johannes Meixner <jsmeix@novell.com> 2009-01-08 03:30:29 MST --- Many thanks for investigating and for the patches! I like to have the comments at the same place where they belong to. I will keep them in the spec file and keep them up to date there. The create_scanner_database is a copy of the same script which is used by the YaST scanner module (see the comment). The sed-magic is used to make it obvious what is changed in this script to make it work for our build system. I will not maintain two such scripts, one in YaST and one for the sane-backends package. I want to have both scripts in sync (except modifications for our build system). Regarding "nobody ever has build this package from this source": What excatly does "this source" mean? I.e. from where exactly did you get "this source"? I ask because I submit my sources to our build system and obviously it builds therein and of course I fix it whenever it does not build in our build system. But I do not have the time for additional tests in any other build environment. I rely on our build system. If it builds there, it is o.k. for me. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c7 --- Comment #7 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-08 06:23:04 MST --- Hi Johannes, because there is no "regular" source directory in the download tree I am used to (ftp5.gwdg.pub/opensuse/distribution/11.1 contains no source directory / should I change my habits?) I took the source tree from http://download.opensuse.org/pub/opensuse/source/distribution .... and in the source I downloaded from there the entry showed as depicted - otherwise I had not had run across the issue. I saw the comment and your motivation appeared to be clear, but as the /var/tmp - path showed in the file I thought you might have changed your mind. In the latter case I decided it had had been a better way to keep the RPM_BUILD_ROOT as a variable rather than inserting the /var/tmp ... whatsoever - I am sure you'd agree if that had had been your way to go. By the way: keep the comments in the spec file if you like it. Look into my patch and probably you'll like it. By the way, the attached version of sane-desc suits both the requirements of hal and allows the (more or less ...) perfect integration of any scsci-scanner that promotes itself as processor. I tested on two systems and it seems to work nicely for me. Thanks for looking into this, take care Dieter -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c8 --- Comment #8 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-08 06:25:00 MST --- Created an attachment (id=263830) --> (https://bugzilla.novell.com/attachment.cgi?id=263830) Patch against current source of sane-backends. You need the updated sane-backends.spec file, too Please don't use the previously attached patches against sane-desc.c! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c9 --- Comment #9 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-08 06:28:27 MST --- Created an attachment (id=263832) --> (https://bugzilla.novell.com/attachment.cgi?id=263832) Adapted specfile with reduced number of sed-script calls. FYI only As before, please do not use the previous patch against the specfile. By the way: both patches go against the version sane-backends-1.0.19-99.1.src.rpm must stem from 4th of December. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c10 --- Comment #10 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-08 06:39:44 MST --- To be a little more specific: sane-backends-1.0.19-99.1.src.rpm contains the file create_scanner_database fro m December 4th 2008. In this file the path directions to the database file is hard coded to /var/tmp/sane-backends-1.0.19-build/usr/share ... so, two impacts here: 1.) the current sed magic makes an error at the very first run with _this_ file, so the package never ever builds as is: /var/tmp/sane-backends-1.0.19-build/var/tmp/sane-backends-1.0.19-build/... 2.) this path is prolonged by another /var/tmp/sane-backends-1.0.19-build with each new attempt to rebuild the rpm, what should not happen. Therefore I would strongly suggest to modify this in such a way that you change your sed - magic to: cat create_scanner_database | sed <change path> > create_scanner_database_rpm and call create_scanner_database_rpm later on, so the original would not get touched and never ending paths could be avoided. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c11 Johannes Meixner <jsmeix@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ro@novell.com --- Comment #11 from Johannes Meixner <jsmeix@novell.com> 2009-01-08 07:02:15 MST --- Now it seems I understand a bit what goes on here: My original source file create_scanner_database which I submit into our build system has of course no such hardcoded nonsense in it because it is (as mentioned in the spec file comment) a copy of a script which is also run by YaST. When in your source RPM the file create_scanner_database has such hardcoded nonsense, it seems that our build-system creates the source RPM _after_ the sed magic in the spec file has changed my original source file. I asked a colleague and he confirmed that it is done this way. I will fix my spec file so that it works only on copies of the original source file. Therefore any kind of changing original source files via whatever stuff in the spec file leads to an endless sequence of changes upon changes of the sources whenever it is built from a source RPM which was made by a previous build. Therefore our build system should run another test to verify that the original sources were not changed before it creates the source RPM. Perhaps even easier: Have read-only permissions in the build system directory which contains the original source files. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c12 --- Comment #12 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-08 08:33:07 MST --- Hi Johannes, this is what had happened. The run in the build system changed the file - and the only thing that could be packaged was the changed file, so the path was already in it. Besides: please keep the source rpms world buildable, I do not have the time to keep a build system and a distribution up and in sync, and I'd bet other people think as I do. Anyway, things are clear now and I think this will not happen again :-)
Have read-only permissions in the build system directory which contains the original source files. ACK. You'd have to put every modified script into i. e. $RPM_BUILD_ROOT in this case (also to make sure that things get cleaned after running the build)
Take care Dieter -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c13 --- Comment #13 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-08 16:39:51 MST --- Well, nothing lives longer than the change. Tonight I received a feedback from someone having an Epson device assigning itself as "processor". Therefore I had to modify my patch for sane-desc.c and sane-desc.h to make this work. New patch attached. Take care Dieter -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c14 --- Comment #14 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-08 16:41:50 MST --- Created an attachment (id=264011) --> (https://bugzilla.novell.com/attachment.cgi?id=264011) Ok, I had to modify again - this one can handle different device manufacturers Due to the fact that not only HP-Scanners announce themselves as "processor" through the SCSI bus I had to modify my program in order to handle this appropriately. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User dieter.jurzitza@t-online.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c15 --- Comment #15 from Dieter Jurzitza <dieter.jurzitza@t-online.de> 2009-01-12 14:45:10 MST --- So, this is the final - latest - greatest, in accordance with what goes into CVS from sane-backends, with included patches from Julien Blanche, Three files: sane-backends-1.0.19-descfiles.patch sane-backends-1.0.19-sane-desc.patch sane-backends.spec.original.patch All referring to version 12 of the package. Using this as an update for openSUSE 11.1 and integrating the single patch of Danny Kukawka regarding SCSI-Scanners into hal would solve the currently rising issues for such type of devices. I am now lucky with my solution :-), therefore closing the bug. Take care Dieter Jurzitza -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c16 --- Comment #16 from Johannes Meixner <jsmeix@novell.com> 2009-01-13 01:00:56 MST --- By accident the attachments attachment #264628 : patch for sane-desc.c attachment #264630 : introduces modifications into .desc files attachment #264631 : patch against sane-backends.spec have been attached to bug #353881. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c17 Johannes Meixner <jsmeix@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #17 from Johannes Meixner <jsmeix@novell.com> 2009-01-16 04:20:48 MST --- Fixed why it does not build from source rpm (see the initial comment #0 and its reason in comment #11) for next openSUSE version and submitted to FACTORY/STABLE (but there is no Target Milestone "FACTORY" or "openSUSE 11.2"). The SCSI stuff will be done when fixing bug #462639. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User jengelh@medozas.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c19 Jan Engelhardt <jengelh@medozas.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jengelh@medozas.de --- Comment #19 from Jan Engelhardt <jengelh@medozas.de> 2009-03-25 06:31:13 MST --- Why did it even built on Novell machines, I wonder? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c20 --- Comment #20 from Johannes Meixner <jsmeix@novell.com> 2009-03-25 07:41:43 MST --- Why did you not read the reason in comment #11, I wonder? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User jengelh@medozas.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c21 --- Comment #21 from Jan Engelhardt <jengelh@medozas.de> 2009-03-25 07:46:11 MST --- Yes but does not OBS (which was used for 11.1 I hear) use rpmbuild(-in-a-xen) too? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c22 --- Comment #22 from Johannes Meixner <jsmeix@novell.com> 2009-03-25 08:05:30 MST --- See comment #6: At least up to the time when the bug was reported our build systems did not build from a source RPM but from plain original source files in a directory. My original source files were o.k. so that the build worked for our build systems but the sources in the source RPM which was created during this build were changed by this build so that a subsequent build from the source RPM did not work. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User jengelh@medozas.de added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c23 --- Comment #23 from Jan Engelhardt <jengelh@medozas.de> 2009-03-25 08:09:54 MST --- Yeah, that's the rpmbuild behavior I know: collect source files at the end of the build process. But really, modifying "Source:" files is evil ;-) Ok, case closed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.

https://bugzilla.novell.com/show_bug.cgi?id=463464 User jsmeix@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=463464#c24 --- Comment #24 from Johannes Meixner <jsmeix@novell.com> 2009-03-25 08:31:22 MST --- Of course modifying "Source:" files is evil. I didn't notice it because it worked well for me. First I called the unmodified create_scanner_database which failed so that I did some sed magic which worked for me so that this evil hack came into the package. By the way: When collecting source files is done intentionally at the end of the build process (i.e. after they could have been modified by the build process) there must be a special intentional reason to do it this way ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com