[RESOLVED] - rpmbuild and directory of SOURCES

Issues related to applications and software problems
Post Reply
User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

[RESOLVED] - rpmbuild and directory of SOURCES

Post by warron.french » 2019/06/21 19:25:14

I have created under my RPM building account (build) a subdirectory called CFirefox.

I have created a shell script to wrap around the process of creating Custom Firefox builds so that I can control where the Firefox application resides because sometimes we have technology constraints that require installing an older version of Firefox somewhere else; like /opt instead of /usr for example.

I have gotten everything prototyped every step of the way, and I am pretty happy with the challenges that I overcame and worked around.

I even use a here file script to create my firefox.spec under the directory /home/build/CFirefox/rpmbuild/SPECS.
I get my Source0 (firefox67-67.0.2.tar.xz) created in /home/build/CFirefox/rpmbuild/SOURCES.

The problem is when I execute the rpm creation command:

Code: Select all

rpmbuild -v -ba /home/build/CFirefox/rpmbuild/SPECS/firefox.spec
I get the following error:

Code: Select all

error: File /home/build/rpmbuild/SOURCES/firefox67-67.0.2.tar.xz: No such file or directory
Which is actually true. But can't I specify a path-prefix in front of the line for Source0 to tell rpmbuild where to find the Source0 referenced file?

The line in question looks like this, as it is broken:

Code: Select all

Source0:       firefox67-67.0.2.tar.xz
I also tried this:

Code: Select all

Source0:       /home/build/CFirefox/rpmbuild/SOURCES/firefox67-67.0.2.tar.xz
Does the entire rpmbuild directory structure have to be moved up directly under my user's homedir?
Last edited by warron.french on 2019/06/21 20:47:03, edited 1 time in total.
Thanks,
War

User avatar
TrevorH
Site Admin
Posts: 33219
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: rpmbuild and directory of SOURCES

Post by TrevorH » 2019/06/21 20:41:25

Does the entire rpmbuild directory structure have to be moved up directly under my user's homedir?
That would be the easiest solution.

You can also use ~/.rpmmacros amending the following content to suit:

Code: Select all

%_topdir /home/trevor/rpmbuild
%_tmppath %{_topdir}/tmp

%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{arch}
%packager <your.email@company.com>
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
warron.french
Posts: 616
Joined: 2014/03/27 20:21:58

Re: rpmbuild and directory of SOURCES

Post by warron.french » 2019/06/21 20:46:48

Oh wow. OK.

Thanks. I will just remove my CFirefox reference and handle accordingly.

Thanks TrevorH.
Thanks,
War

Post Reply