aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHumm <hummsmith42@gmail.com>2021-10-30 15:12:23 +0200
committerLeo <thinkabit.ukim@gmail.com>2021-10-30 16:48:23 +0000
commit7a09f7dd6c74e1d206099b6085a8804ed057ad16 (patch)
tree6cc7aa2191183a2c5ad1201c647d8e9e2c4666bf
parent76125130ff054e7ee576c6c64c2f468dcee844d5 (diff)
downloadaports-patches/3731.tar.gz
aports-patches/3731.tar.bz2
aports-patches/3731.tar.xz
community/plan9port: fix default root pathpatches/3731
-rw-r--r--community/plan9port/0001-s-usr-local-plan9-usr-lib-plan9.patch56
-rw-r--r--community/plan9port/APKBUILD4
2 files changed, 59 insertions, 1 deletions
diff --git a/community/plan9port/0001-s-usr-local-plan9-usr-lib-plan9.patch b/community/plan9port/0001-s-usr-local-plan9-usr-lib-plan9.patch
new file mode 100644
index 0000000000..3cd8486561
--- /dev/null
+++ b/community/plan9port/0001-s-usr-local-plan9-usr-lib-plan9.patch
@@ -0,0 +1,56 @@
+From 2c7ac172145b5c831d597a636bd2cf237005684c Mon Sep 17 00:00:00 2001
+From: Humm <hummsmith42@gmail.com>
+Date: Sat, 30 Oct 2021 03:11:39 +0200
+Subject: [PATCH] s,/usr/local/plan9,/usr/lib/plan9,
+
+Since we install plan9port to /usr/lib/plan9, we need to modify the
+default plan9port root directory to that. If we don't, we get problems
+in situations without the $PLAN9 environment variable, such as with rc
+as login shell.
+---
+ src/cmd/sam/sam.c | 2 +-
+ src/cmd/upas/nfs/imap.c | 2 +-
+ src/lib9/get9root.c | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/cmd/sam/sam.c b/src/cmd/sam/sam.c
+index 84e015f5..6933750f 100644
+--- a/src/cmd/sam/sam.c
++++ b/src/cmd/sam/sam.c
+@@ -154,7 +154,7 @@ rescue(void)
+ sprint(buf, "nameless.%d", nblank++);
+ root = getenv("PLAN9");
+ if(root == nil)
+- root = "/usr/local/plan9";
++ root = "/usr/lib/plan9";
+ fprint(io, "#!/bin/sh\n%s/bin/samsave '%s' $* <<'---%s'\n", root, buf, buf);
+ addr.r.p1 = 0, addr.r.p2 = f->b.nc;
+ writeio(f);
+diff --git a/src/cmd/upas/nfs/imap.c b/src/cmd/upas/nfs/imap.c
+index 5249e2e7..5c587c26 100644
+--- a/src/cmd/upas/nfs/imap.c
++++ b/src/cmd/upas/nfs/imap.c
+@@ -825,7 +825,7 @@ imapdial(char *server, int mode)
+ fd[0] = dup(p[0], -1);
+ fd[1] = dup(p[0], -1);
+ fd[2] = dup(2, -1);
+- if(threadspawnl(fd, "/usr/local/plan9/bin/rc", "rc", "-c", server, nil) < 0){
++ if(threadspawnl(fd, "/usr/lib/plan9/bin/rc", "rc", "-c", server, nil) < 0){
+ close(p[0]);
+ close(p[1]);
+ close(fd[0]);
+diff --git a/src/lib9/get9root.c b/src/lib9/get9root.c
+index 07e2872c..e58958a2 100644
+--- a/src/lib9/get9root.c
++++ b/src/lib9/get9root.c
+@@ -12,6 +12,6 @@ get9root(void)
+ if((s = getenv("PLAN9")) != 0)
+ return s;
+ /* could do better - search $PATH */
+- s = "/usr/local/plan9";
++ s = "/usr/lib/plan9";
+ return s;
+ }
+--
+2.33.1
+
diff --git a/community/plan9port/APKBUILD b/community/plan9port/APKBUILD
index 7578b2a99b..933dac23b1 100644
--- a/community/plan9port/APKBUILD
+++ b/community/plan9port/APKBUILD
@@ -3,7 +3,7 @@
pkgname=plan9port
_commit=878b30c0bc1446ba933dc4539438512766183500
pkgver=0_git20210405
-pkgrel=1
+pkgrel=2
pkgdesc="Port of many Plan 9 libraries and programs to Unix"
url="https://9fans.github.io/plan9port/"
arch="all"
@@ -14,6 +14,7 @@ options="!check" # upstream doesn't have a test suite
subpackages="$pkgname-doc"
source="$pkgname-$pkgver-$_commit.tar.gz::https://github.com/9fans/plan9port/archive/$_commit.tar.gz
libucontext.patch
+ 0001-s-usr-local-plan9-usr-lib-plan9.patch
plan9.sh"
builddir="$srcdir/$pkgname-$_commit"
@@ -55,4 +56,5 @@ doc() {
sha512sums="2b56b50276ce54bad5170eea866fa94df680ebada1161b3be2b837d4d309a571b91a50e7d5ba1d2a1962ac3b1f3200e367762040b49788e163bbdd38010aeee0 plan9port-0_git20210405-878b30c0bc1446ba933dc4539438512766183500.tar.gz
15c3427d36cf9dfaa58c301756d3a8c94ea3acc7edbe3d1b484032acad5c401691e159949844ce277d4bf90b3fc8a38ff8e7c92567b2084c697895f609f11008 libucontext.patch
+a37c786c66954597243ae6a2fa8e23c4752d971fb85abba4ac4016eeaa32e87026ca863644d079029feacdffabe8d79e69e1694839d167ebfaab2b5aeef3934d 0001-s-usr-local-plan9-usr-lib-plan9.patch
1862807e8c45280fbd3e7827c253de093deb773d846713e3c46256e77c409b2d69cce44a2fe086d2776ebf5204707f84a3577324800173daa2f3d4fb3eae09f0 plan9.sh"