aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/byobu
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2018-06-17 06:51:22 +0800
committerSteve Wills <swills@FreeBSD.org>2018-06-17 06:51:22 +0800
commit22d6bb1a6ae942e9a9064d6e94acbfa5322f2750 (patch)
tree506cdbcea8735df83e065599eec6aab629b96f15 /sysutils/byobu
parent2daed136237e90e1c0383df58e53df53e6ebbbf0 (diff)
downloadfreebsd-ports-gnome-22d6bb1a6ae942e9a9064d6e94acbfa5322f2750.tar.gz
freebsd-ports-gnome-22d6bb1a6ae942e9a9064d6e94acbfa5322f2750.tar.zst
freebsd-ports-gnome-22d6bb1a6ae942e9a9064d6e94acbfa5322f2750.zip
sysutils/byobu: add patches to use linprocfs
PR: 202367 Submitted by: Justin Coffman <coffmanjk@gmail.com> Approved by: maintainer timeout (amutu@amutu.com, >10 months)
Diffstat (limited to 'sysutils/byobu')
-rw-r--r--sysutils/byobu/Makefile1
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_battery29
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_cpu__count17
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_cpu__freq30
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_cpu__temp20
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_disk25
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_ec2__cost22
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_entropy18
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_fan__speed14
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_ip__address11
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_load__average18
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_memory20
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_network11
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_processes13
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_raid20
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_rcs__cost22
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_reboot__required11
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_swap20
-rw-r--r--sysutils/byobu/files/patch-usr_lib_byobu_uptime13
-rw-r--r--sysutils/byobu/pkg-message14
20 files changed, 349 insertions, 0 deletions
diff --git a/sysutils/byobu/Makefile b/sysutils/byobu/Makefile
index c60b1955a742..1461627c4e51 100644
--- a/sysutils/byobu/Makefile
+++ b/sysutils/byobu/Makefile
@@ -3,6 +3,7 @@
PORTNAME= byobu
PORTVERSION= 5.119
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://launchpad.net/${PORTNAME}/trunk/${PORTVERSION}/+download/
DISTNAME= ${PORTNAME}_${PORTVERSION}.orig
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_battery b/sysutils/byobu/files/patch-usr_lib_byobu_battery
new file mode 100644
index 000000000000..f19a842823ff
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_battery
@@ -0,0 +1,29 @@
+--- usr/lib/byobu/battery.orig 2016-09-15 19:22:48 UTC
++++ usr/lib/byobu/battery
+@@ -22,7 +22,7 @@
+
+ __battery_detail() {
+ local bat
+- for bat in /proc/acpi/battery/*; do
++ for bat in /compat/linux/proc/acpi/battery/*; do
+ cat "$bat/info"
+ cat "$bat/state"
+ done
+@@ -33,7 +33,7 @@ __battery() {
+ local bat line present sign state percent full rem color bcolor
+ # Linux support
+ present=""; full="0"; rem="0"; state=""
+- for bat in $BATTERY /sys/class/power_supply/* /proc/acpi/battery/*; do
++ for bat in $BATTERY /sys/class/power_supply/* /compat/linux/proc/acpi/battery/*; do
+ case "$bat" in
+ /sys/*)
+ if [ -r "$bat/uevent" ]; then
+@@ -51,7 +51,7 @@ __battery() {
+ [ "$POWER_SUPPLY_STATUS" != "Unknown" ] && state="$POWER_SUPPLY_STATUS"
+ fi
+ ;;
+- /proc/*)
++ /compat/linux/proc/*)
+ [ -f "$bat/info" ] || continue
+ while read line; do
+ set -- ${line}
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_cpu__count b/sysutils/byobu/files/patch-usr_lib_byobu_cpu__count
new file mode 100644
index 000000000000..dd6972f1801b
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_cpu__count
@@ -0,0 +1,17 @@
+--- usr/lib/byobu/cpu_count.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/cpu_count
+@@ -20,12 +20,12 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ __cpu_count_detail() {
+- grep -i "^model name" /proc/cpuinfo
++ grep -i "^model name" /compat/linux/proc/cpuinfo
+ }
+
+ __cpu_count() {
+ local c
+- c=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /proc/cpuinfo)
++ c=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /compat/linux/proc/cpuinfo)
+ [ "$c" = "1" ] || printf "%sx" "$c"
+ }
+
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_cpu__freq b/sysutils/byobu/files/patch-usr_lib_byobu_cpu__freq
new file mode 100644
index 000000000000..b8e86c82c648
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_cpu__freq
@@ -0,0 +1,30 @@
+--- usr/lib/byobu/cpu_freq.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/cpu_freq
+@@ -20,7 +20,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ __cpu_freq_detail() {
+- cat /proc/cpuinfo
++ cat /compat/linux/proc/cpuinfo
+ }
+
+ __cpu_freq() {
+@@ -29,13 +29,13 @@ __cpu_freq() {
+ read hz < /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
+ fpdiv $hz "1000000" 1 # 1Ghz
+ freq="$_RET"
+- elif [ -r "/proc/cpuinfo" ]; then
+- if egrep -q -s -i -m 1 "^cpu MHz|^clock" /proc/cpuinfo; then
+- freq=$(egrep -i -m 1 "^cpu MHz|^clock" /proc/cpuinfo | awk -F"[:.]" '{ printf "%01.1f", $2 / 1000 }')
++ elif [ -r "/compat/linux/proc/cpuinfo" ]; then
++ if egrep -q -s -i -m 1 "^cpu MHz|^clock" /compat/linux/proc/cpuinfo; then
++ freq=$(egrep -i -m 1 "^cpu MHz|^clock" /compat/linux/proc/cpuinfo | awk -F"[:.]" '{ printf "%01.1f", $2 / 1000 }')
+ else
+ # Must scale frequency by number of processors, if counting bogomips
+- count=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /proc/cpuinfo)
+- freq=$(egrep -i -m 1 "^bogomips" /proc/cpuinfo | awk -F"[:.]" '{ print $2 }')
++ count=$(getconf _NPROCESSORS_ONLN 2>/dev/null || grep -ci "^processor" /compat/linux/proc/cpuinfo)
++ freq=$(egrep -i -m 1 "^bogomips" /compat/linux/proc/cpuinfo | awk -F"[:.]" '{ print $2 }')
+ freq=$(printf "%s %s" "$freq" "$count" | awk '{printf "%01.1f\n", $1/$2/1000}')
+ fi
+ elif hz=$(sysctl -n hw.cpufrequency 2>/dev/null); then
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_cpu__temp b/sysutils/byobu/files/patch-usr_lib_byobu_cpu__temp
new file mode 100644
index 000000000000..0f049c0b777a
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_cpu__temp
@@ -0,0 +1,20 @@
+--- usr/lib/byobu/cpu_temp.orig 2016-07-29 16:53:37 UTC
++++ usr/lib/byobu/cpu_temp
+@@ -21,7 +21,7 @@
+
+ __cpu_temp_detail() {
+ local i
+- for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /proc/acpi/ibm/thermal /proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
++ for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /compat/linux/proc/acpi/ibm/thermal /compat/linux/proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
+ [ -r "$i" ] || continue
+ printf "%s\n" "$i:"
+ cat "$i"/*
+@@ -30,7 +30,7 @@ __cpu_temp_detail() {
+
+ __cpu_temp() {
+ local i t unit
+- for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /proc/acpi/ibm/thermal /proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
++ for i in $MONITORED_TEMP /sys/class/hwmon/hwmon*/device/temp*_input /sys/class/hwmon/hwmon*/temp*_input /compat/linux/proc/acpi/ibm/thermal /compat/linux/proc/acpi/thermal_zone/*/temperature /sys/class/thermal/thermal_zone*/temp; do
+ case "$i" in
+ *temp*_input|*thermal_zone*/temp)
+ [ -s "$i" ] && read t < "$i" && t=$(($t/1000))
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_disk b/sysutils/byobu/files/patch-usr_lib_byobu_disk
new file mode 100644
index 000000000000..5198a1d25cc6
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_disk
@@ -0,0 +1,25 @@
+--- usr/lib/byobu/disk.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/disk
+@@ -20,7 +20,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ __disk_detail() {
+- df -h -P
++ df -h
+ }
+
+ __disk() {
+@@ -28,11 +28,11 @@ __disk() {
+ # Default to /, but let users override
+ [ -z "$MONITORED_DISK" ] && MP="/" || MP="$MONITORED_DISK"
+ case $MP in
+- /dev/*) MP=$(awk '$1 == m { print $2; exit(0); }' "m=$MP" /proc/mounts);;
++ /dev/*) MP=$(awk '$1 == m { print $2; exit(0); }' "m=$MP" /compat/linux/proc/mounts);;
+ esac
+ # this could be done faster with 'stat --file-system --format'
+ # but then we'd have to do blocks -> human units ourselves
+- out=$({ df -h -P "$MP" 2>/dev/null || df -h "$MP"; } | awk 'END { printf("%s %s", $2, $5); }')
++ out=$({ df -h "$MP" 2>/dev/null || df -h "$MP"; } | awk 'END { printf("%s %s", $2, $5); }')
+ set -- ${out}
+ size=${1}; pct=${2};
+ unit=${size#${size%?}} # get the unit (last char)
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_ec2__cost b/sysutils/byobu/files/patch-usr_lib_byobu_ec2__cost
new file mode 100644
index 000000000000..a2a5eb73bba5
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_ec2__cost
@@ -0,0 +1,22 @@
+--- usr/lib/byobu/ec2_cost.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/ec2_cost
+@@ -56,8 +56,8 @@ __ec2_cost() {
+ file_to_stat="/etc/hostname"
+ hours=$(((`date +%s` - `stat --printf %Y $file_to_stat`) / 60 / 60 + 1))
+ # Auto detect network interface
+- [ -r "/proc/net/route" ] || return
+- interface=$(tail -n1 /proc/net/route | awk '{print $1}')
++ [ -r "/compat/linux/proc/net/route" ] || return
++ interface=$(tail -n1 /compat/linux/proc/net/route | awk '{print $1}')
+ local iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed
+ while read iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed; do
+ case "$iface" in
+@@ -78,7 +78,7 @@ __ec2_cost() {
+ rx_gb=${rbytes}
+ break
+ fi
+- done < /proc/net/dev
++ done < /compat/linux/proc/net/dev
+ tx_gb=$(printf "%s" ${tx_gb} | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }')
+ rx_gb=$(printf "%s" ${rx_gb} | awk '{ printf "%f", $1 / 1024 / 1024 / 1024 }')
+ network_cost=`printf "%s %s %s %s" "$tx_gb" "$TX_RATE" "$rx_gb" "$RX_RATE" | awk '{printf "%f %f", $1*$2, $3*$4}' | awk '{printf "%f", $1 + $2}'`
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_entropy b/sysutils/byobu/files/patch-usr_lib_byobu_entropy
new file mode 100644
index 000000000000..db6718f9e71d
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_entropy
@@ -0,0 +1,18 @@
+--- usr/lib/byobu/entropy.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/entropy
+@@ -19,12 +19,12 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ __entropy_detail() {
+- cat /proc/sys/kernel/random/entropy_avail 2>/dev/null
++ cat /compat/linux/proc/sys/kernel/random/entropy_avail 2>/dev/null
+ }
+
+ __entropy() {
+- if [ -r /proc/sys/kernel/random/entropy_avail ]; then
+- local e=$(cat /proc/sys/kernel/random/entropy_avail)
++ if [ -r /compat/linux/proc/sys/kernel/random/entropy_avail ]; then
++ local e=$(cat /compat/linux/proc/sys/kernel/random/entropy_avail)
+ [ -n "$e" ] || return
+ color K Y; printf "e%s" "$e"; color --
+ fi
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_fan__speed b/sysutils/byobu/files/patch-usr_lib_byobu_fan__speed
new file mode 100644
index 000000000000..ac98609ee5d2
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_fan__speed
@@ -0,0 +1,14 @@
+--- usr/lib/byobu/fan_speed.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/fan_speed
+@@ -38,9 +38,9 @@ __fan_speed() {
+ done
+
+ # But others (e.g. Dell Inspirons) seem to be here:
+- if [ -r /proc/i8k ]; then
++ if [ -r /compat/linux/proc/i8k ]; then
+ local line=""
+- read line < /proc/i8k
++ read line < /compat/linux/proc/i8k
+ set -- $line
+ for speed in $7 $8; do
+ if [ -n "$speed" ] && [ "$speed" -gt 0 ]; then
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_ip__address b/sysutils/byobu/files/patch-usr_lib_byobu_ip__address
new file mode 100644
index 000000000000..80dcb2c4eb45
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_ip__address
@@ -0,0 +1,11 @@
+--- usr/lib/byobu/ip_address.orig 2016-09-15 19:22:48 UTC
++++ usr/lib/byobu/ip_address
+@@ -34,7 +34,7 @@ __ip_address() {
+ interface="$MONITORED_NETWORK"
+ else
+ case "$IPV6" in
+- 1|true|yes) interface=$(awk '$10 != "lo" { iface=$10 ; }; END { print iface; }' /proc/net/ipv6_route);;
++ 1|true|yes) interface=$(awk '$10 != "lo" { iface=$10 ; }; END { print iface; }' /compat/linux/proc/net/ipv6_route);;
+ *) get_network_interface; interface="$_RET";;
+ esac
+ fi
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_load__average b/sysutils/byobu/files/patch-usr_lib_byobu_load__average
new file mode 100644
index 000000000000..c66d5d03899c
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_load__average
@@ -0,0 +1,18 @@
+--- usr/lib/byobu/load_average.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/load_average
+@@ -20,12 +20,12 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ __load_average_detail() {
+- cat /proc/loadavg
++ cat /compat/linux/proc/loadavg
+ }
+
+ __load_average() {
+- if [ -r "/proc/loadavg" ]; then
+- read one five fifteen other < /proc/loadavg
++ if [ -r "/compat/linux/proc/loadavg" ]; then
++ read one five fifteen other < /compat/linux/proc/loadavg
+ else
+ one=$(uptime | sed -e "s/.*://" | awk '{print $1}')
+ fi
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_memory b/sysutils/byobu/files/patch-usr_lib_byobu_memory
new file mode 100644
index 000000000000..fe9842918cf0
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_memory
@@ -0,0 +1,20 @@
+--- usr/lib/byobu/memory.orig 2016-09-15 19:22:48 UTC
++++ usr/lib/byobu/memory
+@@ -26,7 +26,7 @@ __memory_detail() {
+ __memory() {
+ local free="" total="" buffers="" cached=""
+ local kb_main_used=0 buffers_plus_cached=0 fo_buffers=0 fo_cached=0
+- if [ -r /proc/meminfo ]; then
++ if [ -r /compat/linux/proc/meminfo ]; then
+ while read tok val unit; do
+ case "$tok" in
+ MemTotal:) total=${val};;
+@@ -35,7 +35,7 @@ __memory() {
+ Cached:) cached=${val};;
+ esac
+ [ -n "${free}" -a -n "${total}" -a -n "${buffers}" -a -n "${cached}" ] && break;
+- done < /proc/meminfo
++ done < /compat/linux/proc/meminfo
+ elif eval $BYOBU_TEST vm_stat >/dev/null 2>&1; then
+ # MacOS support
+ # calculation borrowed from http://apple.stackexchange.com/a/48195/18857
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_network b/sysutils/byobu/files/patch-usr_lib_byobu_network
new file mode 100644
index 000000000000..154a3c112eb2
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_network
@@ -0,0 +1,11 @@
+--- usr/lib/byobu/network.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/network
+@@ -41,7 +41,7 @@ __network() {
+ cache="$BYOBU_RUN_DIR/cache.$BYOBU_BACKEND/network.$i"
+ [ -r "$cache" ] && read x1 < "$cache" || tx1=0
+ local iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed
+- cat /proc/net/dev > "$cache".dev
++ cat /compat/linux/proc/net/dev > "$cache".dev
+ while read iface rbytes rpackets rerrs rdrop rfifo rframe rcompressed rmulticast tbytes tpackets terrs tdrop tfifo tcolls tcarrier tcompressed; do
+ case "$iface" in
+ ${interface}:)
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_processes b/sysutils/byobu/files/patch-usr_lib_byobu_processes
new file mode 100644
index 000000000000..a69b8bc56118
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_processes
@@ -0,0 +1,13 @@
+--- usr/lib/byobu/processes.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/processes
+@@ -25,8 +25,8 @@ __processes_detail() {
+
+ __processes() {
+ local count=
+- if [ -r /proc ]; then
+- count=$(ls -d /proc/[0-9]* 2>/dev/null| wc -l)
++ if [ -r /compat/linux/proc ]; then
++ count=$(ls -d /compat/linux/proc/[0-9]* 2>/dev/null| wc -l)
+ else
+ count=$(ps -ef | wc -l | awk '{print $1}')
+ fi
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_raid b/sysutils/byobu/files/patch-usr_lib_byobu_raid
new file mode 100644
index 000000000000..cc2152e8d1e1
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_raid
@@ -0,0 +1,20 @@
+--- usr/lib/byobu/raid.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/raid
+@@ -20,7 +20,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ __raid_detail() {
+- [ -r /proc/mdstat ] && cat /proc/mdstat || true
++ [ -r /compat/linux/proc/mdstat ] && cat /compat/linux/proc/mdstat || true
+ }
+
+ __raid() {
+@@ -37,7 +37,7 @@ __raid() {
+ msg="$msg,$p"
+ ;;
+ esac
+- done < /proc/mdstat
++ done < /compat/linux/proc/mdstat
+ if [ -n "$msg" ]; then
+ color B w r; printf "%s" "$msg"; color --
+ elif [ -e "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/raid" ]; then
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_rcs__cost b/sysutils/byobu/files/patch-usr_lib_byobu_rcs__cost
new file mode 100644
index 000000000000..76cd552f404e
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_rcs__cost
@@ -0,0 +1,22 @@
+--- usr/lib/byobu/rcs_cost.orig 2016-01-14 12:15:11 UTC
++++ usr/lib/byobu/rcs_cost
+@@ -40,7 +40,7 @@ __rcs_cost() {
+ # 15872MB $0.960/h
+
+ # Instance memory
+- memory=`grep "^MemTotal:" /proc/meminfo | awk '{print $2}'`
++ memory=`grep "^MemTotal:" /compat/linux/proc/meminfo | awk '{print $2}'`
+
+ # Round memory down to the nearest multiple of 64MB
+ memory=$((${memory} - (${memory} % (64 * 1024))))
+@@ -59,8 +59,8 @@ __rcs_cost() {
+ TX_RATE="0.22"
+
+ # Auto detect network interface
+- [ -r "/proc/net/route" ] || return
+- IF=$(tail -n1 /proc/net/route | awk '{print $1}')
++ [ -r "/compat/linux/proc/net/route" ] || return
++ IF=$(tail -n1 /compat/linux/proc/net/route | awk '{print $1}')
+
+ ifconfig_out=`LC_ALL=C /sbin/ifconfig "$IF"`
+
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_reboot__required b/sysutils/byobu/files/patch-usr_lib_byobu_reboot__required
new file mode 100644
index 000000000000..fef76da1469d
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_reboot__required
@@ -0,0 +1,11 @@
+--- usr/lib/byobu/reboot_required.orig 2016-06-13 11:26:23 UTC
++++ usr/lib/byobu/reboot_required
+@@ -46,7 +46,7 @@ __reboot_required() {
+ break
+ ;;
+ esac
+- done < /proc/modules
++ done < /compat/linux/proc/modules
+ if [ -e "$REBOOT_FLAG" ]; then
+ if [ "$livepatched" = "1" ]; then
+ color k G; printf "$ICON_REBOOT"; color --;
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_swap b/sysutils/byobu/files/patch-usr_lib_byobu_swap
new file mode 100644
index 000000000000..5642e18e226b
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_swap
@@ -0,0 +1,20 @@
+--- usr/lib/byobu/swap.orig 2016-04-07 22:05:52 UTC
++++ usr/lib/byobu/swap
+@@ -20,7 +20,7 @@
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ __swap_detail() {
+- cat /proc/meminfo
++ cat /compat/linux/proc/meminfo
+ }
+
+ __swap() {
+@@ -34,7 +34,7 @@ __swap() {
+ continue
+ fi
+ [ -n "$stotal" -a -n "$sfree" ] && break;
+- done < /proc/meminfo
++ done < /compat/linux/proc/meminfo
+ if [ "${stotal:-0}" = "0" ]; then
+ printf ""
+ rm -f "$BYOBU_RUN_DIR/status.$BYOBU_BACKEND/swap"
diff --git a/sysutils/byobu/files/patch-usr_lib_byobu_uptime b/sysutils/byobu/files/patch-usr_lib_byobu_uptime
new file mode 100644
index 000000000000..518b31e2bb2d
--- /dev/null
+++ b/sysutils/byobu/files/patch-usr_lib_byobu_uptime
@@ -0,0 +1,13 @@
+--- usr/lib/byobu/uptime.orig 2016-05-31 14:48:13 UTC
++++ usr/lib/byobu/uptime
+@@ -27,8 +27,8 @@ __uptime_detail() {
+
+ __uptime() {
+ local u= idle= str=
+- if [ -r /proc/uptime ]; then
+- read u idle < /proc/uptime
++ if [ -r /compat/linux/proc/uptime ]; then
++ read u idle < /compat/linux/proc/uptime
+ u=${u%.*}
+ elif [ -x /usr/sbin/sysctl ]; then
+ # MacOS support
diff --git a/sysutils/byobu/pkg-message b/sysutils/byobu/pkg-message
new file mode 100644
index 000000000000..b63f67574096
--- /dev/null
+++ b/sysutils/byobu/pkg-message
@@ -0,0 +1,14 @@
+======================================================================
+
+byobu requires linprocfs(5) mounted on /compat/linux/proc
+
+If you have not done it yet, please do the following:
+
+ mkdir -p /compat/linux/proc
+ mount -t linprocfs linproc /compat/linux/proc
+
+To make it permanent, you need the following line in /etc/fstab:
+
+ linproc /compat/linux/proc linprocfs rw,late 0 0
+
+======================================================================