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

Re: Signing a package



Mark Baker <mbaker@iee.org> writes:

> On 12 Sep 1997, Douglas Bates wrote:
> 
> > Is it necessary to use "sudo" to sign a package when running
> > "dpkg-buildpackage"? 
> 
> No. In fact, if you use sudo, you will be unable to sign your package. 
> What you have to do is to use sudo for _everything except_ signing the
> package.  Presumably what you were trying to do was to do the whole thing
> as root?

Thanks for the clarification.  I realized after I wrote my message
that I had the roles of root and the regular user backwards.

> You can build the package as root sucessfully if you put your own key onto
> root's keyring, but it's not a good idea; also you can build as root, but
> disable signing by using the right options for dpkg-buildpackage and then
> sign them as yourself manually.

> The best solution is to use fakeroot, then you can do _everything_ as a
> non-root user. 

Dirk Eddelbuettel and Jim Pick both suggested fakeroot.  I have been
unable to get it to work.  I can install the fakeroot package but
Joost mentions in the documentation that you really should install the
sources and regenerate the package instead of just installing the
binary.  (The regeneration of the binary does some additional checking
of your libraries.)  When I tried to do that the
 debian/rules build-arch
failed.  Even if I ignore this and just install the binary package an
attempt to run
 dpkg-buildpackage -rfakeroot
will fail.  I get warnings about utmp entries early on as in

 $ dpkg-buildpackage -rfakeroot
 utmp entry ("") does not match value of LOGNAME ("bates"); using "bates" at /usr/lib/dpkg/controllib.pl line 19.
 no utmp entry available, using value of LOGNAME ("bates") at /usr/lib/dpkg/controllib.pl line 16.
 ...

but later the whole process stops with

 ...
 --------------- debstd processing finished --------------
 dpkg-gencontrol
 unable to get login information for username "" at /usr/lib/dpkg/controllib.pl line 27.
 make: *** [binary-arch] Error 13


I eventually configured sudo and built the package using sudo for root
permissions.
-- 
Douglas Bates                            bates@stat.wisc.edu
Statistics Department                    608/262-2598
University of Wisconsin - Madison        http://www.stat.wisc.edu/~bates/


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: