Giter Site home page Giter Site logo

swid-autotools's Introduction

SWID for GNU Autotools

This project provides support for construction of SWID tags using the GNU Autoconf and Automake build chain.

Usage

The general upgrade this project provides is the generation of SWID Corpus tags as part of the autotools build chain, augmenting dist targets. New targets are available, mirroring the the types of distributions:

  • dist-bzip2-swidtag
  • dist-gzip-swidtag
  • dist-lzip-swidtag
  • dist-xz-swidtag
  • dist-zip-swidtag

Running one of these targets will produce a file named after the distribution file. E.g. running make dist-gzip-swidtag after ./configure will produce ${my_project}.${my_version}.tar.gz.swidtag.

This project was designed to be track-able as a Git submodule, so source files could be soft-linked into a project's source tree. Unit tests demonstrate this build-augmenting strategy.

Using this repository

The default invocation of make in this project provides a help menu, showing targets and their basic functionality:

Run 'make check' to run unit tests.
Run 'make check-swidval' to run swidval unit tests.  (Requires Java.  May require non-automated download.)
Run 'make check-incorporation' to run incorporation unit tests.  (Requires networking.)
Run 'make explain' to see differences needed to start SWID tag implementation.
Run 'make docs' to confirm generated documentation files are up to date.  ('make clean' or 'make clean-docs' will remove generated files.)

make explain in this directory will show the necessary differences to a project's /configure.ac and /Makefile.am. The differences are part of the unit test suite, which compare a sample application under tests/sample_nop against tests/sample_nop_corpus_tag/base. The minimal steps necessary are documented under that "base" directory's README.

Features provided by the autoconf macros are documented within the m4 definitions file, swid.m4. Tests of the various features are documented and demonstrated under the Corpus tag test directory. The READMEs of that directory's subdirectories document the relative differences needed to use the features.

An incorporation tutorial is available in TUTORIAL.md.

Testing

Unit tests have been written to guarantee the features implemented for SWID_SUBST function for project builds through a call to make distcheck. The tests are implemented as additions to a sample C application whose entire source tree is under tests/sample_nop.

To run unit tests (building tarballs for the sample application), run make check. The tests/deps/ directory includes scripts that install minimal package dependencies (make and a C compiler) for some manually tested operating systems. Tests are also run in Travis CI, though not in all of the environments denoted in the deps/ directory.

The unit tests generate SWID tags as part of their output. To validate the SWID tags' conformance, SWIDVal can be run as an optional component of the test suite. (SWIDVal requires Java.) To run these yourself, run make check-swidval. Success or failure will be reported by the Make call.

NOTE: There is currently an issue in the SWIDVal unit tests with retrieving SWIDVal itself. There is a manual workaround documented in the Corpus tag test directory. Until the issue is permanently remediated, unit tests for SWIDVal will operate in the run_swidval_in_ci branch, but may intermittently fail due to networking issues.

swid-autotools's People

Contributors

ajnelson-nist avatar

Watchers

 avatar  avatar  avatar

swid-autotools's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.