Author Topic: RPM build error - file not found 97-bluetooth.rules while building bluez-4.101  (Read 1012 times)

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Following up from my efforts to update BlueDevil 1.3 and libbluetooth 1.9.2 here http://www.pclinuxos.com/forum/index.php/topic,110768.0.html I went on to try updating bluez and its associates obexd and bluez-hcidump.

What I did :
- Got the bluez 4.93 .srpm and installed for build.
- Installed all the dependencies.
- Updated version number in the .spec file.
- Build, which ended successfully.

- Then I updated the version number in the same .spec file.
- Build, which failed with the following error.

Code: [Select]
Processing files: bluez-4.101-1slingshot2012.i586
error: File not found: /home/testinstall/src/rpm/BUILDROOT/bluez-4.101-1slingshot2012.i386/etc/udev/rules.d/97-bluetooth.rules


RPM build errors:
    File not found: /home/testinstall/src/rpm/BUILDROOT/bluez-4.101-1slingshot2012.i386/etc/udev/rules.d/97-bluetooth.rules

I will attach the complete .log file and .spec file in posts below.

What have I checked :
- Line no. 261 and 262 of .log file show no indication of 97-bluetooth.rules. Hence it is missing somewhere.
Code: [Select]
  CC     tools/hid2hci.o
  GEN    scripts/97-bluetooth-hid2hci.rules
  GEN    scripts/97-bluetooth-serial.rules
  CC     audio/telephony-dummy.o
- However the source does seem to have bluetooth.rules file in the /scripts directory.
- I believe only a reference to this particular file is missing somewhere.
- I am unable to fathom due to my limited knowledge.

Kindly enlighten me.
« Last Edit: November 15, 2012, 11:24:16 AM by sling-shot »
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
« Last Edit: November 15, 2012, 11:29:23 AM by sling-shot »
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
The file is no longer being generated.  There is a clue in the log here

Code: [Select]
configure: WARNING: unrecognized options: --enable-udevrules, --enable-capng
Clearly the upstream developers have changed the configure options available.  It was probably --enable-udevrules which caused the generation of the file but it is no longer a valid configure option.  This is one of those cases where you will need to do research to figure out the change and what needs to be done about it.  Maybe it is no longer necessary.  Maybe it stopped working because of kernel/udev changes.  Maybe it has been replaced by something else.  If you're lucky there may be information in the CHANGELOG file (or other documentation files).  Failing that you will need to search the web for information about "bluez" and "udev" or maybe even ask the devs directly.

Terry.
« Last Edit: November 16, 2012, 03:40:14 AM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
TerryN,
Thanks. I just ran a diff after extracting the 2 versions sources. It showed this section as being different in Makefile.in
Code: [Select]
< @DUND_TRUE@compat_dund_LDADD = lib/libbluetooth.la
< @UDEVRULES_TRUE@rulesdir = @UDEV_DIR@/rules.d
< @UDEVRULES_TRUE@udev_files = scripts/bluetooth.rules $(am__append_69) \
< @UDEVRULES_TRUE@ $(am__append_70)
< @UDEVRULES_TRUE@rules_DATA = $(foreach file,$(udev_files), scripts/97-$(notdir $(file)))
< @PCMCIA_TRUE@dist_udev_SCRIPTS = scripts/bluetooth_serial
---
> @DUND_TRUE@compat_dund_LDADD = lib/libbluetooth-private.la
> @DATAFILES_TRUE@rulesdir = @UDEV_DIR@/rules.d
> @DATAFILES_TRUE@udev_files = $(am__append_71) $(am__append_72)
> @DATAFILES_TRUE@@PCMCIA_TRUE@dist_udev_SCRIPTS = scripts/bluetooth_serial
> @DATAFILES_TRUE@rules_DATA = $(foreach file,$(udev_files), scripts/97-$(notdir $(file)))
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
Thanks. I just ran a diff after extracting the 2 versions sources. It showed this section as being different in Makefile.in

That suggests to me that the option has been changed to --enable-datafiles

Code: [Select]
./configure --help
...
--enable-datafiles      install Bluetooth configuration and data files
...

So you could try that  ;) :).

Terry.
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Did some creative Googling. Results are :
- Debian people seem to have removed that line referring to 97-bluetooth.rules from %files section.
- *buntus have removed those unrecognised options. But they have also seem to have added another option. (I have to post the details tomorrow as my laptop just ran low on power and hibernated)

I had just finished searching the configure file for any instance of --enable-udevrules so that I can remove it but it is not found in that file. I believe it must be somewhere else. Will check out .spec and the whole source for this string and report back.

Oh! Forgot to say that removing the reference of the offending file from %files section lead to a successful build. But the warning persisted as you might have guessed.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.

That suggests to me that the option has been changed to --enable-datafiles

Code: [Select]
./configure --help
...
--enable-datafiles      install Bluetooth configuration and data files
...

So you could try that  ;) :).

Terry.

