Building RPM fails for 15.17.1
Here is the error message. Moving CHANGES to doc/ was one way to fix it.
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.gA6jJY
+ umask 022
+ cd /root/rpmbuild/BUILD
+ cd monit-5.17.1
+ DOCDIR=/root/rpmbuild/BUILDROOT/monit-5.17.1-1.x86_64/usr/share/doc/monit-5.17.1
+ export DOCDIR
+ rm -rf /root/rpmbuild/BUILDROOT/monit-5.17.1-1.x86_64/usr/share/doc/monit-5.17.1
+ /bin/mkdir -p /root/rpmbuild/BUILDROOT/monit-5.17.1-1.x86_64/usr/share/doc/monit-5.17.1
+ cp -pr COPYING README doc/CHANGES /root/rpmbuild/BUILDROOT/monit-5.17.1-1.x86_64/usr/share/doc/monit-5.17.1
cp: cannot stat `doc/CHANGES': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.gA6jJY (%doc)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.gA6jJY (%doc)
Comments (10)
-
repo owner -
repo owner - changed status to resolved
-
reporter - changed status to open
file CHANGES is not making to distribution during the make distro command in 5.18. I had to manually add CHANGES to distro tar.gz. Missing changes file prevents RPM from building.
-
reporter - changed version to 5.18
-
repo owner Please can you post details from rpmbuild? Cannot reproduce the problem with 5.18, excerpt from rpmbuild (tested on CentOS 7):
[root@localhost ~]# rpmbuild -tb monit-5.18.tar.gz ... Processing files: monit-5.18-1.x86_64 Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.zObFTR + umask 022 + cd /root/rpmbuild/BUILD + cd monit-5.18 + DOCDIR=/root/rpmbuild/BUILDROOT/monit-5.18-1.x86_64/usr/share/doc/monit-5.18 + export DOCDIR + /usr/bin/mkdir -p /root/rpmbuild/BUILDROOT/monit-5.18-1.x86_64/usr/share/doc/monit-5.18 + cp -pr COPYING /root/rpmbuild/BUILDROOT/monit-5.18-1.x86_64/usr/share/doc/monit-5.18 + cp -pr README /root/rpmbuild/BUILDROOT/monit-5.18-1.x86_64/usr/share/doc/monit-5.18 + cp -pr CHANGES /root/rpmbuild/BUILDROOT/monit-5.18-1.x86_64/usr/share/doc/monit-5.18 + exit 0 Provides: config(monit) = 5.18-1 monit = 5.18-1 monit(x86-64) = 5.18-1 Requires(interp): /bin/sh /bin/sh Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 Requires(post): /bin/sh Requires(preun): /bin/sh Requires: /bin/sh libc.so.6()(64bit) libc.so.6(GLIBC_2.11)(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.4)(64bit) libc.so.6(GLIBC_2.4)(64bit) libcrypt.so.1()(64bit) libcrypt.so.1(GLIBC_2.2.5)(64bit) libcrypto.so.10()(64bit) libcrypto.so.10(libcrypto.so.10)(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.2.5)(64bit) libnsl.so.1()(64bit) libpam.so.0()(64bit) libpam.so.0(LIBPAM_1.0)(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) libpthread.so.0(GLIBC_2.3.2)(64bit) libresolv.so.2()(64bit) libssl.so.10()(64bit) libssl.so.10(libssl.so.10)(64bit) rtld(GNU_HASH) Processing files: monit-debuginfo-5.18-1.x86_64 Provides: monit-debuginfo = 5.18-1 monit-debuginfo(x86-64) = 5.18-1 Requires(rpmlib): rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/monit-5.18-1.x86_64 Wrote: /root/rpmbuild/RPMS/x86_64/monit-5.18-1.x86_64.rpm Wrote: /root/rpmbuild/RPMS/x86_64/monit-debuginfo-5.18-1.x86_64.rpm Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.DxH67H + umask 022 + cd /root/rpmbuild/BUILD + cd monit-5.18 + '[' -d /root/rpmbuild/BUILDROOT/monit-5.18-1.x86_64 ']' + rm -rf /root/rpmbuild/BUILDROOT/monit-5.18-1.x86_64 + exit 0 [root@localhost ~]# rpm -qlp /root/rpmbuild/RPMS/x86_64/monit-5.18-1.x86_64.rpm /etc/init.d/monit /etc/monitrc /usr/bin/monit /usr/share/doc/monit-5.18 /usr/share/doc/monit-5.18/CHANGES /usr/share/doc/monit-5.18/COPYING /usr/share/doc/monit-5.18/README /usr/share/man/man1/monit.1.gz
-
reporter Did you do make distro before rpmbuild?
-
repo owner Yes, the monit-5.18.tar.gz was created using "make dist" ... if you created the tar.gz from the source code, try to checkout the source code again:
git clone git@bitbucket.org:tildeslash/monit.git cd monit ./bootstrap ./configure make dist
-
reporter I see where I made a mistake. I downloaded source tar.gz from https://mmonit.com/monit/dist/monit-5.18.tar.gz (not checked out). Then I decompressed it and followed make distro routine. As the result I got a distro tarball with no CHANGES file. All I had to do is rpmbuild -t[ba] monit-5.18.tar.gz. Sorry about confusion.
-
repo owner - changed status to resolved
-
repo owner - changed version to 5.18.0
- Log in to comment
The problem is fixed in the development version already, the 5.17.1 release with a fixed rpm template is available for download here: https://mmonit.com/tmp/monit-5.17.1.tar.gz