From owner-freebsd-ports-bugs@freebsd.org Tue Jun 26 15:51:13 2018 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 83C89102BC7F for ; Tue, 26 Jun 2018 15:51:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 03ADF760FD for ; Tue, 26 Jun 2018 15:51:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id B3AB9102BC79; Tue, 26 Jun 2018 15:51:12 +0000 (UTC) Delivered-To: ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F359102BC78 for ; Tue, 26 Jun 2018 15:51:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2916E760FA for ; Tue, 26 Jun 2018 15:51:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 3818F201E5 for ; Tue, 26 Jun 2018 15:51:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w5QFpB35074185 for ; Tue, 26 Jun 2018 15:51:11 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w5QFpBMw074184 for ports-bugs@FreeBSD.org; Tue, 26 Jun 2018 15:51:11 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 229347] [sysutils/bsdstats] device reporting broken Date: Tue, 26 Jun 2018 15:51:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: scrappy@hub.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: yuri@freebsd.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jun 2018 15:51:13 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229347 Bug ID: 229347 Summary: [sysutils/bsdstats] device reporting broken Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: yuri@freebsd.org Reporter: scrappy@hub.org Assignee: yuri@freebsd.org Flags: maintainer-feedback?(yuri@freebsd.org) Incorrect usage of a for loop instead of while causes the query_string to be mis-generated, causing device reports to be unparseable on the server end .= .. following patch needs to be applied to fix ... =3D=3D=3D *** /tmp/300.statistics Mon Jun 25 04:17:01 2018 --- /usr/local/etc/periodic/monthly/300.statistics Mon Jun 25 04:28:00 2018 *************** *** 354,365 **** FreeBSD|DragonFly) local query_string=3D"" local line ! for line in $(${PCICONF} -l); do local DRIVER=3D$(echo "${line}" | ${AWK} -F\@ '{print $1}') local DEV=3D$(echo "${line}" | ${AWK} '{print $4}' | ${CUT} -c8-15) local CLASS=3D$(echo "${line}" | ${AWK} '{print $2}' | ${CUT} -c9-= 14) query_string=3D$query_string`echo \&dev[]=3D${DRIVER}:${DEV}:${CLA= SS}` ! done echo_begin "Posting device statistics to ${checkin_server_descriptio= n}" do_http_request_check_status "GET" "/scripts/report_devices.php?token=3D${TOKEN}&key=3D${KEY}$query_string" \ --- 354,368 ---- FreeBSD|DragonFly) local query_string=3D"" local line ! while read line ! do local DRIVER=3D$(echo "${line}" | ${AWK} -F\@ '{print $1}') local DEV=3D$(echo "${line}" | ${AWK} '{print $4}' | ${CUT} -c8-15) local CLASS=3D$(echo "${line}" | ${AWK} '{print $2}' | ${CUT} -c9-= 14) query_string=3D$query_string`echo \&dev[]=3D${DRIVER}:${DEV}:${CLA= SS}` ! done << EOT ! $(${PCICONF} -l) ! EOT echo_begin "Posting device statistics to ${checkin_server_descriptio= n}" do_http_request_check_status "GET" "/scripts/report_devices.php?token=3D${TOKEN}&key=3D${KEY}$query_string" \ =3D=3D=3D --=20 You are receiving this mail because: You are the assignee for the bug.=