Red Hat Bugzilla – Bug 143746
Create buildmeister user for mortal RPM packaging
Last modified: 2007-11-30 17:10:57 EST
We recommend that RPM's be packaged as a mortal, but the default
rpm-build setup encourages users to package as root. I recommend that
the rpm-build package create the user buildmeister in its %pre script
and the directory tree /usr/src/redhat should be owned by this user.
Would-be packagers should be encouraged to su to this user to package.
This is particularly useful for non-programmers who just want to
install a 3rd party package "from source" using its SRPM.
I don't think a special account should be used (or needed). What if
multiple people are building RPMs at the same time on the same system?
Instead, I think it'd be nicer to have this in the default macros:
%_topdir %(echo $HOME)/rpmbuild
%_tmppath %(echo $HOME)/tmp
I used "buildmeister" only because this seems to be what Red Hat is
using internally, as evidenced by the ownership in some tarballs. This
solution should be adequate for single-user workstations. For
multi-user servers, presumably the admin is knowledgable enough to
change the default to something more appropriate. Or a commented-out
entry can be include for him, along with a script to create the
canonical directory structure for each user. (I believe the old
cpanflute was able to create the directory tree and initial .rpmmacros
The only required change in your list appears to be _topdir. The
others should already be present in some reasonable form in
Although it's no longer really a requirement, I grate at seeing
default accounts with usernames over 8 characters.....
rpm-build cannot establish a "buildmeister" conevntion
by itself. There is also no reason to dictatate how
packages are built, either by root, "buildmeister" or any other
account that anyone finds conevenient.
I agree. However, the current rpm-build package _does_ have a default
convention -- building packages as root in /usr/src/redhat. I
understand not doing anything new and fancy, but is there a reason to
continue doing that?
Agreed. The fact that /usr/lib/rpm/macros points at /usr/src/redhat
and that directory is owned by root establishes a defacto policy of
encouraging users to package as root.