Skip to content

Commit

Permalink
Merge branch 'devel' into fix/deauth_on_previous_on_webauth
Browse files Browse the repository at this point in the history
  • Loading branch information
satkunas authored Nov 22, 2024
2 parents dc7a0ff + 79d2903 commit 5ef99af
Show file tree
Hide file tree
Showing 3,652 changed files with 120,301 additions and 154,384 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 4 additions & 4 deletions .github/workflows/main_packetfence-perl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
if: ${{ contains( github.event.head_commit.message, '[perl]') || needs.build_preparation.outputs.path_changes == 'true' && needs.build_preparation.outputs.regex_match_branch != '' }}
strategy:
matrix:
images: ['debian', 'rhel8']
images: ['debian11', 'debian12', 'rhel8']
uses: ./.github/workflows/packetfence-perl_build_image_package.yml
needs: ['build_preparation']
with:
Expand All @@ -87,7 +87,7 @@ jobs:
unit_tests_packages:
strategy:
matrix:
images: ['debian', 'rhel8']
images: ['debian11', 'debian12', 'rhel8']
uses: ./.github/workflows/reusable_unit_test.yml
needs: ['build_preparation', 'build_images_and_packages']
with:
Expand All @@ -97,7 +97,7 @@ jobs:
sign_package:
strategy:
matrix:
images: ['debian', 'rhel8']
images: ['debian11', 'debian12', 'rhel8']
uses: ./.github/workflows/reusable_sign_packages.yml
needs: ['build_preparation', 'build_images_and_packages', 'unit_tests_packages']
with:
Expand All @@ -110,7 +110,7 @@ jobs:
upload_packages:
strategy:
matrix:
images: ['debian', 'rhel8']
images: ['debian11', 'debian12', 'rhel8']
uses: ./.github/workflows/reusable_upload_packages.yml
needs: ['build_preparation', 'build_images_and_packages', 'unit_tests_packages', 'sign_package']
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main_perl-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
if: ${{ contains( github.event.head_commit.message, '[perl-client]') || needs.build_preparation.outputs.path_changes == 'true' && needs.build_preparation.outputs.regex_match_branch != '' }}
strategy:
matrix:
images: ['debian', 'rhel8']
images: ['debian11', 'debian12', 'rhel8']
uses: ./.github/workflows/perl-client_build_package.yml
needs: ['build_preparation']
with:
Expand All @@ -84,7 +84,7 @@ jobs:
unit_tests_packages:
strategy:
matrix:
images: ['debian', 'rhel8']
images: ['debian11', 'debian12', 'rhel8']
uses: ./.github/workflows/reusable_unit_test.yml
needs: ['build_preparation', 'build_packages']
with:
Expand All @@ -94,7 +94,7 @@ jobs:
sign_package:
strategy:
matrix:
images: ['debian', 'rhel8']
images: ['debian11', 'debian12', 'rhel8']
uses: ./.github/workflows/reusable_sign_packages.yml
needs: ['build_preparation', 'build_packages', 'unit_tests_packages']
with:
Expand All @@ -107,7 +107,7 @@ jobs:
upload_packages:
strategy:
matrix:
images: ['debian', 'rhel8']
images: ['debian11', 'debian12', 'rhel8']
uses: ./.github/workflows/reusable_upload_packages.yml
needs: ['build_preparation', 'build_packages', 'unit_tests_packages', 'sign_package']
with:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/packetfence-perl_build_image_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,17 @@ jobs:
run: |
cd /root
set -e && python3 install_cpan.py -d dependencies.csv -vi true && ./build_package.sh
ls -la ${{ inputs._OUTPUT_DIRECTORY }}/${{inputs._IMAGE_TYPE}}/packages/
ls -la ${{ inputs._OUTPUT_DIRECTORY }}
ls -la ${{ inputs._OUTPUT_DIRECTORY }}/${{env.PATH_PACKAGE}}/packages/
env:
PATH_PACKAGE: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'rhel8' || 'debian' }}

