From 8188c8572275a0eb08ba80bafe7b2e446fa1d449076092ab0554e111c75d932d Mon Sep 17 00:00:00 2001 From: Johannes Kastl Date: Sun, 20 Feb 2022 13:05:20 +0000 Subject: [PATCH] Accepting request 956087 from home:ojkastl_buildservice:Branch_devel_kubic add webassets, change %build section to build with flags and include webassets OBS-URL: https://build.opensuse.org/request/show/956087 OBS-URL: https://build.opensuse.org/package/show/devel:kubic/teleport?expand=0&rev=4 --- _service | 8 ++++++++ teleport.changes | 5 +++++ teleport.spec | 37 ++++++++++++++++++++++++------------- vendor.tar.gz | 4 ++-- webassets.tar.gz | 3 +++ 5 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 webassets.tar.gz diff --git a/_service b/_service index 3d4fb26..e8c51f5 100644 --- a/_service +++ b/_service @@ -9,6 +9,14 @@ enable v(.*) + + https://github.com/gravitational/webassets + git + disable + .git + webassets + yes + teleport diff --git a/teleport.changes b/teleport.changes index daa16ed..738e847 100644 --- a/teleport.changes +++ b/teleport.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Feb 19 21:00:05 UTC 2022 - Johannes Kastl + +- add webassets, change %build section to build with flags and include webassets + ------------------------------------------------------------------- Fri Feb 18 07:37:52 UTC 2022 - kastl@b1-systems.de diff --git a/teleport.spec b/teleport.spec index e5fcd99..c9e9284 100644 --- a/teleport.spec +++ b/teleport.spec @@ -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 diff --git a/vendor.tar.gz b/vendor.tar.gz index e24a016..0a0ddd4 100644 --- a/vendor.tar.gz +++ b/vendor.tar.gz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9329b1a6129b4d429588b0e5eec5490d35fdb058208a2bf31e09adcad6ac7f04 -size 14529231 +oid sha256:6efc9348a8567bc54453e9f01faec04f5b41fe20607554dc176b21728c95c821 +size 14528029 diff --git a/webassets.tar.gz b/webassets.tar.gz new file mode 100644 index 0000000..ecb1377 --- /dev/null +++ b/webassets.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fe36281d68fa1c13dd5cd87cb4a00f1c194d21a791f024b8716e4d09e7699690 +size 4733065