Author Topic: system-config-printer build errors  (Read 3086 times)

Offline roved2101

  • Jr. Member
  • **
  • Posts: 30
system-config-printer build errors
« on: June 06, 2010, 09:40:50 PM »
I am trying to repackage system-config-printer as it was in 2007. I find it a nice application for printer management over printerdrake.

I have downloaded the src.rpm from mandriva, modified the spec file and dependencies, built python-smbc as it required. This is the out put I get when trying to the second last stage of the build.

I understand Mandriva's system is completely different to ours but don't seems to be able to work out whats up with dbus.

http://pastebin.com/kgetTPcJ

ftp://ftp.free.fr//mirrors/ftp.mandriva.com/MandrivaLinux/devel/cooker/SRPMS/main/release/system-config-printer-1.2.0-12mdv2010.1.src.rpm

Any help would be appreciated. Still learning all the ins and outs.

Regards

roved2101


Kernel: Linux 2.6.33.7-pclos4 KDE 4.5.1  Intel(R) Pentium(R) 4 CPU 3.40GHz@3400.000 MHz Mem  2072392 kBXInfo:  Screen #0: @ 1440x900 pixels (430x272 millimeters) /24 bit

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: system-config-printer build errors
« Reply #1 on: June 06, 2010, 11:13:45 PM »
I think the main part of your error comes from this:
Quote from: Build-log
Makefile
configure.in:3: version mismatch.  This is Automake 1.11,
configure.in:3: but the definition used by this AM_INIT_AUTOMAKE
configure.in:3: comes from Automake 1.11.1.  You should recreate
configure.in:3: aclocal.m4 with aclocal and run automake again.



..try adding aclocal as the first line of your %build section; if that doesn't work, try one of the solutions in this post:

http://www.pclinuxos.com/forum/index.php/topic,60026.msg483593.html#msg483593

..or this one:

http://mypclinuxos.com/forum/index.php?topic=2537.0

 ;)
« Last Edit: June 06, 2010, 11:16:15 PM by travisn000 »

Offline roved2101

  • Jr. Member
  • **
  • Posts: 30
Re: system-config-printer build errors
« Reply #2 on: June 07, 2010, 12:19:03 AM »
Thanks travisn000 that worked reach a new hurdle.

Also is a link to my spec file. http://pastebin.com/37nGKN1q

Quote
byte-compiling /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/lib/python2.5/site-packages/cupshelpers/__init__.py to __init__.pyc
byte-compiling /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/lib/python2.5/site-packages/cupshelpers/openprinting.py to openprinting.pyc
byte-compiling /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/lib/python2.5/site-packages/cupshelpers/ppds.py to ppds.pyc
byte-compiling /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/lib/python2.5/site-packages/cupshelpers/cupshelpers.py to cupshelpers.pyc
running install_egg_info
Writing /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/lib/python2.5/site-packages/cupshelpers-1.0-py2.5.egg-info
test -z "/etc/dbus-1/system.d/" || /bin/mkdir -p "/home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/etc/dbus-1/system.d/"
 /usr/bin/install -c -m 644 newprinternotification.conf printerdriversinstaller.conf '/home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/etc/dbus-1/system.d/'
mkdir -p /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/share/applications/
mkdir -p /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/share/applications/
desktop-file-install    \
          --dir /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/share/applications/           \
          --add-category System                 \
          --add-category Settings               \
          --add-category HardwareSettings       \
          --add-category Printing               \
          --add-category GTK                    \
          system-config-printer.desktop
Must specify the vendor namespace for these files with --vendor
make[2]: *** [install-desktopDATA] Error 1
make[2]: Leaving directory `/home/roved/src/rpm/BUILD/system-config-printer-1.2.0'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/roved/src/rpm/BUILD/system-config-printer-1.2.0'
make: *** [install-recursive] Error 1
error: Bad exit status from /home/roved/src/rpm/tmp/rpm-tmp.69300 (%install)


Kernel: Linux 2.6.33.7-pclos4 KDE 4.5.1  Intel(R) Pentium(R) 4 CPU 3.40GHz@3400.000 MHz Mem  2072392 kBXInfo:  Screen #0: @ 1440x900 pixels (430x272 millimeters) /24 bit

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: system-config-printer build errors
« Reply #3 on: June 07, 2010, 06:40:06 AM »
Thanks travisn000 that worked reach a new hurdle.

Also is a link to my spec file. http://pastebin.com/37nGKN1q

Quote
desktop-file-install    \
          --dir /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/share/applications/           \
          --add-category System                 \
          --add-category Settings               \
          --add-category HardwareSettings       \
          --add-category Printing               \
          --add-category GTK                    \
          system-config-printer.desktop
Must specify the vendor namespace for these files with --vendor



Your Spec file lists the following .desktop files in the %files section:
Quote
%{_datadir}/applications/system-config-printer.desktop
%{_datadir}/applications/manage-print-jobs.desktop
%{_sysconfdir}/xdg/autostart/print-applet.desktop


..one or all of them needs the vendor namespace blanked out; try adding something like the following to your spec (at the end of your %install section):

Quote
desktop-file-install \
 --vendor="" \
 --add-category="X-MandrivaLinux-System-Configuration-Printing" \
 --dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%%{_datadir}/applications/system-config-printer.desktop


(also note the addition of a mandriva xdg menu category..  I'm pretty sure we need that as well)

..if that doesn't work, you may have to dig through the source and create a patch that adds the  --vendor="" option to desktop-file-install (It doesn't appear to be in the spec.. unless I missed it  :D)
« Last Edit: June 07, 2010, 06:43:30 AM by travisn000 »

Offline roved2101

  • Jr. Member
  • **
  • Posts: 30
Re: system-config-printer build errors
« Reply #4 on: June 09, 2010, 06:48:01 PM »
I've reach the hurdle using the instructions you gave and not sure how to make the patch file.


Quote
+ gcc /home/roved/src/rpm/SOURCES/hp-makeuri-mdv.c -o hp-makeuri-mdv -lhpmud
+ exit 0
Executing(%install): /bin/sh -e /home/roved/src/rpm/tmp/rpm-tmp.44909
+ umask 022
+ cd /home/roved/src/rpm/BUILD
+ cd system-config-printer-1.2.0
+ '[' 1 -eq 1 ']'
+ rm -rf /home/roved/src/rpm/tmp/system-config-printer-1.2.0-build
+ desktop-file-install --vendor= --add-category=X-MandrivaLinux-System-Configuration-Printing --dir /home/roved/src/rpm/tmp/system-config-printer-1.2.0-build/usr/share/applications '/home/roved/src/rpm/tmp/system-config-printer-1.2.0-build%{_datadir}/applications/system-config-printer.desktop'
Error on file "/home/roved/src/rpm/tmp/system-config-printer-1.2.0-build%{_datadir}/applications/system-config-printer.desktop": Failed to open file '/home/roved/src/rpm/tmp/system-config-printer-1.2.0-build%{_datadir}/applications/system-config-printer.desktop': No such file or directory
error: Bad exit status from /home/roved/src/rpm/tmp/rpm-tmp.44909 (%install)

Regards,

roved2101
« Last Edit: June 09, 2010, 06:52:17 PM by roved2101 »
Kernel: Linux 2.6.33.7-pclos4 KDE 4.5.1  Intel(R) Pentium(R) 4 CPU 3.40GHz@3400.000 MHz Mem  2072392 kBXInfo:  Screen #0: @ 1440x900 pixels (430x272 millimeters) /24 bit

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: system-config-printer build errors
« Reply #5 on: June 10, 2010, 07:39:36 AM »
From your build error:
Quote
Failed to open file '/home/roved/src/rpm/tmp/system-config-printer-1.2.0-build%{_datadir}/applications/system-config-printer.desktop': No such file or directory

..it appears that the code that I gave you for updating the  .desktop files is not getting correctly translated to the actual path of your %buildroot;  your previously posted spec defines the following:

Quote
BuildRoot:      %{_tmppath}/%{name}-%{version}-buildroot

..looking at the code I gave you before, I see that there is an error in it; the double %% symbols should be changed to a single % symbol...  

Broken:
Quote
desktop-file-install \
 --vendor="" \
 --add-category="X-MandrivaLinux-System-Configuration-Printing" \
 --dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%%{_datadir}/applications/system-config-printer.desktop

Fixed:
Quote
desktop-file-install \
 --vendor="" \
 --add-category="X-MandrivaLinux-System-Configuration-Printing" \
 --dir $RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT%{_datadir}/applications/system-config-printer.desktop


..if that doesn't fix it, you can also try changing $RPM_BUILD_ROOT to %{buildroot} (..those should be interpreted exactly the same though).
« Last Edit: June 10, 2010, 08:28:46 AM by travisn000 »

Offline roved2101

  • Jr. Member
  • **
  • Posts: 30
Re: system-config-printer build errors
« Reply #6 on: June 10, 2010, 07:54:14 PM »
Still getting the same error I have included all spec file again as well as error log file.

Quote
touch .stamp-distutils-in-builddir
/usr/bin/python setup.py build
running build
running build_py
creating build
creating build/lib
creating build/lib/cupshelpers
copying cupshelpers/__init__.py -> build/lib/cupshelpers
copying cupshelpers/openprinting.py -> build/lib/cupshelpers
copying cupshelpers/ppds.py -> build/lib/cupshelpers
copying cupshelpers/cupshelpers.py -> build/lib/cupshelpers
make[1]: Leaving directory `/home/roved/src/rpm/BUILD/system-config-printer-1.2.0'
+ gcc /home/roved/src/rpm/SOURCES/hp-makeuri-mdv.c -o hp-makeuri-mdv -lhpmud
+ exit 0
Executing(%install): /bin/sh -e /home/roved/src/rpm/tmp/rpm-tmp.84311
+ umask 022
+ cd /home/roved/src/rpm/BUILD
+ cd system-config-printer-1.2.0
+ '[' 1 -eq 1 ']'
+ desktop-file-install --vendor= --add-category=X-MandrivaLinux-MoreApplications-Printing --dir /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/share/applications /home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/share/applications/system-config-printer.desktop
Error on file "/home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/share/applications/system-config-printer.desktop": Failed to open file '/home/roved/src/rpm/tmp/system-config-printer-1.2.0-buildroot/usr/share/applications/system-config-printer.desktop': No such file or directory
error: Bad exit status from /home/roved/src/rpm/tmp/rpm-tmp.84311 (%install)


