From 6a67da6e41242dc0ecbc768d961cc8a04c332ebc Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Sun, 28 Mar 2021 19:47:11 +0200 Subject: [PATCH 01/22] Test a change for caching wheelhouse deps. --- .circle/buildenv_st2.sh | 5 +++- .circleci/config.yml | 53 +++++++++++++++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 11 deletions(-) diff --git a/.circle/buildenv_st2.sh b/.circle/buildenv_st2.sh index 48bd296d..ceff87ff 100755 --- a/.circle/buildenv_st2.sh +++ b/.circle/buildenv_st2.sh @@ -56,5 +56,8 @@ re="\\b$DISTRO\\b" ST2_CIRCLE_URL=${CIRCLE_BUILD_URL} write_env ST2_GITURL ST2_GITREV ST2PKG_VERSION ST2PKG_RELEASE DISTRO TESTING ST2_CIRCLE_URL - cat ~/.buildenv + +# Workaround for cache key since we can't reference arbitrary environment variables for cache keys +echo "${DISTRO}" > /tmp/distro-version +echo "${ST2PKG_VERSION}" > /tmp/st2-version diff --git a/.circleci/config.yml b/.circleci/config.yml index 22f1b667..d7b96532 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: exclusive: true # default - true # Temporary workaround for Circle CI issue # https://discuss.circleci.com/t/setup-remote-docker-connection-failures/26434 - version: 18.05.0-ce + version: 18.05.0-ce - run: name: Ensure installation scripts are synced with their templates command: make .generated-files-check @@ -70,21 +70,54 @@ jobs: - run: name: Pull dependent Docker Images command: .circle/docker-compose2.sh pull ${DISTRO} + - restore_cache: + name: Restore Wheelhouse Cache + keys: + - wheelhouse-{{ checksum "/tmp/distro-version" }}-{{ checksum "/tmp/st2-version" }} + - wheelhouse- - run: name: Build the ${DISTRO} Packages command: | + # Create necessary directories + mkdir -p ~/st2-packages/build/${DISTRO}/log/ + mkdir -p ~/st2-packages/wheelhouse/ + + # List volume content to see if there is any cached dasta + echo "local wheelhouse cache directory content" + echo "" + ls -la ~/st2-packages/wheelhouse/ + du -hs ~/st2-packages/wheelhouse/ + echo "" + + # Copy over cached wheelhouse packages (if any exist) + docker cp ~/st2-packages/wheelhouse/. st2-packages-vol:/tmp/wheelhouse + + # List volume content to see if there is any cached data + echo "docker volume wheelhouse cache directory content" + echo "" + docker run --rm -i -v=st2-packages-vol:/tmp/wheelhouse busybox find /tmp/wheelhouse + echo "" + + # Run the build .circle/docker-compose2.sh build ${DISTRO} + # Once build container finishes we can copy packages directly from it - mkdir -p ~/st2-packages/build/${DISTRO}/log/ + + # Copy built packages docker cp st2-packages-vol:/root/build/. ~/st2-packages/build/${DISTRO} -# # TODO: It works! (~0.5-1min speed-up) Enable CircleCI2.0 cache for pip and wheelhouse later -# - run: -# name: Build the ${DISTRO} Packages 2nd time (compare with pip/wheelhouse cached) -# command: | -# .circle/docker-compose2.sh build ${DISTRO} -# # Once build container finishes we can copy packages directly from it -# docker cp st2-packages-vol:/root/build /tmp/st2-packages -# working_directory: ~/st2-packages + + # Copy all the files from /tmp/wheelhouse so we can cache it and substantially speed + # up subsequent builds + docker cp st2-packages-vol:/tmp/wheelhouse/. ~/st2-packages/wheelhouse/ + + echo "wheelhouse cache directory content" + ls -la ~/st2-packages/wheelhouse/ + du -hs ~/st2-packages/wheelhouse/ + - save_cache: + name: Store Wheelhouse Cache + key: wheelhouse-{{ checksum "/tmp/distro-version" }}-{{ checksum "/tmp/st2-version" }} + paths: + - ~/st2-packages/wheelhouse/ - run: name: Test the Packages command: .circle/docker-compose2.sh test ${DISTRO} From 5a00dab366f046418e2ffe4850c4bb4a29dcbbc8 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Sun, 28 Mar 2021 21:11:16 +0200 Subject: [PATCH 02/22] Try to use larger VM to see if it helps with the build time. --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d7b96532..c5febb22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,8 @@ jobs: parallelism: 4 # 4CPUs & 8GB RAM CircleCI machine # sadly, it doesn't work with 'setup_remote_docker' - resource_class: large + #resource_class: large + resource_class: xlarge docker: # The primary container is an instance of the first list image listed. Your build commands run in this container. - image: circleci/python:3.6 From e14d9488004fb0a179bfc89913772b07486db19d Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Sun, 28 Mar 2021 21:29:58 +0200 Subject: [PATCH 03/22] Test another change. --- scripts/build_os_package.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/build_os_package.sh b/scripts/build_os_package.sh index 73827ddb..7fe91cfa 100644 --- a/scripts/build_os_package.sh +++ b/scripts/build_os_package.sh @@ -24,5 +24,9 @@ copy_deb() { [[ -z "$package_name" ]] && { echo "usage: $0 package_name" && exit 1; } +cat ~/.rpmmacros || true +echo "%__make /usr/bin/make -j 6" > ~/.rpmmacros +cat ~/.rpmmacros || true + build_$(platform) copy_$(platform) From 8a8fa540becea66ed3edc4fc5d32c0e6cd69def6 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Sun, 28 Mar 2021 21:44:16 +0200 Subject: [PATCH 04/22] Remove change which doesn't help. --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c5febb22..b1e58438 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,8 +11,7 @@ jobs: parallelism: 4 # 4CPUs & 8GB RAM CircleCI machine # sadly, it doesn't work with 'setup_remote_docker' - #resource_class: large - resource_class: xlarge + resource_class: large docker: # The primary container is an instance of the first list image listed. Your build commands run in this container. - image: circleci/python:3.6 @@ -80,6 +79,7 @@ jobs: name: Build the ${DISTRO} Packages command: | # Create necessary directories + # TODO: Per distro directory? mkdir -p ~/st2-packages/build/${DISTRO}/log/ mkdir -p ~/st2-packages/wheelhouse/ From 390f519e1e6e813da43fd836f5b4d762aea0b24c Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Sun, 28 Mar 2021 21:52:59 +0200 Subject: [PATCH 05/22] Prepend each line with timestamp to make it easier to see where the bottlenecks are. --- rake/formatter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rake/formatter.rb b/rake/formatter.rb index c89566f8..db4248a3 100644 --- a/rake/formatter.rb +++ b/rake/formatter.rb @@ -89,7 +89,7 @@ def command_headers(command) ShellOut::HEADERS_LIST.inject('') do |result, k| color = command.failure? ? [:red, :bold] : Array(ShellOut::HEADERS_COLORS[k]) header = send(:"header_#{k}", command) if respond_to?(:"header_#{k}", true) - header ? result << '[%s]' % colorize(header, *color) : result + header ? result << '[%s] [%s]' % [colorize(header, *color), Time.at(Time.new).utc.strftime("%H:%M:%S")] : result end end From 507704e4cc3c60017c2b4f36521da8eb887f2915 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Sun, 28 Mar 2021 22:57:39 +0200 Subject: [PATCH 06/22] Test a change (use pre-built wheel). --- packages/st2/component.makefile | 2 +- rpmspec/package_venv.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/st2/component.makefile b/packages/st2/component.makefile index f6675ee3..33233845 100644 --- a/packages/st2/component.makefile +++ b/packages/st2/component.makefile @@ -85,7 +85,7 @@ bdist_wheel: .stamp-bdist_wheel # We need to install these python packages to handle rpmbuild 4.14 in EL8 ifeq ($(EL_VERSION),8) $(PIP_BINARY) install wheel setuptools virtualenv - $(PIP_BINARY) install cryptography --no-binary cryptography + $(PIP_BINARY) install cryptography endif $(PYTHON_BINARY) setup.py bdist_wheel -d $(WHEELDIR) || \ $(PYTHON_BINARY) setup.py bdist_wheel -d $(WHEELDIR) diff --git a/rpmspec/package_venv.spec b/rpmspec/package_venv.spec index 5f5fce67..e5eb1957 100644 --- a/rpmspec/package_venv.spec +++ b/rpmspec/package_venv.spec @@ -12,7 +12,7 @@ %define pin_pip %{venv_python} %{venv_bin}/pip3 install pip==20.3.3 %define install_venvctrl python3 -m pip install venvctrl %if 0%{?rhel} == 8 -%define install_crypto %{venv_python} %{venv_bin}/pip install cryptography==2.8 --no-binary cryptography +%define install_crypto %{venv_python} %{venv_bin}/pip install cryptography==2.8 %else %define install_crypto %{nil} %endif From 00f1c11e47c0a794317da9fdcfefc643d7959a90 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Sun, 28 Mar 2021 23:13:24 +0200 Subject: [PATCH 07/22] Use verbose flag with rpmbuild to see if it will offer some clue why it's so slow on EL 8. --- scripts/build_os_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_os_package.sh b/scripts/build_os_package.sh index 7fe91cfa..9a31d9fe 100644 --- a/scripts/build_os_package.sh +++ b/scripts/build_os_package.sh @@ -13,7 +13,7 @@ platform() { echo 'rpm' } -build_rpm() { rpmbuild -bb --define '_topdir %(readlink -f build)' rpm/"$package_name".spec; } +build_rpm() { rpmbuild -bb -vv --define '_topdir %(readlink -f build)' rpm/"$package_name".spec; } build_deb() { dpkg-buildpackage -b -uc -us -j"$cores_num"; } copy_rpm() { sudo cp -v build/RPMS/*/$1*.rpm "$artifact_dir"; } From 70ec60c45d5fd2c4a23123eb904b14ae6587bf5f Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 00:37:19 +0200 Subject: [PATCH 08/22] Test a change. --- packages/st2/rpm/st2.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/st2/rpm/st2.spec b/packages/st2/rpm/st2.spec index e643dd20..969b7afd 100644 --- a/packages/st2/rpm/st2.spec +++ b/packages/st2/rpm/st2.spec @@ -25,6 +25,13 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools %endif # Requires for RHEL 8 +%if 0%{?rhel} >= 8 +%undefine __pythondist_provides +%undefine __pythondist_requires +%undefine __python_provides +%undefine __python_provides +%endif + Summary: StackStorm all components bundle Conflicts: st2common From b1a62593f631fe626578fe26f13695b129c2f51d Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 00:46:03 +0200 Subject: [PATCH 09/22] Remove verbose output we don't need anymore. --- scripts/build_os_package.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scripts/build_os_package.sh b/scripts/build_os_package.sh index 9a31d9fe..73827ddb 100644 --- a/scripts/build_os_package.sh +++ b/scripts/build_os_package.sh @@ -13,7 +13,7 @@ platform() { echo 'rpm' } -build_rpm() { rpmbuild -bb -vv --define '_topdir %(readlink -f build)' rpm/"$package_name".spec; } +build_rpm() { rpmbuild -bb --define '_topdir %(readlink -f build)' rpm/"$package_name".spec; } build_deb() { dpkg-buildpackage -b -uc -us -j"$cores_num"; } copy_rpm() { sudo cp -v build/RPMS/*/$1*.rpm "$artifact_dir"; } @@ -24,9 +24,5 @@ copy_deb() { [[ -z "$package_name" ]] && { echo "usage: $0 package_name" && exit 1; } -cat ~/.rpmmacros || true -echo "%__make /usr/bin/make -j 6" > ~/.rpmmacros -cat ~/.rpmmacros || true - build_$(platform) copy_$(platform) From e2885727199bb0672c4911d83753274369776843 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 00:49:32 +0200 Subject: [PATCH 10/22] Add a comment. --- packages/st2/rpm/st2.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/st2/rpm/st2.spec b/packages/st2/rpm/st2.spec index 969b7afd..705944d2 100644 --- a/packages/st2/rpm/st2.spec +++ b/packages/st2/rpm/st2.spec @@ -26,6 +26,16 @@ BuildRequires: python3-setuptools %endif # Requires for RHEL 8 %if 0%{?rhel} >= 8 +# By default on EL 8, RPM helper scripts will try to generate Requires: section which lists every +# Python dependencies. That process / script works by recursively scanning all the package Python +# dependencies which is very slow (5-6 minutes). +# Our package bundles virtualenv with all the dependendencies and doesn't rely on this metadata +# so we skip that step to vastly speed up the build. +# Same step also does not run on EL7 so not running it on EL 8 should be totally +# safe! +# See https://github.com/StackStorm/st2-packages/pull/697#issuecomment-808971874 and that PR for +# more details. +# That issue was found by enabling rpmbuild -vv flag. %undefine __pythondist_provides %undefine __pythondist_requires %undefine __python_provides From afc43eb3d8ae738f700514bc70a83dc813964b4e Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 00:51:17 +0200 Subject: [PATCH 11/22] Display rpm metadata post build for troubleshooting, etc purposes. --- scripts/build_os_package.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/build_os_package.sh b/scripts/build_os_package.sh index 73827ddb..cc857d52 100644 --- a/scripts/build_os_package.sh +++ b/scripts/build_os_package.sh @@ -13,10 +13,16 @@ platform() { echo 'rpm' } +# NOTE: If you want to troubleshoot rpmbuild, add -vv flag to enable debug mode build_rpm() { rpmbuild -bb --define '_topdir %(readlink -f build)' rpm/"$package_name".spec; } build_deb() { dpkg-buildpackage -b -uc -us -j"$cores_num"; } -copy_rpm() { sudo cp -v build/RPMS/*/$1*.rpm "$artifact_dir"; } +copy_rpm() { + sudo cp -v build/RPMS/*/$1*.rpm "$artifact_dir"; + # Also print some package info for easier troubleshooting + rpm -q --requires build/RPMS/*/$1*.rpm + rpm -q --provides build/RPMS/*/$1*.rpm +} copy_deb() { sudo cp -v ../"$package_name"*.deb "$artifact_dir" || { echo "Failed to copy .deb file into artifact directory \`$artifact_dir'" ; exit 1; } sudo cp -v ../"$package_name"{*.changes,*.dsc} "$artifact_dir" || :; From e22a712a067fbd7a456c892941f11ec0dc7532a0 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 00:53:55 +0200 Subject: [PATCH 12/22] Fix typo. --- packages/st2/rpm/st2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/st2/rpm/st2.spec b/packages/st2/rpm/st2.spec index 705944d2..84975ba5 100644 --- a/packages/st2/rpm/st2.spec +++ b/packages/st2/rpm/st2.spec @@ -39,7 +39,7 @@ BuildRequires: python3-setuptools %undefine __pythondist_provides %undefine __pythondist_requires %undefine __python_provides -%undefine __python_provides +%undefine __pythondist_requires %endif Summary: StackStorm all components bundle From 20c9a25b8f16f06a5526e18d0862a9090846f3da Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 00:54:37 +0200 Subject: [PATCH 13/22] Add back -vv for one more run. --- scripts/build_os_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_os_package.sh b/scripts/build_os_package.sh index cc857d52..98a42d04 100644 --- a/scripts/build_os_package.sh +++ b/scripts/build_os_package.sh @@ -14,7 +14,7 @@ platform() { } # NOTE: If you want to troubleshoot rpmbuild, add -vv flag to enable debug mode -build_rpm() { rpmbuild -bb --define '_topdir %(readlink -f build)' rpm/"$package_name".spec; } +build_rpm() { rpmbuild -bb -vv --define '_topdir %(readlink -f build)' rpm/"$package_name".spec; } build_deb() { dpkg-buildpackage -b -uc -us -j"$cores_num"; } copy_rpm() { From df2d13f254404c77120ce7f431da490784ec7d01 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 01:02:57 +0200 Subject: [PATCH 14/22] Fix the query args. --- scripts/build_os_package.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/build_os_package.sh b/scripts/build_os_package.sh index 98a42d04..1a58de4c 100644 --- a/scripts/build_os_package.sh +++ b/scripts/build_os_package.sh @@ -20,8 +20,8 @@ build_deb() { dpkg-buildpackage -b -uc -us -j"$cores_num"; } copy_rpm() { sudo cp -v build/RPMS/*/$1*.rpm "$artifact_dir"; # Also print some package info for easier troubleshooting - rpm -q --requires build/RPMS/*/$1*.rpm - rpm -q --provides build/RPMS/*/$1*.rpm + rpm -q --requires -p build/RPMS/*/$1*.rpm + rpm -q --provides -p build/RPMS/*/$1*.rpm } copy_deb() { sudo cp -v ../"$package_name"*.deb "$artifact_dir" || { echo "Failed to copy .deb file into artifact directory \`$artifact_dir'" ; exit 1; } From f61baa41c2e239e1860eb767c9b583b765ac64e8 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 01:11:03 +0200 Subject: [PATCH 15/22] Remove verbose flag we don't need anymore. --- scripts/build_os_package.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_os_package.sh b/scripts/build_os_package.sh index 1a58de4c..b2271137 100644 --- a/scripts/build_os_package.sh +++ b/scripts/build_os_package.sh @@ -14,7 +14,7 @@ platform() { } # NOTE: If you want to troubleshoot rpmbuild, add -vv flag to enable debug mode -build_rpm() { rpmbuild -bb -vv --define '_topdir %(readlink -f build)' rpm/"$package_name".spec; } +build_rpm() { rpmbuild -bb --define '_topdir %(readlink -f build)' rpm/"$package_name".spec; } build_deb() { dpkg-buildpackage -b -uc -us -j"$cores_num"; } copy_rpm() { From eced25d872a70ec430f1844383f0688b2d0bb9a2 Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 01:12:41 +0200 Subject: [PATCH 16/22] Update comment. --- packages/st2/rpm/st2.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/st2/rpm/st2.spec b/packages/st2/rpm/st2.spec index 84975ba5..e1fb5f74 100644 --- a/packages/st2/rpm/st2.spec +++ b/packages/st2/rpm/st2.spec @@ -31,8 +31,9 @@ BuildRequires: python3-setuptools # dependencies which is very slow (5-6 minutes). # Our package bundles virtualenv with all the dependendencies and doesn't rely on this metadata # so we skip that step to vastly speed up the build. -# Same step also does not run on EL7 so not running it on EL 8 should be totally -# safe! +# Technically we also don't Require or Provide any of those libraries auto-detected by that script +# because those are only used internally inside a package specific virtual environment. +# Same step also does not run on EL7. # See https://github.com/StackStorm/st2-packages/pull/697#issuecomment-808971874 and that PR for # more details. # That issue was found by enabling rpmbuild -vv flag. From 3ad830a98495984afb03d1998a83867c2d3634ad Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 01:13:28 +0200 Subject: [PATCH 17/22] Fix typo. --- packages/st2/rpm/st2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/st2/rpm/st2.spec b/packages/st2/rpm/st2.spec index e1fb5f74..d0f9c532 100644 --- a/packages/st2/rpm/st2.spec +++ b/packages/st2/rpm/st2.spec @@ -40,7 +40,7 @@ BuildRequires: python3-setuptools %undefine __pythondist_provides %undefine __pythondist_requires %undefine __python_provides -%undefine __pythondist_requires +%undefine __python_requires %endif Summary: StackStorm all components bundle From bf9b7b3bd35912399fbaad268e697bbd0aca58fb Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 12:06:28 +0200 Subject: [PATCH 18/22] By default, comment out some additional noise. --- .circleci/config.yml | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b1e58438..4de55629 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -84,20 +84,21 @@ jobs: mkdir -p ~/st2-packages/wheelhouse/ # List volume content to see if there is any cached dasta - echo "local wheelhouse cache directory content" - echo "" - ls -la ~/st2-packages/wheelhouse/ - du -hs ~/st2-packages/wheelhouse/ - echo "" + # Uncomment if you are troubleshooting wheelhouse caching issues + # echo "local wheelhouse cache directory content" + # echo "" + # ls -la ~/st2-packages/wheelhouse/ + # du -hs ~/st2-packages/wheelhouse/ + # echo "" # Copy over cached wheelhouse packages (if any exist) docker cp ~/st2-packages/wheelhouse/. st2-packages-vol:/tmp/wheelhouse # List volume content to see if there is any cached data - echo "docker volume wheelhouse cache directory content" - echo "" - docker run --rm -i -v=st2-packages-vol:/tmp/wheelhouse busybox find /tmp/wheelhouse - echo "" + # echo "docker volume wheelhouse cache directory content" + # echo "" + # docker run --rm -i -v=st2-packages-vol:/tmp/wheelhouse busybox find /tmp/wheelhouse + # echo "" # Run the build .circle/docker-compose2.sh build ${DISTRO} @@ -111,9 +112,10 @@ jobs: # up subsequent builds docker cp st2-packages-vol:/tmp/wheelhouse/. ~/st2-packages/wheelhouse/ - echo "wheelhouse cache directory content" - ls -la ~/st2-packages/wheelhouse/ - du -hs ~/st2-packages/wheelhouse/ + # echo "wheelhouse cache directory content" + # Uncomment if you are troubleshooting wheelhouse caching issues + # ls -la ~/st2-packages/wheelhouse/ + # du -hs ~/st2-packages/wheelhouse/ - save_cache: name: Store Wheelhouse Cache key: wheelhouse-{{ checksum "/tmp/distro-version" }}-{{ checksum "/tmp/st2-version" }} From 9f55aed4bf1e2fbb8a7fa6b6d42fec7d9b867b3e Mon Sep 17 00:00:00 2001 From: Tomaz Muraus Date: Mon, 29 Mar 2021 12:07:46 +0200 Subject: [PATCH 19/22] Also try undefining that helper for EL7 to see if it makes any difference as well (unlikely since those macros don't appear to run there by default). --- packages/st2/rpm/st2.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/st2/rpm/st2.spec b/packages/st2/rpm/st2.spec index d0f9c532..b1f9efd6 100644 --- a/packages/st2/rpm/st2.spec +++ b/packages/st2/rpm/st2.spec @@ -25,7 +25,7 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools %endif # Requires for RHEL 8 -%if 0%{?rhel} >= 8 +%if 0%{?rhel} >= 7 # By default on EL 8, RPM helper scripts will try to generate Requires: section which lists every # Python dependencies. That process / script works by recursively scanning all the package Python # dependencies which is very slow (5-6 minutes). From 65eb14b0c16573b91e5089e7eeeeb2e8e2b2056d Mon Sep 17 00:00:00 2001 From: Eugen Cusmaunsa Date: Wed, 31 Mar 2021 15:10:04 +0100 Subject: [PATCH 20/22] Check the EL8 rpm build timing w Provides excl. Requires change --- packages/st2/rpm/st2.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/st2/rpm/st2.spec b/packages/st2/rpm/st2.spec index b1f9efd6..27583106 100644 --- a/packages/st2/rpm/st2.spec +++ b/packages/st2/rpm/st2.spec @@ -38,9 +38,7 @@ BuildRequires: python3-setuptools # more details. # That issue was found by enabling rpmbuild -vv flag. %undefine __pythondist_provides -%undefine __pythondist_requires %undefine __python_provides -%undefine __python_requires %endif Summary: StackStorm all components bundle From 1f6bb8eccb852f7dcb50cdfcc104a22fb0728829 Mon Sep 17 00:00:00 2001 From: armab Date: Wed, 31 Mar 2021 16:40:16 +0100 Subject: [PATCH 21/22] Revert "Check the EL8 rpm build timing w Provides excl. Requires change" This reverts commit 65eb14b0c16573b91e5089e7eeeeb2e8e2b2056d. --- packages/st2/rpm/st2.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/st2/rpm/st2.spec b/packages/st2/rpm/st2.spec index 27583106..b1f9efd6 100644 --- a/packages/st2/rpm/st2.spec +++ b/packages/st2/rpm/st2.spec @@ -38,7 +38,9 @@ BuildRequires: python3-setuptools # more details. # That issue was found by enabling rpmbuild -vv flag. %undefine __pythondist_provides +%undefine __pythondist_requires %undefine __python_provides +%undefine __python_requires %endif Summary: StackStorm all components bundle From da36b56e315982b136660ae0f3276fb50a3966aa Mon Sep 17 00:00:00 2001 From: armab Date: Wed, 31 Mar 2021 16:44:28 +0100 Subject: [PATCH 22/22] Switch to EL8 conditional check --- packages/st2/rpm/st2.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/st2/rpm/st2.spec b/packages/st2/rpm/st2.spec index b1f9efd6..d1eacd91 100644 --- a/packages/st2/rpm/st2.spec +++ b/packages/st2/rpm/st2.spec @@ -10,7 +10,7 @@ Epoch: %{epoch} %endif -%if 0%{?rhel} >= 8 +%if 0%{?rhel} == 8 %global _build_id_links none %endif @@ -19,13 +19,13 @@ Requires: python3-devel, openssl-devel, libffi-devel, git, pam, openssh-server, # EL8 requires a few python packages available within 'BUILDROOT' when outside venv # These are in the el8 packagingbuild dockerfile # Reference https://fossies.org/linux/ansible/packaging/rpm/ansible.spec -%if 0%{?rhel} >= 8 +%if 0%{?rhel} == 8 # Will use the python3 stdlib venv BuildRequires: python3-devel BuildRequires: python3-setuptools %endif # Requires for RHEL 8 -%if 0%{?rhel} >= 7 +%if 0%{?rhel} == 8 # By default on EL 8, RPM helper scripts will try to generate Requires: section which lists every # Python dependencies. That process / script works by recursively scanning all the package Python # dependencies which is very slow (5-6 minutes).