Skip to content
Snippets Groups Projects
Commit 83309360 authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

Merge branch 'archbuild-remove-diffpkg' into 'master'

archbuild: Remove custom diffpkg + diffrepo

See merge request !717
parents 3deca29e aa5f10ca
No related branches found
No related tags found
1 merge request!717archbuild: Remove custom diffpkg + diffrepo
Pipeline #67759 passed
#!/bin/zsh -e
parse() {
local pkgdata
IFS=- read -A pkgdata <<<"${${1:t}%.pkg.tar*}"
pkgname=${(j:-:)pkgdata[1,-4]}
epoch=
pkgver=${pkgdata[-3]}
pkgrel=${pkgdata[-2]}
arch=${pkgdata[-1]}
IFS=: read -A pkgdata <<<$pkgver
if (( ${#pkgdata} > 1 )); then
epoch=${pkgdata[1]}:
pkgver=${pkgdata[2]}
fi
}
header() {
local pkgname epoch pkgver pkgrel arch pad
parse $1
shift
pad=$((cols/2 - ${#:-"$pkgname $epoch$pkgver-$pkgrel $arch${1:+ }$*"}))
(( pad > 0 )) || pad=0
print -P "%B$pkgname %F{10}$epoch$pkgver-$pkgrel%f %F{12}$arch%f${1:+ }$*%b${(r:pad:)}"
}
headers() {
local cols=$((COLUMNS - 4))
print -P "$(header $1 ${*:3}) ${(l:cols%2:)}|${(l:1-cols%2:)} $(header $2 ${*:3})"
}
sdifftw() {
sdiff -tw $COLUMNS $( (( VERBOSE )) || echo -s) $* || :
}
tartf() {
bsdtar tf $* | if (( VERBOSE )); then
cat
else
sed -r 's|^usr/lib/modules/[0-9][^/]+|usr/lib/modules/[…]|'
fi | sort
}
diff_names() {
headers $1 $2 files
sdifftw <(tartf $1) <(tartf $2)
}
diff_files() {
headers $*
sdifftw <(bsdtar xOqf $1 ${*:3}) <(bsdtar xOqf $2 ${*:3})
}
if (( $# != 2 )); then
print -Pu2 "%F{9}%BError:%b Specify two packages%f"
exit 1
fi
diff_names $1 $2
diff_files $1 $2 .PKGINFO
if (( VERBOSE )); then
diff_files $1 $2 .BUILDINFO
fi
# vim:set sw=2 et:
#!/bin/zsh
setopt extendedglob nomatch
parse() {
local pkgdata
IFS=- read -A pkgdata <<<"${${1:t}%.pkg.tar*}"
pkgname=${(j:-:)pkgdata[1,-4]}
epoch=
pkgver=${pkgdata[-3]}
pkgrel=${pkgdata[-2]}
arch=${pkgdata[-1]}
IFS=: read -A pkgdata <<<$pkgver
if (( ${#pkgdata} > 1 )); then
epoch=${pkgdata[1]}:
pkgver=${pkgdata[2]}
fi
}
function {
local pkgname epoch pkgver pkgrel arch
for pkg in $(makepkg --packagelist); do
parse $pkg
if [[ -n $1 ]]; then
otherpkg=( /srv/ftp/pool/*/${pkgname}-${1}-${arch}.pkg.tar*~*.sig(Nom[1]) )
else
otherpkg=( /srv/ftp/pool/*/${pkgname}-[^-]##-[^-]##-${arch}.pkg.tar*~*.sig(Nom[1]) )
fi
if [[ -n $otherpkg ]]; then
${${(%):-%x}:A:h}/diffpkg $otherpkg $pkg
else
print -P "%F{11}%BWarning:%b No repo package found for $pkg%f"
fi
done
} $1
# vim:set sw=2 et:
......@@ -20,8 +20,6 @@
copy: src={{ item }} dest=/usr/local/bin/{{ item }} owner=root group=root mode=0755
with_items:
- mkpkg
- diffpkg
- diffrepo
- pkgdiffrepo
- clean-chroots
- clean-dests
......
......@@ -14,10 +14,6 @@ Data on this system is regularly backed up automatically.
- SRCDEST is set to /var/lib/archbuilddest/srcdest (~srcdest).
- Take a look at mkpkg -hh if you want to build nightlies.
Package diff tools:
diffrepo : Lightweight alternative to checkpkg. Only diffs filenames.
pkgdiffrepo : Heavyweight alternative to checkpkg. Uses pkgdiff.
January 26, 2021
The common Arch build server is now build.archlinux.org! This one has 64 threads and
256GiB of memory. Now go and compile something.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment