Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
obs-build
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ariel D'Alessandro
obs-build
Commits
e669b7eb
Commit
e669b7eb
authored
6 years ago
by
Michael Schroeder
Browse files
Options
Downloads
Patches
Plain Diff
Use only the email on SLES builds
Compatibility...
parent
225e10f5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
build-recipe
+7
-0
7 additions, 0 deletions
build-recipe
changelog2spec
+7
-0
7 additions, 0 deletions
changelog2spec
queryconfig
+12
-0
12 additions, 0 deletions
queryconfig
with
26 additions
and
0 deletions
build-recipe
+
7
−
0
View file @
e669b7eb
...
...
@@ -161,6 +161,13 @@ recipe_create_changelog() {
*.dsc) CFFORMAT=debian ;;
*) CFFORMAT=rpm ;;
esac
# add --emailonly option for sles builds
if test "$CFFORMAT" = rpm ; then
case `queryconfig --dist "$BUILD_DIST" --configdir "$CONFIG_DIR" --archpath "$BUILD_ARCH" eval '%{?is_opensuse}/%{?!fullname_in_changelog:%{?suse_version}}'` in
*[1-9]*/*) ;;
*/*[1-9]*) CFFORMAT="$CFFORMAT --emailonly" ;;
esac
fi
echo "running changelog2spec --target $CFFORMAT --file $1"
if ! $BUILD_DIR/changelog2spec --target $CFFORMAT --file "$1" > $BUILD_ROOT/.build-changelog ; then
rm -f $BUILD_ROOT/.build-changelog
...
...
This diff is collapsed.
Click to expand it.
changelog2spec
+
7
−
0
View file @
e669b7eb
...
...
@@ -40,6 +40,7 @@ my $ok;
my
$zone
;
my
$test
;
my
$fulltimestamps
;
my
$emailonly
;
my
$printtype
;
my
$input
=
'';
my
$target
=
'
rpm
';
...
...
@@ -70,6 +71,11 @@ while (@ARGV) {
$target
=
shift
@ARGV
;
next
;
}
if
(
$ARGV
[
0
]
eq
'
--emailonly
')
{
$emailonly
=
1
;
shift
@ARGV
;
next
;
}
last
;
}
...
...
@@ -118,6 +124,7 @@ sub parse_suse {
$dt
=
lc
(
$dt
);
$who
=~
s/^\s+//
;
$who
=~
s/^-\s*//
;
$who
=
$
1
if
$emailonly
&&
$who
=~
/\<(.*)\>/
;
$dt
=~
/([0-9][0-9][0-9][0-9])/
;
$dline
=
$_
;
my
$year
=
$
1
;
...
...
This diff is collapsed.
Click to expand it.
queryconfig
+
12
−
0
View file @
e669b7eb
...
...
@@ -27,6 +27,14 @@ BEGIN {
use
strict
;
use
Build
;
use
Build::
Rpm
;
sub
evalmacros
{
my
(
$config
,
$str
)
=
@_
;
my
@xspec
;
Build::Rpm::
parse
({
%$config
,
'
save_expanded
'
=>
1
}
,
[
"
$str
"
],
\
@xspec
);
return
@xspec
&&
ref
(
$xspec
[
0
])
?
$xspec
[
0
]
->
[
1
]
:
'';
}
my
(
$dist
,
$archs
,
$configdir
,
$type
,
$argument
);
...
...
@@ -81,6 +89,10 @@ if ($type eq 'buildflags') {
die
("
Specify which substitute to query
\n
")
unless
$argument
;
my
@res
=
@
{
$cf
->
{'
substitute
'}
->
{
$argument
}
||
[]
};
print
join
('
',
@res
)
.
"
\n
"
if
@res
;
}
elsif
(
$type
eq
'
eval
')
{
die
("
Specify what to eval
\n
")
unless
defined
$argument
;
my
$result
=
evalmacros
(
$cf
,
$argument
);
print
"
$result
\n
";
}
else
{
die
("
unsupported query type:
$type
\n
");
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment