7f69c7ebdf
Remove version.spec.inc from git ================================ We no longer track `version.spec.inc` in git. This is useful for development. If we build a snapshot, the file is required but if we build a `release` build (see below), then we don't include it. Make improvements ================= We distinguish between `snapshot-` and `release-` builds now in the `Makefile`. These old targets are mapped to their new counterparts and a deprecation warning is shown: * `setup` -> `snapshot-setup` * `local-rpm` -> `snapshot-rpm` * `local-srpm` -> `snapshot-srpm` * `local-prep` -> `snapshot-prep` * `local-clean` -> `snapshot-clean` We also have these new Make targets that run the build process with a release tarball instead: * `release-setup` * `release-rpm` * `release-srpm` * `release-prep` * `release-clean` The targets `local-list-check` and `local-tmt-vm` have been commented out because I think they were not needed. I just kept them for future reference of research done in those areas. All builds described by the `Makefile` are still local and no `mock` is involved. I find this the easiest to debug. Toggle default bcond state for snapshot_build ============================================= We want to be able to build non-snapshot releases with this repo. That's why be default the build condition `snapshot_build` is off. So only when you explicitly enable `--with=snapshot_build` or define `--define "_with_snapshot_build 1"` you'll be able to build a snapshot. If however the build happens in Copr with a namespace that begins with `fedora-llvm-team/llvm-snapshots-`, then the build condition is ON by default and there's no need to enable it explicitly with `--with=snapshot_build`. Things related to release update ================================ * Add llvm-project tarball and signature to sources * Fix: error: source 1001 defined multiple times * Fix: error: source 1006 defined multiple times * Fix missing newline * Conditionally apply 0001-Always-build-shared-libs-for-LLD.patch * Only enable offload runtime in snapshot mode Misc. ===== * Add missing prep dependency
61 lines
2.5 KiB
Bash
Executable File
61 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
# You need these packages to run this script: git tar xz curl-minimal
|
|
|
|
set -e
|
|
|
|
# This is important for systems that have a different local but want to produce
|
|
# a valid changelog date.
|
|
LANG=en_EN
|
|
|
|
function loginfo() {
|
|
local msg=$1
|
|
>&2 echo "[INFO]" $msg
|
|
}
|
|
|
|
loginfo "Determine date in YYYYMMDD form"
|
|
llvm_snapshot_yyyymmdd=$(date +%Y%m%d)
|
|
[[ ! -z "${YYYYMMDD}" ]] && llvm_snapshot_yyyymmdd=$YYYYMMDD
|
|
|
|
git_revision_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/snapshot-version-sync/llvm-git-revision-${llvm_snapshot_yyyymmdd}.txt
|
|
loginfo "Get the revision for today from $git_revision_url"
|
|
llvm_snapshot_git_revision=$(curl -sL $git_revision_url)
|
|
llvm_snapshot_git_revision_short=$(echo "${llvm_snapshot_git_revision:0:14}")
|
|
|
|
release_url=https://github.com/fedora-llvm-team/llvm-snapshots/releases/download/snapshot-version-sync/llvm-release-${llvm_snapshot_yyyymmdd}.txt
|
|
loginfo "Get the release for today from $release_url"
|
|
llvm_snapshot_version=$(curl -sL $release_url)
|
|
llvm_snapshot_version_major=$(echo $llvm_snapshot_version | cut -f1 -d.)
|
|
llvm_snapshot_version_minor=$(echo $llvm_snapshot_version | cut -f2 -d.)
|
|
llvm_snapshot_version_patch=$(echo $llvm_snapshot_version | cut -f3 -d.)
|
|
llvm_snapshot_version_suffix=pre${llvm_snapshot_yyyymmdd}.g${llvm_snapshot_git_revision_short}
|
|
llvm_snapshot_version_tag=${llvm_snapshot_version}~${llvm_snapshot_version_suffix}
|
|
llvm_snapshot_changelog_entry="* $(date +'%a %b %d %Y') LLVM snapshot - ${llvm_snapshot_version_tag}"
|
|
|
|
tempfile=$(mktemp)
|
|
cat > $tempfile <<EOF
|
|
%if %{with snapshot_build}
|
|
%global maj_ver ${llvm_snapshot_version_major}
|
|
%global min_ver ${llvm_snapshot_version_minor}
|
|
%global patch_ver ${llvm_snapshot_version_patch}
|
|
%undefine rc_ver
|
|
|
|
%global llvm_snapshot_version ${llvm_snapshot_version}
|
|
%global llvm_snapshot_version_tag ${llvm_snapshot_version_tag}
|
|
%global llvm_snapshot_version_major ${llvm_snapshot_version_major}
|
|
%global llvm_snapshot_version_minor ${llvm_snapshot_version_minor}
|
|
%global llvm_snapshot_version_patch ${llvm_snapshot_version_patch}
|
|
%global llvm_snapshot_yyyymmdd ${llvm_snapshot_yyyymmdd}
|
|
%global llvm_snapshot_git_revision ${llvm_snapshot_git_revision}
|
|
%global llvm_snapshot_git_revision_short ${llvm_snapshot_git_revision_short}
|
|
%global llvm_snapshot_version_suffix ${llvm_snapshot_version_suffix}
|
|
%global llvm_snapshot_changelog_entry ${llvm_snapshot_changelog_entry}
|
|
%endif
|
|
EOF
|
|
|
|
# One for logs
|
|
cat $tempfile >&2
|
|
|
|
# One to redirect it away
|
|
cat $tempfile
|