mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-16 19:36:19 +02:00
Compare commits
36 Commits
1.0.0
...
anthraxx/d
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c081ddf2ba | ||
![]() |
12c63702f6 | ||
![]() |
ac743ac437 | ||
![]() |
6dfd8bc70d | ||
![]() |
951fe3bc08 | ||
![]() |
39d46036fb | ||
![]() |
cb36536c7a | ||
![]() |
10450ac610 | ||
![]() |
33e6ee7999 | ||
![]() |
ef299af575 | ||
![]() |
104d173aa9 | ||
![]() |
c3c14f7a39 | ||
![]() |
6d3456c635 | ||
![]() |
3d4bb4a0b3 | ||
![]() |
4527874b8e | ||
![]() |
3f7fda02a1 | ||
![]() |
52e937a498 | ||
![]() |
38a56a056a | ||
![]() |
bf64b5750c | ||
![]() |
199c0dffcc | ||
![]() |
8d46f05c1f | ||
![]() |
a90f2074ee | ||
![]() |
3ea2367693 | ||
![]() |
8569687ced | ||
![]() |
8202b3aed6 | ||
![]() |
9922beb1df | ||
![]() |
cd6eb29035 | ||
![]() |
f8ca042b0f | ||
![]() |
83a0587bc5 | ||
![]() |
4e82d313c6 | ||
![]() |
a5cc17a61f | ||
![]() |
080bef6012 | ||
![]() |
ea47d22c20 | ||
![]() |
727fba8eb4 | ||
![]() |
126d99ac9a | ||
![]() |
79eb6680dd |
18
Makefile
18
Makefile
@@ -1,6 +1,6 @@
|
|||||||
SHELL=/bin/bash
|
SHELL=/bin/bash
|
||||||
|
|
||||||
V=1.0.0
|
V=20230307
|
||||||
BUILDTOOLVER ?= $(V)
|
BUILDTOOLVER ?= $(V)
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
@@ -32,16 +32,12 @@ COMMITPKG_LINKS = \
|
|||||||
gnome-unstablepkg
|
gnome-unstablepkg
|
||||||
|
|
||||||
ARCHBUILD_LINKS = \
|
ARCHBUILD_LINKS = \
|
||||||
core-testing-x86_64-build \
|
|
||||||
core-testing-x86_64_v3-build \
|
|
||||||
core-staging-x86_64-build \
|
|
||||||
core-staging-x86_64_v3-build \
|
|
||||||
extra-x86_64-build \
|
extra-x86_64-build \
|
||||||
extra-x86_64_v3-build \
|
extra-x86_64_v3-build \
|
||||||
extra-testing-x86_64-build \
|
testing-x86_64-build \
|
||||||
extra-testing-x86_64_v3-build \
|
testing-x86_64_v3-build \
|
||||||
extra-staging-x86_64-build \
|
staging-x86_64-build \
|
||||||
extra-staging-x86_64_v3-build \
|
staging-x86_64_v3-build \
|
||||||
multilib-build \
|
multilib-build \
|
||||||
multilib-testing-build \
|
multilib-testing-build \
|
||||||
multilib-staging-build \
|
multilib-staging-build \
|
||||||
@@ -119,7 +115,6 @@ install: all
|
|||||||
for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done
|
for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done
|
||||||
ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
|
ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
|
||||||
install -Dm0644 $(BUILDDIR)/contrib/completion/bash/devtools $(DESTDIR)$(PREFIX)/share/bash-completion/completions/devtools
|
install -Dm0644 $(BUILDDIR)/contrib/completion/bash/devtools $(DESTDIR)$(PREFIX)/share/bash-completion/completions/devtools
|
||||||
for f in $(notdir $(BINPROGS)); do ln -sf devtools $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$$f; done
|
|
||||||
install -Dm0644 $(BUILDDIR)/contrib/completion/zsh/_devtools $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
|
install -Dm0644 $(BUILDDIR)/contrib/completion/zsh/_devtools $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
|
||||||
for manfile in $(MANS); do \
|
for manfile in $(MANS); do \
|
||||||
install -Dm644 $$manfile -t $(DESTDIR)$(MANDIR)/man$${manfile##*.}; \
|
install -Dm644 $$manfile -t $(DESTDIR)$(MANDIR)/man$${manfile##*.}; \
|
||||||
@@ -128,14 +123,12 @@ install: all
|
|||||||
uninstall:
|
uninstall:
|
||||||
for f in $(notdir $(BINPROGS)); do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
for f in $(notdir $(BINPROGS)); do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
||||||
for f in $(notdir $(LIBRARY)); do rm -f $(DESTDIR)$(DATADIR)/lib/$$f; done
|
for f in $(notdir $(LIBRARY)); do rm -f $(DESTDIR)$(DATADIR)/lib/$$f; done
|
||||||
rm -rf $(DESTDIR)$(DATADIR)/lib
|
|
||||||
for conf in $(notdir $(MAKEPKG_CONFIGS)); do rm -f $(DESTDIR)$(DATADIR)/makepkg.conf.d/$${conf##*/}; done
|
for conf in $(notdir $(MAKEPKG_CONFIGS)); do rm -f $(DESTDIR)$(DATADIR)/makepkg.conf.d/$${conf##*/}; done
|
||||||
for conf in $(notdir $(PACMAN_CONFIGS)); do rm -f $(DESTDIR)$(DATADIR)/pacman.conf.d/$${conf##*/}; done
|
for conf in $(notdir $(PACMAN_CONFIGS)); do rm -f $(DESTDIR)$(DATADIR)/pacman.conf.d/$${conf##*/}; done
|
||||||
for f in $(notdir $(SETARCH_ALIASES)); do rm -f $(DESTDIR)$(DATADIR)/setarch-aliases.d/$$f; done
|
for f in $(notdir $(SETARCH_ALIASES)); do rm -f $(DESTDIR)$(DATADIR)/setarch-aliases.d/$$f; done
|
||||||
for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
|
for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
|
||||||
for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
|
for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
|
||||||
rm -f $(DESTDIR)$(PREFIX)/share/bash-completion/completions/devtools
|
rm -f $(DESTDIR)$(PREFIX)/share/bash-completion/completions/devtools
|
||||||
for f in $(notdir $(BINPROGS)); do rm -f $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$$f; done
|
|
||||||
rm -f $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
|
rm -f $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
|
||||||
rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides
|
rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides
|
||||||
for manfile in $(notdir $(MANS)); do rm -f $(DESTDIR)$(MANDIR)/man$${manfile##*.}/$${manfile}; done;
|
for manfile in $(notdir $(MANS)); do rm -f $(DESTDIR)$(MANDIR)/man$${manfile##*.}/$${manfile}; done;
|
||||||
@@ -143,6 +136,7 @@ uninstall:
|
|||||||
$(DESTDIR)$(DATADIR)/setarch-aliases.d \
|
$(DESTDIR)$(DATADIR)/setarch-aliases.d \
|
||||||
$(DESTDIR)$(DATADIR)/makepkg.conf.d \
|
$(DESTDIR)$(DATADIR)/makepkg.conf.d \
|
||||||
$(DESTDIR)$(DATADIR)/pacman.conf.d \
|
$(DESTDIR)$(DATADIR)/pacman.conf.d \
|
||||||
|
$(DESTDIR)$(DATADIR)/lib \
|
||||||
$(DESTDIR)$(DATADIR)
|
$(DESTDIR)$(DATADIR)
|
||||||
|
|
||||||
TODAY=$(shell date +"%Y%m%d")
|
TODAY=$(shell date +"%Y%m%d")
|
||||||
|
@@ -34,7 +34,7 @@ will automatically build the project and proxy all calls to the local build dire
|
|||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
### Runtime Dependencies
|
### Runtime
|
||||||
|
|
||||||
- arch-install-scripts
|
- arch-install-scripts
|
||||||
- awk
|
- awk
|
||||||
@@ -45,19 +45,18 @@ will automatically build the project and proxy all calls to the local build dire
|
|||||||
- findutils
|
- findutils
|
||||||
- grep
|
- grep
|
||||||
- jq
|
- jq
|
||||||
- ncurses
|
|
||||||
- openssh
|
- openssh
|
||||||
- parallel
|
- parallel
|
||||||
- rsync
|
- rsync
|
||||||
- sed
|
- sed
|
||||||
- systemd
|
|
||||||
- util-linux
|
- util-linux
|
||||||
|
|
||||||
- bzr
|
- bzr
|
||||||
- git
|
- git
|
||||||
- mercurial
|
- mercurial
|
||||||
- subversion
|
- subversion
|
||||||
|
|
||||||
### Development Dependencies
|
### Development
|
||||||
|
|
||||||
- asciidoc
|
- asciidoc
|
||||||
- make
|
- make
|
||||||
|
@@ -1,89 +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.
|
|
||||||
|
|
||||||
[core-testing]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[core]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra-testing]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra]
|
|
||||||
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
|
|
@@ -1,95 +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 = x86_64_v3 x86_64
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
[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
|
|
||||||
|
|
||||||
# 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
|
|
@@ -1,95 +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.
|
|
||||||
|
|
||||||
[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
|
|
||||||
|
|
||||||
# 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
|
|
@@ -1,89 +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 = x86_64_v3 x86_64
|
|
||||||
|
|
||||||
# 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.
|
|
||||||
|
|
||||||
[core-testing]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[core]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra-testing]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra]
|
|
||||||
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
|
|
@@ -70,16 +70,19 @@ LocalFileSigLevel = Optional
|
|||||||
# repo name header and Include lines. You can add preferred servers immediately
|
# repo name header and Include lines. You can add preferred servers immediately
|
||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
#[core-testing]
|
#[testing]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
#[extra-testing]
|
[extra]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
#[community-testing]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[community]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
|
@@ -70,16 +70,19 @@ LocalFileSigLevel = Optional
|
|||||||
# repo name header and Include lines. You can add preferred servers immediately
|
# repo name header and Include lines. You can add preferred servers immediately
|
||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
#[core-testing]
|
#[testing]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
#[extra-testing]
|
[extra]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
#[community-testing]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[community]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
|
@@ -73,16 +73,19 @@ LocalFileSigLevel = Optional
|
|||||||
[gnome-unstable]
|
[gnome-unstable]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core-testing]
|
[testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra-testing]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[community-testing]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
|
@@ -73,16 +73,19 @@ LocalFileSigLevel = Optional
|
|||||||
[kde-unstable]
|
[kde-unstable]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core-testing]
|
[testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra-testing]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[community-testing]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
|
@@ -70,24 +70,27 @@ LocalFileSigLevel = Optional
|
|||||||
# repo name header and Include lines. You can add preferred servers immediately
|
# repo name header and Include lines. You can add preferred servers immediately
|
||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
[core-staging]
|
[staging]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core-testing]
|
[testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra-staging]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra-testing]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community-staging]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community-testing]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# If you want to run 32 bit applications on your x86_64 system,
|
# If you want to run 32 bit applications on your x86_64 system,
|
||||||
# enable the multilib repositories as required here.
|
# enable the multilib repositories as required here.
|
||||||
[multilib-staging]
|
[multilib-staging]
|
||||||
|
@@ -70,16 +70,19 @@ LocalFileSigLevel = Optional
|
|||||||
# repo name header and Include lines. You can add preferred servers immediately
|
# repo name header and Include lines. You can add preferred servers immediately
|
||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
[core-testing]
|
[testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra-testing]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[community-testing]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# If you want to run 32 bit applications on your x86_64 system,
|
# If you want to run 32 bit applications on your x86_64 system,
|
||||||
|
@@ -70,16 +70,19 @@ LocalFileSigLevel = Optional
|
|||||||
# repo name header and Include lines. You can add preferred servers immediately
|
# repo name header and Include lines. You can add preferred servers immediately
|
||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
#[core-testing]
|
#[testing]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
#[extra-testing]
|
[extra]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
#[community-testing]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[community]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# If you want to run 32 bit applications on your x86_64 system,
|
# If you want to run 32 bit applications on your x86_64 system,
|
||||||
|
@@ -70,24 +70,27 @@ LocalFileSigLevel = Optional
|
|||||||
# repo name header and Include lines. You can add preferred servers immediately
|
# repo name header and Include lines. You can add preferred servers immediately
|
||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
[core-staging]
|
[staging]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core-testing]
|
[testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra-staging]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra-testing]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community-staging]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community-testing]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
# tips on creating your own repositories.
|
# tips on creating your own repositories.
|
||||||
#[custom]
|
#[custom]
|
@@ -70,24 +70,27 @@ LocalFileSigLevel = Optional
|
|||||||
# repo name header and Include lines. You can add preferred servers immediately
|
# repo name header and Include lines. You can add preferred servers immediately
|
||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
[core-staging]
|
[staging]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core-testing]
|
[testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra-staging]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra-testing]
|
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community-staging]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community-testing]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
# tips on creating your own repositories.
|
# tips on creating your own repositories.
|
||||||
#[custom]
|
#[custom]
|
@@ -70,16 +70,19 @@ LocalFileSigLevel = Optional
|
|||||||
# repo name header and Include lines. You can add preferred servers immediately
|
# repo name header and Include lines. You can add preferred servers immediately
|
||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
[core-testing]
|
[testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra-testing]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[community-testing]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
@@ -70,16 +70,19 @@ LocalFileSigLevel = Optional
|
|||||||
# repo name header and Include lines. You can add preferred servers immediately
|
# repo name header and Include lines. You can add preferred servers immediately
|
||||||
# after the header, and they will be used before the default mirrors.
|
# after the header, and they will be used before the default mirrors.
|
||||||
|
|
||||||
[core-testing]
|
[testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra-testing]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[community-testing]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
|
[community]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
@@ -2,461 +2,89 @@
|
|||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
_DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
|
_devtools_compgen() {
|
||||||
# shellcheck source=src/lib/valid-tags.sh
|
local i r
|
||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-tags.sh
|
COMPREPLY=($(compgen -W '$*' -- "$cur"))
|
||||||
# shellcheck source=src/lib/valid-repos.sh
|
for ((i=1; i < ${#COMP_WORDS[@]}-1; i++)); do
|
||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-repos.sh
|
for r in "${!COMPREPLY[@]}"; do
|
||||||
|
if [[ ${COMP_WORDS[i]} = "${COMPREPLY[r]}" ]]; then
|
||||||
_binary_arch=${_arch[*]:0:-1}
|
unset 'COMPREPLY[r]'; break
|
||||||
_colors=(never always auto)
|
|
||||||
|
|
||||||
|
|
||||||
_makechrootpkg_args=(
|
|
||||||
-h
|
|
||||||
-c
|
|
||||||
-d
|
|
||||||
-D
|
|
||||||
-u
|
|
||||||
-r
|
|
||||||
-I
|
|
||||||
-l
|
|
||||||
-n
|
|
||||||
-T
|
|
||||||
-U
|
|
||||||
)
|
|
||||||
_makechrootpkg_args_d_opts() { _filedir -d; }
|
|
||||||
_makechrootpkg_args_D_opts() { _filedir -d; }
|
|
||||||
_makechrootpkg_args_r_opts() { _filedir -d; }
|
|
||||||
_makechrootpkg_args_I_opts() { _filedir '*.pkg.tar.*'; }
|
|
||||||
_makechrootpkg_args_l_opts() { _filedir -d; }
|
|
||||||
_makechrootpkg_args_U_opts() { :; }
|
|
||||||
_makechrootpkg() { __devtools_complete _makechrootpkg; }
|
|
||||||
complete -F _makechrootpkg makechrootpkg
|
|
||||||
|
|
||||||
|
|
||||||
_makerepropkg_args=(
|
|
||||||
-h
|
|
||||||
-d
|
|
||||||
-c
|
|
||||||
-M
|
|
||||||
)
|
|
||||||
_makerepropkg_args_c_opts() { _filedir -d; }
|
|
||||||
_makerepropkg_args_M_opts() { _filedir '*.conf'; }
|
|
||||||
_makerepropkg_opts() { _filedir '*.pkg.tar.*'; }
|
|
||||||
_makerepropkg() { __devtools_complete _makerepropkg; }
|
|
||||||
complete -F _makerepropkg makerepropkg
|
|
||||||
|
|
||||||
|
|
||||||
_mkarchroot_args=(
|
|
||||||
-U
|
|
||||||
-C
|
|
||||||
-M
|
|
||||||
-c
|
|
||||||
-h
|
|
||||||
)
|
|
||||||
_mkarchroot_args_U_opts() { _filedir '*.pkg.tar.*'; }
|
|
||||||
_mkarchroot_args_C_opts() { _filedir '*.conf'; }
|
|
||||||
_mkarchroot_args_M_opts() { _filedir '*.conf'; }
|
|
||||||
_mkarchroot_args_c_opts() { _filedir -d; }
|
|
||||||
_mkarchroot_opts() {
|
|
||||||
local args
|
|
||||||
args=$(__pkgctl_word_count_after_subcommand)
|
|
||||||
if (( args == 0 )); then
|
|
||||||
_filedir -d
|
|
||||||
elif (( args >= 1 )); then
|
|
||||||
_devtools_completions_all_packages
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
_mkarchroot() { __devtools_complete _mkarchroot; }
|
|
||||||
complete -F _mkarchroot mkarchroot
|
|
||||||
|
|
||||||
|
|
||||||
_arch_nspawn_args=(
|
|
||||||
-C
|
|
||||||
-M
|
|
||||||
-c
|
|
||||||
-f
|
|
||||||
-s
|
|
||||||
-h
|
|
||||||
)
|
|
||||||
_arch_nspawn_args_C_opts() { _filedir '*.conf'; }
|
|
||||||
_arch_nspawn_args_M_opts() { _filedir '*.conf'; }
|
|
||||||
_arch_nspawn_args_c_opts() { _filedir -d; }
|
|
||||||
_arch_nspawn_args_f_opts() { _filedir; }
|
|
||||||
_arch_nspawn_opts() {
|
|
||||||
local args
|
|
||||||
args=$(__pkgctl_word_count_after_subcommand)
|
|
||||||
if (( args == 0 )); then
|
|
||||||
_filedir -d
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
_arch_nspawn() { __devtools_complete _arch_nspawn; }
|
|
||||||
complete -F _arch_nspawn arch-nspawn
|
|
||||||
|
|
||||||
|
|
||||||
_sogrep_args=(
|
|
||||||
-v --verbose
|
|
||||||
-r --refresh
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
_sogrep_opts() {
|
|
||||||
local args
|
|
||||||
args=$(__pkgctl_word_count_after_subcommand)
|
|
||||||
if (( args == 0 )); then
|
|
||||||
_devtools_completions_repo all
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
_sogrep() { __devtools_complete _sogrep; }
|
|
||||||
complete -F _sogrep sogrep
|
|
||||||
|
|
||||||
|
|
||||||
_offload_build_args=(
|
|
||||||
-r --repo
|
|
||||||
-a --arch
|
|
||||||
-s --server
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
_offload_build_args__repo_opts() { _devtools_completions_build_repo; }
|
|
||||||
_offload_build_args_r_opts() { _offload_build_args__repo_opts; }
|
|
||||||
_offload_build_args__arch_opts() { _devtools_completions_arch; }
|
|
||||||
_offload_build_args_a_opts() { _offload_build_args__arch_opts; }
|
|
||||||
_offload_build_args__server_opts() { :; }
|
|
||||||
_offload_build_args_s_opts() { _offload_build_args__server_opts; }
|
|
||||||
_offload_build() { __devtools_complete _offload_build; }
|
|
||||||
complete -F _offload_build offload-build
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_cmds=(
|
|
||||||
auth
|
|
||||||
build
|
|
||||||
db
|
|
||||||
diff
|
|
||||||
release
|
|
||||||
repo
|
|
||||||
version
|
|
||||||
)
|
|
||||||
_pkgctl_args=(
|
|
||||||
-V --version
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_auth_cmds=(
|
|
||||||
login
|
|
||||||
status
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_auth_login_args=(
|
|
||||||
-g --gen-access-token
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_auth_status_args=(
|
|
||||||
-t --show-token
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_build_args=(
|
|
||||||
--arch
|
|
||||||
--repo
|
|
||||||
|
|
||||||
-s --staging
|
|
||||||
-t --testing
|
|
||||||
-o --offload
|
|
||||||
-c --clean
|
|
||||||
-w --worker
|
|
||||||
|
|
||||||
--pkgver
|
|
||||||
--pkgrel
|
|
||||||
--rebuild
|
|
||||||
-e --edit
|
|
||||||
|
|
||||||
-r --release
|
|
||||||
-m --message
|
|
||||||
-u --db-update
|
|
||||||
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
_pkgctl_build_args__arch_opts() { _devtools_completions_arch; }
|
|
||||||
_pkgctl_build_args__repo_opts() { _devtools_completions_repo; }
|
|
||||||
_pkgctl_build_args__worker_opts() { :; }
|
|
||||||
_pkgctl_build_args_w_opts() { _pkgctl_build_args__worker_opts; }
|
|
||||||
_pkgctl_build_args__pkgver_opts() { :; }
|
|
||||||
_pkgctl_build_args__pkgrel_opts() { :; }
|
|
||||||
_pkgctl_build_args__message_opts() { :; }
|
|
||||||
_pkgctl_build_args_m_opts() { _pkgctl_build_args__message_opts; }
|
|
||||||
_pkgctl_build_opts() { _filedir -d; }
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_db_cmds=(
|
|
||||||
move
|
|
||||||
remove
|
|
||||||
update
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_db_move_args=(
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
_pkgctl_db_move_opts() {
|
|
||||||
local subcommand args
|
|
||||||
subcommand=(db move)
|
|
||||||
args=$(__pkgctl_word_count_after_subcommand "${subcommand[@]}")
|
|
||||||
|
|
||||||
if (( args == 0 )); then
|
|
||||||
_devtools_completions_repo
|
|
||||||
elif (( args == 1 )); then
|
|
||||||
_devtools_completions_repo
|
|
||||||
elif (( args >= 2 )); then
|
|
||||||
_devtools_completions_all_packages
|
|
||||||
fi
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_pkgrepo_pkg() {
|
||||||
_pkgctl_db_remove_args=(
|
_devtools_compgen "$(
|
||||||
-a --arch
|
command pacman "-$1"
|
||||||
-h --help
|
)"
|
||||||
)
|
|
||||||
_pkgctl_db_remove_opts() {
|
|
||||||
local subcommand args
|
|
||||||
subcommand=(db remove)
|
|
||||||
args=$(__pkgctl_word_count_after_subcommand "${subcommand[@]}")
|
|
||||||
|
|
||||||
if (( args == 0 )); then
|
|
||||||
_devtools_completions_repo
|
|
||||||
elif (( args >= 1 )); then
|
|
||||||
_devtools_completions_all_packages
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_pkgrepo() {
|
||||||
_pkgctl_db_update_args=(
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_release_args=(
|
|
||||||
-m --message
|
|
||||||
-r --repo
|
|
||||||
-s --staging
|
|
||||||
-t --testing
|
|
||||||
-u --db-update
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
_pkgctl_release_args__message_opts() { :; }
|
|
||||||
_pkgctl_release_args_m_opts() { _pkgctl_release_args__message_opts; }
|
|
||||||
_pkgctl_release_args__repo_opts() { _devtools_completions_repo; }
|
|
||||||
_pkgctl_release_args_r_opts() { _pkgctl_release_args__repo_opts; }
|
|
||||||
_pkgctl_release_opts() { _filedir -d; }
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_repo_cmds=(
|
|
||||||
clone
|
|
||||||
configure
|
|
||||||
create
|
|
||||||
switch
|
|
||||||
web
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_repo_clone_args=(
|
|
||||||
-m --maintainer
|
|
||||||
--switch
|
|
||||||
-u --unprivileged
|
|
||||||
--universe
|
|
||||||
-j --jobs
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
_pkgctl_repo_clone_args__maintainer_opts() { :; }
|
|
||||||
_pkgctl_repo_clone_args_m_opts() { _pkgctl_repo_clone_args__maintainer_opts; }
|
|
||||||
_pkgctl_repo_clone_args__switch_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_configure_args=(
|
|
||||||
-j --jobs
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
_pkgctl_repo_configure_args__jobs_opts() { :; }
|
|
||||||
_pkgctl_repo_configure_args_j_opts() { _pkgctl_repo_clone_args__jobs_opts; }
|
|
||||||
_pkgctl_repo_configure_opts() { _filedir -d; }
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_repo_create_args=(
|
|
||||||
-c --clone
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_repo_switch_args=(
|
|
||||||
--discard-changes
|
|
||||||
-f --force
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
_pkgctl_repo_switch_opts() {
|
|
||||||
local subcommand args
|
|
||||||
subcommand=(repo switch)
|
|
||||||
args=$(__pkgctl_word_count_after_subcommand "${subcommand[@]}")
|
|
||||||
|
|
||||||
if (( args == 0 )); then
|
|
||||||
:
|
|
||||||
elif (( args >= 1 )); then
|
|
||||||
_filedir -d;
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_repo_web_args=(
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
_pkgctl_repo_web_opts() { _filedir -d; }
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_diff_args=(
|
|
||||||
-l --list
|
|
||||||
-d --diffoscope
|
|
||||||
-p --pkginfo
|
|
||||||
-b --buildinfo
|
|
||||||
-m --makepkg-config
|
|
||||||
-u -U --unified
|
|
||||||
-y --side-by-side
|
|
||||||
--color
|
|
||||||
-W --width
|
|
||||||
-P --pool
|
|
||||||
-v --verbose
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
_pkgctl_diff_args__makepkg_config_opts() { _filedir '*.conf'; }
|
|
||||||
_pkgctl_diff_args_m_opts() { _pkgctl_diff_args__makepkg_config_opts; }
|
|
||||||
_pkgctl_diff_args__width_opts() { :; }
|
|
||||||
_pkgctl_diff_args_W_opts() { _pkgctl_diff_args__width_opts; }
|
|
||||||
_pkgctl_diff_args__color_opts() { _devtools_completions_color; }
|
|
||||||
_pkgctl_diff_args__pool_opts() { _filedir -d; }
|
|
||||||
_pkgctl_diff_args_P_opts() { _pkgctl_diff_args__pool_opts; }
|
|
||||||
_pkgctl_diff_opts() { _devtools_completions_all_packages; }
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_version_args=(
|
|
||||||
-h --help
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
_devtools_completions_color() {
|
|
||||||
mapfile -t COMPREPLY < <(compgen -W "${_colors[*]}" -- "$cur")
|
|
||||||
}
|
|
||||||
_devtools_completions_arch() {
|
|
||||||
mapfile -t COMPREPLY < <(compgen -W "${_arch[*]}" -- "$cur")
|
|
||||||
}
|
|
||||||
_devtools_completions_repo() {
|
|
||||||
local optional=${1:-}
|
|
||||||
mapfile -t COMPREPLY < <(compgen -W "${optional} ${_repos[*]}" -- "$cur")
|
|
||||||
}
|
|
||||||
_devtools_completions_build_repo() {
|
|
||||||
mapfile -t COMPREPLY < <(compgen -W "${_build_repos[*]}" -- "$cur")
|
|
||||||
}
|
|
||||||
_devtools_completions_all_packages() {
|
|
||||||
mapfile -t COMPREPLY < <(compgen -W "$(pacman -Sql)" -- "$cur")
|
|
||||||
}
|
|
||||||
|
|
||||||
__devtools_complete() {
|
|
||||||
local service=$1
|
|
||||||
local cur prev
|
local cur prev
|
||||||
|
COMPREPLY=()
|
||||||
# Don't break words at : and =
|
|
||||||
COMP_WORDBREAKS=${COMP_WORDBREAKS//[:=]}
|
|
||||||
|
|
||||||
cur=$(_get_cword)
|
cur=$(_get_cword)
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
__pkgctl_handle_subcommands "${service}"
|
_pkgrepo_pkg Slq
|
||||||
|
true
|
||||||
|
} &&
|
||||||
|
complete -F _pkgrepo pkgrepo
|
||||||
|
|
||||||
|
_makechrootpkg() {
|
||||||
|
local cur
|
||||||
|
COMPREPLY=()
|
||||||
|
_get_comp_words_by_ref cur
|
||||||
|
|
||||||
|
case $cur in
|
||||||
|
-*)
|
||||||
|
COMPREPLY=( $( compgen -W '-I -c -h -l -r -u' -- "$cur" ) )
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
_filedir
|
||||||
return 0
|
return 0
|
||||||
}
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
__pkgctl_has_func() {
|
true
|
||||||
declare -f -- "${1}" &>/dev/null
|
} &&
|
||||||
}
|
complete -F _makechrootpkg makechrootpkg
|
||||||
|
|
||||||
__pkgctl_has_array() {
|
_mkarchroot() {
|
||||||
declare -p -- "${1}" &>/dev/null
|
local cur
|
||||||
}
|
COMPREPLY=()
|
||||||
|
_get_comp_words_by_ref cur
|
||||||
|
|
||||||
__pkgctl_is_subcommand() {
|
case $cur in
|
||||||
__pkgctl_has_array "${1}"_args || \
|
-*)
|
||||||
__pkgctl_has_array "${1}"_cmds
|
COMPREPLY=( $( compgen -W '-C -M -c -h' -- "$cur" ) )
|
||||||
}
|
;;
|
||||||
|
*)
|
||||||
|
_filedir
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
__pkgctl_words_after_subcommand() {
|
true
|
||||||
local subcommand=("$@")
|
} &&
|
||||||
local subcommand_idx=0
|
complete -F _mkarchroot mkarchroot
|
||||||
local word prev_word
|
|
||||||
for ((i = 1; i < ${#COMP_WORDS[@]}; ++i)); do
|
|
||||||
word=${COMP_WORDS[i]}
|
|
||||||
prev_word=${COMP_WORDS[i-1]}
|
|
||||||
# skip options and the current typing
|
|
||||||
if [[ ${word} == -* ]] || [[ ${word} == "${cur}" ]]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
# skip until we resolved the passed subcommand
|
|
||||||
if (( subcommand_idx < ${#subcommand[@]} )); then
|
|
||||||
if [[ $word == "${subcommand[$subcommand_idx]}" ]]; then
|
|
||||||
subcommand_idx=$(( subcommand_idx + 1 ))
|
|
||||||
fi
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
# skip previous options as they belong to the argument
|
|
||||||
if [[ ${prev_word} == -* ]] && __pkgctl_has_func "${service_name}_args${prev_word//-/_}_opts"; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
printf "%s\n" "${word}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
__pkgctl_word_count_after_subcommand() {
|
|
||||||
local subcommand=("$@")
|
|
||||||
mapfile -t words < <(__pkgctl_words_after_subcommand "${subcommand[@]}")
|
|
||||||
echo "${#words[@]}"
|
|
||||||
}
|
|
||||||
|
|
||||||
__pkgctl_handle_subcommands() {
|
_arch-nspawn() {
|
||||||
local service_name=${1}
|
local cur
|
||||||
local index=${2:-0}
|
COMPREPLY=()
|
||||||
local word ref
|
_get_comp_words_by_ref cur
|
||||||
|
|
||||||
# recurse into nested subcommands
|
case $cur in
|
||||||
for ((i = index + 1; i < ${#COMP_WORDS[@]}; ++i)); do
|
-*)
|
||||||
word=${COMP_WORDS[i]}
|
COMPREPLY=( $( compgen -W '-C -M -c -h' -- "$cur" ) )
|
||||||
if [[ ${word} == -* ]] || [[ ${word} == "${cur}" ]]; then
|
;;
|
||||||
continue
|
*)
|
||||||
fi
|
_filedir
|
||||||
if __pkgctl_is_subcommand "${service_name}_${word}"; then
|
return 0
|
||||||
__pkgctl_handle_subcommands "${service_name}_${word}" "${i}"
|
;;
|
||||||
return
|
esac
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# dynamic argument options
|
true
|
||||||
if [[ $prev == -* ]] && word=${prev//-/_} && __pkgctl_has_func "${service_name}_args${word}_opts"; then
|
} &&
|
||||||
"${service_name}_args${word}_opts"
|
complete -F _arch-nspawn arch-nspawn
|
||||||
# dynamic subcommand options
|
# ex:et ts=2 sw=2 ft=sh
|
||||||
elif [[ $cur != -* ]] && __pkgctl_has_func "${service_name}_opts"; then
|
|
||||||
"${service_name}_opts"
|
|
||||||
# subcommand argument array
|
|
||||||
elif ( ! __pkgctl_has_array "${service_name}"_cmds || [[ $cur == -* ]] ) && __pkgctl_has_array "${service_name}_args"; then
|
|
||||||
declare -n ref="${service_name}_args"
|
|
||||||
mapfile -t COMPREPLY < <(compgen -W "${ref[*]}" -- "$cur")
|
|
||||||
# subcommand array
|
|
||||||
elif __pkgctl_has_array "${service_name}"_cmds; then
|
|
||||||
declare -n ref="${service_name}_cmds"
|
|
||||||
mapfile -t COMPREPLY < <(compgen -W "${ref[*]}" -- "$cur")
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
_pkgctl() { __devtools_complete _pkgctl; }
|
|
||||||
complete -F _pkgctl pkgctl
|
|
||||||
# ex:noet ts=4 sw=4 ft=sh
|
|
||||||
|
@@ -42,7 +42,6 @@ _pkgctl_build_args=(
|
|||||||
'(-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]'
|
||||||
'(-I --install)'{-I,--install}'[Install a package into the working copy of the chroot]:target:_files -g "*.pkg.tar.*(.)"'
|
'(-I --install)'{-I,--install}'[Install a package into the working copy of the chroot]:target:_files -g "*.pkg.tar.*(.)"'
|
||||||
'(-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:'
|
||||||
'--pkgrel=[Set pkgrel to a given value]:pkgrel:'
|
'--pkgrel=[Set pkgrel to a given value]:pkgrel:'
|
||||||
@@ -95,28 +94,17 @@ _pkgctl_repo_cmds=(
|
|||||||
"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]"
|
||||||
"switch[Switch a package repository to a specified version]"
|
|
||||||
"web[Open the packaging repository's website]"
|
"web[Open the packaging repository's website]"
|
||||||
)
|
)
|
||||||
|
|
||||||
_pkgctl_repo_switch_args=(
|
|
||||||
'(-f --force --discard-changes)'{-f,--force,--discard-changes}'[Discard changes if index or working tree is dirty]'
|
|
||||||
'(-h --help)'{-h,--help}'[Display usage]'
|
|
||||||
'1:version'
|
|
||||||
'*: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:'
|
||||||
'--switch=[Switch the current working tree to a specified version]'
|
|
||||||
'--universe[Clone all existing packages, useful for cache warming]'
|
'--universe[Clone all existing packages, useful for cache warming]'
|
||||||
'(-j --jobs)'{-j,--jobs}'[Run up to N jobs in parallel (default: number of processing units)]:jobs:'
|
|
||||||
'(-h --help)'{-h,--help}'[Display usage]'
|
'(-h --help)'{-h,--help}'[Display usage]'
|
||||||
'*:packages:_devtools_completions_all_packages'
|
'*:packages:_devtools_completions_all_packages'
|
||||||
)
|
)
|
||||||
|
|
||||||
_pkgctl_repo_configure_args=(
|
_pkgctl_repo_configure_args=(
|
||||||
'(-j --jobs)'{-j,--jobs}'[Run up to N jobs in parallel (default: number of processing units)]:jobs:'
|
|
||||||
'(-h --help)'{-h,--help}'[Display usage]'
|
'(-h --help)'{-h,--help}'[Display usage]'
|
||||||
'*:git_dir:_files -/'
|
'*:git_dir:_files -/'
|
||||||
)
|
)
|
||||||
@@ -243,16 +231,6 @@ _pkgctl_cmds=(
|
|||||||
"diff[Compare package files using different modes]"
|
"diff[Compare package files using different modes]"
|
||||||
"release[Release step to commit, tag and upload build artifacts]"
|
"release[Release step to commit, tag and upload build artifacts]"
|
||||||
"repo[Manage Git packaging repositories and their configuration]"
|
"repo[Manage Git packaging repositories and their configuration]"
|
||||||
"version[Show pkgctl version information]"
|
|
||||||
)
|
|
||||||
|
|
||||||
_pkgctl_args=(
|
|
||||||
'(-V --version)'{-V,--version}'[Show pkgctl version information]'
|
|
||||||
'(-h --help)'{-h,--help}'[Display usage]'
|
|
||||||
)
|
|
||||||
|
|
||||||
_pkgctl_version_args=(
|
|
||||||
'(-h --help)'{-h,--help}'[Display usage]'
|
|
||||||
)
|
)
|
||||||
|
|
||||||
_pkgctl_diff_args=("${_diffpkg_args[@]}")
|
_pkgctl_diff_args=("${_diffpkg_args[@]}")
|
||||||
@@ -265,13 +243,8 @@ _handle_subcommands() {
|
|||||||
'*::arg:->args'
|
'*::arg:->args'
|
||||||
case $state in
|
case $state in
|
||||||
cmds)
|
cmds)
|
||||||
if [[ "${line[-1]}" == -* ]] && typeset -p ${service_name}_args &> /dev/null; then
|
|
||||||
local argname="${service_name}_args[@]"
|
|
||||||
_arguments -s "${(P)argname}"
|
|
||||||
else
|
|
||||||
local service_cmds=${service_name}_cmds[@]
|
local service_cmds=${service_name}_cmds[@]
|
||||||
_values "${(P)service_cmds}"
|
_values "${(P)service_cmds}"
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
args)
|
args)
|
||||||
local service_sub=${service_name}_$line[1]
|
local service_sub=${service_name}_$line[1]
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
diffpkg(1)
|
diffpkg(1)
|
||||||
==========
|
===========
|
||||||
|
|
||||||
Name
|
Name
|
||||||
----
|
----
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
makerepropkg(1)
|
makerepropkg(1)
|
||||||
===============
|
================
|
||||||
|
|
||||||
Name
|
Name
|
||||||
----
|
----
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
mkarchroot(1)
|
mkarchroot(1)
|
||||||
=============
|
==============
|
||||||
|
|
||||||
Name
|
Name
|
||||||
----
|
----
|
||||||
|
@@ -1,40 +0,0 @@
|
|||||||
pkgctl-auth-login(1)
|
|
||||||
====================
|
|
||||||
|
|
||||||
Name
|
|
||||||
----
|
|
||||||
pkgctl-auth-login - Authenticate with the GitLab instance
|
|
||||||
|
|
||||||
Synopsis
|
|
||||||
--------
|
|
||||||
pkgctl auth login [OPTIONS]
|
|
||||||
|
|
||||||
Description
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Interactively authenticate with the GitLab instance.
|
|
||||||
|
|
||||||
The minimum required scopes for the token are: 'api', 'write_repository'.
|
|
||||||
|
|
||||||
The GitLab API token can either be stored in a plaintext file in
|
|
||||||
'$XDG_CONFIG_HOME/devtools/gitlab.conf', or supplied via the
|
|
||||||
'DEVTOOLS_GITLAB_TOKEN' environment variable using any command (gpg, vault,
|
|
||||||
password manager) by declaring a shell alias:
|
|
||||||
|
|
||||||
$ alias pkgctl='DEVTOOLS_GITLAB_TOKEN="$(command to obtain token)" pkgctl'
|
|
||||||
|
|
||||||
Options
|
|
||||||
-------
|
|
||||||
|
|
||||||
*-g, --gen-access-token*::
|
|
||||||
Open the URL to generate a new personal access token
|
|
||||||
|
|
||||||
*-h, --help*::
|
|
||||||
Show a help text
|
|
||||||
|
|
||||||
See Also
|
|
||||||
--------
|
|
||||||
|
|
||||||
linkman:pkgctl-auth-status[1]
|
|
||||||
|
|
||||||
include::include/footer.asciidoc[]
|
|
@@ -1,32 +0,0 @@
|
|||||||
pkgctl-auth-status(1)
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Name
|
|
||||||
----
|
|
||||||
pkgctl-auth-status - View authentication status
|
|
||||||
|
|
||||||
Synopsis
|
|
||||||
--------
|
|
||||||
pkgctl auth status [OPTIONS]
|
|
||||||
|
|
||||||
Description
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Verifies and displays information about your authentication state of
|
|
||||||
services like the GitLab instance and reports issues if any.
|
|
||||||
|
|
||||||
Options
|
|
||||||
-------
|
|
||||||
|
|
||||||
*-t, --show-token*::
|
|
||||||
Display the auth token
|
|
||||||
|
|
||||||
*-h, --help*::
|
|
||||||
Show a help text
|
|
||||||
|
|
||||||
See Also
|
|
||||||
--------
|
|
||||||
|
|
||||||
linkman:pkgctl-auth-login[1]
|
|
||||||
|
|
||||||
include::include/footer.asciidoc[]
|
|
@@ -1,38 +0,0 @@
|
|||||||
pkgctl-auth(1)
|
|
||||||
==============
|
|
||||||
|
|
||||||
Name
|
|
||||||
----
|
|
||||||
pkgctl-auth - Authenticate with serivces like GitLab.
|
|
||||||
|
|
||||||
Synopsis
|
|
||||||
--------
|
|
||||||
pkgctl auth [OPTIONS] [SUBCOMMAND]
|
|
||||||
|
|
||||||
Description
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Manage the authorization for the GitLab instance and show its current status.
|
|
||||||
|
|
||||||
Options
|
|
||||||
-------
|
|
||||||
|
|
||||||
*-h, --help*::
|
|
||||||
Show a help text
|
|
||||||
|
|
||||||
Subcommands
|
|
||||||
-----------
|
|
||||||
|
|
||||||
pkgctl auth login::
|
|
||||||
Authenticate with the GitLab instance
|
|
||||||
|
|
||||||
pkgctl auth status::
|
|
||||||
View authentication status
|
|
||||||
|
|
||||||
See Also
|
|
||||||
--------
|
|
||||||
|
|
||||||
linkman:pkgctl-auth-login[1]
|
|
||||||
linkman:pkgctl-auth-status[1]
|
|
||||||
|
|
||||||
include::include/footer.asciidoc[]
|
|
@@ -38,12 +38,6 @@ Build Options
|
|||||||
*-I, --install* 'FILE'::
|
*-I, --install* 'FILE'::
|
||||||
Install a package into the working copy of the chroot
|
Install a package into the working copy of the chroot
|
||||||
|
|
||||||
*-w, --worker* 'SLOT'::
|
|
||||||
Name of the worker slot, useful for concurrent builds. By default the slot
|
|
||||||
is automatically assigned to the current tty pts number. In case the caller
|
|
||||||
is not a tty, choose a random slot between 1 and number of available
|
|
||||||
processing units.
|
|
||||||
|
|
||||||
*--nocheck*::
|
*--nocheck*::
|
||||||
Do not run the check() function in the PKGBUILD
|
Do not run the check() function in the PKGBUILD
|
||||||
|
|
||||||
@@ -66,9 +60,7 @@ Release Options
|
|||||||
---------------
|
---------------
|
||||||
|
|
||||||
*-r, --release*::
|
*-r, --release*::
|
||||||
Automatically commit, tag and release after building +
|
Automatically commit, tag and release after building
|
||||||
Specifying this option is required when using any of the following options
|
|
||||||
in this section
|
|
||||||
|
|
||||||
*-m, --message* 'MSG'::
|
*-m, --message* 'MSG'::
|
||||||
Use the given <msg> as the commit message
|
Use the given <msg> as the commit message
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
pkgctl-repo-clone(1)
|
pkgctl-repo-clone(1)
|
||||||
====================
|
======================
|
||||||
|
|
||||||
Name
|
Name
|
||||||
----
|
----
|
||||||
@@ -28,15 +28,6 @@ Options
|
|||||||
*--universe*::
|
*--universe*::
|
||||||
Clone all existing packages, useful for cache warming
|
Clone all existing packages, useful for cache warming
|
||||||
|
|
||||||
*--switch* 'VERSION'::
|
|
||||||
Switch to a specified version. The working tree and the index are updated to
|
|
||||||
match the version.
|
|
||||||
|
|
||||||
*-j, --jobs* 'N'::
|
|
||||||
Run up to N jobs in parallel. By default the number of jobs is equal to the
|
|
||||||
number of available processing units. For sequential processing this option
|
|
||||||
needs to be passed with 1.
|
|
||||||
|
|
||||||
*-h, --help*::
|
*-h, --help*::
|
||||||
Show a help text
|
Show a help text
|
||||||
|
|
||||||
@@ -44,6 +35,5 @@ See Also
|
|||||||
--------
|
--------
|
||||||
|
|
||||||
linkman:pkgctl-repo-configure[1]
|
linkman:pkgctl-repo-configure[1]
|
||||||
linkman:pkgctl-repo-switch[1]
|
|
||||||
|
|
||||||
include::include/footer.asciidoc[]
|
include::include/footer.asciidoc[]
|
||||||
|
@@ -25,11 +25,6 @@ read-only HTTPS otherwise.
|
|||||||
Options
|
Options
|
||||||
-------
|
-------
|
||||||
|
|
||||||
*-j, --jobs* 'N'::
|
|
||||||
Run up to N jobs in parallel. By default the number of jobs is equal to the
|
|
||||||
number of available processing units. For sequential processing this option
|
|
||||||
needs to be passed with 1.
|
|
||||||
|
|
||||||
*-h, --help*::
|
*-h, --help*::
|
||||||
Show a help text
|
Show a help text
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
pkgctl-repo-create(1)
|
pkgctl-repo-create(1)
|
||||||
=====================
|
======================
|
||||||
|
|
||||||
Name
|
Name
|
||||||
----
|
----
|
||||||
|
@@ -1,36 +0,0 @@
|
|||||||
pkgctl-repo-switch(1)
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Name
|
|
||||||
----
|
|
||||||
pkgctl-repo-switch - Switch a package repository to a specified version
|
|
||||||
|
|
||||||
Synopsis
|
|
||||||
--------
|
|
||||||
pkgctl repo switch [OPTIONS] [VERSION] [PKGBASE]...
|
|
||||||
|
|
||||||
Description
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Switch a package source repository to a specified version, tag or branch.
|
|
||||||
The working tree and the index are updated to match the specified ref.
|
|
||||||
|
|
||||||
If a version identifier is specified in the pacman version format, that
|
|
||||||
identifier is automatically translated to the Git tag name accordingly.
|
|
||||||
|
|
||||||
The current working directory is used if no PKGBASE is specified.
|
|
||||||
|
|
||||||
Options
|
|
||||||
-------
|
|
||||||
|
|
||||||
*--discard-changes*::
|
|
||||||
Proceed even if the index or the working tree differs from HEAD. Both the
|
|
||||||
index and working tree are restored to match the switching target.
|
|
||||||
|
|
||||||
*-f, --force*::
|
|
||||||
An alias for '--discard-changes'.
|
|
||||||
|
|
||||||
*-h, --help*::
|
|
||||||
Show a help text
|
|
||||||
|
|
||||||
include::include/footer.asciidoc[]
|
|
@@ -1,5 +1,5 @@
|
|||||||
pkgctl-repo(1)
|
pkgctl-repo(1)
|
||||||
==============
|
================
|
||||||
|
|
||||||
Name
|
Name
|
||||||
----
|
----
|
||||||
@@ -41,9 +41,6 @@ pkgctl repo configure::
|
|||||||
pkgctl repo create::
|
pkgctl repo create::
|
||||||
Create a new GitLab package repository
|
Create a new GitLab package repository
|
||||||
|
|
||||||
pkgctl repo switch::
|
|
||||||
Switch a package repository to a specified version
|
|
||||||
|
|
||||||
pkgctl repo web::
|
pkgctl repo web::
|
||||||
Open the packaging repository's website
|
Open the packaging repository's website
|
||||||
|
|
||||||
@@ -53,7 +50,6 @@ See Also
|
|||||||
linkman:pkgctl-repo-clone[1]
|
linkman:pkgctl-repo-clone[1]
|
||||||
linkman:pkgctl-repo-configure[1]
|
linkman:pkgctl-repo-configure[1]
|
||||||
linkman:pkgctl-repo-create[1]
|
linkman:pkgctl-repo-create[1]
|
||||||
linkman:pkgctl-repo-switch[1]
|
|
||||||
linkman:pkgctl-repo-web[1]
|
linkman:pkgctl-repo-web[1]
|
||||||
|
|
||||||
include::include/footer.asciidoc[]
|
include::include/footer.asciidoc[]
|
||||||
|
@@ -1,23 +0,0 @@
|
|||||||
pkgctl-version(1)
|
|
||||||
=================
|
|
||||||
|
|
||||||
Name
|
|
||||||
----
|
|
||||||
pkgctl-version - Show pkgctl version information
|
|
||||||
|
|
||||||
Synopsis
|
|
||||||
--------
|
|
||||||
pkgctl version [OPTIONS]
|
|
||||||
|
|
||||||
Description
|
|
||||||
-----------
|
|
||||||
|
|
||||||
Shows the current version information of pkgctl.
|
|
||||||
|
|
||||||
Options
|
|
||||||
-------
|
|
||||||
|
|
||||||
*-h, --help*::
|
|
||||||
Show a help text
|
|
||||||
|
|
||||||
include::include/footer.asciidoc[]
|
|
@@ -14,15 +14,6 @@ Description
|
|||||||
|
|
||||||
TODO
|
TODO
|
||||||
|
|
||||||
Options
|
|
||||||
-------
|
|
||||||
|
|
||||||
*-V, --version*::
|
|
||||||
Show pkgctl version information
|
|
||||||
|
|
||||||
*-h, --help*::
|
|
||||||
Show a help text
|
|
||||||
|
|
||||||
Subcommands
|
Subcommands
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
@@ -44,9 +35,6 @@ pkgctl release::
|
|||||||
pkgctl repo::
|
pkgctl repo::
|
||||||
Manage Git packaging repositories and their configuration
|
Manage Git packaging repositories and their configuration
|
||||||
|
|
||||||
pkgctl version::
|
|
||||||
Show pkgctl version information
|
|
||||||
|
|
||||||
See Also
|
See Also
|
||||||
--------
|
--------
|
||||||
|
|
||||||
@@ -56,6 +44,5 @@ linkman:pkgctl-db[1]
|
|||||||
linkman:pkgctl-diff[1]
|
linkman:pkgctl-diff[1]
|
||||||
linkman:pkgctl-release[1]
|
linkman:pkgctl-release[1]
|
||||||
linkman:pkgctl-repo[1]
|
linkman:pkgctl-repo[1]
|
||||||
linkman:pkgctl-version[1]
|
|
||||||
|
|
||||||
include::include/footer.asciidoc[]
|
include::include/footer.asciidoc[]
|
||||||
|
@@ -46,7 +46,7 @@ done
|
|||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
(( $# < 1 )) && die 'You must specify a directory.'
|
(( $# < 1 )) && die 'You must specify a directory.'
|
||||||
check_root "" "${BASH_SOURCE[0]}" "$@"
|
check_root
|
||||||
|
|
||||||
working_dir=$(readlink -f "$1")
|
working_dir=$(readlink -f "$1")
|
||||||
shift 1
|
shift 1
|
||||||
|
@@ -50,7 +50,7 @@ pacman_config="@pkgdatadir@/pacman.conf.d/${repo}.conf"
|
|||||||
if [[ -f @pkgdatadir@/pacman.conf.d/${repo}-${arch}.conf ]]; then
|
if [[ -f @pkgdatadir@/pacman.conf.d/${repo}-${arch}.conf ]]; then
|
||||||
pacman_config="@pkgdatadir@/pacman.conf.d/${repo}-${arch}.conf"
|
pacman_config="@pkgdatadir@/pacman.conf.d/${repo}-${arch}.conf"
|
||||||
fi
|
fi
|
||||||
makepkg_config="@pkgdatadir@/makepkg.conf.d/${arch}.conf"
|
makepkg_config="@pkgdatadir@/makepkg.conf.d${arch}.conf"
|
||||||
if [[ -f @pkgdatadir@/makepkg.conf.d/${repo}-${arch}.conf ]]; then
|
if [[ -f @pkgdatadir@/makepkg.conf.d/${repo}-${arch}.conf ]]; then
|
||||||
makepkg_config="@pkgdatadir@/makepkg.conf.d/${repo}-${arch}.conf"
|
makepkg_config="@pkgdatadir@/makepkg.conf.d/${repo}-${arch}.conf"
|
||||||
fi
|
fi
|
||||||
@@ -74,7 +74,7 @@ while getopts 'hcr:' arg; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME "${BASH_SOURCE[0]}" "$@"
|
check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME
|
||||||
|
|
||||||
# Pass all arguments after -- right to makepkg
|
# Pass all arguments after -- right to makepkg
|
||||||
makechrootpkg_args+=("${@:$OPTIND}")
|
makechrootpkg_args+=("${@:$OPTIND}")
|
||||||
|
@@ -89,6 +89,7 @@ if git tag --verify "$gittag" &> /dev/null; then
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg "Releasing package"
|
stat_busy "Releasing package"
|
||||||
git tag --sign --message="Package release ${pkgver}" "$gittag" || abort
|
git tag --sign --message="Package release ${pkgver}" "$gittag" || abort
|
||||||
git push --tags --set-upstream origin main || abort
|
git push --tags --set-upstream origin main || abort
|
||||||
|
stat_done
|
||||||
|
@@ -5,6 +5,8 @@
|
|||||||
_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/util.sh
|
||||||
|
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/util.sh
|
||||||
|
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
@@ -26,6 +28,8 @@ usage() {
|
|||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-M, --makepkg-config Set an alternate makepkg configuration file
|
-M, --makepkg-config Set an alternate makepkg configuration file
|
||||||
|
-M, --pacman-config Set an alternate pacman configuration file
|
||||||
|
--dbpath Set an alternate pacman database path
|
||||||
-P, --pool=DIR Search diff target in pool dir (default '/srv/ftp/pool')
|
-P, --pool=DIR Search diff target in pool dir (default '/srv/ftp/pool')
|
||||||
-v, --verbose Provide more detailed/unfiltered output
|
-v, --verbose Provide more detailed/unfiltered output
|
||||||
-h, --help Show this help text
|
-h, --help Show this help text
|
||||||
@@ -37,12 +41,14 @@ usage() {
|
|||||||
-y, --side-by-side Output in two columns
|
-y, --side-by-side Output in two columns
|
||||||
-W, --width=NUM Output at most NUM (default 'auto') print columns
|
-W, --width=NUM Output at most NUM (default 'auto') print columns
|
||||||
NUM can be 'auto', 'columns' or a number
|
NUM can be 'auto', 'columns' or a number
|
||||||
|
--summary Print a summary or warning message on disparity
|
||||||
|
|
||||||
MODES
|
MODES
|
||||||
-l, --list Activate content list diff mode (default)
|
-l, --list Activate content list diff mode (default)
|
||||||
-d, --diffoscope Activate diffoscope diff mode
|
-d, --diffoscope Activate diffoscope diff mode
|
||||||
-p, --pkginfo Activate .PKGINFO diff mode
|
-p, --pkginfo Activate .PKGINFO diff mode
|
||||||
-b, --buildinfo Activate .BUILDINFO diff mode
|
-b, --buildinfo Activate .BUILDINFO diff mode
|
||||||
|
-s, --soname Activate library SONAME diff mode
|
||||||
_EOF_
|
_EOF_
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,11 +60,13 @@ TARLIST=0
|
|||||||
DIFFOSCOPE=0
|
DIFFOSCOPE=0
|
||||||
PKGINFO=0
|
PKGINFO=0
|
||||||
BUILDINFO=0
|
BUILDINFO=0
|
||||||
|
SONAME=0
|
||||||
|
SUMMARY=0
|
||||||
|
|
||||||
DIFFMODE=--side-by-side
|
DIFFMODE=--side-by-side
|
||||||
DIFFCOLOR=--color=auto
|
DIFFCOLOR=--color=auto
|
||||||
DIFFWIDTH=--width=auto
|
DIFFWIDTH=--width=auto
|
||||||
DIFFOPTIONS=(--expand-tabs)
|
DIFFOPTIONS=(--expand-tabs --suppress-common-lines)
|
||||||
|
|
||||||
# option checking
|
# option checking
|
||||||
while (( $# )); do
|
while (( $# )); do
|
||||||
@@ -88,10 +96,18 @@ while (( $# )); do
|
|||||||
BUILDINFO=1
|
BUILDINFO=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
-s|--soname)
|
||||||
|
SONAME=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-v|--verbose)
|
-v|--verbose)
|
||||||
VERBOSE=1
|
VERBOSE=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--summary)
|
||||||
|
SUMMARY=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
-u|-U|--unified)
|
-u|-U|--unified)
|
||||||
DIFFMODE=--unified
|
DIFFMODE=--unified
|
||||||
shift
|
shift
|
||||||
@@ -135,7 +151,7 @@ while (( $# )); do
|
|||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
-*|--*)
|
-*)
|
||||||
die "invalid argument: %s" "$1"
|
die "invalid argument: %s" "$1"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@@ -158,6 +174,9 @@ fi
|
|||||||
if [[ $DIFFWIDTH != --width=auto ]]; then
|
if [[ $DIFFWIDTH != --width=auto ]]; then
|
||||||
DIFFOPTIONS+=("${DIFFWIDTH}")
|
DIFFOPTIONS+=("${DIFFWIDTH}")
|
||||||
fi
|
fi
|
||||||
|
if [[ $DIFFCOLOR == --color=auto ]] && is_tty; then
|
||||||
|
DIFFCOLOR="--color=always"
|
||||||
|
fi
|
||||||
DIFFOPTIONS+=("${DIFFMODE}" "${DIFFCOLOR}")
|
DIFFOPTIONS+=("${DIFFMODE}" "${DIFFCOLOR}")
|
||||||
|
|
||||||
if ! (( DIFFOSCOPE || TARLIST || PKGINFO || BUILDINFO )); then
|
if ! (( DIFFOSCOPE || TARLIST || PKGINFO || BUILDINFO )); then
|
||||||
@@ -232,23 +251,31 @@ diff_pkgs() {
|
|||||||
bsdtar xOqf "$newpkg" .BUILDINFO > "$TMPDIR/new"
|
bsdtar xOqf "$newpkg" .BUILDINFO > "$TMPDIR/new"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( TARLIST || PKGINFO || BUILDINFO )); then
|
if (( SONAME )); then
|
||||||
|
find-libprovides "$oldpkg" 2>/dev/null | sort > "$TMPDIR/old"
|
||||||
|
find-libprovides "$newpkg" 2>/dev/null | sort > "$TMPDIR/new"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( TARLIST || PKGINFO || BUILDINFO || SONAME )); then
|
||||||
# Resolve dynamic auto width one we know the content to diff
|
# Resolve dynamic auto width one we know the content to diff
|
||||||
if [[ $DIFFWIDTH == --width=auto ]]; then
|
if [[ $DIFFWIDTH == --width=auto ]]; then
|
||||||
AUTOLENGTH=$(file_diff_columns "$TMPDIR/old" "$TMPDIR/new")
|
AUTOLENGTH=$(file_diff_columns "$TMPDIR/old" "$TMPDIR/new")
|
||||||
DIFFOPTIONS+=("--width=${AUTOLENGTH}")
|
DIFFOPTIONS+=("--width=${AUTOLENGTH}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! output=$(diff "${DIFFOPTIONS[@]}" "$TMPDIR/old" "$TMPDIR/new"); then
|
||||||
# Print a header for side-by-side view as it lacks labels
|
# Print a header for side-by-side view as it lacks labels
|
||||||
if [[ $DIFFMODE == --side-by-side ]]; then
|
if [[ $DIFFMODE == --side-by-side ]]; then
|
||||||
printf -- "--- %s\n+++ %s\n" "${oldpkg}" "${newpkg}"
|
printf -- "%s--- %s\n+++ %s%s\n" "${BOLD}" "${oldpkg}" "${newpkg}" "${ALL_OFF}"
|
||||||
|
fi
|
||||||
|
printf "%s\n" "${output}"
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
diff "${DIFFOPTIONS[@]}" "$TMPDIR/old" "$TMPDIR/new"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( DIFFOSCOPE )); then
|
if (( DIFFOSCOPE )); then
|
||||||
diffoscope "${DIFFCOLOR/--color/--text-color}" "$oldpkg" "$newpkg"
|
diffoscope "${DIFFCOLOR/--color/--text-color}" "$oldpkg" "$newpkg"
|
||||||
|
return $?
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,13 +304,14 @@ fetch_pkg() {
|
|||||||
fi
|
fi
|
||||||
# Search via pacman database if no pool file exists
|
# Search via pacman database if no pool file exists
|
||||||
if [[ ! -f ${pkgurl} ]]; then
|
if [[ ! -f ${pkgurl} ]]; then
|
||||||
pkgurl=$(pacman -Spdd --print-format '%l' --noconfirm "$pkg") ||
|
pkgurl=$(pacman -Spdd --print-format '%l' --noconfirm -- "$pkg") ||
|
||||||
die "Couldn't download previous package for %s." "$pkg"
|
die "Couldn't download previous package for %s." "$pkg"
|
||||||
|
# TODO: check and download via Swdd so we also do signatures checks before processing
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pkg=${pkgurl##*/}
|
pkg=${pkgurl##*/}
|
||||||
pkgdest=$(mktemp -t -d "${pkg}-XXXXXX")/${pkg}
|
pkgdest=$(mktemp -t -d -- "${pkg}-XXXXXX")/${pkg}
|
||||||
|
|
||||||
if [[ $pkgurl = file://* || ( $pkgurl = /* && -f $pkgurl ) ]]; then
|
if [[ $pkgurl = file://* || ( $pkgurl = /* && -f $pkgurl ) ]]; then
|
||||||
ln -sf "${pkgurl#file://}" "$pkgdest"
|
ln -sf "${pkgurl#file://}" "$pkgdest"
|
||||||
@@ -313,6 +341,7 @@ if (( $# < 2 )); then
|
|||||||
CARCH='any'
|
CARCH='any'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ret=0
|
||||||
for _pkgname in "${pkgname[@]}"; do
|
for _pkgname in "${pkgname[@]}"; do
|
||||||
comparepkg=$_pkgname
|
comparepkg=$_pkgname
|
||||||
pkgurl=
|
pkgurl=
|
||||||
@@ -330,10 +359,13 @@ if (( $# < 2 )); then
|
|||||||
oldpkg=$(fetch_pkg "$comparepkg") || exit 1
|
oldpkg=$(fetch_pkg "$comparepkg") || exit 1
|
||||||
|
|
||||||
diff_pkgs "$oldpkg" "$pkgfile"
|
diff_pkgs "$oldpkg" "$pkgfile"
|
||||||
|
ret+=$?
|
||||||
done
|
done
|
||||||
|
exit $ret
|
||||||
else
|
else
|
||||||
file1=$(fetch_pkg "$1") || exit 1
|
file1=$(fetch_pkg "$1") || exit 1
|
||||||
file2=$(fetch_pkg "$2") || exit 1
|
file2=$(fetch_pkg "$2") || exit 1
|
||||||
|
|
||||||
diff_pkgs "$file1" "$file2"
|
diff_pkgs "$file1" "$file2"
|
||||||
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
@@ -81,25 +81,15 @@ gitlab_api_get_user() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Convert arbitrary project names to GitLab valid path names.
|
|
||||||
#
|
|
||||||
# GitLab has several limitations on project and group names and also maintains
|
|
||||||
# a list of reserved keywords as documented on their docs.
|
|
||||||
# https://docs.gitlab.com/ee/user/reserved_names.html
|
|
||||||
#
|
|
||||||
# 1. replace single '+' between word boundaries with '-'
|
# 1. replace single '+' between word boundaries with '-'
|
||||||
# 2. replace any other '+' with literal 'plus'
|
# 2. replace any other '+' with literal 'plus'
|
||||||
# 3. replace any special chars other than '_', '-' and '.' with '-'
|
# 3. replace any special chars other than '_', '-' and '.' with '-'
|
||||||
# 4. replace consecutive '_-' chars with a single '-'
|
|
||||||
# 5. replace 'tree' with 'unix-tree' due to GitLab reserved keyword
|
|
||||||
gitlab_project_name_to_path() {
|
gitlab_project_name_to_path() {
|
||||||
local name=$1
|
local name=$1
|
||||||
printf "%s" "${name}" \
|
printf "%s" "${name}" \
|
||||||
| sed -E 's/([a-zA-Z0-9]+)\+([a-zA-Z]+)/\1-\2/g' \
|
| sed -E 's/([a-zA-Z0-9]+)\+([a-zA-Z]+)/\1-\2/g' \
|
||||||
| sed -E 's/\+/plus/g' \
|
| sed -E 's/\+/plus/g' \
|
||||||
| sed -E 's/[^a-zA-Z0-9_\-\.]/-/g' \
|
| sed -E 's/[^a-zA-Z0-9_\-\.]/-/g'
|
||||||
| sed -E 's/[_\-]{2,}/-/g' \
|
|
||||||
| sed -E 's/^tree$/unix-tree/g'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gitlab_api_create_project() {
|
gitlab_api_create_project() {
|
||||||
|
@@ -4,19 +4,18 @@
|
|||||||
:
|
:
|
||||||
|
|
||||||
# shellcheck disable=2034
|
# shellcheck disable=2034
|
||||||
CHROOT_VERSION='v5'
|
CHROOT_VERSION='v4'
|
||||||
|
|
||||||
##
|
##
|
||||||
# usage : check_root $keepenv
|
# usage : check_root $keepenv
|
||||||
##
|
##
|
||||||
|
orig_argv=("${BASH_SOURCE[0]}" "$@")
|
||||||
check_root() {
|
check_root() {
|
||||||
local keepenv=$1
|
local keepenv=$1
|
||||||
shift
|
|
||||||
local orig_argv=("$@")
|
|
||||||
|
|
||||||
(( EUID == 0 )) && return
|
(( EUID == 0 )) && return
|
||||||
if type -P sudo >/dev/null; then
|
if type -P sudo >/dev/null; then
|
||||||
exec sudo --preserve-env="${keepenv}" -- "${orig_argv[@]}"
|
exec sudo --preserve-env=$keepenv -- "${orig_argv[@]}"
|
||||||
else
|
else
|
||||||
exec su root -c "$(printf ' %q' "${orig_argv[@]}")"
|
exec su root -c "$(printf ' %q' "${orig_argv[@]}")"
|
||||||
fi
|
fi
|
||||||
|
@@ -23,13 +23,9 @@ pkgctl_auth_login_usage() {
|
|||||||
cat <<- _EOF_
|
cat <<- _EOF_
|
||||||
Usage: ${COMMAND} [OPTIONS]
|
Usage: ${COMMAND} [OPTIONS]
|
||||||
|
|
||||||
Interactively authenticate with the GitLab instance.
|
Authenticate with the GitLab instance.
|
||||||
|
|
||||||
The minimum required scopes for the token are: 'api', 'write_repository'.
|
The minimum required scopes for the token are: "api", "write_repository".
|
||||||
|
|
||||||
The GitLab API token can either be stored in a plaintext file, or
|
|
||||||
supplied via the DEVTOOLS_GITLAB_TOKEN environment variable using a
|
|
||||||
vault, see pkgctl-auth-login(1) for details.
|
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-g, --gen-access-token Open the URL to generate a new personal access token
|
-g, --gen-access-token Open the URL to generate a new personal access token
|
||||||
@@ -63,17 +59,13 @@ pkgctl_auth_login() {
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
personal_access_token_url="https://${GITLAB_HOST}/-/profile/personal_access_tokens?name=pkgctl+token&scopes=api,write_repository"
|
personal_access_token_url="https://${GITLAB_HOST}/-/profile/personal_access_tokens"
|
||||||
|
|
||||||
cat <<- _EOF_
|
cat <<- _EOF_
|
||||||
Logging into ${BOLD}${GITLAB_HOST}${ALL_OFF}
|
Logging into ${BOLD}${GITLAB_HOST}${ALL_OFF}
|
||||||
|
|
||||||
Tip: you can generate a Personal Access Token here ${personal_access_token_url}
|
Tip: you can generate a Personal Access Token here ${personal_access_token_url}
|
||||||
The minimum required scopes are 'api' and 'write_repository'.
|
The minimum required scopes are 'api' and 'write_repository'.
|
||||||
|
|
||||||
If you do not want to store the token in a plaintext file, you can abort
|
|
||||||
the following prompt and supply the token via the DEVTOOLS_GITLAB_TOKEN
|
|
||||||
environment variable using a vault, see pkgctl-auth-login(1) for details.
|
|
||||||
_EOF_
|
_EOF_
|
||||||
|
|
||||||
if (( GEN_ACESS_TOKEN )); then
|
if (( GEN_ACESS_TOKEN )); then
|
||||||
|
@@ -25,7 +25,6 @@ source /usr/share/makepkg/util/config.sh
|
|||||||
source /usr/share/makepkg/util/message.sh
|
source /usr/share/makepkg/util/message.sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
|
|
||||||
pkgctl_build_usage() {
|
pkgctl_build_usage() {
|
||||||
@@ -48,7 +47,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
|
||||||
-I, --install FILE Install a package into the working copy of the chroot
|
-I, --install FILE Install a package into the working copy of the chroot
|
||||||
-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
|
||||||
|
|
||||||
PKGBUILD OPTIONS
|
PKGBUILD OPTIONS
|
||||||
@@ -125,11 +123,12 @@ pkgctl_build() {
|
|||||||
local RELEASE_OPTIONS=()
|
local RELEASE_OPTIONS=()
|
||||||
local MAKEPKG_OPTIONS=()
|
local MAKEPKG_OPTIONS=()
|
||||||
|
|
||||||
local WORKER=
|
local PTS
|
||||||
local WORKER_SLOT=
|
PTS="$(tty | sed 's|/dev/pts/||')"
|
||||||
|
local WORKER="${USER}-${PTS}"
|
||||||
|
|
||||||
# variables
|
# variables
|
||||||
local path pkgbase pkgrepo source
|
local path pkgbase pkgrepo source soname_changed=0
|
||||||
|
|
||||||
while (( $# )); do
|
while (( $# )); do
|
||||||
case $1 in
|
case $1 in
|
||||||
@@ -170,8 +169,6 @@ pkgctl_build() {
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--rebuild)
|
--rebuild)
|
||||||
# shellcheck source=src/lib/util/git.sh
|
|
||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/git.sh
|
|
||||||
pkgctl_build_check_option_group_ver '--rebuild' "${PKGVER}" "${PKGREL}" "${REBUILD}"
|
pkgctl_build_check_option_group_ver '--rebuild' "${PKGVER}" "${PKGREL}" "${REBUILD}"
|
||||||
REBUILD=1
|
REBUILD=1
|
||||||
shift
|
shift
|
||||||
@@ -225,11 +222,6 @@ pkgctl_build() {
|
|||||||
DB_UPDATE=1
|
DB_UPDATE=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-w|--worker)
|
|
||||||
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
|
||||||
WORKER_SLOT=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
@@ -244,16 +236,6 @@ pkgctl_build() {
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
# check if any release specific options were specified without releasing
|
|
||||||
if (( ! RELEASE )); then
|
|
||||||
if (( DB_UPDATE )); then
|
|
||||||
die "cannot use --db-update without --release"
|
|
||||||
fi
|
|
||||||
if [[ -n "${MESSAGE}" ]]; then
|
|
||||||
die "cannot use --message without --release"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check if invoked without any path from within a packaging repo
|
# check if invoked without any path from within a packaging repo
|
||||||
if (( ${#paths[@]} == 0 )); then
|
if (( ${#paths[@]} == 0 )); then
|
||||||
if [[ -f PKGBUILD ]]; then
|
if [[ -f PKGBUILD ]]; then
|
||||||
@@ -264,12 +246,6 @@ pkgctl_build() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# assign default worker slot
|
|
||||||
if [[ -z ${WORKER_SLOT} ]] && ! WORKER_SLOT="$(tty | sed 's|/dev/pts/||')"; then
|
|
||||||
WORKER_SLOT=$(( RANDOM % $(nproc) + 1 ))
|
|
||||||
fi
|
|
||||||
WORKER="${USER}-${WORKER_SLOT}"
|
|
||||||
|
|
||||||
# Update pacman cache for auto-detection
|
# Update pacman cache for auto-detection
|
||||||
if [[ -z ${REPO} ]]; then
|
if [[ -z ${REPO} ]]; then
|
||||||
update_pacman_repo_cache
|
update_pacman_repo_cache
|
||||||
@@ -290,6 +266,7 @@ pkgctl_build() {
|
|||||||
. ./PKGBUILD
|
. ./PKGBUILD
|
||||||
pkgbase=${pkgbase:-$pkgname}
|
pkgbase=${pkgbase:-$pkgname}
|
||||||
pkgrepo=${REPO}
|
pkgrepo=${REPO}
|
||||||
|
soname_changed=0
|
||||||
msg "Building ${pkgbase}"
|
msg "Building ${pkgbase}"
|
||||||
|
|
||||||
# auto-detection of build target
|
# auto-detection of build target
|
||||||
@@ -302,6 +279,11 @@ pkgctl_build() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# TODO: REMOVE AFTER POC
|
||||||
|
if [[ ${pkgrepo} == community ]]; then
|
||||||
|
pkgrepo=extra
|
||||||
|
fi
|
||||||
|
|
||||||
# special cases to resolve final build target
|
# special cases to resolve final build target
|
||||||
if (( TESTING )); then
|
if (( TESTING )); then
|
||||||
pkgrepo="${pkgrepo}-testing"
|
pkgrepo="${pkgrepo}-testing"
|
||||||
@@ -325,7 +307,6 @@ pkgctl_build() {
|
|||||||
# print gathered build modes
|
# print gathered build modes
|
||||||
msg2 "repo: ${pkgrepo}"
|
msg2 "repo: ${pkgrepo}"
|
||||||
msg2 "arch: ${BUILD_ARCH[*]}"
|
msg2 "arch: ${BUILD_ARCH[*]}"
|
||||||
msg2 "worker: ${WORKER}"
|
|
||||||
|
|
||||||
# increment pkgrel on rebuild
|
# increment pkgrel on rebuild
|
||||||
if (( REBUILD )); then
|
if (( REBUILD )); then
|
||||||
@@ -395,8 +376,18 @@ pkgctl_build() {
|
|||||||
BUILDTOOL="${pkgrepo}-build"
|
BUILDTOOL="${pkgrepo}-build"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# TODO: REMOVE AFTER POC
|
||||||
|
offload_tool=${pkgrepo}
|
||||||
|
if [[ ${pkgrepo} == core-* ]]; then
|
||||||
|
BUILDTOOL=${BUILDTOOL/core-/}
|
||||||
|
offload_tool=${offload_tool/core-/}
|
||||||
|
elif [[ ${pkgrepo} == extra-* ]]; then
|
||||||
|
BUILDTOOL=${BUILDTOOL/extra-/}
|
||||||
|
offload_tool=${offload_tool/extra-/}
|
||||||
|
fi
|
||||||
|
|
||||||
if (( OFFLOAD )); then
|
if (( OFFLOAD )); then
|
||||||
offload-build --repo "${pkgrepo}" -- "${BUILD_OPTIONS[@]}" -- "${MAKECHROOT_OPTIONS[@]}" -l "${WORKER}" -- "${MAKEPKG_OPTIONS[@]}"
|
offload-build --repo "${offload_tool}" -- "${BUILD_OPTIONS[@]}" -- "${MAKECHROOT_OPTIONS[@]}" -l "${WORKER}" -- "${MAKEPKG_OPTIONS[@]}"
|
||||||
else
|
else
|
||||||
"${BUILDTOOL}" "${BUILD_OPTIONS[@]}" -- "${MAKECHROOT_OPTIONS[@]}" -l "${WORKER}" -- "${MAKEPKG_OPTIONS[@]}"
|
"${BUILDTOOL}" "${BUILD_OPTIONS[@]}" -- "${MAKECHROOT_OPTIONS[@]}" -l "${WORKER}" -- "${MAKEPKG_OPTIONS[@]}"
|
||||||
fi
|
fi
|
||||||
@@ -404,6 +395,11 @@ pkgctl_build() {
|
|||||||
|
|
||||||
# release the build
|
# release the build
|
||||||
if (( RELEASE )); then
|
if (( RELEASE )); then
|
||||||
|
if [[ ${pkgrepo} != *-staging ]] && ! diffpkg --soname >/dev/null; then
|
||||||
|
die "abort none staging auto-release: package contains soname differences"
|
||||||
|
fi
|
||||||
|
echo RELEASE, ABORT
|
||||||
|
exit 0
|
||||||
pkgctl_release --repo "${pkgrepo}" "${RELEASE_OPTIONS[@]}"
|
pkgctl_release --repo "${pkgrepo}" "${RELEASE_OPTIONS[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -22,15 +22,15 @@ export BUILDTOOLVER=@buildtoolver@
|
|||||||
# Set common properties
|
# Set common properties
|
||||||
export PACMAN_KEYRING_DIR=/etc/pacman.d/gnupg
|
export PACMAN_KEYRING_DIR=/etc/pacman.d/gnupg
|
||||||
export GITLAB_HOST=gitlab.archlinux.org
|
export GITLAB_HOST=gitlab.archlinux.org
|
||||||
export GIT_REPO_SPEC_VERSION=1
|
export GIT_REPO_SPEC_VERSION=0
|
||||||
export GIT_PACKAGING_NAMESPACE=archlinux/packaging/packages
|
export GIT_PACKAGING_NAMESPACE=bot-test/packages
|
||||||
export GIT_PACKAGING_NAMESPACE_ID=11323
|
export GIT_PACKAGING_NAMESPACE_ID=11233
|
||||||
export GIT_PACKAGING_URL_SSH="git@${GITLAB_HOST}:${GIT_PACKAGING_NAMESPACE}"
|
export GIT_PACKAGING_URL_SSH="ssh://git@${GITLAB_HOST}:222/${GIT_PACKAGING_NAMESPACE}"
|
||||||
export GIT_PACKAGING_URL_HTTPS="https://${GITLAB_HOST}/${GIT_PACKAGING_NAMESPACE}"
|
export GIT_PACKAGING_URL_HTTPS="https://${GITLAB_HOST}/${GIT_PACKAGING_NAMESPACE}"
|
||||||
export PACKAGING_REPO_RELEASE_HOST=repos.archlinux.org
|
export PACKAGING_REPO_RELEASE_HOST=repos.sandbox.archlinux.org
|
||||||
|
|
||||||
# check if messages are to be printed using color
|
# check if messages are to be printed using color
|
||||||
if [[ -t 2 && "$TERM" != dumb ]] || [[ ${DEVTOOLS_COLOR} == always ]]; then
|
if [[ -t 2 && "$TERM" != dumb ]]; then
|
||||||
colorize
|
colorize
|
||||||
else
|
else
|
||||||
# shellcheck disable=2034
|
# shellcheck disable=2034
|
||||||
|
@@ -34,12 +34,8 @@ load_devtools_config() {
|
|||||||
|
|
||||||
save_devtools_config() {
|
save_devtools_config() {
|
||||||
# temporary permission fixup
|
# temporary permission fixup
|
||||||
if [[ -d "${XDG_DEVTOOLS_DIR}" ]]; then
|
|
||||||
chmod 700 "${XDG_DEVTOOLS_DIR}"
|
chmod 700 "${XDG_DEVTOOLS_DIR}"
|
||||||
fi
|
|
||||||
if [[ -f "${XDG_DEVTOOLS_GITLAB_CONFIG}" ]]; then
|
|
||||||
chmod 600 "${XDG_DEVTOOLS_GITLAB_CONFIG}"
|
chmod 600 "${XDG_DEVTOOLS_GITLAB_CONFIG}"
|
||||||
fi
|
|
||||||
(
|
(
|
||||||
umask 0077
|
umask 0077
|
||||||
mkdir -p "${XDG_DEVTOOLS_DIR}"
|
mkdir -p "${XDG_DEVTOOLS_DIR}"
|
||||||
|
@@ -25,7 +25,7 @@ pkgctl_db_remove_usage() {
|
|||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
$ ${COMMAND} core-testing libfoo libbar
|
$ ${COMMAND} core-testing libfoo libbar
|
||||||
$ ${COMMAND} --arch x86_64 core libyay
|
$ ${COMMAND} core --arch x86_64 libyay
|
||||||
_EOF_
|
_EOF_
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -145,6 +145,11 @@ pkgctl_release() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# TODO: REMOVE AFTER POC
|
||||||
|
if [[ ${repo} == community ]]; then
|
||||||
|
repo=extra
|
||||||
|
fi
|
||||||
|
|
||||||
if (( TESTING )); then
|
if (( TESTING )); then
|
||||||
repo="${repo}-testing"
|
repo="${repo}-testing"
|
||||||
elif (( STAGING )); then
|
elif (( STAGING )); then
|
||||||
|
@@ -30,7 +30,6 @@ pkgctl_repo_usage() {
|
|||||||
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
|
||||||
switch Switch a package repository to a specified version
|
|
||||||
web Open the packaging repository's website
|
web Open the packaging repository's website
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
@@ -41,7 +40,6 @@ pkgctl_repo_usage() {
|
|||||||
$ ${COMMAND} clone --maintainer mynickname
|
$ ${COMMAND} clone --maintainer mynickname
|
||||||
$ ${COMMAND} configure *
|
$ ${COMMAND} configure *
|
||||||
$ ${COMMAND} create libfoo
|
$ ${COMMAND} create libfoo
|
||||||
$ ${COMMAND} switch 2:1.19.5-1 libfoo
|
|
||||||
$ ${COMMAND} web linux
|
$ ${COMMAND} web linux
|
||||||
_EOF_
|
_EOF_
|
||||||
}
|
}
|
||||||
@@ -83,14 +81,6 @@ pkgctl_repo() {
|
|||||||
pkgctl_repo_create "$@"
|
pkgctl_repo_create "$@"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
switch)
|
|
||||||
_DEVTOOLS_COMMAND+=" $1"
|
|
||||||
shift
|
|
||||||
# shellcheck source=src/lib/repo/switch.sh
|
|
||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/repo/switch.sh
|
|
||||||
pkgctl_repo_switch "$@"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
web)
|
web)
|
||||||
_DEVTOOLS_COMMAND+=" $1"
|
_DEVTOOLS_COMMAND+=" $1"
|
||||||
shift
|
shift
|
||||||
|
@@ -32,15 +32,12 @@ pkgctl_repo_clone_usage() {
|
|||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-m, --maintainer=NAME Clone all packages of the named maintainer
|
-m, --maintainer=NAME Clone all packages of the named maintainer
|
||||||
--switch VERSION Switch the current working tree to a specified version
|
|
||||||
--universe Clone all existing packages, useful for cache warming
|
--universe Clone all existing packages, useful for cache warming
|
||||||
-j, --jobs N Run up to N jobs in parallel (default: $(nproc))
|
|
||||||
-h, --help Show this help text
|
-h, --help Show this help text
|
||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
$ ${COMMAND} libfoo linux libbar
|
$ ${COMMAND} libfoo linux libbar
|
||||||
$ ${COMMAND} --maintainer mynickname
|
$ ${COMMAND} --maintainer mynickname
|
||||||
$ ${COMMAND} --switch 1:1.0-2 libfoo
|
|
||||||
_EOF_
|
_EOF_
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,13 +51,10 @@ pkgctl_repo_clone() {
|
|||||||
local GIT_REPO_BASE_URL=${GIT_PACKAGING_URL_SSH}
|
local GIT_REPO_BASE_URL=${GIT_PACKAGING_URL_SSH}
|
||||||
local CLONE_ALL=0
|
local CLONE_ALL=0
|
||||||
local MAINTAINER=
|
local MAINTAINER=
|
||||||
local VERSION=
|
|
||||||
local CONFIGURE_OPTIONS=()
|
local CONFIGURE_OPTIONS=()
|
||||||
local jobs=
|
local pkgbases
|
||||||
jobs=$(nproc)
|
|
||||||
|
|
||||||
# variables
|
# variables
|
||||||
local command=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
|
|
||||||
local project_path
|
local project_path
|
||||||
|
|
||||||
while (( $# )); do
|
while (( $# )); do
|
||||||
@@ -83,28 +77,10 @@ pkgctl_repo_clone() {
|
|||||||
MAINTAINER="${1#*=}"
|
MAINTAINER="${1#*=}"
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--switch)
|
|
||||||
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
|
||||||
# shellcheck source=src/lib/repo/switch.sh
|
|
||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/repo/switch.sh
|
|
||||||
VERSION="$2"
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
--switch=*)
|
|
||||||
# shellcheck source=src/lib/repo/switch.sh
|
|
||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/repo/switch.sh
|
|
||||||
VERSION="${1#*=}"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--universe)
|
--universe)
|
||||||
CLONE_ALL=1
|
CLONE_ALL=1
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
-j|--jobs)
|
|
||||||
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
|
||||||
jobs=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
@@ -150,39 +126,16 @@ pkgctl_repo_clone() {
|
|||||||
stat_done
|
stat_done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# parallelization
|
|
||||||
if [[ ${jobs} != 1 ]] && (( ${#pkgbases[@]} > 1 )); then
|
|
||||||
# force colors in parallel if parent process is colorized
|
|
||||||
if [[ -n ${BOLD} ]]; then
|
|
||||||
export DEVTOOLS_COLOR=always
|
|
||||||
fi
|
|
||||||
# assign command options
|
|
||||||
if [[ -n "${VERSION}" ]]; then
|
|
||||||
command+=" --switch '${VERSION}'"
|
|
||||||
fi
|
|
||||||
if ! parallel --bar --jobs "${jobs}" "${command}" ::: "${pkgbases[@]}"; then
|
|
||||||
die 'Failed to clone some packages, please check the output'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
for pkgbase in "${pkgbases[@]}"; do
|
for pkgbase in "${pkgbases[@]}"; do
|
||||||
if [[ ! -d ${pkgbase} ]]; then
|
if [[ ! -d ${pkgbase} ]]; then
|
||||||
msg "Cloning ${pkgbase} ..."
|
msg "Cloning ${pkgbase} ..."
|
||||||
project_path=$(gitlab_project_name_to_path "${pkgbase}")
|
project_path=$(gitlab_project_name_to_path "${pkgbase}")
|
||||||
remote_url="${GIT_REPO_BASE_URL}/${project_path}.git"
|
remote_url="${GIT_REPO_BASE_URL}/${project_path}.git"
|
||||||
if ! git clone --origin origin "${remote_url}" "${pkgbase}"; then
|
git clone --origin origin "${remote_url}" "${pkgbase}"
|
||||||
die 'failed to clone %s' "${pkgbase}"
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
warning "Skip cloning ${pkgbase}: Directory exists"
|
warning "Skip cloning ${pkgbase}: Directory exists"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pkgctl_repo_configure "${CONFIGURE_OPTIONS[@]}" "${pkgbase}"
|
pkgctl_repo_configure "${CONFIGURE_OPTIONS[@]}" "${pkgbase}"
|
||||||
|
|
||||||
if [[ -n "${VERSION}" ]]; then
|
|
||||||
pkgctl_repo_switch "${VERSION}" "${pkgbase}"
|
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,6 @@ pkgctl_repo_configure_usage() {
|
|||||||
read-only HTTPS otherwise.
|
read-only HTTPS otherwise.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-j, --jobs N Run up to N jobs in parallel (default: $(nproc))
|
|
||||||
-h, --help Show this help text
|
-h, --help Show this help text
|
||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
@@ -94,12 +93,9 @@ pkgctl_repo_configure() {
|
|||||||
local GIT_REPO_BASE_URL=${GIT_PACKAGING_URL_HTTPS}
|
local GIT_REPO_BASE_URL=${GIT_PACKAGING_URL_HTTPS}
|
||||||
local official=0
|
local official=0
|
||||||
local proto=https
|
local proto=https
|
||||||
local jobs=
|
|
||||||
jobs=$(nproc)
|
|
||||||
local paths=()
|
local paths=()
|
||||||
|
|
||||||
# variables
|
# variables
|
||||||
local -r command=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
|
|
||||||
local path realpath pkgbase remote_url project_path
|
local path realpath pkgbase remote_url project_path
|
||||||
local PACKAGER GPGKEY packager_name packager_email
|
local PACKAGER GPGKEY packager_name packager_email
|
||||||
|
|
||||||
@@ -109,11 +105,6 @@ pkgctl_repo_configure() {
|
|||||||
pkgctl_repo_configure_usage
|
pkgctl_repo_configure_usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
-j|--jobs)
|
|
||||||
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
|
||||||
jobs=$2
|
|
||||||
shift 2
|
|
||||||
;;
|
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
@@ -166,21 +157,10 @@ pkgctl_repo_configure() {
|
|||||||
msg2 "protocol: ${YELLOW}${proto}${ALL_OFF}"
|
msg2 "protocol: ${YELLOW}${proto}${ALL_OFF}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# parallelization
|
|
||||||
if [[ ${jobs} != 1 ]] && (( ${#paths[@]} > 1 )); then
|
|
||||||
if [[ -n ${BOLD} ]]; then
|
|
||||||
export DEVTOOLS_COLOR=always
|
|
||||||
fi
|
|
||||||
if ! parallel --bar --jobs "${jobs}" "${command}" ::: "${paths[@]}"; then
|
|
||||||
die 'Failed to configure some packages, please check the output'
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
for path in "${paths[@]}"; do
|
for path in "${paths[@]}"; do
|
||||||
if ! realpath=$(realpath -e "${path}"); then
|
if ! realpath=$(realpath -e "${path}"); then
|
||||||
die "No such directory: ${path}"
|
error "No such directory: ${path}"
|
||||||
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pkgbase=$(basename "${realpath}")
|
pkgbase=$(basename "${realpath}")
|
||||||
@@ -188,7 +168,8 @@ pkgctl_repo_configure() {
|
|||||||
msg "Configuring ${pkgbase}"
|
msg "Configuring ${pkgbase}"
|
||||||
|
|
||||||
if [[ ! -d "${path}/.git" ]]; then
|
if [[ ! -d "${path}/.git" ]]; then
|
||||||
die "Not a Git repository: ${path}"
|
error "Not a Git repository: ${path}"
|
||||||
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd "${path}" >/dev/null
|
pushd "${path}" >/dev/null
|
||||||
@@ -200,7 +181,7 @@ pkgctl_repo_configure() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# move the master branch to main
|
# move the master branch to main
|
||||||
if [[ $(git symbolic-ref --quiet --short HEAD) == master ]]; then
|
if [[ $(git symbolic-ref --short HEAD) == master ]]; then
|
||||||
git branch --move main
|
git branch --move main
|
||||||
git config branch.main.merge refs/heads/main
|
git config branch.main.merge refs/heads/main
|
||||||
fi
|
fi
|
||||||
|
@@ -1,119 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
[[ -z ${DEVTOOLS_INCLUDE_REPO_SWITCH_SH:-} ]] || return 0
|
|
||||||
DEVTOOLS_INCLUDE_REPO_SWITCH_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 -e
|
|
||||||
|
|
||||||
|
|
||||||
pkgctl_repo_switch_usage() {
|
|
||||||
local -r COMMAND=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
|
|
||||||
cat <<- _EOF_
|
|
||||||
Usage: ${COMMAND} [OPTIONS] [VERSION] [PKGBASE]...
|
|
||||||
|
|
||||||
Switch a package source repository to a specified version, tag or
|
|
||||||
branch. The working tree and the index are updated to match the
|
|
||||||
specified ref.
|
|
||||||
|
|
||||||
If a version identifier is specified in the pacman version format, that
|
|
||||||
identifier is automatically translated to the Git tag name accordingly.
|
|
||||||
|
|
||||||
The current working directory is used if no PKGBASE is specified.
|
|
||||||
|
|
||||||
OPTIONS
|
|
||||||
--discard-changes Discard changes if index or working tree is dirty
|
|
||||||
-f, --force An alias for --discard-changes
|
|
||||||
-h, --help Show this help text
|
|
||||||
|
|
||||||
EXAMPLES
|
|
||||||
$ ${COMMAND} 1.14.6-1 gopass gopass-jsonapi
|
|
||||||
$ ${COMMAND} --force 2:1.19.5-1
|
|
||||||
$ ${COMMAND} main
|
|
||||||
_EOF_
|
|
||||||
}
|
|
||||||
|
|
||||||
pkgctl_repo_switch() {
|
|
||||||
if (( $# < 1 )); then
|
|
||||||
pkgctl_repo_switch_usage
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# options
|
|
||||||
local VERSION
|
|
||||||
local GIT_REF
|
|
||||||
local GIT_CHECKOUT_OPTIONS=()
|
|
||||||
local paths path realpath pkgbase
|
|
||||||
|
|
||||||
while (( $# )); do
|
|
||||||
case $1 in
|
|
||||||
-h|--help)
|
|
||||||
pkgctl_repo_switch_usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
-f|--force|--discard-changes)
|
|
||||||
GIT_CHECKOUT_OPTIONS+=("--force")
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
--)
|
|
||||||
shift
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
-*)
|
|
||||||
# - is special to switch back to previous version
|
|
||||||
if [[ $1 != - ]]; then
|
|
||||||
die "invalid argument: %s" "$1"
|
|
||||||
fi
|
|
||||||
;;&
|
|
||||||
*)
|
|
||||||
if [[ -n ${VERSION} ]]; then
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
VERSION=$1
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -z ${VERSION} ]]; then
|
|
||||||
error "missing positional argument 'VERSION'"
|
|
||||||
pkgctl_repo_switch_usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
GIT_REF="$(get_tag_from_pkgver "${VERSION}")"
|
|
||||||
paths=("$@")
|
|
||||||
|
|
||||||
# check if invoked without any path from within a packaging repo
|
|
||||||
if (( ${#paths[@]} == 0 )); then
|
|
||||||
if [[ -f PKGBUILD ]]; then
|
|
||||||
paths=(".")
|
|
||||||
else
|
|
||||||
die "Not a package repository: $(realpath -- .)"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
for path in "${paths[@]}"; do
|
|
||||||
if ! realpath=$(realpath -e -- "${path}"); then
|
|
||||||
die "No such directory: ${path}"
|
|
||||||
fi
|
|
||||||
pkgbase=$(basename "${realpath}")
|
|
||||||
|
|
||||||
if [[ ! -d "${path}/.git" ]]; then
|
|
||||||
error "Not a Git repository: ${path}"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! git -C "${path}" checkout "${GIT_CHECKOUT_OPTIONS[@]}" "${GIT_REF}"; then
|
|
||||||
die "Failed to switch ${pkgbase} to version ${VERSION}"
|
|
||||||
fi
|
|
||||||
msg "Successfully switched ${pkgbase} to version ${VERSION}"
|
|
||||||
done
|
|
||||||
}
|
|
@@ -78,7 +78,6 @@ pkgctl_repo_web() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for pkgbase in "${pkgbases[@]}"; do
|
for pkgbase in "${pkgbases[@]}"; do
|
||||||
path=$(gitlab_project_name_to_path "${pkgbase}")
|
xdg-open "${GIT_PACKAGING_URL_HTTPS}/${pkgbase}"
|
||||||
xdg-open "${GIT_PACKAGING_URL_HTTPS}/${path}"
|
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
19
src/lib/util/util.sh
Normal file
19
src/lib/util/util.sh
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/hint/bash
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
[[ -z ${DEVTOOLS_INCLUDE_UTIL_UTIL_SH:-} ]] || return 0
|
||||||
|
DEVTOOLS_INCLUDE_UTIL_UTIL_SH=1
|
||||||
|
|
||||||
|
_DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
|
||||||
|
|
||||||
|
|
||||||
|
is_tty() {
|
||||||
|
if [ ! -t 1 ] || [ -p /dev/stdout ]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if [[ $TERM == dumb ]]; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
return 0
|
||||||
|
}
|
@@ -1,47 +0,0 @@
|
|||||||
#!/hint/bash
|
|
||||||
#
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
||||||
|
|
||||||
[[ -z ${DEVTOOLS_INCLUDE_VERSION_SH:-} ]] || return 0
|
|
||||||
DEVTOOLS_INCLUDE_VERSION_SH=1
|
|
||||||
|
|
||||||
_DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
|
|
||||||
|
|
||||||
source /usr/share/makepkg/util/message.sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
|
|
||||||
pkgctl_version_usage() {
|
|
||||||
local -r COMMAND=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
|
|
||||||
cat <<- _EOF_
|
|
||||||
Usage: ${COMMAND} [OPTIONS]
|
|
||||||
|
|
||||||
Shows the current version information of pkgctl
|
|
||||||
|
|
||||||
OPTIONS
|
|
||||||
-h, --help Show this help text
|
|
||||||
_EOF_
|
|
||||||
}
|
|
||||||
|
|
||||||
pkgctl_version_print() {
|
|
||||||
cat <<- _EOF_
|
|
||||||
pkgctl @buildtoolver@
|
|
||||||
_EOF_
|
|
||||||
}
|
|
||||||
|
|
||||||
pkgctl_version() {
|
|
||||||
while (( $# )); do
|
|
||||||
case $1 in
|
|
||||||
-h|--help)
|
|
||||||
pkgctl_version_usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
die "invalid argument: %s" "$1"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
pkgctl_version_print
|
|
||||||
}
|
|
@@ -301,7 +301,7 @@ done
|
|||||||
[[ -n $makepkg_user && -z $(id -u "$makepkg_user") ]] && die 'Invalid makepkg user.'
|
[[ -n $makepkg_user && -z $(id -u "$makepkg_user") ]] && die 'Invalid makepkg user.'
|
||||||
makepkg_user=${makepkg_user:-${SUDO_USER:-$USER}}
|
makepkg_user=${makepkg_user:-${SUDO_USER:-$USER}}
|
||||||
|
|
||||||
check_root SOURCE_DATE_EPOCH,BUILDTOOL,BUILDTOOLVER,GNUPGHOME,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER "${BASH_SOURCE[0]}" "$@"
|
check_root SOURCE_DATE_EPOCH,BUILDTOOL,BUILDTOOLVER,GNUPGHOME,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER
|
||||||
|
|
||||||
# Canonicalize chrootdir, getting rid of trailing /
|
# Canonicalize chrootdir, getting rid of trailing /
|
||||||
chrootdir=$(readlink -e "$passeddir")
|
chrootdir=$(readlink -e "$passeddir")
|
||||||
|
@@ -137,7 +137,7 @@ while getopts 'dM:c:l:h' arg; do
|
|||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
check_root "" "${BASH_SOURCE[0]}" "$@"
|
check_root
|
||||||
|
|
||||||
[[ -f PKGBUILD ]] || { error "No PKGBUILD in current directory."; exit 1; }
|
[[ -f PKGBUILD ]] || { error "No PKGBUILD in current directory."; exit 1; }
|
||||||
|
|
||||||
|
@@ -52,7 +52,7 @@ shift $((OPTIND - 1))
|
|||||||
|
|
||||||
(( $# < 2 )) && die 'You must specify a directory and one or more packages.'
|
(( $# < 2 )) && die 'You must specify a directory and one or more packages.'
|
||||||
|
|
||||||
check_root "" "${BASH_SOURCE[0]}" "$@"
|
check_root
|
||||||
|
|
||||||
working_dir="$(readlink -f "$1")"
|
working_dir="$(readlink -f "$1")"
|
||||||
shift 1
|
shift 1
|
||||||
|
@@ -102,9 +102,9 @@ mapfile -t files < <(
|
|||||||
printf "\t%s\n" "$temp"/*
|
printf "\t%s\n" "$temp"/*
|
||||||
} >&2 &&
|
} >&2 &&
|
||||||
makepkg_user_config="${XDG_CONFIG_HOME:-$HOME/.config}/pacman/makepkg.conf" &&
|
makepkg_user_config="${XDG_CONFIG_HOME:-$HOME/.config}/pacman/makepkg.conf" &&
|
||||||
makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${arch}"'.conf" &&
|
makepkg_config="/usr/share/devtools/makepkg-'"${arch}"'.conf" &&
|
||||||
if [[ -f /usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf ]]; then
|
if [[ -f /usr/share/devtools/makepkg-'"${repo}"'-'"${arch}"'.conf ]]; then
|
||||||
makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf"
|
makepkg_config="/usr/share/devtools/makepkg-'"${repo}"'-'"${arch}"'.conf"
|
||||||
fi &&
|
fi &&
|
||||||
makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist &&
|
makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist &&
|
||||||
printf "%s\n" "${temp}/PKGBUILD"
|
printf "%s\n" "${temp}/PKGBUILD"
|
||||||
|
@@ -25,7 +25,6 @@ usage() {
|
|||||||
diff Compare package files using different modes
|
diff Compare package files using different modes
|
||||||
release Release step to commit, tag and upload build artifacts
|
release Release step to commit, tag and upload build artifacts
|
||||||
repo Manage Git packaging repositories and their configuration
|
repo Manage Git packaging repositories and their configuration
|
||||||
version Show pkgctl version information
|
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-h, --help Show this help text
|
-h, --help Show this help text
|
||||||
@@ -89,19 +88,11 @@ while (( $# )); do
|
|||||||
release)
|
release)
|
||||||
_DEVTOOLS_COMMAND+=" $1"
|
_DEVTOOLS_COMMAND+=" $1"
|
||||||
shift
|
shift
|
||||||
# shellcheck source=src/lib/release.sh
|
# shellcheck source=src/lib/repo.sh
|
||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/release.sh
|
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/release.sh
|
||||||
pkgctl_release "$@"
|
pkgctl_release "$@"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
version|--version|-V)
|
|
||||||
_DEVTOOLS_COMMAND+=" $1"
|
|
||||||
shift
|
|
||||||
# shellcheck source=src/lib/version/version.sh
|
|
||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/version/version.sh
|
|
||||||
pkgctl_version "$@"
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
die "invalid command: %s" "$1"
|
die "invalid command: %s" "$1"
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user