I do not know if this is the right way to post or not. I do not know much abut mailing lists. I tried to find forums for rpm but in vain. I have a situation where I want to package my web application as an RPM package. It includes only copying from one place to another. The benefit will be of versioning. If I have a new release, then it will maintain the versions in rpm database. So if I want to revert to previous version, it will be easy due to rpm database.
I am attaching my spec file. I run the following command to build the rpm package.
spkisl896:/usr/src/packages # rpmbuild -v -bb --clean SPECS/tasmportlet_original.spec
But it gives the following error.
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.52497
+ umask 022
+ cd /usr/src/packages/BUILD
+ cd /usr/src/packages/BUILD
+ rm -rf tasmportlets-1
+ /usr/bin/gzip -dc /usr/src/packages/SOURCES/tasmportlets-1.tar.gz
+ tar -xvvf -
drwxr-xr-x 0/0 0 2011-02-09 18:59 tasmportlets-1/
-rw-r--r-- 0/0 1476 2011-02-09 18:59 tasmportlets-1/LinuxProj.war
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd tasmportlets-1
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/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 /var/tmp/rpm-tmp.52497
+ umask 022
+ cd /usr/src/packages/BUILD
+ /bin/rm -rf /tmp/tasmportlets-1-buildroot
++ dirname /tmp/tasmportlets-1-buildroot
+ /bin/mkdir -p /tmp
+ /bin/mkdir /tmp/tasmportlets-1-buildroot
+ cd tasmportlets-1
+ $'\r'
: command not found497: line 27:
error: Bad exit status from /var/tmp/rpm-tmp.52497 (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.52497 (%build)
I am also attaching the file /var/tmp/rpm-tmp.52497.
Can you guys please help me out here. Please note that I am very much new to RPM and Linux as well.
--
Regards,
S. Fawad Ali Shah
Software Engineer,
Stafona. Inc.
Cell # +92 334 5001577
#!/bin/sh RPM_SOURCE_DIR="/usr/src/packages/SOURCES" RPM_BUILD_DIR="/usr/src/packages/BUILD" RPM_OPT_FLAGS="-O2 -g -m32 -march=i586 -mtune=i686 -fmessage-length=0 -D_FORTIFY_SOURCE=2" RPM_ARCH="i386" RPM_OS="linux" export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_DOC_DIR="/usr/share/doc/packages" export RPM_DOC_DIR RPM_PACKAGE_NAME="tasmportlets" RPM_PACKAGE_VERSION="1" RPM_PACKAGE_RELEASE="1" export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE RPM_BUILD_ROOT="/tmp/tasmportlets-1-buildroot" export RPM_BUILD_ROOT set -x umask 022 cd /usr/src/packages/BUILD cd /usr/src/packages/BUILD rm -rf tasmportlets-1 /usr/bin/gzip -dc /usr/src/packages/SOURCES/tasmportlets-1.tar.gz | tar -xvvf - STATUS=$? if [ $STATUS -ne 0 ]; then exit $STATUS fi cd tasmportlets-1 [ `/usr/bin/id -u` = '0' ] && /bin/chown -Rhf root . [ `/usr/bin/id -u` = '0' ] && /bin/chgrp -Rhf root . /bin/chmod -Rf a+rX,u+w,g-w,o-w . exit 0
Attachment:
tasmportlet_original.spec
Description: Binary data
_______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list