mirror of
https://github.com/SmartHoneybee/ubiquitous-memory
synced 2025-10-24 15:23:49 +02:00
Compare commits
70 Commits
untagged-4
...
v5.35.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3ed63c840 | ||
|
|
c3bf7a5e6e | ||
|
|
8bfcbc152c | ||
|
|
ea209b1cb4 | ||
|
|
a4963df160 | ||
|
|
2c62ab2b0e | ||
|
|
85cb4319c0 | ||
|
|
da7d3b0da6 | ||
|
|
d9d94c2ee9 | ||
|
|
8e4b90726c | ||
|
|
0fc1ecee72 | ||
|
|
4f364878e5 | ||
|
|
a84d8e49ab | ||
|
|
81b4106fc7 | ||
|
|
f92e152276 | ||
|
|
df047ff1c3 | ||
|
|
34f7ec2895 | ||
|
|
04f32e9214 | ||
|
|
e4b062a7f4 | ||
|
|
fae0f5b8b6 | ||
|
|
608535bba2 | ||
|
|
1ff3276ef1 | ||
|
|
9b99cea31b | ||
|
|
0f99d5847c | ||
|
|
f16cacf3ea | ||
|
|
6ef90eb436 | ||
|
|
06a96e5cdf | ||
|
|
f3192dba71 | ||
|
|
ca10b305e4 | ||
|
|
475839128e | ||
|
|
ec8de37859 | ||
|
|
5e267c639f | ||
|
|
3afd62ebaa | ||
|
|
4449fd0723 | ||
|
|
6f1748b909 | ||
|
|
5e14b05358 | ||
|
|
c696751a66 | ||
|
|
9b16070789 | ||
|
|
ab54cd5f53 | ||
|
|
0e12504498 | ||
|
|
4e3ab42325 | ||
|
|
44df1cad21 | ||
|
|
0f76d17e4b | ||
|
|
b825885790 | ||
|
|
1aab309dbe | ||
|
|
b0e13adaec | ||
|
|
6af28466ed | ||
|
|
423a1fc7a4 | ||
|
|
f3a313d74b | ||
|
|
d1f0a22e8c | ||
|
|
d91fcfea61 | ||
|
|
dc20b43f6b | ||
|
|
69dd3108db | ||
|
|
ec85f8e9bf | ||
|
|
793ea4bec3 | ||
|
|
5395cf700d | ||
|
|
9696123c42 | ||
|
|
36e5d61564 | ||
|
|
55cd923ead | ||
|
|
def77fa66d | ||
|
|
ee936bdd8f | ||
|
|
df7a149a4e | ||
|
|
1d503644eb | ||
|
|
0b5dcbb8a7 | ||
|
|
df4840729c | ||
|
|
fcd469daab | ||
|
|
a9d3978d23 | ||
|
|
12213cc988 | ||
|
|
d1747432be | ||
|
|
30ae5ae434 |
9
.github/dependabot.yml
vendored
Normal file
9
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: gomod
|
||||
directory: "/dependabot"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "00:15"
|
||||
open-pull-requests-limit: 99
|
||||
target-branch: master
|
||||
15
.github/workflows/lock.yml
vendored
Normal file
15
.github/workflows/lock.yml
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
name: 'Lock threads'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
issue-lock-inactive-days: 3
|
||||
pr-lock-inactive-days: 3
|
||||
84
.travis.yml
84
.travis.yml
@@ -1,69 +1,45 @@
|
||||
language: c
|
||||
dist: trusty
|
||||
sudo: required
|
||||
service:
|
||||
os: linux
|
||||
dist: bionic
|
||||
services:
|
||||
- docker
|
||||
env:
|
||||
global:
|
||||
- APT_KEY_NODEJS='9FD3B784BC1C6FC31A8A0A1C1655A0AB68576280'
|
||||
- DEBIAN_RELEASE='stretch'
|
||||
- DOCKER_BUILD_USER='build-user'
|
||||
- DEBIAN_RELEASE='buster'
|
||||
- DOCKER_PWD='/root'
|
||||
- DOCKER_IMAGE="debian:${DEBIAN_RELEASE}"
|
||||
- GOPATH='${HOME}/go'
|
||||
- SRCROOT="${GOPATH}/src/github.com/mattermost"
|
||||
- GO_VERSION='1.15.5'
|
||||
matrix:
|
||||
- V=5.4.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:
|
||||
- l() { echo "${@}" >> setup.sh; }
|
||||
- l '#!/bin/bash'
|
||||
- l set -ex
|
||||
# setup build environment as root
|
||||
- l 'if [ ${UID} -eq 0 ]; then'
|
||||
- l useradd -md "${DOCKER_PWD}/${DOCKER_BUILD_USER}" "${DOCKER_BUILD_USER}"
|
||||
- l echo 'APT::Install-Recommends "0"\; APT::Install-Suggests "0"\;' '>' /etc/apt/apt.conf.d/99reduce-it
|
||||
- l apt-get update
|
||||
- l apt-get install -yq gnupg2 dirmngr apt-transport-https ca-certificates
|
||||
- l apt-key adv --keyserver keyserver.ubuntu.com --recv-keys "${APT_KEY_NODEJS}"
|
||||
- l echo "deb http://deb.debian.org/debian ${DEBIAN_RELEASE}-backports main" '>' /etc/apt/sources.list.d/backports.list
|
||||
- l echo "deb-src http://deb.debian.org/debian ${DEBIAN_RELEASE} main" '>' /etc/apt/sources.list.d/stable-source.list
|
||||
- l echo "deb https://deb.nodesource.com/node_10.x ${DEBIAN_RELEASE} main" '>' /etc/apt/sources.list.d/bad-node.list
|
||||
- l apt-get update
|
||||
- l apt-get install -yqt "${DEBIAN_RELEASE}-backports" golang-go
|
||||
- l apt-get install -yq wget build-essential patch git nodejs
|
||||
- l apt-get build-dep -yq pngquant
|
||||
- l install -d -o "${DOCKER_BUILD_USER}" '"$(go env GOROOT)/pkg/linux_arm"'
|
||||
- l cp --verbose '"${0}"' "${DOCKER_PWD}/${DOCKER_BUILD_USER}"
|
||||
# switch to non-root user
|
||||
- l exec su --shell /bin/bash --login "${DOCKER_BUILD_USER}" '"${0}"' '"${@}"'
|
||||
- l 'fi'
|
||||
# build as non-root user
|
||||
- l install -d "${SRCROOT}/mattermost-{server,webapp}" "${GOPATH}/bin"
|
||||
- l npm install yarn
|
||||
- l wget -q "https://github.com/mattermost/mattermost-server/archive/v${V}.tar.gz" -O mattermost-server.tar.gz
|
||||
- l tar -C "${SRCROOT}/mattermost-server" --strip-components=1 -xf mattermost-server.tar.gz
|
||||
- l wget -q "https://github.com/mattermost/mattermost-webapp/archive/v${V}.tar.gz" -O mattermost-webapp.tar.gz
|
||||
- l tar -C "${SRCROOT}/mattermost-webapp" --strip-components=1 -xf mattermost-webapp.tar.gz
|
||||
- l make build -C "${SRCROOT}/mattermost-webapp"
|
||||
# workaround (instead of patch): platform binary is in GOOS_GOARCH, Makefile expects it in linux_amd64
|
||||
- l ln -s "${GOPATH}/bin/linux_arm" "${GOPATH}/bin/linux_amd64"
|
||||
# adapt and revert reverted commit, https://github.com/mattermost/mattermost-server/pull/8537
|
||||
- l patch -d "${SRCROOT}/mattermost-server" -p1 '<' "${DOCKER_PWD}/build-release.patch"
|
||||
# workaround (instead of patch): overwrite GO variable to enforce desired GOARCH
|
||||
- l export GOPATH="${GOPATH}" GOARM=7
|
||||
- l 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
|
||||
- l mv "${SRCROOT}/mattermost-server/dist/mattermost-team-linux-amd64.tar.gz" "${DOCKER_PWD}/${DOCKER_BUILD_USER}/mattermost-${V}-arm.tar.gz"
|
||||
- l sha512sum "${DOCKER_PWD}/${DOCKER_BUILD_USER}/mattermost-${V}-arm.tar.gz" '|' tee "${DOCKER_PWD}/${DOCKER_BUILD_USER}/mattermost-${V}-arm.tar.gz.sha512sum"
|
||||
- export MATTERMOST_RELEASE="$(grep 'mattermost' dependabot/go.mod | cut -d' ' -f3)"
|
||||
- docker pull "${DOCKER_IMAGE}"
|
||||
- chmod +x setup.sh
|
||||
- chmod +x build.sh
|
||||
script:
|
||||
- docker run --interactive=true --mount="type=bind,source=${PWD},destination=${DOCKER_PWD}" --rm=true --tty=true --workdir="${DOCKER_PWD}" "${DOCKER_IMAGE}" ./setup.sh
|
||||
- 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
|
||||
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}/${DOCKER_BUILD_USER}/setup.sh"
|
||||
- "${TRAVIS_BUILD_DIR}/${DOCKER_BUILD_USER}/mattermost-${V}-arm.tar.gz"
|
||||
- "${TRAVIS_BUILD_DIR}/${DOCKER_BUILD_USER}/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
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
# ubiquitous-memory: [Here be dragons][3]
|
||||
# ubiquitous-memory: [Here be dragons][2]
|
||||
|
||||
[](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
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
From 556e16211ed1b4c146ca2a094688618458182ae7 Mon Sep 17 00:00:00 2001
|
||||
From: Your Name <you@example.com>
|
||||
Date: Wed, 6 Jun 2018 12:34:56 +0100
|
||||
Subject: [PATCH] Split make goal
|
||||
|
||||
---
|
||||
build/release.mk | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/build/release.mk b/build/release.mk
|
||||
index 238343e..1b7859f 100644
|
||||
index 3e9a11339..c8bd5409f 100644
|
||||
--- a/build/release.mk
|
||||
+++ b/build/release.mk
|
||||
@@ -61,7 +61,7 @@ endif
|
||||
cp README.md $(DIST_PATH)
|
||||
@@ -97,7 +97,7 @@ package:
|
||||
cp -RL $(BUILD_WEBAPP_DIR)/dist/* $(DIST_PATH)/client
|
||||
|
||||
@#Download MMCTL
|
||||
- scripts/download_mmctl_release.sh "" $(DIST_PATH)/bin
|
||||
+ #scripts/download_mmctl_release.sh "" $(DIST_PATH)/bin
|
||||
|
||||
@# Help files
|
||||
ifeq ($(BUILD_ENTERPRISE_READY),true)
|
||||
@@ -126,7 +126,7 @@ endif
|
||||
|
||||
|
||||
@# ----- PLATFORM SPECIFIC -----
|
||||
-
|
||||
@@ -20,14 +20,21 @@ index 238343e..1b7859f 100644
|
||||
@# Make osx package
|
||||
@# Copy binary
|
||||
ifeq ($(BUILDER_GOOS_GOARCH),"darwin_amd64")
|
||||
@@ -106,7 +106,7 @@ endif
|
||||
rm -f $(DIST_PATH)/bin/mattermost.exe
|
||||
@@ -196,7 +196,7 @@ endif
|
||||
rm -f $(DIST_PATH)/bin/platform.exe
|
||||
rm -f $(DIST_PATH)/bin/mmctl.exe
|
||||
rm -f $(DIST_PATH)/prepackaged_plugins/*
|
||||
-
|
||||
+package-linux: package
|
||||
@# Make linux package
|
||||
@# Copy binary
|
||||
ifeq ($(BUILDER_GOOS_GOARCH),"linux_amd64")
|
||||
--
|
||||
2.11.0
|
||||
@@ -207,7 +207,7 @@ else
|
||||
cp $(GOBIN)/linux_amd64/platform $(DIST_PATH)/bin # from cross-compiled bin dir
|
||||
endif
|
||||
#Download MMCTL for Linux
|
||||
- scripts/download_mmctl_release.sh "Linux" $(DIST_PATH)/bin
|
||||
+ #scripts/download_mmctl_release.sh "Linux" $(DIST_PATH)/bin
|
||||
@# Prepackage plugins
|
||||
@for plugin_package in $(PLUGIN_PACKAGES) ; do \
|
||||
ARCH="linux-amd64"; \
|
||||
|
||||
114
build.sh
Normal file
114
build.sh
Normal file
@@ -0,0 +1,114 @@
|
||||
#!/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}"
|
||||
# golang version
|
||||
GO_VERSION="${GO_VERSION:-1.15.5}"
|
||||
|
||||
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 parallel
|
||||
# receive missing key (retry on failure)
|
||||
parallel --verbose --delay=30 --retries=5 "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 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
|
||||
# install go from golang.org
|
||||
wget https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz
|
||||
tar -xvf go${GO_VERSION}.linux-amd64.tar.gz
|
||||
mv go /usr/local
|
||||
export GOROOT=/usr/local/go
|
||||
export PATH=$GOROOT/bin:$PATH
|
||||
# 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
|
||||
export GOROOT=/usr/local/go
|
||||
export PATH=$GOROOT/bin:$PATH
|
||||
cd "${HOME}"
|
||||
# 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
|
||||
npm set progress false
|
||||
sed -i -e 's#--verbose#--display minimal#' \
|
||||
"${HOME}/go/src/github.com/mattermost/mattermost-webapp/package.json"
|
||||
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 -t < "${HOME}/build-release.patch"
|
||||
sed -i \
|
||||
-e 's#go generate#env --unset=GOOS --unset=GOARCH go generate#' \
|
||||
-e 's#$(GO) generate#env --unset=GOOS --unset=GOARCH go generate#' \
|
||||
-e 's#PWD#CURDIR#' \
|
||||
"${HOME}/go/src/github.com/mattermost/mattermost-server/Makefile" \
|
||||
"${HOME}/go/src/github.com/mattermost/mattermost-server/build/release.mk"
|
||||
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"
|
||||
3
dependabot/dummy.go
Normal file
3
dependabot/dummy.go
Normal file
@@ -0,0 +1,3 @@
|
||||
package main
|
||||
import _ "github.com/mattermost/mattermost-server/model"
|
||||
func main() {/* dummy file */}
|
||||
3
dependabot/go.mod
Normal file
3
dependabot/go.mod
Normal file
@@ -0,0 +1,3 @@
|
||||
module github.com/SmartHoneybee/ubiquitous-memory/dependabot
|
||||
|
||||
require github.com/mattermost/mattermost-server/v5 v5.35.2
|
||||
Reference in New Issue
Block a user