Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to build a package from source, basically all I did was downloading Percona-Server-56-5.6.12-rc60.4.393.rhel6.src.rpm and adding -DWITH_INNODB_MEMCACHED=ON to spec file.

http://www.percona.com/redir/downloads/Percona-Server-5.6/Percona-Server-5.6.12-rc60.4/source/Percona-Server-56-5.6.12-rc60.4.393.rhel6.src.rpm

rpmbuild -i ../Percona-Server-56-5.6.12-rc60.4.393.rhel6.src.rpm
rpmbuild -ba SPECS/percona-server.spec

but once I run rpmbuild, i get the following

    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysqlcheck.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysql_client_test_embedded.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysqlhotcopy.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysqlimport.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysqlbinlog.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysql-test-run.pl.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysql_secure_installation.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysqldumpslow.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/myisampack.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/myisam_ftdump.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysql_client_test.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man1/mysql_zap.1
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/man/man8/mysqld.8
    -- Up-to-date: /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64/usr/share/mysql/solaris/postinstall-solaris
    + mv -v '/home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64//usr/lib64/*.a' /home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64//usr/lib64/mysql/
    mv: cannot stat `/home/jenkins/rpmbuild/BUILDROOT/Percona-Server-56-5.6.12-rc60.4.7.rhel6.x86_64//usr/lib64/*.a': No such file or directory
    error: Bad exit status from /var/tmp/rpm-tmp.GLCsVU (%install)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.GLCsVU (%install)

/var/tmp/rpm-tmp.GLCsVU:

# FIXME: at some point we should stop doing this and just install everything
# FIXME: directly into /usr/lib64/mysql - perhaps at the same time as renaming
# FIXME: the shared libraries to use libmysql*-$major.$minor.so syntax
mv -v $RBR//usr/lib64/*.a $RBR//usr/lib64/mysql/

# Install logrotate and autostart
install -m 644 $MBD/release/support-files/mysql-log-rotate $RBR/etc/logrotate.d/mysql
install -m 755 $MBD/release/support-files/mysql.server $RBR/etc/init.d/mysql

# Create a symlink "rcmysql", pointing to the init.script. SuSE users
# will appreciate that, as all services usually offer this.
ln -s /etc/init.d/mysql $RBR/usr/sbin/rcmysql

*centos 6.4 *tried to build as non-privilege user and as root.

share|improve this question
    
It does not seem to be expanding "%{gotrevision}", try replacing it with something. Also, I'd recommend building as a non-privileged user (serverfault.com/questions/10027/…) –  Petter H Aug 24 '13 at 7:23
    
@PetterH fixed gotrevision, tried with non-privileged user and still getting this error ` error: Bad exit status from /var/tmp/rpm-tmp.cuSWKY (%install) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.cuSWKY (%install) ` –  rabotalius Aug 24 '13 at 10:44
    
OK do you have a $HOME/rpmbuild/BUILDROOT folder? –  Petter H Aug 24 '13 at 18:39
add comment

1 Answer

It's because your haven't set properly your rpmmacros

Can you send us either ~/rpmmacros or ~/etc/rpmmacros ?

share|improve this answer
    
cat ~/rpmmacros cat: /root/rpmmacros: No such file or directory –  rabotalius Aug 25 '13 at 13:29
    
My fault. it's ~/.rpmmacros In general, have a look at this. fedoraproject.org/wiki/Packaging:RPMMacros It explains how to configure your rpm environment –  Nikolaidis Fotis Aug 25 '13 at 14:47
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.