Compare commits
	
		
			28 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 525c7dd0ee | |||
| 744eb3ca96 | |||
| 3dd3f806ef | |||
| fa245021bf | |||
| fd74b22bc2 | |||
| 538e5051e5 | |||
| ba2542c697 | |||
| 23c6cecdcc | |||
| 828844fd9a | |||
| 760f5e8281 | |||
| bb1585ad7b | |||
| be6506d6ee | |||
| 35a9c2f305 | |||
| 5347f45cc5 | |||
| c7f11a5bd5 | |||
| f3794ff2ad | |||
| c6811cca48 | |||
| a1f296ff2b | |||
| ac5e0f4b3d | |||
| 2ecfb04dc6 | |||
| e81eac2021 | |||
| e612d2c6d2 | |||
| 2bed697813 | |||
| ba4ac669e7 | |||
| 47babd20fd | |||
| d35422a74e | |||
| 94b8957494 | |||
| a0a485294c | 
							
								
								
									
										9
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								Makefile
									
									
									
									
									
								
							| @@ -80,7 +80,7 @@ conf_base: | |||||||
|  |  | ||||||
| conf_pkg: | conf_pkg: | ||||||
| 	@install -d $(BUILDDIR)/makepkg.conf.d $(BUILDDIR)/artools | 	@install -d $(BUILDDIR)/makepkg.conf.d $(BUILDDIR)/artools | ||||||
| 	@cp -a $(MAKEPKG_CONFIGS) $(BUILDDIR)/makepkg.conf.d | 	@cp -ra $(MAKEPKG_CONFIGS) $(BUILDDIR)/makepkg.conf.d | ||||||
| 	@cp -a $(TOOLS_CONFIGS_PKG) $(BUILDDIR)/artools | 	@cp -a $(TOOLS_CONFIGS_PKG) $(BUILDDIR)/artools | ||||||
|  |  | ||||||
| conf_iso: | conf_iso: | ||||||
| @@ -111,11 +111,13 @@ install_pkg: binprogs_pkg | |||||||
|  |  | ||||||
| 	for conf in $(notdir $(TOOLS_CONFIGS_PKG)); do install -Dm0644 $(BUILDDIR)/$(TOOLS)/$$conf $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)/$${conf##*/}; done | 	for conf in $(notdir $(TOOLS_CONFIGS_PKG)); do install -Dm0644 $(BUILDDIR)/$(TOOLS)/$$conf $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)/$${conf##*/}; done | ||||||
|  |  | ||||||
| 	for conf in $(notdir $(MAKEPKG_CONFIGS)); do install -Dm0644 $(BUILDDIR)/makepkg.conf.d/$$conf $(DESTDIR)$(DATADIR)/makepkg.conf.d/$${conf##*/}; done | 	cp -ra $(BUILDDIR)/makepkg.conf.d -t $(DESTDIR)$(DATADIR) | ||||||
|  |  | ||||||
| 	for a in $(SETARCH_ALIASES); do install -m0644 $$a -t $(DESTDIR)$(DATADIR)/setarch-aliases.d; done | 	for a in $(SETARCH_ALIASES); do install -m0644 $$a -t $(DESTDIR)$(DATADIR)/setarch-aliases.d; 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/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) | ||||||
| @@ -133,13 +135,12 @@ uninstall: | |||||||
| 	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 | 	rm -rf $(DESTDIR)$(DATADIR)/lib | ||||||
| 	for conf in $(notdir $(TOOLS_CONFIGS)); do rm -f $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)/$${conf##*/}; done | 	for conf in $(notdir $(TOOLS_CONFIGS)); do rm -f $(DESTDIR)$(SYSCONFDIR)/$(TOOLS)/$${conf##*/}; done | ||||||
| 	for conf in $(notdir $(MAKEPKG_CONFIGS)); do rm -f $(DESTDIR)$(DATADIR)/makepkg.conf.d/$${conf##*/}; done | 	rm -rf $(DESTDIR)$(DATADIR)/makepkg.conf.d | ||||||
| 	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 | ||||||
| 	rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides | 	rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides | ||||||
| 	rmdir --ignore-fail-on-non-empty \ | 	rmdir --ignore-fail-on-non-empty \ | ||||||
| 		$(DESTDIR)$(DATADIR)/setarch-aliases.d \ | 		$(DESTDIR)$(DATADIR)/setarch-aliases.d \ | ||||||
| 		$(DESTDIR)$(DATADIR)/makepkg.conf.d \ |  | ||||||
| 		$(DESTDIR)$(DATADIR)/pacman.conf.d \ | 		$(DESTDIR)$(DATADIR)/pacman.conf.d \ | ||||||
| 		$(DESTDIR)$(DATADIR) \ | 		$(DESTDIR)$(DATADIR) \ | ||||||
| 		$(DESTDIR)$(SYSCONFDIR)/$(TOOLS) | 		$(DESTDIR)$(SYSCONFDIR)/$(TOOLS) | ||||||
|   | |||||||
| @@ -38,3 +38,9 @@ | |||||||
|  |  | ||||||
| # default jenkins agents | # default jenkins agents | ||||||
| # AGENTS=(orion taurus) | # AGENTS=(orion taurus) | ||||||
|  |  | ||||||
|  | # whether to include custom maintainer line when importing from arch | ||||||
|  | # PATCH_MAINTAINER=false | ||||||
|  |  | ||||||
|  | # override the default git url for patches repo | ||||||
|  | # PATCH_URL=${GIT_SSH}:artix/artix-patches.git | ||||||
|   | |||||||
							
								
								
									
										18
									
								
								config/makepkg/conf.d/fortran.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								config/makepkg/conf.d/fortran.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | |||||||
|  | #!/hint/bash | ||||||
|  | # | ||||||
|  | # /etc/makepkg.conf.d/fortran.conf | ||||||
|  | # | ||||||
|  |  | ||||||
|  | ######################################################################### | ||||||
|  | # FORTRAN LANGUAGE SUPPORT | ||||||
|  | ######################################################################### | ||||||
|  |  | ||||||
|  | # Flags used for the Fortran compiler, similar in spirit to CFLAGS. Read | ||||||
|  | # linkman:gfortran[1] for more details on the available flags. | ||||||
|  | #FFLAGS="-O2 -pipe" | ||||||
|  | #FCFLAGS="$FFLAGS" | ||||||
|  |  | ||||||
|  | # Additional compiler flags appended to `FFLAGS` and `FCFLAGS` for use in debugging. Usually | ||||||
|  | # this would include: ``-g''. Read linkman:gfortran[1] for more details on the wide | ||||||
|  | # variety of compiler flags available. | ||||||
|  | #DEBUG_FFLAGS="-g" | ||||||
							
								
								
									
										19
									
								
								config/makepkg/conf.d/rust.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								config/makepkg/conf.d/rust.conf
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | |||||||
|  | #!/hint/bash | ||||||
|  | # shellcheck disable=2034 | ||||||
|  |  | ||||||
|  | # | ||||||
|  | # /etc/makepkg.conf.d/rust.conf | ||||||
|  | # | ||||||
|  |  | ||||||
|  | ######################################################################### | ||||||
|  | # RUST LANGUAGE SUPPORT | ||||||
|  | ######################################################################### | ||||||
|  |  | ||||||
|  | # Flags used for the Rust compiler, similar in spirit to CFLAGS. Read | ||||||
|  | # linkman:rustc[1] for more details on the available flags. | ||||||
|  | RUSTFLAGS="-Cforce-frame-pointers=yes" | ||||||
|  |  | ||||||
|  | # Additional compiler flags appended to `RUSTFLAGS` for use in debugging. | ||||||
|  | # Usually this would include: ``-C debuginfo=2''. Read linkman:rustc[1] for | ||||||
|  | # more details on the available flags. | ||||||
|  | DEBUG_RUSTFLAGS="-C debuginfo=2" | ||||||
| @@ -43,17 +43,16 @@ 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 | ||||||
| @@ -82,7 +81,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) | # Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto !autodeps) | ||||||
| #  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 | ||||||
| @@ -94,6 +93,7 @@ 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,6 +113,8 @@ 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 | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								config/makepkg/x86_64.conf.d/fortran.conf
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								config/makepkg/x86_64.conf.d/fortran.conf
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | ../conf.d/fortran.conf | ||||||
							
								
								
									
										1
									
								
								config/makepkg/x86_64.conf.d/rust.conf
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								config/makepkg/x86_64.conf.d/rust.conf
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | ../conf.d/rust.conf | ||||||
| @@ -36,6 +36,8 @@ 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,6 +36,8 @@ 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,6 +36,8 @@ 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,6 +35,8 @@ 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,6 +35,8 @@ 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,6 +35,8 @@ 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,6 +36,8 @@ 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,6 +36,8 @@ 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,6 +36,8 @@ 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,6 +36,8 @@ 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,6 +36,8 @@ 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,6 +36,8 @@ 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,6 +36,8 @@ 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,6 +36,8 @@ 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,6 +36,8 @@ 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,6 +8,14 @@ _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 | ||||||
| @@ -70,7 +78,7 @@ _artixpkg_completion() { | |||||||
|  |  | ||||||
|     case "${comp_cword_exflag}" in |     case "${comp_cword_exflag}" in | ||||||
|         1) |         1) | ||||||
|             COMPREPLY=($(compgen -W "admin ci git repo version -h --help" -- "${cur}")) |             COMPREPLY=($(compgen -W "admin git repo version -h --help" -- "${cur}")) | ||||||
|             return 0 |             return 0 | ||||||
|             ;; |             ;; | ||||||
|         2) |         2) | ||||||
| @@ -78,11 +86,8 @@ _artixpkg_completion() { | |||||||
|                 admin) |                 admin) | ||||||
|                     COMPREPLY=($(compgen -W "maintainer query team topic transfer -h --help" -- ${cur})) |                     COMPREPLY=($(compgen -W "maintainer query team topic transfer -h --help" -- ${cur})) | ||||||
|                     ;; |                     ;; | ||||||
|                 ci) |  | ||||||
|                     COMPREPLY=($(compgen -W "config -h --help" -- ${cur})) |  | ||||||
|                     ;; |  | ||||||
|                 git) |                 git) | ||||||
|                     COMPREPLY=($(compgen -W "clone config create pull push -h --help" -- ${cur})) |                     COMPREPLY=($(compgen -W "ci clone config create pull push -h --help" -- ${cur})) | ||||||
|                     ;; |                     ;; | ||||||
|                 repo) |                 repo) | ||||||
|                     COMPREPLY=($(compgen -W "add remove move import show -h --help" -- ${cur})) |                     COMPREPLY=($(compgen -W "add remove move import show -h --help" -- ${cur})) | ||||||
| @@ -150,12 +155,15 @@ _artixpkg_completion() { | |||||||
|                         "-t"|"--team") |                         "-t"|"--team") | ||||||
|                             COMPREPLY=($(compgen -W "$teams" -- ${cur})) |                             COMPREPLY=($(compgen -W "$teams" -- ${cur})) | ||||||
|                             ;; |                             ;; | ||||||
|                         "-m"|"--maintainer"|"-s"|"--search"|"-t"|"--team"|"-j"|"--jobs") |                         "-m"|"--maintainer") | ||||||
|  |                             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" -- ${cur})) |                             COMPREPLY=($(compgen -W "-m --maintainer --protocol -s --search -t --team -a --agent -j --jobs --all -h --help $(_artixpkg_remotepkgbase ${cur})" -- ${cur})) | ||||||
|                             ;; |                             ;; | ||||||
|                     esac |                     esac | ||||||
|                     ;; |                     ;; | ||||||
| @@ -188,7 +196,10 @@ _artixpkg_completion() { | |||||||
|                     ;; |                     ;; | ||||||
|                 "artixpkg git pull"*) |                 "artixpkg git pull"*) | ||||||
|                     case "${prev}" in |                     case "${prev}" in | ||||||
|                         "-t"|"--topic"|"-m"|"--maintainer"|"-j"|"--jobs") |                         "-m"|"--maintainer") | ||||||
|  |                             COMPREPLY=($(compgen -W "$(_artixpkg_maintainers)" -- ${cur})) | ||||||
|  |                             ;; | ||||||
|  |                         "-t"|"--topic"|"-j"|"--jobs") | ||||||
|                             # these flags expect a parameter |                             # these flags expect a parameter | ||||||
|                             COMPREPLY=() |                             COMPREPLY=() | ||||||
|                             ;; |                             ;; | ||||||
| @@ -206,7 +217,10 @@ _artixpkg_completion() { | |||||||
|                     ;; |                     ;; | ||||||
|                 "artixpkg git push"*) |                 "artixpkg git push"*) | ||||||
|                     case "${prev}" in |                     case "${prev}" in | ||||||
|                         "-m"|"--maintainer"|"-t"|"--topic"|"-j"|"--jobs") |                         "-m"|"--maintainer") | ||||||
|  |                             COMPREPLY=($(compgen -W "$(_artixpkg_maintainers)" -- ${cur})) | ||||||
|  |                             ;; | ||||||
|  |                         "-t"|"--topic"|"-j"|"--jobs") | ||||||
|                             # this flag expects a parameter |                             # this flag expects a parameter | ||||||
|                             COMPREPLY=() |                             COMPREPLY=() | ||||||
|                             ;; |                             ;; | ||||||
| @@ -215,17 +229,13 @@ _artixpkg_completion() { | |||||||
|                             ;; |                             ;; | ||||||
|                     esac |                     esac | ||||||
|                     ;; |                     ;; | ||||||
|                 "artixpkg ci config"*) |                 "artixpkg git ci"*) | ||||||
|                     case "${prev}" in |                     case "${prev}" in | ||||||
|                         "-j"|"--jobs") |  | ||||||
|                             # this flag expects a parameter |  | ||||||
|                             COMPREPLY=() |  | ||||||
|                             ;; |  | ||||||
|                         "-a"|"--agent") |                         "-a"|"--agent") | ||||||
|                             COMPREPLY=($(compgen -W "$agents" -- ${cur})) |                             COMPREPLY=($(compgen -W "$agents" -- ${cur})) | ||||||
|                             ;; |                             ;; | ||||||
|                         *) |                         *) | ||||||
|                             COMPREPLY=($(compgen -W "-a --agent -s --switch -j --jobs -h --help $(_artixpkg_pkgbase)" -- ${cur})) |                             COMPREPLY=($(compgen -W "-a --agent -h --help $(_artixpkg_pkgbase)" -- ${cur})) | ||||||
|                             ;; |                             ;; | ||||||
|                     esac |                     esac | ||||||
|                     ;; |                     ;; | ||||||
| @@ -241,7 +251,10 @@ _artixpkg_completion() { | |||||||
|                     ;; |                     ;; | ||||||
|                 "artixpkg admin query"*) |                 "artixpkg admin query"*) | ||||||
|                     case "${prev}" in |                     case "${prev}" in | ||||||
|                         "-m"|"--maintainer"|"-t"|"--topic") |                         "-m"|"--maintainer") | ||||||
|  |                             COMPREPLY=($(compgen -W "$(_artixpkg_maintainers)" -- ${cur})) | ||||||
|  |                             ;; | ||||||
|  |                         "-t"|"--topic") | ||||||
|                             # this flag expects a parameter |                             # this flag expects a parameter | ||||||
|                             COMPREPLY=() |                             COMPREPLY=() | ||||||
|                             ;; |                             ;; | ||||||
|   | |||||||
							
								
								
									
										205
									
								
								contrib/completion/zsh/_artixpkg.in
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										205
									
								
								contrib/completion/zsh/_artixpkg.in
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,205 @@ | |||||||
|  | #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,8 +5,6 @@ | |||||||
| [[ -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 | ||||||
|  |  | ||||||
| @@ -81,7 +79,9 @@ artixpkg_admin_maintainer() { | |||||||
|  |  | ||||||
|     pkgbases+=("$@") |     pkgbases+=("$@") | ||||||
|  |  | ||||||
|     load_makepkg_config |     # shellcheck source=src/lib/pkg/packager.sh | ||||||
|  |     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,9 +90,11 @@ 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 | ||||||
|  |  | ||||||
|   | |||||||
| @@ -196,7 +196,6 @@ remove_all_topics() { | |||||||
|         -H "Authorization: token ${GIT_TOKEN}" \ |         -H "Authorization: token ${GIT_TOKEN}" \ | ||||||
|         -d "$json" |         -d "$json" | ||||||
|     stat_done |     stat_done | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
| #}}} | #}}} | ||||||
|   | |||||||
| @@ -1,55 +0,0 @@ | |||||||
| #!/hint/bash |  | ||||||
| # |  | ||||||
| # SPDX-License-Identifier: GPL-3.0-or-later |  | ||||||
|  |  | ||||||
| [[ -z ${ARTOOLS_INCLUDE_CI_SH:-} ]] || return 0 |  | ||||||
| ARTOOLS_INCLUDE_CI_SH=1 |  | ||||||
|  |  | ||||||
| set -e |  | ||||||
|  |  | ||||||
| artixpkg_ci_usage() { |  | ||||||
|     local -r COMMAND=${_ARTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}} |  | ||||||
|     cat <<- _EOF_ |  | ||||||
|     Usage: ${COMMAND} [COMMAND] [OPTIONS] |  | ||||||
|  |  | ||||||
|     COMMANDS |  | ||||||
|         config         Configure ci and build agent |  | ||||||
|  |  | ||||||
|     OPTIONS |  | ||||||
|         -h, --help     Show this help text |  | ||||||
|  |  | ||||||
|     EXAMPLES |  | ||||||
|         $ ${COMMAND} config libfoo |  | ||||||
| _EOF_ |  | ||||||
| } |  | ||||||
|  |  | ||||||
| artixpkg_ci() { |  | ||||||
|     if (( $# < 1 )); then |  | ||||||
|         artixpkg_ci_usage |  | ||||||
|         exit 0 |  | ||||||
|     fi |  | ||||||
|  |  | ||||||
|     # option checking |  | ||||||
|     while (( $# )); do |  | ||||||
|         case $1 in |  | ||||||
|         -h|--help) |  | ||||||
|             artixpkg_ci_usage |  | ||||||
|             exit 0 |  | ||||||
|         ;; |  | ||||||
|         config) |  | ||||||
|             _ARTOOLS_COMMAND+=" $1" |  | ||||||
|             shift |  | ||||||
|             # shellcheck source=src/lib/pkg/ci/config.sh |  | ||||||
|             source "${LIBDIR}"/pkg/ci/config.sh |  | ||||||
|             artixpkg_ci_config "$@" |  | ||||||
|             exit 0 |  | ||||||
|         ;; |  | ||||||
|         -*) |  | ||||||
|             die "invalid argument: %s" "$1" |  | ||||||
|         ;; |  | ||||||
|         *) |  | ||||||
|             die "invalid command: %s" "$1" |  | ||||||
|         ;; |  | ||||||
|         esac |  | ||||||
|     done |  | ||||||
| } |  | ||||||
| @@ -18,6 +18,7 @@ artixpkg_git_usage() { | |||||||
|         create         Create a new Gitea package repository |         create         Create a new Gitea package repository | ||||||
|         pull           Pull a package repository |         pull           Pull a package repository | ||||||
|         push           Push a package repository |         push           Push a package repository | ||||||
|  |         ci             Configure CI agent | ||||||
|  |  | ||||||
|     OPTIONS |     OPTIONS | ||||||
|         -h, --help     Show this help text |         -h, --help     Show this help text | ||||||
| @@ -25,9 +26,10 @@ artixpkg_git_usage() { | |||||||
|     EXAMPLES |     EXAMPLES | ||||||
|         $ ${COMMAND} clone libfoo linux libbar |         $ ${COMMAND} clone libfoo linux libbar | ||||||
|         $ ${COMMAND} clone --maintainer tux |         $ ${COMMAND} clone --maintainer tux | ||||||
|         $ ${COMMAND} config --topic mytopic |         $ ${COMMAND} clone --search mytopic | ||||||
|         $ ${COMMAND} config --maintainer tux |         $ ${COMMAND} config libfoo | ||||||
|         $ ${COMMAND} create -c libfoo |         $ ${COMMAND} create -c libfoo | ||||||
|  |         $ ${COMMAND} ci -a ${AGENTS[1]} libfoo | ||||||
| _EOF_ | _EOF_ | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -60,6 +62,14 @@ artixpkg_git() { | |||||||
|             artixpkg_git_config "$@" |             artixpkg_git_config "$@" | ||||||
|             exit 0 |             exit 0 | ||||||
|         ;; |         ;; | ||||||
|  |         ci) | ||||||
|  |             _ARTOOLS_COMMAND+=" $1" | ||||||
|  |             shift | ||||||
|  |             # shellcheck source=src/lib/pkg/git/ci.sh | ||||||
|  |             source "${LIBDIR}"/pkg/git/ci.sh | ||||||
|  |             artixpkg_git_ci "$@" | ||||||
|  |             exit 0 | ||||||
|  |         ;; | ||||||
|         create) |         create) | ||||||
|             _ARTOOLS_COMMAND+=" $1" |             _ARTOOLS_COMMAND+=" $1" | ||||||
|             shift |             shift | ||||||
|   | |||||||
| @@ -2,8 +2,8 @@ | |||||||
| # | # | ||||||
| # SPDX-License-Identifier: GPL-3.0-or-later | # SPDX-License-Identifier: GPL-3.0-or-later | ||||||
| 
 | 
 | ||||||
| [[ -z ${ARTOOLS_INCLUDE_CI_CONFIG_SH:-} ]] || return 0 | [[ -z ${ARTOOLS_INCLUDE_GIT_CI_SH:-} ]] || return 0 | ||||||
| ARTOOLS_INCLUDE_CI_CONFIG_SH=1 | ARTOOLS_INCLUDE_GIT_CI_SH=1 | ||||||
| 
 | 
 | ||||||
| # shellcheck source=src/lib/pkg/db/db.sh | # shellcheck source=src/lib/pkg/db/db.sh | ||||||
| source "${LIBDIR}"/pkg/db/db.sh | source "${LIBDIR}"/pkg/db/db.sh | ||||||
| @@ -11,7 +11,7 @@ source "${LIBDIR}"/pkg/db/db.sh | |||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| artixpkg_ci_config_usage() { | artixpkg_git_ci_usage() { | ||||||
|     local -r COMMAND=${_ARTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}} |     local -r COMMAND=${_ARTOOLS_COMMAND:-${BASH_SOURCE[0]##*/}} | ||||||
|     cat <<- _EOF_ |     cat <<- _EOF_ | ||||||
|     Usage: ${COMMAND} [OPTIONS] [PKGBASE]... |     Usage: ${COMMAND} [OPTIONS] [PKGBASE]... | ||||||
| @@ -19,26 +19,21 @@ artixpkg_ci_config_usage() { | |||||||
|     OPTIONS |     OPTIONS | ||||||
|         -a, --agent NAME       Set the CI agent (default: ${AGENTS[0]}) |         -a, --agent NAME       Set the CI agent (default: ${AGENTS[0]}) | ||||||
|                                Possible values: $(yaml_array ${AGENTS[@]}) |                                Possible values: $(yaml_array ${AGENTS[@]}) | ||||||
|         -s, --switch           Switch agent |  | ||||||
|         -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} --agent ${AGENTS[1]} libfoo |         $ ${COMMAND} --agent ${AGENTS[1]} libfoo | ||||||
|         $ ${COMMAND} --switch --agent ${AGENTS[1]} libfoo |  | ||||||
|         $ ${COMMAND} * |  | ||||||
| _EOF_ | _EOF_ | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| artixpkg_ci_config() { | artixpkg_git_ci() { | ||||||
|     # options |     # options | ||||||
|     local jobs= |  | ||||||
|     jobs=$(nproc) |  | ||||||
|     local paths=() |     local paths=() | ||||||
| 
 | 
 | ||||||
|     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 | ||||||
| @@ -46,21 +41,13 @@ artixpkg_ci_config() { | |||||||
|     while (( $# )); do |     while (( $# )); do | ||||||
|         case $1 in |         case $1 in | ||||||
|         -h|--help) |         -h|--help) | ||||||
|             artixpkg_ci_config_usage |             artixpkg_git_ci_usage | ||||||
|             exit 0 |             exit 0 | ||||||
|         ;; |         ;; | ||||||
|         -s|--switch) |  | ||||||
|             SWITCH=1 |  | ||||||
|             shift |  | ||||||
|         ;; |  | ||||||
|         -a|--agent) |         -a|--agent) | ||||||
|             (( $# <= 1 )) && die "missing argument for %s" "$1" |             (( $# <= 1 )) && die "missing argument for %s" "$1" | ||||||
|             AGENT="$2" |             AGENT="$2" | ||||||
|             shift 2 |             SWITCH=1 | ||||||
|         ;; |  | ||||||
|         -j|--jobs) |  | ||||||
|             (( $# <= 1 )) && die "missing argument for %s" "$1" |  | ||||||
|             jobs=$2 |  | ||||||
|             shift 2 |             shift 2 | ||||||
|         ;; |         ;; | ||||||
|         --) |         --) | ||||||
| @@ -82,7 +69,7 @@ artixpkg_ci_config() { | |||||||
|         if [[ -f PKGBUILD ]]; then |         if [[ -f PKGBUILD ]]; then | ||||||
|             paths=(".") |             paths=(".") | ||||||
|         else |         else | ||||||
|             artixpkg_ci_config_usage |             artixpkg_git_ci_usage | ||||||
|             exit 1 |             exit 1 | ||||||
|         fi |         fi | ||||||
|     fi |     fi | ||||||
| @@ -111,6 +98,8 @@ artixpkg_ci_config() { | |||||||
| 
 | 
 | ||||||
|                 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 | ||||||
| @@ -125,15 +114,18 @@ artixpkg_ci_config() { | |||||||
|                 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 | ||||||
| 
 | 
 | ||||||
|         ) |         ) | ||||||
|     done |     done | ||||||
| @@ -7,8 +7,8 @@ ARTOOLS_INCLUDE_GIT_CLONE_SH=1 | |||||||
|  |  | ||||||
| # shellcheck source=src/lib/pkg/git/config.sh | # shellcheck source=src/lib/pkg/git/config.sh | ||||||
| source "${LIBDIR}"/pkg/git/config.sh | source "${LIBDIR}"/pkg/git/config.sh | ||||||
| # shellcheck source=src/lib/pkg/ci/config.sh | # shellcheck source=src/lib/pkg/git/ci.sh | ||||||
| source "${LIBDIR}"/pkg/ci/config.sh | source "${LIBDIR}"/pkg/git/ci.sh | ||||||
| # shellcheck source=src/lib/pkg/admin/team.sh | # shellcheck source=src/lib/pkg/admin/team.sh | ||||||
| source "${LIBDIR}"/pkg/admin/team.sh | source "${LIBDIR}"/pkg/admin/team.sh | ||||||
|  |  | ||||||
| @@ -169,7 +169,7 @@ artixpkg_git_clone() { | |||||||
|         fi |         fi | ||||||
|  |  | ||||||
|         artixpkg_git_config "${CONFIG_OPTS[@]}" "${pkgbase}" |         artixpkg_git_config "${CONFIG_OPTS[@]}" "${pkgbase}" | ||||||
|         artixpkg_ci_config "${AGENT_OPTS[@]}" "${pkgbase}" |         artixpkg_git_ci "${AGENT_OPTS[@]}" "${pkgbase}" | ||||||
|         artixpkg_admin_team "${TEAM_OPTS[@]}" "${pkgbase}" |         artixpkg_admin_team "${TEAM_OPTS[@]}" "${pkgbase}" | ||||||
|     done |     done | ||||||
| } | } | ||||||
|   | |||||||
| @@ -5,9 +5,6 @@ | |||||||
| [[ -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 | ||||||
|  |  | ||||||
|  |  | ||||||
| @@ -91,8 +88,10 @@ 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 |  | ||||||
|     load_makepkg_config |     # shellcheck source=src/lib/pkg/packager.sh | ||||||
|  |     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 | ||||||
|   | |||||||
| @@ -9,8 +9,8 @@ ARTOOLS_INCLUDE_GIT_CREATE_SH=1 | |||||||
| source "${LIBDIR}"/pkg/git/clone.sh | source "${LIBDIR}"/pkg/git/clone.sh | ||||||
| # shellcheck source=src/lib/pkg/git/config.sh | # shellcheck source=src/lib/pkg/git/config.sh | ||||||
| source "${LIBDIR}"/pkg/git/config.sh | source "${LIBDIR}"/pkg/git/config.sh | ||||||
| # shellcheck source=src/lib/pkg/ci/config.sh | # shellcheck source=src/lib/pkg/git/ci.sh | ||||||
| source "${LIBDIR}"/pkg/ci/config.sh | source "${LIBDIR}"/pkg/git/ci.sh | ||||||
| # shellcheck source=src/lib/pkg/admin/team.sh | # shellcheck source=src/lib/pkg/admin/team.sh | ||||||
| source "${LIBDIR}"/pkg/admin/team.sh | source "${LIBDIR}"/pkg/admin/team.sh | ||||||
|  |  | ||||||
| @@ -116,7 +116,7 @@ artixpkg_git_create() { | |||||||
|             artixpkg_git_clone "${AGENT_OPTS[@]}" "${TEAM_OPTS[@]}" "${pkgbase}" |             artixpkg_git_clone "${AGENT_OPTS[@]}" "${TEAM_OPTS[@]}" "${pkgbase}" | ||||||
|         elif (( CONFIG )); then |         elif (( CONFIG )); then | ||||||
|             artixpkg_git_config "${pkgbase}" |             artixpkg_git_config "${pkgbase}" | ||||||
|             artixpkg_ci_config "${AGENT_OPTS[@]}" "${pkgbase}" |             artixpkg_git_ci "${AGENT_OPTS[@]}" "${pkgbase}" | ||||||
|             artixpkg_admin_team "${TEAM_OPTS[@]}" "${pkgbase}" |             artixpkg_admin_team "${TEAM_OPTS[@]}" "${pkgbase}" | ||||||
|         fi |         fi | ||||||
|  |  | ||||||
|   | |||||||
| @@ -16,14 +16,12 @@ 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_ | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -38,11 +36,6 @@ 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 | ||||||
| @@ -60,11 +53,6 @@ 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 | ||||||
| @@ -90,19 +78,6 @@ 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,3 +49,6 @@ is_packager_email_official() { | |||||||
|     fi |     fi | ||||||
|     return 1 |     return 1 | ||||||
| } | } | ||||||
|  |  | ||||||
|  | # shellcheck source=config/makepkg/x86_64.conf | ||||||
|  | load_makepkg_config | ||||||
|   | |||||||
| @@ -11,6 +11,8 @@ 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 ..." | ||||||
| @@ -41,9 +43,12 @@ artixpkg_repo_usage() { | |||||||
|         -h, --help     Show this help text |         -h, --help     Show this help text | ||||||
|  |  | ||||||
|     EXAMPLES |     EXAMPLES | ||||||
|         $ ${COMMAND} add world libfoo |         $ ${COMMAND} add ${ARTIX_DB_MAP[2]} libfoo | ||||||
|         $ ${COMMAND} remove world libfoo |         $ ${COMMAND} remove ${ARTIX_DB_MAP[2]} libfoo | ||||||
|         $ ${COMMAND} move world-gremlins world libfoo |         $ ${COMMAND} move ${ARTIX_DB_MAP[1]} ${ARTIX_DB_MAP[2]} libfoo | ||||||
|  |         $ ${COMMAND} add ${ARTIX_DB[4]} libfoo | ||||||
|  |         $ ${COMMAND} remove ${ARTIX_DB[4]} libfoo | ||||||
|  |         $ ${COMMAND} move ${ARTIX_DB[3]} ${ARTIX_DB[4]} libfoo | ||||||
|         $ ${COMMAND} import libfoo |         $ ${COMMAND} import libfoo | ||||||
|         $ ${COMMAND} show libfoo |         $ ${COMMAND} show libfoo | ||||||
| _EOF_ | _EOF_ | ||||||
|   | |||||||
| @@ -7,22 +7,61 @@ ARTOOLS_INCLUDE_REPO_IMPORT_SH=1 | |||||||
|  |  | ||||||
| set -e | set -e | ||||||
|  |  | ||||||
|  | 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(){ | ||||||
|  |     if [[ ! -d "${PATCHDIR}" ]]; then | ||||||
|  |         # ${GIT_ORG} | ||||||
|  |         if ! git clone "${PATCH_URL}" "${PATCHDIR}"; then | ||||||
|  |             error "failed to clone %s" "${PATCHDIR}" | ||||||
|  |         fi | ||||||
|  |     else | ||||||
|  |         if ! git -C "${PATCHDIR}" pull; then | ||||||
|  |            error "Failed to pull artix-patches" | ||||||
|  |         fi | ||||||
|  |     fi | ||||||
|  | } | ||||||
|  |  | ||||||
| patch_pkgbase(){ | patch_pkgbase(){ | ||||||
|     local name="$1" |     local name="$1" | ||||||
|     case "${name}" in |     local patches="${PATCHDIR}/patches/${name}" | ||||||
|         linux|linux-lts|linux-zen|linux-hardened|linux-rt*) |     sed -e 's|arch-meson|artix-meson|' -i PKGBUILD | ||||||
|             sed -e 's|KBUILD_BUILD_HOST=.*|KBUILD_BUILD_HOST=artixlinux|' -i PKGBUILD |  | ||||||
|             sed -e 's|CONFIG_DEFAULT_HOSTNAME=.*|CONFIG_DEFAULT_HOSTNAME="artixlinux"|' \ |     if "${PATCH_MAINTAINER}" && [ -n "${PACKAGER}" ]; then | ||||||
|                 -i config |         sed -e 's|# Maintainer:|# Contributor:|' -i PKGBUILD | ||||||
|         ;; |         printf '%s\n%s\n' "# Maintainer: ${PACKAGER}" "$(cat "PKGBUILD")" >"PKGBUILD" | ||||||
|         *) |     fi | ||||||
|             sed -e 's|https://www.archlinux.org/|https://www.artixlinux.org/|' \ |  | ||||||
|                 -e 's|(Arch Linux)|(Artix Linux)|' \ |     if [ -d "${patches}" ]; then | ||||||
|                 -e 's|arch-meson|artix-meson|' \ |         if [ -f "${patches}/env.txt" ]; then | ||||||
|                 -i PKGBUILD |             while read -r line; do | ||||||
|         ;; |                 IFS="=" read -r key value <<< "$line" | ||||||
|     esac |                 if [[ -z "${key}" ]] || [[ -z "${value}" ]]; then | ||||||
|  |                     die "Invalid key value pair in env.txt" | ||||||
|  |                 fi | ||||||
|  |                 if declare -p "${key}" &> /dev/null; then | ||||||
|  |                     die "Environment variable %s already exists." "${key}" | ||||||
|  |                 fi | ||||||
|  |                 export "${key}=${value}" | ||||||
|  |             done < "${patches}/env.txt" | ||||||
|  |         fi | ||||||
|  |         for file in "${patches}"/*; do | ||||||
|  |             if [ -x "${file}" ]; then | ||||||
|  |                 echo "$> ${name}/$(basename "${file}")" | ||||||
|  |                 "${file}" "${TREE_DIR_ARTIX}/${name}" | ||||||
|  |             elif [[ "${file}" == *.diff ]]; then | ||||||
|  |                 echo "$> git apply ${name}/$(basename "${file}")" | ||||||
|  |                 git -C "${TREE_DIR_ARTIX}/${name}" apply "${file}" | ||||||
|  |             fi | ||||||
|  |         done | ||||||
|  |     fi | ||||||
|  |  | ||||||
|     git --no-pager diff PKGBUILD |     git --no-pager diff PKGBUILD | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -34,12 +73,14 @@ artixpkg_repo_import_usage() { | |||||||
|     OPTIONS |     OPTIONS | ||||||
|         --tag TAG          Switch the current workspace to a specified version tag |         --tag TAG          Switch the current workspace to a specified version tag | ||||||
|         --del              Delete files before rsync import |         --del              Delete files before rsync import | ||||||
|  |         -n --no-patch      No patch import | ||||||
|         -h, --help         Show this help text |         -h, --help         Show this help text | ||||||
|  |  | ||||||
|     EXAMPLES |     EXAMPLES | ||||||
|         $ ${COMMAND} libfoo |         $ ${COMMAND} libfoo | ||||||
|         $ ${COMMAND} --tag TAG libfoo |         $ ${COMMAND} --tag TAG libfoo | ||||||
|         $ ${COMMAND} --tag TAG --del libfoo |         $ ${COMMAND} --tag TAG --del libfoo | ||||||
|  |         $ ${COMMAND} --no-patch libfoo | ||||||
| _EOF_ | _EOF_ | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -53,6 +94,7 @@ artixpkg_repo_import() { | |||||||
|     local pkgbases=() |     local pkgbases=() | ||||||
|     local pkgbase |     local pkgbase | ||||||
|     local TAG |     local TAG | ||||||
|  |     local NP=0 | ||||||
|     local rsync_args=() |     local rsync_args=() | ||||||
|     rsync_args+=( |     rsync_args+=( | ||||||
|         -axcihW |         -axcihW | ||||||
| @@ -83,6 +125,10 @@ artixpkg_repo_import() { | |||||||
|                 rsync_args+=(--delete-before) |                 rsync_args+=(--delete-before) | ||||||
|                 shift |                 shift | ||||||
|             ;; |             ;; | ||||||
|  |             -n|--no-patch) | ||||||
|  |                 NP=1 | ||||||
|  |                 shift | ||||||
|  |             ;; | ||||||
|             -h|--help) |             -h|--help) | ||||||
|                 artixpkg_repo_import_usage |                 artixpkg_repo_import_usage | ||||||
|                 exit 0 |                 exit 0 | ||||||
| @@ -96,6 +142,8 @@ artixpkg_repo_import() { | |||||||
|         esac |         esac | ||||||
|     done |     done | ||||||
|  |  | ||||||
|  |     update_patches | ||||||
|  |  | ||||||
|     pkgbases+=("$@") |     pkgbases+=("$@") | ||||||
|  |  | ||||||
|     for pkgbase in "${pkgbases[@]}"; do |     for pkgbase in "${pkgbases[@]}"; do | ||||||
| @@ -108,9 +156,11 @@ 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}/${pkgbase}".git |                     git remote add upstream "${GIT_UPSTREAM_URL}/${upstream}".git | ||||||
|                 fi |                 fi | ||||||
|                 stat_done |                 stat_done | ||||||
|  |  | ||||||
| @@ -141,9 +191,11 @@ artixpkg_repo_import() { | |||||||
|                     msg "Importing upstream changeset for ${version}" |                     msg "Importing upstream changeset for ${version}" | ||||||
|                     rsync "${rsync_args[@]}" "${temp}"/ "$(pwd)"/ #&>/dev/null |                     rsync "${rsync_args[@]}" "${temp}"/ "$(pwd)"/ #&>/dev/null | ||||||
|  |  | ||||||
|  |                     if ! (( NP )); then | ||||||
|                         msg2 "Patching ${pkgbase} ..." |                         msg2 "Patching ${pkgbase} ..." | ||||||
|                         patch_pkgbase "${pkgbase}" |                         patch_pkgbase "${pkgbase}" | ||||||
|                     fi |                     fi | ||||||
|  |                 fi | ||||||
|             ) |             ) | ||||||
|         fi |         fi | ||||||
|  |  | ||||||
|   | |||||||
| @@ -60,6 +60,10 @@ load_pkg_config(){ | |||||||
|  |  | ||||||
|     DBEXT=${DBEXT:-'gz'} |     DBEXT=${DBEXT:-'gz'} | ||||||
|  |  | ||||||
|  |     PATCH_MAINTAINER=${PATCH_MAINTAINER:-false} | ||||||
|  |  | ||||||
|  |     PATCH_URL=${PATCH_URL:-"${GIT_SSH}:artix/artix-patches.git"} | ||||||
|  |  | ||||||
|     if [[ -z "${AGENTS[*]}" ]]; then |     if [[ -z "${AGENTS[*]}" ]]; then | ||||||
|         AGENTS=(orion taurus) |         AGENTS=(orion taurus) | ||||||
|     fi |     fi | ||||||
|   | |||||||
| @@ -21,7 +21,6 @@ usage() { | |||||||
|  |  | ||||||
|     COMMANDS |     COMMANDS | ||||||
|         admin     Manage topics, teams and obsolete repos |         admin     Manage topics, teams and obsolete repos | ||||||
|         ci        Manage CI and build agent |  | ||||||
|         git       Manage Git packaging repositories and their configuration |         git       Manage Git packaging repositories and their configuration | ||||||
|         repo      Pacman database modification for package updates, moves, etc. |         repo      Pacman database modification for package updates, moves, etc. | ||||||
|  |  | ||||||
| @@ -42,8 +41,6 @@ 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 | ||||||
| @@ -69,14 +66,6 @@ while (( $# )); do | |||||||
|         artixpkg_git "$@" |         artixpkg_git "$@" | ||||||
|         exit 0 |         exit 0 | ||||||
|     ;; |     ;; | ||||||
|     ci) |  | ||||||
|         _ARTOOLS_COMMAND+=" $1" |  | ||||||
|         shift |  | ||||||
|         # shellcheck source=src/lib/pkg/ci.sh |  | ||||||
|         source "${LIBDIR}"/pkg/ci.sh |  | ||||||
|         artixpkg_ci "$@" |  | ||||||
|         exit 0 |  | ||||||
|     ;; |  | ||||||
|     admin) |     admin) | ||||||
|         _ARTOOLS_COMMAND+=" $1" |         _ARTOOLS_COMMAND+=" $1" | ||||||
|         shift |         shift | ||||||
|   | |||||||
| @@ -9,8 +9,6 @@ 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] | ||||||
|   | |||||||
| @@ -181,7 +181,9 @@ else | |||||||
|     set_arch="${CARCH}" |     set_arch="${CARCH}" | ||||||
| fi | fi | ||||||
|  |  | ||||||
| ${CARCH:+setarch "${set_arch}"} chroot "${working_dir}" "$@" | chroot_args=(/usr/bin/env PATH=/usr/local/sbin:/usr/local/bin:/usr/bin) | ||||||
|  |  | ||||||
|  | ${CARCH:+setarch "${set_arch}"} chroot "${working_dir}" "${chroot_args[@]}" "$@" | ||||||
|  |  | ||||||
| ret=$? | ret=$? | ||||||
|  |  | ||||||
|   | |||||||
| @@ -20,6 +20,7 @@ add() { | |||||||
|         msg "Found: %s" "${pkgfile}" |         msg "Found: %s" "${pkgfile}" | ||||||
|         packages+=("${pkgname}") |         packages+=("${pkgname}") | ||||||
|         action='add' |         action='add' | ||||||
|  |         action_args+=(--include-sigs) | ||||||
|         ln -sfv "${pkgfile}"{,.sig} "${repo_path}"/ |         ln -sfv "${pkgfile}"{,.sig} "${repo_path}"/ | ||||||
|     fi |     fi | ||||||
| } | } | ||||||
| @@ -41,7 +42,7 @@ repo_action() { | |||||||
|     done |     done | ||||||
|     ( cd "${repo_path}" || return |     ( cd "${repo_path}" || return | ||||||
|         if [[ -n "${action}" ]]; then |         if [[ -n "${action}" ]]; then | ||||||
|             repo-"${action}" -R "${dest_repo}.${db_ext}" "${packages[@]}" |             repo-"${action}" "${action_args[@]}" "${dest_repo}.${db_ext}" "${packages[@]}" | ||||||
|         fi |         fi | ||||||
|     ) |     ) | ||||||
| } | } | ||||||
| @@ -57,6 +58,7 @@ rm_pkg=false | |||||||
|  |  | ||||||
| cmd=${0##*/} | cmd=${0##*/} | ||||||
| dest_repo=${cmd#*-} | dest_repo=${cmd#*-} | ||||||
|  | action_args=(-R) | ||||||
|  |  | ||||||
| usage() { | usage() { | ||||||
|     printf "Usage: %s [options]\n" "${cmd}" |     printf "Usage: %s [options]\n" "${cmd}" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user