summaryrefslogtreecommitdiff
path: root/scripts/package-build/hostap
diff options
context:
space:
mode:
authorViacheslav Hletenko <v.gletenko@vyos.io>2024-09-06 10:45:27 +0000
committerViacheslav Hletenko <v.gletenko@vyos.io>2024-09-06 11:34:08 +0000
commitc9a5a93834fce33f1e999dd50381cb7ff9e5fabb (patch)
tree26d03e228ca55acc5fc29d4ad18e8331b79e8605 /scripts/package-build/hostap
parent70122746469e930a6775e0c42c4d1fd30bc6d514 (diff)
downloadvyos-build-c9a5a93834fce33f1e999dd50381cb7ff9e5fabb.tar.gz
vyos-build-c9a5a93834fce33f1e999dd50381cb7ff9e5fabb.zip
T6674: Add build-scrips for packages without Jenkins
Add build scripts for .deb packages without Jenkins. To exclude Jenkins we need some place where we can put new builds-scripts to run in parallel (old/new) during meantime. We will deprecate old Jenkins package builds in the future.
Diffstat (limited to 'scripts/package-build/hostap')
-rw-r--r--scripts/package-build/hostap/.gitignore7
-rw-r--r--scripts/package-build/hostap/README.md4
l---------scripts/package-build/hostap/build.py1
-rwxr-xr-xscripts/package-build/hostap/build.sh38
-rw-r--r--scripts/package-build/hostap/package.toml12
5 files changed, 62 insertions, 0 deletions
diff --git a/scripts/package-build/hostap/.gitignore b/scripts/package-build/hostap/.gitignore
new file mode 100644
index 00000000..f9c7eb32
--- /dev/null
+++ b/scripts/package-build/hostap/.gitignore
@@ -0,0 +1,7 @@
+hostap/
+wpa/
+*.buildinfo
+*.build
+*.changes
+*.deb
+*.dsc
diff --git a/scripts/package-build/hostap/README.md b/scripts/package-build/hostap/README.md
new file mode 100644
index 00000000..63119c0c
--- /dev/null
+++ b/scripts/package-build/hostap/README.md
@@ -0,0 +1,4 @@
+# build
+```
+python3 build.py
+```
diff --git a/scripts/package-build/hostap/build.py b/scripts/package-build/hostap/build.py
new file mode 120000
index 00000000..3c76af73
--- /dev/null
+++ b/scripts/package-build/hostap/build.py
@@ -0,0 +1 @@
+../build.py \ No newline at end of file
diff --git a/scripts/package-build/hostap/build.sh b/scripts/package-build/hostap/build.sh
new file mode 100755
index 00000000..c356672a
--- /dev/null
+++ b/scripts/package-build/hostap/build.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+CWD=$(pwd)
+set -e
+
+SRC=hostap
+SRC_DEB=wpa
+
+if [ ! -d ${SRC} ]; then
+ echo "${SRC} directory does not exists, please 'git clone'"
+ exit 1
+fi
+if [ ! -d ${SRC_DEB} ]; then
+ echo "${SRC_DEB} directory does not exists, please 'git clone'"
+ exit 1
+fi
+
+echo "I: Copy Debian build instructions"
+cp -a ${SRC_DEB}/debian ${SRC}
+# Preserve Debian's default of allowing TLSv1.0 and legacy renegotiation for
+# compatibility with networks that use legacy crypto
+cat > ${SRC}/debian/patches/series << EOF
+allow-tlsv1.patch
+allow-legacy-renegotiation.patch
+EOF
+
+# Build Debian package
+cd ${SRC}
+
+echo "I: Ensure Debian build dependencies are met"
+sudo mk-build-deps --install --tool "apt-get --yes --no-install-recommends" -Ppkg.wpa.nogui,noudeb
+
+echo "I: Create new Debian Package version"
+version="$(git describe --tags | tr _ .)"
+dch -v ${version:7} "New version to support AES-GCM-256 for MACsec" -b
+
+echo "I: Build Debian hostap Package"
+DEB_CPPFLAGS_SET="-Wno-use-after-free -Wno-deprecated-declarations" \
+ dpkg-buildpackage -us -uc -tc -b -Ppkg.wpa.nogui,noudeb
diff --git a/scripts/package-build/hostap/package.toml b/scripts/package-build/hostap/package.toml
new file mode 100644
index 00000000..cb40710b
--- /dev/null
+++ b/scripts/package-build/hostap/package.toml
@@ -0,0 +1,12 @@
+[[packages]]
+name = "wpa"
+commit_id = "debian/2%2.10-12"
+scm_url = "https://salsa.debian.org/debian/wpa"
+build_cmd = "/bin/true"
+
+[[packages]]
+name = "hostap"
+commit_id = "e7172e26d"
+scm_url = "git://w1.fi/srv/git/hostap.git"
+build_cmd = "cd ..; y | ./build.sh"
+