mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 09:56:18 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f870ab6864 | ||
![]() |
ea782a8ab7 | ||
![]() |
a510331698 | ||
![]() |
dca8f91d26 | ||
![]() |
b64d8ebacf | ||
![]() |
248cdf7ff2 | ||
![]() |
04a821dddf | ||
![]() |
d82bc69716 | ||
![]() |
5d02c6df7f |
@@ -46,13 +46,13 @@ CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
|
||||
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"
|
||||
RUSTFLAGS=""
|
||||
#-- Make Flags: change this for DistCC/SMP systems
|
||||
#MAKEFLAGS="-j2"
|
||||
#-- Debugging flags
|
||||
DEBUG_CFLAGS="-g"
|
||||
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
|
||||
#DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||
DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||
|
||||
#########################################################################
|
||||
# BUILD ENVIRONMENT
|
||||
@@ -94,7 +94,7 @@ BUILDENV=(!distcc color !ccache check !sign)
|
||||
#-- 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)
|
||||
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)
|
||||
|
@@ -46,13 +46,13 @@ CFLAGS="-march=x86-64-v3 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
|
||||
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"
|
||||
RUSTFLAGS=""
|
||||
#-- Make Flags: change this for DistCC/SMP systems
|
||||
#MAKEFLAGS="-j2"
|
||||
#-- Debugging flags
|
||||
DEBUG_CFLAGS="-g"
|
||||
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
|
||||
#DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||
DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||
|
||||
#########################################################################
|
||||
# BUILD ENVIRONMENT
|
||||
@@ -94,7 +94,7 @@ BUILDENV=(!distcc color !ccache check !sign)
|
||||
#-- 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)
|
||||
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)
|
||||
|
@@ -146,7 +146,7 @@ find_cached_package() {
|
||||
[[ -d $dir ]] || continue
|
||||
|
||||
shopt -s extglob nullglob
|
||||
mapfile -t packages < <(printf "%s\n" "$dir"/*.pkg.tar?(.!(sig|*.*)))
|
||||
mapfile -t packages < <(printf "%s\n" "$dir"/"${targetname}"-"${targetver}"-*"${targetarch}".pkg.tar?(.!(sig|*.*)))
|
||||
shopt -u extglob nullglob
|
||||
|
||||
for pkg in "${packages[@]}"; do
|
||||
|
@@ -311,14 +311,14 @@ fi
|
||||
# Pass all arguments after -- right to makepkg
|
||||
makepkg_args+=("${@:$OPTIND}")
|
||||
|
||||
# See if -R or -e was passed to makepkg
|
||||
# See if -R, -e or -A was passed to makepkg
|
||||
for arg in "${@:$OPTIND}"; do
|
||||
case ${arg%%=*} in
|
||||
--skip*|--holdver|--ignorearch) verifysource_args+=("$arg") ;;
|
||||
--repackage|--noextract) keepbuilddir=1 ;;
|
||||
--*) ;;
|
||||
-*A*) verifysource_args+=(-A) ;;
|
||||
-*R*|-*e*) keepbuilddir=1 ;;
|
||||
-*A*) verifysource_args+=(-A) ;;&
|
||||
-*R*|-*e*) keepbuilddir=1 ;;&
|
||||
esac
|
||||
done
|
||||
|
||||
|
@@ -86,13 +86,14 @@ get_pkgfile() {
|
||||
|
||||
get_makepkg_conf() {
|
||||
local fname=${1}
|
||||
local makepkg_conf="${2}"
|
||||
local arch="${2}"
|
||||
local makepkg_conf="${3}"
|
||||
if ! buildtool_file=$(get_pkgfile "${fname}"); then
|
||||
error "failed to retrieve ${fname}"
|
||||
return 1
|
||||
fi
|
||||
msg2 "using makepkg.conf from ${fname}"
|
||||
bsdtar xOqf "${buildtool_file/file:\/\//}" usr/share/devtools/makepkg-x86_64.conf > "${makepkg_conf}"
|
||||
bsdtar xOqf "${buildtool_file/file:\/\//}" "usr/share/devtools/makepkg-${arch}.conf" > "${makepkg_conf}"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -213,17 +214,17 @@ TEMPDIR=$(mktemp -d --tmpdir makerepropkg.XXXXXXXXXX)
|
||||
makepkg_conf="${TEMPDIR}/makepkg.conf"
|
||||
# anything before buildtool support is pinned to the last none buildtool aware release
|
||||
if [[ -z "${BUILDTOOL}" ]]; then
|
||||
get_makepkg_conf "devtools-20210202-3-any" "${makepkg_conf}" || exit 1
|
||||
get_makepkg_conf "devtools-20210202-3-any" "${CARCH}" "${makepkg_conf}" || exit 1
|
||||
# prefere to assume devtools up until matching makepkg version so repository packages remain reproducible
|
||||
elif [[ "${BUILDTOOL}" = makepkg ]] && (( $(vercmp "${BUILDTOOLVER}" 6.0.1) <= 0 )); then
|
||||
get_makepkg_conf "devtools-20210202-3-any" "${makepkg_conf}" || exit 1
|
||||
get_makepkg_conf "devtools-20210202-3-any" "${CARCH}" "${makepkg_conf}" || exit 1
|
||||
# all devtools builds
|
||||
elif [[ "${BUILDTOOL}" = devtools ]] && get_makepkg_conf "${BUILDTOOL}-${BUILDTOOLVER}" "${makepkg_conf}"; then
|
||||
elif [[ "${BUILDTOOL}" = devtools ]] && get_makepkg_conf "${BUILDTOOL}-${BUILDTOOLVER}" "${CARCH}" "${makepkg_conf}"; then
|
||||
true
|
||||
# fallback to current makepkg.conf
|
||||
else
|
||||
warning "Unknown buildtool (${BUILDTOOL}-${BUILDTOOLVER}), using fallback"
|
||||
makepkg_conf=@pkgdatadir@/makepkg-x86_64.conf
|
||||
makepkg_conf=@pkgdatadir@/makepkg-${CARCH}.conf
|
||||
fi
|
||||
printf '%s\n' "${allpkgfiles[@]}" | mkarchroot -M "${makepkg_conf}" -U "${archroot_args[@]}" "${namespace}/root" - || exit 1
|
||||
|
||||
|
@@ -81,7 +81,7 @@ for file in "${files[@]}"; do
|
||||
cp "$file" "$working_dir$file"
|
||||
done
|
||||
|
||||
unshare --mount pacstrap -${umode}Mcd ${pac_conf:+-C "$pac_conf"} "$working_dir" \
|
||||
unshare --mount pacstrap -${umode}Mc ${pac_conf:+-C "$pac_conf"} "$working_dir" \
|
||||
"${cache_dirs[@]/#/--cachedir=}" "$@" || die 'Failed to install all packages'
|
||||
|
||||
printf '%s.UTF-8 UTF-8\n' C en_US de_DE > "$working_dir/etc/locale.gen"
|
||||
|
Reference in New Issue
Block a user