2 on: [push, pull_request]
9 defconfig_name: [qemu_x86_defconfig, qemu_x86_64_defconfig, raspberrypi4_defconfig, raspberrypi4_64_defconfig, qemu_ppc64le_pseries_defconfig, qemu_mips32r2_malta_defconfig, qemu_mips64_malta_defconfig]
10 libc_name: [glibc, uclibc, musl]
12 - name: Checkout Buildroot sources
13 run: git clone --depth=1 --branch=2021.02.3 https://git.busybox.net/buildroot
14 - name: Select latest PPP version
15 working-directory: buildroot/package/pppd
17 # Allow package to build when musl libc is selected
18 sed -i '/depends on !BR2_TOOLCHAIN_USES_MUSL/d' Config.in
19 # Upstream version always needs OpenSSL
20 sed -i '/select BR2_PACKAGE_OPENSSL/c\\select BR2_PACKAGE_OPENSSL' Config.in
21 # Do not check for package hash, so there is no need to compute it
23 # Buildroot patch is already applied upstream
24 rm -f 0001-pppd-Fix-bounds-check.patch
25 # Get package sources from head of master branch
26 sed -i "/PPPD_VERSION =/c\\PPPD_VERSION = ${GITHUB_SHA}" pppd.mk
27 sed -i '/PPPD_SITE =/c\\PPPD_SITE = https://github.com/ppp-project/ppp' pppd.mk
28 sed -i '9iPPPD_SITE_METHOD = git' pppd.mk
29 # Tell Buildroot to run autoreconf.sh
30 sed -i '16iPPPD_AUTORECONF = YES' pppd.mk
31 # Filters feature needs libpcap
32 sed -i '17iPPPD_DEPENDENCIES = libpcap openssl' pppd.mk
33 # Enable verbose build commands and force OpenSSL directory, otherwise the host system one might be used instead of Buildroot one
34 sed -i '18iPPPD_CONF_OPTS = --disable-silent-rules --with-openssl="$(STAGING_DIR)/usr"' pppd.mk
35 # Do not install build artifacts to staging directory
36 sed -i 's/PPPD_INSTALL_STAGING = YES/PPPD_INSTALL_STAGING = NO/' pppd.mk
37 # Delete custom configuration tool, it is now automatically handled by Buildroot
38 sed -i '/PPPD_CONFIGURE_CMDS/,+4d' pppd.mk
39 # Delete custom build rule, it is now generated by Autotools
40 sed -i '/define PPPD_BUILD_CMDS/,+4d' pppd.mk
41 # Delete custom installation to target rule, it is now generated by Autotools
42 sed -i '/define PPPD_INSTALL_TARGET_CMDS/,+27d' pppd.mk
43 # Delete custom staging installation rule as PPP does not need to be installed to staging in this CI
44 sed -i '/define PPPD_INSTALL_STAGING_CMDS/,+3d' pppd.mk
45 # Tell Buildroot that this package uses Autotools
46 sed -i 's/$(eval $(generic-package))/$(eval $(autotools-package))/' pppd.mk
47 - name: Enable PPP build
48 working-directory: buildroot
50 # Enable all Buildroot PPP options as everything is built by upstream build system
51 echo "BR2_PACKAGE_PPPD=y" >> configs/${{ matrix.defconfig_name }}
52 echo "BR2_PACKAGE_PPPD_FILTER=y" >> configs/${{ matrix.defconfig_name }}
53 echo "BR2_PACKAGE_PPPD_RADIUS=y" >> configs/${{ matrix.defconfig_name }}
54 echo "BR2_PACKAGE_PPPD_OVERWRITE_RESOLV_CONF=y" >> configs/${{ matrix.defconfig_name }}
56 if: ${{ matrix.libc_name == 'glibc' }}
57 working-directory: buildroot
58 run: echo "BR2_TOOLCHAIN_BUILDROOT_GLIBC=y" >> configs/${{ matrix.defconfig_name }}
60 if: ${{ matrix.libc_name == 'uclibc' }}
61 working-directory: buildroot
62 run: echo "BR2_TOOLCHAIN_BUILDROOT_UCLIBC=y" >> configs/${{ matrix.defconfig_name }}
64 if: ${{ matrix.libc_name == 'musl' }}
65 working-directory: buildroot
66 run: echo "BR2_TOOLCHAIN_BUILDROOT_MUSL=y" >> configs/${{ matrix.defconfig_name }}
67 - name: Configure Buildroot
68 working-directory: buildroot
69 run: make ${{ matrix.defconfig_name }}
71 working-directory: buildroot