Re: Installing during rebuild

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Wyse, Chris wrote:
> Is there a way to prevent the rpmbuild of the source rpm from performing
> the installation?  My install section is executed during rpmbuild - I
> really only want the installation done when I install the binary rpm.
> Am I missing something or doing something wrong (or both)?

Hmm...  Never install directly into the root of the filesystem.  That
would be bad.  The best way to prevent this from happening
accidentally is to never rpmbuild as root.  If you are not root then
you won't have permission to splat files into the root filesystem.

Make sure the rpm spec file is setting BuildRoot: to an image area.
A typical setting might be:

  BuildRoot: %{_tmpdir}/%{name}-%{version}-build

Then rpmbuild will %install normally but the installation will go into
the image area.  When using the above the path would typically be
something like /var/tmp/<package>-<version>-build/* enabling the
package to be built to a non-root user.

Summary: Never rpmbuild as root.

Bob

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux