<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 161: add sandboxing support to fink (revised approach)</title><link>https://sourceforge.net/p/fink/patches/161/</link><description>Recent changes to 161: add sandboxing support to fink (revised approach)</description><atom:link href="https://sourceforge.net/p/fink/patches/161/feed.rss" rel="self"/><language>en</language><lastBuildDate>Fri, 11 Nov 2016 13:21:29 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/fink/patches/161/feed.rss" rel="self" type="application/rss+xml"/><item><title>#161 add sandboxing support to fink (revised approach)</title><link>https://sourceforge.net/p/fink/patches/161/?limit=25#08ec</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The changes from the fink 0.41.0 release.are..&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/MANIFEST fink-0.41.0/MANIFEST&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/MANIFEST   2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/MANIFEST        2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -24,6 +24,8 @@&lt;/span&gt;
 fink.8.in
 fink.conf.5.in
 fink.csh
&lt;span class="gi"&gt;+fink.sb&lt;/span&gt;
&lt;span class="gi"&gt;+fink.sb.5.in&lt;/span&gt;
 fink.sh
 images/finkDoneFailed.png
 images/finkDonePassed.png
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/fink.8.in fink-0.41.0/fink.8.in&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/fink.8.in  2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/fink.8.in       2016-11-11 08:09:00.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -103,6 +103,21 @@&lt;/span&gt;
 .It Cm --no-build-as-nobody
 Force the the unpack, patch, compile, and install phases to be 
 performed as root.
