On Tue, 2004-11-30 at 17:34 -0500, Robert P. J. Day wrote: > a short digression -- most of the solutions for installing and > building source rpms require the root password since the rpm-related > commands, by default, like to unload source rpms in /usr/src/redhat. > barf. > > you're better off creating a personal .rpmmacros file that overrides > that silliness so that these operations happen under your home > directory. you'd still need root privilege to *install* a new kernel, > but at least you can do everything else as a regular user. A good reason for doing this is that sometimes the build process may try to install things in the final destination directories rather than in RPM's temporary "build root" for the package; this is particularly true when you're developing packages and seeing which commands are needed to install "the RPM way". Doing the build as a non-root user lets you spot this problem easily, without the risk of leaving part-installed packages on your live build system. > here's a quick and dirty example of a ~/.rpmmacros file, customize to > taste: > > ===== > # Packaging info. > > %packager %(echo ${USER}@)%(hostname) If this is your personal .rpmmacros file, why not just spell out your name in full? %packager Paul Howarth <paul@xxxxxxxxxxxx> > %distribution Personal Build > > # Fundamental directory locations. > > %_topdir %(echo $HOME)/build/rpms > %_sourcedir %{_topdir}/SOURCES > %_specdir %{_sourcedir} > > %_builddir %{_topdir}/BUILD > > %_tmppath %{_topdir}/tmp > # > # this next line shouldn't be necessary > # > %tmpdir %{_topdir}/tmp > %_buildroot %{_topdir}/%{_tmppath}/%{name}-%{version}-root > > %_rpmdir %{_topdir}/RPMS > %_srcrpmdir %{_topdir}/SRPMS > %_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm Having set %_topdir, you don't really need to set %_sourcedir, % _specdir, %_builddir, %_rpmdir, or %_srcrpmdir unless you want them to be different from %{_topdir}/SOURCES, %{_topdir}/SPECS, % {_topdir}/BUILD, %{_topdir}/RPMS and %{_topdir}/SRPMS respectively (e.g. %_specdir above). > # Override unpackaged errors. > > %_unpackaged_files_terminate_build 0 I don't use that because unpackaged files are usually the sign of a packaging problem that I'd rather fix than ignore. If there's a good reason for the unpackaged file, I'd rather put the macro in the affected spec file so it just applies to that package. I also add: %_signature gpg %_gpg_name B56A8BAC so that I can sign my RPMs (B56A8BAC is my GPG key ID). Paul. -- Paul Howarth <paul@xxxxxxxxxxxx>