FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 08-16-2011, 02:23 PM
Dan McGee
 
Default use -u when running fakeroot to preserve file owners

On Tue, Aug 16, 2011 at 9:17 AM, Florian Pritz <bluewind@xinu.at> wrote:
> Running without -u breaks mkinitcpio-git PKGBUILD when running inside
> the git tree because files will be owned by root instead of the user.
> This makes git describe believe the tree has changed so it will consider
> it dirty while git describe outside fakeroot will consider it clean.
>
> References: http://www.spinics.net/lists/git/msg20973.html
>
> Signed-off-by: Florian Pritz <bluewind@xinu.at>

This sounds like it could cause all sorts of problems with
repackaging, namely things like `mkdir -p` usage in builds and having
directories owned by the complete wrong user. Have you tested this on
anything but your particular use case?

-Dan

> ---
> *scripts/makepkg.sh.in | * *4 ++--
> *1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index f464014..e996a55 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -185,9 +185,9 @@ enter_fakeroot() {
> * * * *msg "$(gettext "Entering %s environment...")" "fakeroot"
>
> * * * *if [[ -n $newpkgver ]]; then
> - * * * * * * * fakeroot -- $0 --forcever $newpkgver -F "${ARGLIST[@]}" || exit $?
> + * * * * * * * fakeroot -u -- $0 --forcever $newpkgver -F "${ARGLIST[@]}" || exit $?
> * * * *else
> - * * * * * * * fakeroot -- $0 -F "${ARGLIST[@]}" || exit $?
> + * * * * * * * fakeroot -u -- $0 -F "${ARGLIST[@]}" || exit $?
> * * * *fi
> *}
>
> --
> 1.7.6
>
>
 
Old 08-16-2011, 02:48 PM
Dave Reisner
 
Default use -u when running fakeroot to preserve file owners

On Tue, Aug 16, 2011 at 09:23:06AM -0500, Dan McGee wrote:
> On Tue, Aug 16, 2011 at 9:17 AM, Florian Pritz <bluewind@xinu.at> wrote:
> > Running without -u breaks mkinitcpio-git PKGBUILD when running inside
> > the git tree because files will be owned by root instead of the user.
> > This makes git describe believe the tree has changed so it will consider
> > it dirty while git describe outside fakeroot will consider it clean.
> >
> > References: http://www.spinics.net/lists/git/msg20973.html
> >
> > Signed-off-by: Florian Pritz <bluewind@xinu.at>
>
> This sounds like it could cause all sorts of problems with
> repackaging, namely things like `mkdir -p` usage in builds and having
> directories owned by the complete wrong user. Have you tested this on
> anything but your particular use case?
>
> -Dan
>

Bare minimum, our .PKGINFO file isn't created by the current uid/gid.
I'm not really a fan of this only because I don't know what else it
implies.

d

> > ---
> > *scripts/makepkg.sh.in | * *4 ++--
> > *1 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> > index f464014..e996a55 100644
> > --- a/scripts/makepkg.sh.in
> > +++ b/scripts/makepkg.sh.in
> > @@ -185,9 +185,9 @@ enter_fakeroot() {
> > * * * *msg "$(gettext "Entering %s environment...")" "fakeroot"
> >
> > * * * *if [[ -n $newpkgver ]]; then
> > - * * * * * * * fakeroot -- $0 --forcever $newpkgver -F "${ARGLIST[@]}" || exit $?
> > + * * * * * * * fakeroot -u -- $0 --forcever $newpkgver -F "${ARGLIST[@]}" || exit $?
> > * * * *else
> > - * * * * * * * fakeroot -- $0 -F "${ARGLIST[@]}" || exit $?
> > + * * * * * * * fakeroot -u -- $0 -F "${ARGLIST[@]}" || exit $?
> > * * * *fi
> > *}
> >
> > --
> > 1.7.6
> >
> >
>
 
Old 08-16-2011, 03:24 PM
Florian Pritz
 
Default use -u when running fakeroot to preserve file owners

On 16.08.2011 16:48, Dave Reisner wrote:
> On Tue, Aug 16, 2011 at 09:23:06AM -0500, Dan McGee wrote:
>> On Tue, Aug 16, 2011 at 9:17 AM, Florian Pritz <bluewind@xinu.at> wrote:
>> > Running without -u breaks mkinitcpio-git PKGBUILD when running inside
>> > the git tree because files will be owned by root instead of the user.
>> > This makes git describe believe the tree has changed so it will consider
>> > it dirty while git describe outside fakeroot will consider it clean.
>> >
>> > References: http://www.spinics.net/lists/git/msg20973.html
>> >
>> > Signed-off-by: Florian Pritz <bluewind@xinu.at>
>>
>> This sounds like it could cause all sorts of problems with
>> repackaging, namely things like `mkdir -p` usage in builds and having
>> directories owned by the complete wrong user. Have you tested this on
>> anything but your particular use case?
>>
>> -Dan
>>
>
> Bare minimum, our .PKGINFO file isn't created by the current uid/gid.
> I'm not really a fan of this only because I don't know what else it
> implies.

Newly created files will default to the current user too, so don't merge
this.

Sorry for the noise.

--
Florian Pritz
 

Thread Tools




All times are GMT. The time now is 05:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org