Skip to content

Commit

Permalink
Merge branch 'master' into PGP_keys_rebuild-todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiz96 authored Jan 9, 2025
2 parents 5c80a32 + 10d7f48 commit c83886b
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ BASH_SCRIPTS = \
aur/review \
package/parse-submodules \
package/pkgsearch \
package/rebuild-todo
package/rebuild-todo \
package/pkggrep

PYTHON_SCRIPTS = \
package/staging2testing \
Expand Down
56 changes: 56 additions & 0 deletions package/pkggrep
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash

# SPDX-License-Identifier: GPL-2.0

set -eou pipefail

PROGNAME="${BASH_SOURCE[0]##*/}"

usage() {
cat <<- _EOF_
Usage: ${PROGNAME} [OPTIONS] expression
Does a full search on all files currently in the repository.
This is useful if one wants to search for a symbol instead of a soname.
For sonames please use 'sogrep'.
OPTIONS
-h, --help Show this help text
Examples:
$ ${PROGNAME} _ZN3fmt3v116detail10locale_refC1ISt6localeEERKT_
_EOF_
}

if ! ((${#})); then
usage
exit 0
fi

SEARCH_EXPRESSION=""
SEARCH_HOST="build.archlinux.org"

while ((${#})); do
key="${1}"
case ${key} in
-h|--help)
usage
exit 0
;;
--)
shift
break
;;
-*)
echo "invalid argument: $key"
usage
exit 1
;;
*)
SEARCH_EXPRESSION="${key}"
;;
esac
shift
done

ssh "${SEARCH_HOST}" "parallel \"rg --files-with-matches --search-zip -- '${SEARCH_EXPRESSION}' {} && pacman -Qpq {}\" ::: /srv/ftp/pool/*/*.zst"
2 changes: 1 addition & 1 deletion package/rebuild-todo
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ usage() {
-e, --edit Edit PKGBUILD before building. Default when todo type is "Task"
-o, --offload Use offloaded builds
-h, --help Show this help text
--dry-run Show the offload-build and commitpkg being ran
-d, --dry-run Show the offload-build and commitpkg being ran
--import-keys Import PGP keys for packages source verification into the user's keyring
--no-build Don't build PKGBUILD
--no-publish Don't run commitpkg after building
Expand Down

0 comments on commit c83886b

Please sign in to comment.