1
0
mirror of https://github.com/SmartHoneybee/ubiquitous-memory synced 2025-10-24 15:23:49 +02:00

Compare commits

...

7 Commits

Author SHA1 Message Date
dependabot[bot]
a9d3978d23 Bump github.com/mattermost/mattermost-server from 5.5.1 to 5.6.0 in /dependabot (#41)
* Bump github.com/mattermost/mattermost-server

Bumps [github.com/mattermost/mattermost-server](https://github.com/mattermost/mattermost-server) from 5.5.1 to 5.6.0.
- [Release notes](https://github.com/mattermost/mattermost-server/releases)
- [Changelog](https://github.com/mattermost/mattermost-server/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mattermost/mattermost-server/compare/v5.5.1...v5.6.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-12-14 23:59:41 +00:00
dependabot[bot]
12213cc988 Bump github.com/mattermost/mattermost-server (#40) 2018-12-06 12:09:00 +00:00
Bee
d1747432be Update .travis.yml (#39) 2018-11-15 23:13:04 +00:00
Bee
30ae5ae434 dependabot (#38) 2018-11-15 21:43:35 +00:00
Bee
4f58e13ed1 docker pull debian:stretch (#35) 2018-10-16 14:16:10 +00:00
Bee
205431da5a Update .travis.yml (#34) 2018-09-19 09:51:35 +00:00
Bee
62ff5c6c21 Update .travis.yml (#33) 2018-09-14 15:47:08 +00:00
7 changed files with 288 additions and 59 deletions

View File

@@ -1,64 +1,47 @@
language: c
dist: trusty
sudo: required
addons:
apt:
sources:
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'
- sourceline: 'deb https://deb.nodesource.com/node_10.x trusty main'
key_url: 'https://deb.nodesource.com/gpgkey/nodesource.gpg.key'
# libpng16-16
- sourceline: 'deb-src http://archive.ubuntu.com/ubuntu xenial universe'
- sourceline: 'deb-src http://archive.ubuntu.com/ubuntu xenial-updates universe'
- sourceline: 'deb-src http://security.ubuntu.com/ubuntu xenial-security universe'
packages:
- nodejs
- yarn
- build-essential
- fakeroot
service:
- docker
env:
global:
- GOV=1.10.3
- GOSHA="fa1b0e45d3b647c252f51f5e1204aba049cde4af177ef9f2181f43004f901035 go${GOV}.linux-amd64.tar.gz"
- GOPATH="${HOME}/go"
- GOROOT="${HOME}/${GOV}/go"
- PATH="${GOROOT}/bin:${PATH}:${GOPATH}/bin"
- SRCROOT="${GOPATH}/src/github.com/mattermost"
- GOARM=7
- DEBIAN_RELEASE='stretch'
- DOCKER_PWD='/root'
- DOCKER_IMAGE="debian:${DEBIAN_RELEASE}"
matrix:
- V=5.2.0
- GOOS='dragonfly' GOARCH='amd64'
- GOOS='freebsd' GOARCH='amd64'
- GOOS='freebsd' GOARCH='arm'
- GOOS='linux' GOARCH='arm'
- GOOS='linux' GOARCH='arm64'
- GOOS='linux' GOARCH='mips'
- GOOS='linux' GOARCH='mips64'
- GOOS='linux' GOARCH='mips64le'
- GOOS='linux' GOARCH='mipsle'
- GOOS='linux' GOARCH='ppc64'
- GOOS='linux' GOARCH='ppc64le'
- GOOS='linux' GOARCH='s390x'
- GOOS='netbsd' GOARCH='amd64'
- GOOS='netbsd' GOARCH='arm'
- GOOS='openbsd' GOARCH='amd64'
- GOOS='openbsd' GOARCH='arm'
before_install:
- install -d "${GOPATH}/bin" "${GOROOT}" "${SRCROOT}/mattermost-"{server,webapp}
# download & extract golang
- wget -q "https://storage.googleapis.com/golang/go${GOV}.linux-amd64.tar.gz"
- sha256sum --check <<< "${GOSHA}"
- tar -C "${HOME}/${GOV}" -xzf "go${GOV}.linux-amd64.tar.gz"
# download & extract mattermost-server
- wget -q "https://github.com/mattermost/mattermost-server/archive/v${V}.tar.gz" -O mattermost-server.tar.gz
- tar -C "${SRCROOT}/mattermost-server" --strip-components=1 -xf mattermost-server.tar.gz
# download & extract mattermost-webapp
- wget -q "https://github.com/mattermost/mattermost-webapp/archive/v${V}.tar.gz" -O mattermost-webapp.tar.gz
- tar -C "${SRCROOT}/mattermost-webapp" --strip-components=1 -xf mattermost-webapp.tar.gz
# (trusty is old:) backport and install libpng16-16
- sudo -E apt-get build-dep -yq libpng16-16
- apt-get --build source libpng16-16
- sudo -E dpkg -i ./libpng16-16_*.deb
- export MATTERMOST_RELEASE="$(grep 'version' dependabot/Gopkg.toml | cut -d'"' -f2)"
- docker pull "${DOCKER_IMAGE}"
- chmod +x build.sh
script:
- make build -C "${SRCROOT}/mattermost-webapp"
# workaround (instead of patch): platform binary is in GOOS_GOARCH, Makefile expects it in linux_amd64
- ln -s "${GOPATH}/bin/linux_arm" "${GOPATH}/bin/linux_amd64"
# adapt and revert reverted commit, https://github.com/mattermost/mattermost-server/pull/8537
- patch -d "${SRCROOT}/mattermost-server" -p1 < "${TRAVIS_BUILD_DIR}/build-release.patch"
# workaround (instead of patch): overwrite GO variable to enforce desired GOARCH
- make config-reset build-linux package-linux -C "${SRCROOT}/mattermost-server" PLUGIN_PACKAGES="" GO="GOARCH=arm $(which go)" BUILD_NUMBER="dev-arm-tag${V}"
# workaround (instead of patch): Makefile creates *-amd64.tar.gz
- mv "${SRCROOT}/mattermost-server/dist/mattermost-team-linux-amd64.tar.gz" "${TRAVIS_BUILD_DIR}/mattermost-${V}-arm.tar.gz"
- sha512sum "${TRAVIS_BUILD_DIR}/mattermost-${V}-arm.tar.gz" | tee "${TRAVIS_BUILD_DIR}/mattermost-${V}-arm.tar.gz.sha512sum"
- f(){ printf ' '; sleep 60; f; }; f &
- docker run --interactive=true --mount="type=bind,source=${PWD},destination=${DOCKER_PWD}" --rm=true --tty=true --workdir="${DOCKER_PWD}" -e DEBIAN_RELEASE -e MATTERMOST_RELEASE -e GOOS -e GOARCH "${DOCKER_IMAGE}" ./build.sh > .build.log 2>&1
after_failure:
- tail -n-9000 .build.log
before_deploy:
- git config --local user.name 'Travis CI'
- git config --local user.email 'travis@travis-ci.org'
- git tag "${MATTERMOST_RELEASE}" || true
deploy:
provider: releases
api_key: "${GITHUB_OAUTH_TOKEN}"
file:
- "${TRAVIS_BUILD_DIR}/mattermost-${V}-arm.tar.gz"
- "${TRAVIS_BUILD_DIR}/mattermost-${V}-arm.tar.gz.sha512sum"
- "${TRAVIS_BUILD_DIR}/mattermost-${MATTERMOST_RELEASE}-${GOOS}-${GOARCH}.tar.gz"
- "${TRAVIS_BUILD_DIR}/mattermost-${MATTERMOST_RELEASE}-${GOOS}-${GOARCH}.tar.gz.sha512sum"
skip_cleanup: true

View File

@@ -1,10 +1,9 @@
# ubiquitous-memory: [Here be dragons][3]
# ubiquitous-memory: [Here be dragons][2]
[![Build Status](https://travis-ci.org/SmartHoneybee/ubiquitous-memory.svg?branch=master)](https://travis-ci.org/SmartHoneybee/ubiquitous-memory)
[Travis CI][0] recipe that builds [Mattermost][1] for Linux on [ARMv7][2]-compatible devices.
[Travis CI][0] recipe that builds [Mattermost][1] for various operating systems and architectures.
[0]: https://travis-ci.org/SmartHoneybee/ubiquitous-memory
[1]: https://mattermost.com/
[2]: https://github.com/golang/go/wiki/GoArm#supported-architectures
[3]: https://en.wikipedia.org/wiki/Here_be_dragons
[2]: https://en.wikipedia.org/wiki/Here_be_dragons

View File

@@ -11,8 +11,8 @@ diff --git a/build/release.mk b/build/release.mk
index 238343e..1b7859f 100644
--- a/build/release.mk
+++ b/build/release.mk
@@ -61,7 +61,7 @@ endif
cp README.md $(DIST_PATH)
@@ -66,7 +66,7 @@ endif
done
@# ----- PLATFORM SPECIFIC -----
-
@@ -20,10 +20,10 @@ index 238343e..1b7859f 100644
@# Make osx package
@# Copy binary
ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64")
@@ -106,7 +106,7 @@ endif
@@ -96,7 +96,7 @@ endif
@# Cleanup
rm -f $(DIST_PATH)/bin/mattermost.exe
rm -f $(DIST_PATH)/bin/platform.exe
rm -f $(DIST_PATH)/prepackaged_plugins/*
-
+package-linux: package
@# Make linux package

100
build.sh Normal file
View File

@@ -0,0 +1,100 @@
#!/bin/sh
set -eux
# build user
BUILD_USER_HOME="${BUILD_USER_HOME:-/build}"
BUILD_USER_NAME="${BUILD_USER_NAME:-build}"
# Debian release used during build
DEBIAN_RELEASE="${DEBIAN_RELEASE:-stretch}"
# Mattermost version to build
MATTERMOST_RELEASE="${MATTERMOST_RELEASE:-v5.4.0}"
# node key id and release
NODE_KEY="${NODE_KEY:-9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280}"
NODE_RELEASE="${NODE_RELEASE:-10}"
if [ "$(id -u)" -eq 0 ]; then # as root user
# create build user, if needed
set +e
if ! id -u "${BUILD_USER_NAME}"; then # create build user
set -e
useradd --create-home --home-dir "${BUILD_USER_HOME}" --skel "${PWD}" \
"${BUILD_USER_NAME}"
fi
set -e
# configure apt
printf 'APT::Install-Recommends "0";' \
> '/etc/apt/apt.conf.d/99-no-install-recommends'
printf 'APT::Install-Suggests "0";' \
> '/etc/apt/apt.conf.d/99-no-install-suggests'
printf 'APT::Get::Assume-Yes "true";' \
> '/etc/apt/apt.conf.d/99-assume-yes'
# update repositories
apt-get update
# dependencies to setup repositories
apt-get install --quiet \
gnupg2 dirmngr apt-transport-https ca-certificates
# receive missing key
apt-key adv --keyserver 'ipv4.pool.sks-keyservers.net' --recv-keys "${NODE_KEY}"
# add required additional repositories
printf 'deb-src http://deb.debian.org/debian %s main' "${DEBIAN_RELEASE}" \
> "/etc/apt/sources.list.d/${DEBIAN_RELEASE}-source.list"
printf 'deb http://deb.debian.org/debian %s-backports main' "${DEBIAN_RELEASE}" \
> "/etc/apt/sources.list.d/${DEBIAN_RELEASE}-backports.list"
printf 'deb https://deb.nodesource.com/node_%s.x %s main' "${NODE_RELEASE}" "${DEBIAN_RELEASE}" \
> '/etc/apt/sources.list.d/nodesource.list'
# update repositories
apt-get update
# install go from Debian backports
apt-get install --quiet --target-release "${DEBIAN_RELEASE}-backports" \
golang-go
# install dependencies
apt-get install --quiet \
wget build-essential patch git nodejs
# install 'pngquant' build dependencies (required by node module)
apt-get build-dep --quiet \
pngquant
# FIXME go (executed by build user) writes to GOROOT
install --directory --owner="${BUILD_USER_NAME}" \
"$(go env GOROOT)/pkg/$(go env GOOS)_$(go env GOARCH)"
# switch to build user
runuser -u "${BUILD_USER_NAME}" -- "${0}"
# salvage build artifacts
cp --verbose \
"${BUILD_USER_HOME}/mattermost-${MATTERMOST_RELEASE}-$(go env GOOS)-$(go env GOARCH).tar.gz" \
"${BUILD_USER_HOME}/mattermost-${MATTERMOST_RELEASE}-$(go env GOOS)-$(go env GOARCH).tar.gz.sha512sum" \
"${HOME}"
exit 0
fi
# as non-root user
cd "${HOME}"
# install yarn
npm install yarn
# download and extract Mattermost sources
for COMPONENT in server webapp; do
install --directory "${HOME}/go/src/github.com/mattermost/mattermost-${COMPONENT}"
wget --quiet --continue --output-document="mattermost-${COMPONENT}.tar.gz" \
"https://github.com/mattermost/mattermost-${COMPONENT}/archive/${MATTERMOST_RELEASE}.tar.gz"
tar --directory="${HOME}/go/src/github.com/mattermost/mattermost-${COMPONENT}" \
--strip-components=1 --extract --file="mattermost-${COMPONENT}.tar.gz"
done
# build Mattermost webapp
make --directory="${HOME}/go/src/github.com/mattermost/mattermost-webapp" \
build
# build Mattermost server
install --directory "${HOME}/go/bin"
if [ "$(go env GOOS)_$(go env GOARCH)" != 'linux_amd64' ]; then
ln --symbolic \
"${HOME}/go/bin/$(go env GOOS)_$(go env GOARCH)" \
"${HOME}/go/bin/linux_amd64"
fi
patch --directory="${HOME}/go/src/github.com/mattermost/mattermost-server" \
--strip=1 < "${HOME}/build-release.patch"
make --directory="${HOME}/go/src/github.com/mattermost/mattermost-server" \
config-reset build-linux package-linux \
BUILD_NUMBER="dev-$(go env GOOS)-$(go env GOARCH)-${MATTERMOST_RELEASE}" \
GO="GOARCH=$(go env GOARCH) GOOS=$(go env GOOS) $(command -v go)" \
PLUGIN_PACKAGES=''
# rename archive and calculate its SHA512 sum
mv "${HOME}/go/src/github.com/mattermost/mattermost-server/dist/mattermost-team-linux-amd64.tar.gz" \
"${HOME}/mattermost-${MATTERMOST_RELEASE}-$(go env GOOS)-$(go env GOARCH).tar.gz"
sha512sum "${HOME}/mattermost-${MATTERMOST_RELEASE}-$(go env GOOS)-$(go env GOARCH).tar.gz" | \
tee "${HOME}/mattermost-${MATTERMOST_RELEASE}-$(go env GOOS)-$(go env GOARCH).tar.gz.sha512sum"

141
dependabot/Gopkg.lock generated Normal file
View File

@@ -0,0 +1,141 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
digest = "1:79421244ba5848aae4b0a5c41e633a04e4894cb0b164a219dc8c15ec7facb7f1"
name = "github.com/blang/semver"
packages = ["."]
pruneopts = ""
revision = "2ee87856327ba09384cabd113bc6b5d174e9ec0f"
version = "v3.5.1"
[[projects]]
digest = "1:5247b135b5492aa232a731acdcb52b08f32b874cb398f21ab460396eadbe866b"
name = "github.com/google/uuid"
packages = ["."]
pruneopts = ""
revision = "d460ce9f8df2e77fb1ba55ca87fafed96c607494"
version = "v1.0.0"
[[projects]]
branch = "master"
digest = "1:ad21af51a0276292e9f6f5c37b966630138986478b1ecdbb94b907168fe25281"
name = "github.com/gorilla/websocket"
packages = ["."]
pruneopts = ""
revision = "483fb8d7c32fcb4b5636cd293a92e3935932e2f4"
[[projects]]
digest = "1:1dd3cd1e9cee3f3851ebfe67b896a24d9a625114c2bc8d4236dabbd55f263b15"
name = "github.com/mattermost/mattermost-server"
packages = [
"mlog",
"model",
"utils/jsonutils",
"utils/markdown",
]
pruneopts = ""
revision = "0c1207215852a8726c3f09dea157d597fec368df"
version = "v5.6.0"
[[projects]]
digest = "1:9fa4a4a684dfb36f3ba1b0a163225140e19e3219e5576d0761d02dbd4c31b743"
name = "github.com/nicksnyder/go-i18n"
packages = [
"i18n",
"i18n/bundle",
"i18n/language",
"i18n/translation",
]
pruneopts = ""
revision = "0dc1626d56435e9d605a29875701721c54bc9bbd"
version = "v1.10.0"
[[projects]]
digest = "1:a5484d4fa43127138ae6e7b2299a6a52ae006c7f803d98d717f60abf3e97192e"
name = "github.com/pborman/uuid"
packages = ["."]
pruneopts = ""
revision = "adf5a7427709b9deb95d29d3fa8a2bf9cfd388f1"
version = "v1.2"
[[projects]]
digest = "1:894aef961c056b6d85d12bac890bf60c44e99b46292888bfa66caf529f804457"
name = "github.com/pelletier/go-toml"
packages = ["."]
pruneopts = ""
revision = "c01d1270ff3e442a8a57cddc1c92dc1138598194"
version = "v1.2.0"
[[projects]]
digest = "1:7365acd48986e205ccb8652cc746f09c8b7876030d53710ea6ef7d0bd0dcd7ca"
name = "github.com/pkg/errors"
packages = ["."]
pruneopts = ""
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
[[projects]]
digest = "1:74f86c458e82e1c4efbab95233e0cf51b7cc02dc03193be9f62cd81224e10401"
name = "go.uber.org/atomic"
packages = ["."]
pruneopts = ""
revision = "1ea20fb1cbb1cc08cbd0d913a96dead89aa18289"
version = "v1.3.2"
[[projects]]
digest = "1:22c7effcb4da0eacb2bb1940ee173fac010e9ef3c691f5de4b524d538bd980f5"
name = "go.uber.org/multierr"
packages = ["."]
pruneopts = ""
revision = "3c4937480c32f4c13a875a1829af76c98ca3d40a"
version = "v1.1.0"
[[projects]]
digest = "1:246f378f80fba6fcf0f191c486b6613265abd2bc0f2fa55a36b928c67352021e"
name = "go.uber.org/zap"
packages = [
".",
"buffer",
"internal/bufferpool",
"internal/color",
"internal/exit",
"zapcore",
]
pruneopts = ""
revision = "ff33455a0e382e8a81d14dd7c922020b6b5e7982"
version = "v1.9.1"
[[projects]]
branch = "master"
digest = "1:efb97ebbd73c3a7068579327f5d98a17c09f6d8caf1fa3212c506e8bb78126b5"
name = "golang.org/x/crypto"
packages = [
"bcrypt",
"blowfish",
]
pruneopts = ""
revision = "4d3f4d9ffa16a13f451c3b2999e9c49e9750bf06"
[[projects]]
digest = "1:11c58e19ff7ce22740423bb933f1ddca3bf575def40d5ac3437ec12871b1648b"
name = "gopkg.in/natefinch/lumberjack.v2"
packages = ["."]
pruneopts = ""
revision = "a96e63847dc3c67d17befa69c303767e2f84e54f"
version = "v2.1"
[[projects]]
digest = "1:f0620375dd1f6251d9973b5f2596228cc8042e887cd7f827e4220bc1ce8c30e2"
name = "gopkg.in/yaml.v2"
packages = ["."]
pruneopts = ""
revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
version = "v2.2.1"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/mattermost/mattermost-server/model"]
solver-name = "gps-cdcl"
solver-version = 1

3
dependabot/Gopkg.toml Normal file
View File

@@ -0,0 +1,3 @@
[[constraint]]
name = "github.com/mattermost/mattermost-server"
version = "v5.6.0"

3
dependabot/dummy.go Normal file
View File

@@ -0,0 +1,3 @@
package main
import _ "github.com/mattermost/mattermost-server/model"
func() main() {/* dummy file */}