Re: Explain staging

2013-10-07 Thread CyberLeo Kitsana
On 10/07/2013 04:37 AM, Anton Shterenlikht wrote:

> sure, I can do /tmp/distfiles too.
> But that doesn't help with all the other failing targets.
> Then I might as well "chown -R user:group /usr/ports"
> and update the ports tree as an unprivileged user too.
> HOwever, security would suffer, I think.
> And, anyway, this would be a major change.
> If this were the case, it should be much
> better documented, I think.

>From my /etc/make.conf:

8<
# Read-only ports tree
DISTDIR=/var/ports/distfiles
PACKAGES=/var/ports/packages
WRKDIRPREFIX=/usr/obj
8<

Solves this problem quite nicely.

-- 
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net


Furry Peace! - http://www.fur.com/peace/
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-07 Thread Paul Schmehl
--On October 7, 2013 10:37:34 AM +0100 Anton Shterenlikht 
 wrote:


Set DISTDIR  in make.conf to for example /home/memyself/distfiles and
move the existing distfiles there. There's no reasonable default for
DISTDIR I think if it's assumed that fetch operates as non-root.

-Kimmo


sure, I can do /tmp/distfiles too.
But that doesn't help with all the other failing targets.
Then I might as well "chown -R user:group /usr/ports"
and update the ports tree as an unprivileged user too.
HOwever, security would suffer, I think.
And, anyway, this would be a major change.
If this were the case, it should be much
better documented, I think.



Absolutely correct.  A change of this magnitude needs to be much better 
documented than it has been so far.


Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
***
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson
"There are some ideas so wrong that only a very
intelligent person could believe in them." George Orwell

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-07 Thread Kimmo Paasiala
On Mon, Oct 7, 2013 at 4:36 PM, Daniel Nebdal  wrote:
> On Mon, Oct 7, 2013 at 2:52 PM, Anton Shterenlikht  wrote:
>> >From b...@passap.ru Mon Oct  7 13:36:53 2013
>>>
>>>07.10.2013 13:23, Anton Shterenlikht пишет:
>>>
 What about "make fetch"? It puts files by default under
 ports/distfiles, which, by default, is 755:
>>>[...]
 What about "make extract"? Same problem:
>>>
>>>I use svn repo owned by a user for ages. When a root rights are needed,
>>>the ports infrastructure asks for the password.
>>
>> I've read a few books on unix security.
>> The typical advice is to assume the user
>> passwords are compromised.
>> If I build and install from a ports tree
>> owned by a user, I increase the chances of
>> comromising the system, if an attacker
>> changes some files in the ports tree,
>> i.e. the URL in the Makefile and the checksum
>> in distinfo. I'll then have to add this worry
>> to my already long list.
>>
>> Anton
>>
>
> If that happens to an account used by an admin, don't you have larger worries?
>
> Let's say :
> * You have an account with no special privileges, that you typically
> log in with.
> * That account has a ports tree
> * You typically install ports by compiling them as this user, then
> installing them with root privileges.
>
> If you use sudo, and you haven't used targetpw or something to make it
> ask for a different password, and you haven't set any strong limits on
> it, anyone that got your password would also be able to use sudo to do
> whatever they wanted more directly. So let's assume you're not doing
> that.
>
> An attacker with your password could meddle with your .profile or
> .cshrc or whatever, and replace your shell with a lookalike that
> logged all input. From there, they could get hold of whatever commands
> and passwords you use to install software, and reuse that to install
> whatever they want directly.  If what you use is sudo, somehow
> restricted to only run make install, and only within that ports tree
> ... again, what would keep an attacker from just modifying any random
> port on the fly, installing it there and then, and then reverting the
> changes to reduce the risk of detection?
>
> It just seems like leaving a timebomb in the form of a modified ports
> directory would be a fairly inefficient thing to do if they'd already
> gotten that far., and it would run the risk of being overwritten
> and/or detected next time you updated your ports tree.  Of course, if
> you set the ports tree a+w (or, heaven forbid, 0777), you'd be asking
> for trouble ... but that's not new.
>
>
> Then again, I might have overlooked something. :)
>


In my opinion fetching and building (and creating packages if using
staging ) as a non privileged user is always safer than doing the same
things as root. The common advice to security is to AVOID using
admin/root privileges as much as possible to minimize the attack
vectors.

-Kimmo
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Re: Explain staging

2013-10-07 Thread Daniel Nebdal
On Mon, Oct 7, 2013 at 2:52 PM, Anton Shterenlikht  wrote:
> >From b...@passap.ru Mon Oct  7 13:36:53 2013
>>
>>07.10.2013 13:23, Anton Shterenlikht пишет:
>>
>>> What about "make fetch"? It puts files by default under
>>> ports/distfiles, which, by default, is 755:
>>[...]
>>> What about "make extract"? Same problem:
>>
>>I use svn repo owned by a user for ages. When a root rights are needed,
>>the ports infrastructure asks for the password.
>
> I've read a few books on unix security.
> The typical advice is to assume the user
> passwords are compromised.
> If I build and install from a ports tree
> owned by a user, I increase the chances of
> comromising the system, if an attacker
> changes some files in the ports tree,
> i.e. the URL in the Makefile and the checksum
> in distinfo. I'll then have to add this worry
> to my already long list.
>
> Anton
>

If that happens to an account used by an admin, don't you have larger worries?

Let's say :
* You have an account with no special privileges, that you typically
log in with.
* That account has a ports tree
* You typically install ports by compiling them as this user, then
installing them with root privileges.

If you use sudo, and you haven't used targetpw or something to make it
ask for a different password, and you haven't set any strong limits on
it, anyone that got your password would also be able to use sudo to do
whatever they wanted more directly. So let's assume you're not doing
that.

An attacker with your password could meddle with your .profile or
.cshrc or whatever, and replace your shell with a lookalike that
logged all input. From there, they could get hold of whatever commands
and passwords you use to install software, and reuse that to install
whatever they want directly.  If what you use is sudo, somehow
restricted to only run make install, and only within that ports tree
... again, what would keep an attacker from just modifying any random
port on the fly, installing it there and then, and then reverting the
changes to reduce the risk of detection?

