Skip to content

Commit

Permalink
Add notion of major/minor version to RHEL profiles
Browse files Browse the repository at this point in the history
* profiles/rh-release (spec_file.rpm_dist): Define to
"el{major}_{minor}".
* profiles/rh-testing (spec_file.rpm_dist): Likewise.
* templates/config: Add configuration options for major/minor.
* bin/ddiskit (parse_cli): Add options for setting major/minor in
prepare_sources command.
* ddiskit.1 (.SS Options for prepare_sources action): Document -M and -m
options.

References: #2
References: #8
Signed-off-by: Eugene Syromiatnikov <[email protected]>
  • Loading branch information
esyr-rh authored and orosp committed Jan 15, 2019
1 parent 33e69c6 commit c6affc3
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/ddiskit
Original file line number Diff line number Diff line change
Expand Up @@ -2045,6 +2045,10 @@ def parse_cli():
"directories in the git " +
"repository that contains " +
"module source files")
parser_prepare_sources.add_argument("-M", "--major",
help="Major distribution version")
parser_prepare_sources.add_argument("-m", "--minor",
help="Minor distribution version")
parser_prepare_sources.set_defaults(func=cmd_prepare_sources)

# parser for the "generate_spec" command
Expand Down
18 changes: 18 additions & 0 deletions ddiskit.1
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,24 @@ Configuration option name:
.I defaults.git_src_directory
.br
Default value: none
.TP
\fB-M\fR \fIMAJOR\fR, \fB--major\fR \fIMAJOR\fR
Major version number of the distribution the package is built for
(for example, "\fB7\fR" for RHEL 7.3).
.IP
Configuration option name:
.I defaults.major
.br
Default value: 7
.TP
\fB-m\fR \fIMINOR\fR, \fB--minor\fR \fIMINOR\fR
Minor version number of the distribution the package is built for
(for example, "\fB3\fR" for RHEL 7.3).
.IP
Configuration option name:
.I defaults.minor
.br
Default value: 0
.\"
.SS Options for generate_spec action
.TP
Expand Down
3 changes: 3 additions & 0 deletions ddiskit.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[defaults]
profile = default

major = 7
minor = 0

[rpm_gpg_check]
## Some initial assumption about the keyring dir
keyring_dir = {defaults.res_dir}/keyrings/{defaults.profile}
Expand Down
3 changes: 3 additions & 0 deletions profiles/rh-release
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
## to allow check to work.
check_git_src = 2

[spec_file]
rpm_dist = el{defaults.major}_{defaults.minor}

[rpm_gpg_check]
## It should be a strict check for release ISOs
check_level = 3
Expand Down
1 change: 1 addition & 0 deletions profiles/rh-testing
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
check_git_src = 2

[spec_file]
rpm_dist = el{defaults.major}_{defaults.minor}
description_suffix =
This RPM has been provided by Red Hat for testing purposes only and is
NOT supported for any other use. This RPM should NOT be deployed for
Expand Down
7 changes: 7 additions & 0 deletions templates/config
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
## Include SRPM files into the final ISO
include_srpm = %{global.include_srpm}

##
## Behavioural settings and generic/common definitions
##
[defaults]
major = %{defaults.major}
minor = %{defaults.minor}

##
## configuration values for the driver spec file
##
Expand Down

0 comments on commit c6affc3

Please sign in to comment.