forked from coolsnowwolf/packages
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86d4ea8
commit d17588d
Showing
2,707 changed files
with
247,745 additions
and
625 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Please make sure that the issue subject starts with `<package-name>: ` | ||
|
||
This repo here is only for packages maintained in this repo. For base packages residing in the same repo as the build system and maintained by core devs, please consider opening tickets there for more timely responses | ||
|
||
- OpenWrt base system: https://bugs.openwrt.org | ||
- Most LuCI packages: https://github.com/openwrt/luci/issues | ||
|
||
# Issue template (remove lines from top till here) | ||
|
||
Maintainer: @\<github-user> (find it by checking history of the package Makefile) | ||
Environment: (put here arch, model, OpenWrt version) | ||
|
||
Description: | ||
|
||
``` | ||
Formating code blocks by wrapping them with pairs of ``` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Maintainer: me / @\<github-user> (find it by checking history of the package Makefile) | ||
Compile tested: (put here arch, model, OpenWrt version) | ||
Run tested: (put here arch, model, OpenWrt version, tests done) | ||
|
||
Description: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
-----BEGIN PGP PUBLIC KEY BLOCK----- | ||
Comment: LEDE GnuPG key for unattended build jobs | ||
|
||
mQINBFeXZ7wBEAC3QZ+jhWrdj2XW9AdZpZrgHETZCW7lXxI3pJ2kS4UXNq+40KR2 | ||
GJOds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OV0MOBwFtZ6fElJaQEQV49JiQmgTzALDgXD0ACpT5qoQYCBTwuz | ||
m2D93ekfMnzxF8PmwW6a2czrG1KoRir2EayhgEoOJuWHLneb5nUc7X3krGNSJ3my | ||
+lMw2QA3wIX7EAS6JJUnZFp7wawecdCekRF9ZE1Z/ZBiUZR17DkbAoYjEYZFxiXA | ||
cG6sFEM9uTG+y91RcQPq8tY+jw2d76ZjHSnoKjnP2VxsmtiWQ7yLj/5tjrVzQftI | ||
bbQQTK4V4O4aV2Y1wgkDbNPNJ6t0biQkHQv+4vaLMonOfMgGdWdYJ4hE9nlt61Aq | ||
GidOnyMxOb+2XpVypOoOPcTyTqe8BUjCcvHQwukZLk3XE7OQoR0wZBFhOr4JCYzT | ||
xIz9XYrSykZgkZMp8O4zbP+j1ZTXtJEvvPHjOS1HkL1O1H+W98dnl+oQMNQhHvvE | ||
6UfWEolfuWvBpfP12pUnRQAAyCBql4JAFeoCJEdJGkz8oFOFxv0kCpd7JM1gWEs2 | ||
u0w61+5MelmliHImWiyhgV4XyKW6jeKWIpe9E5L7b8SPI5HHdT7opy3G7aD1XI3k | ||
jdaIiMnJbq0nSvc5VqRE7Uv0EEcepvFeiuYHYydluxRyNf/ts2JskfEnsOc1JiS+ | ||
GPeIoGmFL85qtFOzc4sqYQGhLj9iMRfmNw== | ||
=W2Tk | ||
-----END PGP PUBLIC KEY BLOCK----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-----BEGIN PGP PUBLIC KEY BLOCK----- | ||
Comment: LEDE 17.01 "Reboot" public key | ||
|
||
mQINBFh9DQ8BEACmjR9z4mEXjTWBTcqHI8U38III55qStU4zX4mtYEm8KjaNyBu0 | ||
F8ghe22IAPQcHuvQh0lzr2AoTYi+ZAUlHrLb3s+YdJJD2KoSD1nXW8PgtoT92tai | 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L0nU | ||
BfVIhU5cXMZ6VtVg5Ly6NqUbrhZzVVl8DMnu5z4MOLZWseob4LhK5W0v+DUTezJS | ||
Cvei+woJ3SIy0CLXe6eDKwbCS5kCaoNbExeTnSz7/Mg14NjREhtWkq79rnHrH9MV | ||
QAXyjmd3q0D5sDLzk8nQ3fGaH1Zg+o+VECkwEwz4ypctXqRAcHyIkYHmv8rFYlQY | ||
dJlfs1NgZzk9EWfZ0/RLUdqNx6beKm27r2W1j+gcaM01sk5q9TPZeuNHh8psFlCD | ||
b5mq6XBstA9NwN9pg5zS+UkfjjMU5FiBIEVv4Lt/dblNkjID/+XUBkHpSAz13GDW | ||
k0ElkSBgBvz8TSm68EUGTfTVhK21x+1x15/8AUoV8V+4txncMhnJNmrEcKolnMeF | ||
96xgcoHpPszlHxjiwS6hrFPDyhfYwU9plDI7ojcIleqK98XjRHY= | ||
=aN5O | ||
-----END PGP PUBLIC KEY BLOCK----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
git: | ||
depth: 10 | ||
quiet: true | ||
|
||
language: c | ||
dist: trusty | ||
sudo: false | ||
cache: | ||
directories: | ||
- $HOME/sdk | ||
|
||
before_script: | ||
- ./.travis_do.sh download_sdk | ||
|
||
script: | ||
- ./.travis_do.sh test_packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,241 @@ | ||
#!/bin/bash | ||
# | ||
# MIT Alexander Couzens <[email protected]> | ||
|
||
set -e | ||
|
||
SDK_HOME="$HOME/sdk" | ||
SDK_PATH=https://downloads.lede-project.org/snapshots/targets/ar71xx/generic/ | ||
SDK=-sdk-ar71xx-generic_ | ||
PACKAGES_DIR="$PWD" | ||
|
||
echo_red() { printf "\033[1;31m$*\033[m\n"; } | ||
echo_green() { printf "\033[1;32m$*\033[m\n"; } | ||
echo_blue() { printf "\033[1;34m$*\033[m\n"; } | ||
|
||
exec_status() { | ||
PATTERN="$1" | ||
shift | ||
while :;do sleep 590;echo "still running (please don't kill me Travis)";done & | ||
("$@" 2>&1) | tee logoutput | ||
R=${PIPESTATUS[0]} | ||
kill $! && wait $! 2>/dev/null | ||
if [ $R -ne 0 ]; then | ||
echo_red "=> '$*' failed (return code $R)" | ||
return 1 | ||
fi | ||
if grep -qE "$PATTERN" logoutput; then | ||
echo_red "=> '$*' failed (log matched '$PATTERN')" | ||
return 1 | ||
fi | ||
|
||
echo_green "=> '$*' successful" | ||
return 0 | ||
} | ||
|
||
get_sdk_file() { | ||
if [ -e "$SDK_HOME/sha256sums" ] ; then | ||
grep -- "$SDK" "$SDK_HOME/sha256sums" | awk '{print $2}' | sed 's/*//g' | ||
else | ||
false | ||
fi | ||
} | ||
|
||
# download will run on the `before_script` step | ||
# The travis cache will be used (all files under $HOME/sdk/). Meaning | ||
# We don't have to download the file again | ||
download_sdk() { | ||
mkdir -p "$SDK_HOME" | ||
cd "$SDK_HOME" | ||
|
||
echo_blue "=== download SDK" | ||
wget "$SDK_PATH/sha256sums" -O sha256sums | ||
wget "$SDK_PATH/sha256sums.gpg" -O sha256sums.asc | ||
|
||
# LEDE Build System (LEDE GnuPG key for unattended build jobs) | ||
gpg --import $PACKAGES_DIR/.keys/626471F1.asc | ||
echo '54CC74307A2C6DC9CE618269CD84BCED626471F1:6:' | gpg --import-ownertrust | ||
# LEDE Release Builder (17.01 "Reboot" Signing Key) | ||
gpg --import $PACKAGES_DIR/.keys/D52BBB6B.asc | ||
echo 'B09BE781AE8A0CD4702FDCD3833C6010D52BBB6B:6:' | gpg --import-ownertrust | ||
|
||
echo_blue "=== Verifying sha256sums signature" | ||
gpg --verify sha256sums.asc | ||
echo_blue "=== Verified sha256sums signature." | ||
if ! grep -- "$SDK" sha256sums > sha256sums.small ; then | ||
echo_red "=== Can not find $SDK file in sha256sums." | ||
echo_red "=== Is \$SDK out of date?" | ||
false | ||
fi | ||
|
||
# if missing, outdated or invalid, download again | ||
if ! sha256sum -c ./sha256sums.small ; then | ||
local sdk_file | ||
sdk_file="$(get_sdk_file)" | ||
echo_blue "=== sha256 doesn't match or SDK file wasn't downloaded yet." | ||
echo_blue "=== Downloading a fresh version" | ||
wget "$SDK_PATH/$sdk_file" -O "$sdk_file" | ||
fi | ||
|
||
# check again and fail here if the file is still bad | ||
echo_blue "Checking sha256sum a second time" | ||
if ! sha256sum -c ./sha256sums.small ; then | ||
echo_red "=== SDK can not be verified!" | ||
false | ||
fi | ||
echo_blue "=== SDK is up-to-date" | ||
} | ||
|
||
# test_package will run on the `script` step. | ||
# test_package call make download check for very new/modified package | ||
test_packages2() { | ||
local commit_range=$TRAVIS_COMMIT_RANGE | ||
if [ -z "$TRAVIS_PULL_REQUEST_SHA" ]; then | ||
echo_blue "Using only the latest commit, since we're not in a Pull Request" | ||
commit_range=HEAD~1 | ||
fi | ||
|
||
# search for new or modified packages. PKGS will hold a list of package like 'admin/muninlite admin/monit ...' | ||
PKGS=$(git diff --diff-filter=d --name-only "$commit_range" | grep 'Makefile$' | grep -v '/files/' | awk -F'/Makefile' '{ print $1 }') | ||
|
||
if [ -z "$PKGS" ] ; then | ||
echo_blue "No new or modified packages found!" | ||
return 0 | ||
fi | ||
|
||
echo_blue "=== Found new/modified packages:" | ||
for pkg in $PKGS ; do | ||
echo "===+ $pkg" | ||
done | ||
|
||
echo_blue "=== Setting up SDK" | ||
tmp_path=$(mktemp -d) | ||
cd "$tmp_path" | ||
tar Jxf "$SDK_HOME/$(get_sdk_file)" --strip=1 | ||
|
||
# use github mirrors to spare lede servers | ||
cat > feeds.conf <<EOF | ||
src-git base https://github.com/lede-project/source.git | ||
src-link packages $PACKAGES_DIR | ||
src-git luci https://github.com/openwrt/luci.git | ||
EOF | ||
|
||
# enable BUILD_LOG | ||
sed -i '1s/^/config BUILD_LOG\n\tbool\n\tdefault y\n\n/' Config-build.in | ||
|
||
./scripts/feeds update -a > /dev/null | ||
./scripts/feeds install -a > /dev/null | ||
make defconfig > /dev/null | ||
echo_blue "=== Setting up SDK done" | ||
|
||
RET=0 | ||
# E.g: pkg_dir => admin/muninlite | ||
# pkg_name => muninlite | ||
for pkg_dir in $PKGS ; do | ||
pkg_name=$(echo "$pkg_dir" | awk -F/ '{ print $NF }') | ||
echo_blue "=== $pkg_name: Starting quick tests" | ||
|
||
exec_status '^ERROR' make "package/$pkg_name/download" V=s || RET=1 | ||
exec_status '^ERROR' make "package/$pkg_name/check" V=s || RET=1 | ||
|
||
echo_blue "=== $pkg_name: quick tests done" | ||
done | ||
|
||
[ $RET -ne 0 ] && return $RET | ||
|
||
for pkg_dir in $PKGS ; do | ||
pkg_name=$(echo "$pkg_dir" | awk -F/ '{ print $NF }') | ||
echo_blue "=== $pkg_name: Starting compile test" | ||
|
||
# we can't enable verbose built else we often hit Travis limits | ||
# on log size and the job get killed | ||
exec_status '^ERROR' make "package/$pkg_name/compile" -j3 || RET=1 | ||
|
||
echo_blue "=== $pkg_name: compile test done" | ||
|
||
echo_blue "=== $pkg_name: begin compile logs" | ||
for f in $(find logs/package/feeds/packages/$pkg_name/ -type f); do | ||
echo_blue "Printing last 200 lines of $f" | ||
tail -n200 "$f" | ||
done | ||
echo_blue "=== $pkg_name: end compile logs" | ||
|
||
echo_blue "=== $pkg_name: begin packages sizes" | ||
du -ba bin/ | ||
echo_blue "=== $pkg_name: end packages sizes" | ||
done | ||
|
||
return $RET | ||
} | ||
|
||
test_commits() { | ||
RET=0 | ||
if [ -z "$TRAVIS_PULL_REQUEST_SHA" ]; then | ||
echo_blue "Skipping commits tests (not in a Pull Request)" | ||
return 0 | ||
fi | ||
for commit in $(git rev-list ${TRAVIS_COMMIT_RANGE/.../..}); do | ||
echo_blue "=== Checking commit '$commit'" | ||
if git show --format='%P' -s $commit | grep -qF ' '; then | ||
echo_red "Pull request should not include merge commits" | ||
RET=1 | ||
fi | ||
|
||
author="$(git show -s --format=%aN $commit)" | ||
if echo $author | grep -q '\S\+\s\+\S\+'; then | ||
echo_green "Author name ($author) seems ok" | ||
else | ||
echo_red "Author name ($author) need to be your real name 'firstname lastname'" | ||
RET=1 | ||
fi | ||
|
||
subject="$(git show -s --format=%s $commit)" | ||
if echo "$subject" | grep -q -e '^[0-9A-Za-z,/_-]\+: ' -e '^Revert '; then | ||
echo_green "Commit subject line seems ok ($subject)" | ||
else | ||
echo_red "Commit subject line MUST start with '<package name>: ' ($subject)" | ||
RET=1 | ||
fi | ||
|
||
body="$(git show -s --format=%b $commit)" | ||
sob="$(git show -s --format='Signed-off-by: %aN <%aE>' $commit)" | ||
if echo "$body" | grep -qF "$sob"; then | ||
echo_green "Signed-off-by match author" | ||
else | ||
echo_red "Signed-off-by is missing or doesn't match author (should be '$sob')" | ||
RET=1 | ||
fi | ||
done | ||
|
||
return $RET | ||
} | ||
|
||
test_packages() { | ||
test_commits && test_packages2 || return 1 | ||
} | ||
|
||
echo_blue "=== Travis ENV" | ||
env | ||
echo_blue "=== Travis ENV" | ||
|
||
if [ -n "$TRAVIS_PULL_REQUEST_SHA" ]; then | ||
while true; do | ||
# if clone depth is too small, git rev-list / diff return incorrect or empty results | ||
C="$(git rev-list ${TRAVIS_COMMIT_RANGE/.../..} | tail -n1)" 2>/dev/null | ||
[ -n "$C" -a "$C" != "a22de9b74cf9579d1ce7e6cf1845b4afa4277b00" ] && break | ||
echo_blue "Fetching 50 commits more" | ||
git fetch origin --deepen=50 | ||
done | ||
fi | ||
|
||
if [ $# -ne 1 ] ; then | ||
cat <<EOF | ||
Usage: $0 (download_sdk|test_packages) | ||
download_sdk - download the SDK to $HOME/sdk.tar.xz | ||
test_packages - do a make check on the package | ||
EOF | ||
exit 1 | ||
fi | ||
|
||
$@ |
Oops, something went wrong.