<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>48651</bug_id>
          
          <creation_ts>2023-12-01 14:07:00 +0300</creation_ts>
          <short_desc>lshw -json output invalid</short_desc>
          <delta_ts>2023-12-01 14:53:36 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>lshw</component>
          <version>unstable</version>
          <rep_platform>x86_64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>varsenev</reporter>
          <assigned_to name="Andrey Cherepanov">cas</assigned_to>
          <cc>amakeenk</cc>
    
    <cc>cas</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>238165</commentid>
    <comment_count>0</comment_count>
    <who name="">varsenev</who>
    <bug_when>2023-12-01 14:07:00 +0300</bug_when>
    <thetext>Добрый день!

В 10-й ветке altlinux некорректно отрабатывает команда lshw -json.
 
NAME=&quot;ALT SP Server&quot;
VERSION=&quot;10&quot;
ID=altlinux
VERSION_ID=10
PRETTY_NAME=&quot;ALT SP Server 11100-01&quot;
ANSI_COLOR=&quot;1;33&quot;
CPE_NAME=&quot;cpe:/o:alt:spserver:10&quot;
BUILD_ID=&quot;ALT SP Server 10&quot;
ALT_BRANCH_ID=&quot;c10f1&quot;
HOME_URL=&quot;https://basealt.ru/&quot;
BUG_REPORT_URL=&quot;mailto:support_altsp@ivk.ru&quot;
ALT SP Server 11100-01
ALT SP Server 11100-01

Формируется не валидный json файл, с которым невозможно работать.
 &quot;capabilities&quot; : {
    &quot;smbios-3.2.1&quot; : &quot;SMBIOS version 3.2.1&quot;,
    &quot;dmi-3.2.1&quot; : &quot;DMI version 3.2.1&quot;,
    &quot;smp&quot; : &quot;Symmetric Multi-Processing&quot;,
    &quot;vsyscall32&quot; : &quot;32-bit processes&quot;
  }    {
      &quot;id&quot; : &quot;core&quot;,
      &quot;class&quot; : &quot;bus&quot;,
      &quot;claimed&quot; : true,
      &quot;handle&quot; : &quot;DMI:0002&quot;,
      &quot;description&quot; : &quot;Motherboard&quot;,
      &quot;product&quot; : &quot;X2 Motherboard&quot;,
      &quot;vendor&quot; : &quot;YADRO&quot;,

Вот в этом месте &quot;}    {&quot; пропущены элементы.
Правильно должно быть так:
&quot;capabilities&quot; : {
    &quot;smbios-3.2.1&quot; : &quot;SMBIOS version 3.2.1&quot;,
    &quot;dmi-3.2.1&quot; : &quot;DMI version 3.2.1&quot;,
    &quot;smp&quot; : &quot;Symmetric Multi-Processing&quot;,
    &quot;vsyscall32&quot; : &quot;32-bit processes&quot;
  },
  &quot;children&quot; : [
     {
      &quot;id&quot; : &quot;core&quot;,
      &quot;class&quot; : &quot;bus&quot;,
      &quot;claimed&quot; : true,
      &quot;handle&quot; : &quot;DMI:0002&quot;,
      &quot;description&quot; : &quot;Motherboard&quot;,
      &quot;product&quot; : &quot;X2 Motherboard&quot;,
      &quot;vendor&quot; : &quot;YADRO&quot;,

И это не единственная ошибка. По всему файлу вывода отсутствуют ключи children и элементы списков.

Ошибка один в один, как описана на баг трекере Ubuntu
https://bugs.launchpad.net/ubuntu/+source/lshw/+bug/1843063</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>238172</commentid>
    <comment_count>1</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2023-12-01 14:53:36 +0300</bug_when>
    <thetext>Воспроизводится в сизифе:

# lshw -json &gt; /tmp/lshw &amp;&amp; cat /tmp/lshw | jq
jq: parse error: Expected separator between values at line 21, column 8</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>