Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey V. Lobanov <[email protected]>

i

Signed-off-by: Sergey V. Lobanov <[email protected]>

1

Signed-off-by: Sergey V. Lobanov <[email protected]>

c1

Signed-off-by: Sergey V. Lobanov <[email protected]>

c2

Signed-off-by: Sergey V. Lobanov <[email protected]>

c3

Signed-off-by: Sergey V. Lobanov <[email protected]>

c4

Signed-off-by: Sergey V. Lobanov <[email protected]>

c5

Signed-off-by: Sergey V. Lobanov <[email protected]>

c8

Signed-off-by: Sergey V. Lobanov <[email protected]>

c0

Signed-off-by: Sergey V. Lobanov <[email protected]>

c2

Signed-off-by: Sergey V. Lobanov <[email protected]>

c4:wq

Signed-off-by: Sergey V. Lobanov <[email protected]>

hh

Signed-off-by: Sergey V. Lobanov <[email protected]>

ia

Signed-off-by: Sergey V. Lobanov <[email protected]>
  • Loading branch information
svlobanov committed May 29, 2024
1 parent bf7b43e commit d911f46
Show file tree
Hide file tree
Showing 18 changed files with 129 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
Build-in-VM:
#if: ${{ false }} # disable for now
if: ${{ false }} # disable for now
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:

# Debian based distros
Build-in-Container-Debian:
#if: ${{ false }} # disable for now
if: ${{ false }} # disable for now
strategy:
fail-fast: false
matrix:
Expand Down
35 changes: 27 additions & 8 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
Test-in-Qemu:
#if: ${{ false }} # disable for now
if: ${{ false }} # disable for now
runs-on: ubuntu-24.04
name: Test in Qemu (${{ matrix.distro }})
strategy:
Expand Down Expand Up @@ -203,7 +203,10 @@ jobs:
NEEDRESTART_SUSPEND=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true sudo -E apt -y install
git build-essential cmake gcc linux-headers-`uname -r`
libpcre3-dev libssl-dev liblua5.1-0-dev kmod python3-pip
iproute2 ppp pppoe isc-dhcp-client
iproute2 ppp pppoe isc-dhcp-client dkms debhelper devscripts
- name: Install additional build tools (using apt) (for some OS)
run: NEEDRESTART_SUSPEND=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true sudo -E apt -y install dh-dkms || exit 0

- name: Install testing tools (using pip)
run: >
Expand All @@ -217,22 +220,38 @@ jobs:
- name: mkdir build
run: mkdir build

- name: cmake
- name: cmake (without drivers)
working-directory: ./build
run: >
cmake -DBUILD_IPOE_DRIVER=TRUE -DBUILD_VLAN_MON_DRIVER=TRUE -DCMAKE_INSTALL_PREFIX=/usr
cmake -DBUILD_IPOE_DRIVER=FALSE -DBUILD_VLAN_MON_DRIVER=FALSE -DCMAKE_INSTALL_PREFIX=/usr
-DKDIR=/usr/src/linux-headers-`uname -r`
-DLUA=TRUE -DSHAPER=TRUE -DRADIUS=TRUE ..
- name: make && make install
- name: make && make install (without drivers)
working-directory: ./build
run: make && sudo make install

- name: build dkms package for ipoe
working-directory: ./drivers/dkms/ipoe
run: |
cp -f ../../../build/version.h src/
debuild -us -uc -tc -b
- name: build dkms package for vlan_mon
working-directory: ./drivers/dkms/vlan_mon
run: |
cp -f ../../../build/version.h src/
debuild -us -uc -tc -b
- name: install ipoe and vlan_mon via dkms
working-directory: ./drivers/dkms
run: NEEDRESTART_SUSPEND=1 DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true sudo -E apt -y install ./*.deb

- name: Insert and check kernel modules (ipoe and vlan-mon)
# if: ${{ false }}
run: |
sudo insmod build/drivers/vlan_mon/driver/vlan_mon.ko
sudo insmod build/drivers/ipoe/driver/ipoe.ko
sudo modprobe vlan_mon
sudo modprobe ipoe
lsmod | grep ipoe
lsmod | grep vlan_mon
Expand All @@ -242,7 +261,7 @@ jobs:
run: sudo python3 -m pytest -Wall -v

Test-in-GH-Coverage:
#if: ${{ false }} # disable for now
if: ${{ false }} # disable for now
strategy:
fail-fast: false
matrix:
Expand Down
8 changes: 8 additions & 0 deletions drivers/dkms/ipoe/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Building Debian DKMS pacakge

Build accel-ppp without drivers, then from this level directory, execute:

```
cp ../../../build/version.h src/
debuild -us -uc -tc -b
```
5 changes: 5 additions & 0 deletions drivers/dkms/ipoe/debian/accel-ppp-ipoe-dkms.dkms
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PACKAGE_NAME="accel-ppp-ipoe"
PACKAGE_VERSION="#MODULE_VERSION"
AUTOINSTALL=yes
BUILT_MODULE_NAME="ipoe"
DEST_MODULE_LOCATION="/updates/dkms"
5 changes: 5 additions & 0 deletions drivers/dkms/ipoe/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accel-ppp-ipoe-dkms (1.13.0) unstable; urgency=low

* First ipoe dkms package

-- Sergey V. Lobanov <[email protected]> Wed, 29 May 2024 11:30:13 +0200
1 change: 1 addition & 0 deletions drivers/dkms/ipoe/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
11 changes: 11 additions & 0 deletions drivers/dkms/ipoe/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Source: accel-ppp-ipoe-dkms
Maintainer: Dmitry Kozlov <[email protected]>
Build-Depends: debhelper (>= 10), dkms
Homepage: https://www.accel-ppp.io/

Package: accel-ppp-ipoe-dkms
Architecture: all
Priority: optional
Section: kernel
Depends: dkms (>= 1.95), linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic | linux-headers, ${misc:Depends}
Description: DKMS source for the accel-ppp-ipoe driver
18 changes: 18 additions & 0 deletions drivers/dkms/ipoe/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

%:
dh $@ --with dkms

override_dh_install:
dh_install src/* usr/src/accel-ppp-ipoe-$(DEB_VERSION_UPSTREAM)/

override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM)

override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:
1 change: 1 addition & 0 deletions drivers/dkms/ipoe/src
8 changes: 8 additions & 0 deletions drivers/dkms/vlan_mon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
## Building Debian DKMS pacakge

Build accel-ppp without drivers, then from this level directory, execute:

```
cp ../../../build/version.h src/
debuild -us -uc -tc -b
```
5 changes: 5 additions & 0 deletions drivers/dkms/vlan_mon/debian/accel-ppp-vlan-mon-dkms.dkms
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
PACKAGE_NAME="accel-ppp-vlan-mon"
PACKAGE_VERSION="#MODULE_VERSION#"
AUTOINSTALL=yes
BUILT_MODULE_NAME="vlan_mon"
DEST_MODULE_LOCATION="/updates/dkms"
5 changes: 5 additions & 0 deletions drivers/dkms/vlan_mon/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accel-ppp-vlan-mon-dkms (1.13.0) unstable; urgency=low

* First vlan_mon dkms package

-- Sergey V. Lobanov <[email protected]> Wed, 29 May 2024 11:30:13 +0200
1 change: 1 addition & 0 deletions drivers/dkms/vlan_mon/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
11 changes: 11 additions & 0 deletions drivers/dkms/vlan_mon/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Source: accel-ppp-vlan-mon-dkms
Maintainer: Dmitry Kozlov <[email protected]>
Build-Depends: debhelper (>= 10), dkms
Homepage: https://www.accel-ppp.io/

Package: accel-ppp-vlan-mon-dkms
Architecture: all
Priority: optional
Section: kernel
Depends: dkms (>= 1.95), linux-headers-686-pae | linux-headers-amd64 | linux-headers-generic | linux-headers, ${misc:Depends}
Description: DKMS source for the accel-ppp-vlan-mon driver
18 changes: 18 additions & 0 deletions drivers/dkms/vlan_mon/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

%:
dh $@ --with dkms

override_dh_install:
dh_install src/* usr/src/accel-ppp-vlan-mon-$(DEB_VERSION_UPSTREAM)/

override_dh_dkms:
dh_dkms -V $(DEB_VERSION_UPSTREAM)

override_dh_auto_configure:
override_dh_auto_build:
override_dh_auto_test:
override_dh_auto_install:
override_dh_auto_clean:
1 change: 1 addition & 0 deletions drivers/dkms/vlan_mon/src
1 change: 1 addition & 0 deletions drivers/ipoe/ipoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -2016,3 +2016,4 @@ static void __exit ipoe_fini(void)
module_init(ipoe_init);
module_exit(ipoe_fini);
MODULE_LICENSE("GPL");
MODULE_VERSION(ACCEL_PPP_VERSION);
1 change: 1 addition & 0 deletions drivers/vlan_mon/vlan_mon.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,7 @@ static void __exit vlan_mon_fini(void)
module_init(vlan_mon_init);
module_exit(vlan_mon_fini);
MODULE_LICENSE("GPL");
MODULE_VERSION(ACCEL_PPP_VERSION);
module_param(autoclean, int, 0);
//MODULE_PARAM_DESC(autoclean, "automaticaly remove created vlan interfaces on restart");

0 comments on commit d911f46

Please sign in to comment.