From e304c4cc7f919794ae2397af72891294829601f1 Mon Sep 17 00:00:00 2001 From: Renaud Lepage Date: Fri, 13 Sep 2024 13:36:05 -0700 Subject: [PATCH] sbctl packaging (squashed) --- .github/build-nest-v3 | 2 +- .github/workflows/build-nestv3.yml | 8 ++++++++ debian/changelog | 6 +++--- debian/control | 28 +++++++++++++++------------- debian/rules | 6 ++++++ main.sh | 21 +++++++++++++++------ 6 files changed, 48 insertions(+), 23 deletions(-) diff --git a/.github/build-nest-v3 b/.github/build-nest-v3 index 56a6051..3cacc0b 100644 --- a/.github/build-nest-v3 +++ b/.github/build-nest-v3 @@ -1 +1 @@ -1 \ No newline at end of file +12 \ No newline at end of file diff --git a/.github/workflows/build-nestv3.yml b/.github/workflows/build-nestv3.yml index 3c9c34d..2837901 100644 --- a/.github/workflows/build-nestv3.yml +++ b/.github/workflows/build-nestv3.yml @@ -35,3 +35,11 @@ jobs: - name: Build Package run: ./main.sh + + - name: Find output + run: find . -name "*.deb" + + - uses: actions/upload-artifact@v3 + with: + name: sbctl + path: output/sbctl*.deb \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index 6d8d068..1e467b3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -upstream-name (1.0-101pika1) pika; urgency=medium +sbctl (0.15.4-101pika1) pika; urgency=low - * Initial release. (Closes: #nnnn) + * Initial release. - -- ferreo Wed, 18 Jan 2023 21:48:14 +0000 + -- cybik Fri, 13 Sep 2024 13:38:39 -0700 diff --git a/debian/control b/debian/control index 0bcd8e0..9c12cf9 100644 --- a/debian/control +++ b/debian/control @@ -1,19 +1,21 @@ -Source: upstream-name +Source: sbctl Section: admin Priority: optional -Maintainer: name +Maintainer: cybik Standards-Version: 4.6.1 -Build-Depends: debhelper-compat (= 13) +Build-Depends: + debhelper-compat (= 13), asciidoc, golang-go Rules-Requires-Root: no -Package: pkgname1 +Package: sbctl Architecture: linux-any -# Delete any of these lines if un-used -Depends: ${misc:Depends}, depends -Recommends: high priority optdepends -Conflicts: conflicts -Suggests: low priority optdepends -Breaks: also conflicts!? -Provides: provides -# -Description: pkgdesc +Depends: + ${misc:Depends}, ${shlibs:Depends}, util-linux, binutils, golang-go +Provides: sbctl +Homepage: https://github.com/Foxboron/sbctl/ +Vcs-Browser: https://github.com/Foxboron/sbctl/ +Vcs-Git: https://github.com/Foxboron/sbctl/ +Description: SecureBoot Manager toolkit + The sbctl tool allows one to create keys for secure boot, + securely enroll them, and keep track of files to sign + and/or that have been signed. diff --git a/debian/rules b/debian/rules index 64a084a..d410b57 100755 --- a/debian/rules +++ b/debian/rules @@ -51,6 +51,12 @@ export PIKA_BUILD_ARCH = $(shell cat ../pika-build-arch) #override_dh_clean: # echo "disabled" +override_dh_usrlocal: + echo "disabled" + +override_dh_dwz: + echo "disabled" + ## overriding dh_auto_configure to add custom configs: #override_dh_auto_configure: # $(srcdir)/configure -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_DATADIR=/usr/share -DCMAKE_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu -DBUILD_PLUGIN=OFF diff --git a/main.sh b/main.sh index d80ca48..3e0131f 100755 --- a/main.sh +++ b/main.sh @@ -6,21 +6,30 @@ set -e echo "$PIKA_BUILD_ARCH" > pika-build-arch -VERSION="1.0" +VERSION="0.15.4" # Clone Upstream -mkdir -p ./src-pkg-name -cp -rvf ./debian ./src-pkg-name/ -cd ./src-pkg-name/ +UPSTREAM_NAME="sbctl" + +# Checkout and munch +git clone https://github.com/Foxboron/sbctl.git "${UPSTREAM_NAME}" +cp -rvf ./debian ./${UPSTREAM_NAME}/ + +# easier than figuring out the right way to override the prefix in the makefile +sed -i "s/usr\/local/usr/" "${UPSTREAM_NAME}/Makefile" + +# Get in there. +pushd "./${UPSTREAM_NAME}/" || exit 1 # Get build deps -LOGNAME=root dh_make --createorig -y -l -p src-pkg-name_"$VERSION" || echo "dh-make: Ignoring Last Error" +LOGNAME=root dh_make --createorig -y -l -p ${UPSTREAM_NAME}_"$VERSION" || echo "dh-make: Ignoring Last Error" apt-get build-dep ./ -y # Build package dpkg-buildpackage --no-sign +popd || exit 2 + # Move the debs to output -cd ../ mkdir -p ./output mv ./*.deb ./output/