Accepting request 875411 from server:monitoring
OBS-URL: https://build.opensuse.org/request/show/875411 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grafana?expand=0&rev=16
This commit is contained in:
commit
29c12b2c85
11
Makefile
11
Makefile
@ -5,7 +5,6 @@ default: verify-deps clean tar
|
||||
|
||||
verify-deps:
|
||||
@which yarn >/dev/null 2>&1 || ( echo "yarn not found; run \`sudo npm install -g yarn\`" && false )
|
||||
@which grunt >/dev/null 2>&1 || ( echo "grunt not found; run \`sudo npm install -g grunt-cli\`" && false )
|
||||
|
||||
clean:
|
||||
rm -f $(NAME)-*.tar $(NAME)-*.tar.gz
|
||||
@ -20,17 +19,17 @@ tar:
|
||||
cd $$tmpdir && \
|
||||
gunzip ../$$tar.gz && \
|
||||
tar -xf ../$$tar && \
|
||||
# recreate tarball explicitly in a format that handles long filenames \
|
||||
tar --format=posix -cf ../$$tar $$basename && \
|
||||
cd $$basename && \
|
||||
# Patches for the JS frontend go after here \
|
||||
# No patches currently needed \
|
||||
# End patches section \
|
||||
yarn install --pure-lockfile && \
|
||||
grunt release && \
|
||||
cp -pr tmp/public . && \
|
||||
cp -pr tmp/tools . && \
|
||||
yarn run build && \
|
||||
cd .. && \
|
||||
echo "Updating $$basename/tools $$basename/public in tarball..." && \
|
||||
tar -rf ../$$tar $$basename/tools $$basename/public && \
|
||||
echo "Updating $$basename/public in tarball..." && \
|
||||
tar -rf ../$$tar $$basename/public && \
|
||||
cd .. && \
|
||||
gzip $$tar && \
|
||||
rm -rf $$tmpdir
|
||||
|
12
README
12
README
@ -1,27 +1,25 @@
|
||||
|
||||
The tarball is generated via the OBS source service, but Grafana
|
||||
needs to ship the compiled frontend assets as well, which have to
|
||||
be built by running yarn and grunt inside the source tree (see
|
||||
https://github.com/grafana/grafana#building-frontend-assets).
|
||||
be built by running yarn inside the source tree (see
|
||||
https://github.com/grafana/grafana/blob/master/contribute/developer-guide.md#frontend).
|
||||
This can't be done at build time on OBS, because it involves
|
||||
downloading and installing packages from the internet, so instead
|
||||
we have a Makefile which does the following:
|
||||
|
||||
- Runs `osc service disabledrun` to get the latest source tarball
|
||||
- Unpacks the tarball to a temporary directory
|
||||
- Runs `yarn install --pure-lockfile && grunt release`
|
||||
- Runs `yarn install --pure-lockfile && yarn build`
|
||||
- Adds the generated "vendor" and "public" content to the tarball,
|
||||
then compresses it with xz.
|
||||
- The tarball can then be used by OBS to build an RPM.
|
||||
|
||||
In order for this to work you need to have npm >= 6, < 12, yarn and
|
||||
grunt installed. To get set up, run:
|
||||
In order for this to work you need to have npm >= 14 and yarn installed.
|
||||
|
||||
# zypper in npm12
|
||||
# zypper in npm14
|
||||
# zypper in obs-service-download_files obs-service-go_modules \
|
||||
obs-service-obs_scm
|
||||
# npm install -g yarn
|
||||
# npm install -g grunt-cli
|
||||
|
||||
Then, to package a new release of Grafana, run `make` then `osc ci`
|
||||
and you should be good.
|
||||
|
2
_service
2
_service
@ -5,7 +5,7 @@
|
||||
<param name="exclude">.git</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="versionrewrite-pattern">v(.*)</param>
|
||||
<param name="revision">v7.3.6</param>
|
||||
<param name="revision">v7.4.2</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/grafana/grafana</param>
|
||||
<param name="changesrevision">f25d63954b2593e1cd11eafb5ca929900a9f2e66</param>
|
||||
<param name="changesrevision">29e75ad97b61f09f4880e3d3adbda810bfbf5dbf</param>
|
||||
</service>
|
||||
</servicedata>
|
12
add-gotest-module.patch
Normal file
12
add-gotest-module.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/go.mod b/go.mod
|
||||
index ea2a2c0da1..0ab22b1da9 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -101,6 +101,7 @@ require (
|
||||
gopkg.in/redis.v5 v5.2.9
|
||||
gopkg.in/square/go-jose.v2 v2.5.1
|
||||
gopkg.in/yaml.v2 v2.3.0
|
||||
+ gotest.tools v2.2.0+incompatible
|
||||
xorm.io/core v0.7.3
|
||||
xorm.io/xorm v0.8.1
|
||||
)
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5b85b6b5b3a37b81b629f96c1ec332548dd8daa25a32bdf46f41f19d8664d480
|
||||
size 30541972
|
3
grafana-7.4.2.tar.gz
Normal file
3
grafana-7.4.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1ccd7cf394c9b7eed511573947182bc435b1142c094e94334e72b3ddf61cee16
|
||||
size 32292793
|
1152
grafana.changes
1152
grafana.changes
File diff suppressed because it is too large
Load Diff
15
grafana.spec
15
grafana.spec
@ -22,7 +22,7 @@
|
||||
%endif
|
||||
|
||||
Name: grafana
|
||||
Version: 7.3.6
|
||||
Version: 7.4.2
|
||||
Release: 0
|
||||
Summary: The open-source platform for monitoring and observability.
|
||||
License: Apache-2.0
|
||||
@ -35,6 +35,18 @@ Source2: %{name}-rpmlintrc
|
||||
Source3: README
|
||||
# Makefile to automate build process
|
||||
Source4: Makefile
|
||||
# This patch is needed because upstream commit c8a7044 added an import
|
||||
# of gotest.tools/assert, but go.mod wasn't updated to also include this
|
||||
# dependency, which breaks vendoring when building RPMs on OBS. This
|
||||
# will be fixed in a different way upstream in the next 7.4.x release
|
||||
# (see https://github.com/grafana/grafana/pull/31395), but we can't
|
||||
# use that patch here, because it won't be taken into account when
|
||||
# the go_modules source service is run, so we'll still end up with
|
||||
# modules.txt in vendor.tar.gz not matching go.dep in the source
|
||||
# tarball
|
||||
# TL;DR: To whoever does the next version bump of grafana, make sure
|
||||
# you drop this patch. For any questions, hassle tserong@suse.com.
|
||||
Patch1: add-gotest-module.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: git-core
|
||||
BuildRequires: golang-packaging
|
||||
@ -62,6 +74,7 @@ dashboards and data with teams.
|
||||
%prep
|
||||
%setup -q -n grafana-%{version}
|
||||
%setup -q -T -D -a 1 -n grafana-%{version}
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%goprep github.com/grafana/grafana
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f43fd2eaf5d55bb1eb9faf638f50865e4e05473eb06c70f773e51b55b833e35f
|
||||
size 10485936
|
||||
oid sha256:42fdf3e93cd2a00ac08342506ba9d15162c5b96c4049e2e9df6666108aafbaf5
|
||||
size 11157403
|
||||
|
Loading…
Reference in New Issue
Block a user