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

Re: Should debhelper's dh_md5sums and dh_makeshlibs use chown?



On Tue, 24 Feb 1998, Joey Hess wrote:

> Jean Pierre LeJacq wrote:
> > packages.  Previously, I generated the md5sums and shlib myself in the
> > build target in the rules file.  This will not work with dh_md5sums
> > and dh_makeshlibs since they change the ownership of the generated
> > 
> > I myself like to restrict the binary target in rule to the minimum
> > possible so as to minimize super user access.  It doesn't seem
> > necessary to change the ownership in these two functions as it is
> > already done in dh_fixperms.
> 
> Basically, the reason those debhelper programs chown the files to root is
> because dh_fixperms is not instended to clean up permissions of debhelper
> programs. After all, debhelper programs should get the permissions right on
> thier own!
> 
> debian/rules binary is meant to be run as root. If you don't like that, use
> fakeroot.

Yes, I understand binary is meant to be run as root.  I myself use
super to execute debian/rules bianry.  That's the point of my
question.  I would like to have the least done as root.  Calculation
of md5sums and shlib can be done without root priveleges.  chown
cannot.  I'd therefore like to have dh_md5sums and dh_makeshlibs
executed in debian/rules build instead.

> But it is interesting that you're generating the md5sums and shlib in the
> build target - something I hadn't really considered. Could you send me your
> debian/rules so I can see why you want to do it that way? It really makes
> more sense to run dh_md5sums in the binary target, after debian/tmp is fully
> populated with files. And dh_makeshlibs needs debian/tmp to already have the
> files installed in debian/tmp, so it too should be run in the binary target.
> I'm confused how you're making these programs work in the build target.

It comes down to an interpertation of what is the difference between
"build" and "binary" targets.  The predominant interpertation is the
build is compile the source and binary to construct debian/tmp.  My
interpertation is that build compiles the source AND constructs as
much of debian/tmp as possible without root privileges.  binary then
completes the debian/tmp construction by executing commands that only
root can do (i.e. chown).

I'm revamping my package right now.  As soon as its done I'll forward
a copy to you.

Thanks for the reply.

-- 
Jean Pierre


--
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: