Skip to content

Conversation

@sebroy
Copy link
Contributor

@sebroy sebroy commented Aug 8, 2025

The challenge-response linux-pkg package build is needlessly complex. The linux-pkg framework provides a set of default functions for performing the most common tasks:

  1. Installing dependencies in the prepare phase using information from the debian control file (install_build_deps_from_control_file)
  2. Building the package using standard debian tooling (dpkg_buildpackage_default)

Instead of using these convenience functions, the challenge-response package uses its own set of custom commands and Makefile-based build (which itself calls into debian commands). This can be simplified.

This PR is inter-dependent with https://www.github.com/delphix/challenge-response/pull/9.

The output of this package build is a debian file with the following format and contents:

delphix@ip-10-110-206-237:~/linux-pkg$ dpkg -c packages/challenge-response/tmp/artifacts/pam-challenge-response_1.0.0-1delphix.2025.08.08.19.15_amd64.deb
drwxr-xr-x root/root         0 2025-08-08 19:16 ./
drwxr-xr-x root/root         0 2025-08-08 19:16 ./usr/
drwxr-xr-x root/root         0 2025-08-08 19:16 ./usr/lib/
drwxr-xr-x root/root         0 2025-08-08 19:16 ./usr/lib/x86_64-linux-gnu/
drwxr-xr-x root/root         0 2025-08-08 19:16 ./usr/lib/x86_64-linux-gnu/security/
-rw-r--r-- root/root     18704 2025-08-08 19:16 ./usr/lib/x86_64-linux-gnu/security/pam_challenge_response.so
drwxr-xr-x root/root         0 2025-08-08 19:16 ./usr/share/
drwxr-xr-x root/root         0 2025-08-08 19:16 ./usr/share/doc/
drwxr-xr-x root/root         0 2025-08-08 19:16 ./usr/share/doc/pam-challenge-response/
-rw-r--r-- root/root       187 2025-08-08 19:16 ./usr/share/doc/pam-challenge-response/changelog.Debian.gz
-rw-r--r-- root/root       152 2025-08-08 19:16 ./usr/share/doc/pam-challenge-response/copyright
drwxr-xr-x root/root         0 2025-08-08 19:16 ./usr/share/pam-configs/
-rw-r--r-- root/root       162 2025-08-08 19:16 ./usr/share/pam-configs/challenge-response

ab-pre-push (contains changes for both inter-dependent PRs): https://selfservice-jenkins.eng-tools-prd.aws.delphixcloud.com/job/appliance-build-orchestrator-pre-push/11888/

The upgrade test failed, but upgrades to develop are generally broken right now. I did verify that the pam-challenge-response module is correctly upgraded in the verify container. Something else is broken with upgrade verify (unrelated to this change).

@sebroy sebroy force-pushed the dlpx/pr/sebroy/e509554d-274a-4d8d-8c05-bf1c541daa8e branch from fcd2703 to 7837692 Compare August 8, 2025 19:22
@sebroy sebroy requested a review from prakashsurya August 8, 2025 19:27
@sebroy sebroy force-pushed the dlpx/pr/sebroy/e509554d-274a-4d8d-8c05-bf1c541daa8e branch from 7837692 to 73b2a10 Compare August 8, 2025 19:32
@sebroy sebroy marked this pull request as ready for review August 8, 2025 19:35
@sebroy sebroy changed the title fix DLPX-95062 simplify challenge-response package build Aug 8, 2025
Copy link
Contributor

@prakashsurya prakashsurya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link

@willguyette willguyette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sebroy sebroy force-pushed the dlpx/pr/sebroy/e509554d-274a-4d8d-8c05-bf1c541daa8e branch from 73b2a10 to 3d58016 Compare August 9, 2025 19:39
@sebroy sebroy merged commit d4ac034 into develop Aug 9, 2025
12 checks passed
@sebroy sebroy deleted the dlpx/pr/sebroy/e509554d-274a-4d8d-8c05-bf1c541daa8e branch August 9, 2025 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants