FreeBSD Bugzilla – Attachment 212035 Details for
Bug 229347
sysutils/bsdstats: Device reporting broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
bsdstats -- patch + maintainership transfer
bsdstats.diff (text/plain), 3.78 KB, created by
Lorenzo Salvadore
on 2020-02-28 22:29:21 UTC
(
hide
)
Description:
bsdstats -- patch + maintainership transfer
Filename:
MIME Type:
Creator:
Lorenzo Salvadore
Created:
2020-02-28 22:29:21 UTC
Size:
3.78 KB
patch
obsolete
>Index: sysutils/bsdstats/Makefile >=================================================================== >--- sysutils/bsdstats/Makefile (revision 527063) >+++ sysutils/bsdstats/Makefile (working copy) >@@ -2,12 +2,12 @@ > # $FreeBSD$ > > PORTNAME= bsdstats >-PORTVERSION= 6.0 >-PORTREVISION= 2 >+PORTVERSION= 6.2 >+PORTREVISION= 1 > CATEGORIES= sysutils > DISTFILES= > >-MAINTAINER= yuri@FreeBSD.org >+MAINTAINER= salvadore@FreeBSD.org > COMMENT= Monthly script for reporting anonymous statistics about your machine > > LICENSE= BSD4CLAUSE >Index: sysutils/bsdstats/files/300.statistics.in >=================================================================== >--- sysutils/bsdstats/files/300.statistics.in (revision 527063) >+++ sysutils/bsdstats/files/300.statistics.in (working copy) >@@ -26,12 +26,6 @@ > MV=/bin/mv > RM=/bin/rm > case $(${UNAME}) in >- FreeBSD) >- UMASK=/usr/bin/umask >- OPENSSL=/usr/bin/openssl >- CHOWN=/usr/sbin/chown >- NC=/usr/bin/nc >- ;; > OpenBSD) > UMASK=/usr/bin/umask > OPENSSL=/usr/sbin/openssl >@@ -38,12 +32,6 @@ > CHOWN=/sbin/chown > NC=/usr/bin/nc > ;; >- DragonFly) >- UMASK=/usr/bin/umask >- OPENSSL=/usr/bin/openssl >- CHOWN=/usr/sbin/chown >- NC=/usr/local/bin/netcat >- ;; > NetBSD) > UMASK=umask > OPENSSL=/usr/bin/openssl >@@ -351,16 +339,24 @@ > > report_devices() { > case $(${UNAME}) in >- FreeBSD|DragonFly) >+ FreeBSD|DragonFly|MidnightBSD) > local query_string="" > local line >- for line in $(${PCICONF} -l); do >+ while read line >+ do > local DRIVER=$(echo "${line}" | ${AWK} -F\@ '{print $1}') >- local DEV=$(echo "${line}" | ${AWK} '{print $4}' | ${CUT} -c8-15) >+ if [ "0`echo "${line}" | awk '{print $5}' | awk -F= '{print $1}'`" = "0vendor" ]; then >+ local VENDOR=$(echo "${line}" | ${AWK} '{print $5}' | ${CUT} -c10-15) >+ local DEVICE=$(echo "${line}" | ${AWK} '{print $6}' | ${CUT} -c10-15) >+ local DEV=$(echo "${DEVICE}${VENDOR}") >+ else >+ local DEV=$(echo "${line}" | ${AWK} '{print $4}' | ${CUT} -c8-15) >+ fi > local CLASS=$(echo "${line}" | ${AWK} '{print $2}' | ${CUT} -c9-14) > query_string=$query_string`echo \&dev[]=${DRIVER}:${DEV}:${CLASS}` >- done >- >+ done << EOT >+$(${PCICONF} -l) >+EOT > echo_begin "Posting device statistics to ${checkin_server_description}" > do_http_request_check_status "GET" "/scripts/report_devices.php?token=${TOKEN}&key=${KEY}$query_string" \ > "" "" "system devices submission" >@@ -373,14 +369,30 @@ > esac > } > >+get_mports() { >+ for i in `/usr/libexec/mport.list | xargs` >+ do >+ pkg=$(echo "select pkg from packages where pkg || '-' || version = '$i'" | sqlite3 /var/db/mport/master.db) >+ echo -n "$i " >+ mport info $pkg | grep Origin | awk '{print $3}' >+ done >+} >+ > report_ports() { > case $(${UNAME}) in >- FreeBSD|DragonFly) >+ FreeBSD|DragonFly|MidnightBSD) > local query_string="" > # Detect pkgng > if [ -e /var/db/pkg/local.sqlite ]; then > # Use pkgng >- query_string="${query_string}$(pkg info -o "*" | ${SED} -E -e 's/\+/%2b/g' -e 's/,/%2c/g' -e 's/^([^ ]+) +([^\/]+)\/.+$/\&port[]=\2:\1/g' | tr -d '\n')" >+ case $(${UNAME}) in >+ MidnightBSD) >+ query_string="${query_string}$( get_mports | ${SED} -E -e 's/\+/%2b/g' -e 's/,/%2c/g' -e 's/^([^ ]+) +([^\/]+)\/.+$/\&port[]=\2:\1/g' | tr -d '\n')" >+ ;; >+ *) >+ query_string="${query_string}$( pkg info -o "*" | ${SED} -E -e 's/\+/%2b/g' -e 's/,/%2c/g' -e 's/^([^ ]+) +([^\/]+)\/.+$/\&port[]=\2:\1/g' | tr -d '\n')" >+ ;; >+ esac > else > #-----BEGIN LEGACY: to delete when FreeBSD with pkg_ tools is out of support period (!!! don't forget to clarify what does DragonFly use before removing !!!) ----- > # Use obsolete pkg_* tools
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
Flags:
salvadore
:
maintainer-approval?
(
yuri
)
Actions:
View
|
Diff
Attachments on
bug 229347
:
206262
|
207059
|
210761
|
210806
|
211228
| 212035