Skip to content

Commit 90a0d34

Browse files
committed
Fixed: sanoid-portable fails to launch perl subprocesses
1 parent f0e0a3d commit 90a0d34

File tree

4 files changed

+35
-0
lines changed

4 files changed

+35
-0
lines changed

build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ echo "Checking out Sanoid version \"${SANOID_VERSION}\""
4343
pushd sanoid_source > /dev/null
4444
git -c advice.detachedHead=false checkout "v${SANOID_VERSION}"
4545
git log -1
46+
47+
echo 'Applying custom patches to sanoid scripts to support bundling in APPerl binary...'
48+
for tool in sanoid syncoid findoid; do
49+
patch < "${repo_root}/patches/${tool}.patch"
50+
done
4651
popd > /dev/null
4752
echo ''
4853

patches/findoid.patch

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/findoid b/findoid
2+
index 0bb5e5f..d481c66 100755
3+
--- a/findoid
4+
+++ b/findoid
5+
@@ -1,4 +1,5 @@
6+
#!/usr/bin/perl
7+
+$ENV{APPERL_SCRIPTNAME} = 'perl';
8+
9+
# this software is licensed for use under the Free Software Foundation's GPL v3.0 license, as retrieved
10+
# from http://www.gnu.org/licenses/gpl-3.0.html on 2014-11-17. A copy should also be available in this

patches/sanoid.patch

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/sanoid b/sanoid
2+
index 5150f3b..1a382f1 100755
3+
--- a/sanoid
4+
+++ b/sanoid
5+
@@ -1,4 +1,5 @@
6+
#!/usr/bin/perl
7+
+$ENV{APPERL_SCRIPTNAME} = 'perl';
8+
9+
# this software is licensed for use under the Free Software Foundation's GPL v3.0 license, as retrieved
10+
# from http://www.gnu.org/licenses/gpl-3.0.html on 2014-11-17. A copy should also be available in this

patches/syncoid.patch

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/syncoid b/syncoid
2+
index 5ed00f0..1791ee6 100755
3+
--- a/syncoid
4+
+++ b/syncoid
5+
@@ -1,4 +1,5 @@
6+
#!/usr/bin/perl
7+
+$ENV{APPERL_SCRIPTNAME} = 'perl';
8+
9+
# this software is licensed for use under the Free Software Foundation's GPL v3.0 license, as retrieved
10+
# from http://www.gnu.org/licenses/gpl-3.0.html on 2014-11-17. A copy should also be available in this

0 commit comments

Comments
 (0)