- name: Upload the package to artifactory ${{inputs._IMAGE_TYPE}}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.4.3
with:
name: ${{ env.ARTIFACTORY_NAME }}
path: ${{ inputs._OUTPUT_DIRECTORY }}/${{ inputs._IMAGE_TYPE}}/packages/${{ env.PACKAGE_NAME }}
path: ${{ inputs._OUTPUT_DIRECTORY }}/${{ env.PATH_PACKAGE }}/packages/${{ env.PACKAGE_NAME }}
env:
PACKAGE_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'packetfence-perl-*.rpm' || 'packetfence-perl*.deb' }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm' || 'package-deb' }}
PACKAGE_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'packetfence-perl-*.rpm' || inputs._IMAGE_TYPE == 'debian11' && 'packetfence-perl*.deb' || inputs._IMAGE_TYPE == 'debian12' && 'packetfence-perl*.deb' }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm8' || inputs._IMAGE_TYPE == 'debian11' && 'package-deb11' || inputs._IMAGE_TYPE == 'debian12' && 'package-deb12' }}
PATH_PACKAGE: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'rhel8' || 'debian' }}
22 changes: 12 additions & 10 deletions .github/workflows/perl-client_build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
runs-on: package-build
needs: git_checkout
container:
image: registry.gitlab.com/orange-opensource/gitlab-buildpkg/${{ inputs._IMAGE_TYPE == 'rhel8' && 'centos:8' || 'debian:bullseye'}}
image: registry.gitlab.com/orange-opensource/gitlab-buildpkg/${{ inputs._IMAGE_TYPE == 'rhel8' && 'centos:8' || inputs._IMAGE_TYPE == 'debian11' && 'debian:bullseye' || inputs._IMAGE_TYPE == 'debian12' && 'debian:bookworm' }}
env:
EXECUTION_DIRECTORY: '/mnt/packetfence/'
# volumes:
Expand All @@ -41,8 +41,10 @@ jobs:
run: dnf -y install rpm-sign python39 && python3.9 -m pip install -q -U pip && pip install -q pynacl requests

- name: Install Debian dependencies ${{ inputs._IMAGE_TYPE }}
if: inputs._IMAGE_TYPE == 'debian'
run: apt -qq update && apt -qq -y install python3 python3-pip && python3 -m pip install -q -U pip && pip install -q pynacl requests
if: inputs._IMAGE_TYPE == 'debian11' || inputs._IMAGE_TYPE == 'debian12'
run: apt -qq update && apt -qq -y install python3 python3-pip && python3 -m pip install -q -U pip ${{ env.BREAK_OPTION}} && pip install -q pynacl requests ${{ env.BREAK_OPTION}}
env:
BREAK_OPTION: ${{ inputs._IMAGE_TYPE == 'debian12' && '--break-system-packages' || '' }}

- name: Safety add directory
shell: bash
Expand All @@ -63,23 +65,23 @@ jobs:
cd "${EXECUTION_DIRECTORY}"/addons/perl-client/
set -e && export FINGERBANK_API_KEY=$(set -e && python3 "${EXECUTION_DIRECTORY}"/addons/packetfence-perl/psono.py --api_key_id=${{ secrets.PSONO_API_KEY_ID }} --api_key_secret_key=${{ secrets.PSONO_API_KEY_SECRET_KEY }} --secret_id=${{ vars.PSONO_BUILDS_KEY_FINGERBANK }} --return_value=password)
set -e && make SHELL='sh' -e ${{ inputs._IMAGE_TYPE == 'rhel8' && 'build_rpm' || 'build_deb'}}
ls -la "${EXECUTION_DIRECTORY}"/addons/perl-client/result/${{ inputs._IMAGE_TYPE == 'rhel8' && 'centos/8' || 'debian/bullseye'}}
ls -la "${EXECUTION_DIRECTORY}"/addons/perl-client/result/${{ inputs._IMAGE_TYPE == 'rhel8' && 'centos/8' || inputs._IMAGE_TYPE == 'debian11' && 'debian/bullseye' || inputs._IMAGE_TYPE == 'debian12' && 'debian/bookworm'}}
env:
CI_COMMIT_REF_NAME: ${{ inputs._BRANCH_NAME }}

- name: Upload the package to artifactory ${{inputs._IMAGE_TYPE}}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4.4.3
with:
name: ${{ env.ARTIFACTORY_NAME }}
# path: /__w/packetfence/packetfence/addons/perl-client/result/${{ inputs._IMAGE_TYPE == 'rhel8' && 'centos/8' || 'debian/bullseye'}}/${{ env.PACKAGE_NAME }}
path: /mnt/packetfence/addons/perl-client/result/${{ inputs._IMAGE_TYPE == 'rhel8' && 'centos/8' || 'debian/bullseye'}}/${{ env.PACKAGE_NAME }}
# path: /__w/packetfence/packetfence/addons/perl-client/result/${{ inputs._IMAGE_TYPE == 'rhel8' && 'centos/8' || inputs._IMAGE_TYPE == 'debian11' && 'debian/bookworm'}}/${{ env.PACKAGE_NAME }}
path: /mnt/packetfence/addons/perl-client/result/${{ inputs._IMAGE_TYPE == 'rhel8' && 'centos/8' || inputs._IMAGE_TYPE == 'debian11' && 'debian/bullseye' || inputs._IMAGE_TYPE == 'debian12' && 'debian/bookworm'}}/${{ env.PACKAGE_NAME }}
env:
PACKAGE_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'fingerbank-*.noarch.rpm' || 'fingerbank*.deb' }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm' || 'package-deb' }}
PACKAGE_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'fingerbank-*.noarch.rpm' || inputs._IMAGE_TYPE == 'debian11' && 'fingerbank*.deb' || inputs._IMAGE_TYPE == 'debian12' && 'fingerbank*.deb' }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm8' || inputs._IMAGE_TYPE == 'debian11' && 'package-deb11' || inputs._IMAGE_TYPE == 'debian12' && 'package-deb12' }}
PATH: "${GITHUB_WORKSPACE}"

- name: Clean directory
if: always()
run: |
rm -rf "${EXECUTION_DIRECTORY}"
rm -rf ${HOME}/rpmbuild
rm -rf ${HOME}/rpmbuild
15 changes: 8 additions & 7 deletions .github/workflows/reusable_sign_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ on:

jobs:
sign_package_deb:
if: inputs._IMAGE_TYPE == 'debian'
if: inputs._IMAGE_TYPE == 'debian11' || inputs._IMAGE_TYPE == 'debian12'
runs-on: packetfence-perl-package-build
container:
image: debian:11.0
volumes:
- ${{ github.workspace }}/addons/packetfence-perl/:/root
steps:
- name: Download artifactory ${{ inputs._IMAGE_TYPE }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: ${{ env.ARTIFACTORY_NAME }}
path: /mnt
env:
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm' || 'package-deb' }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm8' || inputs._IMAGE_TYPE == 'debian11' && 'package-deb11' || inputs._IMAGE_TYPE == 'debian12' && 'package-deb12' }}

- name: Install Debian dependencies ${{ inputs._IMAGE_TYPE }}
run: apt -qq update && apt -qq -y install gpg dpkg-sig python3 python3-pip && python3 -m pip install -q -U pip && pip install -q pynacl requests
Expand All @@ -55,7 +55,7 @@ jobs:
path: /mnt/${{ env.PACKAGE_NAME }}
env:
PACKAGE_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && env.RPM_FORMAT_PACKAGE_NAME || env.DEB_FORMAT_PACKAGE_NAME }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm' || 'package-deb' }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm8' || inputs._IMAGE_TYPE == 'debian11' && 'package-deb11' || inputs._IMAGE_TYPE == 'debian12' && 'package-deb12' }}
DEB_FORMAT_PACKAGE_NAME: "${{ inputs._PACKAGE_NAME }}*.deb"
RPM_FORMAT_PACKAGE_NAME: "${{ inputs._PACKAGE_NAME }}*.rpm"

Expand All @@ -68,12 +68,13 @@ jobs:
- ${{ github.workspace }}/addons/packetfence-perl/:/root
steps:
- name: Download artifactory ${{ inputs._IMAGE_TYPE }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: ${{ env.ARTIFACTORY_NAME }}
path: /mnt
env:
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm' || 'package-deb' }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm8' || inputs._IMAGE_TYPE == 'debian11' && 'package-deb11' || inputs._IMAGE_TYPE == 'debian12' && 'package-deb12' }}


- name: Install RHEL dependencies ${{ inputs._IMAGE_TYPE }}
run: dnf -y install rpm-sign python39 && python3.9 -m pip install -q -U pip && pip install -q pynacl requests
Expand Down Expand Up @@ -103,6 +104,6 @@ jobs:
path: /mnt/${{ env.PACKAGE_NAME }}
env:
PACKAGE_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && env.RPM_FORMAT_PACKAGE_NAME || env.DEB_FORMAT_PACKAGE_NAME }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm' || 'package-deb' }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm8' || inputs._IMAGE_TYPE == 'debian11' && 'package-deb11' || inputs._IMAGE_TYPE == 'debian12' && 'package-deb12' }}
DEB_FORMAT_PACKAGE_NAME: "${{ inputs._PACKAGE_NAME }}*.deb"
RPM_FORMAT_PACKAGE_NAME: "${{ inputs._PACKAGE_NAME }}*.rpm"
10 changes: 5 additions & 5 deletions .github/workflows/reusable_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ jobs:
unit-test:
runs-on: packetfence-perl-package-build
container:
image: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'redhat/ubi8:8.8' || 'debian:11.0'}}
image: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'redhat/ubi8:8.8' || inputs._IMAGE_TYPE == 'debian11' && 'debian:bullseye' || inputs._IMAGE_TYPE == 'debian12' && 'debian:bookworm'}}
steps:
- name: Download artifactory ${{ inputs._IMAGE_TYPE }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: ${{ env.ARTIFACTORY_NAME }}
path: /mnt
env:
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm' || 'package-deb' }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm8' || inputs._IMAGE_TYPE == 'debian11' && 'package-deb11' || inputs._IMAGE_TYPE == 'debian12' && 'package-deb12' }}

