Unity Linux Support Forum
March 12, 2010, 01:44:15 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Openbox-Menu: rpmbuild doesn't write RPM???  (Read 634 times)
KDulcimer
Administrator
Sr. Member
*****
Posts: 264




View Profile WWW
« on: December 03, 2009, 07:34:55 AM »

This issue has me totally befuddled. For the life of me, I cannot figure out why rpmbuild totally skips the part where the RPM is actually written. This is the output I'm getting, I kid you not:

Code:
[k@localhost packages]$ sudo bldpkg openbox-menu
### Starting openbox-menu ###
Using specfile 'openbox-menu/F/openbox-menu.spec'
### Installing BuildRequires for openbox-menu ###
Loading cache...
Updating cache...                                                 ############################################################################################# [100%]

Computing transaction...

[it installs a bunch of packages]

### Starting build for openbox-menu ###
Executing(%prep): /bin/sh -e /home/k/src/tmp/rpm-tmp.91840
+ umask 022
+ cd /home/k/src/rpm/BUILD
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ cd /home/k/src/rpm/BUILD
+ rm -rf openbox-menu
+ /usr/bin/xz -dc /home/k/src/rpm/SOURCES/openbox-menu-0.2.tar.xz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd openbox-menu
++ /bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /home/k/src/tmp/rpm-tmp.91840
+ umask 022
+ cd /home/k/src/rpm/BUILD
+ cd openbox-menu
+ '[' 1 -eq 1 ']'
+ '[' 1 -eq 1 ']'
+ make -j2
gcc -Wall -O -g `pkg-config --cflags glib-2.0 libmenu-cache` -c menu.c -o menu.o
gcc `pkg-config --libs glib-2.0 libmenu-cache` menu.o -o openbox-menu
strip -s openbox-menu
+ exit 0
Executing(%install): /bin/sh -e /home/k/src/tmp/rpm-tmp.91840
+ umask 022
+ cd /home/k/src/rpm/BUILD
+ /bin/rm -rf /home/k/src/rpm/BUILDROOT/openbox-menu-0.2-1-unity2009.i386
+ /bin/mkdir -p /home/k/src/rpm/BUILDROOT/openbox-menu-0.2-1-unity2009.i386
+ cd openbox-menu
+ '[' 1 -eq 1 ']'
+ /bin/mkdir -p /home/k/src/rpm/BUILDROOT/openbox-menu-0.2-1-unity2009.i386/etc/menu.d/
+ '[' -n '' ']'
+ /usr/share/spec-helper/clean_files
+ '[' -n '' ']'
+ /usr/share/spec-helper/compress_files .xz
+ '[' -n '' ']'
+ /usr/share/spec-helper/relink_symlinks
+ '[' -n '' ']'
+ /usr/share/spec-helper/clean_perl
+ '[' -n '' ']'
+ /usr/share/spec-helper/lib_symlinks
+ '[' -n '' ']'
+ /usr/share/spec-helper/gprintify
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_mo
+ '[' -n '' ']'
+ /usr/share/spec-helper/translate_menu
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_pamd
+ '[' -n '' ']'
+ /usr/share/spec-helper/remove_info_dir
+ '[' -n '' ']'
+ /usr/share/spec-helper/fix_eol
+ DONT_STRIP=
+ /usr/share/spec-helper/strip_and_check_elf_files
### Succeeded in building pkg openbox-menu ###
### Removing installed BuildRequires for openbox-menu ###
[k@localhost packages]$
« Last Edit: December 03, 2009, 07:41:47 AM by KDulcimer » Logged
gettinther
Administrator
Sr. Member
*****
Posts: 493


View Profile
« Reply #1 on: December 03, 2009, 09:05:02 AM »

What happens when you build it manually?

The script was changed very recently to not use .rpmmacros.  Maybe this is the issue?  Did you try to clean up the BUILD area manually?
Logged
KDulcimer
Administrator
Sr. Member
*****
Posts: 264




View Profile WWW
« Reply #2 on: December 03, 2009, 10:00:43 AM »

Building it manually gets the same results. Using rpmbuild -ba writes the SRPM but not the RPM.

The BUILD and BUILDROOT directories are clean.
Logged
gettinther
Administrator
Sr. Member
*****
Posts: 493


View Profile
« Reply #3 on: December 03, 2009, 10:19:27 AM »

I'll try at home this evening to see if I can replicate the problem.
Logged
Stumpy
Administrator
Newbie
*****
Posts: 16



Code Monkey


View Profile
« Reply #4 on: December 03, 2009, 10:08:26 PM »

%__install 0755 $RPM_BUILD_DIR/%{name}/%(name}

There is a typo in that above, an open paren instead of an open curly brace,
also you are missing the -m in front of 0755

But you can do the same thing with one command instead of doing mkdir, just do this:

%__install -m0755 -D %name %{buildroot}%{_sysconfdir}/menu.d/%name

 Grin
Logged

Every program has at least one bug and can be shortened by at least one instruction -- from which one can deduce that every program can be reduced to one instruction which doesn't work.
gri6507
Administrator
Newbie
*****
Posts: 33


View Profile
« Reply #5 on: December 04, 2009, 07:59:29 AM »

Just to make sure the bases are covered, what version of RPM do you have installed? A while ago I built a test version of rpm-5.2 from a November CVS snapshot and it has some problems, including the one where final rpms would not actually be written out. I don't believe that was ever placed in the Test channel (at least I know I didn't - I left it in incoming_rpms).

Please post the output of
Code:
rpm -qa |grep rpm
Logged
KDulcimer
Administrator
Sr. Member
*****
Posts: 264




View Profile WWW
« Reply #6 on: December 04, 2009, 08:49:53 AM »

Yep, sure enough:

rpm-5.2.1-0.20090723.3-unity2009
Logged
gri6507
Administrator
Newbie
*****
Posts: 33


View Profile
« Reply #7 on: December 04, 2009, 09:32:38 AM »

Yep, sure enough:

rpm-5.2.1-0.20090723.3-unity2009

You have the correct (old) version. So something else must be going on on your machine.
Logged
Stumpy
Administrator
Newbie
*****
Posts: 16



Code Monkey


View Profile
« Reply #8 on: December 04, 2009, 04:35:44 PM »

Yep, sure enough:

rpm-5.2.1-0.20090723.3-unity2009

You have the correct (old) version. So something else must be going on on your machine.

Nothing that using the correct syntax won't fix, as per my first post above...
Logged

Every program has at least one bug and can be shortened by at least one instruction -- from which one can deduce that every program can be reduced to one instruction which doesn't work.
gettinther
Administrator
Sr. Member
*****
Posts: 493


View Profile
« Reply #9 on: December 04, 2009, 06:15:47 PM »

Here's what I found when trying this app.

Apart from Stumpy's corrections, I found the following items.

First of all the make process creates an executable "openbox-menu", which is fine.

Your install command is what is creating the issue.  It doesn't copy anything so the package is empty and as such is not created.

Stumpy's command takes care of that point.

However one interesting point is that even if the %file section isn't completed, the rpm builds fine.
All I had in the %file section is
Quote
%files
%defattr(-,root,root,-)

so it ended up:
Quote
%build
%make

%install
%__install -m0755 -D %name %{buildroot}%{_sysconfdir}/menu.d/%name


%post
%update_menus

%postun
%update_menus

%files
%defattr(-,root,root,-)


Logged
Pages: [1]   Go Up
  Print  
 
Jump to: