diff --git a/contrib/scripts/nm-copr-build-nm-git-bundle.sh b/contrib/scripts/nm-copr-build-nm-git-bundle.sh index d046ccac4a..5447a56ead 100755 --- a/contrib/scripts/nm-copr-build-nm-git-bundle.sh +++ b/contrib/scripts/nm-copr-build-nm-git-bundle.sh @@ -4,22 +4,22 @@ # as a package. This bundle contains the current git history # 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. # # This script is also used by [1] to generate the SRPM. # [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 -# build process runs a script (contrib/scripts/nm-copr-build.sh) that fetches the git -# repository (and we cannot just do a shallow copy -- only for the stupid reason -# that the automatic version number counts all the commits in the HEAD's history). -# NetworkManager's git repository is relatively large so fetching it over and over -# is wasteful. The idea is to have a recent git-bundle of the repository, which is -# hosted close-by in the copr infrastructure. So the build script first tries to -# download the bundle to get the bulk of the git history, before doing additional -# fetches from the upstream repository. -# From time to time, a new bundle has to be generated in copr. +# The purpose is the following. We build (many) NetworkManager packages in +# copr. The build process runs a script (contrib/scripts/nm-copr-build.sh) that +# fetches the git repository (and we cannot just do a shallow copy -- because +# the version number is calculated by counts all the commits in the HEAD's +# history). NetworkManager's git repository is relatively large so fetching it +# over and over is wasteful. The idea is to have a recent git-bundle of the +# repository, which is hosted close-by in the copr infrastructure. So the build +# script first tries to download the bundle to get the bulk of the git history, +# before doing additional fetches from the upstream repository. From time to +# time, a new bundle has to be generated in copr. set -ex diff --git a/contrib/scripts/nm-copr-build.sh b/contrib/scripts/nm-copr-build.sh index 28ce4fced5..da6da77170 100755 --- a/contrib/scripts/nm-copr-build.sh +++ b/contrib/scripts/nm-copr-build.sh @@ -1,6 +1,27 @@ #!/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. # - DEBUG: set to 1 to build "--with debug". Otherwise the default is a release # build.