It just seems like leaving a timebomb in the form of a modified ports
directory would be a fairly inefficient thing to do if they'd already
gotten that far., and it would run the risk of being overwritten
and/or detected next time you updated your ports tree.  Of course, if
you set the ports tree a+w (or, heaven forbid, 0777), you'd be asking
for trouble ... but that's not new.


Then again, I might have overlooked something. :)

-- 
Daniel Nebdal
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Re: Explain staging

2013-10-07 Thread Anton Shterenlikht
>From b...@passap.ru Mon Oct  7 13:36:53 2013
>
>07.10.2013 13:23, Anton Shterenlikht пишет:
>
>> What about "make fetch"? It puts files by default under
>> ports/distfiles, which, by default, is 755:
>[...]
>> What about "make extract"? Same problem:
>
>I use svn repo owned by a user for ages. When a root rights are needed,
>the ports infrastructure asks for the password.

I've read a few books on unix security.
The typical advice is to assume the user
passwords are compromised.
If I build and install from a ports tree
owned by a user, I increase the chances of
comromising the system, if an attacker
changes some files in the ports tree,
i.e. the URL in the Makefile and the checksum
in distinfo. I'll then have to add this worry
to my already long list.

Anton
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Re: Explain staging

2013-10-07 Thread Boris Samorodov
07.10.2013 13:23, Anton Shterenlikht пишет:

> What about "make fetch"? It puts files by default under
> ports/distfiles, which, by default, is 755:
[...]
> What about "make extract"? Same problem:

I use svn repo owned by a user for ages. When a root rights are needed,
the ports infrastructure asks for the password.

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Re: Explain staging

2013-10-07 Thread Anton Shterenlikht
>From kpaas...@gmail.com Mon Oct  7 10:32:26 2013
>
>On Mon, Oct 7, 2013 at 12:23 PM, Anton Shterenlikht  wrote:
>>>From: Matthew Seaman 
>>>To: freebsd-ports@freebsd.org
>>>Subject: Re: Explain staging
>>>
>>>On 03/10/2013 08:56, Anton Shterenlikht wrote:
>>>> sorry, I still don't get it.
>>>> What is achived by staging?
>>>
>>>There are 4 main advantages:
>>>
>>>   1) You can build a port and then create a package from the stage
>>>  directory without having to install it on your build system.  You
>>>  usually don't need root privileges to do this.
>>
>> What about "make fetch"? It puts files by default under
>> ports/distfiles, which, by default, is 755:
>>
>> $ make fetch
>> ===>   xearth-1.2 depends on file: /usr/local/sbin/pkg - found
>> => xearth-1.2.tar.xz doesn't seem to exist in /usr/ports/distfiles/.
>> => /usr/ports/distfiles is not writable by you; cannot fetch.
>> *** Error code 1
>>
>> Stop.
>> make: stopped in /usr/ports/astro/xearth
>> $
>>
>> What about "make extract"? Same problem:
>>
>> $ make extract
>> ===>   xearth-1.2 depends on file: /usr/local/sbin/pkg - found
>> ===> Fetching all distfiles required by xearth-1.2 for building
>> ===>  Extracting for xearth-1.2
>> => SHA256 Checksum OK for xearth-1.2.tar.xz.
>> mkdir: /usr/ports/astro/xearth/work: Permission denied
>> *** Error code 1
>>
>> Stop.
>> make: stopped in /usr/ports/astro/xearth
>> $
>>
>> "make checksum" works, of course, because no files are
>> created:
>>
>> $ make checksum
>> ===>   xearth-1.2 depends on file: /usr/local/sbin/pkg - found
>> ===> Fetching all distfiles required by xearth-1.2 for building
>> => SHA256 Checksum OK for xearth-1.2.tar.xz.
>> $
>>
>> Then "make stage" fails again:
>>
>> $ make stage
>> ===>  Patching for xearth-1.2
>> touch: /usr/ports/astro/xearth/work/.patch_done.xearth._usr_local: 
>> Permission denied
>> *** Error code 1
>>
>> Stop.
>> make: stopped in /usr/ports/astro/xearth
>> $
>>
>> So I make it under root.
>> Then "make check-orphans" fail:
>>
>> $ make check-orphans
>> cannot create /usr/ports/astro/xearth/work/.expanded-plist: Permission denied
>> *** Error code 2
>>
>> Stop.
>> make: stopped in /usr/ports/astro/xearth
>> $
>>
>> Finally, "make package" fails:
>>
>> $ make package
>> ===>  Building package for xearth-1.2
>> mkdir: /usr/ports/astro/xearth/work/.metadir: Permission denied
>> *** Error code 1
>>
>> Stop.
>> make: stopped in /usr/ports/astro/xearth
>> $
>>
>> I'm probably missing something important here.
>> The wiki page only says: "Make sure you tested
>> make package as a normal user (not root).
>> If that fails, add NEED_ROOT in the port. "
>> Why would it not fail?
>>
>> Do I need to set up separate distfiles directory,
>> or something like this?
>>
>>>   2) Instead of (typically) just running the install target of the
>>>  piece of software, and then trusting that the pkg-plist contains
>>>  an accurate list of what gets installed, now we take the pkg-plist
>>>  and extract the matching items from the stage directory to make a
>>>  package.  Only things on the plist get installed, and things on
>>>  the plist but not present in the staging dir will flag up as an
>>>  error in the port.
>>
>> This is not clear either.
>> I my port I have:
>>
>> PLIST_FILES=bin/xearth \
>> lib/X11/xearth/freebsd.committers.markers \
>> lib/X11/xearth/freebsd.ftp.markers
>> PLIST_DIRS= lib/X11/xearth
>>
>> I don't have pkg-plist at all.
>> What do I need to change?
>>
>>>If you have an instruction in you port to install a file from the build
>>>area into the filesystem under ${PREFIX} =3D /usr/local then you need to
>>>change it to install to ${STAGEDIR}${PREFIX}/whatever.  Note: this only
>>>applies to the *install* parts: when building the package, you should
>>>configure it for the eventual final install location under /usr/local.
>>
>> Does this look right:
>>
>> do-install:
>> @${INSTALL_PROGRAM} ${WRKSRC}/xearth ${STAGEDIR}${PREFIX}/bin
>>  

Re: Explain staging

2013-10-07 Thread Kimmo Paasiala
On Mon, Oct 7, 2013 at 12:23 PM, Anton Shterenlikht  wrote:
>>From: Matthew Seaman 
>>To: freebsd-ports@freebsd.org
>>Subject: Re: Explain staging
>>
>>On 03/10/2013 08:56, Anton Shterenlikht wrote:
>>> sorry, I still don't get it.
>>> What is achived by staging?
>>
>>There are 4 main advantages:
>>
>>   1) You can build a port and then create a package from the stage
>>  directory without having to install it on your build system.  You
>>  usually don't need root privileges to do this.
>
> What about "make fetch"? It puts files by default under
> ports/distfiles, which, by default, is 755:
>
> $ make fetch
> ===>   xearth-1.2 depends on file: /usr/local/sbin/pkg - found
> => xearth-1.2.tar.xz doesn't seem to exist in /usr/ports/distfiles/.
> => /usr/ports/distfiles is not writable by you; cannot fetch.
> *** Error code 1
>
> Stop.
> make: stopped in /usr/ports/astro/xearth
> $
>
> What about "make extract"? Same problem:
>
> $ make extract
> ===>   xearth-1.2 depends on file: /usr/local/sbin/pkg - found
> ===> Fetching all distfiles required by xearth-1.2 for building
> ===>  Extracting for xearth-1.2
> => SHA256 Checksum OK for xearth-1.2.tar.xz.
> mkdir: /usr/ports/astro/xearth/work: Permission denied
> *** Error code 1
>
> Stop.
> make: stopped in /usr/ports/astro/xearth
> $
>
> "make checksum" works, of course, because no files are
> created:
>
> $ make checksum
> ===>   xearth-1.2 depends on file: /usr/local/sbin/pkg - found
> ===> Fetching all distfiles required by xearth-1.2 for building
> => SHA256 Checksum OK for xearth-1.2.tar.xz.
> $
>
> Then "make stage" fails again:
>
> $ make stage
> ===>  Patching for xearth-1.2
> touch: /usr/ports/astro/xearth/work/.patch_done.xearth._usr_local: Permission 
> denied
> *** Error code 1
>
> Stop.
> make: stopped in /usr/ports/astro/xearth
> $
>
> So I make it under root.
> Then "make check-orphans" fail:
>
> $ make check-orphans
> cannot create /usr/ports/astro/xearth/work/.expanded-plist: Permission denied
> *** Error code 2
>
> Stop.
> make: stopped in /usr/ports/astro/xearth
> $
>
> Finally, "make package" fails:
>
> $ make package
> ===>  Building package for xearth-1.2
> mkdir: /usr/ports/astro/xearth/work/.metadir: Permission denied
> *** Error code 1
>
> Stop.
> make: stopped in /usr/ports/astro/xearth
> $
>
> I'm probably missing something important here.
> The wiki page only says: "Make sure you tested
> make package as a normal user (not root).
> If that fails, add NEED_ROOT in the port. "
> Why would it not fail?
>
> Do I need to set up separate distfiles directory,
> or something like this?
>
>>   2) Instead of (typically) just running the install target of the
>>  piece of software, and then trusting that the pkg-plist contains
>>  an accurate list of what gets installed, now we take the pkg-plist
>>  and extract the matching items from the stage directory to make a
>>  package.  Only things on the plist get installed, and things on
>>  the plist but not present in the staging dir will flag up as an
>>  error in the port.
>
> This is not clear either.
> I my port I have:
>
> PLIST_FILES=bin/xearth \
> lib/X11/xearth/freebsd.committers.markers \
> lib/X11/xearth/freebsd.ftp.markers
> PLIST_DIRS= lib/X11/xearth
>
> I don't have pkg-plist at all.
> What do I need to change?
>
>>If you have an instruction in you port to install a file from the build
>>area into the filesystem under ${PREFIX} =3D /usr/local then you need to
>>change it to install to ${STAGEDIR}${PREFIX}/whatever.  Note: this only
>>applies to the *install* parts: when building the package, you should
>>configure it for the eventual final install location under /usr/local.
>
> Does this look right:
>
> do-install:
> @${INSTALL_PROGRAM} ${WRKSRC}/xearth ${STAGEDIR}${PREFIX}/bin
> @${INSTALL_MAN} ${WRKSRC}/xearth.man ${MANPREFIX}/man/man1/xearth.1
> @${MKDIR} ${STAGEDIR}${PREFIX}/lib/X11/xearth
> # Copy the list of FreeBSD sites & committers locations
> .for marker in freebsd.committers.markers freebsd.ftp.markers
> @${INSTALL_DATA} ${FILESDIR}/${marker} 
> ${STAGEDIR}${PREFIX}/lib/X11/xearth
> .endfor
>
> Many thanks
>
> Anton
>

Set DISTDIR  in make.conf to for example /home/memyself/distfiles and
move the existing distfiles there. There's no reasonable default for
DISTDIR I think if it's assumed that fetch operates as non-root.

-Kimmo
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-07 Thread Anton Shterenlikht
>From: Matthew Seaman 
>To: freebsd-ports@freebsd.org
>Subject: Re: Explain staging
>
>On 03/10/2013 08:56, Anton Shterenlikht wrote:
>> sorry, I still don't get it.
>> What is achived by staging?
>
>There are 4 main advantages:
>
>   1) You can build a port and then create a package from the stage
>  directory without having to install it on your build system.  You
>  usually don't need root privileges to do this.

What about "make fetch"? It puts files by default under
ports/distfiles, which, by default, is 755:

$ make fetch
===>   xearth-1.2 depends on file: /usr/local/sbin/pkg - found
=> xearth-1.2.tar.xz doesn't seem to exist in /usr/ports/distfiles/.
=> /usr/ports/distfiles is not writable by you; cannot fetch.
*** Error code 1

Stop.
make: stopped in /usr/ports/astro/xearth
$ 

What about "make extract"? Same problem:

$ make extract
===>   xearth-1.2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by xearth-1.2 for building
===>  Extracting for xearth-1.2
=> SHA256 Checksum OK for xearth-1.2.tar.xz.
mkdir: /usr/ports/astro/xearth/work: Permission denied
*** Error code 1

Stop.
make: stopped in /usr/ports/astro/xearth
$ 

"make checksum" works, of course, because no files are
created:

$ make checksum
===>   xearth-1.2 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by xearth-1.2 for building
=> SHA256 Checksum OK for xearth-1.2.tar.xz.
$

Then "make stage" fails again:

$ make stage
===>  Patching for xearth-1.2
touch: /usr/ports/astro/xearth/work/.patch_done.xearth._usr_local: Permission 
denied
*** Error code 1

Stop.
make: stopped in /usr/ports/astro/xearth
$ 

So I make it under root.
Then "make check-orphans" fail:

$ make check-orphans
cannot create /usr/ports/astro/xearth/work/.expanded-plist: Permission denied
*** Error code 2

Stop.
make: stopped in /usr/ports/astro/xearth
$ 

Finally, "make package" fails:

$ make package
===>  Building package for xearth-1.2
mkdir: /usr/ports/astro/xearth/work/.metadir: Permission denied
*** Error code 1

Stop.
make: stopped in /usr/ports/astro/xearth
$ 

I'm probably missing something important here.
The wiki page only says: "Make sure you tested
make package as a normal user (not root).
If that fails, add NEED_ROOT in the port. "
Why would it not fail?

Do I need to set up separate distfiles directory,
or something like this?

>   2) Instead of (typically) just running the install target of the
>  piece of software, and then trusting that the pkg-plist contains
>  an accurate list of what gets installed, now we take the pkg-plist
>  and extract the matching items from the stage directory to make a
>  package.  Only things on the plist get installed, and things on
>  the plist but not present in the staging dir will flag up as an
>  error in the port.

This is not clear either.
I my port I have:

PLIST_FILES=bin/xearth \
lib/X11/xearth/freebsd.committers.markers \
lib/X11/xearth/freebsd.ftp.markers
PLIST_DIRS= lib/X11/xearth

I don't have pkg-plist at all.
What do I need to change?

>If you have an instruction in you port to install a file from the build
>area into the filesystem under ${PREFIX} =3D /usr/local then you need to
>change it to install to ${STAGEDIR}${PREFIX}/whatever.  Note: this only
>applies to the *install* parts: when building the package, you should
>configure it for the eventual final install location under /usr/local.

Does this look right:

do-install:
@${INSTALL_PROGRAM} ${WRKSRC}/xearth ${STAGEDIR}${PREFIX}/bin
@${INSTALL_MAN} ${WRKSRC}/xearth.man ${MANPREFIX}/man/man1/xearth.1
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/X11/xearth
# Copy the list of FreeBSD sites & committers locations
.for marker in freebsd.committers.markers freebsd.ftp.markers
@${INSTALL_DATA} ${FILESDIR}/${marker} 
${STAGEDIR}${PREFIX}/lib/X11/xearth
.endfor

Many thanks

Anton

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-04 Thread Alexander Yerenkow
I'd recommend to
1) take excerpts from this topic and expand wiki - since here was a lot of
info
2) When port fails due to staging,add there link to wiki, so user / port
developer will see immediately where to dig.
Thanks.


2013/10/4 Baptiste Daroussin 

> On Thu, Oct 03, 2013 at 08:21:19PM -0500, Stephen Montgomery-Smith wrote:
> > -BEGIN PGP SIGNED MESSAGE-
> > Hash: SHA1
> >
> > On 10/03/2013 07:22 AM, Stephen Montgomery-Smith wrote:
> > > On 10/03/2013 04:54 AM, Baptiste Daroussin wrote:
> > >> On Thu, Oct 03, 2013 at 10:58:56AM +0200, Alex Dupre wrote:
> > >>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
> > >>>
> > >>> Baptiste Daroussin ha scritto:
> >  Here you are:
> > 
> http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/086346.html
> > >>>
> > >>>
> > 
> > >
> > 
> > I
> > 
> > >>> was referring the the previous one: "[HEADSUP] Stage support
> > >>> for the ports tree". Dunno if it had additional info or this
> > >>> second one is enough.
> > >>>
> > >> I mixed both in one :)
> > >
> > > I do appreciate the explanations very much.
> > >
> > > I am having a problem with a port in which if NO_STAGE is not set,
> > > then the build part of the process fails.  As far as I can tell,
> > > staging should not effect the build part of the process in any
> > > way. So two questions: 1.  If I set NO_STAGE=yes in that port, is
> > > this going to be a big problem?  It will have to be a work around
> > > until I can get the next question answered: 2.  Any ideas on why
> > > staging would effect the build process?  The port includes
> > > subpackages that use "./configure; make; make install" and are
> > > supposed to install into $WRKSRC/local, but instead sometimes
> > > installs into $WRKDIR/stage/portname/work/pkgname/local.
> >
> > FYI
> >
> > So when NO_STAGE is not set, MAKE_ARGS includes
> > DESTDIR=$WRKDIR/work/stage.
> >
> > This messes up the build process on this port.
> >
> > This is probably something to be fixed way down the road, and perhaps
> > it is my port that needs fixing.
>
> If for your port DESTDIR means something else, and STAGEDIR is expecting
> to be
> exposed though another variable then change DESTDIRNAME which is DESTDIR by
> default.
>
> regards,
> Bapt
>



-- 
Regards,
Alexander Yerenkow
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-03 Thread Baptiste Daroussin
On Thu, Oct 03, 2013 at 08:21:19PM -0500, Stephen Montgomery-Smith wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 10/03/2013 07:22 AM, Stephen Montgomery-Smith wrote:
> > On 10/03/2013 04:54 AM, Baptiste Daroussin wrote:
> >> On Thu, Oct 03, 2013 at 10:58:56AM +0200, Alex Dupre wrote:
> >>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
> >>> 
> >>> Baptiste Daroussin ha scritto:
>  Here you are: 
>  http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/086346.html
> >>>
> >>>
> 
> >
>  
> I
>  
> >>> was referring the the previous one: "[HEADSUP] Stage support
> >>> for the ports tree". Dunno if it had additional info or this
> >>> second one is enough.
> >>> 
> >> I mixed both in one :)
> > 
> > I do appreciate the explanations very much.
> > 
> > I am having a problem with a port in which if NO_STAGE is not set, 
> > then the build part of the process fails.  As far as I can tell, 
> > staging should not effect the build part of the process in any
> > way. So two questions: 1.  If I set NO_STAGE=yes in that port, is
> > this going to be a big problem?  It will have to be a work around
> > until I can get the next question answered: 2.  Any ideas on why
> > staging would effect the build process?  The port includes
> > subpackages that use "./configure; make; make install" and are
> > supposed to install into $WRKSRC/local, but instead sometimes 
> > installs into $WRKDIR/stage/portname/work/pkgname/local.
> 
> FYI
> 
> So when NO_STAGE is not set, MAKE_ARGS includes
> DESTDIR=$WRKDIR/work/stage.
> 
> This messes up the build process on this port.
> 
> This is probably something to be fixed way down the road, and perhaps
> it is my port that needs fixing.

If for your port DESTDIR means something else, and STAGEDIR is expecting to be
exposed though another variable then change DESTDIRNAME which is DESTDIR by
default.

regards,
Bapt


pgpxYy9mirfni.pgp
Description: PGP signature


Re: Explain staging

2013-10-03 Thread Stephen Montgomery-Smith
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/03/2013 07:22 AM, Stephen Montgomery-Smith wrote:
> On 10/03/2013 04:54 AM, Baptiste Daroussin wrote:
>> On Thu, Oct 03, 2013 at 10:58:56AM +0200, Alex Dupre wrote:
>>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
>>> 
>>> Baptiste Daroussin ha scritto:
 Here you are: 
 http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/086346.html
>>>
>>>

>
 
I
 
>>> was referring the the previous one: "[HEADSUP] Stage support
>>> for the ports tree". Dunno if it had additional info or this
>>> second one is enough.
>>> 
>> I mixed both in one :)
> 
> I do appreciate the explanations very much.
> 
> I am having a problem with a port in which if NO_STAGE is not set, 
> then the build part of the process fails.  As far as I can tell, 
> staging should not effect the build part of the process in any
> way. So two questions: 1.  If I set NO_STAGE=yes in that port, is
> this going to be a big problem?  It will have to be a work around
> until I can get the next question answered: 2.  Any ideas on why
> staging would effect the build process?  The port includes
> subpackages that use "./configure; make; make install" and are
> supposed to install into $WRKSRC/local, but instead sometimes 
> installs into $WRKDIR/stage/portname/work/pkgname/local.

FYI

So when NO_STAGE is not set, MAKE_ARGS includes
DESTDIR=$WRKDIR/work/stage.

This messes up the build process on this port.

This is probably something to be fixed way down the road, and perhaps
it is my port that needs fixing.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSThgPAAoJEC3xK9GaktgHHDEIALDlt86BrDvR2CjjINGwyQdh
okMhRAM0my/XftIy+2GHMAh95+l86LW4cDDpgLFneydjWLwRV3ZQBb4H6up0MpWN
+MrNeruNirl17XdoRcOEXyBHbtbbym1bIToAGuPOvJGocvOoer9HKpYxZ3sX/OCU
uL+nr/Zh7pdJq0TgwCXlhNTQnf77qZEnQcrYxjEpBP+zgQz7gXpH+RfC0yfbXERP
zeOEEojdy7Y6IZyzd9C+TskEn5VH1DH0MSz9/sOVzRgebh51SRWMFWtCgPiNJZBE
04A96X/RiY1boKK1QK3/hjlLqDlVY8UPLTvGtvaUolJPGHDLR1oJfyKYxUw33oU=
=RCk8
-END PGP SIGNATURE-
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-03 Thread Matthew Seaman
On 03/10/2013 08:56, Anton Shterenlikht wrote:
> sorry, I still don't get it.
> What is achived by staging?

There are 4 main advantages:

   1) You can build a port and then create a package from the stage
  directory without having to install it on your build system.  You
  usually don't need root privileges to do this.

This actually makes it a lot easier to eg. build ports away from your
frontline servers and then quickly install them from packages, thus
minimizing disruption to live services.

   2) Instead of (typically) just running the install target of the
  piece of software, and then trusting that the pkg-plist contains
  an accurate list of what gets installed, now we take the pkg-plist
  and extract the matching items from the stage directory to make a
  package.  Only things on the plist get installed, and things on
  the plist but not present in the staging dir will flag up as an
  error in the port.

ie. leftovers or other unrecorded files cluttering up your system are
now a thing of the past.  Because there's only one port installed into
the staging dir, there's no ambiguity about which file belongs to which
package.

This also enables the potential for a future enhancement: creating
several different packages from one stage directory.  In the simplest
case, this would mean being able to create a separate package for the
docs or examples, so you could avoid having to install that stuff if
using binary packages.  Beyond that, there could be separate packages
for eg. the shared libraries from a package. So, for something like
mysql-client: at the moment, mysql-client packages for different
versions of mysql conflict.  Having separate mysql-shlibs packages for
different versions of mysql should not suffer from such conflicts.

   3) Because there's just the result of building one port in the
  staging directory, it makes it much easier to run various
  heuristics and quality assurance tests against the build results
  without getting mixed up with files from other packages.

There are a lot of fairly dodgy ports in the tree which have bit-rotted
over time or suffered from lack of active maintainership.  There are a
pretty large number that haven't adopted what is considered the best
current practice for such things as eg. USES flags.

   4) Instead of having to have duplicate methods of doing post install
  actions -- eg. displaying a pkg-message -- between installing
  from a port vs. installing from a package, now you only need to
  write the actions for installing via a package.  This simplifies
  many port makefiles considerably.

Getting rid of this duplication of effort is going to improve port
quality a great deal.  Previously it was the case that code for doing
post-install actions when installing from a package was not tested
really at all.  Much of that code has been broken in the ports for quite
some time.

There are numerous other advantages that should accrue evenually.  For
instance, converting many port options into separate sub packages.  But
that's all in the future.

> I don't understand what you mean.
> Do you mean that an unprivileged user can
> somehow install software from ports not under
> /usr/local?

No.  It means you can create a package tarball foobar-9.9.99.txz as a
non-root user.  You cannot then take that package and install it into
${LOCALBASE} without root level privileges.

> I've read your mails and the wiki page,
> but still not sure what, if anything,
> I need/could do with my ports.

Basically:

If you have an instruction in you port to install a file from the build
area into the filesystem under ${PREFIX} = /usr/local then you need to
change it to install to ${STAGEDIR}${PREFIX}/whatever.  Note: this only
applies to the *install* parts: when building the package, you should
configure it for the eventual final install location under /usr/local.

