codec-rpm: A library for manipulating RPM files

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

This module provides a library for reading RPM files and converting them into useful data structures. There is currently no way to operate in reverse - that is, for building an RPM file out of a data structure.


[Skip to Readme]

Properties

Versions 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 0.2.1, 0.2.1, 0.2.2
Change log ChangeLog.md
Dependencies attoparsec (>=0.12.1.4 && <0.14), attoparsec-binary (>=0.2 && <0.3), base (>=4.7 && <5.0), bytestring (>=0.10 && <0.11), conduit (>=1.2.8 && <1.4), conduit-extra (>=1.1.15 && <1.4), cpio-conduit (>=0.7.0 && <0.8.0), exceptions (>=0.8.3 && <0.11.0), lzma-conduit (>=1.1.3.3 && <1.3), mtl (>=2.2.1 && <2.3), parsec (>=3.1.11 && <3.2), pretty (>=1.1.2.0), resourcet (>=1.1.9 && <1.3), text (>=1.2.2.0 && <1.3) [details]
License LGPL-2.1-only
Author Chris Lumens
Maintainer clumens@redhat.com
Category Distribution
Home page https://github.com/weldr/codec-rpm
Source repo head: git clone https://github.com/weldr/codec-rpm
Uploaded by clumens at 2018-03-20T19:51:40Z

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for codec-rpm-0.2.1

[back to package description]

Build Status Coverage Status

Haskell library for working with RPM packages.

Preparing local development environment for Haskell

For development we use the latest upstream versions:

  1. Remove the standard haskell-platform and ghc-* RPMs if you have them installed
  2. Download version 8.0.2 of the generic Haskell Platform distribution from https://www.haskell.org/platform/linux.html#linux-generic
  3. Extract the archive and install Haskell
$ tar -xzvf haskell-platform-8.0.2-unknown-posix--minimal-x86_64.tar.gz 
$ sudo ./install-haskell-platform.sh
  1. Add /usr/local/bin to your PATH if not already there!

Building the project locally

cabal is used to install and manage Haskell dependencies from upstream.

$ cabal sandbox init
$ cabal install

Executing unit tests

$ cabal sandbox init
$ cabal install --dependencies-only --enable-tests
$ cabal test --show-details=always
Preprocessing library rpm-1...
Preprocessing test suite 'tests' for rpm-1...
Running 1 test suites...
Test suite tests: RUNNING...
Test suite tests: PASS
Test suite logged to: dist/test/rpm-1-tests.log
1 of 1 test suites (1 of 1 test cases) passed.

Produce code coverage report

$ cabal sandbox init
$ cabal install --enable-tests --enable-coverage
$ cabal test --show-details=always
$ firefox ./dist/hpc/vanilla/tix/*/hpc_index.html

Testing in Haskell

The recommended way to test this project is to use Hspec for annotating unit tests. For starters you can try adding cases which extend code coverage.

It is also recommended to use property based testing with QuickCheck (and Hspec) where it makes sense. Property based tools automatically generates hundreds/thousands of input variants and execute the function under test with them. This validates that specific conditions (aka properties of the function) are always met. This is useful with pure functions. For more information see: