Compare commits

...

18 Commits

Author SHA1 Message Date
Levente Polyak
3c1229479c commitpkg: handle option parsind and help before abort checks
Previously it was not possible to call for the help of find early
command line option problems when invoking in any location on the shell
as the command aborted without PKGBUILD being present.

Fix this by moving everything related to options at the very top.
2022-08-23 20:41:49 +02:00
Greg Land
6bd7e70e68 doc: Fixed spelling error in devtools man page 2022-08-13 15:23:14 +02:00
Levente Polyak
626aecb472 make: split out man page files into doc/man folder 2022-06-22 01:05:03 +02:00
Levente Polyak
2088244564 make: use GEN message for all generated content 2022-06-22 01:05:03 +02:00
Levente Polyak
37df0765d2 cleanup: move PKGBUILD.proto to contrib folder 2022-06-22 01:05:03 +02:00
Levente Polyak
6d946989f3 doc: update links and references after moving to GitLab 2022-06-22 01:05:03 +02:00
Levente Polyak
5e680513e6 make: automatically collect man pages via wildcard 2022-06-22 01:05:02 +02:00
Levente Polyak
d94badcd0b make: split out source files into src folder 2022-06-22 01:05:02 +02:00
Levente Polyak
e1a51770b2 make: split out config files into conf directory 2022-06-22 01:05:02 +02:00
Levente Polyak
bb1a89a837 make: split out completion scripts from root worktree 2022-06-22 01:05:02 +02:00
Levente Polyak
225bac5a49 make: properly handle build target prerequisites
- Use wildcard for the lib directory for all binprogs
- Fix individual man page prerequisites for asciidoc.conf and footer
- Require all as prerequisite for the install target
2022-06-22 01:05:02 +02:00
Levente Polyak
6f5aa9f438 make: use build dir as target instead of polluting root workdir
This introduces a BUILDDIR make variable that is used as the target
directory. This gives us more flexibility and easier control of a none
dirty worktree by not polluting the main workdirs.
2022-06-22 01:05:02 +02:00
Levente Polyak
b7f2f4935d chore: remove executable bit from *.in source files
Those files should not be executable, its simply a wrong bit on the
files as they are useless without preprocessing.
2022-06-22 01:04:56 +02:00
Levente Polyak
b8d9a2b4fd Version 20220621 2022-06-22 00:58:19 +02:00
Levente Polyak
f386c13142 export-pkgbuild-keys: fix export for packages without validpgpkeys
In case the validpgpkeys array is empty or undefined, the empty printf
line only included a single line break which lead to mapfile -t
consuming it as an array with 1 element consisting of an empty string.

Fix this by only calling the printf in case the validpgpkeys array is
not empty. Without any output, the mapfile -t will simply produce an
empty array.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2022-06-22 00:51:22 +02:00
Levente Polyak
49d889cb8d Version 20220620 2022-06-20 22:54:34 +02:00
Levente Polyak
ac222ae004 archrelease: support subdirectories in package directories
We need to support subdirectories for the `keys` directory used to
distribute PGP keys alongside the packaging sources.

This is achieved by using `svn ls` to list the files and directories
in the packaging root and leverage the behavior of `svn copy` to
consider subdirectories inside the root but only copy over files and
directories under the subdirectory that are already tracked by svn.
As a step in between, we now use `svn ls --recursive` to list all
tracked svn files in the current repos directory and remove all tracked
files in the staging area. Hence the `svn copy` in combination with the
`svn rm` will result in a sync behavior from the packaging root to the
repos directory.

Signed-off-by: Levente Polyak <anthraxx@archlinux.org>
2022-06-10 16:51:52 +02:00
Allan McRae
cde012d25e Add x86_64_v3 builders
Signed-off-by: Allan McRae <allan@archlinux.org>
2022-06-10 16:31:45 +02:00
53 changed files with 556 additions and 169 deletions

23
.gitignore vendored
View File

@@ -1,24 +1,3 @@
*~ *~
devtools-*.tar.gz* devtools-*.tar.gz*
archbuild build/
archco
archrelease
bash_completion
checkpkg
commitpkg
diffpkg
export-pkgbuild-keys
finddeps
lddd
makechrootpkg
makerepropkg
mkarchroot
offload-build
rebuildpkgs
zsh_completion
find-libdeps
crossrepomove
arch-nspawn
sogrep
doc/*.1
doc/*.7

138
Makefile
View File

@@ -1,44 +1,15 @@
V=20220609 V=20220621
BUILDTOOLVER ?= $(V) BUILDTOOLVER ?= $(V)
PREFIX = /usr/local PREFIX = /usr/local
MANDIR = $(PREFIX)/share/man MANDIR = $(PREFIX)/share/man
BUILDDIR = build
IN_PROGS = \ BINPROGS = $(addprefix $(BUILDDIR)/,$(patsubst src/%,bin/%,$(patsubst %.in,%,$(wildcard src/*.in))))
archco \ MAKEPKG_CONFIGS=$(wildcard config/makepkg/*)
arch-nspawn \ PACMAN_CONFIGS=$(wildcard config/pacman/*)
archrelease \ SETARCH_ALIASES = $(wildcard config/setarch-aliases.d/*)
archbuild \ MANS = $(addprefix $(BUILDDIR)/,$(patsubst %.asciidoc,%,$(wildcard doc/man/*.asciidoc)))
checkpkg \
commitpkg \
crossrepomove\
diffpkg \
export-pkgbuild-keys \
finddeps \
find-libdeps \
lddd \
makerepropkg \
mkarchroot \
makechrootpkg \
offload-build \
rebuildpkgs \
sogrep
BINPROGS = \
$(IN_PROGS)
CONFIGFILES = \
makepkg-x86_64.conf \
pacman-extra.conf \
pacman-testing.conf \
pacman-staging.conf \
pacman-multilib.conf \
pacman-multilib-testing.conf \
pacman-multilib-staging.conf \
pacman-kde-unstable.conf \
pacman-gnome-unstable.conf
SETARCH_ALIASES = \
COMMITPKG_LINKS = \ COMMITPKG_LINKS = \
extrapkg \ extrapkg \
@@ -55,8 +26,11 @@ COMMITPKG_LINKS = \
ARCHBUILD_LINKS = \ ARCHBUILD_LINKS = \
extra-x86_64-build \ extra-x86_64-build \
extra-x86_64_v3-build \
testing-x86_64-build \ testing-x86_64-build \
testing-x86_64_v3-build \
staging-x86_64-build \ staging-x86_64-build \
staging-x86_64_v3-build \
multilib-build \ multilib-build \
multilib-testing-build \ multilib-testing-build \
multilib-staging-build \ multilib-staging-build \
@@ -67,71 +41,80 @@ CROSSREPOMOVE_LINKS = \
extra2community \ extra2community \
community2extra community2extra
COMPLETIONS = $(addprefix $(BUILDDIR)/,$(patsubst %.in,%,$(wildcard contrib/completion/*/*)))
BASHCOMPLETION_LINKS = \ BASHCOMPLETION_LINKS = \
archco \ archco \
communityco communityco
MANS = \ all: binprogs completion man
doc/archbuild.1 \ binprogs: $(BINPROGS)
doc/arch-nspawn.1 \ completion: $(COMPLETIONS)
doc/export-pkgbuild-keys.1 \
doc/makechrootpkg.1 \
doc/lddd.1 \
doc/checkpkg.1 \
doc/diffpkg.1 \
doc/offload-build.1 \
doc/sogrep.1 \
doc/makerepropkg.1 \
doc/mkarchroot.1 \
doc/find-libdeps.1 \
doc/find-libprovides.1 \
doc/devtools.7
all: $(BINPROGS) bash_completion zsh_completion man
man: $(MANS) man: $(MANS)
ifneq ($(wildcard *.in),)
$(error Legacy in prog file found: $(wildcard *.in) - please migrate to src/*)
endif
ifneq ($(wildcard pacman-*.conf),)
$(error Legacy pacman config file found: $(wildcard pacman-*.conf) - please migrate to config/pacman/*)
endif
ifneq ($(wildcard makepkg-*.conf),)
$(error Legacy makepkg config files found: $(wildcard makepkg-*.conf) - please migrate to config/makepkg/*)
endif
ifneq ($(wildcard setarch-aliases.d/*),)
$(error Legacy setarch aliase found: $(wildcard setarch-aliases.d/*) - please migrate to config/setarch-aliases.d/*)
endif
edit = sed -e "s|@pkgdatadir[@]|$(PREFIX)/share/devtools|g" edit = sed -e "s|@pkgdatadir[@]|$(PREFIX)/share/devtools|g"
GEN_MSG = @echo "GEN $(patsubst $(BUILDDIR)/%,%,$@)"
%: %.in Makefile lib/common.sh define buildInScript
@echo "GEN $@" $(1)/%: $(2)%.in
@$(RM) "$@" $$(GEN_MSG)
@{ echo -n 'm4_changequote([[[,]]])'; cat $@.in; } | m4 -P --define=m4_devtools_version=$(BUILDTOOLVER) | $(edit) >$@ @mkdir -p $$(dir $$@)
@chmod a-w "$@" @$(RM) "$$@"
@chmod +x "$@" @{ echo -n 'm4_changequote([[[,]]])'; cat $$<; } | m4 -P --define=m4_devtools_version=$$(BUILDTOOLVER) | $(edit) >$$@
@bash -O extglob -n "$@" @chmod $(3) "$$@"
@bash -O extglob -n "$$@"
endef
$(MANS): doc/asciidoc.conf doc/footer.asciidoc $(eval $(call buildInScript,build/bin,src/,555))
$(foreach completion,$(wildcard contrib/completion/*),$(eval $(call buildInScript,build/$(completion),$(completion)/,444)))
doc/%: doc/%.asciidoc $(BUILDDIR)/doc/man/%: doc/man/%.asciidoc doc/asciidoc.conf doc/man/include/footer.asciidoc
a2x --no-xmllint --asciidoc-opts="-f doc/asciidoc.conf" -d manpage -f manpage -D doc -a pkgdatadir=$(PREFIX)/share/devtools $< $(GEN_MSG)
@mkdir -p $(BUILDDIR)/doc/man
@a2x --no-xmllint --asciidoc-opts="-f doc/asciidoc.conf" -d manpage -f manpage --destination-dir=$(BUILDDIR)/doc/man -a pkgdatadir=$(PREFIX)/share/devtools $<
clean: clean:
rm -f $(IN_PROGS) bash_completion zsh_completion $(MANS) rm -rf $(BUILDDIR)
install: install: all
install -dm0755 $(DESTDIR)$(PREFIX)/bin install -dm0755 $(DESTDIR)$(PREFIX)/bin
install -dm0755 $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d install -dm0755 $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d
install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin
install -m0644 ${CONFIGFILES} $(DESTDIR)$(PREFIX)/share/devtools for conf in ${MAKEPKG_CONFIGS}; do install -Dm0644 $$conf $(DESTDIR)$(PREFIX)/share/devtools/makepkg-$${conf##*/}; done
for a in ${SETARCH_ALIASES}; do install -m0644 setarch-aliases.d/$$a $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d; done for conf in ${PACMAN_CONFIGS}; do install -Dm0644 $$conf $(DESTDIR)$(PREFIX)/share/devtools/pacman-$${conf##*/}; done
for a in ${SETARCH_ALIASES}; do install -m0644 $$a -t $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d; done
for l in ${COMMITPKG_LINKS}; do ln -sf commitpkg $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${COMMITPKG_LINKS}; do ln -sf commitpkg $(DESTDIR)$(PREFIX)/bin/$$l; done
for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done
for l in ${CROSSREPOMOVE_LINKS}; do ln -sf crossrepomove $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${CROSSREPOMOVE_LINKS}; do ln -sf crossrepomove $(DESTDIR)$(PREFIX)/bin/$$l; done
ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
install -Dm0644 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/devtools install -Dm0644 $(BUILDDIR)/contrib/completion/bash/devtools $(DESTDIR)$(PREFIX)/share/bash-completion/completions/devtools
for l in ${BASHCOMPLETION_LINKS}; do ln -sf devtools $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$$l; done for l in ${BASHCOMPLETION_LINKS}; do ln -sf devtools $(DESTDIR)$(PREFIX)/share/bash-completion/completions/$$l; done
install -Dm0644 zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools install -Dm0644 $(BUILDDIR)/contrib/completion/zsh/_devtools $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
ln -sf archco $(DESTDIR)$(PREFIX)/bin/communityco ln -sf archco $(DESTDIR)$(PREFIX)/bin/communityco
for manfile in $(MANS); do \ for manfile in $(MANS); do \
install -Dm644 $$manfile -t $(DESTDIR)$(MANDIR)/man$${manfile##*.}; \ install -Dm644 $$manfile -t $(DESTDIR)$(MANDIR)/man$${manfile##*.}; \
done; done;
uninstall: uninstall:
for f in ${BINPROGS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done for f in $(notdir $(BINPROGS)); do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
for f in ${CONFIGFILES}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/$$f; done for conf in ${MAKEPKG_CONFIGS}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/makepkg-$${conf##*/}; done
for f in ${SETARCH_ALIASES}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d/$$f; done for conf in ${PACMAN_CONFIGS}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/pacman-$${conf##*/}; done
for f in $(notdir $(SETARCH_ALIASES)); do rm -f $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d/$$f; done
for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
for l in ${CROSSREPOMOVE_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done for l in ${CROSSREPOMOVE_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done
@@ -140,9 +123,8 @@ uninstall:
rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
rm -f $(DESTDIR)$(PREFIX)/bin/communityco rm -f $(DESTDIR)$(PREFIX)/bin/communityco
rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides
for manfile in $(MANS); do \ for manfile in $(notdir $(MANS)); do rm -f $(DESTDIR)$(MANDIR)/man$${manfile##*.}/$${manfile}; done;
rm -f $(DESTDIR)$(MANDIR)/man$${manfile##*.}/$${manfile#doc/}; \ rmdir --ignore-fail-on-non-empty $(DESTDIR)$(PREFIX)/share/devtools/setarch-aliases.d $(DESTDIR)$(PREFIX)/share/devtools
done;
TODAY=$(shell date +"%Y%m%d") TODAY=$(shell date +"%Y%m%d")
tag: tag:
@@ -157,8 +139,8 @@ dist:
upload: upload:
scp devtools-$(V).tar.gz devtools-$(V).tar.gz.sig repos.archlinux.org:/srv/ftp/other/devtools/ scp devtools-$(V).tar.gz devtools-$(V).tar.gz.sig repos.archlinux.org:/srv/ftp/other/devtools/
check: $(BINPROGS) bash_completion makepkg-x86_64.conf PKGBUILD.proto check: $(BINPROGS) $(BUILDDIR)/contrib/completion/bash/devtools config/makepkg/x86_64.conf contrib/makepkg/PKGBUILD.proto
shellcheck $^ shellcheck $^
.PHONY: all clean install uninstall dist upload check tag .PHONY: all completion man clean install uninstall dist upload check tag
.DELETE_ON_ERROR: .DELETE_ON_ERROR:

View File

@@ -3,17 +3,6 @@
This repository contains tools for the Arch Linux distribution for building This repository contains tools for the Arch Linux distribution for building
and maintaining official repository packages. and maintaining official repository packages.
## Patches
Patches can be send to arch-projects@archlinux.org or via a pull request on
Github. When sending patches to the mailing list make sure to set a valid
subjectprefix otherwise the email is denied by mailman. Git can be configured
as following.
```
git config format.subjectprefix 'devtools] [PATCH'
```
## Building ## Building
When building official distro packages the `BUILDTOOLVER` needs to be set to the When building official distro packages the `BUILDTOOLVER` needs to be set to the

View File

@@ -0,0 +1,162 @@
#!/hint/bash
# shellcheck disable=2034
#
# /etc/makepkg.conf
#
#########################################################################
# SOURCE ACQUISITION
#########################################################################
#
#-- The download utilities that makepkg should use to acquire sources
# Format: 'protocol::agent'
DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
# Other common tools:
# /usr/bin/snarf
# /usr/bin/lftpget -c
# /usr/bin/wget
#-- The package required by makepkg to download VCS sources
# Format: 'protocol::package'
VCSCLIENTS=('bzr::bzr'
'fossil::fossil'
'git::git'
'hg::mercurial'
'svn::subversion')
#########################################################################
# ARCHITECTURE, COMPILE FLAGS
#########################################################################
#
CARCH="x86_64_v3"
CHOST="x86_64-pc-linux-gnu"
#-- Compiler and Linker Flags
#CPPFLAGS=""
CFLAGS="-march=x86-64-v3 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
LTOFLAGS="-flto=auto"
#RUSTFLAGS="-C opt-level=2"
#-- Make Flags: change this for DistCC/SMP systems
#MAKEFLAGS="-j2"
#-- Debugging flags
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
#DEBUG_RUSTFLAGS="-C debuginfo=2"
#########################################################################
# BUILD ENVIRONMENT
#########################################################################
#
# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
# A negated environment option will do the opposite of the comments below.
#
#-- distcc: Use the Distributed C/C++/ObjC compiler
#-- color: Colorize output messages
#-- ccache: Use ccache to cache compilation
#-- check: Run the check() function if present in the PKGBUILD
#-- sign: Generate PGP signature file
#
BUILDENV=(!distcc color !ccache check !sign)
#
#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
#-- specify a space-delimited list of hosts running in the DistCC cluster.
#DISTCC_HOSTS=""
#
#-- Specify a directory for package building.
#BUILDDIR=/tmp/makepkg
#########################################################################
# GLOBAL PACKAGE OPTIONS
# These are default values for the options=() settings
#########################################################################
#
# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
# A negated option will do the opposite of the comments below.
#
#-- strip: Strip symbols from binaries/libraries
#-- docs: Save doc directories specified by DOC_DIRS
#-- libtool: Leave libtool (.la) files in packages
#-- staticlibs: Leave static library (.a) files in packages
#-- emptydirs: Leave empty directories in packages
#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
#-- purge: Remove files specified by PURGE_TARGETS
#-- debug: Add debugging flags as specified in DEBUG_* variables
#-- lto: Add compile flags for building with link time optimization
#
OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug lto)
#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
INTEGRITY_CHECK=(sha256)
#-- Options to be used when stripping binaries. See `man strip' for details.
STRIP_BINARIES="--strip-all"
#-- Options to be used when stripping shared libraries. See `man strip' for details.
STRIP_SHARED="--strip-unneeded"
#-- Options to be used when stripping static libraries. See `man strip' for details.
STRIP_STATIC="--strip-debug"
#-- Manual (man and info) directories to compress (if zipman is specified)
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
#-- Doc directories to remove (if !docs is specified)
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
#-- Files to be removed from all packages (if purge is specified)
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
#-- Directory to store source code in for debug packages
DBGSRCDIR="/usr/src/debug"
#########################################################################
# PACKAGE OUTPUT
#########################################################################
#
# Default: put built package and cached source in build directory
#
#-- Destination: specify a fixed directory where all packages will be placed
#PKGDEST=/home/packages
#-- Source cache: specify a fixed directory where source files will be cached
#SRCDEST=/home/sources
#-- Source packages: specify a fixed directory where all src packages will be placed
#SRCPKGDEST=/home/srcpackages
#-- Log files: specify a fixed directory where all log files will be placed
#LOGDEST=/home/makepkglogs
#-- Packager: name/email of the person or organization building packages
#PACKAGER="John Doe <john@doe.com>"
#-- Specify a key to use for package signing
#GPGKEY=""
#########################################################################
# COMPRESSION DEFAULTS
#########################################################################
#
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSZST=(zstd -c -T0 --ultra -20 -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)
#########################################################################
# EXTENSION DEFAULTS
#########################################################################
#
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'
#########################################################################
# OTHER
#########################################################################
#
#-- Command used to run pacman as root, instead of trying sudo and su
#PACMAN_AUTH=()
# vim: set ft=sh ts=2 sw=2 et:

View File

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

View File

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

View File

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

View File

@@ -0,0 +1 @@
x86_64

View File

@@ -37,4 +37,4 @@ Options
*-h*:: *-h*::
Show this usage message Show this usage message
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -44,4 +44,4 @@ See Also
linkman:devtools[7] linkman:devtools[7]
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -40,4 +40,4 @@ See Also
linkman:find-libprovides[1] linkman:find-libprovides[1]
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -25,7 +25,7 @@ linkman:arch-nspawn[1]
Run a command or OS in a light-weight namespace container Run a command or OS in a light-weight namespace container
linkman:checkpkg[1] linkman:checkpkg[1]
Compare the current build pakcage with the repository version Compare the current build package with the repository version
linkman:find-libdeps[1] linkman:find-libdeps[1]
Find soname dependencies for a package Find soname dependencies for a package
@@ -52,4 +52,4 @@ linkman:offload-build[1]
linkman:sogrep[1] linkman:sogrep[1]
Find packages using a linked to a given shared library Find packages using a linked to a given shared library
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -54,4 +54,4 @@ Modes
See Also See Also
-------- --------
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -22,4 +22,4 @@ Options
*-h, --help*:: *-h, --help*::
Show a help text. Show a help text.
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -21,4 +21,4 @@ Options
Ignore internal libraries. Ignore internal libraries.
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -21,4 +21,4 @@ Options
*--ignore-internal*:: *--ignore-internal*::
Ignore internal libraries. Ignore internal libraries.
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -1,9 +1,7 @@
Bugs Bugs
---- ----
Bugs can be reported on the bug tracker 'https://bugs.archlinux.org' in the Arch Bugs can be reported on the project's GitLab bug tracker 'https://gitlab.archlinux.org/archlinux/devtools'
Linux category and title prefixed with [devtools] or via
mailto:arch-projects@archlinux.org[].
Authors Authors

View File

@@ -22,4 +22,4 @@ See Also
linkman:ldd[1] linkman:ldd[1]
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -73,4 +73,4 @@ Options
*-U*:: *-U*::
Run makepkg as a specified user Run makepkg as a specified user
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -56,4 +56,4 @@ Options
*-h*:: *-h*::
Show this usage message Show this usage message
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -46,4 +46,4 @@ See Also
linkman:pacman[1] linkman:pacman[1]
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -49,4 +49,4 @@ Example: To use a second `testing-x86_64-build` instance with another copydir:
`offload-build -r testing -- -- -l <chroot_copy>` `offload-build -r testing -- -- -l <chroot_copy>`
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -45,4 +45,4 @@ Environment Variables
directory set by the **XDG_CACHE_HOME** environment variable or the directory set by the **XDG_CACHE_HOME** environment variable or the
**HOME** environment variable if **XDG_CACHE_HOME** is not set. **HOME** environment variable if **XDG_CACHE_HOME** is not set.
include::footer.asciidoc[] include::include/footer.asciidoc[]

View File

@@ -51,11 +51,6 @@ fi
pushd .. >/dev/null pushd .. >/dev/null
mapfile -t known_files < <(svn ls -r HEAD "$trunk") mapfile -t known_files < <(svn ls -r HEAD "$trunk")
wait $! || die "failed to discover committed files" wait $! || die "failed to discover committed files"
for file in "${known_files[@]}"; do
if [[ ${file:(-1)} = '/' ]]; then
die "archrelease: subdirectories are not supported in package directories!"
fi
done
# gracefully handle files containing an "@" character # gracefully handle files containing an "@" character
known_files=("${known_files[@]/%/@}") known_files=("${known_files[@]/%/@}")
@@ -67,7 +62,7 @@ for tag in "$@"; do
stat_busy "Copying %s to %s" "${trunk}" "${tag}" stat_busy "Copying %s to %s" "${trunk}" "${tag}"
if [[ -d repos/$tag ]]; then if [[ -d repos/$tag ]]; then
mapfile -t trash < <(svn ls "repos/$tag") mapfile -t trash < <(svn ls --recursive "repos/$tag")
wait $! || die "failed to discover existing files" wait $! || die "failed to discover existing files"
if (( ${#trash[@]} )); then if (( ${#trash[@]} )); then
trash=("${trash[@]/#/repos/$tag/}") trash=("${trash[@]/#/repos/$tag/}")

View File

@@ -63,7 +63,7 @@ done
# Source makepkg.conf; fail if it is not found # Source makepkg.conf; fail if it is not found
if [[ -r "${MAKEPKG_CONF}" ]]; then if [[ -r "${MAKEPKG_CONF}" ]]; then
# shellcheck source=makepkg-x86_64.conf # shellcheck source=config/makepkg/x86_64.conf
source "${MAKEPKG_CONF}" source "${MAKEPKG_CONF}"
else else
die "${MAKEPKG_CONF} not found!" die "${MAKEPKG_CONF} not found!"
@@ -82,7 +82,7 @@ if [[ ! -f PKGBUILD ]]; then
die 'This must be run in the directory of a built package.' die 'This must be run in the directory of a built package.'
fi fi
# shellcheck source=PKGBUILD.proto # shellcheck source=contrib/makepkg/PKGBUILD.proto
. ./PKGBUILD . ./PKGBUILD
if [[ ${arch[0]} == 'any' ]]; then if [[ ${arch[0]} == 'any' ]]; then
CARCH='any' CARCH='any'

View File

@@ -6,7 +6,7 @@ m4_include(lib/common.sh)
# Source makepkg.conf; fail if it is not found # Source makepkg.conf; fail if it is not found
if [[ -r '/etc/makepkg.conf' ]]; then if [[ -r '/etc/makepkg.conf' ]]; then
# shellcheck source=makepkg-x86_64.conf # shellcheck source=config/makepkg/x86_64.conf
source '/etc/makepkg.conf' source '/etc/makepkg.conf'
else else
die '/etc/makepkg.conf not found!' die '/etc/makepkg.conf not found!'
@@ -22,16 +22,8 @@ elif [[ -r "$HOME/.makepkg.conf" ]]; then
fi fi
cmd=${0##*/} cmd=${0##*/}
rsyncopts=(-e ssh -p '--chmod=ug=rw,o=r' -c -h -L --progress --partial -y)
if [[ ! -f PKGBUILD ]]; then archreleaseopts=()
die 'No PKGBUILD file'
fi
source=()
# shellcheck source=PKGBUILD.proto
. ./PKGBUILD
pkgbase=${pkgbase:-$pkgname}
case "$cmd" in case "$cmd" in
commitpkg) commitpkg)
if (( $# == 0 )); then if (( $# == 0 )); then
@@ -47,7 +39,26 @@ case "$cmd" in
die 'Usage: commitpkg <reponame> [-f] [-s server] [-l limit] [-a arch] [commit message]' die 'Usage: commitpkg <reponame> [-f] [-s server] [-l limit] [-a arch] [commit message]'
;; ;;
esac esac
while getopts ':l:a:s:f' flag; do
case $flag in
f) archreleaseopts+=('-f') ;;
s) server=$OPTARG ;;
l) rsyncopts+=("--bwlimit=$OPTARG") ;;
a) commit_arch=$OPTARG ;;
:) die "Option requires an argument -- '%s'" "$OPTARG" ;;
\?) die "Invalid option -- '%s'" "$OPTARG" ;;
esac
done
shift $(( OPTIND - 1 ))
if [[ ! -f PKGBUILD ]]; then
die 'No PKGBUILD file'
fi
source=()
# shellcheck source=contrib/makepkg/PKGBUILD.proto
. ./PKGBUILD
pkgbase=${pkgbase:-$pkgname}
if (( ${#validpgpkeys[@]} != 0 )); then if (( ${#validpgpkeys[@]} != 0 )); then
if [[ -d keys ]]; then if [[ -d keys ]]; then
@@ -88,20 +99,6 @@ if (( ${#needsversioning[*]} )); then
(( ${#unversioned[*]} )) && die "%s is not under version control" "${unversioned[@]}" (( ${#unversioned[*]} )) && die "%s is not under version control" "${unversioned[@]}"
fi fi
rsyncopts=(-e ssh -p '--chmod=ug=rw,o=r' -c -h -L --progress --partial -y)
archreleaseopts=()
while getopts ':l:a:s:f' flag; do
case $flag in
f) archreleaseopts+=('-f') ;;
s) server=$OPTARG ;;
l) rsyncopts+=("--bwlimit=$OPTARG") ;;
a) commit_arch=$OPTARG ;;
:) die "Option requires an argument -- '%s'" "$OPTARG" ;;
\?) die "Invalid option -- '%s'" "$OPTARG" ;;
esac
done
shift $(( OPTIND - 1 ))
# check packages for validity # check packages for validity
for _arch in "${arch[@]}"; do for _arch in "${arch[@]}"; do
if [[ -n $commit_arch && ${_arch} != "$commit_arch" ]]; then if [[ -n $commit_arch && ${_arch} != "$commit_arch" ]]; then

View File

@@ -45,7 +45,7 @@ msg "Downloading sources for %s" "${pkgbase}"
svn -q checkout -N "${target_svn}" target_checkout svn -q checkout -N "${target_svn}" target_checkout
mkdir -p "target_checkout/${pkgbase}/repos" mkdir -p "target_checkout/${pkgbase}/repos"
svn -q export "${source_svn}/${pkgbase}/trunk" "target_checkout/${pkgbase}/trunk" || die svn -q export "${source_svn}/${pkgbase}/trunk" "target_checkout/${pkgbase}/trunk" || die
# shellcheck source=PKGBUILD.proto # shellcheck source=contrib/makepkg/PKGBUILD.proto
. "target_checkout/${pkgbase}/trunk/PKGBUILD" . "target_checkout/${pkgbase}/trunk/PKGBUILD"
msg "Downloading packages for %s" "${pkgbase}" msg "Downloading packages for %s" "${pkgbase}"

View File

@@ -92,7 +92,7 @@ fi
# Source makepkg.conf; fail if it is not found # Source makepkg.conf; fail if it is not found
if [[ -r "${MAKEPKG_CONF}" ]]; then if [[ -r "${MAKEPKG_CONF}" ]]; then
# shellcheck source=makepkg-x86_64.conf # shellcheck source=config/makepkg/x86_64.conf
source "${MAKEPKG_CONF}" source "${MAKEPKG_CONF}"
else else
die "${MAKEPKG_CONF} not found!" die "${MAKEPKG_CONF} not found!"
@@ -196,7 +196,7 @@ if (( $# < 2 )); then
die "This must be run in the directory of a built package.\nTry '$(basename "$0") --help' for more information." die "This must be run in the directory of a built package.\nTry '$(basename "$0") --help' for more information."
fi fi
# shellcheck source=PKGBUILD.proto # shellcheck source=contrib/makepkg/PKGBUILD.proto
. ./PKGBUILD . ./PKGBUILD
if [[ ${arch[0]} == 'any' ]]; then if [[ ${arch[0]} == 'any' ]]; then
CARCH='any' CARCH='any'

View File

@@ -37,7 +37,9 @@ fi
mapfile -t validpgpkeys < <( mapfile -t validpgpkeys < <(
# shellcheck source=PKGBUILD.proto # shellcheck source=PKGBUILD.proto
. ./PKGBUILD . ./PKGBUILD
printf "%s\n" "${validpgpkeys[@]}" if (( ${#validpgpkeys[@]} )); then
printf "%s\n" "${validpgpkeys[@]}"
fi
) )
msg "Exporting ${#validpgpkeys[@]} PGP keys..." msg "Exporting ${#validpgpkeys[@]} PGP keys..."

View File

@@ -20,7 +20,7 @@ fi
find . -type d -print0 2>/dev/null| while read -r -d '' d; do find . -type d -print0 2>/dev/null| while read -r -d '' d; do
if [[ -f "$d/PKGBUILD" ]]; then if [[ -f "$d/PKGBUILD" ]]; then
pkgname=() depends=() makedepends=() optdepends=() pkgname=() depends=() makedepends=() optdepends=()
# shellcheck source=PKGBUILD.proto # shellcheck source=contrib/makepkg/PKGBUILD.proto
. "$d/PKGBUILD" . "$d/PKGBUILD"
for dep in "${depends[@]}"; do for dep in "${depends[@]}"; do
# lose the version comparator, if any # lose the version comparator, if any

0
makerepropkg.in → src/makerepropkg.in Executable file → Normal file
View File

0
offload-build.in → src/offload-build.in Executable file → Normal file
View File

View File

@@ -22,7 +22,7 @@ fi
# Source makepkg.conf; fail if it is not found # Source makepkg.conf; fail if it is not found
if [[ -r '/etc/makepkg.conf' ]]; then if [[ -r '/etc/makepkg.conf' ]]; then
# shellcheck source=makepkg-x86_64.conf # shellcheck source=config/makepkg/x86_64.conf
source '/etc/makepkg.conf' source '/etc/makepkg.conf'
else else
die '/etc/makepkg.conf not found!' die '/etc/makepkg.conf not found!'
@@ -54,7 +54,7 @@ bump_pkgrel() {
pkg_from_pkgbuild() { pkg_from_pkgbuild() {
# we want the sourcing to be done in a subshell so we don't pollute our current namespace # we want the sourcing to be done in a subshell so we don't pollute our current namespace
export CARCH PKGEXT export CARCH PKGEXT
# shellcheck source=PKGBUILD.proto # shellcheck source=contrib/makepkg/PKGBUILD.proto
(source PKGBUILD; echo "$pkgname-$pkgver-$pkgrel-$CARCH$PKGEXT") (source PKGBUILD; echo "$pkgname-$pkgver-$pkgrel-$CARCH$PKGEXT")
} }

0
sogrep.in → src/sogrep.in Executable file → Normal file
View File