tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Initial support for OpenWRT
On 2024-04-19 11:39, Saulius Krasuckas wrote:
I faced an issue: https://github.com/NetBSD/pkgsrc/issues/137
So I made a patch to proceed further (attached).
@jperking suggested to be distro agnostic and test OS features directly.
Attaching the revised patch.
S.
From 86fddba0118f900e03973430401be69d81703478 Mon Sep 17 00:00:00 2001
From: Saulius Krasuckas <saulius2%ar-fi.lt@localhost>
Date: Fri, 19 Apr 2024 16:52:19 +0300
Subject: [PATCH] bootstrap: Support Linux setups without groups(1), whoami(1)
---
bootstrap/bootstrap | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/bootstrap/bootstrap b/bootstrap/bootstrap
index 4d70d73334eb..eccb3379bec0 100755
--- a/bootstrap/bootstrap
+++ b/bootstrap/bootstrap
@@ -749,6 +749,13 @@ Linux)
need_awk=yes
need_sed=yes
fi
+ # Some distros, eg. OpenWRT provide no groups(1), whoami(1) by default:
+ if ! groups >/dev/null 2>&1; then
+ groupsprog="id -gn"
+ fi
+ if ! whoami >/dev/null 2>&1; then
+ whoamiprog="id -un"
+ fi
machine_arch=`uname -m`
# Override machine_arch where required.
case "$machine_arch" in
--
2.43.0
Home |
Main Index |
Thread Index |
Old Index