#1413 Issue closed
: Compilation with "make rpm" failed¶
Labels: fixed / solved / done
, minor bug
schabrolles opened issue at 2017-07-14 12:11:¶
Tested on sles11sp4
Just run make rpm
after a git clone https://github.com/rear/rear.git
gives the following error:
error: Failed to rename /root/rear/build/rpmbuild/SPECS/rpm-spec.U7BFIE to /root/rear/build/rpmbuild/SPECS/rpm-spec.U7BFIE: No such file or directory: No such file or directory
make: *** [srpm] Error 1
full log:
sles11sap-144:~/rear # make rpm
rm -Rf dist build
rm -f build-stamp
make -C doc clean
make[1]: Entering directory `/root/rear/doc'
rm -f unconv.8 *.html *.xml
make -C user-guide clean
make[2]: Entering directory `/root/rear/doc/user-guide'
rm -f *.html *.svg *.xml
make[2]: Leaving directory `/root/rear/doc/user-guide'
make[1]: Leaving directory `/root/rear/doc'
== Validating scripts and configuration ==
find etc/ usr/share/rear/conf/ -name '*.conf' | xargs -n 1 bash -n
bash -n usr/sbin/rear
find . -name '*.sh' | xargs -n 1 bash -n
find usr/share/rear -name '*.sh' | grep -v -E '(lib|skel|conf)' | while read FILE ; do \
num=$(echo ${FILE##*/} | cut -c1-3); \
if [[ "$num" = "000" || "$num" = "999" ]] ; then \
echo "ERROR: script $FILE may not start with $num"; \
exit 1; \
else \
if $( grep '[_[:alpha:]]' <<< $num >/dev/null 2>&1 ) ; then \
echo "ERROR: script $FILE must start with 3 digits"; \
exit 1; \
fi; \
fi; \
done
== Prepare manual ==
make -C doc man
make[1]: Entering directory `/root/rear/doc'
make[1]: Nothing to be done for `man'.
make[1]: Leaving directory `/root/rear/doc'
== Building archive rear-2.1-git.2323.f47f705.master ==
rm -Rf build/rear-2.1-git.2323.f47f705.master
mkdir -p dist build/rear-2.1-git.2323.f47f705.master
tar -c --exclude-from=.gitignore --exclude=.gitignore --exclude=".??*" * | \
tar -C build/rear-2.1-git.2323.f47f705.master -x
== Rewriting packaging/rpm/rear.spec, packaging/debian/rear.dsc and usr/sbin/rear ==
sed -i.orig \
-e 's#^Source:.*#Source: https://sourceforge.net/projects/rear/files/rear/2.1/rear-2.1-git.2323.f47f705.master.tar.gz#' \
-e 's#^Version:.*#Version: 2.1#' \
-e 's#^%define rpmrelease.*#%define rpmrelease .git.2323.f47f705.master#' \
-e 's#^%setup.*#%setup -q -n rear-2.1-git.2323.f47f705.master#' \
build/rear-2.1-git.2323.f47f705.master/packaging/rpm/rear.spec
sed -i.orig \
-e 's#^readonly VERSION=.*#readonly VERSION=2.1-git.2323.f47f705.master#' \
-e 's#^readonly RELEASE_DATE=.*#readonly RELEASE_DATE="2017-07-14"#' \
build/rear-2.1-git.2323.f47f705.master/usr/sbin/rear
tar -czf dist/rear-2.1-git.2323.f47f705.master.tar.gz -C build rear-2.1-git.2323.f47f705.master
== Building SRPM package rear-2.1-git.2323.f47f705.master ==
rpmbuild -ts --clean --nodeps \
--define="_topdir /root/rear/build/rpmbuild" \
--define="_sourcedir /root/rear/dist" \
--define="_srcrpmdir /root/rear/dist" \
--define "debug_package %{nil}" \
dist/rear-2.1-git.2323.f47f705.master.tar.gz
error: Failed to rename /root/rear/build/rpmbuild/SPECS/rpm-spec.U7BFIE to /root/rear/build/rpmbuild/SPECS/rpm-spec.U7BFIE: No such file or directory: No such file or directory
make: *** [srpm] Error 1
gdha commented at 2017-08-23 15:36:¶
@jsmeix if you got time could you check this on SLES from your side?
gdha commented at 2017-11-17 15:19:¶
@schabrolles is the error still there?
schabrolles commented at 2017-11-17 15:41:¶
@gdha, yes it is still there.
== Rewriting packaging/rpm/rear.spec, packaging/debian/rear.dsc and usr/sbin/rear ==
sed -i.orig \
-e 's#^Source:.*#Source: https://sourceforge.net/projects/rear/files/rear/2.2/rear-2.2-git.2621.90d6754.master.tar.gz#' \
-e 's#^Version:.*#Version: 2.2#' \
-e 's#^%define rpmrelease.*#%define rpmrelease .git.2621.90d6754.master#' \
-e 's#^%setup.*#%setup -q -n rear-2.2-git.2621.90d6754.master#' \
build/rear-2.2-git.2621.90d6754.master/packaging/rpm/rear.spec
sed -i.orig \
-e 's#^Version:.*#Version: 2.2-0git.2621.90d6754.master#' \
build/rear-2.2-git.2621.90d6754.master/packaging/debian/rear.dsc
sed -i.orig \
-e 's#^readonly VERSION=.*#readonly VERSION=2.2-git.2621.90d6754.master#' \
-e 's#^readonly RELEASE_DATE=.*#readonly RELEASE_DATE="2017-11-17"#' \
build/rear-2.2-git.2621.90d6754.master/usr/sbin/rear
tar -czf dist/rear-2.2-git.2621.90d6754.master.tar.gz -C build rear-2.2-git.2621.90d6754.master
== Building SRPM package rear-2.2-git.2621.90d6754.master ==
rpmbuild -ts --clean --nodeps \
--define="_topdir /tmp/rear/build/rpmbuild" \
--define="_sourcedir /tmp/rear/dist" \
--define="_srcrpmdir /tmp/rear/dist" \
--define "debug_package %{nil}" \
dist/rear-2.2-git.2621.90d6754.master.tar.gz
error: Failed to rename /tmp/rear/build/rpmbuild/SPECS/rpm-spec.2PP7cU to /tmp/rear/build/rpmbuild/SPECS/rpm-spec.2PP7cU: No such file or directory: No such file or directory
make: *** [srpm] Error 1
gdha commented at 2017-11-22 14:30:¶
@schabrolles Can you build another product? I mean do you have all required RPM build executables present? Do you run it as root or as plain user? Perhaps some permission issues on that directory?
jsmeix commented at 2017-11-28 11:09:¶
I assume this does not need to be fixed for ReaR 2.3
so that it can be postponed to ReaR 2.4.
schabrolles commented at 2017-11-28 21:10:¶
@gdha sorry, I did not see your previous message.
I confirm, make rpm
is still not working with sles11sp4 (on Power at
least....)
@jsmeix any idea ? it works for sles12, rhel7, rhel6 ... but not sles11
...
jsmeix commented at 2018-05-03 06:49:¶
@schabrolles
I am afraid I did not find time to have a closer look here.
Do you like to get it solved for ReaR 2.4 or is it also o.k.
when we postpone it to ReaR 2.5, cf.
https://github.com/rear/rear/issues/1790
schabrolles commented at 2018-05-03 08:54:¶
No, it is OK for ReaR 2.5 ... for the moment, I use the following workaround:
cd rear
make rpm
#make rpm failed, but needed files are created
mkdir -p /usr/src/packages/SOURCES/
cp dist/rear-2.3-git.2973.7bc086e.master.tar.gz /usr/src/packages/SOURCES/
rpmbuild -ba build/rear-2.3-git.2973.7bc086e.master/packaging/rpm/rear.spec
# rpm packages are created in /usr/src/packages/RPMS
jsmeix commented at 2019-02-26 10:13:¶
With current GitHub master code
I get on my openSUSE Leap 15.0 system:
# git clone https://github.com/rear/rear.git
# mv rear rear.github.master
# cd rear.github.master
# make rpm
rm -Rf dist build
rm -f build-stamp
make -C doc clean
make[1]: Entering directory '/root/rear.github.master/doc'
rm -f unconv.8 *.html *.xml
make -C user-guide clean
make[2]: Entering directory '/root/rear.github.master/doc/user-guide'
rm -f *.html *.svg *.xml
make[2]: Leaving directory '/root/rear.github.master/doc/user-guide'
make[1]: Leaving directory '/root/rear.github.master/doc'
== Validating scripts and configuration ==
find etc/ usr/share/rear/conf/ -name '*.conf' | xargs -n 1 bash -n
bash -n usr/sbin/rear
find . -name '*.sh' | xargs -n 1 bash -O extglob -O nullglob -n
find usr/share/rear -name '*.sh' | grep -v -E '(lib|skel|conf)' | while read FILE ; do \
num=$(echo ${FILE##*/} | cut -c1-3); \
if [[ "$num" = "000" || "$num" = "999" ]] ; then \
echo "ERROR: script $FILE may not start with $num"; \
exit 1; \
else \
if $( grep '[_[:alpha:]]' <<< $num >/dev/null 2>&1 ) ; then \
echo "ERROR: script $FILE must start with 3 digits"; \
exit 1; \
fi; \
fi; \
done
== Prepare manual ==
make -C doc man
make[1]: Entering directory '/root/rear.github.master/doc'
make[1]: Nothing to be done for 'man'.
make[1]: Leaving directory '/root/rear.github.master/doc'
== Building archive rear-2.4-git.3250.bf91ae91.master ==
rm -Rf build/rear-2.4-git.3250.bf91ae91.master
mkdir -p dist build/rear-2.4-git.3250.bf91ae91.master
tar -c --exclude-from=.gitignore --exclude=.gitignore --exclude=".??*" * | \
tar -C build/rear-2.4-git.3250.bf91ae91.master -x
== Rewriting packaging/rpm/rear.spec, packaging/debian/rear.dsc and usr/sbin/rear ==
sed -i.orig \
-e 's#^Source:.*#Source: https://sourceforge.net/projects/rear/files/rear/2.4/rear-2.4-git.3250.bf91ae91.master.tar.gz#' \
-e 's#^Version:.*#Version: 2.4#' \
-e 's#^%define rpmrelease.*#%define rpmrelease .git.3250.bf91ae91.master#' \
-e 's#^%setup.*#%setup -q -n rear-2.4-git.3250.bf91ae91.master#' \
build/rear-2.4-git.3250.bf91ae91.master/packaging/rpm/rear.spec
sed -i.orig \
-e 's#^Version:.*#Version: 2.4-0git.3250.bf91ae91.master#' \
build/rear-2.4-git.3250.bf91ae91.master/packaging/debian/rear.dsc
sed -i.orig \
-e 's#^readonly VERSION=.*#readonly VERSION=2.4-git.3250.bf91ae91.master#' \
-e 's#^readonly RELEASE_DATE=.*#readonly RELEASE_DATE="2019-02-21"#' \
build/rear-2.4-git.3250.bf91ae91.master/usr/sbin/rear
tar -czf dist/rear-2.4-git.3250.bf91ae91.master.tar.gz -C build rear-2.4-git.3250.bf91ae91.master
== Building SRPM package rear-2.4-git.3250.bf91ae91.master ==
rpmbuild -ts --clean --nodeps \
--define="_topdir /root/rear.github.master/build/rpmbuild" \
--define="_sourcedir /root/rear.github.master/dist" \
--define="_srcrpmdir /root/rear.github.master/dist" \
--define "debug_package %{nil}" \
dist/rear-2.4-git.3250.bf91ae91.master.tar.gz
warning: Macro expanded in comment on line 20: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Wrote: /root/rear.github.master/dist/rear-2.4-1.git.3250.bf91ae91.master.src.rpm
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.CQDdTx
+ umask 022
+ cd /root/rear.github.master/build/rpmbuild/BUILD
+ rm -rf rear-2.4-git.3250.bf91ae91.master
+ exit 0
== Building RPM package rear-2.4-git.3250.bf91ae91.master ==
rpmbuild --rebuild --clean \
--define="_topdir /root/rear.github.master/build/rpmbuild" \
--define="_rpmdir /root/rear.github.master/dist" \
--define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
--define "debug_package %{nil}" \
dist/rear-2.4-1*.src.rpm
Installing dist/rear-2.4-1.git.3250.bf91ae91.master.src.rpm
warning: Macro expanded in comment on line 20: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.5F0Nji
+ umask 022
+ cd /root/rear.github.master/build/rpmbuild/BUILD
+ cd /root/rear.github.master/build/rpmbuild/BUILD
+ rm -rf rear-2.4-git.3250.bf91ae91.master
+ /usr/bin/gzip -dc /root/rear.github.master/build/rpmbuild/SOURCES/rear-2.4-git.3250.bf91ae91.master.tar.gz
+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd rear-2.4-git.3250.bf91ae91.master
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ echo '30 1 * * * root /usr/sbin/rear checklayout || /usr/sbin/rear mkrescue'
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.orj2eJ
+ umask 022
+ cd /root/rear.github.master/build/rpmbuild/BUILD
+ /usr/bin/rm -rf /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64
++ dirname /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64
+ /usr/bin/mkdir -p /root/rear.github.master/build/rpmbuild/BUILDROOT
+ /usr/bin/mkdir /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64
+ cd rear-2.4-git.3250.bf91ae91.master
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.15dnba
+ umask 022
+ cd /root/rear.github.master/build/rpmbuild/BUILD
+ cd rear-2.4-git.3250.bf91ae91.master
+ /usr/bin/rm -rf /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64
+ /usr/bin/make install DESTDIR=/root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64
make[1]: Entering directory '/root/rear.github.master/build/rpmbuild/BUILD/rear-2.4-git.3250.bf91ae91.master'
== Validating scripts and configuration ==
find etc/ usr/share/rear/conf/ -name '*.conf' | xargs -n 1 bash -n
bash -n usr/sbin/rear
find . -name '*.sh' | xargs -n 1 bash -O extglob -O nullglob -n
find usr/share/rear -name '*.sh' | grep -v -E '(lib|skel|conf)' | while read FILE ; do \
num=$(echo ${FILE##*/} | cut -c1-3); \
if [[ "$num" = "000" || "$num" = "999" ]] ; then \
echo "ERROR: script $FILE may not start with $num"; \
exit 1; \
else \
if $( grep '[_[:alpha:]]' <<< $num >/dev/null 2>&1 ) ; then \
echo "ERROR: script $FILE must start with 3 digits"; \
exit 1; \
fi; \
fi; \
done
== Prepare manual ==
make -C doc man
make[2]: Entering directory '/root/rear.github.master/build/rpmbuild/BUILD/rear-2.4-git.3250.bf91ae91.master/doc'
make[2]: Nothing to be done for 'man'.
make[2]: Leaving directory '/root/rear.github.master/build/rpmbuild/BUILD/rear-2.4-git.3250.bf91ae91.master/doc'
== Installing configuration ==
install -d -m0700 /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/etc/rear/
install -d -m0700 /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/etc/rear/cert/
[[ ! -e /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/etc/rear/local.conf ]] && \
install -Dp -m0600 etc/rear/local.conf /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/etc/rear/local.conf
[[ ! -e /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/etc/rear/os.conf && -e etc/rear/os.conf ]] && \
install -Dp -m0600 etc/rear/os.conf /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/etc/rear/os.conf
make[1]: [Makefile:121: install-config] Error 1 (ignored)
find /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/etc/rear/ -name '.gitignore' -exec rm -rf {} \; &>/dev/null
== Installing binary ==
install -Dp -m0755 usr/sbin/rear /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/sbin/rear
sed -i -e 's,^CONFIG_DIR=.*,CONFIG_DIR="/etc/rear",' \
-e 's,^SHARE_DIR=.*,SHARE_DIR="/usr/share/rear",' \
-e 's,^VAR_DIR=.*,VAR_DIR="/var/lib/rear",' \
/root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/sbin/rear
== Installing scripts ==
install -d -m0755 /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/rear/
cp -a usr/share/rear/. /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/rear/
find /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/rear/ -name '.gitignore' -exec rm -rf {} \; &>/dev/null
== Installing working directory ==
install -d -m0755 /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/var/lib/rear/
install -d -m0755 /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/var/log/rear/
== Installing documentation ==
make -C doc install
make[2]: Entering directory '/root/rear.github.master/build/rpmbuild/BUILD/rear-2.4-git.3250.bf91ae91.master/doc'
install -Dp -m0644 rear.8 /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/man/man8/rear.8
make[2]: Leaving directory '/root/rear.github.master/build/rpmbuild/BUILD/rear-2.4-git.3250.bf91ae91.master/doc'
sed -i -e 's,/etc,/etc,' \
-e 's,/usr/sbin,/usr/sbin,' \
-e 's,/usr/share,/usr/share,' \
-e 's,/usr/share/doc/packages,/usr/share/doc,' \
/root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/man/man8/rear.8
make[1]: Leaving directory '/root/rear.github.master/build/rpmbuild/BUILD/rear-2.4-git.3250.bf91ae91.master'
+ /usr/bin/install -Dp -m0644 rear.cron /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/etc/cron.d/rear
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-suse
Processing files: rear-2.4-1.git.3250.bf91ae91.master.x86_64
Executing(%doc): /bin/sh -e /var/tmp/rpm-tmp.kHblaL
+ umask 022
+ cd /root/rear.github.master/build/rpmbuild/BUILD
+ cd rear-2.4-git.3250.bf91ae91.master
+ DOCDIR=/root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/doc/packages/rear
+ export LC_ALL=C
+ LC_ALL=C
+ export DOCDIR
+ /usr/bin/mkdir -p /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/doc/packages/rear
+ cp -pr MAINTAINERS /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/doc/packages/rear
+ cp -pr COPYING /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/doc/packages/rear
+ cp -pr README.adoc /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/doc/packages/rear
+ cp -pr doc/rear-release-notes.txt /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64/usr/share/doc/packages/rear
+ exit 0
warning: File listed twice: /etc/rear/cert
Provides: config(rear) = 2.4-1.git.3250.bf91ae91.master rear = 2.4-1.git.3250.bf91ae91.master rear(x86-64) = 2.4-1.git.3250.bf91ae91.master
Requires(interp): /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(pre): /bin/sh
Requires: /bin/bash
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64
Wrote: /root/rear.github.master/dist/rear-2.4-1.git.3250.bf91ae91.master.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.7G3I8x
+ umask 022
+ cd /root/rear.github.master/build/rpmbuild/BUILD
+ cd rear-2.4-git.3250.bf91ae91.master
+ /usr/bin/rm -rf /root/rear.github.master/build/rpmbuild/BUILDROOT/rear-2.4-1.git.3250.bf91ae91.master.x86_64
+ exit 0
Executing(--clean): /bin/sh -e /var/tmp/rpm-tmp.mGBdcl
+ umask 022
+ cd /root/rear.github.master/build/rpmbuild/BUILD
+ rm -rf rear-2.4-git.3250.bf91ae91.master
+ exit 0
# ls -l dist
total 1992
-rw-r--r-- 1 root root 729621 Feb 26 11:08 rear-2.4-1.git.3250.bf91ae91.master.src.rpm
-rw-r--r-- 1 root root 580752 Feb 26 11:08 rear-2.4-1.git.3250.bf91ae91.master.x86_64.rpm
-rw-r--r-- 1 root root 723620 Feb 26 11:08 rear-2.4-git.3250.bf91ae91.master.tar.gz
So I assume this issue was meanwhile somehow fixed.
[Export of Github issue for rear/rear.]