Skip to content

Commit

Permalink
Merge pull request #827 from pi-hole/release/v5.1
Browse files Browse the repository at this point in the history
Pi-hole FTL v5.1
  • Loading branch information
PromoFaux authored Jul 15, 2020
2 parents 3d7c095 + 9d3d1e3 commit b522646
Show file tree
Hide file tree
Showing 66 changed files with 11,136 additions and 6,258 deletions.
17 changes: 17 additions & 0 deletions .circleci/build-CI.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
# Pi-hole: A black hole for Internet advertisements
# (c) 2020 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# FTL Engine
# Build script for Circle CI
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.

rm -rf cmake/ && \
mkdir cmake && \
cd cmake && \
cmake -DSTATIC="${1}" .. && \
cmake --build . -- GIT_BRANCH="${2}" GIT_TAG="${3}" CIRCLE_JOB="${4}" -j 4 && \
mv pihole-FTL ../
11 changes: 6 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,21 @@ version: 2
- run:
name: "Setup"
command: |
make clean
if [[ $CIRCLE_JOB == *"qemu"* ]] ; then sudo docker run --rm --privileged multiarch/qemu-user-static:register --reset ; fi
- run:
name: "Build"
no_output_timeout: 30m
command: |
BRANCH=$([ -z "$CIRCLE_TAG" ] && echo "$CIRCLE_BRANCH" || echo "master")
[[ $CIRCLE_JOB == *"qemu"* ]] && DOCKERIFNEEDED="docker run --rm -v $(pwd):/workspace -w /workspace pihole/ftl-build:arm-qemu "
$DOCKERIFNEEDED make GIT_BRANCH="${BRANCH}" GIT_TAG="${CIRCLE_TAG}" STATIC="${STATIC}"
file pihole-FTL
$DOCKERIFNEEDED bash .circleci/build-CI.sh "${STATIC}" "${BRANCH}" "${CIRCLE_TAG}" "${CIRCLE_JOB}"
- run:
name: "Binary checks"
command: bash test/arch_test.sh
- run:
name: "Upload"
command: |
[[ "$CIRCLE_PROJECT_REPONAME" == "FTL" && "$CIRCLE_PROJECT_USERNAME" == "pi-hole" ]] || exit 0
[ -z "${CIRCLE_PR_USERNAME}" ] || exit 0
DIR="${CIRCLE_TAG:-${CIRCLE_BRANCH}}"
mv pihole-FTL "${BIN_NAME}"
sha1sum pihole-FTL-* > ${BIN_NAME}.sha1
Expand All @@ -35,7 +36,7 @@ version: 2
.docker_template: &docker_template
docker:
- image: pihole/ftl-build:v1.0-$CIRCLE_JOB
- image: pihole/ftl-build:v1.3-$CIRCLE_JOB
<<: *job_steps

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ pihole-FTL
version*

# CMake files
/CMakeLists.txt
/cmake-build-debug/
/cmake-build-release/

# IDE files
.idea/
Expand Down
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Pi-hole: A black hole for Internet advertisements
# (c) 2020 Pi-hole, LLC (https://pi-hole.net)
# Network-wide ad blocking via your own hardware.
#
# FTL Engine
# /CMakeList.txt
#
# This file is copyright under the latest version of the EUPL.
# Please see LICENSE file for your rights under this license.

cmake_minimum_required(VERSION 2.8.12)
project(PIHOLE_FTL C)

set(DNSMASQ_VERSION pi-hole-2.81)

add_subdirectory(src)
2 changes: 1 addition & 1 deletion FTLtest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

function GetFTLData {
# Open connection to FTL
exec 3<>/dev/tcp/localhost/"$(cat /var/run/pihole-FTL.port)"
exec 3<>/dev/tcp/localhost/"$(cat /run/pihole-FTL.port)"

# Test if connection is open
if { true >&3; } 2> /dev/null; then
Expand Down
201 changes: 0 additions & 201 deletions Makefile

This file was deleted.

Loading

0 comments on commit b522646

Please sign in to comment.