LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   {dummy problem} building an rpm (https://www.linuxquestions.org/questions/linux-software-2/%7Bdummy-problem%7D-building-an-rpm-850948/)

DBabo 12-17-2010 05:04 PM

{dummy problem} building an rpm
 
3 Attachment(s)
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)


unSpawn 12-17-2010 07:27 PM

Quote:

Originally Posted by DBabo (Post 4195235)
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 (Post 4195235)
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 (Post 4195235)
build is done by regular user.

Perfect.

DBabo 12-17-2010 07:41 PM

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...

unSpawn 12-17-2010 08:21 PM

Quote:

Originally Posted by DBabo (Post 4195379)
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'.

DBabo 12-17-2010 09:11 PM

Quote:

Originally Posted by unSpawn (Post 4195409)
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.

unSpawn 12-18-2010 07:29 AM

Quote:

Originally Posted by DBabo (Post 4195435)
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 (Post 4195435)
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 (Post 4195435)
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.

DBabo 12-18-2010 12:22 PM

understood. thank you. I sent an updated spec to the author.


All times are GMT -5. The time now is 01:18 AM.