Having failures to build RPM using some spec file which works great for other users, I found out that it for some reason changes the current directory to rpmbuild/BUILD:
+ umask 022
+ cd /home/dev1/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
For other users on same machine exactly, it stays in the directory it was launched, and able to find the required files, so it works fine.
I double checked my .rpmmacros, and the only entry is the topdir pointing to rpmbuild directory.
The SPEC file is:
Summary: core package
Name: core
Version: 2
Release: 1
Group: Applications
License: Commercial
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Core package
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/Core
mkdir -p $RPM_BUILD_ROOT/Core/etc
install -m 755 dist/Core.jar $RPM_BUILD_ROOT/Core/
install -m 755 dist/launch.sh $RPM_BUILD_ROOT/Core/
install -m 755 dist/etc/configuration.conf $RPM_BUILD_ROOT/Core/etc/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/Core/Core.jar
/Core/launch.sh
%config(noreplace) /Core/etc/configuration.conf
%preun
mv /Core/etc/configuration.conf /Core/etc/configuration.conf.bak
%postun
rm -f /Core/Core.jar
rm -f /Core/launch.sh
Any idea, what can be causing rpmbuild to switch the current directory?
Thanks!