- name: Install the package ${{ inputs._PACKAGE_NAME}} rhel8
if: inputs._IMAGE_TYPE == 'rhel8'
Expand All @@ -36,14 +36,14 @@ jobs:
rpm -qa | grep ${{ inputs._PACKAGE_NAME }}
- name: Install the package ${{ inputs._PACKAGE_NAME}} debian
if: inputs._IMAGE_TYPE == 'debian'
if: inputs._IMAGE_TYPE == 'debian11' || inputs._IMAGE_TYPE == 'debian12'
run: |
ls -la /mnt
apt update; apt install -y gnupg sudo wget curl
PF_RELEASE_PATH=https://raw.githubusercontent.com/inverse-inc/packetfence/devel/conf/pf-release
PF_MINOR_RELEASE=$(curl -s ${PF_RELEASE_PATH} | grep -oE '[0-9]+\.[0-9]+')
wget -q -O - https://inverse.ca/downloads/GPG_PUBLIC_KEY | apt-key add -
echo "deb http://inverse.ca/downloads/PacketFence/debian/${PF_MINOR_RELEASE} bullseye bullseye" > /etc/apt/sources.list.d/packetfence.list
echo "deb http://inverse.ca/downloads/PacketFence/debian/${PF_MINOR_RELEASE} bookworm bookworm" > /etc/apt/sources.list.d/packetfence.list
apt update
set -e && find /mnt -name ${{ inputs._PACKAGE_NAME }}*.deb -exec bash -c 'apt install -f -y {}' \;
echo "Next packages ${{ inputs._PACKAGE_NAME }} was installed successfuly: "
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reusable_upload_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
- ${{ github.workspace }}/addons/packetfence-perl/:/root/packetfence-perl
steps:
- name: Download artifactory ${{ inputs._IMAGE_TYPE }}
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4.1.7
with:
name: ${{ env.ARTIFACTORY_NAME }}
path: /mnt
env:
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm' || 'package-deb' }}
ARTIFACTORY_NAME: ${{ inputs._IMAGE_TYPE == 'rhel8' && 'package-rpm8' || inputs._IMAGE_TYPE == 'debian11' && 'package-deb11' || inputs._IMAGE_TYPE == 'debian12' && 'package-deb12' }}

- name: Install dependencies ${{ inputs._IMAGE_TYPE }}
run: apt -qq update && apt -qq -y install openssh-client rsync python3 python3-pip && python3 -m pip install -q -U pip && pip install -q pynacl requests
Expand Down
12 changes: 7 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ conf/radiusd/tls.conf
conf/radiusd/radiusd_cli.conf
conf/radiusd/cert
conf/pfcron.conf
conf/provisioning_filters.conf
conf/provisioning_filters_meta.conf
conf/certmanager
conf/mfa.conf
conf/proxysql.conf
conf/uploads
conf/kafka.conf
conf/config.toml
db/upgrade-tenant-11.2-12.0.sql
bin/pfcmd
bin/ntlm_auth_wrapper
Expand All @@ -60,6 +64,7 @@ sbin/pfdns
sbin/pfstats
sbin/pfacct
sbin/pfcron
sbin/pfqueue-go
sbin/galera-autofix
sbin/mysql-probe
sbin/pfconnector
Expand Down Expand Up @@ -133,18 +138,15 @@ conf/radiusd/packetfence-pre-proxy
conf/radiusd/packetfence-tunnel
conf/radiusd/proxy.conf.inc
conf/radiusd/proxy.conf.loadbalancer
conf/radiusd/proxy.conf.loadbalancer
conf/radiusd/radiusd.conf
conf/radiusd/radiusd_loadbalancer.conf
conf/radiusd/radiusd_loadbalancer.conf
conf/radiusd/rest.conf
conf/radiusd/sql.conf
conf/redis_cache.conf
conf/redis_queue.conf
conf/redis_ntlm_cache.conf
conf/realm.conf
conf/survey.conf
conf/traffic_shaping.conf
conf/domain.conf
conf/radius_filters.conf
conf/switch_filters.conf
Expand Down Expand Up @@ -189,14 +191,12 @@ conf/pfarp_remote.conf
conf/pfconfig.conf
conf/allowed-gaming-oui.txt
conf/cluster.conf
conf/domain.conf
conf/network_behavior_policies.conf
conf/haproxy-portal.conf
conf/haproxy-db.conf
conf/haproxy-admin.conf
conf/keepalived.conf
conf/report.conf
conf/device_registration.conf
conf/cloud.conf
conf/httpd.conf.d/captive-portal-common.tt
conf/httpd.conf.d/httpd.aaa.tt
Expand Down Expand Up @@ -256,6 +256,8 @@ docs/docbook/xsl/titlepage-fo.xsl
docs/docbook/*.docbook
docs/*.html
docs/index.js
docs/api/spec/components/
docs/api/spec/paths/

# trap stats graphs
# TODO we should move them under var/
Expand Down
Loading

0 comments on commit 5ef99af

Please sign in to comment.