RPM build errors:
    Bad exit status from /home/roved/src/rpm/tmp/rpm-tmp.84311 (%install)


http://pastebin.com/EkTata42

http://pastebin.com/BfDqjq38

Kernel: Linux 2.6.33.7-pclos4 KDE 4.5.1  Intel(R) Pentium(R) 4 CPU 3.40GHz@3400.000 MHz Mem  2072392 kBXInfo:  Screen #0: @ 1440x900 pixels (430x272 millimeters) /24 bit

Offline travisN000

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1758
Re: system-config-printer build errors
« Reply #7 on: June 11, 2010, 01:28:41 PM »
I downloaded the SRPM and unpacked the source.  From here I was able to use the kde find utility to search inside the source directory for the string "--add-category"; this showed two files..  Makefile.am and Makefile.in  ..following the directions here (link) for creating a patch I came up with the following attached files.

After applying the patch, the errors regarding the .deskop files no longer occur, but now %install fails with a new error...  unfortunatly the error message is not very helpful:

Quote
Compiling ./troubleshoot/PrintTestPage.py ...
Compiling ./troubleshoot/PrinterStateReasons.py ...
Compiling ./troubleshoot/QueueNotEnabled.py ...
Compiling ./troubleshoot/QueueRejectingJobs.py ...
Compiling ./troubleshoot/RemoteAddress.py ...
Compiling ./troubleshoot/SchedulerNotRunning.py ...
Compiling ./troubleshoot/ServerFirewalled.py ...
Compiling ./troubleshoot/Shrug.py ...
Compiling ./troubleshoot/Welcome.py ...
Compiling ./troubleshoot/__init__.py ...
Compiling ./troubleshoot/base.py ...
Listing ./ui ...
Compiling ./userdefault.py ...
error: Bad exit status from /home/tln/src/tmp/rpm-tmp.90724 (%install)


RPM build errors:
    Bad exit status from /home/tln/src/tmp/rpm-tmp.90724 (%install)


« Last Edit: June 11, 2010, 01:31:14 PM by travisn000 »