Azure / Azure/azure-cli

`rpmbuild` 4.17.0 is slow and stuck at `Processing files` for a long time

Open
#21,820 1 comment 0 reactions 1 assignee Claimed by @jiasli View on GitHub
act-platform-engineering-squad Auto-Assign feature-request Installation Packaging/RPM
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

**Describe the bug**

Mariner 2.0 (https://github.com/Azure/azure-cli/pull/21245), UBI 8 (https://github.com/Azure/azure-cli/pull/21655) and CentOS Stream 8 (https://github.com/Azure/azure-cli/pull/20918) have `rpmbuild` 4.17.0 which is very slow while building the RPM. The CI job `BuildRpmPackageMariner` and `BuildRpmPackageUbi8` take ~40min.

Turning on `-vv` (verbose) for `rpmbuild` shows the process got stuck at these steps for a very long time:

```
Processing files: azure-cli-dev-1.el8.x86_64
...
D: execv(/usr/lib/rpm/pythondeps.sh) pid 4341
D: waitpid(4341) rc 4341 status 0
D: execv(/usr/lib/rpm/pythondistdeps.py) pid 4346
D: waitpid(4346) rc 4346 status 0
D: execv(/usr/lib/rpm/pythondeps.sh) pid 4347
D: waitpid(4347) rc 4347 status 0
D: execv(/usr/lib/rpm/pythondistdeps.py) pid 4352
D: waitpid(4352) rc 4352 status 0
D: execv(/usr/lib/rpm/pythondeps.sh) pid 4353
D: waitpid(4353) rc 4353 status 0
```

`htop` shows the same:

![1](https://user-images.githubusercontent.com/4003950/160070698-4d18bd12-f0fd-4585-a85e-0cca92067d09.png)

**To Reproduce**

Run the follow commands on WSL or Linux machine:

```
git clone https://github.com/Azure/azure-cli
docker run -it --rm -v $(pwd)/azure-cli:/root/azure-cli --workdir /root/azure-cli registry.access.redhat.com/ubi8/ubi:8.4
yum update -y
yum install -y wget rpm-build gcc libffi-devel python3-devel openssl-devel make bash diffutils patch dos2unix python3-virtualenv perl
REPO_PATH=$(pwd) CLI_VERSION=dev rpmbuild -v -bb --clean scripts/release/rpm/azure-cli.spec
```

**Additional context**

Email: azure-cli FIPS compliance

Install `htop`:

```
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
yum install htop
```

See: https://www.cyberciti.biz/faq/how-to-install-htop-on-rhel-8-using-yum/

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.