Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 202510
  • master
  • 202406
  • 202304
  • ci_docker_preperation
  • 202206
  • 202110
  • 202109
  • 202108
  • 202104
  • 202101
  • 202012
  • 202011
  • 202008
  • 202005
  • 202004
  • Aufteilung-Lohne
  • 202002
  • 20191001_hotfix
  • 201912
  • new-patch-to-solve-the-problems-with-ff05-address-foo
  • 20191020
  • update-modules
  • revert-a7fab921
  • ffms-abziehen
  • 201910
  • offline-ssid-jetzt-aber-wirklich
  • offline-ssid-neu2
  • offline-ssid-neu
  • 201909
  • 201908
  • 201906
  • 201905
  • 201904
  • 201903
  • remove-stefans-invalid-key
  • polygone-shaped-domains
  • patch-1
  • offline-ssid
  • 201807
  • add-lingen-to-hood-grafschaft-bentheim
  • 201804
  • 201803
  • 201802
  • tunneldigger-update
  • 201712
  • 201711
  • 201710
  • v2017.1.x-fix
  • 201708
  • 201706
  • 201705
  • hoodselector_IEEE802.11s
  • johannes/201704_2
  • 201704
  • johannes/201704
  • johannes/201703
  • 201702
  • 201701
  • 1.2.1
  • 1.2
  • 1.1.2
  • 1.1
  • 1.0
  • 0.9
  • 0.5.5.1
  • 0.5.5.2
  • 0.5.5.3
  • 0.5.5.4
  • 0.5.6
  • 0.5.6.1
  • 0.5.6.2
  • 0.5.6.3
  • 20170125
  • 20170222
  • 20170409
  • 20170410
  • 20170530
  • 20170629
  • 20170822
  • 20171211
  • 20171216
  • 20171220
  • 20180225
  • 20180318
  • 20180403
  • 20180413
  • 20180709
  • 20181124
  • 20190808
  • 20191001
  • 20191024
  • 20191224
  • 20200212
  • 20200525
  • 20200820
  • 20201102
  • 20201128
  • 20201207
  • 20210427
  • 20210915
  • rc/20201207
  • rc/20201221
  • rc/20210103
  • rc/20210427
  • rc/20210810
  • rc/20210915
  • rc/20211030
  • rc/20220608
  • rc/20230407
  • rc/20230409
  • rc/20230421
  • rc/20240617
  • rc/20251023
  • stable/20201128
  • stable/20201221
  • stable/20210103
  • stable/20210915
  • stable/20220608
  • v0.5.3
  • v0.5.6
  • v0.6
  • v0.6.1
  • v0.6.2
  • v0.6.3
  • v0.7.1
  • v0.8
  • v0.8.1
  • v0.8.2
  • v0.9
  • v1.0
  • v1.1
  • v1.1-RC0
  • v1.1-RC3
  • v1.1.1
  • v1.2
  • v1.2.1
137 results

Target

Select target project
  • Firmware / siteconf
  • picard / siteconf
  • Johannes Rudolph / siteconf
  • Netmon-SC / siteconf
  • Clemens John / siteconf
  • Lorenz Wenner / siteconf
  • Florian Lottes / siteconf
  • Jens Ellerbrock / siteconf