(It's quite a lot like using DESTDIR to install the base system into a
jail.  Once you're in the jail, everything appears in it's proper place,
but from outside that's not the case.)

Where you don't have explicit install lines in you port, instead relying
on an install target from the package itself, usually that will be
handled automatically and you won't need to do anything.

If you have any post-install actions, where those are duplicated by eg.
pkg-install scripts, then you can just delete them from the port's
Makefile.  Otherwise you'll need to convert the post-install actions to
a pkg-install script, or otherwise enable them to happen at package
install time.

> Is the idea that all ports must/should
> support staging?

Yes.

> If a port doesn't support staging,
> will it fail portlint checks?

There's a 6 month target to convert the entire ports tree to staging.
Any ports not converted to use staging after that will be considered to
be broken.  If no one steps up to fix them, then after a suitable period
of deprecation they may well end up being re

Re: Explain staging

2013-10-03 Thread Stephen Montgomery-Smith
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/03/2013 07:44 AM, Stephen Montgomery-Smith wrote:
> On 10/03/2013 07:32 AM, Baptiste Daroussin wrote:
>> On Thu, Oct 03, 2013 at 07:22:35AM -0500, Stephen
>> Montgomery-Smith wrote:
>>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
>>> 
>>> On 10/03/2013 04:54 AM, Baptiste Daroussin wrote:
 On Thu, Oct 03, 2013 at 10:58:56AM +0200, Alex Dupre wrote:
> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
> 
> Baptiste Daroussin ha scritto:
>> Here you are: 
>> http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/086346.html
>
>
>>
>>>
>>
>
>> 
I
>> 
> was referring the the previous one: "[HEADSUP] Stage
> support for the ports tree". Dunno if it had additional
> info or this second one is enough.
> 
 I mixed both in one :)
>>> 
>>> I do appreciate the explanations very much.
>>> 
>>> I am having a problem with a port in which if NO_STAGE is not 
>>> set, then the build part of the process fails.  As far as I
>>> can tell, staging should not effect the build part of the
>>> process in any way. So two questions: 1.  If I set NO_STAGE=yes
>>> in that port, is this going to be a big problem?  It will have
>>> to be a work around until I can get the next question answered:
>>> 2.  Any ideas on why staging would effect the build process?
>>> The port includes subpackages that use "./configure; make; make
>>> install" and are supposed to install into $WRKSRC/local, but
>>> instead sometimes installs into 
>>> $WRKDIR/stage/portname/work/pkgname/local.
>>> 
>>> Thanks, Stephen
> 
>> Which port is that? Maybe I can help?
> 
> It is math/sage.  But I think it is working in this current port.
> The problem, I think, is in math/sage-devel, which exists only in
> my private ports tree.

Also, I am not in a super hurry to fix this problem.  Work and family
life are quite big stressors in my life right now.  Fixing easy bugs
and updates to the ports is quite relaxing, but something that will
require a full investigation like this is going to be on a waiting list.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSTWk5AAoJEC3xK9GaktgHoT0IAJN0Sn6rBCBetZqa2FuM/EPm
GNe4diIX/cs0UKYZZQN9Gj8g5EXNgNaDJ1nPuTHt4jAyo92YYM6GTLSsPBhfY7rA
D6cfmYMUEVY2YtKODigjMb7XF6F9Lv6hZkNnuiZGUwAmW0FmDCejysP0M+qlmHEf
xgLLhzCJ1w64vbgr7/OzMdb4FftR/ja1F5UFJjwGZakVcSQEhRL0N4kdEzTC0/PT
My85TEvyUg0N1QrcZRrvLfcZFkpSeqjPscRo+LptvVSFf2PtkTZOOtArYbFIattY
+oCn/G301YLawG78lRrnLYxuCxYVHwzZSalMTzcc5c61Hdvf2ooCUBokI5MoAfc=
=qgOF
-END PGP SIGNATURE-
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-03 Thread Stephen Montgomery-Smith
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/03/2013 07:32 AM, Baptiste Daroussin wrote:
> On Thu, Oct 03, 2013 at 07:22:35AM -0500, Stephen Montgomery-Smith
> wrote:
>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
>> 
>> On 10/03/2013 04:54 AM, Baptiste Daroussin wrote:
>>> On Thu, Oct 03, 2013 at 10:58:56AM +0200, Alex Dupre wrote:
 -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
 
 Baptiste Daroussin ha scritto:
> Here you are: 
> http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/086346.html


>
>>
> 
I
> 
 was referring the the previous one: "[HEADSUP] Stage support
 for the ports tree". Dunno if it had additional info or this
 second one is enough.
 
>>> I mixed both in one :)
>> 
>> I do appreciate the explanations very much.
>> 
>> I am having a problem with a port in which if NO_STAGE is not
>> set, then the build part of the process fails.  As far as I can
>> tell, staging should not effect the build part of the process in
>> any way. So two questions: 1.  If I set NO_STAGE=yes in that
>> port, is this going to be a big problem?  It will have to be a
>> work around until I can get the next question answered: 2.  Any
>> ideas on why staging would effect the build process?  The port 
>> includes subpackages that use "./configure; make; make install"
>> and are supposed to install into $WRKSRC/local, but instead
>> sometimes installs into
>> $WRKDIR/stage/portname/work/pkgname/local.
>> 
>> Thanks, Stephen
> 
> Which port is that? Maybe I can help?

