Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
mentors.debian.net
debexpo
Commits
4d5f1d5a
Verified
Commit
4d5f1d5a
authored
Jan 05, 2022
by
Baptiste Beauplat
Browse files
Fix unsigned build from test source packages
parent
9cbcc108
Changes
2
Show whitespace changes
Inline
Side-by-side
tests/functional/importer/__init__.py
View file @
4d5f1d5a
...
@@ -155,7 +155,7 @@ class TestImporterController(TestController):
...
@@ -155,7 +155,7 @@ class TestImporterController(TestController):
skip_email
=
False
,
base_dir
=
None
,
sub_dir
=
None
):
skip_email
=
False
,
base_dir
=
None
,
sub_dir
=
None
):
source_package
=
TestSourcePackage
(
package_dir
,
base_dir
)
source_package
=
TestSourcePackage
(
package_dir
,
base_dir
)
source_package
.
build
()
source_package
.
build
(
not
skip_gpg
)
self
.
_run_importer
(
source_package
.
get_package_dir
(),
skip_gpg
=
skip_gpg
,
self
.
_run_importer
(
source_package
.
get_package_dir
(),
skip_gpg
=
skip_gpg
,
skip_email
=
skip_email
,
sub_dir
=
sub_dir
)
skip_email
=
skip_email
,
sub_dir
=
sub_dir
)
...
...
tests/functional/importer/source_package.py
View file @
4d5f1d5a
...
@@ -130,13 +130,17 @@ BQJb8YGqAhsMAAoJEMQ0eBzocfPf8IcA/RyHF6zgRu2Ds3wH8GgxjCZRW+YxWahX
...
@@ -130,13 +130,17 @@ BQJb8YGqAhsMAAoJEMQ0eBzocfPf8IcA/RyHF6zgRu2Ds3wH8GgxjCZRW+YxWahX
self
.
_run_command
(
command
,
args
,
self
.
source_dir
,
self
.
_run_command
(
command
,
args
,
self
.
source_dir
,
self
.
_get_env_with_gpg
())
self
.
_get_env_with_gpg
())
def
_build_package
(
self
):
def
_build_package
(
self
,
sign
):
args
=
[
'--build=source'
,
args
=
[
'--build=source'
,
'--no-check-builddeps'
,
'--no-check-builddeps'
,
'--sign-key=559306EEE1C8C1B2DD1C73B1C434781CE871F3DF'
,
'--sign-key=559306EEE1C8C1B2DD1C73B1C434781CE871F3DF'
]
'--force-sign'
]
command
=
'dpkg-buildpackage'
command
=
'dpkg-buildpackage'
if
sign
:
args
.
append
(
'--force-sign'
)
else
:
args
.
append
(
'--no-sign'
)
log
.
debug
(
'Build source package {}-{}'
.
format
(
self
.
package
,
log
.
debug
(
'Build source package {}-{}'
.
format
(
self
.
package
,
self
.
version
))
self
.
version
))
self
.
_run_command
(
command
,
args
,
join
(
self
.
workdir
,
'sources'
),
self
.
_run_command
(
command
,
args
,
join
(
self
.
workdir
,
'sources'
),
...
@@ -180,14 +184,14 @@ BQJb8YGqAhsMAAoJEMQ0eBzocfPf8IcA/RyHF6zgRu2Ds3wH8GgxjCZRW+YxWahX
...
@@ -180,14 +184,14 @@ BQJb8YGqAhsMAAoJEMQ0eBzocfPf8IcA/RyHF6zgRu2Ds3wH8GgxjCZRW+YxWahX
def
get_package_dir
(
self
):
def
get_package_dir
(
self
):
return
self
.
workdir
return
self
.
workdir
def
build
(
self
):
def
build
(
self
,
sign
=
True
):
# Copy sources files into workdir
# Copy sources files into workdir
copytree
(
self
.
source_dir
,
copytree
(
self
.
source_dir
,
join
(
self
.
workdir
,
'sources'
))
join
(
self
.
workdir
,
'sources'
))
# Gen orig, build and sign
# Gen orig, build and sign
self
.
_gen_orig
()
self
.
_gen_orig
()
self
.
_build_package
()
self
.
_build_package
(
sign
)
# Remove temporary source dir
# Remove temporary source dir
if
isdir
(
join
(
self
.
workdir
,
'sources'
)):
if
isdir
(
join
(
self
.
workdir
,
'sources'
)):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment