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 User Repository

 
 
LinkBack Thread Tools
 
Old 11-21-2009, 05:30 PM
Lukáš Jirkovský
 
Default avoid usage of fakeroot: always use of build() and package() (Was: application as a TU)

2009/11/21 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>:
> hollunder@gmx.at wrote:
>> On Sat, 21 Nov 2009 14:24:58 -0300
>> Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
>>
>>
>>> Andrea Scarpino wrote:
>>>
>>>> Why do you use package() function when the package isn't a splitted
>>>> package?
>>>>
>>>>
>>>>
>>> Hello
>>>
>>> Using both build() and package() is not necessary condition for use
>>> only with splitted packages, its avoid to use the fakeroot on building
>>> process that is not needed in 99% of packages.
>>>
>>> Good luck!
>>>
>>>
>>
>> Sorry, but I consider the use of fakeroot a good thing, it helps
>> to reveal errors while packaging/creating the PKGBUILD at least. Don't
>> know why it should be avoided.
>>
>>
> fakeroot make a table of function pointers for many file manipulation
> calls, like open(), close(), chmod() and etc -> overhead, slowdowns
> (small of course)
> During the build process file perms are not necessary to be "tracked",
> or at least in 99% of packages. Only during the install process is only
> needed.
>
> If you have an example that breaks this, please let me know
>
> --
> Gerardo Exequiel Pozzi ( djgera )
> http://www.djgera.com.ar
> KeyID: 0x1B8C330D
> Key fingerprint = 0CAA D5D4 CD85 4434 A219 *76ED 39AB 221B 1B8C 330D
>
>
>

Nice feature! I didn't know that using package() avoids using of fakeroot.

Back to my point. There used to be a problem with compilation of
amarok1 package from AUR only because of fakeroot and I guess that it
would also help with building of mplayer (configure crashes under
fakeroot environment and needs to be patched but maybe it was fixed
meanwile alongside with amarok1 problem). So in some specific cases I
can see the point of using separate package() even when the PKGBUILD
builds only one package.

best,
Lukas
 
Old 11-22-2009, 04:07 AM
Ray Rashif
 
Default avoid usage of fakeroot: always use of build() and package() (Was: application as a TU)

2009/11/22 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>

> Lukáš Jirkovský wrote:
> > 2009/11/21 Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>:
> >
> >> hollunder@gmx.at wrote:
> >>
> >>> On Sat, 21 Nov 2009 14:24:58 -0300
> >>> Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> wrote:
> >>>
> >>>
> >>>
> >>>> Andrea Scarpino wrote:
> >>>>
> >>>>
> >>>>> Why do you use package() function when the package isn't a splitted
> >>>>> package?
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>> Hello
> >>>>
> >>>> Using both build() and package() is not necessary condition for use
> >>>> only with splitted packages, its avoid to use the fakeroot on building
> >>>> process that is not needed in 99% of packages.
> >>>>
> >>>> Good luck!
> >>>>
> >>>>
> >>>>
> >>> Sorry, but I consider the use of fakeroot a good thing, it helps
> >>> to reveal errors while packaging/creating the PKGBUILD at least. Don't
> >>> know why it should be avoided.
> >>>
> >>>
> >>>
> >> fakeroot make a table of function pointers for many file manipulation
> >> calls, like open(), close(), chmod() and etc -> overhead, slowdowns
> >> (small of course)
> >> During the build process file perms are not necessary to be "tracked",
> >> or at least in 99% of packages. Only during the install process is only
> >> needed.
> >>
> >> If you have an example that breaks this, please let me know
> >>
> >> --
> >> Gerardo Exequiel Pozzi ( djgera )
> >> http://www.djgera.com.ar
> >> KeyID: 0x1B8C330D
> >> Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D
> >>
> >>
> >>
> >>
> >
> > Nice feature! I didn't know that using package() avoids using of
> fakeroot.
> >
> > Back to my point. There used to be a problem with compilation of
> > amarok1 package from AUR only because of fakeroot and I guess that it
> > would also help with building of mplayer (configure crashes under
> > fakeroot environment and needs to be patched but maybe it was fixed
> > meanwile alongside with amarok1 problem). So in some specific cases I
> > can see the point of using separate package() even when the PKGBUILD
> > builds only one package.
> >
> > best,
> > Lukas
> >
> >
>
>
> Most reported crashes on bugtracker are because nvidia libgl, that
> conflics with libfakeroot, both uses dlsym() (nvidia i don't know why
> does this, fakeroot do this to fill a table of pointer to functions),
> the result is a jump to NULL :P
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=516024#75
>
>
>
> --
> Gerardo Exequiel Pozzi ( djgera )
> http://www.djgera.com.ar
> KeyID: 0x1B8C330D
> Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D
>
>
>
Hi Gerardo can you confirm that there are no (owner) permission issues when
building without fakeroot (i.e all owned by user)? I don't see chown
anywhere other than extract_sources().
 
Old 11-22-2009, 08:22 AM
Ranguvar
 
Default avoid usage of fakeroot: always use of build() and package() (Was: application as a TU)

On Sun, Nov 22, 2009 at 1:17 AM, Allan McRae <allan@archlinux.org> wrote:

> Ray Rashif wrote:
>
>>
>> Hi Gerardo can you confirm that there are no (owner) permission issues
>> when
>> building without fakeroot (i.e all owned by user)? I don't see chown
>> anywhere other than extract_sources().
>>
>>
>
> If your packaging is done properly, then there is no issues. Always use
> "install" and not "cp".
>
> Allan
>

The minor problem with using 'install' is that you must specify the
permissions right there, and you cannotsimply use whatever permission was
set by make install.
Of course, that's what makes it not have tainted permissions from the
building user in the first place...

-- Ranguvar
 
Old 11-22-2009, 08:41 AM
Laszlo Papp
 
Default avoid usage of fakeroot: always use of build() and package() (Was: application as a TU)

On Sun, Nov 22, 2009 at 1:34 AM, Allan McRae <allan@archlinux.org> wrote:
> With a package() function, you can actually change the
> contents of the package.
>
> Splitting of the build and package steps is one of the most
> under-appreciated features in the last pacman release. It is really good to
> see someone actually using it. (I do not and I implemented it!)
>
> Allan
>
>

May I ask what's the policy in case of earlier submitted, but working packages ?
Is it needed to modify according to this new feature immediately if
otherwise the packages work well and no requirement until now from the
users for splitting
Is it enough to modify according to this feature only that time if I
need to change the PKGBUILDs because of other reason(s) too ?

Best Regards,
Laszlo Papp
 
Old 11-22-2009, 09:15 AM
Laszlo Papp
 
Default avoid usage of fakeroot: always use of build() and package() (Was: application as a TU)

On Sun, Nov 22, 2009 at 11:13 AM, Allan McRae <allan@archlinux.org> wrote:
> Laszlo Papp wrote:
>>
>> On Sun, Nov 22, 2009 at 1:34 AM, Allan McRae <allan@archlinux.org> wrote:
>>>
>>> With a package() function, you can actually change the
>>> contents of the package.
>>>
>>> Splitting of the build and package steps is one of the most
>>> under-appreciated features in the last pacman release. *It is really good
>>> to
>>> see someone actually using it. *(I do not and I implemented it!)
>>>
>>> Allan
>>>
>>>
>>
>> May I ask what's the policy in case of earlier submitted, but working
>> packages ?
>> Is it needed to modify according to this new feature immediately if
>> otherwise the packages work well and no requirement until now from the
>> users for splitting
>> Is it enough to modify according to this feature only that time if I
>> need to change the PKGBUILDs because of other reason(s) too ?
>
> It is fully backwards compatible (otherwise you would have noticed by
> now...), so do whatever you want.
>
> Allan
>
>

Okay, thanks Allan!

Best Regards,
Laszlo Papp
 
Old 11-22-2009, 10:44 AM
Laszlo Papp
 
Default avoid usage of fakeroot: always use of build() and package() (Was: application as a TU)

On Sun, Nov 22, 2009 at 12:37 PM, vlad <vla@uni-bonn.de> wrote:
> Hi Allen,
>
> On Sun, Nov 22, 2009 at 09:30:39PM +1000, Allan McRae wrote:
>> vlad wrote:
>> >Hi all,
>> >
>> >On Sun, Nov 22, 2009 at 11:14:52AM +0100, hollunder@gmx.at wrote:
>> >>On Sun, 22 Nov 2009 20:12:24 +1000
>> >>Allan McRae <allan@archlinux.org> wrote:
>> >>
>> >>>If it breaks stuff, then you should tell upstream that they makefile
>> >>>is crap.
>> >>So I guess this means it breaks?
>> >>I usually do. You'd be surprised how many don't know about DESTDIR and
>> >>use cp.
>> >
>> >However, "install" is quite inconvenient when copying directories with many
>> >files inside. Simply running "cp" and then changing permissions with
>> >"
>> >find ${pkgdir}/.../ -type d -exec chmod 755 {} ;
>> >find ${pkgdir}/.../ -type f -exec chmod 644 {} ;
>> >"
>> >is a reasonable workaround, at least for me.
>> >Vlad
>>
>> read "man install":
>> e.g.
>> install -t $pkgdir/target src/dir/*
>>
> This works only if there are only files in that directory. Subfolders
> are not copied. So one has to run "install" for each folder. "cp" copies
> everything - files and folders.
>
> --
>

If the copying is not so multiple, I use for;do;done cycle to solve it.

There are some 'cp' In core/extra/community too:

grep -R " cp " /var/abs/core/*/PKGBUILD | wc -l
82
grep -R " cp " /var/abs/extra/*/PKGBUILD | wc -l
341
grep -R " cp " /var/abs/community/*/PKGBUILD | wc -l
430

Best Regards,
Laszlo Papp
 
Old 11-22-2009, 08:35 PM
Phillip Smith
 
Default avoid usage of fakeroot: always use of build() and package() (Was: application as a TU)

> find ${pkgdir}/.../ -type d -exec chmod 755 {} ;
> find ${pkgdir}/.../ -type f -exec chmod 644 {} ;

chmod -R u=rwX,go=rX $pkgdir

The capital X will only set the execute bit on directories, and leave
it untouched on files if it is already set
 

Thread Tools




All times are GMT. The time now is 09:35 PM.

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