I have no idea where to try that ;)
Hopefully I will get it tomorrow after searching more...
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline TerryN

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 723
I have no idea where to try that ;)

In the %build section of the SPEC file where the call to configure is made.

Quote
%configure2_5x   --libdir=/%{_lib} \
      --enable-cups \
                --enable-dfutool \
                --enable-tools \
                --enable-bccmd \
                --enable-gstreamer \
                --enable-hidd \
                --enable-pand \
                --enable-dund \
      --enable-hid2hci \
      --enable-pcmcia \
      --enable-udevrules \
      --enable-capng

Oh! Forgot to say that removing the reference of the offending file from %files section lead to a successful build. But the warning persisted as you might have guessed.

The package will build fine without the udev rules file but that file enables a set of actions to take place automatically when plugging in (hotplugging) a bluetooth device.  Obviously without that file those actions won't happen  ;)

Terry.
« Last Edit: November 16, 2012, 05:54:12 PM by TerryN »
Dell E521 - AMD 64 X2 5000+, 4GB RAM, ATI X1300 graphics
PCLinuxOS 2013 (KDE)
|Twitter|

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
TerryN, your prediction seems to be dead right :) I have built it but now nobody is seeing the in built bluetooth!

Anyway my assumption was made on these sources:

http://webcache.googleusercontent.com/search?q=cache:3tQBylp6jgAJ:https://launchpad.net/ubuntu/%2Bsource/bluez/4.101-0ubuntu6+&cd=4&hl=en&ct=clnk&gl=in&client=firefox-a


    Ubuntu
    “bluez” package
    4.101-0ubuntu6

Changelog

bluez (4.101-0ubuntu6) quantal; urgency=low

  * debian/rules: add --enable-gatt (and remove the unrecognized configure
    options left over from previous releases
). This fixes a regression in the
    support for Low Energy bluetooth devices such as thermometer probes and the
    like. (LP: #1055616)
 -- Mathieu Trudel-Lapierre <email address hidden>   Fri, 28 Sep 2012 17:03:12 -0400

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

http://packages.qa.debian.org/b/bluez/news/20120724T041715Z.html

Changes:
 bluez (4.101-1) experimental; urgency=low
 .
   * New upstream release. Update to 4.101.
   * Update patches.
     - patches/01_lower_sink_ranking.patch
     - patches/03-Fix-return-code-of-hid2hci.patch
   * Update debian/bluez.install.
     Remove line for lib/udev/rules.d/97-bluetooth.rules.

-------------------------
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Just posting a follow up with a little hindsight. The disappearance of bluetooth that happened with this build might not have been due to a faulty build  but something in the package itself.

Later reports / experience suggest that running the following commands (any ) as root may bring back bluetooth :

bluetoothd restart
bluetoothd -u
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10654
  • MLUs Forever!
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
Is this related?

http://www.pclinuxos.com/forum/index.php/topic,113158.0.html


There is something that I do not understand. My research seems to indicate to me that 97-bluetooth.rules file is probably deprecated because it is not getting picked up as source during build in spite of being present and referenced in the .spec file.
There is an obscure reference from Debian for having removed that line.

But, the presence of that line seems to be important for the bluetooth device to appear !!!

Then, I just checked our current stable repo 4.101-3 package. The .spec file there too has the line for 97-bluetooth.rules commented out. So it should not be in that package and it is indeed not here in clean installations from 2013.02 .isos.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10654
  • MLUs Forever!
bluez 4.101-5  in 64 bit now has that file with corrections of path.

It seems the 32 bit is on its way .....

MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT

Offline sling-shot

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 1730
  • Satyameva Jayate | Truth Alone Triumphs.
OK. It seems that I have not seen the 4.101-4 update which Terry has done and where he has re-instated that rules file.
So that must be where you have got that file while I have not.
Packaging well will cure headaches of many :) But learning to package will cause headaches in many :(

AMD AthlonX2 3600+/ASUS M2NPV-VM/ATi HD4670/Onboard sound/3.5GB DDR2-533 RAM/SEAGATE 160+320GB HDD/DELL S2240L FullHD/Creative SBS370 2.1/PCLinuxOS2013/KDE4
Samsung NP305U1-A06IN | Nokia E6

Offline Just17

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 10654
  • MLUs Forever!
OK. It seems that I have not seen the 4.101-4 update which Terry has done and where he has re-instated that rules file.
So that must be where you have got that file while I have not.

No, I copied the file from the 64 bit into the 32 bit to get the thing functional  :D .......  sorry, I forgot I did that the other day  :(

The update 32 bit package hasn't appeared in the repo yet, as far as I am aware.
MLUs rule the roost!

Linux XPS 3.4.38-pclos1.bfs  64 bit
Intel Core2 Quad CPU Q9450 @ 2.66GHz
4 GB RAM
MCP51 High Def Audio
GeForce GTX 550 Ti
PHILIPS  ‎DVD+-RW DVD8701
‎Logitech ‎BT Mini-Receiver
Afatech DTT