Accepting request 956140 from devel:kubic

OBS-URL: https://build.opensuse.org/request/show/956140
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/teleport?expand=0&rev=3
This commit is contained in:
Dominique Leuenberger 2022-02-21 16:46:25 +00:00 committed by Git OBS Bridge
commit 4a87fc99ff
5 changed files with 42 additions and 15 deletions

View File

@ -9,6 +9,14 @@
<param name="changesgenerate">enable</param>
<param name="versionrewrite-pattern">v(.*)</param>
</service>
<service name="tar_scm" mode="disabled">
<param name="url">https://github.com/gravitational/webassets</param>
<param name="scm">git</param>
<param name="submodules">disable</param>
<param name="exclude">.git</param>
<param name="filename">webassets</param>
<param name="without-version">yes</param>
</service>
<service name="set_version" mode="disabled">
<param name="basename">teleport</param>
</service>

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sat Feb 19 21:00:05 UTC 2022 - Johannes Kastl <kastl@b1-systems.de>
- add webassets, change %build section to build with flags and include webassets
-------------------------------------------------------------------
Fri Feb 18 07:37:52 UTC 2022 - kastl@b1-systems.de

View File

@ -26,9 +26,12 @@ License: Apache-2.0
URL: https://github.com/gravitational/teleport
Source: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
Source2: teleport.service
Source3: teleport.yaml
Source2: webassets.tar.gz
Source3: teleport.service
Source4: teleport.yaml
BuildRequires: git-core
BuildRequires: go >= 1.17
BuildRequires: pam-devel
BuildRequires: systemd-rpm-macros
Requires: teleport-tctl
@ -60,31 +63,39 @@ A tool that lets end users interact with Teleport nodes. This replaces ssh.
%prep
%setup -q
%setup -q -T -D -a 1
%setup -q -T -D -a 2
%build
mkdir -p lib/web/build/webassets
cp -r webassets/teleport/* lib/web/build/webassets
go build \
-tags "pam webassets_embed" \
-mod=vendor \
-buildmode=pie \
-ldflags="-X main.VERSION=%{version}" \
-o bin/tsh ./tool/tsh
-ldflags="-w -s -X main.VERSION=%{version}" \
-o teleport ./tool/teleport
go build \
-tags "pam" \
-mod=vendor \
-buildmode=pie \
-ldflags="-X main.VERSION=%{version}" \
-o bin/tctl ./tool/tctl
-ldflags="-w -s -X main.VERSION=%{version}" \
-o tsh ./tool/tsh
go build \
-tags "pam" \
-mod=vendor \
-buildmode=pie \
-ldflags="-X main.VERSION=%{version}" \
-o bin/teleport ./tool/teleport
-ldflags="-w -s -X main.VERSION=%{version}" \
-o tctl ./tool/tctl
%install
# Install the binary.
install -D -m 0755 bin/tsh "%{buildroot}/%{_bindir}/tsh"
install -D -m 0755 bin/tctl "%{buildroot}/%{_bindir}/tctl"
install -D -m 0755 bin/teleport "%{buildroot}/%{_sbindir}/teleport"
install -D -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/teleport.service
install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/teleport.yaml
install -D -m 0755 tsh "%{buildroot}/%{_bindir}/tsh"
install -D -m 0755 tctl "%{buildroot}/%{_bindir}/tctl"
install -D -m 0755 teleport "%{buildroot}/%{_sbindir}/teleport"
install -D -m 644 %{SOURCE3} %{buildroot}%{_unitdir}/teleport.service
install -D -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/teleport.yaml
%pre -n teleport
%service_add_pre teleport.service

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9329b1a6129b4d429588b0e5eec5490d35fdb058208a2bf31e09adcad6ac7f04
size 14529231
oid sha256:6efc9348a8567bc54453e9f01faec04f5b41fe20607554dc176b21728c95c821
size 14528029

3
webassets.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fe36281d68fa1c13dd5cd87cb4a00f1c194d21a791f024b8716e4d09e7699690
size 4733065