git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Anderson <ryan@michonline.com>
To: Kyle Moffett <mrmacman_g4@mac.com>
Cc: Junio C Hamano <junkio@cox.net>,
	git@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: git-diff-files and fakeroot
Date: Tue, 17 Jan 2006 01:08:48 -0500	[thread overview]
Message-ID: <43CC89F0.7060109@michonline.com> (raw)
In-Reply-To: <95E085A7-B910-4C01-BA6E-43971A6F5F97@mac.com>

[-- Attachment #1: Type: text/plain, Size: 2069 bytes --]

Kyle Moffett wrote:

> On Jan 17, 2006, at 00:27, Ryan Anderson wrote:
>
>> On Mon, Jan 16, 2006 at 06:36:39PM -0800, Junio C Hamano wrote:
>>
>>> BTW, Ryan, I suspect this is where you try to append "-dirty" to 
>>> the version number.  But I wonder why you are doing the build  under
>>> fakeroot to begin with?  Wasn't the SOP "build as
>>> yourself, install as root"?
>>
>>
>> That's exactly what started this search, because I was running  "make
>> deb-pkg". (Effectively.)  dpkg-buildpackage wants to think it  is
>> running as root, either via sudo or via fakeroot.  I had my  build
>> environment switched over entirely to fakeroot, as it just  seems to
>> be a better practice, but I've temporarily switched back  to sudo.
>>
>> However, your explanation has pointed out to me how I can solve  this
>> - run "fakeroot -u" instead of "fakeroot", and I think it will  be
>> fixed.
>
>
> You should run "make" first, then after that completes run "fakeroot 
> make deb-pkg".  I think this is similar to what the Debian package 
> "kernel-package" does, except it substitutes an alternate "debian/" 
> directory.  IIRC, it just runs "make install" as a normal user to a 
> staging directory, then runs "$(ROOTCMD) dpkg-deb -b [...]" to build 
> the package.  IMHO it's somewhat of a cleaner solution, and I've used 
> it for several years now with no issues.


Right "make all && fakeroot make deb-pkg" was failing, because with
CONFIG_LOCALVERSION_AUTO set, I was both getting a "-dirty" string
appended to the version, as well as something awfully close to a full
rebuild due to the version number changing, and on top of all that, the
dpkg-buildpackage would fail, as "-dirty" doesn't have a number in it
(hence why you see dfsg1 or ubuntu0 in version strings.)

I think I might take your suggestion, and fix up the builddeb script to
do the "run as root" part itself, rather than needing to do it outside. 
It would make it possible to just run "make oldconfig deb-pkg" which
would make things a little bit simpler.

-- 

Ryan Anderson
  sometimes Pug Majere


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

  reply	other threads:[~2006-01-17  6:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-17  2:10 git-diff-files and fakeroot Ryan Anderson
2006-01-17  2:33 ` Junio C Hamano
2006-01-17  2:36 ` Junio C Hamano
2006-01-17  5:27   ` Ryan Anderson
2006-01-17  5:59     ` Kyle Moffett
2006-01-17  6:08       ` Ryan Anderson [this message]
2006-01-17 18:10         ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43CC89F0.7060109@michonline.com \
    --to=ryan@michonline.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mrmacman_g4@mac.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).