&lt;span class="gi"&gt;+.It Cm --build-in-sandbox&lt;/span&gt;
&lt;span class="gi"&gt;+Execute packaging within a sandbox which blacklists read access to &lt;/span&gt;
&lt;span class="gi"&gt;+those directories listed in&lt;/span&gt;
&lt;span class="gi"&gt;+.Pa @PREFIX@/etc/fink.sb.&lt;/span&gt;
&lt;span class="gi"&gt;+\ This is the default behavior unless overridden by a&lt;/span&gt;
&lt;span class="gi"&gt;+.Pa NoSandbox: true&lt;/span&gt;
&lt;span class="gi"&gt;+directive in a .info file, the&lt;/span&gt;
&lt;span class="gi"&gt;+.Cm --no-build-in-sandbox&lt;/span&gt;
&lt;span class="gi"&gt;+flag is used, or if the&lt;/span&gt;
&lt;span class="gi"&gt;+.Pa @PREFIX@/etc/fink.sb&lt;/span&gt;
&lt;span class="gi"&gt;+file is empty.&lt;/span&gt;
&lt;span class="gi"&gt;+.It Cm --no-build-in-sandbox&lt;/span&gt;
&lt;span class="gi"&gt;+Don't execute within a sandbox, opposite of the&lt;/span&gt;
&lt;span class="gi"&gt;+.Cm --build-in-sandbox&lt;/span&gt;
&lt;span class="gi"&gt;+flag.&lt;/span&gt;
 .It Cm -m, --maintainer
 Perform actions useful to package maintainers: run validation on
 the .info file before building and on the .deb after building a
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/fink.sb fink-0.41.0/fink.sb&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/fink.sb    1969-12-31 19:00:00.000000000 -0500&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/fink.sb 2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -0,0 +1,2 @@&lt;/span&gt;
&lt;span class="gi"&gt;+/usr/local&lt;/span&gt;
&lt;span class="gi"&gt;+/opt/local&lt;/span&gt;
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/fink.sb.5.in fink-0.41.0/fink.sb.5.in&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/fink.sb.5.in       1969-12-31 19:00:00.000000000 -0500&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/fink.sb.5.in    2016-11-10 09:24:50.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -0,0 +1,60 @@&lt;/span&gt;
&lt;span class="gi"&gt;+.\" -*- nroff -*-&lt;/span&gt;
&lt;span class="gi"&gt;+.Dd November 2011&lt;/span&gt;
&lt;span class="gi"&gt;+.Dt FINK.SB 5&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh NAME&lt;/span&gt;
&lt;span class="gi"&gt;+.Nm fink.sb&lt;/span&gt;
&lt;span class="gi"&gt;+.Nd sandboxing configuration file for&lt;/span&gt;
&lt;span class="gi"&gt;+.Xr fink 8&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh SYNOPSIS&lt;/span&gt;
&lt;span class="gi"&gt;+@PREFIX@/etc/fink.sb&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\" DESCRIPTION&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh DESCRIPTION&lt;/span&gt;
&lt;span class="gi"&gt;+The&lt;/span&gt;
&lt;span class="gi"&gt;+.Xr fink 8&lt;/span&gt;
&lt;span class="gi"&gt;+packaging system defaults to compiling packages within a protected sandbox that blacklists &lt;/span&gt;
&lt;span class="gi"&gt;+access to directories listed in&lt;/span&gt;
&lt;span class="gi"&gt;+.Nm&lt;/span&gt;
&lt;span class="gi"&gt;+In general, modifying the list of blacklisted directories meant for advanced users only.&lt;/span&gt;
&lt;span class="gi"&gt;+.Pp&lt;/span&gt;
&lt;span class="gi"&gt;+The default&lt;/span&gt;
&lt;span class="gi"&gt;+.Nm&lt;/span&gt;
&lt;span class="gi"&gt;+blacklists the following directories&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
&lt;span class="gi"&gt;+.Bl -tag -width flag -offset indent -compact&lt;/span&gt;
&lt;span class="gi"&gt;+.It /usr/local&lt;/span&gt;
&lt;span class="gi"&gt;+.It /opt/local&lt;/span&gt;
&lt;span class="gi"&gt;+.El&lt;/span&gt;
&lt;span class="gi"&gt;+.Pp&lt;/span&gt;
&lt;span class="gi"&gt;+The blacklisted directories appear one per line in the file.&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
&lt;span class="gi"&gt;+Note that an empty&lt;/span&gt;
&lt;span class="gi"&gt;+.Nm&lt;/span&gt;
&lt;span class="gi"&gt;+file disables the automatic sandboxing in the fink program.&lt;/span&gt;
&lt;span class="gi"&gt;+.El&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\" AUTHOR&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh AUTHOR&lt;/span&gt;
&lt;span class="gi"&gt;+This manpage is maintained by the Fink Core Group &amp;lt;fink-core@lists.sourceforge.net&amp;gt;.&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\" ACKNOWLEDGEMENTS&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh ACKNOWLEDGEMENTS&lt;/span&gt;
&lt;span class="gi"&gt;+.Nm fink&lt;/span&gt;
&lt;span class="gi"&gt;+is developed and maintained by The Fink Project (http://www.finkproject.org).&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\" SEE ALSO&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh "SEE ALSO"&lt;/span&gt;
&lt;span class="gi"&gt;+.Xr apt-get 8 ,&lt;/span&gt;
&lt;span class="gi"&gt;+.Xr fink 8&lt;/span&gt;
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/install.sh fink-0.41.0/install.sh&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/install.sh 2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/install.sh      2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -70,8 +70,10 @@&lt;/span&gt;

 install -c -p -m 755 postinstall.pl "$basepath/lib/fink/"
 install -c -p -m 644 shlibs.default "$basepath/etc/dpkg/"
&lt;span class="gi"&gt;+install -c -p -m 644 fink.sb "$basepath/etc/"&lt;/span&gt;
 install -c -p -m 644 fink.8 "$basepath/share/man/man8/"
 install -c -p -m 644 fink.conf.5 "$basepath/share/man/man5/"
&lt;span class="gi"&gt;+install -c -p -m 644 fink.sb.5 "$basepath/share/man/man5/"&lt;/span&gt;
 install -c -p -m 644 images/*.png "$basepath/share/fink/images/"

 # copy executables
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/perlmod/Fink/Bootstrap.pm fink-0.41.0/perlmod/Fink/Bootstrap.pm&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/perlmod/Fink/Bootstrap.pm  2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/perlmod/Fink/Bootstrap.pm       2016-11-06 18:58:41.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -500,6 +500,8 @@&lt;/span&gt;
        Fink::Config::set_options( { 'use_binary' =&amp;gt; -1 });
        # bootstrap as root
        Fink::Config::set_options( { 'build_as_nobody' =&amp;gt; 0 });
&lt;span class="gi"&gt;+       # don't use sandbox during bootstrap&lt;/span&gt;
&lt;span class="gi"&gt;+       Fink::Config::set_options( { 'build_in_sandbox' =&amp;gt; 0 });&lt;/span&gt;

        # make sure we have the package descriptions
        Fink::Package-&amp;gt;require_packages();
&lt;span class="gu"&gt;@@ -581,6 +583,8 @@&lt;/span&gt;

        # bootstrap as root
        Fink::Config::set_options( { 'build_as_nobody' =&amp;gt; 0 });
&lt;span class="gi"&gt;+       # don't use sandbox during bootstrap&lt;/span&gt;
&lt;span class="gi"&gt;+       Fink::Config::set_options( { 'build_in_sandbox' =&amp;gt; 0 });&lt;/span&gt;
        # use normal install routines, but do not use buildlocks
        Fink::Config::set_options( { 'no_buildlock' =&amp;gt; 1 } );
        Fink::Engine::cmd_install(@elist, @addlist);
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/perlmod/Fink/Config.pm fink-0.41.0/perlmod/Fink/Config.pm&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/perlmod/Fink/Config.pm     2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/perlmod/Fink/Config.pm  2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -219,6 +219,7 @@&lt;/span&gt;
        map( { $_ =&amp;gt; 0 } qw(dontask interactive verbosity keep_build keep_root
                maintainermode showversion use_binary) ),
        map( { $_ =&amp;gt; 1 } qw(build_as_nobody) ),
&lt;span class="gi"&gt;+       map( { $_ =&amp;gt; -1 } qw(build_in_sandbox) ),&lt;/span&gt;
        map( { $_ =&amp;gt; "" } qw(tests validate) ),
        map ( { $_ =&amp;gt; [] } qw(include_trees exclude_trees) ),
        map( { $_ =&amp;gt; -1 } qw(use_binary) ),
&lt;span class="gu"&gt;@@ -272,6 +273,7 @@&lt;/span&gt;
                        'download pre-compiled packages from the binary distribution '
                        . 'if available'        ],
                [ 'build-as-nobody!'   =&amp;gt; \$opts{build_as_nobody},      'see man page'  ],
&lt;span class="gi"&gt;+               [ 'build-in-sandbox!' =&amp;gt; \$opts{build_in_sandbox}, 'see man page'  ],&lt;/span&gt;
                [ 'maintainer|m'       =&amp;gt; sub {set_checking_opts(\%opts, @_);}, 'see man page'  ],
                [ 'tests:s'            =&amp;gt; sub {set_checking_opts(\%opts, @_);}, 'see man page'  ],
                [ 'validate:s'         =&amp;gt; sub {set_checking_opts(\%opts, @_);}, 'see man page'  ],
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/perlmod/Fink/PkgVersion.pm fink-0.41.0/perlmod/Fink/PkgVersion.pm&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/perlmod/Fink/PkgVersion.pm 2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/perlmod/Fink/PkgVersion.pm      2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -4036,6 +4036,9 @@&lt;/span&gt;
                }
        }

&lt;span class="gi"&gt;+       # switch everything back to sandbox builds if we were --build-in-sandbox&lt;/span&gt;
&lt;span class="gi"&gt;+       my $build_wo_sandbox = $self-&amp;gt;get_family_parent()-&amp;gt;param_boolean("NoSandbox", 0);&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
        # put the info file into the debian directory
        if (-d "$destdir/DEBIAN") {
                my $infofile = $self-&amp;gt;get_filename();
&lt;span class="gu"&gt;@@ -5218,6 +5221,7 @@&lt;/span&gt;
        my $phase = shift;
        my $no_expand = shift || 0;
        my $nonroot_okay = shift || 0;
&lt;span class="gi"&gt;+       my $no_sandbox_okay = shift || 0;&lt;/span&gt;
        my $ignore_result = shift || 0;

        # Expand percent shortcuts
&lt;span class="gu"&gt;@@ -5227,10 +5231,13 @@&lt;/span&gt;
        my $result;
        # Don't build as nobody if BuildAsNobody: false
        my $build_as_nobody = $self-&amp;gt;get_family_parent()-&amp;gt;param_boolean("BuildAsNobody", 1);
&lt;span class="gi"&gt;+       # Build in sandbox if NoSandbox: false&lt;/span&gt;
&lt;span class="gi"&gt;+       my $build_wo_sandbox = $self-&amp;gt;get_family_parent()-&amp;gt;param_boolean("NoSandbox", 0);&lt;/span&gt;
        $nonroot_okay = $nonroot_okay &amp;amp;&amp;amp; $build_as_nobody;
&lt;span class="gi"&gt;+       $no_sandbox_okay = $build_wo_sandbox;&lt;/span&gt;
        {
                local %ENV = %{$self-&amp;gt;get_env($phase)};
&lt;span class="gd"&gt;-               $result = &amp;amp;execute($script, nonroot_okay=&amp;gt;$nonroot_okay);&lt;/span&gt;
&lt;span class="gi"&gt;+               $result = &amp;amp;execute($script, nonroot_okay=&amp;gt;$nonroot_okay, no_sandbox_okay=&amp;gt;$no_sandbox_okay);&lt;/span&gt;
        }
        if ($result and !$ignore_result) {
                $self-&amp;gt;package_error( phase =&amp;gt; $phase );
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/perlmod/Fink/Services.pm fink-0.41.0/perlmod/Fink/Services.pm&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/perlmod/Fink/Services.pm   2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/perlmod/Fink/Services.pm        2016-11-11 08:15:48.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -514,6 +514,11 @@&lt;/span&gt;
 the --build-as-nobody flag, drop to user=nobody when running the
 actual commands.

&lt;span class="gi"&gt;+=item no_sandbox_okay&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
&lt;span class="gi"&gt;+If the value of the option 'no_sandbox_okay' is true, fink was run with&lt;/span&gt;
&lt;span class="gi"&gt;+the --no-build-in-sandbox flag.&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
 =item delete_tempfile

 Whether to delete temp-files that are created. The following values
&lt;span class="gu"&gt;@@ -594,6 +599,32 @@&lt;/span&gt;
                @wrap = map "$_=$ENV{$_}", sort keys %ENV;
                push @wrap, "__CFPREFERENCES_AVOID_DAEMON=1";
                unshift @wrap, 'env' if @wrap;
&lt;span class="gi"&gt;+               my $runtime_request = Fink::Config::get_option("build_in_sandbox");&lt;/span&gt;
&lt;span class="gi"&gt;+               my $sandbox_request;&lt;/span&gt;
&lt;span class="gi"&gt;+               if ($runtime_request == 1) {  # --build-in-sandbox &lt;/span&gt;
&lt;span class="gi"&gt;+                       $sandbox_request = 1;&lt;/span&gt;
&lt;span class="gi"&gt;+               } elsif ($runtime_request == 0) { # -no-build-in-sandbox   &lt;/span&gt;
&lt;span class="gi"&gt;+                       $sandbox_request = 0;&lt;/span&gt;
&lt;span class="gi"&gt;+               } elsif ($options{'no_sandbox_okay'}) { # NoSandbox: true in info file&lt;/span&gt;
&lt;span class="gi"&gt;+                       $sandbox_request = 0;&lt;/span&gt;
&lt;span class="gi"&gt;+               } else {&lt;/span&gt;
&lt;span class="gi"&gt;+                       $sandbox_request = 1;&lt;/span&gt;
&lt;span class="gi"&gt;+               }&lt;/span&gt;
&lt;span class="gi"&gt;+               if ( !-z "$Fink::Config::basepath/etc/fink.sb" &amp;amp;&amp;amp; $sandbox_request ) {&lt;/span&gt;
&lt;span class="gi"&gt;+                       my $sandbox = "$Fink::Config::basepath/etc/fink.sb";&lt;/span&gt;
&lt;span class="gi"&gt;+                       if (open my $info, $sandbox) {&lt;/span&gt;
&lt;span class="gi"&gt;+                               my $sandbox_profile = "(version 1) \n";&lt;/span&gt;
&lt;span class="gi"&gt;+                               $sandbox_profile .= "(allow default) \n";&lt;/span&gt;
&lt;span class="gi"&gt;+                               $sandbox_profile .= "(deny file* \n";&lt;/span&gt;
&lt;span class="gi"&gt;+                               while( my $line = &amp;lt;$info&amp;gt;)  {&lt;/span&gt;
&lt;span class="gi"&gt;+                                       chomp $line;&lt;/span&gt;
&lt;span class="gi"&gt;+                                       $sandbox_profile .= "\t(subpath \"".$line."\"\)\n";&lt;/span&gt;
&lt;span class="gi"&gt;+                               }&lt;/span&gt;
&lt;span class="gi"&gt;+                               $sandbox_profile .= "\)\n";&lt;/span&gt;
&lt;span class="gi"&gt;+                               close $info;&lt;/span&gt;
&lt;span class="gi"&gt;+                               @wrap = (qw| sandbox-exec -p |, $sandbox_profile, @wrap) if -f $sandbox;&lt;/span&gt;
&lt;span class="gi"&gt;+                       }&lt;/span&gt;
&lt;span class="gi"&gt;+               }&lt;/span&gt;
                my $sudo_cmd = "sudo -u " . Fink::Config::build_as_user_group()-&amp;gt;{'user'};
                @wrap = (split(' ', $sudo_cmd), @wrap, qw/ sh -c /);
                $wrap_token = "$sudo_cmd [ENV] sh -c ";
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/perlmod/Fink/Validation.pm fink-0.41.0/perlmod/Fink/Validation.pm&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/perlmod/Fink/Validation.pm 2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/perlmod/Fink/Validation.pm      2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -66,7 +66,7 @@&lt;/span&gt;
 # All fields that expect a boolean value
 our %boolean_fields = map {$_, 1}
        (
&lt;span class="gd"&gt;-               qw(builddependsonly essential nosourcedirectory updateconfigguess updatelibtool updatepod noperltests usemaxbuildjobs buildasnobody),&lt;/span&gt;
&lt;span class="gi"&gt;+               qw(builddependsonly essential nosourcedirectory updateconfigguess updatelibtool updatepod noperltests usemaxbuildjobs buildasnobody nosandbox),&lt;/span&gt;
                map {"noset".$_} @set_vars
        );

&lt;span class="gu"&gt;@@ -198,6 +198,7 @@&lt;/span&gt;
                 'noperltests',
                 'usemaxbuildjobs',
                 'buildasnobody',
&lt;span class="gi"&gt;+                'nosandbox',&lt;/span&gt;
 #  install phase:
                 'updatepod',
                 'installscript',
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/setup.sh fink-0.41.0/setup.sh&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/setup.sh   2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/setup.sh        2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -70,6 +70,10 @@&lt;/span&gt;
   | perl -MTime::Local -MPOSIX=strftime -p -e '$d="Date:";if (s/(\.Dd \$$d) (\d+)\/(\d+)\/(\d+) (\d+):(\d+):(\d+) \$/\1/) {$epochtime = timegm($7,$6,$5,$4,$3-1,$2-1900);$datestr = strftime "%B %e, %Y", localtime($epochtime); s/(\.Dd )\$$d/$1$datestr/;}' \
   &amp;gt;fink.conf.5

&lt;span class="gi"&gt;+sed "s|@PREFIX@|$basepath|g" &amp;lt;fink.sb.5.in \&lt;/span&gt;
&lt;span class="gi"&gt;+  | perl -MTime::Local -MPOSIX=strftime -p -e '$d="Date:";if (s/(\.Dd \$$d) (\d+)\/(\d+)\/(\d+) (\d+):(\d+):(\d+) \$/\1/) {$epochtime = timegm($7,$6,$5,$4,$3-1,$2-1900);$datestr = strftime "%B %e, %Y", localtime($epochtime); s/(\.Dd )\$$d/$1$datestr/;}' \&lt;/span&gt;
&lt;span class="gi"&gt;+  &amp;gt;fink.sb.5&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
 echo "Creating shlibs default file..."
 sed "s|@PREFIX@|$basepath|g" &amp;lt;shlibs.default.in &amp;gt;shlibs.default
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jack Howarth</dc:creator><pubDate>Fri, 11 Nov 2016 13:21:29 -0000</pubDate><guid>https://sourceforge.net258550504ccb403a4848267e28a37471a8043af9</guid></item><item><title>#161 add sandboxing support to fink (revised approach)</title><link>https://sourceforge.net/p/fink/patches/161/?limit=25#3ade</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Note that the actual pull request against fink git master exists at &lt;a class="" href="https://github.com/fink/fink/pull/135/files" rel="nofollow"&gt;https://github.com/fink/fink/pull/135/files&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The same set of changes appliable against the last fink 0.41.0 release are attached&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jack Howarth</dc:creator><pubDate>Fri, 11 Nov 2016 13:20:16 -0000</pubDate><guid>https://sourceforge.net900aa2d39f7979d362b6d6db4b853d62e30e9b48</guid></item><item><title>#161 add sandboxing support to fink (revised approach)</title><link>https://sourceforge.net/p/fink/patches/161/?limit=25#2515</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Latest patch with manpage correction for fink.sb.5.in.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jack Howarth</dc:creator><pubDate>Wed, 09 Nov 2016 00:49:10 -0000</pubDate><guid>https://sourceforge.net49f085bec3e7ba190ce3192f884bf843ec52c852</guid></item><item><title>#161 add sandboxing support to fink (revised approach)</title><link>https://sourceforge.net/p/fink/patches/161/?limit=25#97a7</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;This patch supplants the previously proposed one from &lt;a href="https://sourceforge.net/p/fink/patches/160/."&gt;https://sourceforge.net/p/fink/patches/160/.&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jack Howarth</dc:creator><pubDate>Mon, 07 Nov 2016 04:02:00 -0000</pubDate><guid>https://sourceforge.net25ccac5012358a745a117e06aeba642cebbd9269</guid></item><item><title>#161 add sandboxing support to fink (revised approach)</title><link>https://sourceforge.net/p/fink/patches/161/?limit=25#4854</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The changes from the fink 0.41.0 release.are..&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/MANIFEST fink-0.41.0/MANIFEST&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/MANIFEST   2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/MANIFEST        2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -24,6 +24,8 @@&lt;/span&gt;
 fink.8.in
 fink.conf.5.in
 fink.csh
&lt;span class="gi"&gt;+fink.sb&lt;/span&gt;
&lt;span class="gi"&gt;+fink.sb.5.in&lt;/span&gt;
 fink.sh
 images/finkDoneFailed.png
 images/finkDonePassed.png
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/fink.8.in fink-0.41.0/fink.8.in&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/fink.8.in  2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/fink.8.in       2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -103,6 +103,14 @@&lt;/span&gt;
 .It Cm --no-build-as-nobody
 Force the the unpack, patch, compile, and install phases to be 
 performed as root.
&lt;span class="gi"&gt;+.It Cm --build-in-sandbox&lt;/span&gt;
&lt;span class="gi"&gt;+Execute packaging within a sandbox which blacklists read access to &lt;/span&gt;
&lt;span class="gi"&gt;+those directories listed in&lt;/span&gt;
&lt;span class="gi"&gt;+.Pa @PREFIX@/etc/fink.sb.&lt;/span&gt;
&lt;span class="gi"&gt;+.It Cm --no-build-in-sandbox&lt;/span&gt;
&lt;span class="gi"&gt;+Don't execute within a sandbox, opposite of the&lt;/span&gt;
&lt;span class="gi"&gt;+.Cm --build-in-sandbox&lt;/span&gt;
&lt;span class="gi"&gt;+flag.&lt;/span&gt;
 .It Cm -m, --maintainer
 Perform actions useful to package maintainers: run validation on
 the .info file before building and on the .deb after building a
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/fink.sb fink-0.41.0/fink.sb&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/fink.sb    1969-12-31 19:00:00.000000000 -0500&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/fink.sb 2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -0,0 +1,2 @@&lt;/span&gt;
&lt;span class="gi"&gt;+/usr/local&lt;/span&gt;
&lt;span class="gi"&gt;+/opt/local&lt;/span&gt;
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/fink.sb.5.in fink-0.41.0/fink.sb.5.in&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/fink.sb.5.in       1969-12-31 19:00:00.000000000 -0500&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/fink.sb.5.in    2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -0,0 +1,56 @@&lt;/span&gt;
&lt;span class="gi"&gt;+.\" -*- nroff -*-&lt;/span&gt;
&lt;span class="gi"&gt;+.Dd November 2011&lt;/span&gt;
&lt;span class="gi"&gt;+.Dt FINK.SB 5&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh NAME&lt;/span&gt;
&lt;span class="gi"&gt;+.Nm fink.sb&lt;/span&gt;
&lt;span class="gi"&gt;+.Nd sandboxing configuration file for&lt;/span&gt;
&lt;span class="gi"&gt;+.Xr fink 8&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh SYNOPSIS&lt;/span&gt;
&lt;span class="gi"&gt;+@PREFIX@/etc/fink.sb&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\" DESCRIPTION&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh DESCRIPTION&lt;/span&gt;
&lt;span class="gi"&gt;+When&lt;/span&gt;
&lt;span class="gi"&gt;+.Xr fink 8&lt;/span&gt;
&lt;span class="gi"&gt;+is initially installed it prompts you for whether you wish to enable the&lt;/span&gt;
&lt;span class="gi"&gt;+building of packages within a protected sandbox which blacklists access to&lt;/span&gt;
&lt;span class="gi"&gt;+those directories listed in&lt;/span&gt;
&lt;span class="gi"&gt;+.Nm&lt;/span&gt;
&lt;span class="gi"&gt;+by hand. In general, these options are meant for advanced users only.&lt;/span&gt;
&lt;span class="gi"&gt;+.Pp&lt;/span&gt;
&lt;span class="gi"&gt;+Your&lt;/span&gt;
&lt;span class="gi"&gt;+.Nm&lt;/span&gt;
&lt;span class="gi"&gt;+defaults to blacklisting the following directories&lt;/span&gt;
&lt;span class="gi"&gt;+.Bl -tag -width flag -offset indent -compact&lt;/span&gt;
&lt;span class="gi"&gt;+.It /usr/local&lt;/span&gt;
&lt;span class="gi"&gt;+.It /opt/local&lt;/span&gt;
&lt;span class="gi"&gt;+.El&lt;/span&gt;
&lt;span class="gi"&gt;+.Pp&lt;/span&gt;
&lt;span class="gi"&gt;+The blacklisted directories appear one per line in the file.&lt;/span&gt;
&lt;span class="gi"&gt;+.El&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\" AUTHOR&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh AUTHOR&lt;/span&gt;
&lt;span class="gi"&gt;+This manpage is maintained by the Fink Core Group &amp;lt;fink-core@lists.sourceforge.net&amp;gt;.&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\" ACKNOWLEDGEMENTS&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh ACKNOWLEDGEMENTS&lt;/span&gt;
&lt;span class="gi"&gt;+.Nm fink&lt;/span&gt;
&lt;span class="gi"&gt;+is developed and maintained by The Fink Project (http://www.finkproject.org).&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\" SEE ALSO&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.\"&lt;/span&gt;
&lt;span class="gi"&gt;+.Sh "SEE ALSO"&lt;/span&gt;
&lt;span class="gi"&gt;+.Xr apt-get 8 ,&lt;/span&gt;
&lt;span class="gi"&gt;+.Xr fink 8&lt;/span&gt;
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/install.sh fink-0.41.0/install.sh&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/install.sh 2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/install.sh      2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -70,8 +70,10 @@&lt;/span&gt;

 install -c -p -m 755 postinstall.pl "$basepath/lib/fink/"
 install -c -p -m 644 shlibs.default "$basepath/etc/dpkg/"
&lt;span class="gi"&gt;+install -c -p -m 644 fink.sb "$basepath/etc/"&lt;/span&gt;
 install -c -p -m 644 fink.8 "$basepath/share/man/man8/"
 install -c -p -m 644 fink.conf.5 "$basepath/share/man/man5/"
&lt;span class="gi"&gt;+install -c -p -m 644 fink.sb.5 "$basepath/share/man/man5/"&lt;/span&gt;
 install -c -p -m 644 images/*.png "$basepath/share/fink/images/"

 # copy executables
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/perlmod/Fink/Bootstrap.pm fink-0.41.0/perlmod/Fink/Bootstrap.pm&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/perlmod/Fink/Bootstrap.pm  2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/perlmod/Fink/Bootstrap.pm       2016-11-06 18:58:41.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -500,6 +500,8 @@&lt;/span&gt;
        Fink::Config::set_options( { 'use_binary' =&amp;gt; -1 });
        # bootstrap as root
        Fink::Config::set_options( { 'build_as_nobody' =&amp;gt; 0 });
&lt;span class="gi"&gt;+       # don't use sandbox during bootstrap&lt;/span&gt;
&lt;span class="gi"&gt;+       Fink::Config::set_options( { 'build_in_sandbox' =&amp;gt; 0 });&lt;/span&gt;

        # make sure we have the package descriptions
        Fink::Package-&amp;gt;require_packages();
&lt;span class="gu"&gt;@@ -581,6 +583,8 @@&lt;/span&gt;

        # bootstrap as root
        Fink::Config::set_options( { 'build_as_nobody' =&amp;gt; 0 });
&lt;span class="gi"&gt;+       # don't use sandbox during bootstrap&lt;/span&gt;
&lt;span class="gi"&gt;+       Fink::Config::set_options( { 'build_in_sandbox' =&amp;gt; 0 });&lt;/span&gt;
        # use normal install routines, but do not use buildlocks
        Fink::Config::set_options( { 'no_buildlock' =&amp;gt; 1 } );
        Fink::Engine::cmd_install(@elist, @addlist);
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/perlmod/Fink/Config.pm fink-0.41.0/perlmod/Fink/Config.pm&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/perlmod/Fink/Config.pm     2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/perlmod/Fink/Config.pm  2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -219,6 +219,7 @@&lt;/span&gt;
        map( { $_ =&amp;gt; 0 } qw(dontask interactive verbosity keep_build keep_root
                maintainermode showversion use_binary) ),
        map( { $_ =&amp;gt; 1 } qw(build_as_nobody) ),
&lt;span class="gi"&gt;+       map( { $_ =&amp;gt; -1 } qw(build_in_sandbox) ),&lt;/span&gt;
        map( { $_ =&amp;gt; "" } qw(tests validate) ),
        map ( { $_ =&amp;gt; [] } qw(include_trees exclude_trees) ),
        map( { $_ =&amp;gt; -1 } qw(use_binary) ),
&lt;span class="gu"&gt;@@ -272,6 +273,7 @@&lt;/span&gt;
                        'download pre-compiled packages from the binary distribution '
                        . 'if available'        ],
                [ 'build-as-nobody!'   =&amp;gt; \$opts{build_as_nobody},      'see man page'  ],
&lt;span class="gi"&gt;+               [ 'build-in-sandbox!' =&amp;gt; \$opts{build_in_sandbox}, 'see man page'  ],&lt;/span&gt;
                [ 'maintainer|m'       =&amp;gt; sub {set_checking_opts(\%opts, @_);}, 'see man page'  ],
                [ 'tests:s'            =&amp;gt; sub {set_checking_opts(\%opts, @_);}, 'see man page'  ],
                [ 'validate:s'         =&amp;gt; sub {set_checking_opts(\%opts, @_);}, 'see man page'  ],
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/perlmod/Fink/PkgVersion.pm fink-0.41.0/perlmod/Fink/PkgVersion.pm&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/perlmod/Fink/PkgVersion.pm 2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/perlmod/Fink/PkgVersion.pm      2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -4036,6 +4036,9 @@&lt;/span&gt;
                }
        }

&lt;span class="gi"&gt;+       # switch everything back to sandbox builds if we were --build-in-sandbox&lt;/span&gt;
&lt;span class="gi"&gt;+       my $build_wo_sandbox = $self-&amp;gt;get_family_parent()-&amp;gt;param_boolean("NoSandbox", 0);&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
        # put the info file into the debian directory
        if (-d "$destdir/DEBIAN") {
                my $infofile = $self-&amp;gt;get_filename();
&lt;span class="gu"&gt;@@ -5218,6 +5221,7 @@&lt;/span&gt;
        my $phase = shift;
        my $no_expand = shift || 0;
        my $nonroot_okay = shift || 0;
&lt;span class="gi"&gt;+       my $no_sandbox_okay = shift || 0;&lt;/span&gt;
        my $ignore_result = shift || 0;

        # Expand percent shortcuts
&lt;span class="gu"&gt;@@ -5227,10 +5231,13 @@&lt;/span&gt;
        my $result;
        # Don't build as nobody if BuildAsNobody: false
        my $build_as_nobody = $self-&amp;gt;get_family_parent()-&amp;gt;param_boolean("BuildAsNobody", 1);
&lt;span class="gi"&gt;+       # Build in sandbox if NoSandbox: false&lt;/span&gt;
&lt;span class="gi"&gt;+       my $build_wo_sandbox = $self-&amp;gt;get_family_parent()-&amp;gt;param_boolean("NoSandbox", 0);&lt;/span&gt;
        $nonroot_okay = $nonroot_okay &amp;amp;&amp;amp; $build_as_nobody;
&lt;span class="gi"&gt;+       $no_sandbox_okay = $build_wo_sandbox;&lt;/span&gt;
        {
                local %ENV = %{$self-&amp;gt;get_env($phase)};
&lt;span class="gd"&gt;-               $result = &amp;amp;execute($script, nonroot_okay=&amp;gt;$nonroot_okay);&lt;/span&gt;
&lt;span class="gi"&gt;+               $result = &amp;amp;execute($script, nonroot_okay=&amp;gt;$nonroot_okay, no_sandbox_okay=&amp;gt;$no_sandbox_okay);&lt;/span&gt;
        }
        if ($result and !$ignore_result) {
                $self-&amp;gt;package_error( phase =&amp;gt; $phase );
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/perlmod/Fink/Services.pm fink-0.41.0/perlmod/Fink/Services.pm&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/perlmod/Fink/Services.pm   2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/perlmod/Fink/Services.pm        2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -514,6 +514,11 @@&lt;/span&gt;
 the --build-as-nobody flag, drop to user=nobody when running the
 actual commands.

&lt;span class="gi"&gt;+=item no_sandbox_okay&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
&lt;span class="gi"&gt;+If the value of the option 'no_sandbox_okay' is true, fink was run with&lt;/span&gt;
&lt;span class="gi"&gt;+the --no-build-in-sandbox flag.&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
 =item delete_tempfile

 Whether to delete temp-files that are created. The following values
&lt;span class="gu"&gt;@@ -594,6 +599,33 @@&lt;/span&gt;
                @wrap = map "$_=$ENV{$_}", sort keys %ENV;
                push @wrap, "__CFPREFERENCES_AVOID_DAEMON=1";
                unshift @wrap, 'env' if @wrap;
&lt;span class="gi"&gt;+               my $runtime_request = Fink::Config::get_option("build_in_sandbox");&lt;/span&gt;
&lt;span class="gi"&gt;+               my $sandbox_request;&lt;/span&gt;
&lt;span class="gi"&gt;+               if ($runtime_request == 1) {  # --build-in-sandbox &lt;/span&gt;
&lt;span class="gi"&gt;+                       $sandbox_request = 1;&lt;/span&gt;
&lt;span class="gi"&gt;+               } elsif ($runtime_request == 0) { # -no-build-in-sandbox   &lt;/span&gt;
&lt;span class="gi"&gt;+                       $sandbox_request = 0;&lt;/span&gt;
&lt;span class="gi"&gt;+               } elsif ($options{'no_sandbox_okay'}) { # NoSandbox: true in info file&lt;/span&gt;
&lt;span class="gi"&gt;+                       $sandbox_request = 0;&lt;/span&gt;
&lt;span class="gi"&gt;+               } else {&lt;/span&gt;
&lt;span class="gi"&gt;+                       $sandbox_request = 1;&lt;/span&gt;
&lt;span class="gi"&gt;+               }&lt;/span&gt;
&lt;span class="gi"&gt;+               if ( $sandbox_request ) {&lt;/span&gt;
&lt;span class="gi"&gt;+                       my $sandbox = "$Fink::Config::basepath/etc/fink.sb";&lt;/span&gt;
&lt;span class="gi"&gt;+                       if (open my $info, $sandbox) {&lt;/span&gt;
&lt;span class="gi"&gt;+                               my $sandbox_profile = "(version 1) \n";&lt;/span&gt;
&lt;span class="gi"&gt;+                               $sandbox_profile .= "(allow default) \n";&lt;/span&gt;
&lt;span class="gi"&gt;+                               $sandbox_profile .= "(deny file* \n";&lt;/span&gt;
&lt;span class="gi"&gt;+                               while( my $line = &amp;lt;$info&amp;gt;)  {&lt;/span&gt;
&lt;span class="gi"&gt;+                                       chomp $line;&lt;/span&gt;
&lt;span class="gi"&gt;+                                       $sandbox_profile .= "\t(subpath \"".$line."\"\)\n";&lt;/span&gt;
&lt;span class="gi"&gt;+                               }&lt;/span&gt;
&lt;span class="gi"&gt;+                               $sandbox_profile .= "\)\n";&lt;/span&gt;
&lt;span class="gi"&gt;+                               close $info;&lt;/span&gt;
&lt;span class="gi"&gt;+                               print STDERR $sandbox_profile, "\n" if ($options{debug});&lt;/span&gt;
&lt;span class="gi"&gt;+                               @wrap = (qw| sandbox-exec -p |, $sandbox_profile, @wrap) if -f $sandbox;&lt;/span&gt;
&lt;span class="gi"&gt;+                       }&lt;/span&gt;
&lt;span class="gi"&gt;+               }&lt;/span&gt;
                my $sudo_cmd = "sudo -u " . Fink::Config::build_as_user_group()-&amp;gt;{'user'};
                @wrap = (split(' ', $sudo_cmd), @wrap, qw/ sh -c /);
                $wrap_token = "$sudo_cmd [ENV] sh -c ";
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/perlmod/Fink/Validation.pm fink-0.41.0/perlmod/Fink/Validation.pm&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/perlmod/Fink/Validation.pm 2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/perlmod/Fink/Validation.pm      2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -66,7 +66,7 @@&lt;/span&gt;
 # All fields that expect a boolean value
 our %boolean_fields = map {$_, 1}
        (
&lt;span class="gd"&gt;-               qw(builddependsonly essential nosourcedirectory updateconfigguess updatelibtool updatepod noperltests usemaxbuildjobs buildasnobody),&lt;/span&gt;
&lt;span class="gi"&gt;+               qw(builddependsonly essential nosourcedirectory updateconfigguess updatelibtool updatepod noperltests usemaxbuildjobs buildasnobody nosandbox),&lt;/span&gt;
                map {"noset".$_} @set_vars
        );

&lt;span class="gu"&gt;@@ -198,6 +198,7 @@&lt;/span&gt;
                 'noperltests',
                 'usemaxbuildjobs',
                 'buildasnobody',
&lt;span class="gi"&gt;+                'nosandbox',&lt;/span&gt;
 #  install phase:
                 'updatepod',
                 'installscript',
&lt;span class="gh"&gt;diff -uNr fink-0.41.0.orig/setup.sh fink-0.41.0/setup.sh&lt;/span&gt;
&lt;span class="gd"&gt;--- fink-0.41.0.orig/setup.sh   2016-09-20 14:16:24.000000000 -0400&lt;/span&gt;
&lt;span class="gi"&gt;+++ fink-0.41.0/setup.sh        2016-11-06 18:40:34.000000000 -0500&lt;/span&gt;
&lt;span class="gu"&gt;@@ -70,6 +70,10 @@&lt;/span&gt;
   | perl -MTime::Local -MPOSIX=strftime -p -e '$d="Date:";if (s/(\.Dd \$$d) (\d+)\/(\d+)\/(\d+) (\d+):(\d+):(\d+) \$/\1/) {$epochtime = timegm($7,$6,$5,$4,$3-1,$2-1900);$datestr = strftime "%B %e, %Y", localtime($epochtime); s/(\.Dd )\$$d/$1$datestr/;}' \
   &amp;gt;fink.conf.5

&lt;span class="gi"&gt;+sed "s|@PREFIX@|$basepath|g" &amp;lt;fink.sb.5.in \&lt;/span&gt;
&lt;span class="gi"&gt;+  | perl -MTime::Local -MPOSIX=strftime -p -e '$d="Date:";if (s/(\.Dd \$$d) (\d+)\/(\d+)\/(\d+) (\d+):(\d+):(\d+) \$/\1/) {$epochtime = timegm($7,$6,$5,$4,$3-1,$2-1900);$datestr = strftime "%B %e, %Y", localtime($epochtime); s/(\.Dd )\$$d/$1$datestr/;}' \&lt;/span&gt;
&lt;span class="gi"&gt;+  &amp;gt;fink.sb.5&lt;/span&gt;
&lt;span class="gi"&gt;+&lt;/span&gt;
 echo "Creating shlibs default file..."
 sed "s|@PREFIX@|$basepath|g" &amp;lt;shlibs.default.in &amp;gt;shlibs.default
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jack Howarth</dc:creator><pubDate>Mon, 07 Nov 2016 03:59:18 -0000</pubDate><guid>https://sourceforge.net0839c050326d514089e0c86e32179a770779644e</guid></item><item><title>#161 add sandboxing support to fink (revised approach)</title><link>https://sourceforge.net/p/fink/patches/161/?limit=25#c365</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Patch file generated against the fink 0.41.0 release.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jack Howarth</dc:creator><pubDate>Mon, 07 Nov 2016 03:58:06 -0000</pubDate><guid>https://sourceforge.net682b5a8451bb54584e49553a268ca3e22c9355ff</guid></item><item><title>add sandboxing support to fink (revised approach)</title><link>https://sourceforge.net/p/fink/patches/161/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The attached patch reworks the previously proposed sandboxing support by...&lt;/p&gt;
&lt;p&gt;1) Enabling the sandbox usage by default (except during fink bootstraps)&lt;br/&gt;
2) Adding a 'NoSandbox' field for the Info files which can be used to&lt;br/&gt;
disable the sandbox on a per package basis.&lt;br/&gt;
3) Retaining the --build-in-sandbox/--no-build-in-sandbox fink flags&lt;br/&gt;
which override the other settings.&lt;/p&gt;
&lt;p&gt;The --no-build-in-sandbox fink flag can be used to disable the sandbox&lt;br/&gt;
in any fink build while the --build-in-sandbox fink flag can be used&lt;br/&gt;
to override 'NoSandbox: true' in a particular info file.&lt;/p&gt;
&lt;p&gt;The attached fink_sandboxing_v3.diff, applied to stock fink-0.41.0,&lt;br/&gt;
has been verified to bootstrap on 10.11 and exhibit the behaviors&lt;br/&gt;
described above.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jack Howarth</dc:creator><pubDate>Mon, 07 Nov 2016 03:57:10 -0000</pubDate><guid>https://sourceforge.netdd8987a4e407cc619819652cd25bab0ba366b396</guid></item></channel></rss>