Compare commits

..

1 Commits

Author SHA1 Message Date
Levente Polyak
93928f7409 wip: version edit 2024-02-16 22:33:59 +01:00
118 changed files with 340 additions and 2640 deletions

View File

@@ -1,15 +0,0 @@
# EditorConfig configuration for devtools
# https://editorconfig.org
# Top-most EditorConfig file
root = true
# Unix-style newlines without trailing whitespaces, but with a newline
# ending every file, utf-8 charset, set indent to tabs
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = tab
tab_width = 4

View File

@@ -8,37 +8,14 @@ build:
stage: build stage: build
needs: [] needs: []
script: script:
- pacman -Syu --noconfirm m4 make openssh subversion rsync arch-install-scripts git bzr mercurial diffutils asciidoctor - pacman -Syu --noconfirm m4 make openssh subversion rsync arch-install-scripts git bzr mercurial diffutils asciidoc
- make PREFIX=/usr - make PREFIX=/usr
- make PREFIX=/usr DESTDIR=build install - make PREFIX=/usr DESTDIR=build install
lint: check:
stage: test stage: test
needs: [] needs: []
script: script:
- pacman -Syu --noconfirm m4 make openssh subversion rsync arch-install-scripts git bzr mercurial diffutils asciidoctor shellcheck - pacman -Syu --noconfirm m4 make openssh subversion rsync arch-install-scripts git bzr mercurial diffutils asciidoc shellcheck
- make check || true - make check || true
- SHELLCHECK_OPTS="-S error" make check - SHELLCHECK_OPTS="-S error" make check
test:
stage: test
needs: []
script:
- pacman -Syu --noconfirm m4 make openssh subversion rsync arch-install-scripts git bzr mercurial diffutils coreutils asciidoctor shellcheck nvchecker bats
- make test BATS_EXTRA_ARGS='--formatter junit'
artifacts:
reports:
junit: build/coverage/bats-report.xml
coverage:
stage: test
needs: []
script:
- pacman -Syu --noconfirm m4 make openssh subversion rsync arch-install-scripts git bzr mercurial diffutils coreutils asciidoctor shellcheck nvchecker bats kcov jq
- make coverage
coverage: '/Percent covered\s+\d+\.\d+/'
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: build/coverage/bats.*/cobertura.xml

View File

