mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 18:06:19 +02:00
Compare commits
44 Commits
20191016
...
github/for
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6b7792202f | ||
![]() |
5b1123e11f | ||
![]() |
a0f79fcce0 | ||
![]() |
94b0413e13 | ||
![]() |
e963b6da9e | ||
![]() |
b2cbb8628e | ||
![]() |
6d273f79c3 | ||
![]() |
51842a1676 | ||
![]() |
53fe5c67a1 | ||
![]() |
21d9984acc | ||
![]() |
cb6484fe45 | ||
![]() |
bcb1b4a163 | ||
![]() |
57fb44b976 | ||
![]() |
9b4d8ae930 | ||
![]() |
4c206ab549 | ||
![]() |
4c08847bfa | ||
![]() |
74d7a70915 | ||
![]() |
5eacb475cd | ||
![]() |
bcda211dd8 | ||
![]() |
d4546c59ce | ||
![]() |
d6866e0544 | ||
![]() |
8edad22616 | ||
![]() |
f20435643f | ||
![]() |
8d99df602d | ||
![]() |
4c803b9db8 | ||
![]() |
104c5bc90e | ||
![]() |
cee28a1b13 | ||
![]() |
e0f82d3947 | ||
![]() |
74313db9ee | ||
![]() |
2c611d20bd | ||
![]() |
ca4d348c86 | ||
![]() |
2fb1cc2dd2 | ||
![]() |
bcba566405 | ||
![]() |
f8f2f02028 | ||
![]() |
68f0bff172 | ||
![]() |
f85a58a0a6 | ||
![]() |
20eec484fa | ||
![]() |
6fffbfbc8a | ||
![]() |
0017263379 | ||
![]() |
751093eff2 | ||
![]() |
f43a86ee8a | ||
![]() |
0067176529 | ||
![]() |
75d23eec94 | ||
![]() |
6679c28625 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -9,7 +9,9 @@ commitpkg
|
|||||||
finddeps
|
finddeps
|
||||||
lddd
|
lddd
|
||||||
makechrootpkg
|
makechrootpkg
|
||||||
|
makerepropkg
|
||||||
mkarchroot
|
mkarchroot
|
||||||
|
offload-build
|
||||||
rebuildpkgs
|
rebuildpkgs
|
||||||
zsh_completion
|
zsh_completion
|
||||||
find-libdeps
|
find-libdeps
|
||||||
|
22
Makefile
22
Makefile
@@ -1,27 +1,28 @@
|
|||||||
V=20191016
|
V=20200213
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
MANDIR = $(PREFIX)/share/man
|
MANDIR = $(PREFIX)/share/man
|
||||||
|
|
||||||
IN_PROGS = \
|
IN_PROGS = \
|
||||||
checkpkg \
|
|
||||||
commitpkg \
|
|
||||||
archco \
|
archco \
|
||||||
|
arch-nspawn \
|
||||||
archrelease \
|
archrelease \
|
||||||
archbuild \
|
archbuild \
|
||||||
lddd \
|
checkpkg \
|
||||||
finddeps \
|
commitpkg \
|
||||||
rebuildpkgs \
|
|
||||||
find-libdeps \
|
|
||||||
crossrepomove\
|
crossrepomove\
|
||||||
arch-nspawn \
|
finddeps \
|
||||||
|
find-libdeps \
|
||||||
|
lddd \
|
||||||
|
makerepropkg \
|
||||||
mkarchroot \
|
mkarchroot \
|
||||||
makechrootpkg \
|
makechrootpkg \
|
||||||
|
offload-build \
|
||||||
|
rebuildpkgs \
|
||||||
sogrep
|
sogrep
|
||||||
|
|
||||||
BINPROGS = \
|
BINPROGS = \
|
||||||
$(IN_PROGS) \
|
$(IN_PROGS)
|
||||||
offload-build \
|
|
||||||
|
|
||||||
CONFIGFILES = \
|
CONFIGFILES = \
|
||||||
makepkg-x86_64.conf \
|
makepkg-x86_64.conf \
|
||||||
@@ -71,6 +72,7 @@ MANS = \
|
|||||||
doc/checkpkg.1 \
|
doc/checkpkg.1 \
|
||||||
doc/offload-build.1 \
|
doc/offload-build.1 \
|
||||||
doc/sogrep.1 \
|
doc/sogrep.1 \
|
||||||
|
doc/makerepropkg.1 \
|
||||||
doc/mkarchroot.1 \
|
doc/mkarchroot.1 \
|
||||||
doc/find-libdeps.1 \
|
doc/find-libdeps.1 \
|
||||||
doc/find-libprovides.1
|
doc/find-libprovides.1
|
||||||
|
@@ -20,6 +20,7 @@ umask 0022
|
|||||||
working_dir=''
|
working_dir=''
|
||||||
|
|
||||||
files=()
|
files=()
|
||||||
|
mount_args=()
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [options] working-dir [systemd-nspawn arguments]"
|
echo "Usage: ${0##*/} [options] working-dir [systemd-nspawn arguments]"
|
||||||
@@ -30,7 +31,6 @@ usage() {
|
|||||||
echo ' -M <file> Location of a makepkg config file'
|
echo ' -M <file> Location of a makepkg config file'
|
||||||
echo ' -c <dir> Set pacman cache'
|
echo ' -c <dir> Set pacman cache'
|
||||||
echo ' -f <file> Copy file from the host to the chroot'
|
echo ' -f <file> Copy file from the host to the chroot'
|
||||||
echo ' -s Do not run setarch'
|
|
||||||
echo ' -h This message'
|
echo ' -h This message'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,6 @@ while getopts 'hC:M:c:f:s' arg; do
|
|||||||
M) makepkg_conf="$OPTARG" ;;
|
M) makepkg_conf="$OPTARG" ;;
|
||||||
c) cache_dirs+=("$OPTARG") ;;
|
c) cache_dirs+=("$OPTARG") ;;
|
||||||
f) files+=("$OPTARG") ;;
|
f) files+=("$OPTARG") ;;
|
||||||
s) nosetarch=1 ;;
|
|
||||||
h|?) usage ;;
|
h|?) usage ;;
|
||||||
*) error "invalid argument '%s'" "$arg"; usage ;;
|
*) error "invalid argument '%s'" "$arg"; usage ;;
|
||||||
esac
|
esac
|
||||||
@@ -65,40 +64,37 @@ fi
|
|||||||
# shellcheck disable=2016
|
# shellcheck disable=2016
|
||||||
host_mirrors=($($pacconf_cmd --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
|
host_mirrors=($($pacconf_cmd --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#'))
|
||||||
|
|
||||||
|
for host_mirror in "${host_mirrors[@]}"; do
|
||||||
|
if [[ $host_mirror == *file://* ]]; then
|
||||||
|
host_mirror=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
|
||||||
|
for m in "$host_mirror"/pool/*/; do
|
||||||
|
in_array "$m" "${cache_dirs[@]}" || cache_dirs+=("$m")
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
mapfile -t lines < <($pacconf_cmd --config "${pac_conf:-$working_dir/etc/pacman.conf}" \
|
mapfile -t lines < <($pacconf_cmd --config "${pac_conf:-$working_dir/etc/pacman.conf}" \
|
||||||
--repo $line Server | sed -r 's#(.*/)[^/]+/os/.+#\1$repo/os/$arch#')
|
--repo $line Server | sed -r 's#(.*/)[^/]+/os/.+#\1#')
|
||||||
if [[ ${lines[0]} != ${host_mirrors[0]} ]]; then
|
|
||||||
for line in "${lines[@]}"; do
|
for line in "${lines[@]}"; do
|
||||||
if [[ $line = file://* ]]; then
|
if [[ $line = file://* ]]; then
|
||||||
line=${line#file://}
|
line=${line#file://}
|
||||||
in_array "$line" "${cache_dirs[@]}" || cache_dirs+=("$line")
|
in_array "$line" "${cache_dirs[@]}" || cache_dirs+=("$line")
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
done < <($pacconf_cmd --config "${pac_conf:-$working_dir/etc/pacman.conf}" --repo-list)
|
done < <($pacconf_cmd --config "${pac_conf:-$working_dir/etc/pacman.conf}" --repo-list)
|
||||||
|
|
||||||
# {{{ functions
|
mount_args+=("--bind=${cache_dirs[0]//:/\\:}")
|
||||||
build_mount_args() {
|
|
||||||
declare -g mount_args=()
|
|
||||||
|
|
||||||
for host_mirror in "${host_mirrors[@]}"; do
|
for cache_dir in "${cache_dirs[@]:1}"; do
|
||||||
if [[ $host_mirror == *file://* ]]; then
|
|
||||||
host_mirror_path=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')
|
|
||||||
mount_args+=("--bind-ro=${host_mirror_path//:/\\:}")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
mount_args+=("--bind=${cache_dirs[0]//:/\\:}")
|
|
||||||
|
|
||||||
for cache_dir in "${cache_dirs[@]:1}"; do
|
|
||||||
mount_args+=("--bind-ro=${cache_dir//:/\\:}")
|
mount_args+=("--bind-ro=${cache_dir//:/\\:}")
|
||||||
done
|
done
|
||||||
}
|
|
||||||
|
|
||||||
|
# {{{ functions
|
||||||
copy_hostconf () {
|
copy_hostconf () {
|
||||||
unshare --fork --pid gpg --homedir "$working_dir"/etc/pacman.d/gnupg/ --no-permission-warning --quiet --batch --import --import-options import-local-sigs "$(pacman-conf GpgDir)"/pubring.gpg >/dev/null 2>&1
|
unshare --fork --pid gpg --homedir "$working_dir"/etc/pacman.d/gnupg/ --no-permission-warning --quiet --batch --import --import-options import-local-sigs "$(pacman-conf GpgDir)"/pubring.gpg >/dev/null 2>&1
|
||||||
pacman-key --gpgdir "$working_dir"/etc/pacman.d/gnupg/ --import-trustdb "$(pacman-conf GpgDir)" >/dev/null 2>&1
|
pacman-key --gpgdir "$working_dir"/etc/pacman.d/gnupg/ --import-trustdb "$(pacman-conf GpgDir)" >/dev/null 2>&1
|
||||||
|
|
||||||
printf 'Server = %s\n' "${host_mirrors[@]}" >"$working_dir/etc/pacman.d/mirrorlist"
|
printf 'Server = %s\n' "${host_mirrors[@]}" >"$working_dir/etc/pacman.d/mirrorlist"
|
||||||
|
|
||||||
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
|
[[ -n $pac_conf ]] && cp "$pac_conf" "$working_dir/etc/pacman.conf"
|
||||||
@@ -123,12 +119,10 @@ elif [[ $(cat "$working_dir/.arch-chroot") != "$CHROOT_VERSION" ]]; then
|
|||||||
die "chroot '%s' is not at version %s. Please rebuild." "$working_dir" "$CHROOT_VERSION"
|
die "chroot '%s' is not at version %s. Please rebuild." "$working_dir" "$CHROOT_VERSION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build_mount_args
|
|
||||||
copy_hostconf
|
copy_hostconf
|
||||||
|
|
||||||
eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")"
|
eval "$(grep -a '^CARCH=' "$working_dir/etc/makepkg.conf")"
|
||||||
|
setarch --list | grep -qx "$CARCH" || unset CARCH
|
||||||
[[ -z $nosetarch ]] || unset CARCH
|
|
||||||
|
|
||||||
exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \
|
exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \
|
||||||
-D "$working_dir" \
|
-D "$working_dir" \
|
||||||
|
@@ -68,8 +68,11 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then
|
|||||||
lock_close 9
|
lock_close 9
|
||||||
|
|
||||||
rm -rf --one-file-system "${chroots}/${repo}-${arch}"
|
rm -rf --one-file-system "${chroots}/${repo}-${arch}"
|
||||||
mkdir -m755 -p "${chroots}/${repo}-${arch}"
|
(umask 0022; mkdir -p "${chroots}/${repo}-${arch}")
|
||||||
setarch "${arch}" mkarchroot \
|
|
||||||
|
setarch --list | grep -qx "$arch" && setarch_cmd="setarch $arch"
|
||||||
|
|
||||||
|
${setarch_cmd} mkarchroot \
|
||||||
-C "${pacman_config}" \
|
-C "${pacman_config}" \
|
||||||
-M "${makepkg_config}" \
|
-M "${makepkg_config}" \
|
||||||
"${chroots}/${repo}-${arch}/root" \
|
"${chroots}/${repo}-${arch}/root" \
|
||||||
|
@@ -95,8 +95,10 @@ for _pkgname in "${pkgname[@]}"; do
|
|||||||
|
|
||||||
if (( $# )); then
|
if (( $# )); then
|
||||||
case $1 in
|
case $1 in
|
||||||
|
*://*)
|
||||||
|
pkgurl=$1 ;;
|
||||||
/*|*/*)
|
/*|*/*)
|
||||||
pkgurl=file://$(readlink -m "$1") ;;
|
pkgurl=$(readlink -m "$1") ;;
|
||||||
*.pkg.tar*)
|
*.pkg.tar*)
|
||||||
pkgurl=$1 ;;
|
pkgurl=$1 ;;
|
||||||
'')
|
'')
|
||||||
|
@@ -109,10 +109,10 @@ if [[ -z $server ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n $(svn status -q) ]]; then
|
if [[ -n $(svn status -q) ]]; then
|
||||||
msgtemplate="upgpkg: $pkgbase $(get_full_version)"$'\n\n'
|
msgtemplate="upgpkg: $pkgbase $(get_full_version)"
|
||||||
if [[ -n $1 ]]; then
|
if [[ -n $1 ]]; then
|
||||||
stat_busy 'Committing changes to trunk'
|
stat_busy 'Committing changes to trunk'
|
||||||
svn commit -q -m "${msgtemplate}${1}" || die
|
svn commit -q -m "${msgtemplate}: ${1}" || die
|
||||||
stat_done
|
stat_done
|
||||||
else
|
else
|
||||||
msgfile="$(mktemp)"
|
msgfile="$(mktemp)"
|
||||||
|
45
doc/makerepropkg.1.asciidoc
Normal file
45
doc/makerepropkg.1.asciidoc
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
makerepropkg(1)
|
||||||
|
================
|
||||||
|
|
||||||
|
Name
|
||||||
|
----
|
||||||
|
makerepropkg - Rebuild a package to see if it is reproducible
|
||||||
|
|
||||||
|
Synopsis
|
||||||
|
--------
|
||||||
|
makerepropkg [OPTIONS] <package_file>...
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
|
Given the path to a built pacman package(s), attempt to rebuild it using the
|
||||||
|
PKGBUILD in the current directory. The package will be built in an environment
|
||||||
|
as closely matching the environment of the initial package as possible, by
|
||||||
|
building up a chroot to match the information exposed in the package's
|
||||||
|
linkman:BUILDINFO[5] manifest. On success, the resulting package will be
|
||||||
|
compared to the input package, and makerepropkg will report whether the
|
||||||
|
artifacts are identical.
|
||||||
|
|
||||||
|
When given multiple packages, additional package files are assumed to be split
|
||||||
|
packages and will be treated as additional artifacts to compare during the
|
||||||
|
verification step.
|
||||||
|
|
||||||
|
This implements a verifier for pacman/libalpm packages in accordance with the
|
||||||
|
link:https://reproducible-builds.org/[Reproducible Builds] project.
|
||||||
|
|
||||||
|
Options
|
||||||
|
-------
|
||||||
|
|
||||||
|
*-d*::
|
||||||
|
If packages are not reproducible, compare them using diffoscope.
|
||||||
|
|
||||||
|
*-c*::
|
||||||
|
Set the pacman cache directory.
|
||||||
|
|
||||||
|
*-M* <file>::
|
||||||
|
Location of a makepkg config file.
|
||||||
|
|
||||||
|
*-h*::
|
||||||
|
Show this usage message
|
||||||
|
|
||||||
|
include::footer.asciidoc[]
|
@@ -20,6 +20,9 @@ en_US.UTF-8 and de_DE.UTF-8 locale and a generated machine-id.
|
|||||||
Options
|
Options
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
*-U*::
|
||||||
|
Use 'pacman -U' to install packages.
|
||||||
|
|
||||||
*-C* <file>::
|
*-C* <file>::
|
||||||
Location of a pacman config file.
|
Location of a pacman config file.
|
||||||
|
|
||||||
@@ -32,9 +35,6 @@ Options
|
|||||||
*-f* <file>::
|
*-f* <file>::
|
||||||
Copy file from the host to the chroot.
|
Copy file from the host to the chroot.
|
||||||
|
|
||||||
*-s*::
|
|
||||||
Do not run setarch.
|
|
||||||
|
|
||||||
*-h*::
|
*-h*::
|
||||||
Output command line options.
|
Output command line options.
|
||||||
|
|
||||||
|
@@ -17,7 +17,7 @@ export LANG=C
|
|||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
# check if messages are to be printed using color
|
# check if messages are to be printed using color
|
||||||
if [[ -t 2 ]]; then
|
if [[ -t 2 && "$TERM" != dumb ]]; then
|
||||||
colorize
|
colorize
|
||||||
else
|
else
|
||||||
# shellcheck disable=2034
|
# shellcheck disable=2034
|
||||||
@@ -142,7 +142,7 @@ find_cached_package() {
|
|||||||
for dir in "${searchdirs[@]}"; do
|
for dir in "${searchdirs[@]}"; do
|
||||||
[[ -d $dir ]] || continue
|
[[ -d $dir ]] || continue
|
||||||
|
|
||||||
for pkg in "$dir"/*.pkg.tar?(.?z); do
|
for pkg in "$dir"/*.pkg.tar?(.!(sig|*.*)); do
|
||||||
[[ -f $pkg ]] || continue
|
[[ -f $pkg ]] || continue
|
||||||
|
|
||||||
# avoid adding duplicates of the same inode
|
# avoid adding duplicates of the same inode
|
||||||
@@ -152,7 +152,7 @@ find_cached_package() {
|
|||||||
|
|
||||||
# split apart package filename into parts
|
# split apart package filename into parts
|
||||||
pkgbasename=${pkg##*/}
|
pkgbasename=${pkg##*/}
|
||||||
pkgbasename=${pkgbasename%.pkg.tar?(.?z)}
|
pkgbasename=${pkgbasename%.pkg.tar*}
|
||||||
|
|
||||||
arch=${pkgbasename##*-}
|
arch=${pkgbasename##*-}
|
||||||
pkgbasename=${pkgbasename%-"$arch"}
|
pkgbasename=${pkgbasename%-"$arch"}
|
||||||
|
@@ -13,6 +13,8 @@
|
|||||||
m4_include(lib/common.sh)
|
m4_include(lib/common.sh)
|
||||||
m4_include(lib/archroot.sh)
|
m4_include(lib/archroot.sh)
|
||||||
|
|
||||||
|
source /usr/share/makepkg/util/config.sh
|
||||||
|
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
default_makepkg_args=(--syncdeps --noconfirm --log --holdver --skipinteg)
|
default_makepkg_args=(--syncdeps --noconfirm --log --holdver --skipinteg)
|
||||||
@@ -80,26 +82,6 @@ usage() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# {{{ functions
|
# {{{ functions
|
||||||
# Usage: load_vars $makepkg_conf
|
|
||||||
# Globals:
|
|
||||||
# - SRCDEST
|
|
||||||
# - SRCPKGDEST
|
|
||||||
# - PKGDEST
|
|
||||||
# - LOGDEST
|
|
||||||
# - MAKEFLAGS
|
|
||||||
# - PACKAGER
|
|
||||||
load_vars() {
|
|
||||||
local makepkg_conf="$1" var
|
|
||||||
|
|
||||||
[[ -f $makepkg_conf ]] || return 1
|
|
||||||
|
|
||||||
for var in {SRC,SRCPKG,PKG,LOG}DEST MAKEFLAGS PACKAGER; do
|
|
||||||
[[ -z ${!var:-} ]] && eval "$(source "$makepkg_conf"; printf "%s='%s'" "$var" "${!var}")"
|
|
||||||
done
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# Usage: sync_chroot $chrootdir $copydir [$copy]
|
# Usage: sync_chroot $chrootdir $copydir [$copy]
|
||||||
sync_chroot() {
|
sync_chroot() {
|
||||||
local chrootdir=$1
|
local chrootdir=$1
|
||||||
@@ -338,16 +320,12 @@ for arg in "${@:$OPTIND}"; do
|
|||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -n $SUDO_USER ]]; then
|
|
||||||
eval "USER_HOME=~$SUDO_USER"
|
|
||||||
else
|
|
||||||
USER_HOME=$HOME
|
|
||||||
fi
|
|
||||||
|
|
||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
load_vars "${XDG_CONFIG_HOME:-$USER_HOME/.config}/pacman/makepkg.conf" || load_vars "$USER_HOME/.makepkg.conf"
|
ORIG_HOME=$HOME
|
||||||
load_vars /etc/makepkg.conf
|
IFS=: read -r _ _ _ _ _ HOME _ < <(getent passwd "${SUDO_USER:-$USER}")
|
||||||
|
load_makepkg_config
|
||||||
|
HOME=$ORIG_HOME
|
||||||
|
|
||||||
# Use PKGBUILD directory if these don't exist
|
# Use PKGBUILD directory if these don't exist
|
||||||
[[ -d $PKGDEST ]] || PKGDEST=$PWD
|
[[ -d $PKGDEST ]] || PKGDEST=$PWD
|
||||||
@@ -388,11 +366,7 @@ if arch-nspawn "$copydir" \
|
|||||||
"${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
|
"${bindmounts_ro[@]}" "${bindmounts_rw[@]}" \
|
||||||
/chrootbuild "${makepkg_args[@]}"
|
/chrootbuild "${makepkg_args[@]}"
|
||||||
then
|
then
|
||||||
pkgnames=()
|
mapfile -t pkgnames < <(sudo -u "$makepkg_user" bash -c 'source PKGBUILD; printf "%s\n" "${pkgname[@]}"')
|
||||||
for pkgfile in "$copydir"/pkgdest/*; do
|
|
||||||
pkgfile=${pkgfile##*/};
|
|
||||||
pkgnames+=("${pkgfile%-*-*-*}");
|
|
||||||
done
|
|
||||||
move_products
|
move_products
|
||||||
else
|
else
|
||||||
(( ret += 1 ))
|
(( ret += 1 ))
|
||||||
@@ -409,13 +383,30 @@ if (( ret != 0 )); then
|
|||||||
else
|
else
|
||||||
if (( run_checkpkg )); then
|
if (( run_checkpkg )); then
|
||||||
msg "Running checkpkg"
|
msg "Running checkpkg"
|
||||||
msg2 "Downloading current versions"
|
|
||||||
if pacman --noconfirm -Swdd --logfile /dev/null "${pkgnames[@]}"; then
|
mapfile -t remotepkgs < <(pacman --config "$copydir"/etc/pacman.conf \
|
||||||
msg2 "Checking packages"
|
--dbpath "$copydir"/var/lib/pacman \
|
||||||
sudo -u "$makepkg_user" checkpkg --rmdir --warn
|
-Sddp "${pkgnames[@]}")
|
||||||
else
|
|
||||||
warning "Skipped checkpkg due to missing packages"
|
if ! wait $!; then
|
||||||
|
warning "Skipped checkpkg due to missing repo packages"
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# download package files if any non-local location exists
|
||||||
|
for remotepkg in "${remotepkgs[@]}"; do
|
||||||
|
if [[ $remotepkg != file://* ]]; then
|
||||||
|
msg2 "Downloading current versions"
|
||||||
|
arch-nspawn "$copydir" pacman --noconfirm -Swdd "${pkgnames[@]}"
|
||||||
|
mapfile -t remotepkgs < <(pacman --config "$copydir"/etc/pacman.conf \
|
||||||
|
--dbpath "$copydir"/var/lib/pacman \
|
||||||
|
-Sddp "${pkgnames[@]}")
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
msg2 "Checking packages"
|
||||||
|
sudo -u "$makepkg_user" checkpkg --rmdir --warn "${remotepkgs[@]/#file:\/\//}"
|
||||||
fi
|
fi
|
||||||
true
|
true
|
||||||
fi
|
fi
|
||||||
|
@@ -132,18 +132,18 @@ DBGSRCDIR="/usr/src/debug"
|
|||||||
COMPRESSGZ=(gzip -c -f -n)
|
COMPRESSGZ=(gzip -c -f -n)
|
||||||
COMPRESSBZ2=(bzip2 -c -f)
|
COMPRESSBZ2=(bzip2 -c -f)
|
||||||
COMPRESSXZ=(xz -c -z -)
|
COMPRESSXZ=(xz -c -z -)
|
||||||
|
COMPRESSZST=(zstd -c -T0 --ultra -20 -)
|
||||||
COMPRESSLRZ=(lrzip -q)
|
COMPRESSLRZ=(lrzip -q)
|
||||||
COMPRESSLZO=(lzop -q)
|
COMPRESSLZO=(lzop -q)
|
||||||
COMPRESSZ=(compress -c -f)
|
COMPRESSZ=(compress -c -f)
|
||||||
|
COMPRESSLZ4=(lz4 -q)
|
||||||
|
COMPRESSLZ=(lzip -c -f)
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# EXTENSION DEFAULTS
|
# EXTENSION DEFAULTS
|
||||||
#########################################################################
|
#########################################################################
|
||||||
#
|
#
|
||||||
# WARNING: Do NOT modify these variables unless you know what you are
|
PKGEXT='.pkg.tar.zst'
|
||||||
# doing.
|
|
||||||
#
|
|
||||||
PKGEXT='.pkg.tar.xz'
|
|
||||||
SRCEXT='.src.tar.gz'
|
SRCEXT='.src.tar.gz'
|
||||||
|
|
||||||
# vim: set ft=sh ts=2 sw=2 et:
|
# vim: set ft=sh ts=2 sw=2 et:
|
||||||
|
204
makerepropkg.in
Executable file
204
makerepropkg.in
Executable file
@@ -0,0 +1,204 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# makerepropkg - rebuild a package to see if it is reproducible
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 by Eli Schwartz <eschwartz@archlinux.org>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
|
||||||
|
m4_include(lib/common.sh)
|
||||||
|
m4_include(lib/archroot.sh)
|
||||||
|
|
||||||
|
source /usr/share/makepkg/util/config.sh
|
||||||
|
source /usr/share/makepkg/util/message.sh
|
||||||
|
|
||||||
|
declare -A buildinfo
|
||||||
|
declare -a buildenv buildopts installed installpkgs
|
||||||
|
|
||||||
|
archiveurl='https://archive.archlinux.org/packages'
|
||||||
|
buildroot=/var/lib/archbuild/reproducible
|
||||||
|
chroot=testenv
|
||||||
|
diffoscope=0
|
||||||
|
|
||||||
|
parse_buildinfo() {
|
||||||
|
local line var val
|
||||||
|
|
||||||
|
while read -r line; do
|
||||||
|
var="${line%% = *}"
|
||||||
|
val="${line#* = }"
|
||||||
|
case ${var} in
|
||||||
|
buildenv)
|
||||||
|
buildenv+=("${val}")
|
||||||
|
;;
|
||||||
|
options)
|
||||||
|
buildopts+=("${val}")
|
||||||
|
;;
|
||||||
|
installed)
|
||||||
|
installed+=("${val}")
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
buildinfo["${var}"]="${val}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
get_pkgfile() {
|
||||||
|
local cdir=${cache_dirs[0]}
|
||||||
|
local pkgfilebase=${1}
|
||||||
|
local pkgname=${pkgfilebase%-*-*-*}
|
||||||
|
local pkgfile ext
|
||||||
|
|
||||||
|
for ext in .zst .xz ''; do
|
||||||
|
pkgfile=${pkgfilebase}.pkg.tar${ext}
|
||||||
|
|
||||||
|
for c in "${cache_dirs[@]}"; do
|
||||||
|
if [[ -f ${c}/${pkgfile} ]]; then
|
||||||
|
cdir=${c}
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
for f in "${pkgfile}" "${pkgfile}.sig"; do
|
||||||
|
if [[ ! -f "${cdir}/${f}" ]]; then
|
||||||
|
msg2 "retrieving '%s'..." "${f}" >&2
|
||||||
|
curl -Llf -# -o "${cdir}/${f}" "${archiveurl}/${pkgname:0:1}/${pkgname}/${f}" || continue 2
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
printf '%s\n' "file://${cdir}/${pkgfile}"
|
||||||
|
return 0
|
||||||
|
done
|
||||||
|
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
cat << __EOF__
|
||||||
|
usage: ${BASH_SOURCE[0]##*/} [options] <package_file>
|
||||||
|
|
||||||
|
Run this script in a PKGBUILD dir to build a package inside a
|
||||||
|
clean chroot while attempting to reproduce it. The package file
|
||||||
|
will be used to derive metadata needed for reproducing the
|
||||||
|
package, including the .PKGINFO as well as the buildinfo.
|
||||||
|
|
||||||
|
For more details see https://reproducible-builds.org/
|
||||||
|
|
||||||
|
OPTIONS
|
||||||
|
-d Run diffoscope if the package is unreproducible
|
||||||
|
-c <dir> Set pacman cache
|
||||||
|
-M <file> Location of a makepkg config file
|
||||||
|
-h Show this usage message
|
||||||
|
__EOF__
|
||||||
|
}
|
||||||
|
|
||||||
|
while getopts 'dM:c:h' arg; do
|
||||||
|
case "$arg" in
|
||||||
|
d) diffoscope=1 ;;
|
||||||
|
M) archroot_args+=(-M "$OPTARG") ;;
|
||||||
|
c) cache_dirs+=("$OPTARG") ;;
|
||||||
|
h) usage; exit 0 ;;
|
||||||
|
*|?) usage; exit 1 ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
|
check_root
|
||||||
|
|
||||||
|
if [[ -n $1 ]]; then
|
||||||
|
pkgfile="$1"
|
||||||
|
splitpkgs=("$@")
|
||||||
|
for f in "${splitpkgs[@]}"; do
|
||||||
|
if ! bsdtar -tqf "${f}" .BUILDINFO >/dev/null 2>&1; then
|
||||||
|
error "file is not a valid pacman package: '%s'" "${f}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
else
|
||||||
|
error "no package file specified. Try '${BASH_SOURCE[0]##*/} -h' for more information. "
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if (( ${#cache_dirs[@]} == 0 )); then
|
||||||
|
mapfile -t cache_dirs < <(pacman-conf CacheDir)
|
||||||
|
fi
|
||||||
|
|
||||||
|
ORIG_HOME=${HOME}
|
||||||
|
IFS=: read -r _ _ _ _ _ HOME _ < <(getent passwd "${SUDO_USER:-$USER}")
|
||||||
|
load_makepkg_config
|
||||||
|
HOME=${ORIG_HOME}
|
||||||
|
[[ -d ${SRCDEST} ]] || SRCDEST=${PWD}
|
||||||
|
|
||||||
|
parse_buildinfo < <(bsdtar -xOqf "${pkgfile}" .BUILDINFO)
|
||||||
|
export SOURCE_DATE_EPOCH="${buildinfo[builddate]}"
|
||||||
|
PACKAGER="${buildinfo[packager]}"
|
||||||
|
BUILDDIR="${buildinfo[builddir]}"
|
||||||
|
PKGEXT=${pkgfile#${pkgfile%.pkg.tar*}}
|
||||||
|
|
||||||
|
# nuke and restore reproducible testenv
|
||||||
|
for copy in "${buildroot}"/*/; do
|
||||||
|
[[ -d ${copy} ]] || continue
|
||||||
|
subvolume_delete_recursive "${copy}"
|
||||||
|
done
|
||||||
|
rm -rf --one-file-system "${buildroot}"
|
||||||
|
(umask 0022; mkdir -p "${buildroot}")
|
||||||
|
|
||||||
|
for fname in "${installed[@]}"; do
|
||||||
|
if ! allpkgfiles+=("$(get_pkgfile "${fname}")"); then
|
||||||
|
error "failed to retrieve ${fname}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
printf '%s\n' "${allpkgfiles[@]}" | mkarchroot -M @pkgdatadir@/makepkg-x86_64.conf -U "${archroot_args[@]}" "${buildroot}"/root - || exit 1
|
||||||
|
|
||||||
|
# use makechrootpkg to prep the build directory
|
||||||
|
makechrootpkg -r "${buildroot}" -l "${chroot}" -- --packagelist || exit 1
|
||||||
|
|
||||||
|
# set detected makepkg.conf options
|
||||||
|
{
|
||||||
|
for var in PACKAGER BUILDDIR PKGEXT; do
|
||||||
|
printf '%s=%s\n' "${var}" "${!var@Q}"
|
||||||
|
done
|
||||||
|
printf 'OPTIONS=(%s)\n' "${buildopts[*]@Q}"
|
||||||
|
printf 'BUILDENV=(%s)\n' "${buildenv[*]@Q}"
|
||||||
|
} >> "${buildroot}/${chroot}"/etc/makepkg.conf >> "${buildroot}/${chroot}"/etc/makepkg.conf
|
||||||
|
install -d -o "${SUDO_UID:-$UID}" -g "$(id -g "${SUDO_UID:-$UID}")" "${buildroot}/${chroot}/${BUILDDIR}"
|
||||||
|
|
||||||
|
# kick off the build
|
||||||
|
arch-nspawn "${buildroot}/${chroot}" \
|
||||||
|
--bind="${PWD}:/startdir" \
|
||||||
|
--bind="${SRCDEST}:/srcdest" \
|
||||||
|
/chrootbuild -C --noconfirm --log --holdver --skipinteg
|
||||||
|
ret=$?
|
||||||
|
|
||||||
|
if (( ${ret} == 0 )); then
|
||||||
|
msg2 "built succeeded! built packages can be found in ${buildroot}/${chroot}/pkgdest"
|
||||||
|
msg "comparing artifacts..."
|
||||||
|
|
||||||
|
for pkgfile in "${splitpkgs[@]}"; do
|
||||||
|
comparefiles=("${pkgfile}" "${buildroot}/${chroot}/pkgdest/${pkgfile##*/}")
|
||||||
|
if cmp -s "${comparefiles[@]}"; then
|
||||||
|
msg2 "Package '%s' successfully reproduced!" "${pkgfile}"
|
||||||
|
else
|
||||||
|
ret=1
|
||||||
|
warning "Package '%s' is not reproducible. :(" "${pkgfile}"
|
||||||
|
sha256sum "${comparefiles[@]}"
|
||||||
|
if (( diffoscope )); then
|
||||||
|
diffoscope "${comparefiles[@]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# return failure from chrootbuild, or the reproducibility status
|
||||||
|
exit ${ret}
|
@@ -18,6 +18,7 @@ m4_include(lib/archroot.sh)
|
|||||||
umask 0022
|
umask 0022
|
||||||
|
|
||||||
working_dir=''
|
working_dir=''
|
||||||
|
umode=''
|
||||||
|
|
||||||
files=()
|
files=()
|
||||||
nspawn_args=()
|
nspawn_args=()
|
||||||
@@ -25,27 +26,29 @@ nspawn_args=()
|
|||||||
usage() {
|
usage() {
|
||||||
echo "Usage: ${0##*/} [options] working-dir package-list..."
|
echo "Usage: ${0##*/} [options] working-dir package-list..."
|
||||||
echo ' options:'
|
echo ' options:'
|
||||||
|
echo ' -U Use pacman -U to install packages'
|
||||||
echo ' -C <file> Location of a pacman config file'
|
echo ' -C <file> Location of a pacman config file'
|
||||||
echo ' -M <file> Location of a makepkg config file'
|
echo ' -M <file> Location of a makepkg config file'
|
||||||
echo ' -c <dir> Set pacman cache'
|
echo ' -c <dir> Set pacman cache'
|
||||||
echo ' -f <file> Copy file from the host to the chroot'
|
echo ' -f <file> Copy file from the host to the chroot'
|
||||||
echo ' -s Do not run setarch'
|
|
||||||
echo ' -h This message'
|
echo ' -h This message'
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts 'hC:M:c:f:s' arg; do
|
while getopts 'hUC:M:c:f:s' arg; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
|
U) umode=U ;;
|
||||||
C) pac_conf="$OPTARG" ;;
|
C) pac_conf="$OPTARG" ;;
|
||||||
M) makepkg_conf="$OPTARG" ;;
|
M) makepkg_conf="$OPTARG" ;;
|
||||||
c) cache_dirs+=("$OPTARG") ;;
|
c) cache_dirs+=("$OPTARG") ;;
|
||||||
f) files+=("$OPTARG") ;;
|
f) files+=("$OPTARG") ;;
|
||||||
s) nosetarch=1 ;;
|
|
||||||
h|?) usage ;;
|
h|?) usage ;;
|
||||||
*) error "invalid argument '%s'" "$arg"; usage ;;
|
*) error "invalid argument '%s'" "$arg"; usage ;;
|
||||||
esac
|
esac
|
||||||
|
if [[ $arg != U ]]; then
|
||||||
nspawn_args+=("-$arg")
|
nspawn_args+=("-$arg")
|
||||||
[[ -v OPTARG ]] && nspawn_args+=("$OPTARG")
|
[[ -v OPTARG ]] && nspawn_args+=("$OPTARG")
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
shift $((OPTIND - 1))
|
shift $((OPTIND - 1))
|
||||||
|
|
||||||
@@ -85,7 +88,7 @@ for file in "${files[@]}"; do
|
|||||||
cp "$file" "$working_dir$file"
|
cp "$file" "$working_dir$file"
|
||||||
done
|
done
|
||||||
|
|
||||||
pacstrap -Mcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
|
pacstrap -${umode}Mcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
|
||||||
"${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
|
"${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
|
||||||
|
|
||||||
printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
|
printf '%s.UTF-8 UTF-8\n' en_US de_DE > "$working_dir/etc/locale.gen"
|
||||||
|
@@ -18,6 +18,8 @@
|
|||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
source /usr/share/makepkg/util/config.sh
|
||||||
|
|
||||||
|
|
||||||
# global defaults suitable for use by Arch staff
|
# global defaults suitable for use by Arch staff
|
||||||
repo=extra
|
repo=extra
|
||||||
@@ -72,20 +74,26 @@ while (( $# )); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# multilib must be handled specially
|
# multilib must be handled specially
|
||||||
|
archbuild_arch="${arch}"
|
||||||
if [[ $repo = multilib* ]]; then
|
if [[ $repo = multilib* ]]; then
|
||||||
arch=
|
archbuild_arch=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
archbuild_cmd=("${repo}${arch:+-$arch}-build" "$@")
|
archbuild_cmd=("${repo}${archbuild_arch:+-$archbuild_arch}-build" "$@")
|
||||||
|
|
||||||
trap 'rm -rf $SRCPKGDEST' EXIT
|
trap 'rm -rf $TEMPDIR' EXIT INT TERM QUIT
|
||||||
|
|
||||||
# Use a source-only tarball as an intermediate to transfer files. This
|
# Use a source-only tarball as an intermediate to transfer files. This
|
||||||
# guarantees the checksums are okay, and guarantees that all needed files are
|
# guarantees the checksums are okay, and guarantees that all needed files are
|
||||||
# transferred, including local sources, install scripts, and changelogs.
|
# transferred, including local sources, install scripts, and changelogs.
|
||||||
export SRCPKGDEST=$(mktemp -d)
|
export TEMPDIR=$(mktemp -d --tmpdir offload-build.XXXXXXXXXX)
|
||||||
|
export SRCPKGDEST=${TEMPDIR}
|
||||||
makepkg --source || die "unable to make source package"
|
makepkg --source || die "unable to make source package"
|
||||||
|
|
||||||
|
# Temporary cosmetic workaround makepkg if SRCDEST is set somewhere else
|
||||||
|
# but an empty src dir is created in PWD. Remove once fixed in makepkg.
|
||||||
|
rmdir --ignore-fail-on-non-empty src 2>/dev/null || true
|
||||||
|
|
||||||
mapfile -t files < <(
|
mapfile -t files < <(
|
||||||
# This is sort of bash golfing but it allows running a mildly complex
|
# This is sort of bash golfing but it allows running a mildly complex
|
||||||
# command over ssh with a single connection.
|
# command over ssh with a single connection.
|
||||||
@@ -102,7 +110,22 @@ mapfile -t files < <(
|
|||||||
printf "%s\n" "" "-> build complete" &&
|
printf "%s\n" "" "-> build complete" &&
|
||||||
printf "\t%s\n" "$temp"/*
|
printf "\t%s\n" "$temp"/*
|
||||||
} >&2 &&
|
} >&2 &&
|
||||||
makepkg --packagelist
|
makepkg_user_config="${XDG_CONFIG_HOME:-$HOME/.config}/pacman/makepkg.conf" &&
|
||||||
|
makepkg_config="/usr/share/devtools/makepkg-'"${arch}"'.conf" &&
|
||||||
|
if [[ -f /usr/share/devtools/makepkg-'"${repo}"'-'"${arch}"'.conf ]]; then
|
||||||
|
makepkg_config="/usr/share/devtools/makepkg-'"${repo}"'-'"${arch}"'.conf"
|
||||||
|
fi &&
|
||||||
|
makepkg --config <(cat "${makepkg_user_config}" "${makepkg_config}" 2>/dev/null) --packagelist &&
|
||||||
|
printf "%s\n" "${temp}/PKGBUILD"
|
||||||
')
|
')
|
||||||
|
|
||||||
(( ${#files[@]} )) && printf '%s\n' '' '-> copying files...' && scp "${files[@]/#/$server:}" .
|
|
||||||
|
if (( ${#files[@]} )); then
|
||||||
|
printf '%s\n' '' '-> copying files...'
|
||||||
|
load_makepkg_config
|
||||||
|
scp "${files[@]/#/$server:}" "${TEMPDIR}/"
|
||||||
|
mv "${TEMPDIR}"/*.pkg.tar* "${PKGDEST:-${PWD}}/"
|
||||||
|
mv "${TEMPDIR}/PKGBUILD" "${PWD}/"
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
|
fi
|
@@ -16,10 +16,9 @@
|
|||||||
#GPGDir = /etc/pacman.d/gnupg/
|
#GPGDir = /etc/pacman.d/gnupg/
|
||||||
#HookDir = /etc/pacman.d/hooks/
|
#HookDir = /etc/pacman.d/hooks/
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
|
||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
@@ -90,4 +89,3 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
#[custom]
|
#[custom]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
|
@@ -16,10 +16,9 @@
|
|||||||
#GPGDir = /etc/pacman.d/gnupg/
|
#GPGDir = /etc/pacman.d/gnupg/
|
||||||
#HookDir = /etc/pacman.d/hooks/
|
#HookDir = /etc/pacman.d/hooks/
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
|
||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
@@ -99,4 +98,3 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
#[custom]
|
#[custom]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
|
@@ -16,10 +16,9 @@
|
|||||||
#GPGDir = /etc/pacman.d/gnupg/
|
#GPGDir = /etc/pacman.d/gnupg/
|
||||||
#HookDir = /etc/pacman.d/hooks/
|
#HookDir = /etc/pacman.d/hooks/
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
|
||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
@@ -93,4 +92,3 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
#[custom]
|
#[custom]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
|
@@ -16,10 +16,9 @@
|
|||||||
#GPGDir = /etc/pacman.d/gnupg/
|
#GPGDir = /etc/pacman.d/gnupg/
|
||||||
#HookDir = /etc/pacman.d/hooks/
|
#HookDir = /etc/pacman.d/hooks/
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
|
||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
@@ -107,4 +106,3 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
#[custom]
|
#[custom]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
|
@@ -16,10 +16,9 @@
|
|||||||
#GPGDir = /etc/pacman.d/gnupg/
|
#GPGDir = /etc/pacman.d/gnupg/
|
||||||
#HookDir = /etc/pacman.d/hooks/
|
#HookDir = /etc/pacman.d/hooks/
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
|
||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
@@ -98,4 +97,3 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
#[custom]
|
#[custom]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
|
@@ -16,10 +16,9 @@
|
|||||||
#GPGDir = /etc/pacman.d/gnupg/
|
#GPGDir = /etc/pacman.d/gnupg/
|
||||||
#HookDir = /etc/pacman.d/hooks/
|
#HookDir = /etc/pacman.d/hooks/
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
|
||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
@@ -99,4 +98,3 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
#[custom]
|
#[custom]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
|
@@ -16,10 +16,9 @@
|
|||||||
#GPGDir = /etc/pacman.d/gnupg/
|
#GPGDir = /etc/pacman.d/gnupg/
|
||||||
#HookDir = /etc/pacman.d/hooks/
|
#HookDir = /etc/pacman.d/hooks/
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
|
||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
@@ -96,4 +95,3 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
#[custom]
|
#[custom]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
|
@@ -16,10 +16,9 @@
|
|||||||
#GPGDir = /etc/pacman.d/gnupg/
|
#GPGDir = /etc/pacman.d/gnupg/
|
||||||
#HookDir = /etc/pacman.d/hooks/
|
#HookDir = /etc/pacman.d/hooks/
|
||||||
HoldPkg = pacman glibc
|
HoldPkg = pacman glibc
|
||||||
#XferCommand = /usr/bin/curl -C - -f %u > %o
|
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
|
||||||
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
|
||||||
#CleanMethod = KeepInstalled
|
#CleanMethod = KeepInstalled
|
||||||
#UseDelta = 0.7
|
|
||||||
Architecture = auto
|
Architecture = auto
|
||||||
|
|
||||||
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
|
||||||
@@ -90,4 +89,3 @@ Include = /etc/pacman.d/mirrorlist
|
|||||||
#[custom]
|
#[custom]
|
||||||
#SigLevel = Optional TrustAll
|
#SigLevel = Optional TrustAll
|
||||||
#Server = file:///home/custompkgs
|
#Server = file:///home/custompkgs
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
#compdef archbuild archco arch-nspawn archrelease commitpkg finddeps makechrootpkg mkarchroot rebuildpkgs extrapkg=commitpkg corepkg=commitpkg testingpkg=commitpkg stagingpkg=commitpkg communitypkg=commitpkg community-testingpkg=commitpkg community-stagingpkg=commitpkg multilibpkg=commitpkg multilib-testingpkg=commitpkg extra-x86_64-build=archbuild testing-x86_64-build=archbuild staging-x86_64-build=archbuild multilib-build=archbuild multilib-testing-build=archbuild multilib-staging-build=archbuild kde-unstable-x86_64-build=archbuild gnome-unstable-x86_64-build=archbuild communityco=archco checkpkg sogrep offload-build
|
#compdef archbuild archco arch-nspawn archrelease commitpkg finddeps makechrootpkg mkarchroot rebuildpkgs extrapkg=commitpkg corepkg=commitpkg testingpkg=commitpkg stagingpkg=commitpkg communitypkg=commitpkg community-testingpkg=commitpkg community-stagingpkg=commitpkg multilibpkg=commitpkg multilib-testingpkg=commitpkg extra-x86_64-build=archbuild testing-x86_64-build=archbuild staging-x86_64-build=archbuild multilib-build=archbuild multilib-testing-build=archbuild multilib-staging-build=archbuild kde-unstable-x86_64-build=archbuild gnome-unstable-x86_64-build=archbuild communityco=archco checkpkg sogrep offload-build makerepropkg
|
||||||
# License: Unspecified
|
# License: Unspecified
|
||||||
|
|
||||||
m4_include(lib/valid-tags.sh)
|
m4_include(lib/valid-tags.sh)
|
||||||
@@ -21,7 +21,6 @@ _arch_nspawn_args=(
|
|||||||
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
|
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
|
||||||
'-c[Set pacman cache]:pacman_cache:_files -/'
|
'-c[Set pacman cache]:pacman_cache:_files -/'
|
||||||
'-f[Copy file from the host to the chroot]:copy_file:_files'
|
'-f[Copy file from the host to the chroot]:copy_file:_files'
|
||||||
'-s[Do not run setarch]'
|
|
||||||
'-h[Display usage]'
|
'-h[Display usage]'
|
||||||
'1:chroot_dir:_files -/'
|
'1:chroot_dir:_files -/'
|
||||||
)
|
)
|
||||||
@@ -58,6 +57,7 @@ _makechrootpkg_args=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
_mkarchroot_args=(
|
_mkarchroot_args=(
|
||||||
|
'-U[Install a package into the working copy]:target:_files -g "*.pkg.tar.*(.)"'
|
||||||
'-C[Location of a pacman config file]:pacman_config:_files -g "*.conf(.)"'
|
'-C[Location of a pacman config file]:pacman_config:_files -g "*.conf(.)"'
|
||||||
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
|
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
|
||||||
'-c[Set pacman cache]:pacman_cache:_files -/'
|
'-c[Set pacman cache]:pacman_cache:_files -/'
|
||||||
@@ -92,6 +92,14 @@ _offload_build_args=(
|
|||||||
'(-h --help)'{-h,--help}'[Display usage]'
|
'(-h --help)'{-h,--help}'[Display usage]'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
_makerepropkg_args=(
|
||||||
|
'-d[Run diffoscope if the package is unreproducible]'
|
||||||
|
'-c[Set pacman cache]:pacman_cache:_files -/'
|
||||||
|
'-M[Location of a makepkg config file]:makepkg_config:_files -g "*.conf(.)"'
|
||||||
|
'-h[Display usage]'
|
||||||
|
'*:working_dir:_files -g "*.pkg.tar.*(.)"'
|
||||||
|
)
|
||||||
|
|
||||||
_devtools_completions_all_packages() {
|
_devtools_completions_all_packages() {
|
||||||
typeset -U packages
|
typeset -U packages
|
||||||
packages=($(_call_program packages pacman -Sql))
|
packages=($(_call_program packages pacman -Sql))
|
||||||
|
Reference in New Issue
Block a user