LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-17-2010, 05:04 PM   #1
DBabo
Member
 
Registered: Feb 2003
Distribution: Scientific Linux 6
Posts: 384

Rep: Reputation: 33
{dummy problem} building an rpm


HEllo,
after much procrastination i finaly got to actually trying to build an rpm.
Ive been reading here and there (http://www.rpm.org/max-rpm/s1-rpm-bu...spec-file.html, http://www.ibm.com/developerworks/li...html#resources) and pulled the eject-2.1.5.tgz in a frustrating attempt to make a rpm.

I'm adding the modified by me spec file as well as the output from the build and the origirnal tgz in a hope that you guys can point to my obvious mistake.
thank you in advance.
A few questions:
1. why it's installing into /usr? not to build_root?
2. why it's skipping my %test section.

P.S. Running centos 5.2 and build is done by regular user.


Code:
[oracle@server rpm]$  rpmbuild -v -bb --clean ./redhat/SPECS/eject-2.1.5.spec
Executing(%prep): /bin/sh -e /tmp/oracle/rpm/rpm-tmp.31755
+ umask 022
+ cd /home/oracle/rpm/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ set
+ grep RPM
RPM_ARCH=i386
RPM_BUILD_DIR=/home/oracle/rpm/redhat/BUILD
RPM_BUILD_ROOT=/home/oracle/rpm/redhat/eject-root
RPM_DOC_DIR=/usr/share/doc
RPM_OPT_FLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
RPM_OS=linux
RPM_PACKAGE_NAME=eject
RPM_PACKAGE_RELEASE=2XL
RPM_PACKAGE_VERSION=2.1.5
RPM_SOURCE_DIR=/home/oracle/rpm/redhat/SOURCES
+ '[' -z /home/oracle/rpm/redhat/eject-root ']'
+ cd /home/oracle/rpm/redhat/BUILD
+ rm -rf eject
+ /bin/gzip -dc /home/oracle/rpm/redhat/SOURCES/eject-2.1.5.tar.gz
+ tar -xvvf -
drwxr-xr-x tranter/tranter   0 2006-06-03 22:07:05 eject/
drwxr-xr-x tranter/tranter   0 2006-06-03 22:07:05 eject/po/
drwxr-xr-x tranter/tranter   0 2006-06-01 21:41:11 eject/po/CVS/
-rw-r--r-- tranter/tranter  54 2006-06-01 21:41:11 eject/po/CVS/Root
<skip>
-rwxr-xr-x tranter/tranter    133 2005-12-24 20:53:51 eject/bootstrap
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd eject
++ /usr/bin/id -u
+ '[' 501 = 0 ']'
++ /usr/bin/id -u
+ '[' 501 = 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /tmp/oracle/rpm/rpm-tmp.31755
+ umask 022
+ cd /home/oracle/rpm/redhat/BUILD
+ cd eject
+ LANG=C
+ export LANG
+ unset DISPLAY
+ ./configure --prefix=/usr
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
<ckip>
checking linux/version.h presence... yes
checking for linux/version.h... yes
configure: creating ./config.status
config.status: creating Makefile
+ echo 'before make after build'
before make after build
+ make 'RPM_OPT_FLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
Making all in po
make[1]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make[1]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject'
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"eject\" -DVERSION=\"2.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_REGCOMP=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1  -I. -I.   -DDEFAULTDEVICE=\"cdrom\" -DGETOPTLONG  -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1 -c eject.c
eject.c: In function 'ReadSpeedCdrom':
eject.c:613: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
eject.c: In function 'SymLink':
eject.c:1005: warning: ignoring return value of 'realpath', declared with attribute warn_unused_result
gcc -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1  -o eject  eject.o
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"eject\" -DVERSION=\"2.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_REGCOMP=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1  -I. -I.   -DDEFAULTDEVICE=\"cdrom\" -DGETOPTLONG  -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1 -c volname.c
gcc -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1  -o volname  volname.o
make[1]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject'
+ echo ' Before check'
 Before check
+ exit 0
Executing(%install): /bin/sh -e /tmp/oracle/rpm/rpm-tmp.60824
+ umask 022
+ cd /home/oracle/rpm/redhat/BUILD
+ cd eject
+ LANG=C
+ export LANG
+ unset DISPLAY
+ '[' -d /home/oracle/rpm/redhat/eject-root ']'
+ make prefix=/home/oracle/rpm/redhat/eject-root/usr install
Making install in po
make[1]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make fix-po-files
make[2]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
mv de_DE.po de.po
mv es_ES.po es.po
mv fr_FR.po fr.po
mv ja_JP.eucJP.po ja.po
mv tr_TR.po tr.po
mv zh_TW.UTF-8.po zh_TW.po
make[2]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make mo
make[2]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
files='de.po es.po fr.po ja.po tr.po zh_TW.po pt_BR.po cs_CZ.po'; \
        for file in $files;do \
          echo compiling $LOCALENAME ; \
          msgfmt $file -o `echo $file |sed 's/\.po$/.mo/g'`; \
        done
compiling
compiling
compiling
compiling
compiling
compiling
compiling
compiling
make[2]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
files='de.po es.po fr.po ja.po tr.po zh_TW.po pt_BR.po cs_CZ.po'; \
        for file in $files;do \
          LOCALENAME=`echo $file |sed 's/\.po$//g'`; \
          echo installing $LOCALENAME ; \
          MOPATH=/usr/share/locale/$LOCALENAME/LC_MESSAGES; \
          if [ ! -d $MOPATH ] ;then  \
             mkdir -p $MOPATH; \
          fi; \
          cp $LOCALENAME.mo $MOPATH/eject.mo; \
        done
installing de
cp: cannot create regular file `/usr/share/locale/de/LC_MESSAGES/eject.mo': Permission denied
installing es
cp: cannot create regular file `/usr/share/locale/es/LC_MESSAGES/eject.mo': Permission denied
installing fr
cp: cannot create regular file `/usr/share/locale/fr/LC_MESSAGES/eject.mo': Permission denied
installing ja
cp: cannot create regular file `/usr/share/locale/ja/LC_MESSAGES/eject.mo': Permission denied
installing tr
cp: cannot create regular file `/usr/share/locale/tr/LC_MESSAGES/eject.mo': Permission denied
installing zh_TW
cp: cannot create regular file `/usr/share/locale/zh_TW/LC_MESSAGES/eject.mo': Permission denied
installing pt_BR
cp: cannot create regular file `/usr/share/locale/pt_BR/LC_MESSAGES/eject.mo': Permission denied
installing cs_CZ
cp: cannot create regular file `/usr/share/locale/cs_CZ/LC_MESSAGES/eject.mo': Permission denied
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make: *** [install-recursive] Error 1
error: Bad exit status from /tmp/oracle/rpm/rpm-tmp.60824 (%install)


RPM build errors:
    Bad exit status from /tmp/oracle/rpm/rpm-tmp.60824 (%install)
Attached Files
File Type: txt rpm-tmp.60824.txt (1.5 KB, 0 views)
File Type: txt eject-2.1.5.tar.gz.txt (120.7 KB, 1 views)
File Type: txt eject-2.1.5.spec.txt (1.4 KB, 1 views)

Last edited by DBabo; 12-17-2010 at 05:38 PM.
 
Old 12-17-2010, 07:27 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,284
Blog Entries: 54

Rep: Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854
Quote:
Originally Posted by DBabo View Post
why it's installing into /usr? not to build_root?
Try 'make DESTDIR=$RPM_BUILD_ROOT install' instead of your 'make prefix=${RPM_BUILD_ROOT}%{prefix} install'?


Quote:
Originally Posted by DBabo View Post
why it's skipping my %test section.
I don't see no "%test" section in your spec file but it wouldn't be a valid section anyway.


Quote:
Originally Posted by DBabo View Post
build is done by regular user.
Perfect.
 
Old 12-17-2010, 07:41 PM   #3
DBabo
Member
 
Registered: Feb 2003
Distribution: Scientific Linux 6
Posts: 384

Original Poster
Rep: Reputation: 33
unSpawn,
thank you for reply.
Itried that last night - with no sucsess. But here is the change and the (negative) result:
Code:
config.status: creating Makefile
+ echo 'before make after build'
before make after build
+ make 'RPM_OPT_FLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
Making all in po
make[1]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make[1]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject'
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"eject\" -DVERSION=\"2.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_REGCOMP=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1  -I. -I.   -DDEFAULTDEVICE=\"cdrom\" -DGETOPTLONG  -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1 -c eject.c
eject.c: In function 'ReadSpeedCdrom':
eject.c:613: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
eject.c: In function 'SymLink':
eject.c:1005: warning: ignoring return value of 'realpath', declared with attribute warn_unused_result
gcc -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1  -o eject  eject.o  
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"eject\" -DVERSION=\"2.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_REGCOMP=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1  -I. -I.   -DDEFAULTDEVICE=\"cdrom\" -DGETOPTLONG  -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1 -c volname.c
gcc -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1  -o volname  volname.o  
make[1]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject'
+ echo ' Before check'
 Before check
+ exit 0
Executing(%install): /bin/sh -e /tmp/oracle/rpm/rpm-tmp.59035
+ umask 022
+ cd /home/oracle/rpm/redhat/BUILD
+ cd eject
+ LANG=C
+ export LANG
+ unset DISPLAY
+ '[' -d /home/oracle/rpm/redhat/eject-root ']'
+ make ROOTDIR=/home/oracle/rpm/redhat/eject-root/usr install
Making install in po
make[1]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make fix-po-files
make[2]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
mv de_DE.po de.po
mv es_ES.po es.po
mv fr_FR.po fr.po
mv ja_JP.eucJP.po ja.po
mv tr_TR.po tr.po
mv zh_TW.UTF-8.po zh_TW.po
make[2]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make mo
make[2]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
files='de.po es.po fr.po ja.po tr.po zh_TW.po pt_BR.po cs_CZ.po'; \
        for file in $files;do \
          echo compiling $LOCALENAME ; \
          msgfmt $file -o `echo $file |sed 's/\.po$/.mo/g'`; \
        done
compiling
compiling
compiling
compiling
compiling
compiling
compiling
compiling
make[2]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
files='de.po es.po fr.po ja.po tr.po zh_TW.po pt_BR.po cs_CZ.po'; \
        for file in $files;do \
          LOCALENAME=`echo $file |sed 's/\.po$//g'`; \
          echo installing $LOCALENAME ; \
          MOPATH=/usr/share/locale/$LOCALENAME/LC_MESSAGES; \
          if [ ! -d $MOPATH ] ;then  \
             mkdir -p $MOPATH; \
          fi; \
          cp $LOCALENAME.mo $MOPATH/eject.mo; \
        done
installing de
cp: cannot create regular file `/usr/share/locale/de/LC_MESSAGES/eject.mo': Permission denied
installing es
cp: cannot create regular file `/usr/share/locale/es/LC_MESSAGES/eject.mo': Permission denied
installing fr
cp: cannot create regular file `/usr/share/locale/fr/LC_MESSAGES/eject.mo': Permission denied
installing ja
cp: cannot create regular file `/usr/share/locale/ja/LC_MESSAGES/eject.mo': Permission denied
installing tr
cp: cannot create regular file `/usr/share/locale/tr/LC_MESSAGES/eject.mo': Permission denied
installing zh_TW
cp: cannot create regular file `/usr/share/locale/zh_TW/LC_MESSAGES/eject.mo': Permission denied
installing pt_BR
cp: cannot create regular file `/usr/share/locale/pt_BR/LC_MESSAGES/eject.mo': Permission denied
installing cs_CZ
cp: cannot create regular file `/usr/share/locale/cs_CZ/LC_MESSAGES/eject.mo': Permission denied
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make: *** [install-recursive] Error 1
error: Bad exit status from /tmp/oracle/rpm/rpm-tmp.59035 (%install)


RPM build errors:
    Bad exit status from /tmp/oracle/rpm/rpm-tmp.59035 (%install)

spec is now:
Code:
config.status: creating Makefile
+ echo 'before make after build'
before make after build
+ make 'RPM_OPT_FLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'
Making all in po
make[1]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make[1]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject'
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"eject\" -DVERSION=\"2.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_REGCOMP=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1  -I. -I.   -DDEFAULTDEVICE=\"cdrom\" -DGETOPTLONG  -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1 -c eject.c
eject.c: In function 'ReadSpeedCdrom':
eject.c:613: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result
eject.c: In function 'SymLink':
eject.c:1005: warning: ignoring return value of 'realpath', declared with attribute warn_unused_result
gcc -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1  -o eject  eject.o  
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"eject\" -DVERSION=\"2.1.5\" -DSTDC_HEADERS=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FCNTL_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_UNISTD_H=1 -DHAVE_REGCOMP=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1  -I. -I.   -DDEFAULTDEVICE=\"cdrom\" -DGETOPTLONG  -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1 -c volname.c
gcc -Wall -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -g -O2 -DUSE_NLS=1  -o volname  volname.o  
make[1]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject'
+ echo ' Before check'
 Before check
+ exit 0
Executing(%install): /bin/sh -e /tmp/oracle/rpm/rpm-tmp.59035
+ umask 022
+ cd /home/oracle/rpm/redhat/BUILD
+ cd eject
+ LANG=C
+ export LANG
+ unset DISPLAY
+ '[' -d /home/oracle/rpm/redhat/eject-root ']'
+ make ROOTDIR=/home/oracle/rpm/redhat/eject-root/usr install
Making install in po
make[1]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make fix-po-files
make[2]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
mv de_DE.po de.po
mv es_ES.po es.po
mv fr_FR.po fr.po
mv ja_JP.eucJP.po ja.po
mv tr_TR.po tr.po
mv zh_TW.UTF-8.po zh_TW.po
make[2]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make mo
make[2]: Entering directory `/home/oracle/rpm/redhat/BUILD/eject/po'
files='de.po es.po fr.po ja.po tr.po zh_TW.po pt_BR.po cs_CZ.po'; \
        for file in $files;do \
          echo compiling $LOCALENAME ; \
          msgfmt $file -o `echo $file |sed 's/\.po$/.mo/g'`; \
        done
compiling
compiling
compiling
compiling
compiling
compiling
compiling
compiling
make[2]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
files='de.po es.po fr.po ja.po tr.po zh_TW.po pt_BR.po cs_CZ.po'; \
        for file in $files;do \
          LOCALENAME=`echo $file |sed 's/\.po$//g'`; \
          echo installing $LOCALENAME ; \
          MOPATH=/usr/share/locale/$LOCALENAME/LC_MESSAGES; \
          if [ ! -d $MOPATH ] ;then  \
             mkdir -p $MOPATH; \
          fi; \
          cp $LOCALENAME.mo $MOPATH/eject.mo; \
        done
installing de
cp: cannot create regular file `/usr/share/locale/de/LC_MESSAGES/eject.mo': Permission denied
installing es
cp: cannot create regular file `/usr/share/locale/es/LC_MESSAGES/eject.mo': Permission denied
installing fr
cp: cannot create regular file `/usr/share/locale/fr/LC_MESSAGES/eject.mo': Permission denied
installing ja
cp: cannot create regular file `/usr/share/locale/ja/LC_MESSAGES/eject.mo': Permission denied
installing tr
cp: cannot create regular file `/usr/share/locale/tr/LC_MESSAGES/eject.mo': Permission denied
installing zh_TW
cp: cannot create regular file `/usr/share/locale/zh_TW/LC_MESSAGES/eject.mo': Permission denied
installing pt_BR
cp: cannot create regular file `/usr/share/locale/pt_BR/LC_MESSAGES/eject.mo': Permission denied
installing cs_CZ
cp: cannot create regular file `/usr/share/locale/cs_CZ/LC_MESSAGES/eject.mo': Permission denied
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/oracle/rpm/redhat/BUILD/eject/po'
make: *** [install-recursive] Error 1
error: Bad exit status from /tmp/oracle/rpm/rpm-tmp.59035 (%install)


RPM build errors:
    Bad exit status from /tmp/oracle/rpm/rpm-tmp.59035 (%install)

I haven't checked but i have a suspicion that it maybe hardcoded in the source somwhere...
 
Old 12-17-2010, 08:21 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,284
Blog Entries: 54

Rep: Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854
Quote:
Originally Posted by DBabo View Post
I haven't checked but i have a suspicion that it maybe hardcoded in the source somwhere...
And indeed it is... in eject/po/makefile on line 44: 'cp $$LOCALENAME.mo $$MOPATH/$(PKGNAME).mo; \'. Since it's hardcoded you could 'sed -i' MOPATH before you 'make DESTDIR=$RPM_BUILD_ROOT install'.
 
1 members found this post helpful.
Old 12-17-2010, 09:11 PM   #5
DBabo
Member
 
Registered: Feb 2003
Distribution: Scientific Linux 6
Posts: 384

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by unSpawn View Post
And indeed it is... in eject/po/makefile on line 44: 'cp $$LOCALENAME.mo $$MOPATH/$(PKGNAME).mo; \'. Since it's hardcoded you could 'sed -i' MOPATH before you 'make DESTDIR=$RPM_BUILD_ROOT install'.
you are right and it was right in front of my eyes all along. Silly it is not to see.

Update: another fix was to change the spec file:
Code:
#make ROOTDIR=${RPM_BUILD_ROOT}/usr install
make DESTDIR=${RPM_BUILD_ROOT}/usr install

now one question remains - how do i use the "%check section" ?
the way i did it, seemed to have 0 effect on the process.

Last edited by DBabo; 12-17-2010 at 10:31 PM.
 
Old 12-18-2010, 07:29 AM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,284
Blog Entries: 54

Rep: Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854Reputation: 2854
Quote:
Originally Posted by DBabo View Post
you are right and it was right in front of my eyes all along. Silly it is not to see.
Not like that never happened to me...


Quote:
Originally Posted by DBabo View Post
Update: another fix was to change the spec file:
Code:
#make ROOTDIR=${RPM_BUILD_ROOT}/usr install
make DESTDIR=${RPM_BUILD_ROOT}/usr install
FWIW it's always good to make the developers aware of changes you make.


Quote:
Originally Posted by DBabo View Post
now one question remains - how do i use the "%check section" ?
the way i did it, seemed to have 0 effect on the process.
RPM doesn't allow you to inject arbitrary section names, they just will be ignored.
So whatever you do in your "%check" section you just do in the appropriate section.
In this case that just means commenting out the "%check" tag.
 
Old 12-18-2010, 12:22 PM   #7
DBabo
Member
 
Registered: Feb 2003
Distribution: Scientific Linux 6
Posts: 384

Original Poster
Rep: Reputation: 33
understood. thank you. I sent an updated spec to the author.
 
  


Reply

Tags
building, eject, rpm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Building an RPM from source... Alexvader Linux - General 4 04-15-2010 03:42 PM
building rpm from source yawe_frek Linux - Software 2 08-09-2007 03:38 PM
Building a Source RPM for RH9 stefaandk Red Hat 4 07-22-2005 07:23 AM
kernel-source-2.6.5-7.src.rpm requires kernel-dummy to build!? fizzdandantilus Suse/Novell 5 12-02-2004 12:48 PM
Building RPM from the source for mrproject Basel Linux - Newbie 0 02-26-2004 01:36 AM


All times are GMT -5. The time now is 05:03 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration