Skip to content

Commit

Permalink
mm: update to 8.1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
hadfl committed Dec 9, 2023
1 parent b17d9d7 commit 656826b
Show file tree
Hide file tree
Showing 13 changed files with 102 additions and 273 deletions.
74 changes: 38 additions & 36 deletions build/mattermost/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
. ../../lib/build.sh

PROG=mattermost
VER=7.5.2
MMCTLVER=7.5.0
VER=8.1.7
# check for the current morph version/commit hash and create a patched branch in
# https://github.com/omniosorg/morph; then point to that branch
MORPHBRANCH=il_1.0.5
PKG=ooce/application/mattermost
SUMMARY="$PROG"
DESC="All your team communication in one place, "
Expand Down Expand Up @@ -72,70 +74,70 @@ EOM

download_source() {
gitenv
save_variables BUILDDIR EXTRACTED_SRC

clone_go_source mmctl $PROG v$MMCTLVER
restore_variables BUILDDIR EXTRACTED_SRC
clone_github_source -dependency $PROG $GITHUB/$PROG/$PROG v$VER

GOPATH=$TMPDIR/$BUILDDIR/$PROG-server/_deps
clone_go_source "$PROG-server" $PROG v$VER
restore_variables BUILDDIR EXTRACTED_SRC
export GOPATH=$TMPDIR/$BUILDDIR/$PROG/server/_deps

clone_github_source -dependency "$PROG-webapp" \
"$GITHUB/$PROG/$PROG-webapp" v$VER
restore_variables BUILDDIR EXTRACTED_SRC
pushd $TMPDIR/$BUILDDIR/$PROG/server >/dev/null
logmsg "Replacing morph"
logcmd go mod edit -replace \
github.com/mattermost/morph=github.com/omniosorg/morph@$MORPHBRANCH \
|| logerr "Failed to replace morph"

logmsg "Getting go dependencies"
logcmd go get -d ./... || logerr "failed to get dependencies"

logmsg "Fixing permissions on dependencies"
logcmd $CHMOD -R u+w $GOPATH

set_builddir $BUILDDIR/$PROG

patch_source

((EXTRACT_MODE)) && exit

popd >/dev/null
}

build_component() {
prog="$1"; shift

note -n "Building $prog"

EXTRACTED_SRC+=/$prog patch_source patches-$prog
[ -n "$FLAVOR" -a "$FLAVOR" != "$prog" ] && return

export GOPATH=$TMPDIR/$BUILDDIR/$prog/_deps
note -n "Building $prog"

pushd $TMPDIR/$BUILDDIR/$prog > /dev/null
pushd $TMPDIR/$BUILDDIR/$prog >/dev/null
logcmd $MAKE "$@" || logerr "Build failed"
popd >/dev/null

logmsg "Fixing permissions on $prog dependencies"
logcmd $CHMOD -R u+w $GOPATH
}

build_mmctl() {
build_component mmctl "ADVANCED_VET=FALSE"
}

build_webapp() {
build() {
save_variable LDFLAGS
LDFLAGS+=" -R$OPREFIX/lib/amd64"
subsume_arch $BUILDARCH LDFLAGS
build_component $PROG-webapp build
# we could build the webapp from within the server project
# using the build-client target
# however, node.js fails in a very weird way (missing dependencies)
build_component webapp dist
restore_variable LDFLAGS
}

build_server() {
build_component $PROG-server build-illumos package-illumos
}

build() {
for component in mmctl webapp server; do
[ -n "$FLAVOR" -a "$FLAVOR" != $component ] && continue
build_$component
done
build_component server build-illumos package-prep
}

install() {
logcmd $MKDIR -p $DESTDIR/$OPREFIX || logerr "mkdir"
logcmd $MKDIR -p $DESTDIR/$PREFIX/bin || logerr "mkdir"

logcmd $RSYNC -a $TMPDIR/$BUILDDIR/$PROG-server/dist/$PROG \
logcmd $RSYNC -a $TMPDIR/$BUILDDIR/server/dist/$PROG \
$DESTDIR/$OPREFIX/ || logerr "copying dist"

logcmd $CP $TMPDIR/$BUILDDIR/mmctl/mmctl $DESTDIR/$PREFIX/bin \
|| logerr "copying mmctl"
logcmd $CP $TMPDIR/$BUILDDIR/server/bin/$PROG \
$DESTDIR/$PREFIX/bin/ || logerr "copying $PROG"
logcmd $CP $TMPDIR/$BUILDDIR/server/bin/mmctl \
$DESTDIR/$PREFIX/bin/ || logerr "copying mmctl"

logmsg "Creating config path"
logcmd $MKDIR -p $DESTDIR/etc/$PREFIX || logerr "creating config dir"
Expand Down
6 changes: 3 additions & 3 deletions build/mattermost/local.mog
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# http://www.illumos.org/license/CDDL.
#

# Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
# Copyright 2023 OmniOS Community Edition (OmniOSce) Association.

dir group=bin mode=0755 owner=root path=var/$(PREFIX)
dir group=$(PROG) mode=0700 owner=$(PROG) path=var/$(PREFIX)/data
Expand All @@ -36,6 +36,6 @@ link path=$(OPREFIX)/bin/mmctl target=../$(PROG)/bin/mmctl
<transform file path=$(PREFIX)/bin/$(PROG) \
-> set restart_fmri svc:/ooce/application/$(PROG):default>

license $(PROG)-server/LICENSE.txt license=Apache2
license $(PROG)-server/build/MIT-COMPILED-LICENSE.md license=MIT
license LICENSE.txt license=Apache2
license server/build/MIT-COMPILED-LICENSE.md license=MIT

9 changes: 0 additions & 9 deletions build/mattermost/patches-mattermost-server/Makefile.patch

This file was deleted.

48 changes: 0 additions & 48 deletions build/mattermost/patches-mattermost-server/release.mk.patch

This file was deleted.

3 changes: 0 additions & 3 deletions build/mattermost/patches-mattermost-server/series

This file was deleted.

12 changes: 0 additions & 12 deletions build/mattermost/patches-mmctl/no_vendor_update.patch

This file was deleted.

3 changes: 0 additions & 3 deletions build/mattermost/patches-mmctl/series

This file was deleted.

Loading

0 comments on commit 656826b

Please sign in to comment.