Skip to content

Commit

Permalink
Add --scm option for %autosetup SCM selection
Browse files Browse the repository at this point in the history
Allow selecting %autosetup SCM backend from cli in case it's not
hardwired in the spec, handy for eg rediffing patches.
  • Loading branch information
ascherer authored and pmatilai committed Nov 5, 2018
1 parent 2c2cacc commit 3d8a29a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/rpmbuild.8
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ will be run after a chroot(2) to
.TP
\fB-D, --define='\fIMACRO EXPR\fB'\fR
Defines \fIMACRO\fR with value \fIEXPR\fR.
.TP
\fB--scm=\fISCM\fR
Select the \fISCM\fR to use with %autosetup, if one is not set in the spec file.
Note that not all values for \fISCM\fR, e.g., \fBpatch\fR (the default) and
\fBgendiff\fR, \fBgit\fR, or \fBquilt\fR work interchangeably with all
other patches and options stated in the %autosetup line, especially
option \fB-p\fIN\fR.
.SS "BUILD OPTIONS"
.PP
The general form of an rpm build command is
Expand Down
3 changes: 3 additions & 0 deletions rpmpopt.in
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ rpmbuild alias --with --define "_with_!#:+ --with-!#:+" \
rpmbuild alias --without --define "_without_!#:+ --without-!#:+" \
--POPTdesc=$"disable configure <option> for build" \
--POPTargs=$"<option>"
rpmbuild alias --scm --define '__scm !#:+' \
--POPTdesc=$"shortcut for '--define=\"__scm <scm>\"'" \
--POPTargs=$"<scm>"
# Build policies enabled from command line. Last policy applies.
rpmbuild alias --buildpolicy --define '__os_install_post %{_rpmconfigdir}/brp-!#:+' \
--POPTdesc=$"set buildroot <policy> (e.g. compress man pages)" \
Expand Down

0 comments on commit 3d8a29a

Please sign in to comment.