@@ -1,6 +1,6 @@
SHELL=/bin/bash -o pipefail SHELL=/bin/bash
V=1.2.1 V=1.1.1
BUILDTOOLVER ?= $(V) BUILDTOOLVER ?= $(V)
PREFIX = /usr/local PREFIX = /usr/local
@@ -52,13 +52,6 @@ ARCHBUILD_LINKS = \
COMPLETIONS = $(addprefix $(BUILDDIR)/,$(patsubst %.in,%,$(wildcard contrib/completion/*/*))) COMPLETIONS = $(addprefix $(BUILDDIR)/,$(patsubst %.in,%,$(wildcard contrib/completion/*/*)))
CASES ?= test/case
JOBS ?= $(shell nproc)
BATS_EXTRA_ARGS ?=
BATS_ARGS ?= --jobs $(JOBS) $(BATS_EXTRA_ARGS) --verbose-run
COVERAGE_DIR ?= $(BUILDDIR)/coverage
all: binprogs library conf completion man all: binprogs library conf completion man
binprogs: $(BINPROGS) binprogs: $(BINPROGS)
library: $(LIBRARY) library: $(LIBRARY)
@@ -99,10 +92,10 @@ $(eval $(call buildInScript,build/bin,src/,.in,755))
$(eval $(call buildInScript,build/lib,src/lib/,,644)) $(eval $(call buildInScript,build/lib,src/lib/,,644))
$(foreach completion,$(wildcard contrib/completion/*),$(eval $(call buildInScript,build/$(completion),$(completion)/,.in,444))) $(foreach completion,$(wildcard contrib/completion/*),$(eval $(call buildInScript,build/$(completion),$(completion)/,.in,444)))
$(BUILDDIR)/doc/man/%: doc/man/%.asciidoc doc/man/include/footer.asciidoc $(BUILDDIR)/doc/man/%: doc/man/%.asciidoc doc/asciidoc.conf doc/man/include/footer.asciidoc
$(GEN_MSG) $(GEN_MSG)
@mkdir -p $(BUILDDIR)/doc/man @mkdir -p $(BUILDDIR)/doc/man
@asciidoctor --backend=manpage --destination-dir=$(BUILDDIR)/doc/man --attribute pkgdatadir=$(DATADIR) $< @a2x --no-xmllint --asciidoc-opts="-f doc/asciidoc.conf" -d manpage -f manpage --destination-dir=$(BUILDDIR)/doc/man -a pkgdatadir=$(DATADIR) $<
conf: conf:
@install -d $(BUILDDIR)/makepkg.conf.d @install -d $(BUILDDIR)/makepkg.conf.d
@@ -175,17 +168,8 @@ dist:
git archive --format=tar --prefix=devtools-$(V)/ v$(V) | gzip > devtools-$(V).tar.gz git archive --format=tar --prefix=devtools-$(V)/ v$(V) | gzip > devtools-$(V).tar.gz
gpg --detach-sign --use-agent devtools-$(V).tar.gz gpg --detach-sign --use-agent devtools-$(V).tar.gz
test: binprogs library conf completion man
@mkdir -p $(COVERAGE_DIR)
bats $(BATS_ARGS) $(CASES) | tee $(COVERAGE_DIR)/bats-report.xml
coverage: binprogs library conf completion man
kcov --include-path=src $(COVERAGE_DIR) bats $(BATS_ARGS) $(CASES)
jq -r '. | ["Percent covered", .percent_covered], ["Covered lines", .covered_lines], ["Total lines", .total_lines], ["Percent low", .percent_low], ["Percent high", .percent_high] | @tsv' \
$(COVERAGE_DIR)/bats.*/coverage.json
check: $(BINPROGS_SRC) $(LIBRARY_SRC) contrib/completion/bash/devtools.in config/makepkg/x86_64.conf contrib/makepkg/PKGBUILD.proto check: $(BINPROGS_SRC) $(LIBRARY_SRC) contrib/completion/bash/devtools.in config/makepkg/x86_64.conf contrib/makepkg/PKGBUILD.proto
shellcheck $^ shellcheck $^
.PHONY: all binprogs library completion conf man clean install uninstall tag dist upload test coverage check .PHONY: all binprogs library completion conf man clean install uninstall tag dist upload check
.DELETE_ON_ERROR: .DELETE_ON_ERROR:

View File

@@ -71,7 +71,6 @@ Component: pkgctl db remove
- coreutils - coreutils
- curl - curl
- diffutils - diffutils
- expac
- fakeroot - fakeroot
- findutils - findutils
- grep - grep
@@ -92,13 +91,13 @@ Component: pkgctl db remove
- bat (pretty printing) - bat (pretty printing)
- nvchecker (version checking) - nvchecker (version checking)
- pacman-contrib (--update-checksums options for pkgctl build)
### Development Dependencies ### Development Dependencies
- asciidoctor - asciidoc
- make - make
- shellcheck - shellcheck
- bats
## License ## License

View File

@@ -42,13 +42,12 @@ CHOST="x86_64-pc-linux-gnu"
#CPPFLAGS="" #CPPFLAGS=""
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \ CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \ -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection \ -fstack-clash-protection -fcf-protection"
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS" CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
-Wl,-z,pack-relative-relocs" -Wl,-z,pack-relative-relocs"
LTOFLAGS="-flto=auto" LTOFLAGS="-flto=auto"
RUSTFLAGS="-Cforce-frame-pointers=yes" RUSTFLAGS=""
#-- Make Flags: change this for DistCC/SMP systems #-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2" #MAKEFLAGS="-j2"
#-- Debugging flags #-- Debugging flags

View File

@@ -42,13 +42,12 @@ CHOST="x86_64-pc-linux-gnu"
#CPPFLAGS="" #CPPFLAGS=""
CFLAGS="-march=x86-64-v3 -mtune=generic -O2 -pipe -fno-plt -fexceptions \ CFLAGS="-march=x86-64-v3 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \ -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection \ -fstack-clash-protection -fcf-protection"
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS" CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \ LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
-Wl,-z,pack-relative-relocs" -Wl,-z,pack-relative-relocs"
LTOFLAGS="-flto=auto" LTOFLAGS="-flto=auto"
RUSTFLAGS="-Cforce-frame-pointers=yes" RUSTFLAGS=""
#-- Make Flags: change this for DistCC/SMP systems #-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2" #MAKEFLAGS="-j2"
#-- Debugging flags #-- Debugging flags

View File

@@ -1,112 +0,0 @@
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
#Color
NoProgressBar
# We cannot check disk space from within a chroot environment
#CheckSpace
VerbosePkgLists
ParallelDownloads = 5
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
[gnome-unstable]
Include = /etc/pacman.d/mirrorlist
[kde-unstable]
Include = /etc/pacman.d/mirrorlist
[core-staging]
Include = /etc/pacman.d/mirrorlist
[core-testing]
Include = /etc/pacman.d/mirrorlist
[core]
Include = /etc/pacman.d/mirrorlist
[extra-staging]
Include = /etc/pacman.d/mirrorlist
[extra-testing]
Include = /etc/pacman.d/mirrorlist
[extra]
Include = /etc/pacman.d/mirrorlist
# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.
[multilib-staging]
Include = /etc/pacman.d/mirrorlist
[multilib-testing]
Include = /etc/pacman.d/mirrorlist
[multilib]
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

View File

@@ -1,83 +0,0 @@
#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives
#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir = /
#DBPath = /var/lib/pacman/
#CacheDir = /var/cache/pacman/pkg/
#LogFile = /var/log/pacman.log
#GPGDir = /etc/pacman.d/gnupg/
#HookDir = /etc/pacman.d/hooks/
HoldPkg = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
#NoExtract =
# Misc options
#UseSyslog
#Color
NoProgressBar
# We cannot check disk space from within a chroot environment
#CheckSpace
VerbosePkgLists
ParallelDownloads = 5
# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required
# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.
#
# REPOSITORIES
# - can be defined here or included from another file
# - pacman will search repositories in the order defined here
# - local/custom mirrors can be added here or in separate files
# - repositories listed first will take precedence when packages
# have identical names, regardless of version number
# - URLs will have $repo replaced by the name of the current repo
# - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
# [repo-name]
# Server = ServerName
# Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#
# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.
[gnome-unstable]
Include = /etc/pacman.d/mirrorlist
[kde-unstable]
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

View File

@@ -14,6 +14,7 @@ source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-inspect.sh
# shellcheck source=src/lib/valid-search.sh # shellcheck source=src/lib/valid-search.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-search.sh source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-search.sh
_binary_arch=${DEVTOOLS_VALID_ARCHES[*]:0:-1}
_colors=(never always auto) _colors=(never always auto)
@@ -27,7 +28,6 @@ _makechrootpkg_args=(
-I -I
-l -l
-n -n
-t
-T -T
-U -U
-x -x
@@ -37,7 +37,6 @@ _makechrootpkg_args_D_opts() { _filedir -d; }
_makechrootpkg_args_r_opts() { _filedir -d; } _makechrootpkg_args_r_opts() { _filedir -d; }
_makechrootpkg_args_I_opts() { _filedir '*.pkg.tar.*'; } _makechrootpkg_args_I_opts() { _filedir '*.pkg.tar.*'; }
_makechrootpkg_args_l_opts() { _filedir -d; } _makechrootpkg_args_l_opts() { _filedir -d; }
_makechrootpkg_args_t_opts() { _filedir -d; }
_makechrootpkg_args_U_opts() { :; } _makechrootpkg_args_U_opts() { :; }
_makechrootpkg_args_x_opts() { _devtools_completions_inspect; } _makechrootpkg_args_x_opts() { _devtools_completions_inspect; }
_makechrootpkg() { __devtools_complete _makechrootpkg; } _makechrootpkg() { __devtools_complete _makechrootpkg; }
@@ -63,14 +62,12 @@ _mkarchroot_args=(
-C -C
-M -M
-c -c
-f
-h -h
) )
_mkarchroot_args_U_opts() { _filedir '*.pkg.tar.*'; } _mkarchroot_args_U_opts() { _filedir '*.pkg.tar.*'; }
_mkarchroot_args_C_opts() { _filedir '*.conf'; } _mkarchroot_args_C_opts() { _filedir '*.conf'; }
_mkarchroot_args_M_opts() { _filedir '*.conf'; } _mkarchroot_args_M_opts() { _filedir '*.conf'; }
_mkarchroot_args_c_opts() { _filedir -d; } _mkarchroot_args_c_opts() { _filedir -d; }
_mkarchroot_args_f_opts() { _filedir -d; }
_mkarchroot_opts() { _mkarchroot_opts() {
local args local args
args=$(__pkgctl_word_count_after_subcommand) args=$(__pkgctl_word_count_after_subcommand)
@@ -131,7 +128,7 @@ _offload_build_args=(
) )
_offload_build_args__repo_opts() { _devtools_completions_build_repo; } _offload_build_args__repo_opts() { _devtools_completions_build_repo; }
_offload_build_args_r_opts() { _offload_build_args__repo_opts; } _offload_build_args_r_opts() { _offload_build_args__repo_opts; }
_offload_build_args__arch_opts() { _devtools_completions_binary_arch; } _offload_build_args__arch_opts() { _devtools_completions_arch; }
_offload_build_args_a_opts() { _offload_build_args__arch_opts; } _offload_build_args_a_opts() { _offload_build_args__arch_opts; }
_offload_build_args__server_opts() { :; } _offload_build_args__server_opts() { :; }
_offload_build_args_s_opts() { _offload_build_args__server_opts; } _offload_build_args_s_opts() { _offload_build_args__server_opts; }
@@ -199,7 +196,7 @@ _pkgctl_build_args=(
-h --help -h --help
) )
_pkgctl_build_args__arch_opts() { _devtools_completions_binary_arch; } _pkgctl_build_args__arch_opts() { _devtools_completions_arch; }
_pkgctl_build_args__repo_opts() { _devtools_completions_repo; } _pkgctl_build_args__repo_opts() { _devtools_completions_repo; }
_pkgctl_build_args__worker_opts() { :; } _pkgctl_build_args__worker_opts() { :; }
_pkgctl_build_args_w_opts() { _pkgctl_build_args__worker_opts; } _pkgctl_build_args_w_opts() { _pkgctl_build_args__worker_opts; }
@@ -244,13 +241,9 @@ _pkgctl_db_move_opts() {
_pkgctl_db_remove_args=( _pkgctl_db_remove_args=(
--partial
--noconfirm
-a --arch -a --arch
-h --help -h --help
) )
_pkgctl_db_remove_args__arch_opts() { _devtools_completions_binary_arch; }
_pkgctl_db_remove_args_a_opts() { _pkgctl_db_remove_args__arch_opts; }
_pkgctl_db_remove_opts() { _pkgctl_db_remove_opts() {
local subcommand args local subcommand args
subcommand=(db remove) subcommand=(db remove)
@@ -296,7 +289,6 @@ _pkgctl_aur_drop_from_repo_opts() { _filedir -d; }
_pkgctl_repo_cmds=( _pkgctl_repo_cmds=(
clean
clone clone
configure configure
create create
@@ -322,12 +314,6 @@ _pkgctl_repo_clone_args__jobs_opts() { :; }
_pkgctl_repo_clone_args_j_opts() { _pkgctl_repo_clone_args__jobs_opts; } _pkgctl_repo_clone_args_j_opts() { _pkgctl_repo_clone_args__jobs_opts; }
_pkgctl_repo_clone_opts() { _devtools_completions_all_packages; } _pkgctl_repo_clone_opts() { _devtools_completions_all_packages; }
_pkgctl_repo_clean_args=(
-i --interactive
-n --dry-run
-h --help
)
_pkgctl_repo_clean_opts() { _filedir -d; }
_pkgctl_repo_configure_args=( _pkgctl_repo_configure_args=(
--protocol --protocol
@@ -364,7 +350,6 @@ _pkgctl_repo_switch_opts() {
_pkgctl_version_cmds=( _pkgctl_version_cmds=(
check check
setup
upgrade upgrade
) )
@@ -375,19 +360,7 @@ _pkgctl_version_check_args=(
_pkgctl_version_check_opts() { _filedir -d; } _pkgctl_version_check_opts() { _filedir -d; }
_pkgctl_version_setup_args=(
--prefer-platform-api
--url
--no-check
-f --force
-h --help
)
_pkgctl_version_setup_opts() { _filedir -d; }
_pkgctl_version_setup_args__url_opts() { :; }
_pkgctl_version_upgrade_args=( _pkgctl_version_upgrade_args=(
--no-update-checksums
-v --verbose -v --verbose
-h --help -h --help
) )
@@ -448,9 +421,6 @@ _devtools_completions_color() {
_devtools_completions_arch() { _devtools_completions_arch() {
mapfile -t COMPREPLY < <(compgen -W "${DEVTOOLS_VALID_ARCHES[*]}" -- "$cur") mapfile -t COMPREPLY < <(compgen -W "${DEVTOOLS_VALID_ARCHES[*]}" -- "$cur")
} }
_devtools_completions_binary_arch() {
mapfile -t COMPREPLY < <(compgen -W "${DEVTOOLS_VALID_BINARY_ARCHES[*]}" -- "$cur")
}
_devtools_completions_repo() { _devtools_completions_repo() {
local optional=${1:-} local optional=${1:-}
mapfile -t COMPREPLY < <(compgen -W "${optional} ${DEVTOOLS_VALID_REPOS[*]}" -- "$cur") mapfile -t COMPREPLY < <(compgen -W "${optional} ${DEVTOOLS_VALID_REPOS[*]}" -- "$cur")

View File

@@ -14,6 +14,7 @@ source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-inspect.sh
# shellcheck source=src/lib/valid-search.sh # shellcheck source=src/lib/valid-search.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-search.sh source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-search.sh
_binary_arch=${DEVTOOLS_VALID_ARCHES[*]:0:-1}
_colors=(never always auto) _colors=(never always auto)
_archbuild_args=( _archbuild_args=(
@@ -40,15 +41,15 @@ _pkgctl_auth_status_args=(
) )
_pkgctl_build_args=( _pkgctl_build_args=(
"--arch[Specify architectures to build for (disables auto-detection)]:arch:($DEVTOOLS_VALID_BINARY_ARCHES[*])" "--arch=[Specify architectures to build for (disables auto-detection)]:arch:($_arch[*])"
"--repo[Specify a target repository (disables auto-detection)]:repo:($DEVTOOLS_VALID_REPOS[*])" "--repo=[Specify a target repository (disables auto-detection)]:repo:($DEVTOOLS_VALID_REPOS[*])"
'(-s --staging)'{-s,--staging}'[Build against the staging counterpart of the auto-detected repo]' '(-s --staging)'{-s,--staging}'[Build against the staging counterpart of the auto-detected repo]'
'(-t --testing)'{-t,--testing}'[Build against the testing counterpart of the auto-detected repo]' '(-t --testing)'{-t,--testing}'[Build against the testing counterpart of the auto-detected repo]'
'(-o --offload)'{-o,--offload}'[Build on a remote server and transfer artifacts afterwards]' '(-o --offload)'{-o,--offload}'[Build on a remote server and transfer artifacts afterwards]'
'(-c --clean)'{-c,--clean}'[Recreate the chroot before building]' '(-c --clean)'{-c,--clean}'[Recreate the chroot before building]'
"--inspect[Spawn an interactive shell to inspect the chroot (never, always, failure)]:inspect:($DEVTOOLS_VALID_INSPECT_MODES[*])" "--inspect[Spawn an interactive shell to inspect the chroot (never, always, failure)]:inspect:($DEVTOOLS_VALID_INSPECT_MODES[*])"
'*'{-I,--install-to-chroot}'[Install a package to the working copy of the chroot]:target:_files -g "*.pkg.tar.*(.)"' '(-I --install-to-chroot)'{-I,--install-to-chroot}'[Install a package to the working copy of the chroot]:target:_files -g "*.pkg.tar.*(.)"'
'*'{-i,--install-to-host}"[Install the built packages to the host system]:mode:($DEVTOOLS_VALID_BUILD_INSTALL[*])" '(-i --install-to-host)'{-i,--install-to-host}"[Install the built packages to the host system]:mode:($DEVTOOLS_VALID_BUILD_INSTALL[*])"
'(-w --worker)'{-w,--worker}'[Name of the worker slot, useful for concurrent builds (disables auto-detection)]:slot:' '(-w --worker)'{-w,--worker}'[Name of the worker slot, useful for concurrent builds (disables auto-detection)]:slot:'
'--nocheck[Do not run the check() function in the PKGBUILD]' '--nocheck[Do not run the check() function in the PKGBUILD]'
'--pkgver=[Set pkgver, reset pkgrel and update checksums]:pkgver:' '--pkgver=[Set pkgver, reset pkgrel and update checksums]:pkgver:'
@@ -78,9 +79,7 @@ _pkgctl_db_move_args=(
) )
_pkgctl_db_remove_args=( _pkgctl_db_remove_args=(
'--partial[Remove only partial pkgnames from a split package]' '(-a --arch=)'{-a,--arch=}"[Override the architecture (disables auto-detection)]:arch:($_arch[*])"
'--noconfirm[Bypass any confirmation messages, should only be used with caution]'
'(-a --arch)'{-a,--arch}"[Override the architecture (disables auto-detection)]:arch:($DEVTOOLS_VALID_BINARY_ARCHES[*])"
'(-h --help)'{-h,--help}'[Display usage]' '(-h --help)'{-h,--help}'[Display usage]'
"1:repo:($DEVTOOLS_VALID_REPOS[*])" "1:repo:($DEVTOOLS_VALID_REPOS[*])"
'*:pkgbase:_devtools_completions_all_packages' '*:pkgbase:_devtools_completions_all_packages'
@@ -114,7 +113,6 @@ _pkgctl_aur_drop_from_repo_args=(
_pkgctl_repo_cmds=( _pkgctl_repo_cmds=(
"pkgctl repo command" "pkgctl repo command"
"clean[Remove untracked files from the working tree]"
"clone[Clone a package repository]" "clone[Clone a package repository]"
"configure[Configure a clone according to distro specs]" "configure[Configure a clone according to distro specs]"
"create[Create a new GitLab package repository]" "create[Create a new GitLab package repository]"
@@ -129,13 +127,6 @@ _pkgctl_repo_switch_args=(
'*:git_dir:_files -/' '*:git_dir:_files -/'
) )
_pkgctl_repo_clean_args=(
'(-i --interactive)'{-i,--interactive}'[Show what would be done and clean files interactively]'
'(-n --dry-run)'{-n,--dry-run}"[Don't remove anything, just show what would be done]"
'(-h --help)'{-h,--help}'[Display usage]'
'*:git_dir:_files -/'
)
_pkgctl_repo_clone_args=( _pkgctl_repo_clone_args=(
'(-m --maintainer=)'{-m,--maintainer=}'[Clone all packages of the named maintainer]:maintainer:' '(-m --maintainer=)'{-m,--maintainer=}'[Clone all packages of the named maintainer]:maintainer:'
'--protocol[Clone the repository over https]:proto:(https)' '--protocol[Clone the repository over https]:proto:(https)'
@@ -177,8 +168,8 @@ _pkgctl_search_args=(
_arch_nspawn_args=( _arch_nspawn_args=(
'-C[Location of a pacman config file]:pacman_config:_files -g "*.conf(.)"' '-C[Location of a pacman config file]:pacman_config:_files -g "*.conf(.)"'
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"' '-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
'*-c[Set pacman cache]:pacman_cache:_files -/' '-c[Set pacman cache]:pacman_cache:_files -/'
'*-f[Copy file from the host to the chroot]:copy_file:_files' '-f[Copy file from the host to the chroot]:copy_file:_files'
'-s[Do not run setarch]' '-s[Do not run setarch]'
'-h[Display usage]' '-h[Display usage]'
'1:chroot_dir:_files -/' '1:chroot_dir:_files -/'
@@ -220,12 +211,11 @@ _finddeps_args=(
_makechrootpkg_args=( _makechrootpkg_args=(
'-h[Display usage]' '-h[Display usage]'
'-c[Clean the chroot before building]' '-c[Clean the chroot before building]'
'*-d[Bind directory into build chroot as read-write]:bind_dir_rw:_files -/' '-d[Bind directory into build chroot as read-write]:bind_dir_rw:_files -/'
'*-D[Bind directory into build chroot as read-only]:bind_dir_ro:_files -/' '-D[Bind directory into build chroot as read-only]:bind_dir_ro:_files -/'
'*-t[Mount a tmpfs at directory]:tmpfs_dir:_files -/'
'-u[Update the working copy of the chroot before building]' '-u[Update the working copy of the chroot before building]'
'-r[The chroot dir to use]:chroot_dir:_files -/' '-r[The chroot dir to use]:chroot_dir:_files -/'
'*-I[Install a package into the working copy]:target:_files -g "*.pkg.tar.*(.)"' '-I[Install a package into the working copy]:target:_files -g "*.pkg.tar.*(.)"'
'-l[The directory to use as the working copy]:copy_dir:_files -/' '-l[The directory to use as the working copy]:copy_dir:_files -/'
'-n[Run namcap on the package]' '-n[Run namcap on the package]'
'-T[Build in a temporary directory]' '-T[Build in a temporary directory]'
@@ -238,7 +228,6 @@ _mkarchroot_args=(
'-C[Location of a pacman config file]:pacman_config:_files -g "*.conf(.)"' '-C[Location of a pacman config file]:pacman_config:_files -g "*.conf(.)"'
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"' '-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
'-c[Set pacman cache]:pacman_cache:_files -/' '-c[Set pacman cache]:pacman_cache:_files -/'
'-f[Copy src file from the host to the chroot]:target:_files -/'
'-h[Display usage]' '-h[Display usage]'
'1:working_dir:_files -/' '1:working_dir:_files -/'
'*:packages:_devtools_completions_all_packages' '*:packages:_devtools_completions_all_packages'
@@ -261,7 +250,7 @@ _sogrep_args=(
_offload_build_args=( _offload_build_args=(
'(-r --repo)'{-r,--repo}'[Build against a specific repository]:repo:($DEVTOOLS_VALID_BUILDREPOS[*])' '(-r --repo)'{-r,--repo}'[Build against a specific repository]:repo:($DEVTOOLS_VALID_BUILDREPOS[*])'
'(-a --arch)'{-a,--arch}'[Build against a specific architecture]:arch:(${DEVTOOLS_VALID_BINARY_ARCHES[*]})' '(-a --arch)'{-a,--arch}'[Build against a specific architecture]:arch:(${_binary_arch[*]})'
'(-s --server)'{-s,--server}'[Offload to a specific Build server]:server:' '(-s --server)'{-s,--server}'[Offload to a specific Build server]:server:'
'(-h --help)'{-h,--help}'[Display usage]' '(-h --help)'{-h,--help}'[Display usage]'
) )
@@ -302,7 +291,6 @@ _pkgctl_args=(
_pkgctl_version_cmds=( _pkgctl_version_cmds=(
"pkgctl version command" "pkgctl version command"
"check[Compares local package versions against upstream versions]" "check[Compares local package versions against upstream versions]"
"setup[Automatically detect and setup a basic nvchecker config]"
"upgrade[Adjust the PKGBUILD to match the latest upstream version]" "upgrade[Adjust the PKGBUILD to match the latest upstream version]"
) )
@@ -312,17 +300,7 @@ _pkgctl_version_check_args=(
'*:git_dir:_files -/' '*:git_dir:_files -/'
) )
_pkgctl_version_setup_args=(
'(-f --force)'{-f,--force}'[Do not prompt before overwriting]'
'--prefer-platform-api[Prefer platform specific GitHub/GitLab API for complex cases]'
'--url[Derive check target from URL instead of source array]:url:'
'--no-check[Do not run version check after setup]'
'(-h --help)'{-h,--help}'[Display usage]'
'*:git_dir:_files -/'
)
_pkgctl_version_upgrade_args=( _pkgctl_version_upgrade_args=(
'--no-update-checksums[Disable computation and update of the checksums]'
'(-v --verbose)'{-v,--verbose}'[Display results including up-to-date versions]' '(-v --verbose)'{-v,--verbose}'[Display results including up-to-date versions]'
'(-h --help)'{-h,--help}'[Display usage]' '(-h --help)'{-h,--help}'[Display usage]'
'*:git_dir:_files -/' '*:git_dir:_files -/'

37
doc/asciidoc.conf Normal file
View File

@@ -0,0 +1,37 @@
## linkman: macro
# Inspired by/borrowed from the GIT source tree at Documentation/asciidoc.conf
#
# Usage: linkman:command[manpage-section]
#
# Note, {0} is the manpage section, while {target} is the command.
#
# Show man link as: <command>(<section>); if section is defined, else just show
# the command.
[macros]
(?su)[\\]?(?P<name>linkman):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
[attributes]
asterisk=&#42;
plus=&#43;
caret=&#94;
startsb=&#91;
endsb=&#93;
backslash=&#92;
tilde=&#126;
apostrophe=&#39;
backtick=&#96;
litdd=&#45;&#45;
ifdef::backend-docbook[]
[linkman-inlinemacro]
{0%{target}}
{0#<citerefentry>}
{0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
{0#</citerefentry>}
endif::backend-docbook[]
ifdef::backend-xhtml11[]
[linkman-inlinemacro]
<a href="{target}.{0}.html">{target}{0?({0})}</a>
endif::backend-xhtml11[]

View File

@@ -28,9 +28,8 @@ Options
*-c* <dir>:: *-c* <dir>::
Set pacman cache, if no directory is specified the passed pacman.conf's cachedir is used with a fallback to '/etc/pacman.conf' Set pacman cache, if no directory is specified the passed pacman.conf's cachedir is used with a fallback to '/etc/pacman.conf'
*-f* <src>[:<dst>]:: *-f* <file>::
Copy file from the host to the chroot. Copy file from the host to the chroot
If 'dst' is not provided, it defaults to 'src' inside of the chroot.
*-s*:: *-s*::
Do not run setarch Do not run setarch

View File

@@ -43,6 +43,6 @@ Options
See Also See Also
-------- --------
devtools(7) linkman:devtools[7]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -38,6 +38,6 @@ Options
See Also See Also
-------- --------
find-libprovides(1) linkman:find-libprovides[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -21,47 +21,47 @@ Programs
The list below gives a short overview; see the respective documentation The list below gives a short overview; see the respective documentation
for details. for details.
pkgctl(1) linkman:pkgctl[1]
Unified command-line frontend for devtools Unified command-line frontend for devtools
archbuild(1) linkman:archbuild[1]
Build an Arch Linux package inside a clean chroot Build an Arch Linux package inside a clean chroot
arch-nspawn(1) linkman:arch-nspawn[1]
Run a command or OS in a light-weight namespace container Run a command or OS in a light-weight namespace container
checkpkg(1) linkman:checkpkg[1]
Compare the current build package with the repository version Compare the current build package with the repository version
diffpkg(1) linkman:diffpkg[1]
Compare package files using different modes Compare package files using different modes
export-pkgbuild-keys(1) linkman:export-pkgbuild-keys[1]
Export valid source signing keys from a PKGBUILD Export valid source signing keys from a PKGBUILD
find-libdeps(1) linkman:find-libdeps[1]
Find soname dependencies for a package Find soname dependencies for a package
find-libprovides(1) linkman:find-libprovides[1]
Find soname's which are provided by a package Find soname's which are provided by a package
lddd(1) linkman:lddd[1]
Find broken library links on your system Find broken library links on your system
mkarchroot(1) linkman:mkarchroot[1]
Creates an arch chroot in a specified location with a specified set of Creates an arch chroot in a specified location with a specified set of
packages packages
makechrootpkg(1) linkman:makechrootpkg[1]
Build a PKGBUILD in a given chroot environment Build a PKGBUILD in a given chroot environment
makerepropkg(1) linkman:makerepropkg[1]
Rebuild a package to see if it is reproducible Rebuild a package to see if it is reproducible
offload-build(1) linkman:offload-build[1]
Build a PKGBUILD on a remote server using makechrootpkg Build a PKGBUILD on a remote server using makechrootpkg
sogrep(1) linkman:sogrep[1]
Find packages using a linked to a given shared library Find packages using a linked to a given shared library
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -20,6 +20,6 @@ collected data is written to a temporary directory created by mktemp.
See Also See Also
-------- --------
ldd(1) linkman:ldd[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -45,9 +45,6 @@ Options
*-D* <dir>:: *-D* <dir>::
Bind directory into build chroot as read-only Bind directory into build chroot as read-only
*-t* <dir>[:opts]::
Mount a tmpfs at 'dir'. See the '--tmpfs' argument in systemd-nspawn(1) for more details.
*-u*:: *-u*::
Update the working copy of the chroot before building Update the working copy of the chroot before building
This is useful for rebuilds without dirtying the pristine This is useful for rebuilds without dirtying the pristine
@@ -79,9 +76,5 @@ Options
*-x* <when>:: *-x* <when>::
Inspect chroot after build, possible modes are 'never' (default), 'always' or 'failure' Inspect chroot after build, possible modes are 'never' (default), 'always' or 'failure'
See Also
--------
systemd-nspawn(1)
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -16,7 +16,7 @@ Given the path to a built pacman package(s), attempt to rebuild it using the
PKGBUILD in the current directory. The package will be built in an environment PKGBUILD in the current directory. The package will be built in an environment
as closely matching the environment of the initial package as possible, by as closely matching the environment of the initial package as possible, by
building up a chroot to match the information exposed in the package's building up a chroot to match the information exposed in the package's
BUILDINFO(5) manifest. On success, the resulting package will be linkman:BUILDINFO[5] manifest. On success, the resulting package will be
compared to the input package, and makerepropkg will report whether the compared to the input package, and makerepropkg will report whether the
artifacts are identical. artifacts are identical.

View File

@@ -32,9 +32,8 @@ Options
*-c* <dir>:: *-c* <dir>::
Set pacman cache. Set pacman cache.
*-f* <src>[:<dst>]:: *-f* <file>::
Copy file from the host to the chroot. Copy file from the host to the chroot.
If 'dst' is not provided, it defaults to 'src' inside of the chroot.
*-s*:: *-s*::
Do not run setarch. Do not run setarch.
@@ -45,6 +44,6 @@ Options
See Also See Also
-------- --------
pacman(1) linkman:pacman[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -36,6 +36,6 @@ Options
See Also See Also
-------- --------
pkgctl-db-remove(1) linkman:pkgctl-db-remove[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -32,6 +32,6 @@ pkgctl aur drop-from-repo::
See Also See Also
-------- --------
pkgctl-aur-drop-from-repo(1) linkman:pkgctl-aur-drop-from-repo[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -35,6 +35,6 @@ Options
See Also See Also
-------- --------
pkgctl-auth-status(1) linkman:pkgctl-auth-status[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -27,6 +27,6 @@ Options
See Also See Also
-------- --------
pkgctl-auth-login(1) linkman:pkgctl-auth-login[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -32,7 +32,7 @@ pkgctl auth status::
See Also See Also
-------- --------
pkgctl-auth-login(1) linkman:pkgctl-auth-login[1]
pkgctl-auth-status(1) linkman:pkgctl-auth-status[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -12,10 +12,7 @@ pkgctl build [OPTIONS] [PATH...]
Description Description
----------- -----------
Build packages in clean chroot environment, offering various options TODO
and functionalities to customize the package building process.
By default, chroot environments are located in '/var/lib/archbuild/'.
Build Options Build Options
------------- -------------
@@ -110,7 +107,7 @@ Options
See Also See Also
-------- --------
pkgctl-release(1) linkman:pkgctl-release[1]
pkgctl-db-update(1) linkman:pkgctl-db-update[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -12,27 +12,13 @@ pkgctl db remove [OPTIONS] [REPO] [PKGBASE]...
Description Description
----------- -----------
Remove packages from pacman repositories. By default passing a pkgbase removes Remove packages from pacman repositories.
all split packages, debug packages as well as entries from the state repo for
all existing architectures.
Beware when using the `--partial` option, as it may most likely lead to
undesired effects by leaving debug packages behind as well as dangling entries
in the state repository.
Options Options
------- -------
*--partial*::
Remove only partial pkgnames from a split package. This leaves debug
packages behind and pkgbase entries in the state repo.
*-a, --arch* 'ARCH':: *-a, --arch* 'ARCH'::
Remove only one specific architecture (disables auto-detection). Override the architecture (disables auto-detection)
By default all architectures are removed when this option is not used.
*--noconfirm*::
Bypass any confirmation messages, should only be used with caution.
*-h, --help*:: *-h, --help*::
Show a help text Show a help text

View File

@@ -1,5 +1,5 @@
pkgctl-db-update(1) pkgctl-db-update(1)
=================== =================
Name Name
---- ----

View File

@@ -1,43 +0,0 @@
pkgctl-db(1)
============
NAME
----
pkgctl-db - Pacman database modification utility for package updates, moves, and more.
SYNOPSIS
--------
pkgctl db [OPTIONS] [SUBCOMMAND]
DESCRIPTION
-----------
Managing the Pacman database and facilitate the modification of packages and their metadata
within the database
OPTIONS
-------
*-h, --help*::
Display usage information and available options.
Subcommands
-----------
pkgctl db update::
Update the binary repository as final release step
pkgctl db move::
Move packages between binary repositories
pkgctl db remove::
Remove packages from binary repositories
SEE ALSO
--------
pkgctl-db-update(1)
pkgctl-db-move(1)
pkgctl-db-remove(1)
include::include/footer.asciidoc[]

View File

@@ -46,6 +46,6 @@ Options
See Also See Also
-------- --------
pkgctl-db-update(1) linkman:pkgctl-db-update[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -1,40 +0,0 @@
pkgctl-repo-clean(1)
====================
Name
----
pkgctl-repo-clean - Remove untracked files from the working tree
Synopsis
--------
pkgctl repo clean [OPTION] [PATH]...
Description
-----------
Cleans the working tree by recursively removing files that are not under
version control, starting from the current directory.
Files unknown to Git as well as ignored files are removed. This can, for
example, be useful to remove all build products.
Options
-------
*-i, --interactive*::
Show what would be done and clean files interactively
*-n, --dry-run*::
Don't actually remove anything, just show what would be done
*-h, --help*::
Show a help text
See Also
--------
git-clean(1)
include::include/footer.asciidoc[]

View File

@@ -46,7 +46,7 @@ Options
See Also See Also
-------- --------
pkgctl-repo-configure(1) linkman:pkgctl-repo-configure[1]
pkgctl-repo-switch(1) linkman:pkgctl-repo-switch[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -33,8 +33,8 @@ Options
See Also See Also
-------- --------
pkgctl-auth(1) linkman:pkgctl-auth[1]
pkgctl-repo-clone(1) linkman:pkgctl-repo-clone[1]
pkgctl-repo-configure(1) linkman:pkgctl-repo-configure[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -32,9 +32,6 @@ Options
Subcommands Subcommands
----------- -----------
pkgctl repo clean::
Remove untracked files from the working tree
pkgctl repo clone:: pkgctl repo clone::
Clone a package repository Clone a package repository
@@ -53,11 +50,10 @@ pkgctl repo web::
See Also See Also
-------- --------
pkgctl-repo-clean(1) linkman:pkgctl-repo-clone[1]
pkgctl-repo-clone(1) linkman:pkgctl-repo-configure[1]
pkgctl-repo-configure(1) linkman:pkgctl-repo-create[1]
pkgctl-repo-create(1) linkman:pkgctl-repo-switch[1]
pkgctl-repo-switch(1) linkman:pkgctl-repo-web[1]
pkgctl-repo-web(1)
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -66,6 +66,6 @@ Output Options
See Also See Also
-------- --------
pkgctl-auth(1) linkman:pkgctl-auth[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -28,8 +28,8 @@ required to track version changes from upstream sources.
Configuration Configuration
------------- -------------
Uses nvchecker(1) and a `.nvchecker.toml` file located alongside the Uses linkman:nvchecker[1] and a `.nvchecker.toml` file located alongside the
PKGBUILD. Refer to the configuration section in pkgctl-version(1). PKGBUILD. Refer to the configuration section in linkman:pkgctl-version[1].
Options Options
------- -------
@@ -60,7 +60,7 @@ On exit, return one of the following codes:
See Also See Also
-------- --------
pkgctl-version(1) linkman:pkgctl-version[1]
nvchecker(1) linkman:nvchecker[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -1,120 +0,0 @@
pkgctl-version-setup(1)
=======================
Name
----
pkgctl-version-setup - Automatically detect and setup a basic nvchecker config
Synopsis
--------
pkgctl version setup [OPTIONS] [PKGBASE...]
Description
-----------
This subcommand automates the creation of a basic nvchecker(1) configuration
file by analyzing the source array specified in the PKGBUILD(1) file of a
package. This command intelligently detects various platforms and APIs (e.g.,
GitHub, GitLab, PyPI) used by the package sources and generates a corresponding
`.nvchecker.toml` configuration based on its best guess.
This is particularly useful for initializing nvchecker(1) settings for a
package without manually crafting the `.nvchecker.toml` file. It simplifies the
process of setting up version checks, especially when transitioning a package's
monitoring from one source platform to another or starting version checks for a
new package.
If no `PKGBASE` is specified, the command defaults to using the current working
directory.
To obtain a list of supported sources and their expected URL formats, please
consult the sources section.
Options
-------
*-f, --force*::
Overwrite existing nvchecker(1) configuration
*--prefer-platform-api*::
Prefer platform specific GitHub/GitLab API over git for complex cases
*--url* 'URL'::
Derive check target from the given URL instead of the source array entries
*--no-check*::
Do not run pkgctl-version-check(1) after setup
*-h, --help*::
Show a help text
Sources
-------
Here are the currently supported platforms and sources, along with examples of
URL formats that enable their automatic detection as specific source types:
*Git*::
* https://github.com/example/project
* https://gitlab.com/example/group/project
* git://git.foobar.org/example
* git+https://git.foobar.org/example
*GitHub*::
* https://github.com/example/project
* https://github.com/example/project/archive/v1.0/project-v1.0.tar.gz
*GitLab*::
* https://gitlab.com/example/group/project
* https://gitlab.archlinux.org/archlinux/devtools.git
* https://gitlab.archlinux.org/archlinux/devtools/-/releases/v1.1.0/downloads/devtools-v1.1.0.tar.gz
*Hackage*::
* https://hackage.haskell.org/package/xmonad
* https://hackage.haskell.org/package/xmonad-0.18.0/xmonad-0.18.0.tar.gz
* https://hackage.haskell.org/packages/archive/xmonad/0.18.0/xmonad-0.18.0.tar.gz
*NPM*::
* https://registry.npmjs.org/node-gyp/-/node-gyp-10.0.1.tgz
* https://www.npmjs.com/package/node-gyp
*PyPI*::
* https://pypi.io/packages/source/p/pyflakes
* https://pypi.org/packages/source/b/bleach
* https://files.pythonhosted.org/packages/source/p/pyflakes
* https://pypi.org/project/SQLAlchemy/
*RubyGems*::
* https://rubygems.org/downloads/diff-lcs-1.5.1.gem
* https://rubygems.org/gems/diff-lcs
*CPAN*::
* https://search.cpan.org/CPAN/authors/id/C/CO/COSIMO/Locale-PO-0.27.tar.gz
* https://cpan.metacpan.org/authors/id/C/CO/COSIMO/Locale-PO-0.27.tar.gz
*crates.io*::
* https://static.crates.io/crates/shotgun/shotgun-1.0.crate
* https://crates.io/api/v1/crates/shotgun/1.0/download
* https://crates.io/crates/git-smash
Examples
--------
*pkgctl version setup*::
Detects the source from the current directory's PKGBUILD(1) and
sets up a basic `.nvchecker.toml`.
*pkgctl version setup --url https://github.com/example/project*::
Generates an `.nvchecker.toml` for the current PKGBUILD(1) but
overrides the source URL with the specified GitHub project.
See Also
--------
pkgctl-version(1)
pkgctl-version-check(1)
nvchecker(1)
PKGBUILD(5)
include::include/footer.asciidoc[]

View File

@@ -18,7 +18,7 @@ upstream versions.
Upon execution, it automatically adjusts the PKGBUILD file, ensuring that the Upon execution, it automatically adjusts the PKGBUILD file, ensuring that the
pkgver field is set to match the latest version available from the upstream pkgver field is set to match the latest version available from the upstream
source. In addition to updating the pkgver, this command also resets the pkgrel source. In addition to updating the pkgver, this command also resets the pkgrel
to 1 and updates checksums. to 1.
Outputs a summary of upgraded packages, up-to-date packages, and any check Outputs a summary of upgraded packages, up-to-date packages, and any check
failures. failures.
@@ -29,15 +29,12 @@ required to track and implement version changes from upstream sources.
Configuration Configuration
------------- -------------
Uses nvchecker(1) and a `.nvchecker.toml` file located alongside the Uses linkman:nvchecker[1] and a `.nvchecker.toml` file located alongside the
PKGBUILD. Refer to the configuration section in pkgctl-version(1). PKGBUILD. Refer to the configuration section in linkman:pkgctl-version[1].
Options Options
------- -------
*--no-update-checksums*::
Disable computation and update of the checksums
*-v, --verbose*:: *-v, --verbose*::
Display results including up-to-date versions Display results including up-to-date versions
@@ -47,7 +44,7 @@ Options
See Also See Also
-------- --------
pkgctl-version(1) linkman:pkgctl-version[1]
nvchecker(1) linkman:nvchecker[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -15,7 +15,7 @@ Description
Commands related to package versions, including checks for outdated packages. Commands related to package versions, including checks for outdated packages.
Uses nvchecker(1) and a `.nvchecker.toml` file located alongside the Uses linkman:nvchecker[1] and a `.nvchecker.toml` file located alongside the
PKGBUILD. PKGBUILD.
Configuration Configuration
@@ -26,12 +26,9 @@ package's pkgbase. The pkgbase section within the `.nvchecker.toml` file
specifies the source and method for checking the latest version of the specifies the source and method for checking the latest version of the
corresponding package. corresponding package.
Use pkgctl-version-setup(1) to automatically detect and setup a basic nvchecker
config based on the source array of the package PKGBUILD.
For detailed information on the various configuration options available for the For detailed information on the various configuration options available for the
`.nvchecker.toml` file, refer to the configuration files section in `.nvchecker.toml` file, refer to the configuration files section in
nvchecker(1). This documentation provides insights into the possible linkman:nvchecker[1]. This documentation provides insights into the possible
options that can be utilized to customize the version checking process. options that can be utilized to customize the version checking process.
To supply GitHub or GitLab tokens to nvchecker, a `keyfile.toml` should be To supply GitHub or GitLab tokens to nvchecker, a `keyfile.toml` should be
@@ -51,17 +48,13 @@ Subcommands
pkgctl version check:: pkgctl version check::
Compares local package versions against upstream Compares local package versions against upstream
pkgctl version setup::
Automatically detect and setup a basic nvchecker config
pkgctl version upgrade:: pkgctl version upgrade::
Adjust the PKGBUILD to match the latest upstream version Adjust the PKGBUILD to match the latest upstream version
See Also See Also
-------- --------
pkgctl-version-check(1) linkman:pkgctl-version-check[1]
pkgctl-version-setup(1) linkman:pkgctl-version-upgrade[1]
pkgctl-version-upgrade(1)
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -12,12 +12,7 @@ pkgctl [SUBCOMMAND] [OPTIONS]
Description Description
----------- -----------
Command-line utility serving as a unified interface for multiple development tools. TODO
This tool aims to simplify and optimize interactions with devtools by offering
various subcommands for executing tasks related to package management, repository management,
version control, among others.
Utilizing pkgctl enables users to efficiently administer their development workflows.
Options Options
------- -------
@@ -61,14 +56,14 @@ pkgctl version::
See Also See Also
-------- --------
pkgctl-aur(1) linkman:pkgctl-aur[1]
pkgctl-auth(1) linkman:pkgctl-auth[1]
pkgctl-build(1) linkman:pkgctl-build[1]
pkgctl-db(1) linkman:pkgctl-db[1]
pkgctl-diff(1) linkman:pkgctl-diff[1]
pkgctl-release(1) linkman:pkgctl-release[1]
pkgctl-repo(1) linkman:pkgctl-repo[1]
pkgctl-search(1) linkman:pkgctl-search[1]
pkgctl-version(1) linkman:pkgctl-version[1]
include::include/footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -22,13 +22,12 @@ usage() {
echo "A wrapper around systemd-nspawn. Provides support for pacman." echo "A wrapper around systemd-nspawn. Provides support for pacman."
echo echo
echo ' options:' echo ' options:'
echo ' -C <file> Location of a pacman config file' echo ' -C <file> Location of a pacman config file'
echo ' -M <file> Location of a makepkg config file' echo ' -M <file> Location of a makepkg config file'
echo ' -c <dir> Set pacman cache' echo ' -c <dir> Set pacman cache'
echo ' -f <src>[:<dst>] Copy src file from the host to the chroot.' echo ' -f <file> Copy file from the host to the chroot'
echo ' If dst file is not provided, it defaults to src' echo ' -s Do not run setarch'
echo ' -s Do not run setarch' echo ' -h This message'
echo ' -h This message'
exit 1 exit 1
} }
@@ -64,7 +63,6 @@ nspawn_args=(
--slice="devtools-$(systemd-escape "${SUDO_USER:-$USER}")" --slice="devtools-$(systemd-escape "${SUDO_USER:-$USER}")"
--machine="arch-nspawn-$$" --machine="arch-nspawn-$$"
--as-pid2 --as-pid2
--console=autopipe
) )
if (( ${#cache_dirs[@]} == 0 )); then if (( ${#cache_dirs[@]} == 0 )); then
@@ -73,7 +71,6 @@ fi
# shellcheck disable=2016 # shellcheck disable=2016
host_mirrors=($(pacman-conf --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')) host_mirrors=($(pacman-conf --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
host_cachemirrors=($(pacman-conf --repo extra CacheServer 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
for host_mirror in "${host_mirrors[@]}"; do for host_mirror in "${host_mirrors[@]}"; do
if [[ $host_mirror == *file://* ]]; then if [[ $host_mirror == *file://* ]]; then
@@ -108,17 +105,13 @@ copy_hostconf () {
printf 'Server = %s\n' "${host_mirrors[@]}" >"$working_dir/etc/pacman.d/mirrorlist" printf 'Server = %s\n' "${host_mirrors[@]}" >"$working_dir/etc/pacman.d/mirrorlist"
[[ -n $host_cachemirrors ]] && printf 'CacheServer = %s\n' "${host_cachemirrors[@]}" >>"$working_dir/etc/pacman.d/mirrorlist"
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf" [[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
[[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf" [[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"
local file local file
for file in "${files[@]}"; do for file in "${files[@]}"; do
src="${file%%:*}" mkdir -p "$(dirname "$working_dir$file")"
dst="${file#*:}" cp -T "$file" "$working_dir$file"
mkdir -p "$(dirname "$working_dir$dst")"
cp -T "$src" "$working_dir$dst"
done done
sed -r "s|^#?\\s*CacheDir.+|CacheDir = ${cache_dirs[*]}|g" -i "$working_dir/etc/pacman.conf" sed -r "s|^#?\\s*CacheDir.+|CacheDir = ${cache_dirs[*]}|g" -i "$working_dir/etc/pacman.conf"

View File

@@ -140,7 +140,7 @@ for _pkgname in "${pkgname[@]}"; do
bsdtar tf "$TEMPDIR/$oldpkg" | sort > "$TEMPDIR/filelist-$_pkgname-old" bsdtar tf "$TEMPDIR/$oldpkg" | sort > "$TEMPDIR/filelist-$_pkgname-old"
bsdtar tf "$pkgfile" | sort > "$TEMPDIR/filelist-$_pkgname" bsdtar tf "$pkgfile" | sort > "$TEMPDIR/filelist-$_pkgname"
diff --side-by-side --suppress-common-lines --width="$COLUMNS" --color=auto "$TEMPDIR/filelist-$_pkgname-old" "$TEMPDIR/filelist-$_pkgname" sdiff -s "$TEMPDIR/filelist-$_pkgname-old" "$TEMPDIR/filelist-$_pkgname"
find-libprovides "$TEMPDIR/$oldpkg" 2>/dev/null | sort > "$TEMPDIR/libraries-$_pkgname-old" find-libprovides "$TEMPDIR/$oldpkg" 2>/dev/null | sort > "$TEMPDIR/libraries-$_pkgname-old"
find-libprovides "$pkgfile" 2>/dev/null | sort > "$TEMPDIR/libraries-$_pkgname" find-libprovides "$pkgfile" 2>/dev/null | sort > "$TEMPDIR/libraries-$_pkgname"

View File

@@ -151,7 +151,7 @@ fi
server=${PACKAGING_REPO_RELEASE_HOST} server=${PACKAGING_REPO_RELEASE_HOST}
rsyncopts=("${RSYNC_OPTS[@]}" --perms --chmod='ug=rw,o=r') rsyncopts=(-e ssh -p '--chmod=ug=rw,o=r' -c -h -L --progress --partial -y)
archreleaseopts=() archreleaseopts=()
while getopts ':l:a:s:f' flag; do while getopts ':l:a:s:f' flag; do
case $flag in case $flag in

View File

@@ -92,19 +92,14 @@ pkgctl_aur_drop_from_repo() {
fi fi
for path in "${paths[@]}"; do for path in "${paths[@]}"; do
# resolve symlink for basename if ! realpath=$(realpath -e "${path}"); then
if ! realpath=$(realpath --canonicalize-existing -- "${path}"); then
die "No such directory: ${path}" die "No such directory: ${path}"
fi fi
# skip paths that are not directories
if [[ ! -d "${realpath}" ]]; then
continue
fi
pkgbase=$(basename "${realpath}") pkgbase=$(basename "${realpath}")
pkgbase=${pkgbase%.git} pkgbase=${pkgbase%.git}
if [[ ! -d "${realpath}/.git" ]]; then if [[ ! -d "${path}/.git" ]]; then
die "Not a Git repository: ${path}" die "Not a Git repository: ${path}"
fi fi
@@ -125,6 +120,7 @@ pkgctl_aur_drop_from_repo() {
if [[ $(git symbolic-ref --quiet --short HEAD) == main ]]; then if [[ $(git symbolic-ref --quiet --short HEAD) == main ]]; then
git branch --move master git branch --move master
git config branch.master.merge refs/heads/master git config branch.master.merge refs/heads/master
git remote set-head origin master
fi fi
# auto generate .SRCINFO if not already present # auto generate .SRCINFO if not already present
@@ -141,14 +137,11 @@ pkgctl_aur_drop_from_repo() {
if (( FORCE )); then if (( FORCE )); then
AUR_OVERWRITE=1 \ AUR_OVERWRITE=1 \
GIT_SSH_COMMAND="ssh -o SendEnv=AUR_OVERWRITE" \ GIT_SSH_COMMAND="ssh -o SendEnv=AUR_OVERWRITE" \
git push --force --no-follow-tags origin master git push --force origin master
else else
git push --no-follow-tags origin master git push origin master
fi fi
# update the local default branch in case this clone is used in the future
git remote set-head origin master
if (( DISOWN )); then if (( DISOWN )); then
msg "Disowning ${pkgbase} on the AUR" msg "Disowning ${pkgbase} on the AUR"
# shellcheck disable=SC2029 # shellcheck disable=SC2029
@@ -165,7 +158,7 @@ pkgctl_aur_drop_from_repo() {
warning 'Did not find %s in any repository, please delete manually' "${pkgbase}" warning 'Did not find %s in any repository, please delete manually' "${pkgbase}"
else else
msg2 " repo: ${pkgrepo}" msg2 " repo: ${pkgrepo}"
pkgctl_db_remove --noconfirm "${pkgrepo}" "${pkgbase}" pkgctl_db_remove "${pkgrepo}" "${pkgbase}"
fi fi
popd >/dev/null popd >/dev/null

View File

@@ -63,7 +63,7 @@ pkgctl_auth_login() {
esac esac
done done
personal_access_token_url="https://${GITLAB_HOST}/-/user_settings/personal_access_tokens?name=pkgctl+token&scopes=api,write_repository" personal_access_token_url="https://${GITLAB_HOST}/-/profile/personal_access_tokens?name=pkgctl+token&scopes=api,write_repository"
cat <<- _EOF_ cat <<- _EOF_
Logging into ${BOLD}${GITLAB_HOST}${ALL_OFF} Logging into ${BOLD}${GITLAB_HOST}${ALL_OFF}

View File

@@ -55,7 +55,6 @@ pkgctl_build_usage() {
-o, --offload Build on a remote server and transfer artifacts afterwards -o, --offload Build on a remote server and transfer artifacts afterwards
-c, --clean Recreate the chroot before building -c, --clean Recreate the chroot before building
--inspect WHEN Spawn an interactive shell to inspect the chroot (never, always, failure) --inspect WHEN Spawn an interactive shell to inspect the chroot (never, always, failure)
--offline MODE Run a part of the build process offline (build, check)
-w, --worker SLOT Name of the worker slot, useful for concurrent builds (disables automatic names) -w, --worker SLOT Name of the worker slot, useful for concurrent builds (disables automatic names)
--nocheck Do not run the check() function in the PKGBUILD --nocheck Do not run the check() function in the PKGBUILD
@@ -80,8 +79,8 @@ pkgctl_build_usage() {
EXAMPLES EXAMPLES
$ ${COMMAND} $ ${COMMAND}
$ ${COMMAND} --rebuild --staging --release --message 'libyay 0.42 rebuild' libfoo libbar $ ${COMMAND} --rebuild --staging --message 'libyay 0.42 rebuild' libfoo libbar
$ ${COMMAND} --pkgver=1.42 --release --db-update $ ${COMMAND} --pkgver 1.42 --release --db-update
_EOF_ _EOF_
} }
@@ -199,10 +198,6 @@ pkgctl_build() {
EDIT=1 EDIT=1
shift shift
;; ;;
--offline)
MAKECHROOT_OPTIONS+=("-o" "$2")
shift 2
;;
-o|--offload) -o|--offload)
OFFLOAD=1 OFFLOAD=1
shift shift
@@ -317,17 +312,13 @@ pkgctl_build() {
# Update pacman cache for auto-detection # Update pacman cache for auto-detection
if [[ -z ${REPO} ]]; then if [[ -z ${REPO} ]]; then
update_pacman_repo_cache multilib update_pacman_repo_cache
# Check valid repos if not resolved dynamically # Check valid repos if not resolved dynamically
elif ! in_array "${REPO}" "${DEVTOOLS_VALID_REPOS[@]}"; then elif ! in_array "${REPO}" "${DEVTOOLS_VALID_REPOS[@]}"; then
die "Invalid repository target: %s" "${REPO}" die "Invalid repository target: %s" "${REPO}"
fi fi
for path in "${paths[@]}"; do for path in "${paths[@]}"; do
# skip paths that are not directories
if [[ ! -d "${path}" ]]; then
continue
fi
pushd "${path}" >/dev/null pushd "${path}" >/dev/null
if [[ ! -f PKGBUILD ]]; then if [[ ! -f PKGBUILD ]]; then
@@ -442,11 +433,10 @@ pkgctl_build() {
stat_done stat_done
fi fi
# update checksums if any sources are declared # update checksums if any sources are declared
if (( UPDATE_CHECKSUMS )) && (( ${#source[@]} >= 1 )); then if (( UPDATE_CHECKSUMS )) && (( ${#source[@]} >= 1 )); then
if ! result=$(pkgbuild_update_checksums /dev/stderr); then updpkgsums
die "${result}"
fi
fi fi
# re-source the PKGBUILD if it changed # re-source the PKGBUILD if it changed

View File

@@ -15,9 +15,6 @@ $DEVTOOLS_INCLUDE_COMMON_SH
# Avoid any encoding problems # Avoid any encoding problems
export LANG=C.UTF-8 export LANG=C.UTF-8
# Avoid systemd trying to color the terminal on systemd-nspawn
export SYSTEMD_TINT_BACKGROUND=no
# Set buildtool properties # Set buildtool properties
export BUILDTOOL=devtools export BUILDTOOL=devtools
export BUILDTOOLVER=@buildtoolver@ export BUILDTOOLVER=@buildtoolver@
@@ -34,17 +31,6 @@ export PACKAGING_REPO_RELEASE_HOST=repos.archlinux.org
export PKGBASE_MAINTAINER_URL=https://archlinux.org/packages/pkgbase-maintainer export PKGBASE_MAINTAINER_URL=https://archlinux.org/packages/pkgbase-maintainer
export AUR_URL_SSH=aur@aur.archlinux.org export AUR_URL_SSH=aur@aur.archlinux.org
export RSYNC_OPTS=(
--rsh=ssh
--checksum
--copy-links
--human-readable
--progress
--partial
--partial-dir=.partial
--delay-updates
)
# ensure TERM is set with a fallback to dumb # ensure TERM is set with a fallback to dumb
export TERM=${TERM:-dumb} export TERM=${TERM:-dumb}
@@ -120,8 +106,6 @@ print_workdir_error() {
} }
_setup_workdir=false _setup_workdir=false
# Ensure that there is no outside value for WORKDIR leaking in
unset WORKDIR
setup_workdir() { setup_workdir() {
[[ -z ${WORKDIR:-} ]] && WORKDIR=$(mktemp -d --tmpdir "${0##*/}.XXXXXXXXXX") [[ -z ${WORKDIR:-} ]] && WORKDIR=$(mktemp -d --tmpdir "${0##*/}.XXXXXXXXXX")
_setup_workdir=true _setup_workdir=true
@@ -358,17 +342,3 @@ is_debug_package() {
pkgdesc="$(getpkgdesc "${pkgfile}")" pkgdesc="$(getpkgdesc "${pkgfile}")"
[[ ${pkgdesc} == "Detached debugging symbols for "* && ${pkgbase}-debug = "${pkgname}" ]] [[ ${pkgdesc} == "Detached debugging symbols for "* && ${pkgbase}-debug = "${pkgname}" ]]
} }
# Proxy function to check if a file exists. Using [[ -f ... ]] directly is not
# always wanted because we might want to expand bash globs first. This way we
# can pass unquoted globs to is_globfile() and have them expanded as function
# arguments before being checked.
is_globfile() {
[[ -f $1 ]]
}
join_by() {
local IFS="$1"
shift
echo "$*"
}

View File

@@ -8,12 +8,6 @@ DEVTOOLS_INCLUDE_DB_REMOVE_SH=1
_DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@} _DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
# shellcheck source=src/lib/common.sh # shellcheck source=src/lib/common.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh
# shellcheck source=src/lib/util/pacman.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/pacman.sh
# shellcheck source=src/lib/util/term.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/term.sh
# shellcheck source=src/lib/valid-repos.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-repos.sh
set -e set -e
@@ -23,19 +17,10 @@ pkgctl_db_remove_usage() {
cat <<- _EOF_ cat <<- _EOF_
Usage: ${COMMAND} [OPTIONS] [REPO] [PKGBASE]... Usage: ${COMMAND} [OPTIONS] [REPO] [PKGBASE]...
Remove packages from pacman repositories. By default passing a pkgbase removes Remove packages from binary repositories.
all split packages, debug packages as well as entries from the state repo for
all existing architectures.
Beware when using the --partial option, as it may most likely lead to
undesired effects by leaving debug packages behind as well as dangling entries
in the state repository.
OPTIONS OPTIONS
-a, --arch Remove only one specific architecture (disables auto-detection) -a, --arch Override the architecture (disables auto-detection)
--partial Remove only partial pkgnames from a split package. This leaves
debug packages behind and pkgbase entries in the state repo.
--noconfirm Bypass any confirmation messages, should only be used with caution
-h, --help Show this help text -h, --help Show this help text
EXAMPLES EXAMPLES
@@ -46,13 +31,8 @@ _EOF_
pkgctl_db_remove() { pkgctl_db_remove() {
local REPO="" local REPO=""
local ARCH=any
local PKGBASES=() local PKGBASES=()
local pkgnames=()
local partial=0
local confirm=1
local dbscripts_options=()
local lookup_repo=multilib
local pkgname
# option checking # option checking
while (( $# )); do while (( $# )); do
@@ -61,20 +41,11 @@ pkgctl_db_remove() {
pkgctl_db_remove_usage pkgctl_db_remove_usage
exit 0 exit 0
;; ;;
--partial)
partial=1
dbscripts_options+=(--partial)
shift
;;
-a|--arch) -a|--arch)
(( $# <= 1 )) && die "missing argument for %s" "$1" (( $# <= 1 )) && die "missing argument for %s" "$1"
dbscripts_options+=(--arch "$2") ARCH=$2
shift 2 shift 2
;; ;;
--noconfirm)
confirm=0
shift
;;
-*) -*)
die "invalid argument: %s" "$1" die "invalid argument: %s" "$1"
;; ;;
@@ -92,62 +63,7 @@ pkgctl_db_remove() {
REPO=$1 REPO=$1
shift shift
PKGBASES+=("$@") PKGBASES+=("$@")
pkgnames=("${PKGBASES[@]}")
# check if the target repo is valid
if ! in_array "${REPO}" "${DEVTOOLS_VALID_REPOS[@]}"; then
die "Invalid repository target: %s" "${REPO}"
fi
# update pacman cache to query all pkgnames
if (( ! partial )); then
case ${REPO} in
*-unstable)
update_pacman_repo_cache unstable
;;
*-staging)
update_pacman_repo_cache multilib-staging
;;
*-testing)
update_pacman_repo_cache multilib-testing
;;
*)
update_pacman_repo_cache multilib
;;
esac
# fetch the pkgnames of all pkgbase as present in the repo
mapfile -t pkgnames < <(get_pkgnames_from_repo_pkgbase "${REPO}" "${PKGBASES[@]}")
echo
if (( ! ${#pkgnames[@]} )); then
error "Packages not found in %s" "${REPO}"
exit 1
fi
fi
# print list of packages
printf "%sRemoving packages from %s:%s\n" "${RED}" "${REPO}" "${ALL_OFF}"
for pkgname in "${pkgnames[@]}"; do
printf "• %s\n" "${pkgname}"
done
# print explenation about partial removal
if (( partial )); then
echo
msg_warn "${YELLOW}Removing only partial pkgnames from a split package.${ALL_OFF}"
msg_warn "${YELLOW}This leaves debug packages and pkgbase entries in the state repo!${ALL_OFF}"
fi
# ask for confirmation
if (( confirm )); then
echo
if ! prompt "${GREEN}${BOLD}?${ALL_OFF} Are you sure this is correct?"; then
exit 1
fi
fi
echo
# shellcheck disable=SC2029 # shellcheck disable=SC2029
ssh "${PACKAGING_REPO_RELEASE_HOST}" db-remove "${dbscripts_options[@]}" "${REPO}" "${PKGBASES[@]}" ssh "${PACKAGING_REPO_RELEASE_HOST}" db-remove "${REPO}" "${ARCH}" "${PKGBASES[@]}"
} }

View File

@@ -124,7 +124,7 @@ pkgctl_release() {
# Update pacman cache for auto-detection # Update pacman cache for auto-detection
if [[ -z ${REPO} ]]; then if [[ -z ${REPO} ]]; then
update_pacman_repo_cache multilib update_pacman_repo_cache
# Check valid repos if not resolved dynamically # Check valid repos if not resolved dynamically
elif ! in_array "${REPO}" "${DEVTOOLS_VALID_REPOS[@]}"; then elif ! in_array "${REPO}" "${DEVTOOLS_VALID_REPOS[@]}"; then
die "Invalid repository target: %s" "${REPO}" die "Invalid repository target: %s" "${REPO}"

View File

@@ -27,7 +27,6 @@ pkgctl_repo_usage() {
without SSH access using read-only HTTPS. without SSH access using read-only HTTPS.
COMMANDS COMMANDS
clean Remove untracked files from the working tree
clone Clone a package repository clone Clone a package repository
configure Configure a clone according to distro specs configure Configure a clone according to distro specs
create Create a new GitLab package repository create Create a new GitLab package repository
@@ -38,7 +37,6 @@ pkgctl_repo_usage() {
-h, --help Show this help text -h, --help Show this help text
EXAMPLES EXAMPLES
$ ${COMMAND} clean --interactive *
$ ${COMMAND} clone libfoo linux libbar $ ${COMMAND} clone libfoo linux libbar
$ ${COMMAND} clone --maintainer mynickname $ ${COMMAND} clone --maintainer mynickname
$ ${COMMAND} configure * $ ${COMMAND} configure *
@@ -61,14 +59,6 @@ pkgctl_repo() {
pkgctl_repo_usage pkgctl_repo_usage
exit 0 exit 0
;; ;;
clean)
_DEVTOOLS_COMMAND+=" $1"
shift
# shellcheck source=src/lib/repo/clean.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/repo/clean.sh
pkgctl_repo_clean "$@"
exit 0
;;
clone) clone)
_DEVTOOLS_COMMAND+=" $1" _DEVTOOLS_COMMAND+=" $1"
shift shift

View File

@@ -1,114 +0,0 @@
#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
[[ -z ${DEVTOOLS_INCLUDE_REPO_CLEAN_SH:-} ]] || return 0
DEVTOOLS_INCLUDE_REPO_CLEAN_SH=1
_DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
# shellcheck source=src/lib/common.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh
source /usr/share/makepkg/util/message.sh
set -eo pipefail
pkgctl_repo_clean_usage() {
local -r COMMAND=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
cat <<- _EOF_
Usage: ${COMMAND} [OPTION] [PATH]...
Cleans the working tree by recursively removing files that are not under
version control, starting from the current directory.
Files unknown to Git as well as ignored files are removed. This can, for
example, be useful to remove all build products.
OPTIONS
-i, --interactive Show what would be done and clean files interactively
-n, --dry-run Don't remove anything, just show what would be done
-h, --help Show this help text
EXAMPLES
$ ${COMMAND} libfoo linux libbar
$ ${COMMAND} --interactive libfoo linux libbar
$ ${COMMAND} --dry-run *
_EOF_
}
pkgctl_repo_clean() {
# options
local git_clean_options=()
local paths
local path pkgbase
while (( $# )); do
case $1 in
-i|--interactive)
git_clean_options+=("$1")
shift
;;
-n|--dry-run)
git_clean_options+=("$1")
shift
;;
-h|--help)
pkgctl_repo_clean_usage
exit 0
;;
--)
shift
break
;;
-*)
die "invalid argument: %s" "$1"
;;
*)
paths=("$@")
break
;;
esac
done
# check if invoked without any path from within a packaging repo
if (( ${#paths[@]} == 0 )); then
paths=(".")
fi
# print message about the work chunk
printf "🗑️ Removing untracked files from %s working trees\n" "${BOLD}${#paths[@]}${ALL_OFF}"
for path in "${paths[@]}"; do
# skip paths that are not directories
if [[ ! -d "${path}" ]]; then
continue
fi
if [[ ! -f "${path}/PKGBUILD" ]]; then
msg_error "Not a package repository: ${path}"
continue
fi
if [[ ! -d "${path}/.git" ]]; then
msg_error "Not a Git repository: ${path}"
continue
fi
pkgbase=$(basename "$(realpath "${path}")")
pkgbase=${pkgbase%.git}
# run dry mode to see if git would clean any files
if [[ ! $(git -C "${path}" clean -x -d --dry-run 2>&1) ]]; then
continue
fi
# git clean untracked files
msg_success "Cleaning ${BOLD}${pkgbase}${ALL_OFF}"
if ! git -C "${path}" clean -x -d --force "${git_clean_options[@]}"; then
msg_error "Failed to remove untracked files"
fi
echo
done
}

View File

@@ -207,14 +207,9 @@ pkgctl_repo_configure() {
fi fi
for path in "${paths[@]}"; do for path in "${paths[@]}"; do
# resolve symlink for basename if ! realpath=$(realpath -e "${path}"); then
if ! realpath=$(realpath --canonicalize-existing -- "${path}"); then
die "No such directory: ${path}" die "No such directory: ${path}"
fi fi
# skip paths that aren't directories
if [[ ! -d "${realpath}" ]]; then
continue
fi
pkgbase=$(basename "${realpath}") pkgbase=$(basename "${realpath}")
pkgbase=${pkgbase%.git} pkgbase=${pkgbase%.git}
@@ -271,7 +266,6 @@ pkgctl_repo_configure() {
if [[ -n $GPGKEY ]]; then if [[ -n $GPGKEY ]]; then
git config commit.gpgsign true git config commit.gpgsign true
git config user.signingKey "${GPGKEY}" git config user.signingKey "${GPGKEY}"
git config gpg.format openpgp
fi fi
# set default git exclude # set default git exclude

View File

@@ -101,21 +101,16 @@ pkgctl_repo_switch() {
fi fi
for path in "${paths[@]}"; do for path in "${paths[@]}"; do
# resolve symlink for basename if ! realpath=$(realpath -e -- "${path}"); then
if ! realpath=$(realpath --canonicalize-existing -- "${path}"); then
die "No such directory: ${path}" die "No such directory: ${path}"
fi fi
# skip paths that are not directories pkgbase=$(basename "${realpath}")
if [[ ! -d "${realpath}" ]]; then
continue if [[ ! -d "${path}/.git" ]]; then
fi
# skip paths that are not git repositories
if [[ ! -d "${realpath}/.git" ]]; then
error "Not a Git repository: ${path}" error "Not a Git repository: ${path}"
continue continue
fi fi
pkgbase=$(basename "${realpath}")
if ! git -C "${path}" checkout "${GIT_CHECKOUT_OPTIONS[@]}" "${GIT_REF}"; then if ! git -C "${path}" checkout "${GIT_CHECKOUT_OPTIONS[@]}" "${GIT_REF}"; then
die "Failed to switch ${pkgbase} to version ${VERSION}" die "Failed to switch ${pkgbase} to version ${VERSION}"
fi fi

View File

@@ -22,11 +22,9 @@ makepkg_source_package() {
return return
fi fi
( (
# shellcheck disable=SC2030 disable=SC2031
export LIBMAKEPKG_LINT_PKGBUILD_SH=1 export LIBMAKEPKG_LINT_PKGBUILD_SH=1
lint_pkgbuild() { :; } lint_pkgbuild() { :; }
# shellcheck disable=SC2030 disable=SC2031
export LIBMAKEPKG_SRCINFO_SH=1 export LIBMAKEPKG_SRCINFO_SH=1
write_srcinfo() { print_srcinfo; } write_srcinfo() { print_srcinfo; }
@@ -37,21 +35,3 @@ makepkg_source_package() {
source "$(command -v makepkg)" source "$(command -v makepkg)"
) )
} }
makepkg_generate_integrity() {
if [[ -z ${DEVTOOLS_GENERATE_INTEGRITY} ]]; then
[[ -z ${WORKDIR:-} ]] && setup_workdir
export WORKDIR DEVTOOLS_INCLUDE_COMMON_SH
bash -$- -c "DEVTOOLS_GENERATE_INTEGRITY=1; source '${BASH_SOURCE[0]}' && ${FUNCNAME[0]}"
return
fi
(
# shellcheck disable=SC2030 disable=SC2031
export LIBMAKEPKG_LINT_PKGBUILD_SH=1
lint_pkgbuild() { :; }
set +e -- --geninteg
# shellcheck source=/usr/bin/makepkg
source "$(command -v makepkg)"
)
}

View File

@@ -18,12 +18,10 @@ readonly _DEVTOOLS_MAKEPKG_CONF_DIR=${_DEVTOOLS_LIBRARY_DIR}/makepkg.conf.d
update_pacman_repo_cache() { update_pacman_repo_cache() {
local repo=${1:-multilib}
mkdir -p "${_DEVTOOLS_PACMAN_CACHE_DIR}" mkdir -p "${_DEVTOOLS_PACMAN_CACHE_DIR}"
msg "Updating pacman database cache" msg "Updating pacman database cache"
lock 10 "${_DEVTOOLS_PACMAN_CACHE_DIR}.lock" "Locking pacman database cache" lock 10 "${_DEVTOOLS_PACMAN_CACHE_DIR}.lock" "Locking pacman database cache"
fakeroot -- pacman --config "${_DEVTOOLS_PACMAN_CONF_DIR}/${repo}.conf" \ fakeroot -- pacman --config "${_DEVTOOLS_PACMAN_CONF_DIR}/multilib.conf" \
--dbpath "${_DEVTOOLS_PACMAN_CACHE_DIR}" \ --dbpath "${_DEVTOOLS_PACMAN_CACHE_DIR}" \
-Sy -Sy
lock_close 10 lock_close 10
@@ -31,7 +29,6 @@ update_pacman_repo_cache() {
get_pacman_repo_from_pkgbuild() { get_pacman_repo_from_pkgbuild() {
local path=${1:-PKGBUILD} local path=${1:-PKGBUILD}
local repo=${2:-multilib}
# shellcheck source=contrib/makepkg/PKGBUILD.proto # shellcheck source=contrib/makepkg/PKGBUILD.proto
mapfile -t pkgnames < <(source "${path}"; printf "%s\n" "${pkgname[@]}") mapfile -t pkgnames < <(source "${path}"; printf "%s\n" "${pkgname[@]}")
@@ -43,12 +40,12 @@ get_pacman_repo_from_pkgbuild() {
# update the pacman repo cache if it doesn't exist yet # update the pacman repo cache if it doesn't exist yet
if [[ ! -d "${_DEVTOOLS_PACMAN_CACHE_DIR}" ]]; then if [[ ! -d "${_DEVTOOLS_PACMAN_CACHE_DIR}" ]]; then
update_pacman_repo_cache "${repo}" update_pacman_repo_cache
fi fi
slock 10 "${_DEVTOOLS_PACMAN_CACHE_DIR}.lock" "Locking pacman database cache" slock 10 "${_DEVTOOLS_PACMAN_CACHE_DIR}.lock" "Locking pacman database cache"
# query repo of passed pkgname, specify --nodeps twice to skip all dependency checks # query repo of passed pkgname, specify --nodeps twice to skip all dependency checks
mapfile -t repos < <(pacman --config "${_DEVTOOLS_PACMAN_CONF_DIR}/${repo}.conf" \ mapfile -t repos < <(pacman --config "${_DEVTOOLS_PACMAN_CONF_DIR}/multilib.conf" \
--dbpath "${_DEVTOOLS_PACMAN_CACHE_DIR}" \ --dbpath "${_DEVTOOLS_PACMAN_CACHE_DIR}" \
--sync \ --sync \
--nodeps \ --nodeps \
@@ -61,30 +58,3 @@ get_pacman_repo_from_pkgbuild() {
printf "%s" "${repos[0]}" printf "%s" "${repos[0]}"
} }
get_pkgnames_from_repo_pkgbase() {
local repo=$1
shift
local pkgbases=("$@")
# update the pacman repo cache if it doesn't exist yet
if [[ ! -d "${_DEVTOOLS_PACMAN_CACHE_DIR}" ]]; then
update_pacman_repo_cache universe
fi
slock 10 "${_DEVTOOLS_PACMAN_CACHE_DIR}.lock" "Locking pacman database cache"
# query pkgnames of passed pkgbase inside a repo
mapfile -t pkgnames < <(expac --config <(sed "s|#DBPath.*|DBPath = $(realpath "${_DEVTOOLS_PACMAN_CACHE_DIR}")|" < "${_DEVTOOLS_PACMAN_CONF_DIR}/universe.conf") \
--sync '%r %e %n' 2>/dev/null \
| sort | awk -v pkgbase="${pkgbases[*]}" \
'BEGIN { split(pkgbase, array); for (item in array) filter[array[item]]=1 } $1=="'"${repo}"'" && $2 in filter {print $3}'
)
lock_close 10
if (( ! ${#pkgnames[@]} )); then
return 1
fi
printf "%s\n" "${pkgnames[@]}"
return 0
}

View File

@@ -6,13 +6,10 @@
DEVTOOLS_INCLUDE_UTIL_PKGBUILD_SH=1 DEVTOOLS_INCLUDE_UTIL_PKGBUILD_SH=1
_DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@} _DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
# shellcheck source=src/lib/util/makepkg.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/makepkg.sh
source /usr/share/makepkg/util/message.sh source /usr/share/makepkg/util/message.sh
source /usr/share/makepkg/util/schema.sh
set -eo pipefail set -e
# set the pkgver variable in a PKGBUILD # set the pkgver variable in a PKGBUILD
@@ -44,48 +41,3 @@ pkgbuild_set_pkgrel() {
sed --regexp-extended "s|^(pkgrel=)${pkgrel}$|\1${new_pkgrel}|g" --in-place PKGBUILD sed --regexp-extended "s|^(pkgrel=)${pkgrel}$|\1${new_pkgrel}|g" --in-place PKGBUILD
} }
pkgbuild_update_checksums() {
local status_file=$1
local builddir newbuildfile sumtypes newsums
[[ -z ${WORKDIR:-} ]] && setup_workdir
builddir=$(mktemp --tmpdir="${WORKDIR}" --directory update-checksums.XXXXXX)
newbuildfile="${builddir}/PKGBUILD"
# generate new integrity checksums
if ! newsums=$(BUILDDIR=${builddir} makepkg_generate_integrity 2>"${status_file}"); then
printf 'Failed to generate new checksums'
return 1
fi
# early exit if no integrity checksums are needed
if [[ -z ${newsums} ]]; then
return 0
fi
# replace the integrity sums and write it to a temporary file
sumtypes=$(IFS='|'; echo "${known_hash_algos[*]}")
if ! awk --assign=sumtypes="${sumtypes}" --assign=newsums="${newsums}" '
$0 ~"^[[:blank:]]*(" sumtypes ")sums(_[^=]+)?\\+?=", $0 ~ "\\)[[:blank:]]*(#.*)?$" {
if (!w) {
print newsums
w++
}
next
}
1
END { if (!w) print newsums }' PKGBUILD > "${newbuildfile}"; then
printf 'Failed to replace the generated checksums'
return 1
fi
# overwrite the original PKGBUILD while preserving permissions
if ! cat -- "${newbuildfile}" > PKGBUILD; then
printf "Failed to write to the PKGBUILD file"
return 1
fi
return 0
}

View File

@@ -180,19 +180,3 @@ term_spinner_stop() {
# show the cursor after stopping the spinner # show the cursor after stopping the spinner
term_cursor_show term_cursor_show
} }
prompt() {
local message=$1
local answer
read -r -p "${message} (y/N) " answer
case "${answer}" in
y|Y|yes|Yes|YES)
true
;;
*)
false
;;
esac
}

View File

@@ -3,14 +3,9 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
: :
# shellcheck disable=2034
DEVTOOLS_VALID_BINARY_ARCHES=(
x86_64
)
# shellcheck disable=2034 # shellcheck disable=2034
DEVTOOLS_VALID_ARCHES=( DEVTOOLS_VALID_ARCHES=(
"${DEVTOOLS_VALID_BINARY_ARCHES[@]}" x86_64
any any
) )

View File

@@ -19,7 +19,6 @@ pkgctl_version_usage() {
COMMANDS COMMANDS
check Compares local package versions against upstream check Compares local package versions against upstream
setup Automatically detect and setup a basic nvchecker config
upgrade Adjust the PKGBUILD to match the latest upstream version upgrade Adjust the PKGBUILD to match the latest upstream version
OPTIONS OPTIONS
@@ -27,7 +26,6 @@ pkgctl_version_usage() {
EXAMPLES EXAMPLES
$ ${COMMAND} check libfoo linux libbar $ ${COMMAND} check libfoo linux libbar
$ ${COMMAND} setup libfoo
_EOF_ _EOF_
} }
@@ -51,6 +49,14 @@ pkgctl_version() {
pkgctl_version_check "$@" pkgctl_version_check "$@"
exit $? exit $?
;; ;;
edit)
_DEVTOOLS_COMMAND+=" $1"
shift
# shellcheck source=src/lib/version/edit.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/version/edit.sh
pkgctl_version_edit "$@"
exit $?
;;
upgrade) upgrade)
_DEVTOOLS_COMMAND+=" $1" _DEVTOOLS_COMMAND+=" $1"
shift shift
@@ -59,14 +65,6 @@ pkgctl_version() {
pkgctl_version_upgrade "$@" pkgctl_version_upgrade "$@"
exit $? exit $?
;; ;;
setup)
_DEVTOOLS_COMMAND+=" $1"
shift
# shellcheck source=src/lib/version/setup.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/version/setup.sh
pkgctl_version_setup "$@"
exit 0
;;
*) *)
die "invalid argument: %s" "$1" die "invalid argument: %s" "$1"
;; ;;

View File

@@ -108,12 +108,12 @@ pkgctl_version_check() {
term_spinner_start "${status_dir}" term_spinner_start "${status_dir}"
for path in "${pkgbases[@]}"; do for path in "${pkgbases[@]}"; do
# skip paths that are not directories
if [[ ! -d "${path}" ]]; then
continue
fi
pushd "${path}" >/dev/null pushd "${path}" >/dev/null
if [[ ! -f "PKGBUILD" ]]; then
die "No PKGBUILD found for ${path}"
fi
# update the current terminal spinner status # update the current terminal spinner status
(( ++current_item )) (( ++current_item ))
pkgctl_version_check_spinner \ pkgctl_version_check_spinner \
@@ -124,13 +124,6 @@ pkgctl_version_check() {
"${current_item}" \ "${current_item}" \
"${#pkgbases[@]}" "${#pkgbases[@]}"
if [[ ! -f "PKGBUILD" ]]; then
result="${BOLD}${path}${ALL_OFF}: no PKGBUILD found"
failure+=("${result}")
popd >/dev/null
continue
fi
# reset common PKGBUILD variables # reset common PKGBUILD variables
unset pkgbase pkgname arch source pkgver pkgrel validpgpkeys unset pkgbase pkgname arch source pkgver pkgrel validpgpkeys
# shellcheck source=contrib/makepkg/PKGBUILD.proto # shellcheck source=contrib/makepkg/PKGBUILD.proto
@@ -226,8 +219,8 @@ get_upstream_version() {
opts+=(--keyfile "${keyfile}") opts+=(--keyfile "${keyfile}")
fi fi
if ! output=$(GIT_TERMINAL_PROMPT=0 nvchecker --file "${config}" --logger json "${opts[@]}" 2>&1 | \ if ! output=$(nvchecker --file "${config}" --logger json "${opts[@]}" 2>&1 | \
jq --raw-output 'select((.level != "debug") and (.event != "ignoring invalid version"))'); then jq --raw-output 'select(.level != "debug")'); then
printf "failed to run nvchecker: %s" "${output}" printf "failed to run nvchecker: %s" "${output}"
return 1 return 1
fi fi
@@ -267,13 +260,13 @@ nvchecker_check_config() {
done done
# check if the config contains a pkgbase section # check if the config contains a pkgbase section
if [[ -n ${pkgbase} ]] && ! grep --max-count=1 --extended-regexp --quiet "^\\[\"?${pkgbase//+/\\+}\"?\\]" < "${config}"; then if [[ -n ${pkgbase} ]] && ! grep --max-count=1 --extended-regexp --quiet "^\\[\"?${pkgbase}\"?\\]" < "${config}"; then
printf "missing pkgbase section in %s: %s" "${config}" "${pkgbase}" printf "missing pkgbase section in %s: %s" "${config}" "${pkgbase}"
return 1 return 1
fi fi
# check if the config contains any section other than pkgbase # check if the config contains any section other than pkgbase
if [[ -n ${pkgbase} ]] && property=$(grep --max-count=1 --perl-regexp "^\\[(?!\"?${pkgbase//+/\\+}\"?\\]).+\\]" < "${config}"); then if [[ -n ${pkgbase} ]] && property=$(grep --max-count=1 --perl-regexp "^\\[(?!\"?${pkgbase}\"?\\]).+\\]" < "${config}"); then
printf "non-pkgbase section not supported in %s: %s" "${config}" "${property}" printf "non-pkgbase section not supported in %s: %s" "${config}" "${property}"
return 1 return 1
fi fi
@@ -284,7 +277,7 @@ nvchecker_check_error() {
local errors local errors
if ! errors=$(jq --raw-output --exit-status \ if ! errors=$(jq --raw-output --exit-status \
'select((.level == "error") and (.error != null)) | "\(.event)" + if .error then ": \(.error)" else "" end' \ 'select(.level == "error") | "\(.event)" + if .error then ": \(.error)" else "" end' \
<<< "${result}"); then <<< "${result}"); then
return 0 return 0
fi fi

101
src/lib/version/edit.sh Normal file
View File

@@ -0,0 +1,101 @@
#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
[[ -z ${DEVTOOLS_INCLUDE_VERSION_CHECK_SH:-} ]] || return 0
DEVTOOLS_INCLUDE_VERSION_CHECK_SH=1
_DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
# shellcheck source=src/lib/common.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh
# shellcheck source=src/lib/util/term.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/term.sh
source /usr/share/makepkg/util/message.sh
set -eo pipefail
pkgctl_version_edit_usage() {
local -r COMMAND=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
cat <<- _EOF_
Usage: ${COMMAND} [OPTIONS] [PKGBASE]...
Compares the versions of packages in the local packaging repository against
their latest upstream versions.
Upon execution, it generates a grouped list that provides detailed insights
into each package's status. For each package, it displays the current local
version alongside the latest version available upstream.
Outputs a summary of up-to-date packages, out-of-date packages, and any
check failures.
OPTIONS
-h, --help Show this help text
EXAMPLES
$ ${COMMAND} neovim vim
_EOF_
}
pkgctl_version_edit() {
local pkgbases=()
local path pkgbase
while (( $# )); do
case $1 in
-h|--help)
pkgctl_version_edit_usage
exit 0
;;
--)
shift
break
;;
-*)
die "invalid argument: %s" "$1"
;;
*)
pkgbases=("$@")
break
;;
esac
done
# Check if used without pkgbases in a packaging directory
if (( ${#pkgbases[@]} == 0 )); then
if [[ -f PKGBUILD ]]; then
pkgbases=(".")
else
pkgctl_version_check_usage
exit 1
fi
fi
# Check if EDITOR or xdg-open are present
if [[ -z ${EDITOR} ]] && ! command -v xdg-open &>/dev/null; then
die "The version edit command requires either \$EDITOR or 'xdg-open'"
fi
for path in "${pkgbases[@]}"; do
pushd "${path}" >/dev/null
if [[ ! -f "PKGBUILD" ]]; then
die "No PKGBUILD found for ${path}"
fi
if [[ ! -f .nvchecker.toml ]]; then
touch .nvchecker.toml
fi
if [[ -n ${EDITOR} ]]; then
"${EDITOR}" .nvchecker.toml
else
xdg-open .nvchecker.toml
fi
popd >/dev/null
done
}

View File

@@ -1,528 +0,0 @@
#!/bin/bash
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
[[ -z ${DEVTOOLS_INCLUDE_VERSION_SETUP_SH:-} ]] || return 0
DEVTOOLS_INCLUDE_VERSION_SETUP_SH=1
_DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
# shellcheck source=src/lib/common.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh
# shellcheck source=src/lib/version/check.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/version/check.sh
source /usr/share/makepkg/util/message.sh
source /usr/share/makepkg/util/source.sh
set -eo pipefail
pkgctl_version_setup_usage() {
local -r COMMAND=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
cat <<- _EOF_
Usage: ${COMMAND} [OPTIONS] [PKGBASE]...
Automate the creation of a basic nvchecker configuration file by
analyzing the source array specified in the PKGBUILD file of a package.
If no PKGBASE is specified, the command defaults to using the current
working directory.
OPTIONS
-f, --force Overwrite existing nvchecker configuration
--prefer-platform-api Prefer platform specific GitHub/GitLab API for complex cases
--url URL Derive check target from URL instead of source array
--no-check Do not run version check after setup
-h, --help Show this help text
EXAMPLES
$ ${COMMAND} neovim vim
_EOF_
}
pkgctl_version_setup() {
local pkgbases=()
local override_url=
local run_check=1
local force=0
local prefer_platform_api=0
local path ret
local checks=()
while (( $# )); do
case $1 in
-h|--help)
pkgctl_version_setup_usage
exit 0
;;
-f|--force)
force=1
shift
;;
--prefer-platform-api)
prefer_platform_api=1
shift
;;
--url)
(( $# <= 1 )) && die "missing argument for %s" "$1"
override_url=$2
shift 2
;;
--no-check)
run_check=0
shift
;;
--)
shift
break
;;
-*)
die "invalid argument: %s" "$1"
;;
*)
pkgbases=("$@")
break
;;
esac
done
# Check if used without pkgbases in a packaging directory
if (( ${#pkgbases[@]} == 0 )); then
if [[ -f PKGBUILD ]]; then
pkgbases=(".")
else
pkgctl_version_setup_usage
exit 1
fi
fi
ret=0
for path in "${pkgbases[@]}"; do
# skip paths that are not directories
if [[ ! -d "${path}" ]]; then
continue
fi
pushd "${path}" >/dev/null
if nvchecker_setup "${path}" "${force}" "${prefer_platform_api}" "${override_url}"; then
checks+=("${path}")
else
ret=1
fi
popd >/dev/null
done
# run checks on the setup targets
if (( run_check )) && (( ${#checks[@]} >= 1 )); then
echo
pkgctl_version_check --verbose "${checks[@]}" || true
fi
return $ret
}
nvchecker_setup() {
local path=$1
local force=$2
local prefer_platform_api=$3
local override_url=$4
local pkgbase pkgname source source_url proto domain url_parts section body
if [[ ! -f PKGBUILD ]]; then
msg_error "${BOLD}${path}:${ALL_OFF} no PKGBUILD found"
return 1
fi
unset body pkgbase pkgname source url
# shellcheck source=contrib/makepkg/PKGBUILD.proto
if ! . ./PKGBUILD; then
msg_error "${BOLD}${path}:${ALL_OFF} failed to source PKGBUILD"
return 1
fi
pkgbase=${pkgbase:-$pkgname}
# try to guess from url as last try
if [[ -n ${url} ]]; then
source+=("${url}")
fi
# handle overwrite of existing config
if [[ -f .nvchecker.toml ]] && (( ! force )); then
msg_warn "${BOLD}${pkgbase}:${ALL_OFF} nvchecker already configured"
return 1
fi
# override the source array with a passed URL
if [[ -n ${override_url} ]]; then
source=("${override_url}")
fi
# skip empty source array
if (( ${#source[@]} == 0 )); then
msg_error "${BOLD}${pkgbase}:${ALL_OFF} PKGBUILD has no source array"
return 1
fi
for source_url in "${source[@]}"; do
# Strips out filename::http for example
source_url=$(get_url "${source_url}")
# discard query fragments
source_url=${source_url%\?*}
source_url=${source_url%#*}
# skip patches
if [[ ${source_url} == *.patch ]]; then
continue
fi
# skip signatures
if [[ ${source_url} == *.asc ]] || [[ ${source_url} == *.sig ]]; then
continue
fi
# skip local files
if [[ ${source_url} != *://* ]]; then
continue
fi
# split URL segments while avoiding empty element after protocol and newline at the end
mapfile -td / url_parts <<< "${source_url/:\/\//\/}/"
unset "url_parts[-1]"
# extract protocol and domain to select the configuration type
proto=${url_parts[0]}
domain=${url_parts[1]}
case "${domain}" in
gitlab.*)
if (( prefer_platform_api )); then
body=$(nvchecker_setup_gitlab "${url_parts[@]}")
else
body=$(nvchecker_setup_git "${url_parts[@]}")
fi
break
;;
github.com)
if (( prefer_platform_api )); then
body=$(nvchecker_setup_github "${url_parts[@]}")
else
body=$(nvchecker_setup_git "${url_parts[@]}")
fi
break
;;
codeberg.org)
body=$(nvchecker_setup_git "${url_parts[@]}")
break
;;
pypi.org|pypi.io|files.pythonhosted.org)
body=$(nvchecker_setup_pypi "${url_parts[@]}")
break
;;
hackage.haskell.org)
body=$(nvchecker_setup_hackage "${url_parts[@]}")
break
;;
registry.npmjs.org|npmjs.com|www.npmjs.com)
body=$(nvchecker_setup_npm "${url_parts[@]}")
break
;;
rubygems.org)
body=$(nvchecker_setup_rubygems "${url_parts[@]}")
break
;;
*.cpan.org|*.mcpan.org|*.metacpan.org)
body=$(nvchecker_setup_cpan "${url_parts[@]}")
break
;;
crates.io|*.crates.io)
body=$(nvchecker_setup_crates_io "${url_parts[@]}")
break
;;
*)
if [[ ${proto} == git ]] || [[ ${proto} == git+https ]]; then
body=$(nvchecker_setup_git "${url_parts[@]}")
fi
;;
esac
done
if [[ -z "${body}" ]]; then
msg_error "${BOLD}${pkgbase}:${ALL_OFF} unable to automatically setup nvchecker"
return 1
fi
# escape the section if it contains toml subsection chars
section="${pkgbase}"
if [[ ${section} == *.* ]] || [[ ${section} == *+* ]]; then
section="\"${section}\""
fi
msg_success "${BOLD}${pkgbase}:${ALL_OFF} successfully configured nvchecker"
cat > .nvchecker.toml << EOF
[${section}]
${body}
EOF
}
get_git_url_from_parts() {
local url_parts=("$@")
local proto=${url_parts[0]#*+}
local domain=${url_parts[1]}
local url
url="${proto}://$(join_by / "${url_parts[@]:1}")"
case "${domain}" in
gitlab.*)
url=${url%/-/*/*}
[[ ${url} != *.git ]] && url+=.git
;;
github.com|codeberg.org)
url="${proto}://$(join_by / "${url_parts[@]:1:3}")"
[[ ${url} != *.git ]] && url+=.git
;;
esac
printf '%s' "${url}"
}
# PyPI
#
# As Arch python packages don't necessarily match the pypi name, when the
# provided source url comes from pypi.io or pypi.org try to extract the package
# name from the (predictable) tarball download url for example:
#
# https://pypi.io/packages/source/p/pyflakes/pyflakes-3.1.0.tar.gz
# https://pypi.io/packages/source/p/pyflakes
# https://pypi.org/packages/source/b/bleach
# https://files.pythonhosted.org/packages/source/p/pyflakes
# https://pypi.org/project/SQLAlchemy/
nvchecker_setup_pypi() {
local url_parts=("$@")
local pypi
if [[ ${url_parts[2]} == packages ]]; then
pypi=${url_parts[5]}
elif [[ ${url_parts[2]} == project ]]; then
pypi=${url_parts[3]}
else
return 1
fi
cat << EOF
source = "pypi"
pypi = "${pypi}"
EOF
}
# Git
#
# Set up a generic Git source, while removing the proto specific part from makepkg
#
# git+https://github.com/prometheus/prometheus.git
# https://git.foobar.com/some/path/group/project.git
# https://gitlab.com/sub/group/project/-/archive/8.0.0/packages-8.0.0.tar.gz
nvchecker_setup_git() {
local url_parts=("$@")
local url
url=$(get_git_url_from_parts "${url_parts[@]}")
cat << EOF
source = "git"
git = "${url}"
EOF
# best effort check if the tags are prefixed with v
if git_tags_have_version_prefix "${url}"; then
echo 'prefix = "v"'
fi
}
git_tags_have_version_prefix() {
local url=$1
# best effort check if the tags are prefixed with v
if ! grep --max-count=1 --quiet --extended-regex 'refs/tags/v[0-9]+[\.0-9]*$' \
<(GIT_TERMINAL_PROMPT=0 git ls-remote --quiet --tags "${url}" 2>/dev/null); then
return 1
fi
return 0
}
# Github
#
# We want to know the $org/$project name from the url
#
# https://github.com/prometheus/prometheus/archive/v2.49.1.tar.gz
nvchecker_setup_github() {
local url_parts=("$@")
local url project
if ! url=$(get_git_url_from_parts "${url_parts[@]}"); then
return 1
fi
project=${url#*://*/}
project=${project%.git}
cat << EOF
source = "github"
github = "${project}"
use_max_tag = true
EOF
# best effort check if the tags are prefixed with v
if git_tags_have_version_prefix "${url}"; then
echo 'prefix = "v"'
fi
}
# GitLab
#
# We want to know the $org/$project name from the url
#
# git+https://gitlab.com/inkscape/inkscape.git#tag=091e20ef0f204eb40ecde54436e1ef934a03d894
nvchecker_setup_gitlab() {
local url_parts=("$@")
local url project host
if ! url=$(get_git_url_from_parts "${url_parts[@]}"); then
return 1
fi
project=${url#*://*/}
project=${project%.git}
cat << EOF
source = "gitlab"
gitlab = "${project}"
EOF
host=${url#*://}
host=${host%%/*}
if [[ ${host} != gitlab.com ]]; then
echo "host = \"${host}\""
fi
echo "use_max_tag = true"
# best effort check if the tags are prefixed with v
if git_tags_have_version_prefix "${url}"; then
echo 'prefix = "v"'
fi
}
# Hackage
#
# We want to know the project name
#
# https://hackage.haskell.org/package/xmonad
# https://hackage.haskell.org/package/xmonad-0.18.0/xmonad-0.18.0.tar.gz
# https://hackage.haskell.org/packages/archive/digits/0.3.1/digits-0.3.1.tar.gz
nvchecker_setup_hackage() {
local url_parts=("$@")
local hackage
if [[ ${url_parts[2]} == packages ]]; then
hackage=${url_parts[4]}
elif [[ ${url_parts[2]} == package ]] && (( ${#url_parts[@]} == 4 )); then
hackage=${url_parts[3]}
elif [[ ${url_parts[2]} == package ]] && (( ${#url_parts[@]} >= 5 )); then
hackage=${url_parts[3]%-*}
else
return 1
fi
cat << EOF
source = "hackage"
hackage = "${hackage}"
EOF
}
# NPM
#
# We want to know the project name
#
# https://registry.npmjs.org/eslint_d/-/eslint_d-12.1.0.tgz
# https://www.npmjs.com/package/node-gyp
nvchecker_setup_npm() {
local url_parts=("$@")
local npm
if [[ ${url_parts[1]} == registry.npmjs.org ]]; then
npm=${url_parts[2]}
elif [[ ${url_parts[2]} == package ]] && (( ${#url_parts[@]} == 4 )); then
npm=${url_parts[3]}
else
return 1
fi
cat << EOF
source = "npm"
npm = "${npm}"
EOF
}
# RubyGems
#
# We want to know the project name
#
# https://rubygems.org/downloads/polyglot-0.3.5.gem
# https://rubygems.org/gems/diff-lcs
nvchecker_setup_rubygems() {
local url_parts=("$@")
local gem
if [[ ${url_parts[2]} == downloads ]]; then
gem=${url_parts[-1]%-*}
elif [[ ${url_parts[2]} == gems ]]; then
gem=${url_parts[3]}
else
return 1
fi
cat << EOF
source = "gems"
gems = "${gem}"
EOF
}
# CPAN
#
# We want to know the project name
#
# source = https://search.cpan.org/CPAN/authors/id/C/CO/COSIMO/Locale-PO-1.2.3.tar.gz
nvchecker_setup_cpan() {
local url_parts=("$@")
local cpan=${url_parts[-1]}
cpan=${cpan%-*}
cat << EOF
source = "cpan"
cpan = "${cpan}"
EOF
}
# crates.io
#
# We want to know the crate name
#
# https://crates.io/api/v1/crates/${pkgname}/${pkgver}/download
# https://static.crates.io/crates/${pkgname}/$pkgname-$pkgver.crate
# https://crates.io/crates/git-smash
nvchecker_setup_crates_io() {
local url_parts=("$@")
local crate
if [[ ${url_parts[2]} == crates ]]; then
crate=${url_parts[3]}
elif [[ ${url_parts[4]} == crates ]]; then
crate=${url_parts[5]}
else
return 1
fi
for i in "${!url_parts[@]}"; do
if [[ ${url_parts[i]} == crates ]]; then
crate=${url_parts[(( i + 1 ))]}
fi
done
cat << EOF
source = "cratesio"
cratesio = "${crate}"
EOF
}

View File

@@ -30,15 +30,14 @@ pkgctl_version_upgrade_usage() {
Upon execution, it automatically adjusts the PKGBUILD file, ensuring that the Upon execution, it automatically adjusts the PKGBUILD file, ensuring that the
pkgver field is set to match the latest version available from the upstream pkgver field is set to match the latest version available from the upstream
source. In addition to updating the pkgver, this command also resets the pkgrel source. In addition to updating the pkgver, this command also resets the pkgrel
to 1 and updates checksums. to 1.
Outputs a summary of upgraded packages, up-to-date packages, and any check Outputs a summary of upgraded packages, up-to-date packages, and any check
failures. failures.
OPTIONS OPTIONS
--no-update-checksums Disable computation and update of the checksums -v, --verbose Display results including up-to-date versions
-v, --verbose Display results including up-to-date versions -h, --help Show this help text
-h, --help Show this help text
EXAMPLES EXAMPLES
$ ${COMMAND} neovim vim $ ${COMMAND} neovim vim
@@ -51,7 +50,6 @@ pkgctl_version_upgrade() {
local verbose=0 local verbose=0
local exit_code=0 local exit_code=0
local current_item=0 local current_item=0
local update_checksums=1
while (( $# )); do while (( $# )); do
case $1 in case $1 in
@@ -59,10 +57,6 @@ pkgctl_version_upgrade() {
pkgctl_version_upgrade_usage pkgctl_version_upgrade_usage
exit 0 exit 0
;; ;;
--no-update-checksums)
update_checksums=0
shift
;;
-v|--verbose) -v|--verbose)
verbose=1 verbose=1
shift shift
@@ -105,37 +99,27 @@ pkgctl_version_upgrade() {
term_spinner_start "${status_dir}" term_spinner_start "${status_dir}"
for path in "${pkgbases[@]}"; do for path in "${pkgbases[@]}"; do
# skip paths that aren't directories
if [[ ! -d "${path}" ]]; then
continue
fi
pushd "${path}" >/dev/null pushd "${path}" >/dev/null
(( ++current_item ))
if [[ ! -f "PKGBUILD" ]]; then if [[ ! -f "PKGBUILD" ]]; then
result="${BOLD}${path}${ALL_OFF}: no PKGBUILD found" die "No PKGBUILD found for ${path}"
failure+=("${result}")
popd >/dev/null
continue
fi fi
# reset common PKGBUILD variables
unset pkgbase pkgname arch source pkgver pkgrel validpgpkeys
# shellcheck source=contrib/makepkg/PKGBUILD.proto
. ./PKGBUILD
pkgbase=${pkgbase:-$pkgname}
# update the current terminal spinner status # update the current terminal spinner status
(( ++current_item ))
pkgctl_version_upgrade_spinner \ pkgctl_version_upgrade_spinner \
"${status_dir}" \ "${status_dir}" \
"${#up_to_date[@]}" \ "${#up_to_date[@]}" \
"${#out_of_date[@]}" \ "${#out_of_date[@]}" \
"${#failure[@]}" \ "${#failure[@]}" \
"${current_item}" \ "${current_item}" \
"${#pkgbases[@]}" \ "${#pkgbases[@]}"
"${pkgbase}" \
"query latest version" # reset common PKGBUILD variables
unset pkgbase pkgname arch source pkgver pkgrel validpgpkeys
# shellcheck source=contrib/makepkg/PKGBUILD.proto
. ./PKGBUILD
pkgbase=${pkgbase:-$pkgname}
if ! result=$(get_upstream_version); then if ! result=$(get_upstream_version); then
result="${BOLD}${pkgbase}${ALL_OFF}: ${result}" result="${BOLD}${pkgbase}${ALL_OFF}: ${result}"
@@ -165,24 +149,6 @@ pkgctl_version_upgrade() {
# change the PKGBUILD # change the PKGBUILD
pkgbuild_set_pkgver "${upstream_version}" pkgbuild_set_pkgver "${upstream_version}"
pkgbuild_set_pkgrel 1 pkgbuild_set_pkgrel 1
# download sources and update the checksums
if (( update_checksums )); then
pkgctl_version_upgrade_spinner \
"${status_dir}" \
"${#up_to_date[@]}" \
"${#out_of_date[@]}" \
"${#failure[@]}" \
"${current_item}" \
"${#pkgbases[@]}" \
"${pkgbase}" \
"updating checksums"
if ! result=$(pkgbuild_update_checksums /dev/null); then
result="${BOLD}${pkgbase}${ALL_OFF}: failed to update checksums for version ${DARK_GREEN}${upstream_version}${ALL_OFF}"
failure+=("${result}")
fi
fi
fi fi
popd >/dev/null popd >/dev/null
@@ -261,8 +227,6 @@ pkgctl_version_upgrade_spinner() {
local failure_count=$4 local failure_count=$4
local current=$5 local current=$5
local total=$6 local total=$6
local pkgbase=$7
local message=$8
local percentage=$(( 100 * current / total )) local percentage=$(( 100 * current / total ))
local tmp_file="${status_dir}/tmp" local tmp_file="${status_dir}/tmp"
@@ -275,10 +239,8 @@ pkgctl_version_upgrade_spinner() {
"${failure_count}" > "${tmp_file}" "${failure_count}" > "${tmp_file}"
# print the progress status # print the progress status
printf "📡 %s: %s\n" \ printf "📡 Upgrading: %s/%s [%s] %%spinner%%" \
"${pkgbase}" "${BOLD}${message}${ALL_OFF}" >> "${tmp_file}" "${BOLD}${current}" "${total}" "${percentage}%${ALL_OFF}" \
printf "⌛ Upgrading: %s/%s [%s] %%spinner%%" \
"${BOLD}${current}" "${total}" "${percentage}%${ALL_OFF}" \
>> "${tmp_file}" >> "${tmp_file}"
# swap the status file # swap the status file

View File

@@ -38,9 +38,6 @@ inspect=never
bindmounts_ro=() bindmounts_ro=()
bindmounts_rw=() bindmounts_rw=()
bindmounts_tmpfs=()
offline_options=()
copy=$USER copy=$USER
[[ -n ${SUDO_USER:-} ]] && copy=$SUDO_USER [[ -n ${SUDO_USER:-} ]] && copy=$SUDO_USER
@@ -68,25 +65,23 @@ usage() {
echo "Default makepkg args: ${default_makepkg_args[*]}" echo "Default makepkg args: ${default_makepkg_args[*]}"
echo '' echo ''
echo 'Flags:' echo 'Flags:'
echo '-h This help' echo '-h This help'
echo '-c Clean the chroot before building' echo '-c Clean the chroot before building'
echo '-d <dir> Bind directory into build chroot as read-write' echo '-d <dir> Bind directory into build chroot as read-write'
echo '-D <dir> Bind directory into build chroot as read-only' echo '-D <dir> Bind directory into build chroot as read-only'
echo '-t <dir[:opts]> Mount a tmpfs at directory' echo '-u Update the working copy of the chroot before building'
echo '-u Update the working copy of the chroot before building' echo ' This is useful for rebuilds without dirtying the pristine'
echo ' This is useful for rebuilds without dirtying the pristine' echo ' chroot'
echo ' chroot' echo '-r <dir> The chroot dir to use'
echo '-r <dir> The chroot dir to use' echo '-I <pkg> Install a package into the working copy of the chroot'
echo '-I <pkg> Install a package into the working copy of the chroot' echo '-l <copy> The directory to use as the working copy of the chroot'
echo '-l <copy> The directory to use as the working copy of the chroot' echo ' Useful for maintaining multiple copies'
echo ' Useful for maintaining multiple copies' echo " Default: $copy"
echo " Default: $copy" echo '-n Run namcap on the package'
echo '-n Run namcap on the package' echo '-C Run checkpkg on the package'
echo '-o Run given step offline' echo '-T Build in a temporary directory'
echo '-C Run checkpkg on the package' echo '-U Run makepkg as a specified user'
echo '-T Build in a temporary directory' echo '-x <when> Inspect chroot after build (never, always, failure)'
echo '-U Run makepkg as a specified user'
echo '-x <when> Inspect chroot after build (never, always, failure)'
exit 1 exit 1
} }
@@ -108,7 +103,7 @@ sync_chroot() {
"Locking clean chroot [%s]" "$chrootdir/root" "Locking clean chroot [%s]" "$chrootdir/root"
stat_busy "Synchronizing chroot copy [%s] -> [%s]" "$chrootdir/root" "$copy" stat_busy "Synchronizing chroot copy [%s] -> [%s]" "$chrootdir/root" "$copy"
if is_btrfs "$chrootdir" && is_subvolume "$chrootdir/root" && ! mountpoint -q "$copydir"; then if is_btrfs "$chrootdir" && ! mountpoint -q "$copydir"; then
subvolume_delete_recursive "$copydir" || subvolume_delete_recursive "$copydir" ||
die "Unable to delete subvolume %s" "$copydir" die "Unable to delete subvolume %s" "$copydir"
btrfs subvolume snapshot "$chrootdir/root" "$copydir" >/dev/null || btrfs subvolume snapshot "$chrootdir/root" "$copydir" >/dev/null ||
@@ -153,8 +148,8 @@ install_packages() {
pkgnames=("${install_pkgs[@]##*/}") pkgnames=("${install_pkgs[@]##*/}")
cp -- "${install_pkgs[@]}" "$copydir/root/" cp -- "${install_pkgs[@]}" "$copydir/root/"
arch-nspawn "$copydir" "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" "${bindmounts_tmpfs[@]}" \ arch-nspawn "$copydir" "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
pacman -U --noconfirm --ask=4 -- "${pkgnames[@]/#//root/}" bash -c 'yes y | pacman -U -- "$@"' -bash "${pkgnames[@]/#//root/}"
ret=$? ret=$?
rm -- "${pkgnames[@]/#/$copydir/root/}" rm -- "${pkgnames[@]/#/$copydir/root/}"
@@ -193,11 +188,6 @@ builduser ALL = NOPASSWD: /usr/bin/pacman
EOF EOF
chmod 440 "$copydir/etc/sudoers.d/builduser-pacman" chmod 440 "$copydir/etc/sudoers.d/builduser-pacman"
cat > "$copydir/etc/gitconfig" <<EOF
[safe]
directory = *
EOF
# This is a little gross, but this way the script is recreated every time in the # This is a little gross, but this way the script is recreated every time in the
# working copy # working copy
{ {
@@ -206,7 +196,6 @@ EOF
declare -p SOURCE_DATE_EPOCH 2>/dev/null || true declare -p SOURCE_DATE_EPOCH 2>/dev/null || true
declare -p BUILDTOOL 2>/dev/null declare -p BUILDTOOL 2>/dev/null
declare -p BUILDTOOLVER 2>/dev/null declare -p BUILDTOOLVER 2>/dev/null
declare -p offline_options
printf '_chrootbuild "$@" || exit\n' printf '_chrootbuild "$@" || exit\n'
if (( run_namcap )); then if (( run_namcap )); then
@@ -226,52 +215,14 @@ _chrootbuild() {
# shellcheck source=/dev/null # shellcheck source=/dev/null
. /etc/profile . /etc/profile
# for in_array
. /usr/share/makepkg/util.sh
# Beware, there are some stupid arbitrary rules on how you can # Beware, there are some stupid arbitrary rules on how you can
# use "$" in arguments to commands with "sudo -i". ${foo} or # use "$" in arguments to commands with "sudo -i". ${foo} or
# ${1} is OK, but $foo or $1 isn't. # ${1} is OK, but $foo or $1 isn't.
# https://bugzilla.sudo.ws/show_bug.cgi?id=765 # https://bugzilla.sudo.ws/show_bug.cgi?id=765
# Run prepare
sudo --preserve-env=SOURCE_DATE_EPOCH \ sudo --preserve-env=SOURCE_DATE_EPOCH \
--preserve-env=BUILDTOOL \ --preserve-env=BUILDTOOL \
--preserve-env=BUILDTOOLVER \ --preserve-env=BUILDTOOLVER \
-iu builduser bash -c 'cd /startdir; makepkg --nobuild "$@"' -bash "$@" -iu builduser bash -c 'cd /startdir; makepkg "$@"' -bash "$@"
if in_array "build" "${offline_options[@]}"; then
msg "building offline"
# Build offline
unshare -n -- sudo --preserve-env=SOURCE_DATE_EPOCH \
--preserve-env=BUILDTOOL \
--preserve-env=BUILDTOOLVER \
-iu builduser \
bash -c 'cd /startdir; makepkg --noprepare --noextract --nocheck "$@"' -bash "$@"
else
sudo --preserve-env=SOURCE_DATE_EPOCH \
--preserve-env=BUILDTOOL \
--preserve-env=BUILDTOOLVER \
-iu builduser \
bash -c 'cd /startdir; makepkg --noprepare --noextract --nocheck "$@"' -bash "$@"
fi
if in_array "check" "${offline_options[@]}"; then
msg "check offline"
# Run tests online
unshare -n -- sudo --preserve-env=SOURCE_DATE_EPOCH \
--preserve-env=BUILDTOOL \
--preserve-env=BUILDTOOLVER \
-iu builduser \
bash -c 'cd /startdir; makepkg --noprepare --noextract --nobuild "$@"' -bash "$@"
else
sudo --preserve-env=SOURCE_DATE_EPOCH \
--preserve-env=BUILDTOOL \
--preserve-env=BUILDTOOLVER \
-iu builduser \
bash -c 'cd /startdir; makepkg --noprepare --noextract --nobuild "$@"' -bash "$@"
fi
ret=$? ret=$?
case $ret in case $ret in
0|14) 0|14)
@@ -335,18 +286,16 @@ move_products() {
} }
# }}} # }}}
while getopts 'hcur:I:l:nCTD:o:d:U:x:t:' arg; do while getopts 'hcur:I:l:nCTD:d:U:x:' arg; do
case "$arg" in case "$arg" in
c) clean_first=1 ;; c) clean_first=1 ;;
D) bindmounts_ro+=("--bind-ro=$OPTARG") ;; D) bindmounts_ro+=("--bind-ro=$OPTARG") ;;
d) bindmounts_rw+=("--bind=$OPTARG") ;; d) bindmounts_rw+=("--bind=$OPTARG") ;;
t) bindmounts_tmpfs+=("--tmpfs=$OPTARG") ;;
u) update_first=1 ;; u) update_first=1 ;;
r) passeddir="$OPTARG" ;; r) passeddir="$OPTARG" ;;
I) install_pkgs+=("$OPTARG") ;; I) install_pkgs+=("$OPTARG") ;;
l) copy="$OPTARG" ;; l) copy="$OPTARG" ;;
n) run_namcap=1; makepkg_args+=(--install) ;; n) run_namcap=1; makepkg_args+=(--install) ;;
o) offline_options+=("$OPTARG") ;;
C) run_checkpkg=1 ;; C) run_checkpkg=1 ;;
T) temp_chroot=1; copy+="-$$" ;; T) temp_chroot=1; copy+="-$$" ;;
U) makepkg_user="$OPTARG" ;; U) makepkg_user="$OPTARG" ;;
@@ -411,7 +360,7 @@ if [[ ! -d $copydir ]] || (( clean_first )); then
fi fi
(( update_first )) && arch-nspawn "$copydir" \ (( update_first )) && arch-nspawn "$copydir" \
"${bindmounts_ro[@]}" "${bindmounts_rw[@]}" "${bindmounts_tmpfs[@]}" \ "${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
pacman -Syuu --noconfirm pacman -Syuu --noconfirm
if [[ -n ${install_pkgs[*]:-} ]]; then if [[ -n ${install_pkgs[*]:-} ]]; then
@@ -436,7 +385,6 @@ nspawn_build_args=(
--tmpfs="/tmp:${tmp_opts}" --tmpfs="/tmp:${tmp_opts}"
"${bindmounts_ro[@]}" "${bindmounts_ro[@]}"
"${bindmounts_rw[@]}" "${bindmounts_rw[@]}"
"${bindmounts_tmpfs[@]}"
) )
if arch-nspawn "$copydir" \ if arch-nspawn "$copydir" \

View File

@@ -22,14 +22,13 @@ nspawn_args=()
usage() { usage() {
echo "Usage: ${0##*/} [options] working-dir package-list..." echo "Usage: ${0##*/} [options] working-dir package-list..."
echo ' options:' echo ' options:'
echo ' -U Use pacman -U to install packages' echo ' -U Use pacman -U to install packages'
echo ' -C <file> Location of a pacman config file' echo ' -C <file> Location of a pacman config file'
echo ' -M <file> Location of a makepkg config file' echo ' -M <file> Location of a makepkg config file'
echo ' -c <dir> Set pacman cache' echo ' -c <dir> Set pacman cache'
echo ' -f <src>[:<dst>] Copy src file from the host to the chroot.' echo ' -f <file> Copy file from the host to the chroot'
echo ' If dst file is not provided, it defaults to src' echo ' -s Do not run setarch'
echo ' -s Do not run setarch' echo ' -h This message'
echo ' -h This message'
exit 1 exit 1
} }
@@ -85,10 +84,8 @@ if is_btrfs "$working_dir"; then
fi fi
for file in "${files[@]}"; do for file in "${files[@]}"; do
src="${file%%:*}" mkdir -p "$(dirname "$working_dir$file")"
dst="${file#*:}" cp "$file" "$working_dir$file"
mkdir -p "$(dirname "$working_dir$dst")"
cp "$src" "$working_dir$dst"
done done
unshare --mount pacstrap -${umode}Mc ${pac_conf:+-C "$pac_conf"} "$working_dir" \ unshare --mount pacstrap -${umode}Mc ${pac_conf:+-C "$pac_conf"} "$working_dir" \

View File

@@ -23,7 +23,7 @@ fi
repo=extra repo=extra
arch=x86_64 arch=x86_64
server=build.archlinux.org server=build.archlinux.org
rsyncopts=("${RSYNC_OPTS[@]}") rsyncopts=(-e ssh -c -h -L --progress --partial -y)
usage() { usage() {
cat <<- _EOF_ cat <<- _EOF_
@@ -107,7 +107,6 @@ mapfile -t files < <(
cd "$temp" && cd "$temp" &&
{ {
bsdtar --strip-components 1 -xvf - && bsdtar --strip-components 1 -xvf - &&
export LOGDEST="" &&
script -qefc "'"${archbuild_cmd[@]@Q}"'" /dev/null && script -qefc "'"${archbuild_cmd[@]@Q}"'" /dev/null &&
printf "%s\n" "" "-> build complete" && printf "%s\n" "" "-> build complete" &&
printf "\t%s\n" "$temp"/* printf "\t%s\n" "$temp"/*
@@ -121,25 +120,14 @@ mapfile -t files < <(
[[ -f "${file}" ]] && printf "%s\n" "${file}" ||: [[ -f "${file}" ]] && printf "%s\n" "${file}" ||:
done < <(makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist) && done < <(makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist) &&
printf "%s\n" "${temp}/PKGBUILD" printf "%s\n" "${temp}/PKGBUILD"
find "${temp}" -name "*.log"
') ')
if (( ${#files[@]} )); then if (( ${#files[@]} )); then
msg 'Downloading files...' printf '%s\n' '' '-> copying files...'
rsync "${rsyncopts[@]}" "${files[@]/#/$server:}" "${TEMPDIR}/" || die rsync "${rsyncopts[@]}" "${files[@]/#/$server:}" "${TEMPDIR}/" || die
if is_globfile "${TEMPDIR}"/*.log; then
mv "${TEMPDIR}"/*.log "${LOGDEST:-${PWD}}/"
fi
# missing PKGBUILD download means the build failed
if [[ ! -f "${TEMPDIR}/PKGBUILD" ]]; then
error "Build failed, check logs in ${LOGDEST:-${PWD}}"
exit 1
fi
mv "${TEMPDIR}/PKGBUILD" "${PWD}/"
mv "${TEMPDIR}"/*.pkg.tar* "${PKGDEST:-${PWD}}/" mv "${TEMPDIR}"/*.pkg.tar* "${PKGDEST:-${PWD}}/"
mv "${TEMPDIR}/PKGBUILD" "${PWD}/"
else else
exit 1 exit 1
fi fi

View File

@@ -1,127 +0,0 @@
bats_require_minimum_version 1.5.0
export _DEVTOOLS_LIBRARY_DIR="${PWD}/src"
_pkgctl_version_setup() {
source ${_DEVTOOLS_LIBRARY_DIR}/lib/version/setup.sh
pkgctl_version_setup "$@"
}
setup_and_check_config() {
pushd "test/fixture/version/setup/$1"
shift
_pkgctl_version_setup --force --no-check "$@"
diff .nvchecker.toml nvchecker.assert.toml
popd
}
@test "opt-no-force" {
pushd test/fixture/version/setup/opt-no-force
touch .nvchecker.toml
run ! _pkgctl_version_setup --no-check "$@"
popd
}
@test "opt-url" {
pushd test/fixture/version/setup/opt-url
_pkgctl_version_setup --no-check --force --url \
"https://crates.io/api/v1/crates/shotgun/1.0/download" "$@"
diff .nvchecker.toml nvchecker.assert.toml
popd
}
@test "codeberg-tarball" {
setup_and_check_config codeberg-tarball
}
@test "files.pythonhosted.org" {
setup_and_check_config files.pythonhosted.org
}
@test "github-git" {
setup_and_check_config github-git
}
@test "github-git-as-platform" {
setup_and_check_config github-git-as-platform --prefer-platform-api
}
@test "github-git-v-prefix" {
setup_and_check_config github-git-v-prefix
}
@test "github-git-v-prefix-as-platform" {
setup_and_check_config github-git-v-prefix-as-platform --prefer-platform-api
}
@test "github-tarball" {
setup_and_check_config github-tarball
}
@test "github-tarball-as-platform" {
setup_and_check_config github-tarball-as-platform --prefer-platform-api
}
@test "gitlab-archlinux-tarball" {
setup_and_check_config gitlab-archlinux-tarball
}
@test "gitlab-archlinux-tarball-as-platform" {
setup_and_check_config gitlab-archlinux-tarball-as-platform --prefer-platform-api
}
@test "gitlab-git-multi-group" {
setup_and_check_config gitlab-git-multi-group
}
@test "gitlab-git-multi-group-as-platform" {
setup_and_check_config gitlab-git-multi-group-as-platform --prefer-platform-api
}
@test "gitlab-tarball-multi-group" {
setup_and_check_config gitlab-tarball-multi-group
}
@test "gitlab-tarball-multi-group-as-platform" {
setup_and_check_config gitlab-tarball-multi-group-as-platform --prefer-platform-api
}
@test "hackage-tarball" {
setup_and_check_config hackage-tarball
}
@test "pkgbase-with-dot" {
setup_and_check_config pkgbase-with-dot
}
@test "pypi.io" {
setup_and_check_config pypi.io
}
@test "pypi.org" {
setup_and_check_config pypi.org
}
@test "registry.npmjs.org" {
setup_and_check_config registry.npmjs.org
}
@test "git-custom" {
setup_and_check_config git-custom
}
@test "rubygems.org" {
setup_and_check_config rubygems.org
}
@test "cpan.org" {
setup_and_check_config cpan.org
}
@test "crates.io" {
setup_and_check_config crates.io
}
@test "static.crates.io" {
setup_and_check_config static.crates.io
}

View File

@@ -1 +0,0 @@
*/.nvchecker.toml

View File

@@ -1,18 +0,0 @@
pkgname=xmobar
pkgver=1.0
pkgrel=1
pkgdesc=''
url='https://codeberg.org/xmobar/xmobar'
arch=(any)
source=(
dynamic-compilation.patch
${pkgname}-${pkgver}.tar.gz::https://codeberg.org/xmobar/xmobar/archive/${pkgver}.tar.gz
)
sha512sums=('319f3a77d500c505826ab487e4011bb1a22b8cae70c17b964574a09a6488a864a1aaabb6a298468d121110dd485f179bc712a5106e49eb8ae638e02b5115190a'
'15db3e27d1ff957e26e706e4c67cec6e43d89f5a39cd6d81ddb5ae8426e32d938494fbba39fa322461d992a95d2e522c10b186a1ca2c5c3e996f944b6e6ef7c4')
package() {
:
}
# vim: ts=2 sw=2 et:

View File

@@ -1,3 +0,0 @@
[xmobar]
source = "git"
git = "https://codeberg.org/xmobar/xmobar.git"

View File

@@ -1,14 +0,0 @@
pkgname=perl-locale-po
pkgver=0.3.5
pkgrel=1
pkgdesc=''
arch=(any)
url='http://polyglot.rubyforge.org/'
source=("https://search.cpan.org/CPAN/authors/id/C/CO/COSIMO/Locale-PO-$pkgver.tar.gz")
sha256sums=('59d66ef5e3c166431c39cb8b7c1d02af419051352f27912f6a43981b3def16af')
package() {
:
}
# vim: ts=2 sw=2 et:

View File

@@ -1,3 +0,0 @@
[perl-locale-po]
source = "cpan"
cpan = "Locale-PO"

View File

@@ -1,17 +0,0 @@
pkgname=shotgun
pkgver=0.3.5
pkgrel=1
pkgdesc='Minimal X screenshot utility'
arch=('any')
url='https://github.com/neXromancers/shotgun'
license=('MIT')
depends=('cargo')
options=('!emptydirs')
source=("https://crates.io/api/v1/crates/${pkgname}/${pkgver}/download")
sha256sums=('59d66ef5e3c166431c39cb8b7c1d02af419051352f27912f6a43981b3def16af')
package() {
:
}
# vim: ts=2 sw=2 et:

View File

@@ -1,3 +0,0 @@
[shotgun]
source = "cratesio"
cratesio = "shotgun"

View File

@@ -1,15 +0,0 @@
_pyname=ipyparallel
pkgname=python-$_pyname
pkgver=8.6.1
pkgrel=1
pkgdesc='Interactive Parallel Computing in Python'
url='https://pypi.org/project/ipyparallel/'
arch=(any)
license=(BSD)
source=(https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_pyname-$pkgver.tar.gz)
depends=(python)
sha256sums=('a39aa5ef9560170bf0e9afedca9ff045e1b9c1832c49303377edcc91cea9fb77')
package() {
:
}

View File

@@ -1,3 +0,0 @@
[python-ipyparallel]
source = "pypi"
pypi = "ipyparallel"

View File

@@ -1,14 +0,0 @@
pkgname=libfakekey
pkgver=0.3
pkgrel=1
pkgdesc='X virtual keyboard library.'
arch=('x86_64')
url='https://www.yoctoproject.org/tools-resources/projects/matchbox'
license=('GPL')
depends=('libxtst')
source=("git://git.yoctoproject.org/libfakekey")
sha256sums=('d282fa6481a5b85f71e36e8bad4cfa938cc8eaac4c42ffa27f9203ac634813f4')
package() {
:
}

View File

@@ -1,3 +0,0 @@
[libfakekey]
source = "git"
git = "git://git.yoctoproject.org/libfakekey"

View File

@@ -1,17 +0,0 @@
pkgname=minisign
pkgver=0.11
pkgrel=1
pkgdesc="A dead-simple tool to sign files and verify digital signatures"
arch=('x86_64')
url="https://github.com/jedisct1/minisign"
license=('custom:ISC')
depends=('libsodium')
makedepends=('cmake' 'git')
_commit=feefda7af87f64342bd07bf446ceb0467cbd0fb4 # git rev-parse $pkgver
source=("git+https://github.com/jedisct1/minisign.git?signed#tag=$_commit")
sha512sums=('SKIP')
validpgpkeys=(54A2B8892CC3D6A597B92B6C210627AABA709FE1) # Frank Denis
package() {
:
}

View File

@@ -1,4 +0,0 @@
[minisign]
source = "github"
github = "jedisct1/minisign"
use_max_tag = true

View File

@@ -1,17 +0,0 @@
pkgname=vim
pkgver=9.1.0131
pkgrel=1
pkgdesc="A dead-simple tool to sign files and verify digital signatures"
arch=('x86_64')
url="https://github.com/jedisct1/minisign"
license=('custom:ISC')
depends=('libsodium')
makedepends=('cmake' 'git')
_commit=feefda7af87f64342bd07bf446ceb0467cbd0fb4 # git rev-parse $pkgver
source=("git+https://github.com/vim/vim.git?signed#tag=v${pkgver}")
sha512sums=('SKIP')
validpgpkeys=(54A2B8892CC3D6A597B92B6C210627AABA709FE1) # Frank Denis
package() {
:
}

View File

@@ -1,5 +0,0 @@
[vim]
source = "github"
github = "vim/vim"
use_max_tag = true
prefix = "v"

View File

@@ -1,17 +0,0 @@
pkgname=vim
pkgver=9.1.0131
pkgrel=1
pkgdesc="A dead-simple tool to sign files and verify digital signatures"
arch=('x86_64')
url="https://github.com/jedisct1/minisign"
license=('custom:ISC')
depends=('libsodium')
makedepends=('cmake' 'git')
_commit=feefda7af87f64342bd07bf446ceb0467cbd0fb4 # git rev-parse $pkgver
source=("git+https://github.com/vim/vim.git?signed#tag=v${pkgver}")
sha512sums=('SKIP')
validpgpkeys=(54A2B8892CC3D6A597B92B6C210627AABA709FE1) # Frank Denis
package() {
:
}

View File

@@ -1,4 +0,0 @@
[vim]
source = "git"
git = "https://github.com/vim/vim.git"
prefix = "v"

View File

@@ -1,17 +0,0 @@
pkgname=minisign
pkgver=0.11
pkgrel=1
pkgdesc="A dead-simple tool to sign files and verify digital signatures"
arch=('x86_64')
url="https://github.com/jedisct1/minisign"
license=('custom:ISC')
depends=('libsodium')
makedepends=('cmake' 'git')
_commit=feefda7af87f64342bd07bf446ceb0467cbd0fb4 # git rev-parse $pkgver
source=("git+https://github.com/jedisct1/minisign.git?signed#tag=$_commit")
sha512sums=('SKIP')
validpgpkeys=(54A2B8892CC3D6A597B92B6C210627AABA709FE1) # Frank Denis
package() {
:
}

View File

@@ -1,3 +0,0 @@
[minisign]
source = "git"
git = "https://github.com/jedisct1/minisign.git"

View File

@@ -1,29 +0,0 @@
pkgname=git-smash
pkgver=0.1.0
pkgrel=1
pkgdesc='Smash staged changes into previous commits to support your Git workflow'
url='https://github.com/anthraxx/git-smash'
arch=('x86_64')
license=('MIT')
depends=('glibc' 'gcc-libs' 'git')
makedepends=('cargo' 'scdoc')
optdepends=(
'skim: selection menu alternative'
'fzf: selection menu alternative'
)
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz.sig)
options=('!makeflags')
sha512sums=('64a8b6e2afa7007966245a4888e51251e8c35f0b82421f3cee634a3e7b82256a24459cba2941800a6e50a047766a0f8de20b435904d17df3fd456b6c09ac4c5f'
'SKIP')
b2sums=('acc46b7a87135380fe36c378e9055b8b7c9b88a818c955f04677161f50d5ccd5699ac05f0a858dd11ca7b42b3505c0ac037f50efcd690f9e5a76be395d5d6590'
'SKIP')
validpgpkeys=(
'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak
)
package() {
:
}
# vim: ts=2 sw=2 et:

View File

@@ -1,5 +0,0 @@
[git-smash]
source = "github"
github = "anthraxx/git-smash"
use_max_tag = true
prefix = "v"

View File

@@ -1,25 +0,0 @@
pkgname=git-smash
pkgver=0.1.0
pkgrel=1
pkgdesc='Smash staged changes into previous commits to support your Git workflow'
url='https://github.com/anthraxx/git-smash'
arch=('x86_64')
license=('MIT')
depends=('glibc' 'gcc-libs' 'git')
makedepends=('cargo' 'scdoc')
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz.sig)
options=('!makeflags')
sha512sums=('64a8b6e2afa7007966245a4888e51251e8c35f0b82421f3cee634a3e7b82256a24459cba2941800a6e50a047766a0f8de20b435904d17df3fd456b6c09ac4c5f'
'SKIP')
b2sums=('acc46b7a87135380fe36c378e9055b8b7c9b88a818c955f04677161f50d5ccd5699ac05f0a858dd11ca7b42b3505c0ac037f50efcd690f9e5a76be395d5d6590'
'SKIP')
validpgpkeys=(
'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak
)
package() {
:
}
# vim: ts=2 sw=2 et:

View File

@@ -1,4 +0,0 @@
[git-smash]
source = "git"
git = "https://github.com/anthraxx/git-smash.git"
prefix = "v"

View File

@@ -1,57 +0,0 @@
pkgname=devtools
epoch=1
pkgver=1.1.1
pkgrel=1
pkgdesc='Tools for Arch Linux package maintainers'
arch=('any')
license=('GPL-3.0-or-later')
url='https://gitlab.archlinux.org/archlinux/devtools'
depends=(
arch-install-scripts
awk
bash
binutils
coreutils
curl
diffutils
fakeroot
findutils
grep
jq
openssh
parallel
rsync
sed
util-linux
breezy
git
mercurial
subversion
)
makedepends=(
asciidoc
shellcheck
)
optdepends=(
'btrfs-progs: btrfs support'
'bat: pretty printing for pkgctl search'
'nvchecker: pkgctl version subcommand'
'pacman-contrib: support for the --update-checksums option'
)
replaces=(devtools-git-poc)
source=(https://gitlab.archlinux.org/archlinux/devtools/-/releases/v${pkgver}/downloads/devtools-${pkgver}.tar.gz{,.sig})
validpgpkeys=(
'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak <anthraxx@archlinux.org>
'F00B96D15228013FFC9C9D0393B11DAA4C197E3D' # Christian Heusel (gromit packager key) <gromit@archlinux.org>
)
sha256sums=('b2a12bb8b4b568110b055ccec903c9a0b0b979ab44f0cba574c026d243d5ce36'
'SKIP')
b2sums=('be9601a4fcbb576b9a8637abdaec70f8ec730cf5752793c2f8fdce20e489b74555f624d0a0b5f8bb58c0914413a29d51698c8474430010502ab80d6c18c4332e'
'SKIP')
package() {
:
}
# vim: ts=2 sw=2 et:

View File

@@ -1,6 +0,0 @@
[devtools]
source = "gitlab"
gitlab = "archlinux/devtools"
host = "gitlab.archlinux.org"
use_max_tag = true
prefix = "v"

View File

@@ -1,57 +0,0 @@
pkgname=devtools
epoch=1
pkgver=1.1.1
pkgrel=1
pkgdesc='Tools for Arch Linux package maintainers'
arch=('any')
license=('GPL-3.0-or-later')
url='https://gitlab.archlinux.org/archlinux/devtools'
depends=(
arch-install-scripts
awk
bash
binutils
coreutils
curl
diffutils
fakeroot
findutils
grep
jq
openssh
parallel
rsync
sed
util-linux
breezy
git
mercurial
subversion
)
makedepends=(
asciidoc
shellcheck
)
optdepends=(
'btrfs-progs: btrfs support'
'bat: pretty printing for pkgctl search'
'nvchecker: pkgctl version subcommand'
'pacman-contrib: support for the --update-checksums option'
)
replaces=(devtools-git-poc)
source=(https://gitlab.archlinux.org/archlinux/devtools/-/releases/v${pkgver}/downloads/devtools-${pkgver}.tar.gz{,.sig})
validpgpkeys=(
'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak <anthraxx@archlinux.org>
'F00B96D15228013FFC9C9D0393B11DAA4C197E3D' # Christian Heusel (gromit packager key) <gromit@archlinux.org>
)
sha256sums=('b2a12bb8b4b568110b055ccec903c9a0b0b979ab44f0cba574c026d243d5ce36'
'SKIP')
b2sums=('be9601a4fcbb576b9a8637abdaec70f8ec730cf5752793c2f8fdce20e489b74555f624d0a0b5f8bb58c0914413a29d51698c8474430010502ab80d6c18c4332e'
'SKIP')
package() {
:
}
# vim: ts=2 sw=2 et:

View File

@@ -1,4 +0,0 @@
[devtools]
source = "git"
git = "https://gitlab.archlinux.org/archlinux/devtools.git"
prefix = "v"

View File

@@ -1,30 +0,0 @@
pkgbase=kicad-library
pkgname=($pkgbase{,-3d})
pkgver=7.0.10
pkgrel=1
pkgdesc='Assorted libraries for KiCad'
arch=('any')
url='http://kicad.org/'
license=('GPL')
makedepends=('git' 'cmake')
options=('!strip')
source=(
'git+https://gitlab.com/kicad/libraries/kicad-packages3D.git#commit=f1af95360976e66472b13897a1f3f5c2a77c0461'
'git+https://gitlab.com/kicad/libraries/kicad-symbols.git#commit=5efa35abf67b4734a8e04cf83e31514be3329ce4'
'git+https://gitlab.com/kicad/libraries/kicad-templates.git#commit=ff6e3193e6ff6029f65e7cce8ab39fafeafecdd6'
'git+https://gitlab.com/kicad/libraries/kicad-footprints.git#commit=9fb460d078b55f2bb08c459cddd184833a853167'
)
sha512sums=('SKIP'
'SKIP'
'SKIP'
'SKIP')
package_kicad-library() {
:
}
package_kicad-library-3d() {
:
}
# vim:set ts=2 sw=2 et:

View File

@@ -1,4 +0,0 @@
[kicad-library]
source = "gitlab"
gitlab = "kicad/libraries/kicad-packages3D"
use_max_tag = true

View File

@@ -1,30 +0,0 @@
pkgbase=kicad-library
pkgname=($pkgbase{,-3d})
pkgver=7.0.10
pkgrel=1
pkgdesc='Assorted libraries for KiCad'
arch=('any')
url='http://kicad.org/'
license=('GPL')
makedepends=('git' 'cmake')
options=('!strip')
source=(
'git+https://gitlab.com/kicad/libraries/kicad-packages3D.git#commit=f1af95360976e66472b13897a1f3f5c2a77c0461'
'git+https://gitlab.com/kicad/libraries/kicad-symbols.git#commit=5efa35abf67b4734a8e04cf83e31514be3329ce4'
'git+https://gitlab.com/kicad/libraries/kicad-templates.git#commit=ff6e3193e6ff6029f65e7cce8ab39fafeafecdd6'
'git+https://gitlab.com/kicad/libraries/kicad-footprints.git#commit=9fb460d078b55f2bb08c459cddd184833a853167'
)
sha512sums=('SKIP'
'SKIP'
'SKIP'
'SKIP')
package_kicad-library() {
:
}
package_kicad-library-3d() {
:
}
# vim:set ts=2 sw=2 et:

View File

@@ -1,3 +0,0 @@
[kicad-library]
source = "git"
git = "https://gitlab.com/kicad/libraries/kicad-packages3D.git"

View File

@@ -1,24 +0,0 @@
pkgbase=kicad-library
pkgname=($pkgbase{,-3d})
pkgver=7.0.10
pkgrel=1
pkgdesc='Assorted libraries for KiCad'
arch=('any')
url='http://kicad.org/'
license=('GPL')
makedepends=('git' 'cmake')
options=('!strip')
source=(
https://gitlab.com/kicad/libraries/kicad-packages3D/-/archive/8.0.0/kicad-packages3D-8.0.0.tar.gz
)
sha512sums=('SKIP')
package_kicad-library() {
:
}
package_kicad-library-3d() {
:
}
# vim:set ts=2 sw=2 et:

View File

@@ -1,4 +0,0 @@
[kicad-library]
source = "gitlab"
gitlab = "kicad/libraries/kicad-packages3D"
use_max_tag = true

View File

@@ -1,24 +0,0 @@
pkgbase=kicad-library
pkgname=($pkgbase{,-3d})
pkgver=7.0.10
pkgrel=1
pkgdesc='Assorted libraries for KiCad'
arch=('any')
url='http://kicad.org/'
license=('GPL')
makedepends=('git' 'cmake')
options=('!strip')
source=(
https://gitlab.com/kicad/libraries/kicad-packages3D/-/archive/8.0.0/kicad-packages3D-8.0.0.tar.gz
)
sha512sums=('SKIP')
package_kicad-library() {
:
}
package_kicad-library-3d() {
:
}
# vim:set ts=2 sw=2 et:

Some files were not shown because too many files have changed in this diff Show More