This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.

⚠️ We've moved!

Hi there!

To reduce project dependency on 3rd party paid services the StackStorm TSC has decided to move the Q/A from this forum to Github Discussions. This will make user experience better integrated with the native Github flow, as well as the questions closer to the community where they can provide answers.

Use 🔗 Github Discussions to ask your questions.

How to build st2web rpm

Hi, there are some bugs related to official st2web-2.6.0-1.x86_64.rpm
so I want to rebuild the st2web rpm to include the fixes.
I cloned the st2web project, switched to V2.6 branch, added the fixes,
eg. edited modules/st2-api/api.js to include the fix


and then run make rpm under st2web project

here are some output info:

 make rpm
rpmbuild -bb rpm/st2web.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.gunlrM
+ umask 022
+ cd /root/st2web
+ rm -rf /root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64
+ mkdir -p /root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.sIiXO7
+ umask 022
+ cd /root/st2web
+ make
make[1]: Entering directory `/root/st2web'
npm run build

> [email protected] build /root/st2web
> gulp production

[09:58:47] Using gulpfile ~/st2web/gulpfile.js
[09:58:47] Starting 'production'...
[09:58:47] Starting 'production-environment'...
[09:58:47] Finished 'production-environment' after 1.27 ms
[09:58:47] Starting 'production-scripts'...
[09:58:47] Starting 'browserify'...
[09:59:06] main.js.map 3.16 MB
[09:59:06] main.js 2.8 MB
[09:59:06] all files 5.96 MB
[09:59:06] main.js.map 616.88 kB (gzipped)
[09:59:07] main.js 566.91 kB (gzipped)
[09:59:07] all files 1.18 MB (gzipped)
[09:59:07] Finished 'browserify' after 19 s
[09:59:07] Starting '<anonymous>'...
[09:59:41] js/main.js 1.25 MB
[09:59:41] js/main.js 254.39 kB (gzipped)
[09:59:41] Finished '<anonymous>' after 35 s
[09:59:41] Finished 'production-scripts' after 54 s
[09:59:41] Starting 'production-styles'...
[09:59:41] css/style.css 114.25 kB
[09:59:41] css/style.css 29.93 kB (gzipped)
[09:59:41] Finished 'production-styles' after 41 ms
[09:59:41] Starting 'production-static'...
[09:59:41] Finished 'production-static' after 59 ms
[09:59:41] Finished 'production' after 54 s
make[1]: Leaving directory `/root/st2web'
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.myxIWO
+ umask 022
+ cd /root/st2web
+ '[' /root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64 '!=' / ']'
+ rm -rf /root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64
++ dirname /root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64
+ mkdir -p /root/rpmbuild/BUILDROOT
+ mkdir /root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64
+ /usr/bin/make install DESTDIR=/root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64
make[1]: Entering directory `/root/st2web'
mkdir -p /root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64/opt/stackstorm/static/webui
cp -R /root/st2web/build/* /root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64/opt/stackstorm/static/webui
make[1]: Leaving directory `/root/st2web'
+ '[' '%{buildarch}' = noarch ']'
+ QA_CHECK_RPATHS=1
+ case "${QA_CHECK_RPATHS:-}" in
+ /usr/lib/rpm/check-rpaths
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: st2web-2.6.0-1.x86_64
Provides: st2web = 2.6.0-1 st2web(x86-64) = 2.6.0-1
Requires(interp): /bin/sh
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires(post): /bin/sh
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64
Wrote: /root/st2web-2.6.0-1.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.ql9Cnh
+ umask 022
+ cd /root/st2web
+ rm -rf /root/rpmbuild/BUILDROOT/st2web-2.6.0-1.x86_64
+ exit 0

From above output we can see the rpm saved to /root/st2web-2.6.0-1.x86_64.rpm
Then I installed the rpm and check the
/opt/stackstorm/static/webui/js/main.js file
found that the fix is not there !!!

Did I miss anything?

Check the artifacts here https://circleci.com/gh/StackStorm/st2web/734#artifacts/containers/0

That has a new build of st2web that includes that fix, and others

You could probably also look through that CircleCI job, check the configuration, and see what it’s doing to build the RPMs

@lhill Thx very much for this info.

Thx @lhill I downloaded rpm from your link and that fixed my issue.
Just wonder did I miss anything in my host when build rpm?
I went through that CircleCI job and checked the configuration, it’s using the same cmd ‘make rpm’
to build rpm.