Skip to content

Commit

Permalink
Docs for ya package --debian dependencies
Browse files Browse the repository at this point in the history
988d8f4be03d2b5dceb5bbf2c5a2ac614fc1eb28
  • Loading branch information
tvpudovkin committed Jul 15, 2024
1 parent e33a3d0 commit 42af653
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion devtools/ya/handlers/package/opts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,8 @@ def consumer():
),
core.yarg.ArgConsumer(
names=['--sign-debsigs'],
help='When debian package signing is enabled, also sign using debsigs',
help='When debian package signing is enabled, also sign using debsigs'
' (package \'debsigs\' must be installed to use this feature)',
hook=core.yarg.SetConstValueHook('sign_debsigs', True),
group=core.yarg.PACKAGE_OPT_GROUP,
subgroup=DEB_SUBGROUP,
Expand Down
10 changes: 7 additions & 3 deletions devtools/ya/package/debian.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,12 @@

DCH_COMMAND = "dch"

# NOTE: must be a single line & must not include '='
DEBSIGS_HOOK = "debsigs -v --sign origin {key} ../*.deb"
# This hook runs in the unpacked source directory (as per `man dpkg-buildpackage`),
# which in this case is new_result_dir. Build outputs are produced in the parent
# directory (see https://www.debian.org/doc/manuals/maint-guide/), i.e. temp_dir,
# hence the use of the wildcard '../*.deb'.
# NOTE: hook must be a single line & must not include '='
DEBSIGS_HOOK_FMT = "debsigs -v --sign origin {key} ../*.deb"


def create_debian_package(
Expand Down Expand Up @@ -140,7 +144,7 @@ def create_debian_package(
# so it must be placed after all the regular debuild arguments
if sign and sign_debsigs:
debsigs_hook_key = '--default-key {}'.format(key) if key else ''
debsigs_hook = DEBSIGS_HOOK.format(key=debsigs_hook_key)
debsigs_hook = DEBSIGS_HOOK_FMT.format(key=debsigs_hook_key)
args.append('--hook-buildinfo={}'.format(debsigs_hook))

package.process.run_process(
Expand Down
2 changes: 1 addition & 1 deletion devtools/ya/package/package.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@
"type": "boolean"
},
"sign_debsigs": {
"description": "When debian package signing is enabled, also sign using debsigs",
"description": "When debian package signing is enabled, also sign using debsigs (package 'debsigs' must be installed to use this feature)",
"type": "boolean"
},
"sloppy_deb": {
Expand Down

0 comments on commit 42af653

Please sign in to comment.