The swidGenerator Tool » History » Version 5
« Previous -
Version 5/17
(diff) -
Next » -
Current version
Andreas Steffen, 10.04.2014 15:26
The swidGenerator Tool¶
- Table of contents
- The swidGenerator Tool
swidGenerator is an open source python-based tool written by the HSR students Danilo Bargen, Christian Fässler and Jonas Furrer which is able to generate ISO/IEC 1977-2-2014 Software Identification (SWID) tags for all installed software packages installed by the Linux dpkg and yum packet managers.
Installation¶
Download¶
Next download the latest swidGenerator tarball from https://github.com/tnc-ba/swidGenerator/archive/master.zip and unpack the archive with the command
unzip swidGenerator-master.zip
Required Packages under Debian or Ubuntu¶
Make sure that the python and python-setuptools are present on your system. Otherwise install them with
sudo apt-get install python python-setuptools
Required Packages under Fedora or RedHat Enterprise Linux¶
Installation¶
Change into the unpacked archive and execute the command
sudo python setup.py install
and the swid_generator function usually installed in /usr/local/bin becomes available.
Usage¶
Generate Software IDs¶
The command
swid_generator software-id
creates a list of Unique Software Identifications of the form
regid.2004-03.org.strongswan_debian_7.4-x86_64-acpi-support-base-0.140-5 regid.2004-03.org.strongswan_debian_7.4-x86_64-acpid-1:2.0.16-1+deb7u1 regid.2004-03.org.strongswan_debian_7.4-x86_64-adduser-3.113+nmu3 regid.2004-03.org.strongswan_debian_7.4-x86_64-apache2-2.2.22-13+deb7u1 ... regid.2004-03.org.strongswan_debian_7.4-x86_64-xz-utils-5.1.1alpha+20120614-2 regid.2004-03.org.strongswan_debian_7.4-x86_64-zlib1g-1:1.2.7.dfsg-13 regid.2004-03.org.strongswan_debian_7.4-x86_64-zlib1g-dev-1:1.2.7.dfsg-13
By default the regid.2004-03.org.strongswan regid is used as the tagcreator.
With the --regid <tagcreator> option an arbitrary regid can be configured
swid_generator software-id --regid regid.1999-03.org.debian
which generates the list
regid.1999-03.org.debian_debian_7.4-x86_64-acpi-support-base-0.140-5 regid.1999-03.org.debian_debian_7.4-x86_64-acpid-1:2.0.16-1+deb7u1 ... regid.1999-03.org.debian_debian_7.4-x86_64-zlib1g-1:1.2.7.dfsg-13 regid.1999-03.org.debian_debian_7.4-x86_64-zlib1g-dev-1:1.2.7.dfsg-13
The --doc-separator option allows to define a single character or a character string separating the individual Software IDs.
- --doc-separator '@'
regid.2004-03.org.strongswan_debian_7.4-x86_64-acpi-support-base-0.140-5@regid.2004-03.org.strongswan_debian_7.4-x86_64-acpid-1:2.0.16-1+deb7u1@...
- --doc-separator '::'
regid.2004-03.org.strongswan_debian_7.4-x86_64-acpi-support-base-0.140-5::regid.2004-03.org.strongswan_debian_7.4-x86_64-acpid-1:2.0.16-1+deb7u1::...
- --doc-separator $'\n'
regid.2004-03.org.strongswan_debian_7.4-x86_64-acpi-support-base-0.140-5 regid.2004-03.org.strongswan_debian_7.4-x86_64-acpid-1:2.0.16-1+deb7u1 ...
- --doc-separator $'\n\n' (which is currently the default)
regid.2004-03.org.strongswan_debian_7.4-x86_64-acpi-support-base-0.140-5 regid.2004-03.org.strongswan_debian_7.4-x86_64-acpid-1:2.0.16-1+deb7u1 ...
h3 Generate SWID Tags