8 results
Select Git revision
  • master
  • 201906
  • 201905
  • Aufteilung-Lohne
  • 201904
  • 201903
  • remove-stefans-invalid-key
  • polygone-shaped-domains
  • offline-ssid-neu
  • patch-1
  • offline-ssid
  • 201807
  • add-lingen-to-hood-grafschaft-bentheim
  • 201804
  • 201803
  • 201802
  • tunneldigger-update
  • 201712
  • 201711
  • 201710
  • v2017.1.x-fix
  • 201708
  • 201706
  • 201705
  • hoodselector_IEEE802.11s
  • johannes/201704_2
  • 201704
  • johannes/201704
  • johannes/201703
  • 201702
  • 201701
  • 1.2.1
  • 1.2
  • 1.1.2
  • 1.1
  • 1.0
  • 0.9
  • 0.5.5.1
  • 0.5.5.2
  • 0.5.5.3
  • 0.5.5.4
  • 0.5.6
  • 0.5.6.1
  • 0.5.6.2
  • 0.5.6.3
  • 20170125
  • 20170222
  • 20170409
  • 20170410
  • 20170530
  • 20170629
  • 20170822
  • 20171211
  • 20171216
  • 20171220
  • 20180225
  • 20180318
  • 20180403
  • 20180413
  • 20180709
  • 20181124
  • 20190628
  • v0.5.3
  • v0.5.6
  • v0.6
  • v0.6.1
  • v0.6.2
  • v0.6.3
  • v0.7.1
  • v0.8
  • v0.8.1
  • v0.8.2
  • v0.9
  • v1.0
  • v1.1
  • v1.1-RC0
  • v1.1-RC3
  • v1.1.1
  • v1.2
  • v1.2.1
80 results
Show changes
48 files
+ 2613
1097
Compare changes
  • Side-by-side
  • Inline

Files

+32 −0
Original line number Diff line number Diff line
#!/bin/bash

# Exit script on error
set -e

# Required environment variables
required_env_vars=(
  "UPSTREAM_GLUON_BRANCH"
  "ECDSA_PRIVAT_KEY"
  "SSH_PRIVATE_KEY"
  "GLUON_COMMIT_ID_FROM_PREVIOUS_RUN"
  "ACCESS_TOKEN"
)

# Function to check if required environment variables are set
check_required_env_vars() {
  for var in "${required_env_vars[@]}"; do
    if [ -z "${!var}" ]; then
      echo "ENV Variable $var is unset"
      exit 1
    fi
  done
  echo "All ENV Variables are present"
}

echo ""
echo "##################################"
echo "Check required environment variables"
echo "##################################"
echo ""

check_required_env_vars
+48 −0
Original line number Diff line number Diff line
#!/bin/bash

# Determine parent directory
PARENT_DIR=$(dirname "$GIT_CLONE_PATH")

# Function to delete contents of the gluon directory except for the site directory
delete_gluon_contents() {
  find "$PARENT_DIR" -mindepth 1 -maxdepth 1 ! \( -name 'site' -o -name 'site.tmp' \) -exec rm -rf {} +
}

# Function to clone the Gluon repository
clone_gluon_repository() {
  git clone https://github.com/freifunk-gluon/gluon.git "$GIT_CLONE_PATH/gluon_temp"
  delete_gluon_contents
  local available_space
  available_space=$(df -h / | awk 'NR==2 {print $4}')  # Get available space in the root directory
  local required_space="200G"  # Set the required minimum space (adjust as needed)
  echo "Available space: $available_space"
  if [[ "$available_space" < "$required_space" ]]; then
    echo "Error: Insufficient disk space. Required at least $required_space, but only $available_space is available."
    exit 1
  fi
  rsync -a "$GIT_CLONE_PATH/gluon_temp/" "$PARENT_DIR"
  rm -rf "$GIT_CLONE_PATH/gluon_temp"

  # Checkout the specified branch
  cd "$PARENT_DIR" || exit
  git checkout "$UPSTREAM_GLUON_BRANCH"
}

# Clone or update Gluon repository
if [ ! -d "$PARENT_DIR/.git" ]; then
  clone_gluon_repository
else
  cd "$PARENT_DIR" || exit

  # Get the current branch in Gluon repository
  CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)

  # Compare the current branch with the specified branch
  if [ "$CURRENT_BRANCH" != "$UPSTREAM_GLUON_BRANCH" ]; then
    # Re-clone the Gluon repository
    clone_gluon_repository
  else
    git fetch origin
    git reset --hard origin/"$UPSTREAM_GLUON_BRANCH"
  fi
fi

.ci/dependencies.sh

0 → 100755
+104 −0
Original line number Diff line number Diff line
#!/bin/bash

# Exit script on error
set -e

