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

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

    <bug>
          <bug_id>46365</bug_id>
          
          <creation_ts>2023-06-02 12:00:19 +0300</creation_ts>
          <short_desc>Не работает swtpm_bios -v</short_desc>
          <delta_ts>2023-06-02 12:00:19 +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>swtpm-tools</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 name="Alexander Makeenkov">amakeenk</reporter>
          <assigned_to name="Alexey Shabalin">shaba</assigned_to>
          <cc>shaba</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>226923</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Makeenkov">amakeenk</who>
    <bug_when>2023-06-02 12:00:19 +0300</bug_when>
    <thetext>Версия пакета:
swtpm-tools-0.8.0-alt1

Шаги воспроизведения:
# apt-get install swtpm-tools
# swtpm_bios -v; echo &quot;exit code:$?&quot;

Ожидаемый результат:
Исходя из описания параметра в справке &quot;-v display version and exit&quot; должно написать версию и выйти с кодом выхода 0 (без ошибок).

Получаемый результат:
Выводится полная справка, код выхода 1:

# swtpm_bios -v; echo &quot;exit code:  $?&quot;
TPM emulator BIOS emulator version 0.8.0, Copyright (c) 2015 IBM Corp.

swtpm_bios [options]

Runs TPM_Startup (unless -n), then (unless -o) sets PP, enable, activate 
and finally (using -u) gives up physical presence (PP)

The following options are supported:
        --tpm-device &lt;device&gt;  use the given device; default is /dev/tpm0
        --tcp [&lt;host&gt;]:[&lt;prt&gt;] connect to TPM on given host and port;
                               default host is 127.0.0.1, default port is 6545
        --unix &lt;path&gt;          connect to TPM using UnixIO socket
        --tpm2                 initialize a TPM2
        -c                     startup clear (default)
        -s                     startup state
        -d                     startup deactivate (no effect on TPM2)
        -n                     no startup
        -o                     startup only
        -cs                    run TPM_ContinueSelfTest on TPM1.2
                               run TPM2_IncrementalSelfTest on TPM2
        -ea                    make sure that the TPM 1.2 is activated;
                               terminate with exit code 129 if the TPM
                               needs to be reset
        -u                     give up physical presence
                               on TPM 2 set the platform hierarchy to a
                               random password
        -v                     display version and exit
        -h                     display this help screen and exit
exit code: 1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>