Skip to content

Commit

Permalink
Merge pull request #30 from caarlos0/group
Browse files Browse the repository at this point in the history
feat: added group tag
  • Loading branch information
jarondl committed Oct 23, 2019
2 parents 0a19814 + 59acfd3 commit fdc007d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/tar2rpm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ var (
description = flag.String("description", "", "the rpm description")
vendor = flag.String("vendor", "", "the rpm vendor")
packager = flag.String("packager", "", "the rpm packager")
group = flag.String("group", "", "the rpm group")
url = flag.String("url", "", "the rpm url")
licence = flag.String("licence", "", "the rpm licence name")

Expand Down Expand Up @@ -112,6 +113,7 @@ func main() {
OS: *osName,
Vendor: *vendor,
Packager: *packager,
Group: *group,
URL: *url,
Licence: *licence,
Description: *description,
Expand Down
2 changes: 2 additions & 0 deletions rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ type RPMMetaData struct {
Vendor,
URL,
Packager,
Group,
Licence,
Compressor string
Provides,
Expand Down Expand Up @@ -251,6 +252,7 @@ func (r *RPM) writeGenIndexes(h *index) {
h.Add(tagVendor, entry(r.Vendor))
h.Add(tagLicence, entry(r.Licence))
h.Add(tagPackager, entry(r.Packager))
h.Add(tagGroup, entry(r.Group))
h.Add(tagURL, entry(r.URL))
h.Add(tagPayloadDigest, entry([]string{fmt.Sprintf("%x", sha256.Sum256(r.payload.Bytes()))}))
h.Add(tagPayloadDigestAlgo, entry([]int32{hashAlgoSHA256}))
Expand Down
1 change: 1 addition & 0 deletions tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const (
tagVendor = 0x03f3 // 1011
tagLicence = 0x03f6 // 1014
tagPackager = 0x03f7 // 1015
tagGroup = 0x03f8 // 1016
tagURL = 0x03fc // 1020
tagOS = 0x03fd // 1021
tagArch = 0x03fe // 1022
Expand Down

0 comments on commit fdc007d

Please sign in to comment.