mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-14 18:36:18 +02:00
Compare commits
1 Commits
02b1e7e3c6
...
feature/de
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b6026320ad |
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
|||||||
SHELL=/bin/bash -o pipefail
|
SHELL=/bin/bash -o pipefail
|
||||||
|
|
||||||
V=1.3.2
|
V=1.3.1
|
||||||
BUILDTOOLVER ?= $(V)
|
BUILDTOOLVER ?= $(V)
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
@@ -61,7 +61,7 @@ _pkgctl_build_args=(
|
|||||||
'--update-checksums[Force computation and update of the checksums (disables auto-detection)]'
|
'--update-checksums[Force computation and update of the checksums (disables auto-detection)]'
|
||||||
'(-e --edit)'{-e,--edit}'[Edit the PKGBUILD before building]'
|
'(-e --edit)'{-e,--edit}'[Edit the PKGBUILD before building]'
|
||||||
'(-r --release)'{-r,--release}'[Automatically commit, tag and release after building]'
|
'(-r --release)'{-r,--release}'[Automatically commit, tag and release after building]'
|
||||||
'(-m --message)'{-m,--message}"[Use the given <msg> as the commit message]:message:"
|
'(-m --message=)'{-m,--message=}"[Use the given <msg> as the commit message]:message:"
|
||||||
'(-u --db-update)'{-u,--db-update}'[Automatically update the pacman database as last action]'
|
'(-u --db-update)'{-u,--db-update}'[Automatically update the pacman database as last action]'
|
||||||
'(-h --help)'{-h,--help}'[Display usage]'
|
'(-h --help)'{-h,--help}'[Display usage]'
|
||||||
'*:git_dir:_files -/'
|
'*:git_dir:_files -/'
|
||||||
@@ -201,7 +201,7 @@ _pkgctl_issue_view_args=(
|
|||||||
)
|
)
|
||||||
|
|
||||||
_pkgctl_release_args=(
|
_pkgctl_release_args=(
|
||||||
'(-m --message)'{-m,--message}"[Use the given <msg> as the commit message]:message:"
|
'(-m --message=)'{-m,--message=}"[Use the given <msg> as the commit message]:message:"
|
||||||
'(-r --repo)'{-r,--repo}"[Specify a target repository for new packages]:repo:($DEVTOOLS_VALID_REPOS[*])"
|
'(-r --repo)'{-r,--repo}"[Specify a target repository for new packages]:repo:($DEVTOOLS_VALID_REPOS[*])"
|
||||||
'(-s --staging)'{-s,--staging}'[Release to the staging counterpart of the auto-detected repo]'
|
'(-s --staging)'{-s,--staging}'[Release to the staging counterpart of the auto-detected repo]'
|
||||||
'(-t --testing)'{-t,--testing}'[Release to the testing counterpart of the auto-detected repo]'
|
'(-t --testing)'{-t,--testing}'[Release to the testing counterpart of the auto-detected repo]'
|
||||||
|
@@ -23,8 +23,7 @@ Options
|
|||||||
Location of a pacman config file
|
Location of a pacman config file
|
||||||
|
|
||||||
*-M* <file>::
|
*-M* <file>::
|
||||||
Location of a makepkg config file. Specific additions (e.g. build flags for
|
Location of a makepkg config file
|
||||||
additional languages) can be placed in '<file>.d/*.conf'.
|
|
||||||
|
|
||||||
*-c* <dir>::
|
*-c* <dir>::
|
||||||
Set pacman cache, if no directory is specified the passed pacman.conf's cachedir is used with a fallback to '/etc/pacman.conf'
|
Set pacman cache, if no directory is specified the passed pacman.conf's cachedir is used with a fallback to '/etc/pacman.conf'
|
||||||
|
@@ -49,8 +49,7 @@ Options
|
|||||||
Set the pacman cache directory.
|
Set the pacman cache directory.
|
||||||
|
|
||||||
*-M* <file>::
|
*-M* <file>::
|
||||||
Location of a makepkg config file. Specific additions (e.g. build flags for
|
Location of a makepkg config file.
|
||||||
additional languages) can be placed in '<file>.d/*.conf'.
|
|
||||||
|
|
||||||
*-l* <chroot>::
|
*-l* <chroot>::
|
||||||
The directory name to use as the chroot namespace
|
The directory name to use as the chroot namespace
|
||||||
|
@@ -112,13 +112,7 @@ copy_hostconf () {
|
|||||||
[[ -n $host_cachemirrors ]] && printf 'CacheServer = %s\n' "${host_cachemirrors[@]}" >>"$working_dir/etc/pacman.d/mirrorlist"
|
[[ -n $host_cachemirrors ]] && printf 'CacheServer = %s\n' "${host_cachemirrors[@]}" >>"$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"
|
||||||
if [[ -n $makepkg_conf ]]; then
|
[[ -n $makepkg_conf ]] && cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"
|
||||||
cp "$makepkg_conf" "$working_dir/etc/makepkg.conf"
|
|
||||||
if [[ -d "${makepkg_conf}.d" ]] && is_globfile "${makepkg_conf}.d"/*.conf; then
|
|
||||||
mkdir --parents "$working_dir/etc/makepkg.conf.d/"
|
|
||||||
cp "${makepkg_conf}.d/"*.conf "$working_dir/etc/makepkg.conf.d/"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
local file
|
local file
|
||||||
for file in "${files[@]}"; do
|
for file in "${files[@]}"; do
|
||||||
|
@@ -297,6 +297,4 @@ if [[ ${#uploads[*]} -gt 0 ]]; then
|
|||||||
unset new_uploads
|
unset new_uploads
|
||||||
msg 'Uploading all package and signature files'
|
msg 'Uploading all package and signature files'
|
||||||
rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:staging/$repo/" || die
|
rsync "${rsyncopts[@]}" "${uploads[@]}" "$server:staging/$repo/" || die
|
||||||
else
|
|
||||||
die 'No package to upload'
|
|
||||||
fi
|
fi
|
||||||
|
@@ -42,10 +42,10 @@ pkgctl_build_usage() {
|
|||||||
|
|
||||||
Build packages inside a clean chroot
|
Build packages inside a clean chroot
|
||||||
|
|
||||||
Build packages in clean chroot environment, offering various options
|
When a new pkgver is set using the appropriate PKGBUILD options the
|
||||||
and functionalities to customize the package building process.
|
checksums are automatically updated.
|
||||||
|
|
||||||
By default, chroot environments are located in /var/lib/archbuild/.
|
TODO
|
||||||
|
|
||||||
BUILD OPTIONS
|
BUILD OPTIONS
|
||||||
--arch ARCH Specify architectures to build for (disables auto-detection)
|
--arch ARCH Specify architectures to build for (disables auto-detection)
|
||||||
|
@@ -18,9 +18,6 @@ export LANG=C.UTF-8
|
|||||||
# Avoid systemd trying to color the terminal on systemd-nspawn
|
# Avoid systemd trying to color the terminal on systemd-nspawn
|
||||||
export SYSTEMD_TINT_BACKGROUND=no
|
export SYSTEMD_TINT_BACKGROUND=no
|
||||||
|
|
||||||
# Avoid diffoscope looking at remote debug info through readelf
|
|
||||||
unset DEBUGINFOD_URLS
|
|
||||||
|
|
||||||
# Set buildtool properties
|
# Set buildtool properties
|
||||||
export BUILDTOOL=devtools
|
export BUILDTOOL=devtools
|
||||||
export BUILDTOOLVER=@buildtoolver@
|
export BUILDTOOLVER=@buildtoolver@
|
||||||
|
@@ -93,36 +93,14 @@ get_makepkg_conf() {
|
|||||||
local fname=${1}
|
local fname=${1}
|
||||||
local arch="${2}"
|
local arch="${2}"
|
||||||
local makepkg_conf="${3}"
|
local makepkg_conf="${3}"
|
||||||
|
|
||||||
if ! buildtool_file=$(get_pkgfile "${fname}"); then
|
if ! buildtool_file=$(get_pkgfile "${fname}"); then
|
||||||
error "failed to retrieve ${fname}"
|
error "failed to retrieve ${fname}"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
buildtool_file="${buildtool_file/file:\/\//}"
|
msg2 "using makepkg.conf from ${fname}"
|
||||||
msg "using makepkg.conf from ${fname}"
|
if ! bsdtar xOqf "${buildtool_file/file:\/\//}" "usr/share/devtools/makepkg.conf.d/${arch}.conf" > "${makepkg_conf}"; then
|
||||||
|
bsdtar xOqf "${buildtool_file/file:\/\//}" "usr/share/devtools/makepkg-${arch}.conf" > "${makepkg_conf}"
|
||||||
# try to handle config of legacy devtools
|
|
||||||
if bsdtar --list --file "${buildtool_file}" "usr/share/devtools/makepkg-${arch}.conf" &>/dev/null; then
|
|
||||||
bsdtar --extract --to-stdout --fast-read --file "${buildtool_file}" "usr/share/devtools/makepkg-${arch}.conf" > "${makepkg_conf}"
|
|
||||||
return $?
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
msg2 "extracting ${arch}.conf from devtools archive"
|
|
||||||
if ! bsdtar --extract --to-stdout --fast-read --file "${buildtool_file}" "usr/share/devtools/makepkg.conf.d/${arch}.conf" > "${makepkg_conf}"; then
|
|
||||||
error "failed to extract 'usr/share/devtools/makepkg.conf.d/${arch}.conf' from devtools archive"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir --parents "${makepkg_conf}.d"
|
|
||||||
if bsdtar --list --file "${buildtool_file}" "usr/share/devtools/makepkg.conf.d/conf.d" &>/dev/null; then
|
|
||||||
msg2 "extracting conf.d from devtools archive"
|
|
||||||
bsdtar --extract --file "${buildtool_file}" --cd "${makepkg_conf}.d" --strip-components 4 "usr/share/devtools/makepkg.conf.d/conf.d"
|
|
||||||
fi
|
|
||||||
if bsdtar --list --file "${buildtool_file}" "usr/share/devtools/makepkg.conf.d/${arch}.conf.d" &>/dev/null; then
|
|
||||||
msg2 "extracting ${arch}.conf.d from devtools archive"
|
|
||||||
bsdtar --extract --file "${buildtool_file}" --cd "${makepkg_conf}.d" --strip-components 4 "usr/share/devtools/makepkg.conf.d/${arch}.conf.d"
|
|
||||||
fi
|
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
test/Justfile
Normal file
4
test/Justfile
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
install:
|
||||||
|
rm -rf src/devtools-local
|
||||||
|
makepkg -f
|
||||||
|
sudo pacman --noconfirm -U $(makepkg --packagelist | head -1)
|
67
test/PKGBUILD
Normal file
67
test/PKGBUILD
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
||||||
|
# Contributor: Pierre Schmitz <pierre@archlinux.de>
|
||||||
|
|
||||||
|
pkgname=devtools
|
||||||
|
branch=master
|
||||||
|
pkgver=1.3.1.r4.g79c3162
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc='Tools for Arch Linux package maintainers'
|
||||||
|
arch=('any')
|
||||||
|
license=('GPL')
|
||||||
|
url='https://gitlab.archlinux.org/archlinux/devtools'
|
||||||
|
depends=(
|
||||||
|
arch-install-scripts
|
||||||
|
awk
|
||||||
|
bash
|
||||||
|
binutils
|
||||||
|
coreutils
|
||||||
|
diffutils
|
||||||
|
fakeroot
|
||||||
|
findutils
|
||||||
|
grep
|
||||||
|
jq
|
||||||
|
openssh
|
||||||
|
parallel
|
||||||
|
rsync
|
||||||
|
sed
|
||||||
|
util-linux
|
||||||
|
|
||||||
|
bzr
|
||||||
|
git
|
||||||
|
mercurial
|
||||||
|
subversion
|
||||||
|
)
|
||||||
|
makedepends=(
|
||||||
|
asciidoc
|
||||||
|
shellcheck
|
||||||
|
)
|
||||||
|
optdepends=('btrfs-progs: btrfs support')
|
||||||
|
source=(devtools-local::"git+file://$PWD/../.git#branch=${branch}")
|
||||||
|
validpgpkeys=(
|
||||||
|
'4AA4767BBC9C4B1D18AE28B77F2D434B9741E8AC' # Pierre Schmitz <pierre@archlinux.org>
|
||||||
|
'86CFFCA918CF3AF47147588051E8B148A9999C34' # Evangelos Foutras <foutrelis@archlinux.org>
|
||||||
|
'8FC15A064950A99DD1BD14DD39E4B877E62EB915' # Sven-Hendrik Haase <svenstaro@archlinux.org>
|
||||||
|
'A2FF3A36AAA56654109064AB19802F8B0D70FC30' # Jan Alexander Steffens (heftig) <heftig@archlinux.org>
|
||||||
|
'B81B051F2D7FC867AAFF35A58DBD63B82072D77A' # Sébastien Luttringer <seblu@archlinux.org>
|
||||||
|
'6645B0A8C7005E78DB1D7864F99FFE0FEAE999BD' # Allan McRae (Developer) <allan@archlinux.org>
|
||||||
|
'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak <anthraxx@archlinux.org>
|
||||||
|
)
|
||||||
|
sha256sums=('SKIP')
|
||||||
|
b2sums=('SKIP')
|
||||||
|
|
||||||
|
pkgver() {
|
||||||
|
cd ${pkgname}-local
|
||||||
|
git describe --long --tags | sed -E 's,^[^0-9]*,,;s,([^-]*-g),r\1,;s,-,.,g'
|
||||||
|
}
|
||||||
|
|
||||||
|
build() {
|
||||||
|
cd ${pkgname}-local
|
||||||
|
make BUILDTOOLVER="${epoch}:${pkgver}-${pkgrel}-${arch}" PREFIX=/usr
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cd ${pkgname}-local
|
||||||
|
make PREFIX=/usr DESTDIR="${pkgdir}" install
|
||||||
|
}
|
||||||
|
|
||||||
|
# vim: ts=2 sw=2 et:
|
Reference in New Issue
Block a user