Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-build-utils
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
korinf
etersoft-build-utils
Commits
2c00b868
Commit
2c00b868
authored
Dec 26, 2025
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpmbs: use gpg2 for batch signing mode (-B)
parent
896602b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
rpmbs
bin/rpmbs
+16
-4
No files found.
bin/rpmbs
View file @
2c00b868
...
...
@@ -386,16 +386,28 @@ echog "Will try to sign follow packages with GPG: \$LISTBUILT"
# 1. only rpm command has --addsign 2. do 3 retries
RPMSIGNARGS
=
""
if
[
-n
"
$BATCHSIGN
"
]
;
then
# batch signing requires gpg2
if
!
which gpg2
>
/dev/null 2>&1
;
then
echog
"Batch signing (-B) requires gpg2, but it is not installed."
exit
1
fi
# use gpg2 for git tag signing
export
GIT_CONFIG_COUNT
=
1
export
GIT_CONFIG_KEY_0
=
gpg.program
export
GIT_CONFIG_VALUE_0
=
gpg2
# check if gpg-agent is unlocked
if
!
echo test
|
gpg
--batch
--pinentry-mode
loopback
-s
>
/dev/null 2>&1
;
then
if
!
echo test
|
a
=
gpg2
--batch
--pinentry-mode
loopback
-s
>
/dev/null 2>&1
;
then
echo
echog
"GPG agent is not ready for batch signing."
echog
"Please unlock it first in a terminal with tty:"
echog
"
$
echo test | gpg --clearsign > /dev/null"
echog
"Or use gpg-preset-passphrase to cache the passphrase."
echog
"
$
echo test | gpg2 --clearsign > /dev/null"
echo
echog
"Diagnostic:"
showcmd
"echo test | gpg2 --batch --pinentry-mode loopback -s"
echo test
|
a
=
gpg2
--batch
--pinentry-mode
loopback
-s
exit
1
fi
RPMSIGNARGS
=
'--define=__gpg_sign_cmd %{__gpg} gpg --batch --pinentry-mode loopback --no-armor -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}'
RPMSIGNARGS
=
'--define=__gpg_sign_cmd %{__gpg} gpg
2
--batch --pinentry-mode loopback --no-armor -u "%{_gpg_name}" -sbo %{__signature_filename} %{__plaintext_filename}'
fi
docmd rpm
$RPMSIGNARGS
--addsign
$LISTBUILT
||
docmd rpm
$RPMSIGNARGS
--addsign
$LISTBUILT
||
docmd rpm
$RPMSIGNARGS
--addsign
$LISTBUILT
RET
=
$?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment