Skip to content

Commit

Permalink
Fixed: sanoid-portable fails to launch perl subprocesses
Browse files Browse the repository at this point in the history
  • Loading branch information
decoyjoe committed Dec 14, 2024
1 parent 00df69c commit e2eb45c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ echo "Checking out Sanoid version \"${SANOID_VERSION}\""
pushd sanoid_source > /dev/null
git -c advice.detachedHead=false checkout "v${SANOID_VERSION}"
git log -1

echo 'Applying custom patches to sanoid scripts to support bundling in APPerl binary...'
for tool in sanoid syncoid findoid; do
patch < "${repo_root}/patches/${tool}.patch"
done
popd > /dev/null
echo ''

Expand Down
10 changes: 10 additions & 0 deletions patches/findoid.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
diff --git a/findoid b/findoid
index 0bb5e5f..d481c66 100755
--- a/findoid
+++ b/findoid
@@ -1,4 +1,5 @@
#!/usr/bin/perl
+$ENV{APPERL_SCRIPTNAME} = 'perl';

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

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

# this software is licensed for use under the Free Software Foundation's GPL v3.0 license, as retrieved
# from http://www.gnu.org/licenses/gpl-3.0.html on 2014-11-17. A copy should also be available in this

0 comments on commit e2eb45c

Please sign in to comment.