Skip to content

DLPX-95062 simplify challenge-response package build #368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1087,9 +1087,24 @@ function push_to_remote() {
#
function set_changelog() {
check_env PACKAGE_REVISION
local src_package="${1:-$PACKAGE}"
local final_version

#
# If the name of the source package isn't passed in as a parameter,
# then deduce it. If there's a debian/control file that specifies that
# package name, then use it. Otherwise, default to the name of the
# linux-pkg directory name. This can't always be the default because
# for some packages, those are different. For example, the
# challenge-response linux-pkg directory generates the
# pam-challenge-response debian package.
#
if [[ -n $1 ]]; then
src_package=$1
elif [[ -f debian/control ]]; then
src_package=$(awk '/^Source:/ { print $2 }' debian/control)
fi
src_package=${src_package:-$PACKAGE}

#
# If PACKAGE_VERSION hasn't been set already, then retrieve it from
# The changelog file. If the changelog file doesn't exist, which
Expand Down
13 changes: 2 additions & 11 deletions packages/challenge-response/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,9 @@
DEFAULT_PACKAGE_GIT_URL="https://github.com/delphix/challenge-response.git"

function prepare() {
logmust install_pkgs \
libpam0g-dev \
libssl-dev \
uuid-dev
install_build_deps_from_control_file
}

function build() {
logmust cd "$WORKDIR/repo/challenge_response/lib"
PACKAGE_VERSION=$(date +%Y.%m.%d.%H)
logmust set_changelog

logmust cd "$WORKDIR/repo/challenge_response"
logmust make package
logmust mv "./$(dpkg-architecture -q DEB_HOST_GNU_CPU)"/*deb "$WORKDIR/artifacts/"
dpkg_buildpackage_default
}
Loading