SRE-3893 build: Consolidate build scripts - #19016
Conversation
|
Errors are Unable to load ticket data |
f31fa70 to
db5ee07
Compare
|
Test stage Build on EL 9 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19016/2/execution/node/442/log |
|
Test stage Build on EL 9 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19016/3/execution/node/493/log |
a6ee981 to
b423038
Compare
|
Test stage Functional Hardware Medium Verbs Provider MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19016/10/execution/node/858/log |
e0cbb87 to
32eb1f3
Compare
6deddc7 to
93864f9
Compare
Consolidate dependency installation, dependency builds, DAOS builds, package generation, and RPM verification under utils/build. Use these entry points consistently from Jenkins, Docker builds, and bare-host workflows while retaining support for custom scons options. By default, generate dependency and DAOS RPMs directly under <repo_root>/rpms/deps and <repo_root>/rpms/daos, respectively, and create repository metadata under <repo_root>/rpms/repodata. Allow RPM_OUTPUT_DIR to override the repository root. Add distro auto-detection, optional external dependency repositories, and configurable package-verification severity. Remove the superseded wrappers from ci/rpm and utils/rpms. Update Jenkins to copy dependency RPMs produced in the Docker build image into the workspace repository so that dependency and DAOS RPMs are included in the artifact upload. skip-cancel-previous-builds: true skip-python-bandit-check: true skip-unit-tests: true skip-test: true skip-test-hardware: true skip-functional-on-leap-15: false Priority: 2 Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com>
Document the shared scripts for installing dependencies, building DAOS, generating packages, and creating a complete RPM repository. Update Docker examples and packaging script paths to match the new layout. Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> skip-cancel-previous-builds: true skip-python-bandit-check: true skip-unit-tests: true skip-test: true skip-test-hardware: true skip-functional-on-leap-15: false
Move distro detection from build_packages.sh to build_utils.sh so it can also be reused by install_deps.sh. Propagate detection failures explicitly from command substitutions and avoid importing variables from /etc/os-release into the calling shell. Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> Priority: 2
93864f9 to
9d48806
Compare
Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> Priority: 2
|
|
||
| ## Unified DAOS Build Procedure | ||
|
|
||
| The scripts under [`utils/build`](../../utils/build) provide a straightforward, |
There was a problem hiding this comment.
We shouldn't use relative ULRs in this document. This content is published on https://docs.daos.io/ where the reference to GitHub is completly lost and these links are broken there.
At the same time, I understand we should link to a specific branch e.g. release/2.8 so the content of the file matches the content of the document linking to it.
Good luck.
Ref: https://docs.daos.io/v2.8/dev/development/#updating-a-3rd-party-component
There was a problem hiding this comment.
It is not a part of this PR to prepare official documentation for publishing.
| dependencies can also be built from source in the next step. Set | ||
| `DAOS_DEPS_EXT_REPO` to pull in a custom RPM set published by the DAOS | ||
| project (e.g. from [packages.daos.io](https://packages.daos.io/)) as | ||
| an extra dnf-format repo, registered only for the duration of the script. |
There was a problem hiding this comment.
I am not sure what dnf-format means in this context. And actually you adding a yum repository. So, I would go with the following.
| an extra dnf-format repo, registered only for the duration of the script. | |
| an extra repo, registered only for the duration of the script. |
| 1. **`build_deps.sh`** builds any dependency not already satisfied by | ||
| `install_deps.sh` from source, via `scons install --build-deps=only`. | ||
| 1. **`build_daos.sh`** builds and installs DAOS itself with scons | ||
| (`USE_INSTALLED=all` to reuse the dependencies from the previous steps). |
There was a problem hiding this comment.
It is not clear from the text if it is something the user has to add themselve or is it an automatic bit?
| (`USE_INSTALLED=all` to reuse the dependencies from the previous steps). | ||
| 1. **`build_packages.sh [deps|daos|all] [yes|no]`** builds dependency | ||
| RPMs, DAOS RPMs, or both with `fpm`. The build type defaults to `all`, | ||
| and verification defaults to `yes`. |
There was a problem hiding this comment.
It is only implied the second argument is about the verification of the produced packages. You may want to introduce it properly here.
| `RPM_OUTPUT_DIR`, which defaults to `<repo_root>/rpms`. For supported RPM | ||
| distributions, the script also generates repository metadata under |
There was a problem hiding this comment.
What is a "RPM distribution"? I think without the "RPM" bit it is clear you mean a Linux distribution. Because you mean a Linux distribution, don't you?
| `RPM_OUTPUT_DIR`, which defaults to `<repo_root>/rpms`. For supported RPM | |
| distributions, the script also generates repository metadata under | |
| `RPM_OUTPUT_DIR`, which defaults to `<repo_root>/rpms`. For supported | |
| distributions, the script also generates repository metadata under |
| ARG DAOS_TARGET_TYPE= | ||
| ARG DEPS_JOBS= | ||
|
|
||
| ARG DAOS_BUILD_TYPE=$DAOS_TARGET_TYPE |
There was a problem hiding this comment.
Why these arguments are named differently by mean the same thing? 😕
| utils/build/build_deps.sh \ | ||
| ${DEPS_JOBS:+--jobs "$DEPS_JOBS"} \ | ||
| ${DAOS_BUILD_TYPE:+BUILD_TYPE="$DAOS_BUILD_TYPE"} \ | ||
| ${DAOS_TARGET_TYPE:+TARGET_TYPE="$DAOS_TARGET_TYPE"} && \ |
There was a problem hiding this comment.
Does truely the cleanup step depend on the build step hence you need && ?
There was a problem hiding this comment.
It is not about cleanup it is about failing the whole Docker step.
| [ "$DAOS_KEEP_BUILD" != "no" ] || { \ | ||
| rm -rf .sconf_temp .sconsign.dblite config.log && \ | ||
| ([ "$DAOS_KEEP_BUILD" != "no" ] || /bin/rm -rf build *.gz); \ | ||
| /bin/rm -rf build *.gz; \ |
There was a problem hiding this comment.
- Indentation.
/bin/rmseriously?- You can probably combine both calls.
| /bin/rm -rf build *.gz; \ | |
| rm -rf .sconf_temp .sconsign.dblite config.log build *.gz; |
| ARG DAOS_DEPS_BUILD | ||
| ARG DAOS_BUILD=$DAOS_DEPS_BUILD | ||
| ARG DAOS_JAVA_BUILD=$DAOS_BUILD | ||
| ARG DAOS_JAVA_BUILD=no |
There was a problem hiding this comment.
Redundant?
| ARG DAOS_JAVA_BUILD=no | |
| ARG DAOS_JAVA_BUILD |
| mkdir -p /home/daos/daos/src && \ | ||
| cp -r /tmp/daos-src/. /home/daos/daos/src && \ |
There was a problem hiding this comment.
Indentation.
| mkdir -p /home/daos/daos/src && \ | |
| cp -r /tmp/daos-src/. /home/daos/daos/src && \ | |
| mkdir -p /home/daos/daos/src && \ | |
| cp -r /tmp/daos-src/. /home/daos/daos/src && \ |
|
Test stage Functional Hardware Medium Verbs Provider MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19016/36/execution/node/1869/log |
Summary
Consolidate dependency installation, dependency builds, DAOS builds,
package generation, and RPM verification under utils/build. Use these
entry points consistently from Jenkins, Docker builds, and bare-host
workflows while retaining support for custom scons options.
By default, generate dependency and DAOS RPMs directly under
<repo_root>/rpms/deps and <repo_root>/rpms/daos, respectively, and
create repository metadata under <repo_root>/rpms/repodata. Allow
RPM_OUTPUT_DIR to override the repository root.
Add distro auto-detection, optional external dependency repositories,
and configurable package-verification severity. Remove the superseded
wrappers from ci/rpm and utils/rpms.
Update Jenkins to copy dependency RPMs produced in the Docker build
image into the workspace repository so that dependency and DAOS RPMs
are included in the artifact upload.
Changes
utils/buildscripts for:ci/rpmandutils/rpms/build_packages.shwrappers.DAOS_DEPS_EXT_REPOfor theinstall_deps.shscript (to be used mainly as bare-host builds pre-step).sconsinbuild_daos.shandbuild_deps.shscripts.Package verification
Package verification runs automatically after each nonempty RPM group.
verify=yestreats validation findings as errors.verify=noreports validation findings as warnings.Requires:
Steps for the author:
After all prior steps are complete: