Skip to content

Commit 2fc2eae

Browse files
Ophirr33Ty Coghlan
authored and
Ty Coghlan
committed
sbt#1178 attempt at adding in rpm epochs
1 parent 8038c04 commit 2fc2eae

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

integration-tests-ansible/test-project-play-rpm/packaging.sbt

+2
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ rpmRelease := "1"
2828
rpmVendor := "DemoVendor"
2929

3030
rpmLicense := Some("Apache-2.0")
31+
32+
rpmEpoch := 1

src/main/scala/com/typesafe/sbt/packager/rpm/RpmMetadata.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ case class RpmMetadata(name: String,
1818
summary: String,
1919
description: String,
2020
autoprov: String,
21-
autoreq: String)
21+
autoreq: String,
22+
epoch: Int)
2223

2324
/**
2425
* The Description used to generate an RPM
@@ -222,6 +223,7 @@ case class RpmSpec(meta: RpmMetadata,
222223
sb append ("Version: %s\n" format meta.version)
223224
sb append ("Release: %s\n" format meta.release)
224225
sb append ("Summary: %s\n" format meta.summary)
226+
sb append ("Epoch: %d\n" format meta.epoch)
225227
meta.prefix foreach { v =>
226228
sb append ("prefix: %s\n" format v)
227229
}

src/main/scala/com/typesafe/sbt/packager/rpm/RpmPlugin.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ object RpmPlugin extends AutoPlugin {
6969
rpmPrefix := None,
7070
rpmVendor := "", // TODO - Maybe pull in organization?
7171
rpmLicense := None,
72+
rpmEpoch := 0,
7273
rpmDistribution := None,
7374
rpmUrl := None,
7475
rpmGroup := None,
@@ -121,7 +122,8 @@ object RpmPlugin extends AutoPlugin {
121122
(packageSummary in Rpm).value,
122123
(packageDescription in Rpm).value,
123124
rpmAutoprov.value,
124-
rpmAutoreq.value
125+
rpmAutoreq.value,
126+
rmpEpoch.value
125127
),
126128
rpmDescription := RpmDescription(
127129
rpmLicense.value,

src/sphinx/formats/rpm.rst

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ Informational Settings
123123
``rpmLicense``
124124
The license associated with software in the RPM.
125125

126+
``rpmEpoch``
127+
The epoch is the most significant number used when resolving different versions
128+
for the same RPM. For a given package, packages with the highest epoch will be
129+
used, and in the event of a tie it will fall back to comparing the version and
130+
release.
131+
126132
Dependency Settings
127133
~~~~~~~~~~~~~~~~~~~
128134

0 commit comments

Comments
 (0)