# OS Program lists
debian_progarr=(
  shellcheck
  yamllint
  git
  subversion
  python3
  python3-distutils
  build-essential
  gawk
  unzip
  libncurses5-dev
  zlib1g-dev
  libssl-dev
  libelf-dev
  wget
  qemu-utils
  time
  ecdsautils
  rsync
)

arch_progarr=(
  shellcheck
  yamllint
  git
  svn
  python
  python-distutils-extra
  gawk
  unzip
  ncurses
  zlib
  openssl
  wget
  time
  ecdsautils
  rsync
  qemu-base
)

echop() {
  echo "$1 detected ..."
}

command_exists() {
  command -v "$1" > /dev/null 2>&1
}

check_dependencies() {
  local os_name=$1
  local -a progarr=()
  local ret=0

  case $os_name in
    debian)
      progarr=("${debian_progarr[@]}")
      ;;
    arch)
      progarr=("${arch_progarr[@]}")
      ;;
    *)
      echo "OS is not supported"
      exit 1
      ;;
  esac

  for prog in "${progarr[@]}"; do
    if command_exists "$prog"; then
      echop "$prog"
    elif [ "$os_name" == "debian" ] && dpkg -s "$prog" > /dev/null 2>&1; then
      echop "$prog"
    elif [ "$os_name" == "arch" ] && pacman -Qi "$prog" > /dev/null 2>&1; then
      echop "$prog"
    else
      echo "$prog is not installed"
      ret=1
    fi
  done
  return $ret
}

# Main script
echo ""
echo "##################################"
echo "Check dependencies"
echo "##################################"
echo ""


# Determine OS and check dependencies
if [ -f /etc/debian_version ]; then
  check_dependencies "debian"
elif [ -f /etc/arch-release ]; then
  check_dependencies "arch"
else
  echo "OS is not supported"
  exit 1
fi

.ci/deploy.sh

0 → 100755
+25 −0
Original line number Diff line number Diff line
#!/bin/bash

CI_BUILD_REF_NAME="$1"

if ! [ -e ".GLUON_RELEASE" ]; then
	  exit 1
fi
GLUON_RELEASE="$(cat ".GLUON_RELEASE")"
if ! [ -e ".GLUON_AUTOUPDATER_BRANCH" ]; then
		exit 1
fi
GLUON_AUTOUPDATER_BRANCH="$(cat ".GLUON_AUTOUPDATER_BRANCH")"

ssh runner@firmware.ffnw.de -C "rm -rf /var/www/dev/firmware/fastd/nightly/$CI_BUILD_REF_NAME"
ssh runner@firmware.ffnw.de -C "rm -rf /var/www/dev/firmware/l2tp/nightly/$CI_BUILD_REF_NAME"