It is math/sage.  But I think it is working in this current port.  The
problem, I think, is in math/sage-devel, which exists only in my
private ports tree.

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSTWa5AAoJEC3xK9GaktgHM1AIAMZcwUMiD5tUU+qsM+ruKXLd
+6RMANAhiwfGqpkW80FsplgO8siZ9eh8JZuCOYyymO51NkX4L59GBqsDT7DjgXS2
zcZjK/ClxTyj2iZI+zxTXoc8RO0mZuKkOcsOWNsOuEO3X0YpPAGCl98iGWf+/knX
HN/ez862Tx8Oee28BTfZzX0vaHVLQotPyDfV+DPgUfMCQIfztotqlsJcKAfdwENk
Y6W5lbZwCYdhWswn5cFfsLJ92EfEbBJnGS9tTBq1GXZzuKlsq3gcfc27UoJoc5zj
GVUuiW4+kDVeVluta1b0xNLi9Q+/7nQF9fF+hed7PwssbHNNj9sFH5ZtLEylWNM=
=l71P
-END PGP SIGNATURE-
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-03 Thread Baptiste Daroussin
On Thu, Oct 03, 2013 at 07:22:35AM -0500, Stephen Montgomery-Smith wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> On 10/03/2013 04:54 AM, Baptiste Daroussin wrote:
> > On Thu, Oct 03, 2013 at 10:58:56AM +0200, Alex Dupre wrote:
> >> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
> >> 
> >> Baptiste Daroussin ha scritto:
> >>> Here you are: 
> >>> http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/086346.html
> >>
> >>
> >>> 
> I
> >>> 
> >> was referring the the previous one: "[HEADSUP] Stage support for
> >> the ports tree". Dunno if it had additional info or this second
> >> one is enough.
> >> 
> > I mixed both in one :)
> 
> I do appreciate the explanations very much.
> 
> I am having a problem with a port in which if NO_STAGE is not set,
> then the build part of the process fails.  As far as I can tell,
> staging should not effect the build part of the process in any way.
> So two questions:
> 1.  If I set NO_STAGE=yes in that port, is this going to be a big
> problem?  It will have to be a work around until I can get the next
> question answered:
> 2.  Any ideas on why staging would effect the build process?  The port
> includes subpackages that use "./configure; make; make install" and
> are supposed to install into $WRKSRC/local, but instead sometimes
> installs into $WRKDIR/stage/portname/work/pkgname/local.
> 
> Thanks, Stephen

Which port is that? Maybe I can help?

regards,
Bapt


pgpEByFlhRTSB.pgp
Description: PGP signature


Re: Explain staging

2013-10-03 Thread Stephen Montgomery-Smith
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 10/03/2013 04:54 AM, Baptiste Daroussin wrote:
> On Thu, Oct 03, 2013 at 10:58:56AM +0200, Alex Dupre wrote:
>> -BEGIN PGP SIGNED MESSAGE- Hash: SHA1
>> 
>> Baptiste Daroussin ha scritto:
>>> Here you are: 
>>> http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/086346.html
>>
>>
>>> 
I
>>> 
>> was referring the the previous one: "[HEADSUP] Stage support for
>> the ports tree". Dunno if it had additional info or this second
>> one is enough.
>> 
> I mixed both in one :)

I do appreciate the explanations very much.

I am having a problem with a port in which if NO_STAGE is not set,
then the build part of the process fails.  As far as I can tell,
staging should not effect the build part of the process in any way.
So two questions:
1.  If I set NO_STAGE=yes in that port, is this going to be a big
problem?  It will have to be a work around until I can get the next
question answered:
2.  Any ideas on why staging would effect the build process?  The port
includes subpackages that use "./configure; make; make install" and
are supposed to install into $WRKSRC/local, but instead sometimes
installs into $WRKDIR/stage/portname/work/pkgname/local.

Thanks, Stephen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSTWGBAAoJEC3xK9GaktgHbxUH+QFAGwLtosFLmskl0e/KB3qB
zf+PP7UtZutAllfpFss/v1EgfioLOKq9jhggTeBRUClqj1enPcSeaNC4qEAOg4Zv
oZeRGtPhV4kzUzvUhI0y6Odz1rANjQ1FiRZ0qrSNZXJqp+CLPItAHhiEKvesvUAm
Ic3Z+jpG2XTZVNJIkZM8WUJjdCMNFjphRfyX4v3M4Q8+Q1CIETi+Re4ciiH/G3rX
onuw5cTWR6PGymWfRLRTPaLNRftFXYMmDkhY/mMM3sg6vZVHdq6tSqpDa61qiuQx
W4MsI6SaO/DEkorVcaesEWbNsgffNdN6fOJGCHHP4STcfVb3OE8r2rcpvs3XT3Y=
=K3LU
-END PGP SIGNATURE-
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-03 Thread Baptiste Daroussin
On Thu, Oct 03, 2013 at 10:58:56AM +0200, Alex Dupre wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Baptiste Daroussin ha scritto:
> > Here you are: 
> > http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/086346.html
> 
> I
> > 
> was referring the the previous one: "[HEADSUP] Stage support for the
> ports tree". Dunno if it had additional info or this second one is enough.
> 
I mixed both in one :)

regards,
Bapt


pgpc3Tr1PFVCi.pgp
Description: PGP signature


Re: Explain staging

2013-10-03 Thread Alex Dupre
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Baptiste Daroussin ha scritto:
> Here you are: 
> http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/086346.html

I
> 
was referring the the previous one: "[HEADSUP] Stage support for the
ports tree". Dunno if it had additional info or this second one is enough.

- -- 
Alex Dupre
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.21 (FreeBSD)
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/

iEYEARECAAYFAlJNMdAACgkQgRXp2M5fVU11iQCgmj+i9/UUJDKP1mdgAzAMYbO2
MD8AnRbMZ3rQr+K9SSyXDFgPg1JsvHrc
=KChF
-END PGP SIGNATURE-
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-03 Thread Baptiste Daroussin
On Thu, Oct 03, 2013 at 09:45:51AM +0200, Alex Dupre wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Baptiste Daroussin ha scritto:
> > You should have received 2 mails from me with some details about
> > staging: one called "[HEADSUP] Stage support for the ports tree" 
> > and on called "Staging, packages and more" (very recent as of
> > yesterday)
> 
> I think the issue was that such very first email was lost somewhere,
> as Stefan said there isn't in the mailing list archive, I've never
> received originally, but there a few replies to it. Can you resend it
> to the list, please?
> 
Here you are:
http://lists.freebsd.org/pipermail/freebsd-ports/2013-October/086346.html

regards,
Bapt


pgp20DSGMMCum.pgp
Description: PGP signature


Re: Explain staging

2013-10-03 Thread Baptiste Daroussin
On Thu, Oct 03, 2013 at 09:45:51AM +0200, Alex Dupre wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Baptiste Daroussin ha scritto:
> > You should have received 2 mails from me with some details about
> > staging: one called "[HEADSUP] Stage support for the ports tree" 
> > and on called "Staging, packages and more" (very recent as of
> > yesterday)
> 
> I think the issue was that such very first email was lost somewhere,
> as Stefan said there isn't in the mailing list archive, I've never
> received originally, but there a few replies to it. Can you resend it
> to the list, please?
> 
> - -- 
> Alex Dupre
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v2.0.21 (FreeBSD)
> Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/
> 
> iEYEARECAAYFAlJNIK4ACgkQgRXp2M5fVU2alACeJOFyKCxkhx82fc792dIie7cN
> OMcAoOnn0HvdURdcD8ToW6i4RHROqyGJ
> =1icY
> -END PGP SIGNATURE-

