mirror of
https://gitlab.archlinux.org/archlinux/devtools.git
synced 2025-09-13 09:56:18 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f870ab6864 | ||
![]() |
ea782a8ab7 | ||
![]() |
a510331698 | ||
![]() |
dca8f91d26 | ||
![]() |
b64d8ebacf |
2
Makefile
2
Makefile
@@ -1,4 +1,4 @@
|
|||||||
V=20221012
|
V=20230105
|
||||||
BUILDTOOLVER ?= $(V)
|
BUILDTOOLVER ?= $(V)
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
|
@@ -46,13 +46,13 @@ CFLAGS="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
|
|||||||
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
|
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
|
||||||
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
|
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
|
||||||
LTOFLAGS="-flto=auto"
|
LTOFLAGS="-flto=auto"
|
||||||
#RUSTFLAGS="-C opt-level=2"
|
RUSTFLAGS=""
|
||||||
#-- Make Flags: change this for DistCC/SMP systems
|
#-- Make Flags: change this for DistCC/SMP systems
|
||||||
#MAKEFLAGS="-j2"
|
#MAKEFLAGS="-j2"
|
||||||
#-- Debugging flags
|
#-- Debugging flags
|
||||||
DEBUG_CFLAGS="-g"
|
DEBUG_CFLAGS="-g"
|
||||||
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
|
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
|
||||||
#DEBUG_RUSTFLAGS="-C debuginfo=2"
|
DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# BUILD ENVIRONMENT
|
# BUILD ENVIRONMENT
|
||||||
@@ -94,7 +94,7 @@ BUILDENV=(!distcc color !ccache check !sign)
|
|||||||
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
||||||
#-- lto: Add compile flags for building with link time optimization
|
#-- 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
|
#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
|
||||||
INTEGRITY_CHECK=(sha256)
|
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"
|
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
|
||||||
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
|
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
|
||||||
LTOFLAGS="-flto=auto"
|
LTOFLAGS="-flto=auto"
|
||||||
#RUSTFLAGS="-C opt-level=2"
|
RUSTFLAGS=""
|
||||||
#-- Make Flags: change this for DistCC/SMP systems
|
#-- Make Flags: change this for DistCC/SMP systems
|
||||||
#MAKEFLAGS="-j2"
|
#MAKEFLAGS="-j2"
|
||||||
#-- Debugging flags
|
#-- Debugging flags
|
||||||
DEBUG_CFLAGS="-g"
|
DEBUG_CFLAGS="-g"
|
||||||
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
|
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
|
||||||
#DEBUG_RUSTFLAGS="-C debuginfo=2"
|
DEBUG_RUSTFLAGS="-C debuginfo=2"
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# BUILD ENVIRONMENT
|
# BUILD ENVIRONMENT
|
||||||
@@ -94,7 +94,7 @@ BUILDENV=(!distcc color !ccache check !sign)
|
|||||||
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
#-- debug: Add debugging flags as specified in DEBUG_* variables
|
||||||
#-- lto: Add compile flags for building with link time optimization
|
#-- 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
|
#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
|
||||||
INTEGRITY_CHECK=(sha256)
|
INTEGRITY_CHECK=(sha256)
|
||||||
|
@@ -86,13 +86,14 @@ get_pkgfile() {
|
|||||||
|
|
||||||
get_makepkg_conf() {
|
get_makepkg_conf() {
|
||||||
local fname=${1}
|
local fname=${1}
|
||||||
local makepkg_conf="${2}"
|
local arch="${2}"
|
||||||
|
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
|
||||||
msg2 "using makepkg.conf from ${fname}"
|
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
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,17 +214,17 @@ TEMPDIR=$(mktemp -d --tmpdir makerepropkg.XXXXXXXXXX)
|
|||||||
makepkg_conf="${TEMPDIR}/makepkg.conf"
|
makepkg_conf="${TEMPDIR}/makepkg.conf"
|
||||||
# anything before buildtool support is pinned to the last none buildtool aware release
|
# anything before buildtool support is pinned to the last none buildtool aware release
|
||||||
if [[ -z "${BUILDTOOL}" ]]; then
|
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
|
# prefere to assume devtools up until matching makepkg version so repository packages remain reproducible
|
||||||
elif [[ "${BUILDTOOL}" = makepkg ]] && (( $(vercmp "${BUILDTOOLVER}" 6.0.1) <= 0 )); then
|
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
|
# 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
|
true
|
||||||
# fallback to current makepkg.conf
|
# fallback to current makepkg.conf
|
||||||
else
|
else
|
||||||
warning "Unknown buildtool (${BUILDTOOL}-${BUILDTOOLVER}), using fallback"
|
warning "Unknown buildtool (${BUILDTOOL}-${BUILDTOOLVER}), using fallback"
|
||||||
makepkg_conf=@pkgdatadir@/makepkg-x86_64.conf
|
makepkg_conf=@pkgdatadir@/makepkg-${CARCH}.conf
|
||||||
fi
|
fi
|
||||||
printf '%s\n' "${allpkgfiles[@]}" | mkarchroot -M "${makepkg_conf}" -U "${archroot_args[@]}" "${namespace}/root" - || exit 1
|
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"
|
cp "$file" "$working_dir$file"
|
||||||
done
|
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'
|
"${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"
|
printf '%s.UTF-8 UTF-8\n' C en_US de_DE > "$working_dir/etc/locale.gen"
|
||||||
|
Reference in New Issue
Block a user