rsync -av ../output/images/fastd/"$GLUON_RELEASE"/factory/* runner@firmware.ffnw.de:/var/www/dev/firmware/fastd/nightly/"$CI_BUILD_REF_NAME"
rsync -av ../output/images/fastd/"$GLUON_RELEASE"/other/* runner@firmware.ffnw.de:/var/www/dev/firmware/fastd/nightly/"$CI_BUILD_REF_NAME"
rsync -av ../output/images/fastd/"$GLUON_RELEASE"/sysupgrade/* runner@firmware.ffnw.de:/var/www/dev/firmware/fastd/nightly/"$CI_BUILD_REF_NAME"
ssh runner@firmware.ffnw.de -C "ln -sr /var/www/dev/firmware/fastd/nightly/$CI_BUILD_REF_NAME/$GLUON_AUTOUPDATER_BRANCH.manifest /var/www/dev/firmware/fastd/nightly/$CI_BUILD_REF_NAME/manifest"

rsync -av ../output/images/l2tp/"$GLUON_RELEASE"/factory/* runner@firmware.ffnw.de:/var/www/dev/firmware/l2tp/nightly/"$CI_BUILD_REF_NAME"
rsync -av ../output/images/l2tp/"$GLUON_RELEASE"/other/* runner@firmware.ffnw.de:/var/www/dev/firmware/l2tp/nightly/"$CI_BUILD_REF_NAME"
rsync -av ../output/images/l2tp/"$GLUON_RELEASE"/sysupgrade/* runner@firmware.ffnw.de:/var/www/dev/firmware/l2tp/nightly/"$CI_BUILD_REF_NAME"
ssh runner@firmware.ffnw.de -C "ln -sr /var/www/dev/firmware/l2tp/nightly/$CI_BUILD_REF_NAME/$GLUON_AUTOUPDATER_BRANCH.manifest /var/www/dev/firmware/l2tp/nightly/$CI_BUILD_REF_NAME/manifest"

.ci/pre-commit-hook

0 → 100755
+8 −0
Original line number Diff line number Diff line
#!/bin/sh

echo "Executing pre-commit hook..."
gitRootDir=$(git rev-parse --show-toplevel)
if ! "$gitRootDir"/.ci/dependencies.sh ; then exit 1; fi
if ! "$gitRootDir"/.ci/shelllint.sh ; then exit 1; fi
if ! "$gitRootDir"/.ci/yamllint.sh ; then exit 1; fi
exit 0

.ci/shelllint.sh

0 → 100755
+11 −0
Original line number Diff line number Diff line
#!/bin/sh

echo "Running ShellLint..."
ret=0

filelist="$(find . -type d -name .git -prune -o -type f -exec sh -c 'for file do file "$file" | grep -q -E "shell|bash|dash|ksh" && echo "$file"; done' sh {} +)"
for line in $filelist; do
	shellcheck "$line"
	[ $? -eq 1 ] && ret=1
done
exit $ret

.ci/sign.sh

0 → 100755
+36 −0
Original line number Diff line number Diff line
#!/bin/bash

if ! [ -e ".GLUON_RELEASE" ]; then
	exit 1
fi
GLUON_RELEASE="$(cat ".GLUON_RELEASE")"

if ! [ -e ".GLUON_AUTOUPDATER_BRANCH" ]; then
	exit 1
fi
GLUON_AUTOUPDATER_BRANCH="$(cat ".GLUON_AUTOUPDATER_BRANCH")"

ECDSA_PRIVAT_KEY="$1"
echo "$ECDSA_PRIVAT_KEY" > ecdsa.priv
ret=0

echo "$PWD"/ecdsa.priv

if [ -d "../output/images/fastd" ]; then
	echo "Signing fastd manifest..."
	../contrib/sign.sh "$PWD"/ecdsa.priv "$PWD/../output/images/fastd/$GLUON_RELEASE/sysupgrade/$GLUON_AUTOUPDATER_BRANCH.manifest"
	ret=$?
else
	echo "Fastd directory not found."
fi

if [ -d "../output/images/l2tp" ]; then
	echo "Signing l2tp manifest..."
	../contrib/sign.sh "$PWD"/ecdsa.priv "$PWD/../output/images/l2tp/$GLUON_RELEASE/sysupgrade/$GLUON_AUTOUPDATER_BRANCH.manifest"
	ret=$?
else
	echo "L2tp directory not found."
fi

rm ecdsa.priv
exit $ret

.ci/yaml_rules.yaml

0 → 100644
+9 −0
Original line number Diff line number Diff line
---

extends: default

rules:
  line-length:
    level: error
    max: 100
    allow-non-breakable-inline-mappings: true

.ci/yamllint.sh

0 → 100755
+14 −0
Original line number Diff line number Diff line
#!/bin/sh

echo "Running yamllint..."
ret=0

filelist="$(find . -type d -name .git -prune -o -type f -name '*.yaml' -o -name '*.yml')"
for file in $filelist; do
	lint_output="$(yamllint --strict -d ./.ci/yaml_rules.yaml "$file")"
	if [ -n "$lint_output" ]; then
		echo "$lint_output"
		ret=1
	fi
done
exit $ret
+1 −1
Original line number Diff line number Diff line
.GLUON_BRANCH
.GLUON_AUTOUPDATER_BRANCH
.GLUON_RELEASE
.patched
.prepare