mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
70 Commits
anthraxx/g
...
unstable
Author | SHA1 | Date | |
---|---|---|---|
![]() |
d7c7074457 | ||
![]() |
5f4fd52e38 | ||
![]() |
1b25190176 | ||
![]() |
030e6af880 | ||
![]() |
662d6c5274 | ||
![]() |
3de03e8b1f | ||
![]() |
720b7c9b05 | ||
![]() |
0ea7e9e0e5 | ||
![]() |
be5f54c95c | ||
![]() |
5c6e13a672 | ||
![]() |
a07df0beea | ||
![]() |
c7d627165f | ||
![]() |
e47035e74d | ||
![]() |
9b11b16a7e | ||
![]() |
3283b2ca59 | ||
![]() |
71cb9e97bb | ||
![]() |
1b808b8e32 | ||
![]() |
e4c40a9802 | ||
![]() |
a08bc2acf4 | ||
![]() |
f11cb9018e | ||
![]() |
d759eadb50 | ||
![]() |
1c399778f9 | ||
![]() |
edc14ef19c | ||
![]() |
6ce666a166 | ||
![]() |
bf61b8472a | ||
![]() |
80a8cdcba2 | ||
![]() |
41d4624879 | ||
![]() |
4d3ab0b489 | ||
![]() |
830dcde2d8 | ||
![]() |
1da97a8b36 | ||
![]() |
9330671825 | ||
![]() |
8e3b6bcc5b | ||
![]() |
4289be212b | ||
![]() |
ed96635141 | ||
![]() |
f961e2e948 | ||
![]() |
645a5a9f04 | ||
![]() |
e1142935e5 | ||
![]() |
bc182032eb | ||
![]() |
f3518e248c | ||
![]() |
6c2498750e | ||
![]() |
5e22e4f81e | ||
![]() |
a981ef40e8 | ||
![]() |
fe2eb3076d | ||
![]() |
4ae857e665 | ||
![]() |
eda3a4aea0 | ||
![]() |
f669a71e84 | ||
![]() |
1d7f997215 | ||
![]() |
7954382401 | ||
![]() |
1ae09b43af | ||
![]() |
d402d5f308 | ||
![]() |
c839d52793 | ||
![]() |
cddba60958 | ||
![]() |
f1673c60ad | ||
![]() |
e0307c7925 | ||
![]() |
5752488ef1 | ||
![]() |
b9db6160a2 | ||
![]() |
f834fc4700 | ||
![]() |
8b5bcd01b4 | ||
![]() |
2a59c32bf4 | ||
![]() |
77d800eab2 | ||
![]() |
d2245b1943 | ||
![]() |
f63d343e40 | ||
![]() |
b5d5402e43 | ||
![]() |
a8be7423ef | ||
![]() |
d15bd29a9d | ||
![]() |
95424a88eb | ||
![]() |
3d3176beb6 | ||
![]() |
6aa42e1f6e | ||
![]() |
30616c4fde | ||
![]() |
5eb09a9cc9 |
35
Makefile
35
Makefile
@@ -1,6 +1,6 @@
|
|||||||
SHELL=/bin/bash
|
SHELL=/bin/bash
|
||||||
|
|
||||||
V=20230307
|
V=1.0.3
|
||||||
BUILDTOOLVER ?= $(V)
|
BUILDTOOLVER ?= $(V)
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
@@ -32,12 +32,16 @@ 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 \
|
||||||
testing-x86_64-build \
|
extra-testing-x86_64-build \
|
||||||
testing-x86_64_v3-build \
|
extra-testing-x86_64_v3-build \
|
||||||
staging-x86_64-build \
|
extra-staging-x86_64-build \
|
||||||
staging-x86_64_v3-build \
|
extra-staging-x86_64_v3-build \
|
||||||
multilib-build \
|
multilib-build \
|
||||||
multilib-testing-build \
|
multilib-testing-build \
|
||||||
multilib-staging-build \
|
multilib-staging-build \
|
||||||
@@ -115,6 +119,7 @@ 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##*.}; \
|
||||||
@@ -123,12 +128,14 @@ 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;
|
||||||
@@ -136,22 +143,22 @@ 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")
|
|
||||||
tag:
|
tag:
|
||||||
@sed -E "s|^V=[0-9]{8}|V=$(TODAY)|" -i Makefile
|
@echo "current version: v$(V)"
|
||||||
@git commit --gpg-sign --message "Version $(TODAY)" Makefile
|
@read -r -p "tag version: v" VERSION && \
|
||||||
@git tag --sign --message "Version $(TODAY)" $(TODAY)
|
sed -E "s|^V=.+|V=$$VERSION|" -i Makefile && \
|
||||||
|
git commit --gpg-sign --message "chore(release): version v$$VERSION" Makefile && \
|
||||||
|
git tag --sign --message "Version v$$VERSION" v$$VERSION
|
||||||
|
|
||||||
|
release: dist
|
||||||
|
glab release create v$(V) devtools-$(V).tar.gz*
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip > devtools-$(V).tar.gz
|
git archive --format=tar --prefix=devtools-$(V)/ v$(V) | gzip > devtools-$(V).tar.gz
|
||||||
gpg --detach-sign --use-agent devtools-$(V).tar.gz
|
gpg --detach-sign --use-agent devtools-$(V).tar.gz
|
||||||
|
|
||||||
upload:
|
|
||||||
scp devtools-$(V).tar.gz devtools-$(V).tar.gz.sig repos.archlinux.org:/srv/ftp/other/devtools/
|
|
||||||
|
|
||||||
check: $(BINPROGS_SRC) $(LIBRARY_SRC) contrib/completion/bash/devtools.in config/makepkg/x86_64.conf contrib/makepkg/PKGBUILD.proto
|
check: $(BINPROGS_SRC) $(LIBRARY_SRC) contrib/completion/bash/devtools.in config/makepkg/x86_64.conf contrib/makepkg/PKGBUILD.proto
|
||||||
shellcheck $^
|
shellcheck $^
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ will automatically build the project and proxy all calls to the local build dire
|
|||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
### Runtime
|
### Runtime Dependencies
|
||||||
|
|
||||||
- arch-install-scripts
|
- arch-install-scripts
|
||||||
- awk
|
- awk
|
||||||
@@ -42,21 +42,23 @@ will automatically build the project and proxy all calls to the local build dire
|
|||||||
- binutils
|
- binutils
|
||||||
- coreutils
|
- coreutils
|
||||||
- diffutils
|
- diffutils
|
||||||
|
- fakeroot
|
||||||
- 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
|
### Development Dependencies
|
||||||
|
|
||||||
- asciidoc
|
- asciidoc
|
||||||
- make
|
- make
|
||||||
|
@@ -70,27 +70,24 @@ 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.
|
||||||
|
|
||||||
[staging]
|
[core-staging]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[testing]
|
[core-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,27 +70,24 @@ 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.
|
||||||
|
|
||||||
[staging]
|
[core-staging]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[testing]
|
[core-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,21 +70,18 @@ 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.
|
||||||
|
|
||||||
[testing]
|
[core-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]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
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,21 +70,18 @@ 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.
|
||||||
|
|
||||||
[testing]
|
[core-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]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
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]
|
95
config/pacman/extra-staging-x86_64_v3.conf
Normal file
95
config/pacman/extra-staging-x86_64_v3.conf
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
#
|
||||||
|
# /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
|
95
config/pacman/extra-staging.conf
Normal file
95
config/pacman/extra-staging.conf
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
#
|
||||||
|
# /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
|
89
config/pacman/extra-testing-x86_64_v3.conf
Normal file
89
config/pacman/extra-testing-x86_64_v3.conf
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
#
|
||||||
|
# /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
|
89
config/pacman/extra-testing.conf
Normal file
89
config/pacman/extra-testing.conf
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
#
|
||||||
|
# /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
|
@@ -70,19 +70,16 @@ 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.
|
||||||
|
|
||||||
#[testing]
|
#[core-testing]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
#[extra-testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
#[community-testing]
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[community]
|
[extra]
|
||||||
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,19 +70,16 @@ 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.
|
||||||
|
|
||||||
#[testing]
|
#[core-testing]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
#[extra-testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
#[community-testing]
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[community]
|
[extra]
|
||||||
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,21 +73,18 @@ LocalFileSigLevel = Optional
|
|||||||
[gnome-unstable]
|
[gnome-unstable]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[testing]
|
[core-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]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
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]
|
||||||
|
@@ -73,21 +73,18 @@ LocalFileSigLevel = Optional
|
|||||||
[kde-unstable]
|
[kde-unstable]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[testing]
|
[core-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]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
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,27 +70,24 @@ 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.
|
||||||
|
|
||||||
[staging]
|
[core-staging]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[testing]
|
[core-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,21 +70,18 @@ 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.
|
||||||
|
|
||||||
[testing]
|
[core-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]
|
||||||
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
[extra]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
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-testing]
|
[multilib-testing]
|
||||||
|
@@ -70,19 +70,16 @@ 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.
|
||||||
|
|
||||||
#[testing]
|
#[core-testing]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[extra]
|
#[extra-testing]
|
||||||
Include = /etc/pacman.d/mirrorlist
|
|
||||||
|
|
||||||
#[community-testing]
|
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
[community]
|
[extra]
|
||||||
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,
|
||||||
|
@@ -168,6 +168,7 @@ _pkgctl_build_args=(
|
|||||||
-t --testing
|
-t --testing
|
||||||
-o --offload
|
-o --offload
|
||||||
-c --clean
|
-c --clean
|
||||||
|
-w --worker
|
||||||
|
|
||||||
--pkgver
|
--pkgver
|
||||||
--pkgrel
|
--pkgrel
|
||||||
@@ -182,6 +183,8 @@ _pkgctl_build_args=(
|
|||||||
)
|
)
|
||||||
_pkgctl_build_args__arch_opts() { _devtools_completions_arch; }
|
_pkgctl_build_args__arch_opts() { _devtools_completions_arch; }
|
||||||
_pkgctl_build_args__repo_opts() { _devtools_completions_repo; }
|
_pkgctl_build_args__repo_opts() { _devtools_completions_repo; }
|
||||||
|
_pkgctl_build_args__worker_opts() { :; }
|
||||||
|
_pkgctl_build_args_w_opts() { _pkgctl_build_args__worker_opts; }
|
||||||
_pkgctl_build_args__pkgver_opts() { :; }
|
_pkgctl_build_args__pkgver_opts() { :; }
|
||||||
_pkgctl_build_args__pkgrel_opts() { :; }
|
_pkgctl_build_args__pkgrel_opts() { :; }
|
||||||
_pkgctl_build_args__message_opts() { :; }
|
_pkgctl_build_args__message_opts() { :; }
|
||||||
@@ -255,24 +258,37 @@ _pkgctl_repo_cmds=(
|
|||||||
clone
|
clone
|
||||||
configure
|
configure
|
||||||
create
|
create
|
||||||
|
switch
|
||||||
web
|
web
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_repo_clone_args=(
|
_pkgctl_repo_clone_args=(
|
||||||
-m --maintainer
|
-m --maintainer
|
||||||
|
--protocol
|
||||||
|
--switch
|
||||||
-u --unprivileged
|
-u --unprivileged
|
||||||
--universe
|
--universe
|
||||||
|
-j --jobs
|
||||||
-h --help
|
-h --help
|
||||||
)
|
)
|
||||||
_pkgctl_repo_clone_args__maintainer_opts() { :; }
|
_pkgctl_repo_clone_args__maintainer_opts() { :; }
|
||||||
_pkgctl_repo_clone_args_m_opts() { _pkgctl_repo_clone_args__maintainer_opts; }
|
_pkgctl_repo_clone_args_m_opts() { _pkgctl_repo_clone_args__maintainer_opts; }
|
||||||
|
_pkgctl_repo_clone_args__protocol_opts() { _devtools_completions_protocol; }
|
||||||
|
_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_clone_opts() { _devtools_completions_all_packages; }
|
||||||
|
|
||||||
|
|
||||||
_pkgctl_repo_configure_args=(
|
_pkgctl_repo_configure_args=(
|
||||||
|
--protocol
|
||||||
|
-j --jobs
|
||||||
-h --help
|
-h --help
|
||||||
)
|
)
|
||||||
|
_pkgctl_repo_configure_args__protocol_opts() { _devtools_completions_protocol; }
|
||||||
|
_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_configure_opts() { _filedir -d; }
|
||||||
|
|
||||||
|
|
||||||
@@ -282,6 +298,24 @@ _pkgctl_repo_create_args=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
_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=(
|
_pkgctl_repo_web_args=(
|
||||||
-h --help
|
-h --help
|
||||||
)
|
)
|
||||||
@@ -333,6 +367,9 @@ _devtools_completions_build_repo() {
|
|||||||
_devtools_completions_all_packages() {
|
_devtools_completions_all_packages() {
|
||||||
mapfile -t COMPREPLY < <(compgen -W "$(pacman -Sql)" -- "$cur")
|
mapfile -t COMPREPLY < <(compgen -W "$(pacman -Sql)" -- "$cur")
|
||||||
}
|
}
|
||||||
|
_devtools_completions_protocol() {
|
||||||
|
mapfile -t COMPREPLY < <(compgen -W "https" -- "$cur")
|
||||||
|
}
|
||||||
|
|
||||||
__devtools_complete() {
|
__devtools_complete() {
|
||||||
local service=$1
|
local service=$1
|
||||||
|
@@ -42,6 +42,7 @@ _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:'
|
||||||
@@ -94,17 +95,30 @@ _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:'
|
||||||
|
'--protocol[Clone the repository over https]:proto:(https)'
|
||||||
|
'--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=(
|
||||||
|
'--protocol[Configure remote url to use https]:proto:(https)'
|
||||||
|
'(-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 -/'
|
||||||
)
|
)
|
||||||
@@ -227,7 +241,7 @@ _pkgctl_cmds=(
|
|||||||
"pkgctl command"
|
"pkgctl command"
|
||||||
"auth[Authenticate with services like GitLab]"
|
"auth[Authenticate with services like GitLab]"
|
||||||
"build[Build packages inside a clean chroot]"
|
"build[Build packages inside a clean chroot]"
|
||||||
"db[Pacman database modification for packge update, move etc]"
|
"db[Pacman database modification for package update, move etc]"
|
||||||
"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]"
|
||||||
|
@@ -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
|
||||||
----
|
----
|
||||||
|
40
doc/man/pkgctl-auth-login.1.asciidoc
Normal file
40
doc/man/pkgctl-auth-login.1.asciidoc
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
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[]
|
32
doc/man/pkgctl-auth-status.1.asciidoc
Normal file
32
doc/man/pkgctl-auth-status.1.asciidoc
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
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[]
|
38
doc/man/pkgctl-auth.1.asciidoc
Normal file
38
doc/man/pkgctl-auth.1.asciidoc
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
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,6 +38,12 @@ 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
|
||||||
|
|
||||||
@@ -60,7 +66,9 @@ 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
|
||||||
----
|
----
|
||||||
@@ -25,9 +25,21 @@ Options
|
|||||||
*-m, --maintainer* 'NAME'::
|
*-m, --maintainer* 'NAME'::
|
||||||
Clone all packages of the named maintainer
|
Clone all packages of the named maintainer
|
||||||
|
|
||||||
|
*--protocol* 'https'::
|
||||||
|
Clone the repository over https
|
||||||
|
|
||||||
*--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
|
||||||
|
|
||||||
@@ -35,5 +47,6 @@ 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,6 +25,14 @@ read-only HTTPS otherwise.
|
|||||||
Options
|
Options
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
*--protocol* 'https'::
|
||||||
|
Configure remote url to use https
|
||||||
|
|
||||||
|
*-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
|
||||||
----
|
----
|
||||||
|
36
doc/man/pkgctl-repo-switch.1.asciidoc
Normal file
36
doc/man/pkgctl-repo-switch.1.asciidoc
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
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,6 +41,9 @@ 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
|
||||||
|
|
||||||
@@ -50,6 +53,7 @@ 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[]
|
||||||
|
@@ -33,7 +33,7 @@ pkgctl build::
|
|||||||
Build packages inside a clean chroot
|
Build packages inside a clean chroot
|
||||||
|
|
||||||
pkgctl db::
|
pkgctl db::
|
||||||
Pacman database modification for packge update, move etc
|
Pacman database modification for package update, move etc
|
||||||
|
|
||||||
pkgctl diff::
|
pkgctl diff::
|
||||||
Compare package files using different modes
|
Compare package files using different modes
|
||||||
|
46
opts.sh
46
opts.sh
@@ -1,46 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# NOTE: This requires GNU getopt
|
|
||||||
if ! ARGS=$(getopt --options vdm:D: \
|
|
||||||
--long verbose,debug,memory:,debugfile: \
|
|
||||||
--name 'pkgctl foo' -- "$@"); then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval set -- "$ARGS"
|
|
||||||
|
|
||||||
echo "${ARGS}"
|
|
||||||
|
|
||||||
while (( $# )); do
|
|
||||||
case "$1" in
|
|
||||||
-v | --verbose ) echo verbose; shift ;;
|
|
||||||
-d | --debug ) echo debug; shift ;;
|
|
||||||
-m | --memory ) echo "memory=$2"; shift 2 ;;
|
|
||||||
-D | --debugfile ) echo "debugfile=$2"; shift 2 ;;
|
|
||||||
--)
|
|
||||||
echo --
|
|
||||||
shift
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
-*)
|
|
||||||
echo "invalid argument: %s" "$1"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo STAR "$1"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
echo main
|
|
||||||
|
|
||||||
if (( ! $# )); then
|
|
||||||
echo missing positional param: version
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
version=$1
|
|
||||||
shift
|
|
||||||
|
|
||||||
echo "version $version"
|
|
||||||
echo "$@"
|
|
@@ -16,7 +16,6 @@ umask 0022
|
|||||||
working_dir=''
|
working_dir=''
|
||||||
|
|
||||||
files=()
|
files=()
|
||||||
mount_args=()
|
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [options] working-dir [systemd-nspawn arguments]"
|
echo "Usage: ${0##*/} [options] working-dir [systemd-nspawn arguments]"
|
||||||
@@ -32,6 +31,9 @@ usage() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# save all args for check_root
|
||||||
|
orig_args=("$@")
|
||||||
|
|
||||||
while getopts 'hC:M:c:f:s' arg; do
|
while getopts 'hC:M:c:f:s' arg; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
C) pac_conf="$OPTARG" ;;
|
C) pac_conf="$OPTARG" ;;
|
||||||
@@ -46,13 +48,23 @@ done
|
|||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
(( $# < 1 )) && die 'You must specify a directory.'
|
(( $# < 1 )) && die 'You must specify a directory.'
|
||||||
check_root
|
check_root "" "${BASH_SOURCE[0]}" "${orig_args[@]}"
|
||||||
|
|
||||||
working_dir=$(readlink -f "$1")
|
working_dir=$(readlink -f "$1")
|
||||||
shift 1
|
shift 1
|
||||||
|
|
||||||
[[ -z $working_dir ]] && die 'Please specify a working directory.'
|
[[ -z $working_dir ]] && die 'Please specify a working directory.'
|
||||||
|
|
||||||
|
nspawn_args=(
|
||||||
|
--quiet
|
||||||
|
--directory="$working_dir"
|
||||||
|
--setenv="PATH=/usr/local/sbin:/usr/local/bin:/usr/bin"
|
||||||
|
--register=no
|
||||||
|
--slice="devtools-$(systemd-escape "${SUDO_USER:-$USER}")"
|
||||||
|
--machine="arch-nspawn-$$"
|
||||||
|
--as-pid2
|
||||||
|
)
|
||||||
|
|
||||||
if (( ${#cache_dirs[@]} == 0 )); then
|
if (( ${#cache_dirs[@]} == 0 )); then
|
||||||
mapfile -t cache_dirs < <(pacman-conf --config "${pac_conf:-$working_dir/etc/pacman.conf}" CacheDir)
|
mapfile -t cache_dirs < <(pacman-conf --config "${pac_conf:-$working_dir/etc/pacman.conf}" CacheDir)
|
||||||
fi
|
fi
|
||||||
@@ -80,10 +92,10 @@ while read -r line; do
|
|||||||
done
|
done
|
||||||
done < <(pacman-conf --config "${pac_conf:-$working_dir/etc/pacman.conf}" --repo-list)
|
done < <(pacman-conf --config "${pac_conf:-$working_dir/etc/pacman.conf}" --repo-list)
|
||||||
|
|
||||||
mount_args+=("--bind=${cache_dirs[0]//:/\\:}")
|
nspawn_args+=(--bind="${cache_dirs[0]//:/\\:}")
|
||||||
|
|
||||||
for cache_dir in "${cache_dirs[@]:1}"; do
|
for cache_dir in "${cache_dirs[@]:1}"; do
|
||||||
mount_args+=("--bind-ro=${cache_dir//:/\\:}")
|
nspawn_args+=(--bind-ro="${cache_dir//:/\\:}")
|
||||||
done
|
done
|
||||||
|
|
||||||
# {{{ functions
|
# {{{ functions
|
||||||
@@ -126,9 +138,4 @@ else
|
|||||||
set_arch="${CARCH}"
|
set_arch="${CARCH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec ${CARCH:+setarch "$set_arch"} systemd-nspawn -q \
|
exec ${CARCH:+setarch "$set_arch"} systemd-nspawn "${nspawn_args[@]}" "$@"
|
||||||
-D "$working_dir" \
|
|
||||||
-E "PATH=/usr/local/sbin:/usr/local/bin:/usr/bin" \
|
|
||||||
--register=no --keep-unit --as-pid2 \
|
|
||||||
"${mount_args[@]}" \
|
|
||||||
"$@"
|
|
||||||
|
@@ -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
|
check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME "${BASH_SOURCE[0]}" "$@"
|
||||||
|
|
||||||
# Pass all arguments after -- right to makepkg
|
# Pass all arguments after -- right to makepkg
|
||||||
makechrootpkg_args+=("${@:$OPTIND}")
|
makechrootpkg_args+=("${@:$OPTIND}")
|
||||||
|
@@ -7,6 +7,8 @@ _DEVTOOLS_LIBRARY_DIR=${_DEVTOOLS_LIBRARY_DIR:-@pkgdatadir@}
|
|||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh
|
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/common.sh
|
||||||
# shellcheck source=src/lib/valid-tags.sh
|
# shellcheck source=src/lib/valid-tags.sh
|
||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-tags.sh
|
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-tags.sh
|
||||||
|
# shellcheck source=src/lib/util/git.sh
|
||||||
|
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/git.sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -55,8 +57,8 @@ gittag=$(get_tag_from_pkgver "$pkgver")
|
|||||||
if ! branchname=$(git symbolic-ref --short HEAD); then
|
if ! branchname=$(git symbolic-ref --short HEAD); then
|
||||||
die 'not on any branch'
|
die 'not on any branch'
|
||||||
fi
|
fi
|
||||||
if [[ "${branchname}" != main ]]; then
|
if ! is_valid_release_branch "${branchname}"; then
|
||||||
die 'must be run from the main branch'
|
die 'must be run from a valid release branch (%s)' "${VALID_RELEASE_BRANCHES[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if remote origin is setup properly
|
# Check if remote origin is setup properly
|
||||||
@@ -85,11 +87,10 @@ if git tag --verify "$gittag" &> /dev/null; then
|
|||||||
if [[ "$cwd_checksum" != "$tag_checksum" ]]; then
|
if [[ "$cwd_checksum" != "$tag_checksum" ]]; then
|
||||||
die "tagged PKGBUILD is not the same as the working dir PKGBUILD"
|
die "tagged PKGBUILD is not the same as the working dir PKGBUILD"
|
||||||
fi
|
fi
|
||||||
git push --tags --set-upstream origin main || abort
|
git push --tags --set-upstream origin "${branchname}" || abort
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
stat_busy "Releasing package"
|
msg "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 "${branchname}" || 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/git.sh
|
||||||
|
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/util/git.sh
|
||||||
|
|
||||||
source /usr/share/makepkg/util/util.sh
|
source /usr/share/makepkg/util/util.sh
|
||||||
|
|
||||||
@@ -70,8 +72,12 @@ if ! repo_spec=$(git config --local devtools.version) || [[ ${repo_spec} != "${G
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$(git symbolic-ref --short HEAD)" != main ]]; then
|
if ! branchname=$(git symbolic-ref --short HEAD); then
|
||||||
die 'must be run from the main branch'
|
die 'not on any branch'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! is_valid_release_branch "${branchname}"; then
|
||||||
|
die 'must be run from a valid release branch (%s)' "${VALID_RELEASE_BRANCHES[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source=()
|
source=()
|
||||||
@@ -95,6 +101,9 @@ case "$cmd" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [[ "${branchname}" == "unstable" ]] && [[ "$repo" != *"unstable" ]]; then
|
||||||
|
die 'Cannot release from unstable branch into non-unstable repo: %s' "${repo}"
|
||||||
|
fi
|
||||||
|
|
||||||
if (( ${#validpgpkeys[@]} != 0 )); then
|
if (( ${#validpgpkeys[@]} != 0 )); then
|
||||||
if [[ -d keys ]]; then
|
if [[ -d keys ]]; then
|
||||||
@@ -111,7 +120,7 @@ if (( ${#validpgpkeys[@]} != 0 )); then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# find files which should be under source control
|
# find files which should be under source control
|
||||||
needsversioning=()
|
needsversioning=(PKGBUILD)
|
||||||
for s in "${source[@]}"; do
|
for s in "${source[@]}"; do
|
||||||
[[ $s != *://* ]] && needsversioning+=("$s")
|
[[ $s != *://* ]] && needsversioning+=("$s")
|
||||||
done
|
done
|
||||||
@@ -129,6 +138,10 @@ done
|
|||||||
# assert that they really are controlled by git
|
# assert that they really are controlled by git
|
||||||
if (( ${#needsversioning[*]} )); then
|
if (( ${#needsversioning[*]} )); then
|
||||||
for file in "${needsversioning[@]}"; do
|
for file in "${needsversioning[@]}"; do
|
||||||
|
# skip none existing files
|
||||||
|
if [[ ! -f "${file}" ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
if ! git ls-files --error-unmatch "$file"; then
|
if ! git ls-files --error-unmatch "$file"; then
|
||||||
die "%s is not under version control" "$file"
|
die "%s is not under version control" "$file"
|
||||||
fi
|
fi
|
||||||
@@ -173,7 +186,15 @@ done
|
|||||||
# check for PKGBUILD standards
|
# check for PKGBUILD standards
|
||||||
check_pkgbuild_validity
|
check_pkgbuild_validity
|
||||||
|
|
||||||
if [[ -n $(git status --short --untracked-files=no) ]]; then
|
# auto generate .SRCINFO if present
|
||||||
|
if [[ -f .SRCINFO ]]; then
|
||||||
|
stat_busy 'Generating .SRCINFO'
|
||||||
|
makepkg --printsrcinfo > .SRCINFO
|
||||||
|
git add .SRCINFO
|
||||||
|
stat_done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n $(git status --porcelain --untracked-files=no) ]]; then
|
||||||
stat_busy 'Staging files'
|
stat_busy 'Staging files'
|
||||||
for f in $(git ls-files --modified); do
|
for f in $(git ls-files --modified); do
|
||||||
git add "$f"
|
git add "$f"
|
||||||
|
@@ -215,7 +215,8 @@ diff_pkgs() {
|
|||||||
[[ -f $oldpkg ]] || die "No such file: %s" "${oldpkg}"
|
[[ -f $oldpkg ]] || die "No such file: %s" "${oldpkg}"
|
||||||
[[ -f $newpkg ]] || die "No such file: %s" "${newpkg}"
|
[[ -f $newpkg ]] || die "No such file: %s" "${newpkg}"
|
||||||
|
|
||||||
DIFFOPTIONS+=(--label "${oldpkg}" --label "${newpkg}")
|
local -a diffoptions
|
||||||
|
diffoptions=("${DIFFOPTIONS[@]}" --label "${oldpkg}" --label "${newpkg}")
|
||||||
|
|
||||||
if (( TARLIST )); then
|
if (( TARLIST )); then
|
||||||
tar_list "$oldpkg" > "$TMPDIR/old"
|
tar_list "$oldpkg" > "$TMPDIR/old"
|
||||||
@@ -236,7 +237,7 @@ diff_pkgs() {
|
|||||||
# 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
|
||||||
|
|
||||||
# Print a header for side-by-side view as it lacks labels
|
# Print a header for side-by-side view as it lacks labels
|
||||||
@@ -244,7 +245,7 @@ diff_pkgs() {
|
|||||||
printf -- "--- %s\n+++ %s\n" "${oldpkg}" "${newpkg}"
|
printf -- "--- %s\n+++ %s\n" "${oldpkg}" "${newpkg}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
diff "${DIFFOPTIONS[@]}" "$TMPDIR/old" "$TMPDIR/new"
|
diff "${diffoptions[@]}" "$TMPDIR/old" "$TMPDIR/new"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( DIFFOSCOPE )); then
|
if (( DIFFOSCOPE )); then
|
||||||
|
@@ -81,15 +81,25 @@ 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,18 +4,19 @@
|
|||||||
:
|
:
|
||||||
|
|
||||||
# shellcheck disable=2034
|
# shellcheck disable=2034
|
||||||
CHROOT_VERSION='v4'
|
CHROOT_VERSION='v5'
|
||||||
|
|
||||||
##
|
##
|
||||||
# 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,9 +23,13 @@ pkgctl_auth_login_usage() {
|
|||||||
cat <<- _EOF_
|
cat <<- _EOF_
|
||||||
Usage: ${COMMAND} [OPTIONS]
|
Usage: ${COMMAND} [OPTIONS]
|
||||||
|
|
||||||
Authenticate with the GitLab instance.
|
Interactively 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
|
||||||
@@ -59,13 +63,17 @@ pkgctl_auth_login() {
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
personal_access_token_url="https://${GITLAB_HOST}/-/profile/personal_access_tokens"
|
personal_access_token_url="https://${GITLAB_HOST}/-/profile/personal_access_tokens?name=pkgctl+token&scopes=api,write_repository"
|
||||||
|
|
||||||
cat <<- _EOF_
|
cat <<- _EOF_
|
||||||
Logging into ${BOLD}${GITLAB_HOST}${ALL_OFF}
|
Logging into ${BOLD}${GITLAB_HOST}${ALL_OFF}
|
||||||
|
|
||||||
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,6 +25,7 @@ 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() {
|
||||||
@@ -47,6 +48,7 @@ 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
|
||||||
@@ -123,12 +125,11 @@ pkgctl_build() {
|
|||||||
local RELEASE_OPTIONS=()
|
local RELEASE_OPTIONS=()
|
||||||
local MAKEPKG_OPTIONS=()
|
local MAKEPKG_OPTIONS=()
|
||||||
|
|
||||||
local PTS
|
local WORKER=
|
||||||
PTS="$(tty | sed 's|/dev/pts/||')"
|
local WORKER_SLOT=
|
||||||
local WORKER="${USER}-${PTS}"
|
|
||||||
|
|
||||||
# variables
|
# variables
|
||||||
local path pkgbase pkgrepo source
|
local loop_arch path pkgbase pkgrepo source
|
||||||
|
|
||||||
while (( $# )); do
|
while (( $# )); do
|
||||||
case $1 in
|
case $1 in
|
||||||
@@ -224,6 +225,11 @@ 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
|
||||||
@@ -238,6 +244,16 @@ 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
|
||||||
@@ -248,6 +264,12 @@ 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
|
||||||
@@ -276,15 +298,10 @@ pkgctl_build() {
|
|||||||
die 'failed to get pacman repo'
|
die 'failed to get pacman repo'
|
||||||
fi
|
fi
|
||||||
if [[ -z "${pkgrepo}" ]]; then
|
if [[ -z "${pkgrepo}" ]]; then
|
||||||
die 'unknown repo, please specify --repo for new packages'
|
die 'unknown repo, specify --repo for packages not currently in any official repo'
|
||||||
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"
|
||||||
@@ -301,17 +318,24 @@ pkgctl_build() {
|
|||||||
if in_array any "${arch[@]}"; then
|
if in_array any "${arch[@]}"; then
|
||||||
BUILD_ARCH=("${_arch[0]}")
|
BUILD_ARCH=("${_arch[0]}")
|
||||||
else
|
else
|
||||||
BUILD_ARCH+=("${arch[@]}")
|
for loop_arch in "${arch[@]}"; do
|
||||||
|
if in_array "${loop_arch}" "${_arch[@]}"; then
|
||||||
|
BUILD_ARCH+=("$loop_arch")
|
||||||
|
else
|
||||||
|
warning 'invalid architecture, not building for: %s' "${loop_arch}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 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
|
||||||
# try to figure out of pkgrel has been changed
|
# try to figure out if pkgrel has been changed
|
||||||
if ! old_pkgrel=$(git_diff_tree HEAD PKGBUILD | grep --perl-regexp --only-matching --max-count=1 '^-pkgrel=\K\w+'); then
|
if ! old_pkgrel=$(git_diff_tree HEAD PKGBUILD | grep --perl-regexp --only-matching --max-count=1 '^-pkgrel=\K\w+'); then
|
||||||
old_pkgrel=${pkgrel}
|
old_pkgrel=${pkgrel}
|
||||||
fi
|
fi
|
||||||
@@ -377,18 +401,8 @@ 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 "${offload_tool}" -- "${BUILD_OPTIONS[@]}" -- "${MAKECHROOT_OPTIONS[@]}" -l "${WORKER}" -- "${MAKEPKG_OPTIONS[@]}"
|
offload-build --repo "${pkgrepo}" -- "${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
|
||||||
|
@@ -22,15 +22,17 @@ 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=0
|
export GIT_REPO_SPEC_VERSION=1
|
||||||
export GIT_PACKAGING_NAMESPACE=bot-test/packages
|
export GIT_PACKAGING_NAMESPACE=archlinux/packaging/packages
|
||||||
export GIT_PACKAGING_NAMESPACE_ID=11233
|
export GIT_PACKAGING_NAMESPACE_ID=11323
|
||||||
export GIT_PACKAGING_URL_SSH="ssh://git@${GITLAB_HOST}:222/${GIT_PACKAGING_NAMESPACE}"
|
export GIT_PACKAGING_URL_SSH="git@${GITLAB_HOST}:${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.sandbox.archlinux.org
|
export PACKAGING_REPO_RELEASE_HOST=repos.archlinux.org
|
||||||
|
|
||||||
|
export VALID_RELEASE_BRANCHES=(main unstable)
|
||||||
|
|
||||||
# check if messages are to be printed using color
|
# check if messages are to be printed using color
|
||||||
if [[ -t 2 && "$TERM" != dumb ]]; then
|
if [[ -t 2 && "$TERM" != dumb ]] || [[ ${DEVTOOLS_COLOR} == always ]]; then
|
||||||
colorize
|
colorize
|
||||||
else
|
else
|
||||||
# shellcheck disable=2034
|
# shellcheck disable=2034
|
||||||
|
@@ -34,8 +34,12 @@ load_devtools_config() {
|
|||||||
|
|
||||||
save_devtools_config() {
|
save_devtools_config() {
|
||||||
# temporary permission fixup
|
# temporary permission fixup
|
||||||
chmod 700 "${XDG_DEVTOOLS_DIR}"
|
if [[ -d "${XDG_DEVTOOLS_DIR}" ]]; then
|
||||||
chmod 600 "${XDG_DEVTOOLS_GITLAB_CONFIG}"
|
chmod 700 "${XDG_DEVTOOLS_DIR}"
|
||||||
|
fi
|
||||||
|
if [[ -f "${XDG_DEVTOOLS_GITLAB_CONFIG}" ]]; then
|
||||||
|
chmod 600 "${XDG_DEVTOOLS_GITLAB_CONFIG}"
|
||||||
|
fi
|
||||||
(
|
(
|
||||||
umask 0077
|
umask 0077
|
||||||
mkdir -p "${XDG_DEVTOOLS_DIR}"
|
mkdir -p "${XDG_DEVTOOLS_DIR}"
|
||||||
|
@@ -15,7 +15,7 @@ pkgctl_db_usage() {
|
|||||||
cat <<- _EOF_
|
cat <<- _EOF_
|
||||||
Usage: ${COMMAND} [COMMAND] [OPTIONS]
|
Usage: ${COMMAND} [COMMAND] [OPTIONS]
|
||||||
|
|
||||||
Pacman database modification for packge update, move etc
|
Pacman database modification for package update, move etc
|
||||||
|
|
||||||
COMMANDS
|
COMMANDS
|
||||||
move Move packages between pacman repositories
|
move Move packages between pacman repositories
|
||||||
|
@@ -25,7 +25,7 @@ pkgctl_db_remove_usage() {
|
|||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
$ ${COMMAND} core-testing libfoo libbar
|
$ ${COMMAND} core-testing libfoo libbar
|
||||||
$ ${COMMAND} core --arch x86_64 libyay
|
$ ${COMMAND} --arch x86_64 core libyay
|
||||||
_EOF_
|
_EOF_
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -145,11 +145,6 @@ 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,6 +30,7 @@ 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
|
||||||
@@ -40,6 +41,7 @@ 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_
|
||||||
}
|
}
|
||||||
@@ -81,6 +83,14 @@ 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
|
||||||
|
@@ -26,18 +26,22 @@ pkgctl_repo_clone_usage() {
|
|||||||
Clone Git packaging repositories from the canonical namespace.
|
Clone Git packaging repositories from the canonical namespace.
|
||||||
|
|
||||||
The configure command is subsequently invoked to synchronize the distro
|
The configure command is subsequently invoked to synchronize the distro
|
||||||
specs and makepkg.conf settings. The unprivileged option can be used
|
specs and makepkg.conf settings. The protocol option can be used
|
||||||
for cloning packaging repositories without SSH access using read-only
|
for cloning packaging repositories without SSH access using read-only
|
||||||
HTTPS.
|
HTTPS.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
-m, --maintainer=NAME Clone all packages of the named maintainer
|
-m, --maintainer=NAME Clone all packages of the named maintainer
|
||||||
|
--protocol https Clone the repository over https
|
||||||
|
--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_
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,10 +55,13 @@ 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 pkgbases
|
local jobs=
|
||||||
|
jobs=$(nproc)
|
||||||
|
|
||||||
# variables
|
# variables
|
||||||
|
local command=${_DEVTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
|
||||||
local project_path
|
local project_path
|
||||||
|
|
||||||
while (( $# )); do
|
while (( $# )); do
|
||||||
@@ -63,11 +70,21 @@ pkgctl_repo_clone() {
|
|||||||
pkgctl_repo_clone_usage
|
pkgctl_repo_clone_usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
-u|--unprivileged)
|
--protocol=https)
|
||||||
GIT_REPO_BASE_URL=${GIT_PACKAGING_URL_HTTPS}
|
GIT_REPO_BASE_URL=${GIT_PACKAGING_URL_HTTPS}
|
||||||
CONFIGURE_OPTIONS+=("$1")
|
CONFIGURE_OPTIONS+=("$1")
|
||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
--protocol)
|
||||||
|
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
||||||
|
if [[ $2 == https ]]; then
|
||||||
|
GIT_REPO_BASE_URL=${GIT_PACKAGING_URL_HTTPS}
|
||||||
|
else
|
||||||
|
die "unsupported protocol: %s" "$2"
|
||||||
|
fi
|
||||||
|
CONFIGURE_OPTIONS+=("$1" "$2")
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
-m|--maintainer)
|
-m|--maintainer)
|
||||||
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
||||||
MAINTAINER="$2"
|
MAINTAINER="$2"
|
||||||
@@ -77,10 +94,28 @@ 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
|
||||||
@@ -126,16 +161,39 @@ 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"
|
||||||
git clone --origin origin "${remote_url}" "${pkgbase}"
|
if ! git clone --origin origin "${remote_url}" "${pkgbase}"; then
|
||||||
|
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,10 +33,12 @@ pkgctl_repo_configure_usage() {
|
|||||||
read-only HTTPS otherwise.
|
read-only HTTPS otherwise.
|
||||||
|
|
||||||
OPTIONS
|
OPTIONS
|
||||||
|
--protocol https Configure remote url to use https
|
||||||
|
-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} configure *
|
$ ${COMMAND} *
|
||||||
_EOF_
|
_EOF_
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,9 +95,13 @@ 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 proto_force=0
|
||||||
|
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
|
||||||
|
|
||||||
@@ -105,6 +111,24 @@ pkgctl_repo_configure() {
|
|||||||
pkgctl_repo_configure_usage
|
pkgctl_repo_configure_usage
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
--protocol=https)
|
||||||
|
proto_force=1
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--protocol)
|
||||||
|
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
||||||
|
if [[ $2 == https ]]; then
|
||||||
|
proto_force=1
|
||||||
|
else
|
||||||
|
die "unsupported protocol: %s" "$2"
|
||||||
|
fi
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
|
-j|--jobs)
|
||||||
|
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
||||||
|
jobs=$2
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
@@ -143,8 +167,10 @@ pkgctl_repo_configure() {
|
|||||||
fi
|
fi
|
||||||
if is_packager_email_official "${packager_email}"; then
|
if is_packager_email_official "${packager_email}"; then
|
||||||
official=1
|
official=1
|
||||||
proto=ssh
|
if (( ! proto_force )); then
|
||||||
GIT_REPO_BASE_URL=${GIT_PACKAGING_URL_SSH}
|
proto=ssh
|
||||||
|
GIT_REPO_BASE_URL=${GIT_PACKAGING_URL_SSH}
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -157,10 +183,21 @@ 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
|
||||||
error "No such directory: ${path}"
|
die "No such directory: ${path}"
|
||||||
continue
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pkgbase=$(basename "${realpath}")
|
pkgbase=$(basename "${realpath}")
|
||||||
@@ -168,8 +205,7 @@ pkgctl_repo_configure() {
|
|||||||
msg "Configuring ${pkgbase}"
|
msg "Configuring ${pkgbase}"
|
||||||
|
|
||||||
if [[ ! -d "${path}/.git" ]]; then
|
if [[ ! -d "${path}/.git" ]]; then
|
||||||
error "Not a Git repository: ${path}"
|
die "Not a Git repository: ${path}"
|
||||||
continue
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd "${path}" >/dev/null
|
pushd "${path}" >/dev/null
|
||||||
@@ -181,7 +217,7 @@ pkgctl_repo_configure() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# move the master branch to main
|
# move the master branch to main
|
||||||
if [[ $(git symbolic-ref --short HEAD) == master ]]; then
|
if [[ $(git symbolic-ref --quiet --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
|
||||||
|
119
src/lib/repo/switch.sh
Normal file
119
src/lib/repo/switch.sh
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
#!/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
|
||||||
|
}
|
@@ -26,7 +26,7 @@ pkgctl_repo_web_usage() {
|
|||||||
-h, --help Show this help text
|
-h, --help Show this help text
|
||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
$ ${COMMAND} web linux
|
$ ${COMMAND} linux
|
||||||
_EOF_
|
_EOF_
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,6 +78,7 @@ pkgctl_repo_web() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
for pkgbase in "${pkgbases[@]}"; do
|
for pkgbase in "${pkgbases[@]}"; do
|
||||||
xdg-open "${GIT_PACKAGING_URL_HTTPS}/${pkgbase}"
|
path=$(gitlab_project_name_to_path "${pkgbase}")
|
||||||
|
xdg-open "${GIT_PACKAGING_URL_HTTPS}/${path}"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@@ -22,3 +22,8 @@ git_diff_tree() {
|
|||||||
"${commit}" \
|
"${commit}" \
|
||||||
-- "${path}"
|
-- "${path}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
is_valid_release_branch() {
|
||||||
|
local branch=$1
|
||||||
|
in_array "${branch}" "${VALID_RELEASE_BRANCHES[@]}"
|
||||||
|
}
|
||||||
|
@@ -14,7 +14,8 @@ _repos=(
|
|||||||
|
|
||||||
# shellcheck disable=2034
|
# shellcheck disable=2034
|
||||||
_build_repos=(
|
_build_repos=(
|
||||||
extra staging testing
|
core-staging core-testing
|
||||||
|
extra extra-staging extra-testing
|
||||||
multilib multilib-staging multilib-testing
|
multilib multilib-staging multilib-testing
|
||||||
gnome-unstable
|
gnome-unstable
|
||||||
kde-unstable
|
kde-unstable
|
||||||
|
@@ -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
|
check_root SOURCE_DATE_EPOCH,BUILDTOOL,BUILDTOOLVER,GNUPGHOME,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER "${BASH_SOURCE[0]}" "$@"
|
||||||
|
|
||||||
# Canonicalize chrootdir, getting rid of trailing /
|
# Canonicalize chrootdir, getting rid of trailing /
|
||||||
chrootdir=$(readlink -e "$passeddir")
|
chrootdir=$(readlink -e "$passeddir")
|
||||||
|
@@ -125,6 +125,9 @@ OPTIONS
|
|||||||
__EOF__
|
__EOF__
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# save all args for check_root
|
||||||
|
orig_args=("$@")
|
||||||
|
|
||||||
while getopts 'dM:c:l:h' arg; do
|
while getopts 'dM:c:l:h' arg; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
d) diffoscope=1 ;;
|
d) diffoscope=1 ;;
|
||||||
@@ -137,7 +140,7 @@ while getopts 'dM:c:l:h' arg; do
|
|||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
check_root
|
check_root "" "${BASH_SOURCE[0]}" "${orig_args[@]}"
|
||||||
|
|
||||||
[[ -f PKGBUILD ]] || { error "No PKGBUILD in current directory."; exit 1; }
|
[[ -f PKGBUILD ]] || { error "No PKGBUILD in current directory."; exit 1; }
|
||||||
|
|
||||||
|
@@ -32,6 +32,9 @@ usage() {
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# save all args for check_root
|
||||||
|
orig_args=("$@")
|
||||||
|
|
||||||
while getopts 'hUC:M:c:f:s' arg; do
|
while getopts 'hUC:M:c:f:s' arg; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
U) umode=U ;;
|
U) umode=U ;;
|
||||||
@@ -52,7 +55,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
|
check_root "" "${BASH_SOURCE[0]}" "${orig_args[@]}"
|
||||||
|
|
||||||
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-'"${arch}"'.conf" &&
|
makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${arch}"'.conf" &&
|
||||||
if [[ -f /usr/share/devtools/makepkg-'"${repo}"'-'"${arch}"'.conf ]]; then
|
if [[ -f /usr/share/devtools/makepkg.conf.d/'"${repo}"'-'"${arch}"'.conf ]]; then
|
||||||
makepkg_config="/usr/share/devtools/makepkg-'"${repo}"'-'"${arch}"'.conf"
|
makepkg_config="/usr/share/devtools/makepkg.conf.d/'"${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"
|
||||||
|
@@ -21,7 +21,7 @@ usage() {
|
|||||||
COMMANDS
|
COMMANDS
|
||||||
auth Authenticate with services like GitLab
|
auth Authenticate with services like GitLab
|
||||||
build Build packages inside a clean chroot
|
build Build packages inside a clean chroot
|
||||||
db Pacman database modification for packge update, move etc
|
db Pacman database modification for package update, move etc
|
||||||
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
|
||||||
@@ -89,7 +89,7 @@ while (( $# )); do
|
|||||||
release)
|
release)
|
||||||
_DEVTOOLS_COMMAND+=" $1"
|
_DEVTOOLS_COMMAND+=" $1"
|
||||||
shift
|
shift
|
||||||
# shellcheck source=src/lib/repo.sh
|
# shellcheck source=src/lib/release.sh
|
||||||
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/release.sh
|
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/release.sh
|
||||||
pkgctl_release "$@"
|
pkgctl_release "$@"
|
||||||
exit 0
|
exit 0
|
||||||
|
Reference in New Issue
Block a user