contrib/copr: improve readme in copr scripts

This commit is contained in:
Thomas Haller 2023-06-06 12:20:29 +02:00
parent e267c1d3ff
commit fd6fcf335c
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 33 additions and 12 deletions

View file

@ -4,22 +4,22 @@
# as a package. This bundle contains the current git history # as a package. This bundle contains the current git history
# of upstream NetworkManager. # of upstream NetworkManager.
# #
# The sole purpose of this is to fetch from the bundle to safe # The sole purpose of this is to fetch from the bundle to save
# downloading the entire upstream git repository of NetworkManager. # downloading the entire upstream git repository of NetworkManager.
# #
# This script is also used by [1] to generate the SRPM. # This script is also used by [1] to generate the SRPM.
# [1] https://copr.fedorainfracloud.org/coprs/networkmanager/NetworkManager-main/package/nm-git-bundle/ # [1] https://copr.fedorainfracloud.org/coprs/networkmanager/NetworkManager-main/package/nm-git-bundle/
# #
# The purpose is the following. We build (many) NetworkManager packages in copr. The # The purpose is the following. We build (many) NetworkManager packages in
# build process runs a script (contrib/scripts/nm-copr-build.sh) that fetches the git # copr. The build process runs a script (contrib/scripts/nm-copr-build.sh) that
# repository (and we cannot just do a shallow copy -- only for the stupid reason # fetches the git repository (and we cannot just do a shallow copy -- because
# that the automatic version number counts all the commits in the HEAD's history). # the version number is calculated by counts all the commits in the HEAD's
# NetworkManager's git repository is relatively large so fetching it over and over # history). NetworkManager's git repository is relatively large so fetching it
# is wasteful. The idea is to have a recent git-bundle of the repository, which is # over and over is wasteful. The idea is to have a recent git-bundle of the
# hosted close-by in the copr infrastructure. So the build script first tries to # repository, which is hosted close-by in the copr infrastructure. So the build
# download the bundle to get the bulk of the git history, before doing additional # script first tries to download the bundle to get the bulk of the git history,
# fetches from the upstream repository. # before doing additional fetches from the upstream repository. From time to
# From time to time, a new bundle has to be generated in copr. # time, a new bundle has to be generated in copr.
set -ex set -ex

View file

@ -1,6 +1,27 @@
#!/bin/bash #!/bin/bash
# environment variables: # This is the build script used by our copr repository at
# https://copr.fedorainfracloud.org/coprs/networkmanager
#
# On a new upstream release, add new copr jobs named "NetworkManager-X.Y" and
# "NetworkManager-X.Y-debug".
#
# - best, look at the latest copr project and replicate the settings.
# - add a custom build with the following script:
#
# #!/bin/bash
# export GIT_REF=nm-$X-$Y
# export DEBUG=0/1
# export LTO=
# curl https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/raw/main/contrib/scripts/nm-copr-build.sh | bash
#
# - for certain CentOS/EPEL you need to add https://copr.fedorainfracloud.org/coprs/nmstate/nm-build-deps/
# as build chroot. See under "Settings/Project Details" for the latest copr project.
# - go to "Settings/Integrations" and find the notification URL for the project. Then
# go to https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/hooks and add
# a push event for the "nm-$X-$Y" branch.
#
# environment variables for this script:
# - GIT_REF: the ref that should be build. Can be "main" or a git sha. # - GIT_REF: the ref that should be build. Can be "main" or a git sha.
# - DEBUG: set to 1 to build "--with debug". Otherwise the default is a release # - DEBUG: set to 1 to build "--with debug". Otherwise the default is a release
# build. # build.