diff options
author | Bazaah | 2023-09-09 17:48:54 +0000 |
---|---|---|
committer | Bazaah | 2023-09-09 17:48:54 +0000 |
commit | 526abeb5c9b62beb4803954ea9bc36b3fb1375d4 (patch) | |
tree | e78bf20a0f001225757d1e4dc2d759d130ed656d /justfile | |
parent | 764375e8303a475c871af78be5278717ab828f5a (diff) | |
parent | 321091d61d0a9e75dd39a1f3eac662e47f60c2a4 (diff) | |
download | aur-526abeb5c9b62beb4803954ea9bc36b3fb1375d4.tar.gz |
merge: master <--- feature/v18.2.0-1
* HEAD
| \
| * 321091d <github@luxolus.com> pkgbuild: pkgver=v18.2.0 pkgrel=1
| * fe66554 <github@luxolus.com> justfile: add cexec, ctest, repackage targets
| * 343f78c <github@luxolus.com> justfile: improvements to upload to handle new packages
| * 3ddb703 <github@luxolus.com> justfile: remove watch, logs
| * 9ca7efd <github@luxolus.com> gh-upload-artifact: try pretty print happy path of upload
| * 4cc7eb5 <github@luxolus.com> pkgbuild: updates to install files for v18
| * b019b81 <github@luxolus.com> pkgbuild: enable optional rbd components
| * 1ce90d2 <github@luxolus.com> pkgbuild: disable proprietary rgw backends
| * 76a50ba <github@luxolus.com> pkgbuild: disable tracing / opentelemetry
| * 030000e <github@luxolus.com> pkgbuild: reenable system utf8proc
| * ffbeef6 <github@luxolus.com> pkgbuild: use backport-log-runway-expansion.patch
| * 216795b <github@luxolus.com> repo: add backport-log-runway-expansion.patch
| * 9e5e0ad <github@luxolus.com> pkgbuild: use fix-ecode-shec-test.patch
| * 2f5f113 <github@luxolus.com> repo: add ceph-18.2.0-fix-ecode-shec-test.patch
| * 1f5029b <github@luxolus.com> pkgbuild: use ceph-18.2.0-fmt10-fixes.patch
| * 279af4c <github@luxolus.com> repo: add ceph-18.2.0-fmt10-fixes.patch
| * c1d084d <github@luxolus.com> repo: update ceph-17.2.4-test-bluefs-split.patch
| * 5dd05c5 <github@luxolus.com> repo: rm upstreamed iterator depreciations
| * ef24ee7 <github@luxolus.com> pkgbuild: update tox-mypy-false-postive.patch
| * 5b923a5 <github@luxolus.com> pkgbuild: rm upstreamed gcc13 patches
| * 4095603 <github@luxolus.com> pkgbuild: rm delete-test-librados-asio.patch
| * a60c26a <github@luxolus.com> pkgbuild: rm -DFMT_DEPRECATED_OSTREAM
| * 1531a6a <github@luxolus.com> pkgbuild: rm ceph-17.2.4.-tox-cephadm-rm.patch
| * 187fed6 <github@luxolus.com> repo: revert backport-with-fmt-version.patch
| * 4df4495 <github@luxolus.com> pkgbuild: add inetutils,xmlstarlet to checkdepends
| * f36dcde <github@luxolus.com> pkgbuild: add makedepend 'thrift'
| * da1d129 <github@luxolus.com> pkgbuild: cleanup pkgname, reorganize arch,pkgdesc
| * bfd09af <github@luxolus.com> pkgbuild: reorganize makedepends, checkdepends
| * f649488 <github@luxolus.com> pkgbuild: package virtual targets
| * bf7fef7 <github@luxolus.com> pkgbuild: package misc. ceph tooling / libs
| * eb35c47 <github@luxolus.com> pkgbuild: package more client / utils
| * 0c50604 <github@luxolus.com> pkgbuild: package ceph cluster components
| * f115c61 <github@luxolus.com> pkgbuild: package ceph python libs
| * 7f61cf4 <github@luxolus.com> pkgbuild: package core clients
| * d2936ef <github@luxolus.com> pkgbuild: package core libs
| * 38b0f6b <github@luxolus.com> pkgbuild: add func _make_ceph_packages
| * 7666ef7 <github@luxolus.com> pkgbuild: add _package, _print funcs
| * a2346ce <github@luxolus.com> pkgbuild: rm old package() functions
| /
| master
Closes: #16
Signed-off-by: Bazaah <github@luxolus.com>
Diffstat (limited to 'justfile')
-rw-r--r-- | justfile | 45 |
1 files changed, 23 insertions, 22 deletions
@@ -16,25 +16,26 @@ build: @$Say Building @{{PkgBuild}} via chroot makechrootpkg -c -r {{ChrootPath}} -d "/tmp:/tmp" -C -n -l {{PkgVer}}_{{PkgRel}} +# Repackage without rebuilding +repackage: + @$Say Repackaging @{{PkgBuild}} via chroot + makechrootpkg -r {{ChrootPath}} -l {{PkgVer}}_{{PkgRel}} -- --skipint --noprepare --noextract --nocheck --repackage --force + +# Run a command in the chroot environment +cexec +args: (_cexec "." args) + +# Run ctest in the chroot environment +ctest *args: (_cexec "build" "ctest" args) + # Create and update the base chroot chroot: (_update_chroot ChrootBase) # Initialize the base chroot for building packages mkchroot: (_mkchroot ChrootBase) -# Watch build log streams, optionally filtering them with the given regex and options -watch $filter=None $opts="-iP": _mkloglist - @$Say Watching build {{BuildTriple}} logs ${filter:+"(filter: $filter $opts)"} - tail -F -n +1 --silent $(cat {{LogFileList}} | xargs) 2>/dev/null {{ if filter == None { None } else { '| rg ' + opts + ' "' + filter + '"' } }} - -# Print build logs, optionally filtering them with the given regex and options -logs $filter=None $opts="-iP": _mkloglist - @$Say Printing {{BuildTriple}} logs ${filter:+"(filter: $filter $opts)"} - cat *.log 2>/dev/null {{ if filter == None { None } else { '| rg ' + opts + ' "' + filter + '"' } }} - # Install required dependencies deps: - pacman -S base-devel sudo devtools ripgrep --needed --noconfirm + pacman -S base-devel util-linux sudo devtools ripgrep --needed --noconfirm # Clean one or more of: chroot|deps|artifacts|logs clean +what="chroot": @@ -63,7 +64,7 @@ clean +what="chroot": done # Upload built artifacts to Github, using the associated release -upload pkg="ceph,ceph-libs,ceph-mgr": (_upload pkg) +upload pkg="@all": (_upload pkg) # Initialize the chroot @_mkchroot $cbase: @@ -75,24 +76,25 @@ upload pkg="ceph,ceph-libs,ceph-mgr": (_upload pkg) $Say Updating chroot packages @$cbase arch-nspawn $cbase pacman -Syu -@_mkloglist: - mkdir -p $(dirname {{LogFileList}}) - echo \ - ceph-{{BuildTriple}}-{build,prepare,check,package_ceph{,-libs,-mgr}}.log \ - ceph-{,mgr-,libs-}{{BuildTriple}}.pkg.tar.zst-namcap.log \ - PKGBUILD-namcap.log \ - > {{LogFileList}} +# Exec into the chroot to a path relative to the workdir, and run the given args +_cexec path +args: + arch-nspawn {{ChrootActive}} --chdir /build/{{PkgBase}}/src/{{PkgBase}}-{{PkgVer}}/{{path}} sh -c {{quote(trim(args))}} # Script to upload a comma separated list of packages to the active Github release _upload $pkgstring: #!/usr/bin/env bash set -euo pipefail - [[ -n "$GITHUB_TOKEN" ]] || { $Say "Error: GITHUB_TOKEN must be set" && exit 4; } + [[ -v GITHUB_TOKEN ]] || { $Say "Error: GITHUB_TOKEN must be set" && exit 4; } IFS=', ' read -r -a PKGS <<<"$pkgstring" + if printf '%s\0' "${PKGS[@]}" | grep -zxqF -- '@all'; then + $Say Expanding '@all' to package set + PKGS=($(rg -P --only-matching --replace '$1' '^package_(.+)\(\) {' {{PkgBuild}} | sort | xargs)) + fi - $Say "uploading package(s): { ${PKGS[@]} } to {{GithubRepo}}/releases/v{{PkgVer}}-{{PkgRel}}" + $Say "Uploading ${#PKGS[@]} package(s) to {{GithubRepo}}/releases/v{{PkgVer}}-{{PkgRel}}" + printf ' > %s %s %s %s %s\n' "${PKGS[@]}" | column -t declare -A FILES for pkg in "${PKGS[@]}"; do @@ -137,7 +139,6 @@ GitCommitish := if `git tag --points-at HEAD` != None { } BuildId := "[" + C_YELLOW + PkgBase + C_RESET + "/" + C_GREEN + PkgVer + ":" + PkgRel + C_RESET + "@" + C_CYAN + GitCommitish + C_RESET + "]" BuildTriple := PkgVer + "-" + PkgRel + "-" + "x86_64" -LogFileList := env_var_or_default("TEMP", "/tmp") / PkgBase + ".temp" / "logfiles" GithubRepo := "bazaah/aur-ceph" # ~~~ Color Codes ~~~ |