FreeBSD Bugzilla – Attachment 232554 Details for
Bug 262649
ports-mgmt/poudriere-devel: Use a dynamic linuxbase from sysctl for linprocfs mounts [diff]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
dynamic linuxbase for linprocfs mounts in poudriere (patch file)
ports-mgmt_poudriere-devel_dynamic-linuxbase.diff (text/plain), 2.45 KB, created by
Sean Champ
on 2022-03-18 17:24:30 UTC
(
hide
)
Description:
dynamic linuxbase for linprocfs mounts in poudriere (patch file)
Filename:
MIME Type:
Creator:
Sean Champ
Created:
2022-03-18 17:24:30 UTC
Size:
2.45 KB
patch
obsolete
>diff --git a/ports-mgmt/poudriere-devel/files/patch-src_share_poudriere_common.sh b/ports-mgmt/poudriere-devel/files/patch-src_share_poudriere_common.sh >new file mode 100644 >index 000000000000..3a99d4362be9 >--- /dev/null >+++ b/ports-mgmt/poudriere-devel/files/patch-src_share_poudriere_common.sh >@@ -0,0 +1,76 @@ >+--- src/share/poudriere/common.sh.orig 2021-11-28 11:28:36.000000000 -0800 >++++ src/share/poudriere/common.sh 2022-03-14 20:22:35.568107000 -0700 >+@@ -300,6 +300,16 @@ post_getopts() { >+ fi >+ } >+ >++_sys_linuxbase() { >++ local default="/compat/linux" >++ local mib=compat.linux.emul_path >++ if [ -z "${NOLINUX-}" ]; then >++ sysctl -qn "${mib}" || echo "${default}" >++ else >++ echo "${default}" >++ fi >++} >++ >+ _mastermnt() { >+ local -; set -u >+ local hashed_name mnt mnttest mnamelen testpath mastername >+@@ -314,7 +324,7 @@ _mastermnt() { >+ _gsub_badchars "${mastername}" ":" mastername >+ mnt="${POUDRIERE_DATA}/.m/${mastername}/ref" >+ if [ -z "${NOLINUX-}" ]; then >+- testpath="/compat/linux/proc" >++ testpath="$(_sys_linuxbase)/proc" >+ else >+ testpath="/var/db/ports" >+ fi >+@@ -1753,6 +1763,7 @@ unlink() { >+ common_mtree() { >+ [ $# -eq 1 ] || eargs common_mtree mnt >+ local mnt="${1}" >++ local linuxbase=$(_sys_linuxbase) >+ local exclude nullpaths schgpaths dir >+ >+ cat <<-EOF >+@@ -1760,7 +1771,7 @@ common_mtree() { >+ ./${DATADIR_NAME} >+ ./.poudriere-snap-* >+ .${HOME}/.ccache >+- ./compat/linux/proc >++ ./${linuxbase}/proc >+ ./dev >+ ./distfiles >+ .${OVERLAYSDIR} >+@@ -1959,6 +1970,7 @@ do_jail_mounts() { >+ local mnt="$2" >+ local name="$3" >+ local devfspath="null zero random urandom stdin stdout stderr fd fd/* pts pts/*" >++ local linuxbase=$(_sys_linuxbase) >+ local srcpath nullpaths nullpath p arch >+ >+ # from==mnt is via jail -u >+@@ -1967,7 +1979,7 @@ do_jail_mounts() { >+ if [ ${mnt##*/} = "ref" ]; then >+ mkdir -p ${mnt}/proc \ >+ ${mnt}/dev \ >+- ${mnt}/compat/linux/proc \ >++ ${mnt}/${linuxbase}/proc \ >+ ${mnt}/usr/src >+ fi >+ >+@@ -2003,11 +2015,11 @@ do_jail_mounts() { >+ mount -t procfs proc "${mnt}/proc" >+ fi >+ >+- if [ -z "${NOLINUX-}" ] && [ -d "${mnt}/compat" ]; then >++ if [ -z "${NOLINUX-}" ] && [ -d "${mnt}/${linuxbase}" ]; then >+ _jget arch "${name}" arch || \ >+ err 1 "Missing arch metadata for jail" >+ if [ "${arch}" = "i386" -o "${arch}" = "amd64" ]; then >+- mount -t linprocfs linprocfs "${mnt}/compat/linux/proc" >++ mount -t linprocfs linprocfs "${mnt}/${linuxbase}/proc" >+ fi >+ fi >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 262649
: 232554