Skip to content
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

Add deb build #91

Merged
merged 6 commits into from
Oct 27, 2023
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
53 changes: 32 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,30 @@ on:
inputs:

jobs:
deb_build:
name: deb build
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker build
run: ./docker/build/host-refresh.sh "$GITHUB_WORKSPACE" amd64
- name: Import GPG key
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Docker run
run: ./docker/build/host-build.sh "$GITHUB_WORKSPACE" amd64 deb
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: wordfence_cli_deb
path: |
${{ github.workspace }}/docker/build/volumes/output/wordfence_*.deb
${{ github.workspace }}/docker/build/volumes/output/wordfence_*.deb.sha256
${{ github.workspace }}/docker/build/volumes/output/wordfence_*.deb.asc
${{ github.workspace }}/docker/build/volumes/output/wordfence_*.deb.sha256.asc
linux_standalone_build:
name: Linux standalone build
runs-on: ubuntu-20.04
Expand All @@ -18,36 +42,23 @@ jobs:
- arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
# Set up QEMU to support additional platforms
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Docker build
run: |
docker build \
-t wfcli-build \
--platform "linux/${{ matrix.arch }}" \
-f "${GITHUB_WORKSPACE}/docker/build/Dockerfile" \
"$GITHUB_WORKSPACE"
run: ./docker/build/host-refresh.sh "$GITHUB_WORKSPACE" "$ARCHITECTURE"
env:
ARCHITECTURE: ${{ matrix.arch }}
- name: Import GPG key
uses: crazy-max/[email protected]
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Docker run
run: |
GPG_HOME_DIR=$(gpgconf --list-dirs homedir)
GPG_SOCKET=$(gpgconf --list-dirs agent-socket)
CONTAINER_GPG_HOME_DIR="/var/run/host_gpg_home_dir"
docker run \
--name "wfcli-build-container" \
--platform "linux/${{ matrix.arch }}" \
-v "${GITHUB_WORKSPACE}/docker/build/volumes/output/:/root/output:rw" \
-v "${GITHUB_WORKSPACE}/docker/build/volumes/debian/:/root/debian:rw" \
-v "${GPG_HOME_DIR}:${CONTAINER_GPG_HOME_DIR}:rw" \
-v "${GPG_SOCKET}:${CONTAINER_GPG_HOME_DIR}/S.gpg-agent:rw" \
-e "CONTAINER_GPG_HOME_DIR=${CONTAINER_GPG_HOME_DIR}" \
wfcli-build
run: ./docker/build/host-build.sh "$GITHUB_WORKSPACE" "$ARCHITECTURE" standalone
env:
ARCHITECTURE: ${{ matrix.arch }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
Expand All @@ -62,7 +73,7 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ jobs:
wordfence_cli_arm64/*.tar.gz
wordfence_cli_arm64/*.sha256
wordfence_cli_arm64/*.asc
wordfence_cli_deb/*.deb
wordfence_cli_deb/*.sha256
wordfence_cli_deb/*.asc
target_commitish: ${{ steps.get-commit-hash.outputs.BUILD_COMMIT_HASH }}
tag_name: ${{ inputs.release_tag }}
draft: true
24 changes: 24 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Source: wordfence
Maintainer: Wordfence <[email protected]>
Section: utils
Priority: optional
Build-Depends: debhelper-compat (= 13),
dh-python,
python3-all,
python3-setuptools,
pybuild-plugin-pyproject
Standards-Version: 4.6.2
Homepage: https://www.wordfence.com/products/wordfence-cli/
Vcs-Browser: https://github.com/wordfence/wordfence-cli
Vcs-Git: https://github.com/wordfence/wordfence-cli.git
X-Python3-Version: >= 3.8

Package: wordfence
Architecture: all
Depends: ${python3:Depends}, libpcre3
Description: Command-line malware scanner powered by Wordfence
Wordfence CLI is a multi-process malware scanner written in Python. It's
designed to have low memory overhead while being able to utilize multiple
cores for scanning large filesystems for malware. Wordfence CLI uses libpcre
over Python's existing regex libraries for speed and compatibility with our
signature set.
Loading