Sure I will resend. I think I messed up somehow with my MUA while sending.

regards,
Bapt


pgpiXnFkmtLpO.pgp
Description: PGP signature


Re: Explain staging

2013-10-03 Thread Anton Shterenlikht
>Date: Thu, 3 Oct 2013 08:15:11 +0200
>From: Baptiste Daroussin 
>To: Stephen Montgomery-Smith 
>Subject: Re: Explain staging
>
>On Wed, Oct 02, 2013 at 10:44:32PM -0500, Stephen Montgomery-Smith wrote:
>> I have not been following discussions recently.  There is this new thing
>> called staging.  I don't seem able to find the original emails where
>> this was introduced.
>>=20
>> Is there an email or a website which explains in some detail how staging
>> works?  It is badly messing with a port I am developing.  I can fix it
>> by setting NO_STAGE=3Dyes, but I would like to get a better idea of why it
>> is failing.  The failure is during the build process.
>>=20
>> Sorry for not following closer.
>
>Not a problem.
>
>Staging is basically installing everything into a staging area "${WRKSRC}/s=
>tage"
>before messing up the system. What most of package system calls DESTDIR or
>FAKEDIR.

sorry, I still don't get it.
What is achived by staging?

>
>=46rom that stage a create can be directly created (even as a single user).=
> or the
>stage can be sync into the filesystem.

I don't understand what you mean.
Do you mean that an unprivileged user can
somehow install software from ports not under
/usr/local?

>
>2 new targets can help you staging your ports: make check-orphans and make
>makeplist.
>
>You should have received 2 mails from me with some details about staging:
>one called "[HEADSUP] Stage support for the ports tree"
>and on called "Staging, packages and more" (very recent as of yesterday)
>
>The following wiki page https://wiki.freebsd.org/ports/StageDir has been cr=
>eated
>for tips and helps around staging.

I've read your mails and the wiki page,
but still not sure what, if anything,
I need/could do with my ports.

I trust you know what you are doing,
but the meaning is not clear to me (yet).

Is the idea that all ports must/should
support staging?

If a port doesn't support staging,
will it fail portlint checks?

Thanks

Anton
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-03 Thread Alex Dupre
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Baptiste Daroussin ha scritto:
> You should have received 2 mails from me with some details about
> staging: one called "[HEADSUP] Stage support for the ports tree" 
> and on called "Staging, packages and more" (very recent as of
> yesterday)

I think the issue was that such very first email was lost somewhere,
as Stefan said there isn't in the mailing list archive, I've never
received originally, but there a few replies to it. Can you resend it
to the list, please?

- -- 
Alex Dupre
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.21 (FreeBSD)
Comment: Using GnuPG with SeaMonkey - http://www.enigmail.net/

iEYEARECAAYFAlJNIK4ACgkQgRXp2M5fVU2alACeJOFyKCxkhx82fc792dIie7cN
OMcAoOnn0HvdURdcD8ToW6i4RHROqyGJ
=1icY
-END PGP SIGNATURE-
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-03 Thread Kimmo Paasiala
>
> From that stage a create can be directly created (even as a single user). or 
> the
> stage can be sync into the filesystem.
>

You probably meant to write: "From that stage a *package* can be
directly created" ;)

It's easy to understand why this is so useful because the result of
the compilation does not have to be installed for real on the build
host or build jail when the goal is just to create a package and clean
up is lot easier.

Keep up the good work,

-Kimmo

>
> regards,
> Bapt
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Re: Explain staging

2013-10-02 Thread Baptiste Daroussin
On Wed, Oct 02, 2013 at 10:44:32PM -0500, Stephen Montgomery-Smith wrote:
> I have not been following discussions recently.  There is this new thing
> called staging.  I don't seem able to find the original emails where
> this was introduced.
> 
> Is there an email or a website which explains in some detail how staging
> works?  It is badly messing with a port I am developing.  I can fix it
> by setting NO_STAGE=yes, but I would like to get a better idea of why it
> is failing.  The failure is during the build process.
> 
> Sorry for not following closer.

Not a problem.

Staging is basically installing everything into a staging area "${WRKSRC}/stage"
before messing up the system. What most of package system calls DESTDIR or
FAKEDIR.

From that stage a create can be directly created (even as a single user). or the
stage can be sync into the filesystem.

2 new targets can help you staging your ports: make check-orphans and make
makeplist.

You should have received 2 mails from me with some details about staging:
one called "[HEADSUP] Stage support for the ports tree"
and on called "Staging, packages and more" (very recent as of yesterday)

The following wiki page https://wiki.freebsd.org/ports/StageDir has been created
for tips and helps around staging.

Do not hesitate to add new entries to the wiki page, if you need any help
staging your ports I can provide reviews.

regards,
Bapt


pgpFGE_OUlO_d.pgp
Description: PGP signature


Re: Explain staging

2013-10-02 Thread Jov
can this wiki page help?
https://wiki.freebsd.org/ports/StageDir

Jov
blog: http:amutu.com/blog 


2013/10/3 Stephen Montgomery-Smith 

> I have not been following discussions recently.  There is this new thing
> called staging.  I don't seem able to find the original emails where
> this was introduced.
>
> Is there an email or a website which explains in some detail how staging
> works?  It is badly messing with a port I am developing.  I can fix it
> by setting NO_STAGE=yes, but I would like to get a better idea of why it
> is failing.  The failure is during the build process.
>
> Sorry for not following closer.
> ___
> freebsd-ports@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"
>
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"


Explain staging

2013-10-02 Thread Stephen Montgomery-Smith
I have not been following discussions recently.  There is this new thing
called staging.  I don't seem able to find the original emails where
this was introduced.

Is there an email or a website which explains in some detail how staging
works?  It is badly messing with a port I am developing.  I can fix it
by setting NO_STAGE=yes, but I would like to get a better idea of why it
is failing.  The failure is during the build process.

Sorry for not following closer.
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"