forked from artix/artools
Compare commits
15 Commits
fa245021bf
...
artools/0.
Author | SHA1 | Date | |
---|---|---|---|
b22b6e24e0
|
|||
0a5910366e
|
|||
77e508272c
|
|||
67b0c0f3ee | |||
855a2add01 | |||
52e51b2b49 | |||
52617ccb58 | |||
5165e7d9b2 | |||
335499b83e | |||
f7a597f9a3 | |||
7b89b421d3 | |||
70e7fbaf14
|
|||
caf3a3a24e
|
|||
74a9d0296b | |||
c40718c027 |
1
Makefile
1
Makefile
@@ -116,7 +116,6 @@ install_pkg: binprogs_pkg
|
|||||||
ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
|
ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
|
||||||
|
|
||||||
install -Dm0644 $(BUILDDIR)/contrib/completion/bash/artixpkg $(DESTDIR)$(PREFIX)/share/bash-completion/completions/artixpkg
|
install -Dm0644 $(BUILDDIR)/contrib/completion/bash/artixpkg $(DESTDIR)$(PREFIX)/share/bash-completion/completions/artixpkg
|
||||||
install -Dm0644 $(BUILDDIR)/contrib/completion/zsh/_artixpkg $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_artixpkg
|
|
||||||
|
|
||||||
install_iso: binprogs_iso
|
install_iso: binprogs_iso
|
||||||
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)
|
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)
|
||||||
|
@@ -43,16 +43,17 @@ CHOST="x86_64-pc-linux-gnu"
|
|||||||
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
|
CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
|
||||||
-Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
|
-Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
|
||||||
-fstack-clash-protection -fcf-protection"
|
-fstack-clash-protection -fcf-protection"
|
||||||
# -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
|
|
||||||
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
|
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
|
||||||
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
|
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
|
||||||
-Wl,-z,pack-relative-relocs"
|
-Wl,-z,pack-relative-relocs"
|
||||||
LTOFLAGS="-flto=auto"
|
LTOFLAGS="-flto=auto"
|
||||||
|
RUSTFLAGS=""
|
||||||
#-- Make Flags: change this for DistCC/SMP systems
|
#-- Make Flags: change this for DistCC/SMP systems
|
||||||
#MAKEFLAGS="-j2"
|
#MAKEFLAGS="-j2"
|
||||||
#-- Debugging flags
|
#-- Debugging flags
|
||||||
DEBUG_CFLAGS="-g"
|
DEBUG_CFLAGS="-g"
|
||||||
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
|
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
|
||||||
|
DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# BUILD ENVIRONMENT
|
# BUILD ENVIRONMENT
|
||||||
@@ -81,7 +82,7 @@ BUILDENV=(!distcc color !ccache check !sign)
|
|||||||
# These are default values for the options=() settings
|
# These are default values for the options=() settings
|
||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto !autodeps)
|
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
|
||||||
# A negated option will do the opposite of the comments below.
|
# A negated option will do the opposite of the comments below.
|
||||||
#
|
#
|
||||||
#-- strip: Strip symbols from binaries/libraries
|
#-- strip: Strip symbols from binaries/libraries
|
||||||
@@ -93,7 +94,6 @@ BUILDENV=(!distcc color !ccache check !sign)
|
|||||||
#-- purge: Remove files specified by PURGE_TARGETS
|
#-- purge: Remove files specified by PURGE_TARGETS
|
||||||
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
||||||
#-- lto: Add compile flags for building with link time optimization
|
#-- lto: Add compile flags for building with link time optimization
|
||||||
#-- autodeps: Automatically add depends/provides
|
|
||||||
#
|
#
|
||||||
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)
|
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)
|
||||||
|
|
||||||
@@ -113,8 +113,6 @@ DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
|
|||||||
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
|
||||||
#-- Directory to store source code in for debug packages
|
#-- Directory to store source code in for debug packages
|
||||||
DBGSRCDIR="/usr/src/debug"
|
DBGSRCDIR="/usr/src/debug"
|
||||||
#-- Prefix and directories for library autodeps
|
|
||||||
LIB_DIRS=('lib:usr/lib' 'lib32:usr/lib32')
|
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# PACKAGE OUTPUT
|
# PACKAGE OUTPUT
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -35,8 +35,6 @@ Color
|
|||||||
CheckSpace
|
CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 10
|
ParallelDownloads = 10
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -35,8 +35,6 @@ Color
|
|||||||
CheckSpace
|
CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 10
|
ParallelDownloads = 10
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -35,8 +35,6 @@ Color
|
|||||||
CheckSpace
|
CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 10
|
ParallelDownloads = 10
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -36,8 +36,6 @@ NoProgressBar
|
|||||||
#CheckSpace
|
#CheckSpace
|
||||||
VerbosePkgLists
|
VerbosePkgLists
|
||||||
ParallelDownloads = 5
|
ParallelDownloads = 5
|
||||||
DownloadUser = alpm
|
|
||||||
#DisableSandbox
|
|
||||||
|
|
||||||
# By default, pacman accepts packages signed by keys that its local keyring
|
# 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.
|
# trusts (see pacman-key and its man page), as well as unsigned packages.
|
||||||
|
@@ -8,14 +8,6 @@ _artixpkg_pkgbase() {
|
|||||||
ls -1 "${TREE_DIR_ARTIX}" | tr '\n' ' '
|
ls -1 "${TREE_DIR_ARTIX}" | tr '\n' ' '
|
||||||
}
|
}
|
||||||
|
|
||||||
_artixpkg_remotepkgbase() {
|
|
||||||
curl -s "https://checkupdates.artixlinux.org/api/1.0/packages?startswith=$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
_artixpkg_maintainers() {
|
|
||||||
curl -s "https://checkupdates.artixlinux.org/api/1.0/maintainers"
|
|
||||||
}
|
|
||||||
|
|
||||||
_artixpkg_completion() {
|
_artixpkg_completion() {
|
||||||
local cur prev comps comps_all repos autorepos teams agents cwords comp_cword_exflag
|
local cur prev comps comps_all repos autorepos teams agents cwords comp_cword_exflag
|
||||||
source "${LIBDIR}"/pkg/db/db.sh 2>/dev/null
|
source "${LIBDIR}"/pkg/db/db.sh 2>/dev/null
|
||||||
@@ -155,15 +147,12 @@ _artixpkg_completion() {
|
|||||||
"-t"|"--team")
|
"-t"|"--team")
|
||||||
COMPREPLY=($(compgen -W "$teams" -- ${cur}))
|
COMPREPLY=($(compgen -W "$teams" -- ${cur}))
|
||||||
;;
|
;;
|
||||||
"-m"|"--maintainer")
|
"-m"|"--maintainer"|"-s"|"--search"|"-t"|"--team"|"-j"|"--jobs")
|
||||||
COMPREPLY=($(compgen -W "$(_artixpkg_maintainers)" -- ${cur}))
|
|
||||||
;;
|
|
||||||
"-s"|"--search"|"-j"|"--jobs")
|
|
||||||
# these flags expect a parameter
|
# these flags expect a parameter
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
COMPREPLY=($(compgen -W "-m --maintainer --protocol -s --search -t --team -a --agent -j --jobs --all -h --help $(_artixpkg_remotepkgbase ${cur})" -- ${cur}))
|
COMPREPLY=($(compgen -W "-m --maintainer --protocol -s --search -t --team -a --agent -j --jobs --all -h --help" -- ${cur}))
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
@@ -196,10 +185,7 @@ _artixpkg_completion() {
|
|||||||
;;
|
;;
|
||||||
"artixpkg git pull"*)
|
"artixpkg git pull"*)
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
"-m"|"--maintainer")
|
"-t"|"--topic"|"-m"|"--maintainer"|"-j"|"--jobs")
|
||||||
COMPREPLY=($(compgen -W "$(_artixpkg_maintainers)" -- ${cur}))
|
|
||||||
;;
|
|
||||||
"-t"|"--topic"|"-j"|"--jobs")
|
|
||||||
# these flags expect a parameter
|
# these flags expect a parameter
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
;;
|
;;
|
||||||
@@ -217,10 +203,7 @@ _artixpkg_completion() {
|
|||||||
;;
|
;;
|
||||||
"artixpkg git push"*)
|
"artixpkg git push"*)
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
"-m"|"--maintainer")
|
"-m"|"--maintainer"|"-t"|"--topic"|"-j"|"--jobs")
|
||||||
COMPREPLY=($(compgen -W "$(_artixpkg_maintainers)" -- ${cur}))
|
|
||||||
;;
|
|
||||||
"-t"|"--topic"|"-j"|"--jobs")
|
|
||||||
# this flag expects a parameter
|
# this flag expects a parameter
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
;;
|
;;
|
||||||
@@ -251,10 +234,7 @@ _artixpkg_completion() {
|
|||||||
;;
|
;;
|
||||||
"artixpkg admin query"*)
|
"artixpkg admin query"*)
|
||||||
case "${prev}" in
|
case "${prev}" in
|
||||||
"-m"|"--maintainer")
|
"-m"|"--maintainer"|"-t"|"--topic")
|
||||||
COMPREPLY=($(compgen -W "$(_artixpkg_maintainers)" -- ${cur}))
|
|
||||||
;;
|
|
||||||
"-t"|"--topic")
|
|
||||||
# this flag expects a parameter
|
# this flag expects a parameter
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
;;
|
;;
|
||||||
|
@@ -1,205 +0,0 @@
|
|||||||
#compdef artixpkg
|
|
||||||
|
|
||||||
local -a addcmd admincmd cicmd clonecmd configcmd createcmd gitcmd importcmd \
|
|
||||||
initialcmd maintainercmd movecmd querycmd pullcmd pushcmd removecmd \
|
|
||||||
repocmd showcmd teamcmd topiccmd transfercmd versioncmd
|
|
||||||
_regex_words maintainer '' \
|
|
||||||
'-a' \
|
|
||||||
'--adopt' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-o' \
|
|
||||||
'--orphan'
|
|
||||||
maintainercmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words query '' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-m' \
|
|
||||||
'-t'
|
|
||||||
querycmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words team '' \
|
|
||||||
'-a' \
|
|
||||||
'--add' \
|
|
||||||
'-c' \
|
|
||||||
'--check' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-r' \
|
|
||||||
'--remove'
|
|
||||||
teamcmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words topic '' \
|
|
||||||
'-a' \
|
|
||||||
'--add' \
|
|
||||||
'-d' \
|
|
||||||
'--delete' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-j' \
|
|
||||||
'--jobs' \
|
|
||||||
'-r' \
|
|
||||||
'--remove'
|
|
||||||
topiccmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words transfer '' \
|
|
||||||
'-h' \
|
|
||||||
'--help'
|
|
||||||
transfercmd=("$reply[@]")
|
|
||||||
|
|
||||||
|
|
||||||
_regex_words admin '' \
|
|
||||||
'-h:Help text' \
|
|
||||||
'--help:Help text' \
|
|
||||||
'maintainer:Manage repo maintainer:$maintainercmd' \
|
|
||||||
'query:Query maintainers and topics:$querycmd' \
|
|
||||||
'team:Manage repo team:$teamcmd' \
|
|
||||||
'topic:Manage topics:$topiccmd' \
|
|
||||||
'transfer:Transfer obsolete repositories to landfill:$transfercmd'
|
|
||||||
admincmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words ci '' \
|
|
||||||
'-a' \
|
|
||||||
'--agent' \
|
|
||||||
'-h' \
|
|
||||||
'--help'
|
|
||||||
cicmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words clone '' \
|
|
||||||
'-a' \
|
|
||||||
'--agent' \
|
|
||||||
'--all' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-j' \
|
|
||||||
'--jobs' \
|
|
||||||
'-m' \
|
|
||||||
'--maintainer' \
|
|
||||||
'--protocol' \
|
|
||||||
'-s' \
|
|
||||||
'--search' \
|
|
||||||
'-t' \
|
|
||||||
'--team'
|
|
||||||
clonecmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words config '' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-j' \
|
|
||||||
'--jobs' \
|
|
||||||
'--protocol'
|
|
||||||
configcmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words create '' \
|
|
||||||
'-a' \
|
|
||||||
'--agent' \
|
|
||||||
'-c' \
|
|
||||||
'--create' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-t' \
|
|
||||||
'--team'
|
|
||||||
createcmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words pull '' \
|
|
||||||
'--all' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-j' \
|
|
||||||
'--jobs' \
|
|
||||||
'-m' \
|
|
||||||
'--maintainer' \
|
|
||||||
'-t' \
|
|
||||||
'--topic'
|
|
||||||
pullcmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words push '' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-j' \
|
|
||||||
'--jobs' \
|
|
||||||
'-m' \
|
|
||||||
'--maintainer' \
|
|
||||||
'-t' \
|
|
||||||
'--topic'
|
|
||||||
pushcmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words git '' \
|
|
||||||
'ci:Configure CI agent:$cicmd' \
|
|
||||||
'clone:Clone a package:$clonecmd' \
|
|
||||||
'config:Configure a clone:$configcmd' \
|
|
||||||
'create:Create a new gitea package repository:$createcmd' \
|
|
||||||
'-h:Help text' \
|
|
||||||
'--help:Help text' \
|
|
||||||
'pull:Pull a package repository:$pullcmd' \
|
|
||||||
'push:Push a package repository:$pushcmd'
|
|
||||||
gitcmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words add '' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-n' \
|
|
||||||
'--nocheck' \
|
|
||||||
'-p' \
|
|
||||||
'--push' \
|
|
||||||
'-r' \
|
|
||||||
'--rebuild'
|
|
||||||
addcmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words import '' \
|
|
||||||
'--del' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'--tag'
|
|
||||||
importcmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words move '' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-p' \
|
|
||||||
'--push'
|
|
||||||
movecmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words remove '' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-p' \
|
|
||||||
'--push'
|
|
||||||
removecmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words show '' \
|
|
||||||
'-b' \
|
|
||||||
'--base' \
|
|
||||||
'-h' \
|
|
||||||
'--help' \
|
|
||||||
'-p' \
|
|
||||||
'--pkgs'
|
|
||||||
showcmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words repo '' \
|
|
||||||
'add:Add pkgbase to repo:$addcmd' \
|
|
||||||
'-h:Help text' \
|
|
||||||
'--help:Help text' \
|
|
||||||
'import:Import latest tag from arch upstream:$importcmd' \
|
|
||||||
'move:Move pkgbase between repos:$movecmd' \
|
|
||||||
'remove:Remove pkgbase from repo:$removecmd' \
|
|
||||||
'show:Show pkgbase repo db:$showcmd'
|
|
||||||
repocmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words version '' \
|
|
||||||
'-h' \
|
|
||||||
'--help'
|
|
||||||
versioncmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_words initial '' \
|
|
||||||
'admin:Manage topics:$admincmd' \
|
|
||||||
'git:Manage git:$gitcmd' \
|
|
||||||
'-h:Help text' \
|
|
||||||
'--help:Help text' \
|
|
||||||
'repo:Pacman database modification:$repocmd' \
|
|
||||||
'version:Show artixpkg version:$versioncmd'
|
|
||||||
initialcmd=("$reply[@]")
|
|
||||||
|
|
||||||
_regex_arguments _artixpkg /$'[^\0]##\0'/ "${initialcmd[@]}"
|
|
||||||
_artixpkg "$@"
|
|
@@ -5,6 +5,8 @@
|
|||||||
[[ -z ${ARTOOLS_INCLUDE_ADMIN_MAINTAINER_SH:-} ]] || return 0
|
[[ -z ${ARTOOLS_INCLUDE_ADMIN_MAINTAINER_SH:-} ]] || return 0
|
||||||
ARTOOLS_INCLUDE_ADMIN_MAINTAINER_SH=1
|
ARTOOLS_INCLUDE_ADMIN_MAINTAINER_SH=1
|
||||||
|
|
||||||
|
# shellcheck source=src/lib/pkg/packager.sh
|
||||||
|
source "${LIBDIR}"/pkg/packager.sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -79,9 +81,7 @@ artixpkg_admin_maintainer() {
|
|||||||
|
|
||||||
pkgbases+=("$@")
|
pkgbases+=("$@")
|
||||||
|
|
||||||
# shellcheck source=src/lib/pkg/packager.sh
|
load_makepkg_config
|
||||||
source "${LIBDIR}"/pkg/packager.sh
|
|
||||||
|
|
||||||
if [[ -n ${PACKAGER} ]]; then
|
if [[ -n ${PACKAGER} ]]; then
|
||||||
if ! packager_name=$(get_packager_name "${PACKAGER}") || \
|
if ! packager_name=$(get_packager_name "${PACKAGER}") || \
|
||||||
! packager_email=$(get_packager_email "${PACKAGER}"); then
|
! packager_email=$(get_packager_email "${PACKAGER}"); then
|
||||||
@@ -90,11 +90,9 @@ artixpkg_admin_maintainer() {
|
|||||||
if ! is_packager_name_valid "${packager_name}"; then
|
if ! is_packager_name_valid "${packager_name}"; then
|
||||||
die "invalid PACKAGER '${PACKAGER}' in makepkg.conf"
|
die "invalid PACKAGER '${PACKAGER}' in makepkg.conf"
|
||||||
fi
|
fi
|
||||||
if is_packager_email_official "${packager_email}"; then
|
|
||||||
maintainer="maintainer-${packager_name}"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
maintainer="maintainer-${packager_name}"
|
||||||
|
|
||||||
if [[ -n ${GIT_TOKEN} ]]; then
|
if [[ -n ${GIT_TOKEN} ]]; then
|
||||||
|
|
||||||
|
@@ -33,7 +33,6 @@ artixpkg_git_ci() {
|
|||||||
|
|
||||||
local AGENT=${AGENTS[0]}
|
local AGENT=${AGENTS[0]}
|
||||||
local SWITCH=0
|
local SWITCH=0
|
||||||
local CREATED=0
|
|
||||||
|
|
||||||
# variables
|
# variables
|
||||||
local path realpath pkgbase
|
local path realpath pkgbase
|
||||||
@@ -98,8 +97,6 @@ artixpkg_git_ci() {
|
|||||||
|
|
||||||
git add "${REPO_CI}"
|
git add "${REPO_CI}"
|
||||||
git commit -m "add ci support"
|
git commit -m "add ci support"
|
||||||
|
|
||||||
CREATED=1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f ${REPO_DB} ]]; then
|
if [[ ! -f ${REPO_DB} ]]; then
|
||||||
@@ -114,17 +111,14 @@ artixpkg_git_ci() {
|
|||||||
fi
|
fi
|
||||||
git add "${REPO_DB}"
|
git add "${REPO_DB}"
|
||||||
git commit -m "create repo db"
|
git commit -m "create repo db"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( SWITCH )); then
|
if (( SWITCH )); then
|
||||||
msg "Switching to agent (${AGENT}) ..."
|
msg "Switching to agent (${AGENT}) ..."
|
||||||
write_jenkinsfile "${AGENT}"
|
write_jenkinsfile "${AGENT}"
|
||||||
|
|
||||||
if (( ! CREATED )); then
|
git add "${REPO_CI}"
|
||||||
git add "${REPO_CI}"
|
git commit -m "switch agent"
|
||||||
git commit -m "switch agent"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
)
|
)
|
||||||
|
@@ -5,6 +5,9 @@
|
|||||||
[[ -z ${ARTOOLS_INCLUDE_GIT_CONFIG_SH:-} ]] || return 0
|
[[ -z ${ARTOOLS_INCLUDE_GIT_CONFIG_SH:-} ]] || return 0
|
||||||
ARTOOLS_INCLUDE_GIT_CONFIG_SH=1
|
ARTOOLS_INCLUDE_GIT_CONFIG_SH=1
|
||||||
|
|
||||||
|
# shellcheck source=src/lib/pkg/packager.sh
|
||||||
|
source "${LIBDIR}"/pkg/packager.sh
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
||||||
@@ -88,10 +91,8 @@ artixpkg_git_config() {
|
|||||||
|
|
||||||
# Load makepkg.conf variables to be available for packager identity
|
# Load makepkg.conf variables to be available for packager identity
|
||||||
msg "Collecting packager identity from makepkg.conf"
|
msg "Collecting packager identity from makepkg.conf"
|
||||||
|
# shellcheck source=config/makepkg/x86_64.conf
|
||||||
# shellcheck source=src/lib/pkg/packager.sh
|
load_makepkg_config
|
||||||
source "${LIBDIR}"/pkg/packager.sh
|
|
||||||
|
|
||||||
if [[ -n ${PACKAGER} ]]; then
|
if [[ -n ${PACKAGER} ]]; then
|
||||||
if ! packager_name=$(get_packager_name "${PACKAGER}") || \
|
if ! packager_name=$(get_packager_name "${PACKAGER}") || \
|
||||||
! packager_email=$(get_packager_email "${PACKAGER}"); then
|
! packager_email=$(get_packager_email "${PACKAGER}"); then
|
||||||
|
@@ -16,12 +16,14 @@ artixpkg_git_push_usage() {
|
|||||||
OPTIONS
|
OPTIONS
|
||||||
-m, --maintainer NAME Push all packages of the named maintainer
|
-m, --maintainer NAME Push all packages of the named maintainer
|
||||||
-t, --topic NAME Push all packages of the named topic
|
-t, --topic NAME Push all packages of the named topic
|
||||||
|
-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 tux
|
$ ${COMMAND} --maintainer tux
|
||||||
$ ${COMMAND} --topic mytopic
|
$ ${COMMAND} --topic mytopic
|
||||||
|
$ ${COMMAND} -j 8 --topic mytopic
|
||||||
_EOF_
|
_EOF_
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,6 +38,11 @@ artixpkg_git_push() {
|
|||||||
# options
|
# options
|
||||||
local MAINTAINER=
|
local MAINTAINER=
|
||||||
local TOPIC=
|
local TOPIC=
|
||||||
|
local CONFIGURE_OPTIONS=()
|
||||||
|
local jobs=
|
||||||
|
jobs=$(nproc)
|
||||||
|
|
||||||
|
local command=${_ARTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}}
|
||||||
|
|
||||||
while (( $# )); do
|
while (( $# )); do
|
||||||
case $1 in
|
case $1 in
|
||||||
@@ -53,6 +60,11 @@ artixpkg_git_push() {
|
|||||||
TOPIC="$2"
|
TOPIC="$2"
|
||||||
shift 2
|
shift 2
|
||||||
;;
|
;;
|
||||||
|
-j|--jobs)
|
||||||
|
(( $# <= 1 )) && die "missing argument for %s" "$1"
|
||||||
|
jobs=$2
|
||||||
|
shift 2
|
||||||
|
;;
|
||||||
--)
|
--)
|
||||||
shift
|
shift
|
||||||
break
|
break
|
||||||
@@ -78,6 +90,19 @@ artixpkg_git_push() {
|
|||||||
mapfile -t pkgbases < <(search_topic "${TOPIC}" | yq -P -r '.data | .[].name' | sort)
|
mapfile -t pkgbases < <(search_topic "${TOPIC}" | yq -P -r '.data | .[].name' | sort)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# parallelization
|
||||||
|
if [[ ${jobs} != 1 ]] && (( ${#pkgbases[@]} > 1 )); then
|
||||||
|
# force colors in parallel if parent process is colorized
|
||||||
|
if [[ -n ${BOLD} ]]; then
|
||||||
|
export ARTOOLS_COLOR=always
|
||||||
|
fi
|
||||||
|
if ! parallel --bar --jobs "${jobs}" "${command}" ::: "${pkgbases[@]}"; then
|
||||||
|
die 'Failed to push 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
|
||||||
( cd "${pkgbase}" || return
|
( cd "${pkgbase}" || return
|
||||||
|
@@ -49,6 +49,3 @@ is_packager_email_official() {
|
|||||||
fi
|
fi
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# shellcheck source=config/makepkg/x86_64.conf
|
|
||||||
load_makepkg_config
|
|
||||||
|
@@ -11,8 +11,6 @@ source "${LIBDIR}"/pkg/db/db.sh
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
|
||||||
load_makepkg_config
|
|
||||||
|
|
||||||
has_remote_changes() {
|
has_remote_changes() {
|
||||||
local status
|
local status
|
||||||
msg "Checking for remote changes ..."
|
msg "Checking for remote changes ..."
|
||||||
|
@@ -9,12 +9,6 @@ set -e
|
|||||||
|
|
||||||
PATCHDIR=${PATCHDIR:-"${WORKSPACE_DIR}/artix-patches"}
|
PATCHDIR=${PATCHDIR:-"${WORKSPACE_DIR}/artix-patches"}
|
||||||
|
|
||||||
declare -A arch_map=(
|
|
||||||
["archlinux-mirrorlist"]="pacman-mirrorlist"
|
|
||||||
["artix-rebuild-order"]="arch-rebuild-order"
|
|
||||||
["virtualbox-host-modules-artix"]="virtualbox-host-modules-arch"
|
|
||||||
)
|
|
||||||
|
|
||||||
update_patches(){
|
update_patches(){
|
||||||
if [[ ! -d "${PATCHDIR}" ]]; then
|
if [[ ! -d "${PATCHDIR}" ]]; then
|
||||||
# ${GIT_ORG}
|
# ${GIT_ORG}
|
||||||
@@ -31,7 +25,10 @@ update_patches(){
|
|||||||
patch_pkgbase(){
|
patch_pkgbase(){
|
||||||
local name="$1"
|
local name="$1"
|
||||||
local patches="${PATCHDIR}/patches/${name}"
|
local patches="${PATCHDIR}/patches/${name}"
|
||||||
sed -e 's|arch-meson|artix-meson|' -i PKGBUILD
|
sed -e 's|https://www.archlinux.org/|https://www.artixlinux.org/|' \
|
||||||
|
-e 's|(Arch Linux)|(Artix Linux)|' \
|
||||||
|
-e 's|arch-meson|artix-meson|' \
|
||||||
|
-i PKGBUILD
|
||||||
|
|
||||||
if "${PATCH_MAINTAINER}" && [ -n "${PACKAGER}" ]; then
|
if "${PATCH_MAINTAINER}" && [ -n "${PACKAGER}" ]; then
|
||||||
sed -e 's|# Maintainer:|# Contributor:|' -i PKGBUILD
|
sed -e 's|# Maintainer:|# Contributor:|' -i PKGBUILD
|
||||||
@@ -149,11 +146,9 @@ artixpkg_repo_import() {
|
|||||||
fi
|
fi
|
||||||
( cd "${pkgbase}" || return
|
( cd "${pkgbase}" || return
|
||||||
|
|
||||||
upstream="${arch_map["$pkgbase"]:-$pkgbase}"
|
|
||||||
|
|
||||||
stat_busy "Checking for upstream url"
|
stat_busy "Checking for upstream url"
|
||||||
if ! git config --local --get remote.upstream.url &>/dev/null; then
|
if ! git config --local --get remote.upstream.url &>/dev/null; then
|
||||||
git remote add upstream "${GIT_UPSTREAM_URL}/${upstream}".git
|
git remote add upstream "${GIT_UPSTREAM_URL}/${pkgbase}".git
|
||||||
fi
|
fi
|
||||||
stat_done
|
stat_done
|
||||||
|
|
||||||
|
@@ -41,6 +41,8 @@ export _ARTOOLS_COMMAND='artixpkg'
|
|||||||
# shellcheck source=src/lib/pkg/util.sh
|
# shellcheck source=src/lib/pkg/util.sh
|
||||||
source "${LIBDIR}"/pkg/util.sh
|
source "${LIBDIR}"/pkg/util.sh
|
||||||
|
|
||||||
|
load_makepkg_config
|
||||||
|
|
||||||
cd "${TREE_DIR_ARTIX}"
|
cd "${TREE_DIR_ARTIX}"
|
||||||
|
|
||||||
# command checking
|
# command checking
|
||||||
|
@@ -9,6 +9,8 @@ source "${LIBDIR}"/base/message.sh
|
|||||||
# shellcheck source=src/lib/pkg/diff.sh
|
# shellcheck source=src/lib/pkg/diff.sh
|
||||||
source "${LIBDIR}"/pkg/diff.sh
|
source "${LIBDIR}"/pkg/diff.sh
|
||||||
|
|
||||||
|
load_makepkg_config
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
cat <<- _EOF_
|
cat <<- _EOF_
|
||||||
Usage: ${BASH_SOURCE[0]##*/} [OPTIONS]
|
Usage: ${BASH_SOURCE[0]##*/} [OPTIONS]
|
||||||
|
Reference in New Issue
Block a user