Browse code

Add new package influxdb

Change-Id: If8fe8512b85a5c6e63a1d9f4f3693e27b3132eae
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5452
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

Keerthana K authored on 2018/08/02 22:52:00
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,227 @@
0
+Name:           influxdb
1
+Version:        1.6.0
2
+Release:        1%{?dist}
3
+Summary:        InfluxDB is an open source time series database
4
+License:        MIT
5
+URL:            https://influxdata.com
6
+Source0:        https://github.com/influxdata/influxdb/archive/%{name}-%{version}.tar.gz
7
+%define sha1    %{name}=364d2fb39fc3a983f96910133a6256932fffd0e3
8
+Source1:        influxdata.tar.gz
9
+%define sha1    influxdata=eceaa0c1bb8712cd1f10407b3a6e5e09d5a1945e
10
+Source2:        liner.tar.gz
11
+%define sha1    liner=8bbbccb2c5878f9ce31aaed4aa7fb400996ef13d
12
+Source3:        toml.tar.gz
13
+%define sha1    toml=22c1d1d230be805248ac9d19439ae4a2bd2070d7
14
+Source4:        roaring.tar.gz
15
+%define sha1    roaring=3126a09d46b08d562857e9f07eb1f213b32b63fb
16
+Source5:        pat.tar.gz
17
+%define sha1    pat=6b6dfbefa7289d0b18836156250beece71617dba
18
+Source6:        xxhash.tar.gz
19
+%define sha1    xxhash=f5882005086a932ad7b915049aaf94d1deb1aa06
20
+Source7:        jwt-go.tar.gz
21
+%define sha1    jwt-go=7b5f1ed04032b54c4eb2a5d5c535281b71a70114
22
+Source8:        go-bitstream.tar.gz
23
+%define sha1    go-bitstream=e53f387f69d571f538114321311f79162729d500
24
+Source9:        snappy.tar.gz
25
+%define sha1    snappy=bc13a6be54bd26bb203f74f5b50b900fadc5d63b
26
+Source10:       zap-logfmt.tar.gz
27
+%define sha1    zap-logfmt=09c051661fc0f77c3c14680117ac2c14a18b299a
28
+Source11:       encoding.tar.gz
29
+%define sha1    encoding=19eceae2608686fd561b1c5c7341014a810a4f0c
30
+Source12:       go-isatty.tar.gz
31
+%define sha1    go-isatty=fe4a9ce5a81501ad46831590d9dbb4b47825a583
32
+Source13:       opentracing-go.tar.gz
33
+%define sha1    opentracing-go=cb0b37e9a6cfdb5f641f132340081e705ed5691f
34
+Source14:       client_golang.tar.gz
35
+%define sha1    client_golang=aa559fd695323b980b3eec464b23fc27550c72ee
36
+Source15:       msgp.tar.gz
37
+%define sha1    msgp=31a49f9b34bc7f6b8aca8f66eec2eb9e007582a7
38
+Source16:       treeprint.tar.gz
39
+%define sha1    treeprint=54d4c5adea21a6dd9388af68b678d0607f21be44
40
+Source17:       hllpp.tar.gz
41
+%define sha1    hllpp=35a079df8b578d453cdd3b9cafbb48e87a705326
42
+Source18:       bolt.tar.gz
43
+%define sha1    bolt=9dfece85c773d20bf57c55759765c46d8bf00b84
44
+Source19:       pgzip.tar.gz
45
+%define sha1    pgzip=14c338202812c7a036cd2f651525db59a4eaac0b
46
+Source20:       ratecounter.tar.gz
47
+%define sha1    ratecounter=80ed07ec366a8f9e525d3d5452cdc96381c7bb64
48
+Source21:       x-golang.tar.gz
49
+%define sha1    x-golang=815014d8c3654f894903b27fa0e426bbd06f7a9e
50
+Source22:       collectd.org.tar.gz
51
+%define sha1    collectd.org=c4b785a64b789fb01a1c7c03211101893f62ee7c
52
+Source23:       protobuf-gogo.tar.gz
53
+%define sha1    protobuf-gogo=1dd504f012f2e4134d92075bdf2434c25d9cc92f
54
+Source24:       go-runewidth.tar.gz
55
+%define sha1    go-runewidth=b285c56da43ad7a7c1a7dff1996af00738908466
56
+Source25:       perks.tar.gz
57
+%define sha1    perks=9238e0f9f9756192ae821fa8d4389e1b4adb50cd
58
+Source26:       go-unsnap-stream.tar.gz
59
+%define sha1    go-unsnap-stream=5f524be03e8ddc20f01c5e13a250cf52fdb870e4
60
+Source27:       protobuf-golang.tar.gz
61
+%define sha1    protobuf-golang=5af8d015243c934befb699404b78374d9fdde4d9
62
+Source28:       fwd.tar.gz
63
+%define sha1    fwd=babaa98dc9ba8f75e90b5f3cd00cb05ef212fe5a
64
+Source29:       client_model.tar.gz
65
+%define sha1    client_model=dbf38a3217a4ac943fa17502424edf4363bb226a
66
+Source30:       common-prometheus.tar.gz
67
+%define sha1    common-prometheus=8c2b0ca3f398844fc2f35c15f40cc4596bc0f749
68
+Source31:       procfs-prometheus.tar.gz
69
+%define sha1    procfs-prometheus=4b34db5de4a849601cacd759e71d9d637d0b7bde
70
+Source32:       zap-gouber.tar.gz
71
+%define sha1    zap-gouber=7dc49e1d132300b1d282cc5b3d2f06d4c068cdbf
72
+Source33:       compress.tar.gz
73
+%define sha1    compress=6e24a9b94a6e9e8a14d13fa21b10df98e2d84641
74
+Source34:       crc32.tar.gz
75
+%define sha1    crc32=f2a5e0f7b94c913a87c0f8bee56d5d43fe31b0a8
76
+Source35:       golang_protobuf_extensions.tar.gz
77
+%define sha1    golang_protobuf_extensions=a28c3060440942f4439b656c00a9b62fbae74950
78
+Source36:       atomic.tar.gz
79
+%define sha1    atomic=ca0810ba1b97bf35e953daa07157596cbbad33ae
80
+Source37:       multierr.tar.gz
81
+%define sha1    multierr=ac35063c9f23fd2eb5cb0c7b5ded4b47a861877f
82
+Source38:       cpuid.tar.gz
83
+%define sha1    cpuid=e3fafb37e0d46282784c26bed14cde2f4979be86
84
+Source39:       yamux.tar.gz
85
+%define sha1    yamux=306f059060067e4c093e5ebf1e2dbd47bbc573d0
86
+Vendor:         VMware, Inc.
87
+Distribution:   Photon
88
+Group:          Applications/Database
89
+BuildRequires:  go
90
+BuildRequires:  git
91
+BuildRequires:  systemd
92
+Requires:       systemd
93
+Requires:       shadow
94
+
95
+%description
96
+InfluxDB is an open source time series database with no external dependencies.
97
+It's useful for recording metrics, events, and performing analytics.
98
+
99
+%prep
100
+%setup -c -T -a 0 -n build/src/github.com/influxdata
101
+%setup -D -c -T -a 1 -n build/src/github.com/influxdata
102
+%setup -D -c -T -a 2 -n build/src/github.com/peterh
103
+%setup -D -c -T -a 3 -n build/src/github.com/BurntSushi
104
+%setup -D -c -T -a 4 -n build/src/github.com/RoaringBitmap
105
+%setup -D -c -T -a 5 -n build/src/github.com/bmizerany
106
+%setup -D -c -T -a 6 -n build/src/github.com/cespare
107
+%setup -D -c -T -a 7 -n build/src/github.com/dgrijalva
108
+%setup -D -c -T -a 8 -n build/src/github.com/dgryski
109
+%setup -D -c -T -a 9 -n build/src/github.com/golang
110
+%setup -D -c -T -a 10 -n build/src/github.com/jsternberg
111
+%setup -D -c -T -a 11 -n build/src/github.com/jwilder
112
+%setup -D -c -T -a 12 -n build/src/github.com/mattn
113
+%setup -D -c -T -a 13 -n build/src/github.com/opentracing
114
+%setup -D -c -T -a 14 -n build/src/github.com/prometheus
115
+%setup -D -c -T -a 15 -n build/src/github.com/tinylib
116
+%setup -D -c -T -a 16 -n build/src/github.com/xlab
117
+%setup -D -c -T -a 17 -n build/src/github.com/retailnext
118
+%setup -D -c -T -a 18 -n build/src/github.com/boltdb
119
+%setup -D -c -T -a 19 -n build/src/github.com/klauspost
120
+%setup -D -c -T -a 20 -n build/src/github.com/paulbellamy
121
+%setup -D -c -T -a 21 -n build/src/golang.org/
122
+%setup -D -c -T -a 22 -n build/src/
123
+%setup -D -c -T -a 23 -n build/src/github.com/gogo
124
+%setup -D -c -T -a 24 -n build/src/github.com/mattn
125
+%setup -D -c -T -a 25 -n build/src/github.com/beorn7
126
+%setup -D -c -T -a 26 -n build/src/github.com/glycerine
127
+%setup -D -c -T -a 27 -n build/src/github.com/golang
128
+%setup -D -c -T -a 28 -n build/src/github.com/philhofer
129
+%setup -D -c -T -a 29 -n build/src/github.com/prometheus
130
+%setup -D -c -T -a 30 -n build/src/github.com/prometheus
131
+%setup -D -c -T -a 31 -n build/src/github.com/prometheus
132
+%setup -D -c -T -a 32 -n build/src/go.uber.org
133
+%setup -D -c -T -a 33 -n build/src/github.com/klauspost
134
+%setup -D -c -T -a 34 -n build/src/github.com/klauspost
135
+%setup -D -c -T -a 35 -n build/src/github.com/matttproud
136
+%setup -D -c -T -a 36 -n build/src/go.uber.org/
137
+%setup -D -c -T -a 37 -n build/src/go.uber.org/
138
+%setup -D -c -T -a 38 -n build/src/github.com/klauspost
139
+%setup -D -c -T -a 39 -n build/src/github.com/influxdata
140
+
141
+%build
142
+cd ../../../
143
+export GOPATH=`pwd`
144
+mkdir -p bin
145
+cd bin
146
+export GOBIN=`pwd`
147
+export PATH=$PATH:$GOBIN
148
+cd ../src/github.com/influxdata/
149
+mv -f %{name}-%{version} %{name}
150
+cd %{name}
151
+
152
+go clean ./...
153
+go install ./...
154
+
155
+%install
156
+mkdir -p %{buildroot}%{_bindir}
157
+mkdir -p %{buildroot}%{_sysconfdir}/influxdb
158
+mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d
159
+mkdir -p %{buildroot}%{_prefix}/lib/systemd/system
160
+mkdir -p %{buildroot}%{_mandir}/man1/
161
+mkdir -p %{buildroot}%{_sharedstatedir}/influxdb
162
+mkdir -p %{buildroot}%{_localstatedir}/log/influxdb
163
+cp -r ../../../bin/* %{buildroot}%{_bindir}
164
+cp %{name}/etc/config.sample.toml %{buildroot}%{_sysconfdir}/influxdb/influxdb.conf
165
+cp %{name}/scripts/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/influxdb
166
+cp %{name}/scripts/influxdb.service %{buildroot}%{_prefix}/lib/systemd/system
167
+cp %{name}/man/influx.txt %{buildroot}%{_mandir}/man1/influx.1
168
+cp %{name}/man/influx_inspect.txt %{buildroot}%{_mandir}/man1/influx_inspect.1
169
+cp %{name}/man/influx_stress.txt %{buildroot}%{_mandir}/man1/influx_stress.1
170
+cp %{name}/man/influx_tsm.txt %{buildroot}%{_mandir}/man1/influx_tsm.1
171
+cp %{name}/man/influxd-backup.txt %{buildroot}%{_mandir}/man1/influxd-backup.1
172
+cp %{name}/man/influxd-config.txt %{buildroot}%{_mandir}/man1/influxd-config.1
173
+cp %{name}/man/influxd-restore.txt %{buildroot}%{_mandir}/man1/influxd-restore.1
174
+cp %{name}/man/influxd-run.txt %{buildroot}%{_mandir}/man1/influxd-run.1
175
+cp %{name}/man/influxd-version.txt %{buildroot}%{_mandir}/man1/influxd-version.1
176
+cp %{name}/man/influxd.txt %{buildroot}%{_mandir}/man1/influxd.1
177
+
178
+%clean
179
+rm -rf %{buildroot}/*
180
+
181
+%pre
182
+if [ $1 -eq 1 ]; then
183
+    # Initial installation.
184
+    getent group %{name} >/dev/null || groupadd -r %{name}
185
+    getent passwd %{name} >/dev/null || useradd -r -g %{name} -d /var/lib/%{name} -s /sbin/nologin \
186
+            -c "InfluxDB" %{name}
187
+fi
188
+
189
+%post
190
+chown -R %{name}:%{name} /var/lib/%{name}
191
+chown -R %{name}:%{name} /var/log/%{name}
192
+%systemd_post influxdb.service
193
+
194
+%preun
195
+%systemd_preun influxdb.service
196
+
197
+%postun
198
+%systemd_postun_with_restart influxdb.service
199
+if [ $1 -eq 0 ]; then
200
+    # Package deletion
201
+    userdel %{name}
202
+    groupdel %{name}
203
+fi
204
+
205
+%files
206
+%defattr(-,root,root,755)
207
+%dir %config(noreplace) %{_sysconfdir}/influxdb
208
+%dir %{_sharedstatedir}/influxdb
209
+%dir %{_localstatedir}/log/influxdb
210
+%config(noreplace) %{_sysconfdir}/influxdb/influxdb.conf
211
+%config(noreplace) %{_sysconfdir}/logrotate.d/influxdb
212
+%{_prefix}/lib/systemd/system/influxdb.service
213
+%{_bindir}/influxd
214
+%{_bindir}/influx
215
+%{_bindir}/influx_inspect
216
+%{_bindir}/influx_stress
217
+%{_bindir}/influx-tools
218
+%{_bindir}/influx_tsm
219
+%{_mandir}/man1/*
220
+%exclude %{_bindir}/store
221
+%exclude %{_bindir}/stress_test_server
222
+%exclude %{_bindir}/test_client
223
+
224
+%changelog
225
+*   Wed Aug 1 2018 Keerthana K <keerthanak@vmware.com> 1.6.0-1
226
+-   Initial influxdb package for Photon.