modulepackage
0.0.0-20190912215546-16a6be0f6392
Repository: https://github.com/rustylynch/go-rpmutils.git
Documentation: pkg.go.dev
# README
Go RPM Utils
go-rpmutils is a library written in go for parsing and extracting content from RPMs.
Overview
go-rpmutils provides a few interfaces for handling RPM packages. There is a highlevel Rpm
struct that provides access to the RPM header and CPIO payload. The CPIO payload can be extracted to a filesystem location via the ExpandPayload
function or through a Reader interface, similar to the tar implementation in the go standard library.
Example
func main() {
f, err := os.Open("foo.rpm")
if err != nil {
panic(err)
}
// Parse the rpm
rpm := rpmutils.ReadRpm(f)
// Get the name, epoch, version, release, and arch
nevra, err := rpm.Header.GetNEVRA()
if err != nil {
panic(err)
}
fmt.Printf("%s\n", nevra)
// Reading the provides header
provides, err := rpm.Header.GetStrings(rpmutils.PROVIDENAME)
if err != nil {
panic(err)
}
fmt.Printf("Provides:\n")
for _, p := range provides {
fmt.Printf("%s", p)
}
}
Contributing
- Read contributor agreement
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -a
). Make sure to include a Signed-off-by line per the contributor agreement. - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
License
go-rpmutils is released under the Apache 2.0 license. See LICENSE.
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SignRpmFileIntoStream signs the rpmfile represented by infile with the provided private key and sig options.
Read an RPM and sign it, returning the set of headers updated with the new signature.
No description provided by the author
No description provided by the author
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BLINK*, FLINK*, and TRIGGERPREIN included from SUSE fork of RPM.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
AKA FILEMD5S.
bitmask: RPMFILE_* are bitmasks to interpret.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
bitmask: RPMVERIFY_* are bitmasks to interpret.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
HAVAL-5-160.
MD2.
MD5.
RIPEMD160.
SHA1.
SHA224.
SHA256.
SHA384.
SHA512.
TIGER192.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FILEFLAGS bitmask elements:.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
TRIGGERFLAGS bitmask elements -- not all rpmsenseFlags make sense in TRIGGERFLAGS.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Header region tags.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
FILEVERIFYFLAGS bitmask elements:.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DSA signature over header only.
(same as SIG_PGP).
uncompressed payload bytes (uint64).
header + compressed payload (uint64).
MD5SUM of header + payload.
uncompressed payload bytes (uint32).
Signature over header + payload.
blank space that can be replaced by a signature.
RSA signature over header only.
SHA1 over header only (hex).
Header + Payload size.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
bitmask: RPMSENSE_* are bitmasks to interpret.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Type aliases
No description provided by the author
VersionSlice provides the Sort interface for sorting version strings.