无法从源代码构建 rpm

无法从源代码构建 rpm

我想从源代码构建一个包,基本上我所做的就是下载 Percona-Server-56-5.6.12-rc60.4.393.rhel6.src.rpm 并添加到-DWITH_INNODB_MEMCACHED=ONspec 文件中。

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

但是一旦我运行 rpmbuild,我就会得到以下信息

    -- 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 *尝试以非特权用户和 root 身份进行构建。

答案1

这是因为你没有正确设置你的 rpmmacros

您能将 ~/rpmmacros 或 ~/etc/rpmmacros 发送给我们吗?

相关内容