mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-22 01:49:11 +00:00
Add a way to override pp_rpm_arch when building rpms
This will be used to build x86_64_v2 packages for Alma Linux.
This commit is contained in:
parent
2dc10cfbd3
commit
55d3c99c4e
@ -128,6 +128,11 @@ This makes it possible to have all sudo I/O logs on a central server."
|
||||
%endif
|
||||
|
||||
%if [rpm]
|
||||
# Used to set rpm_arch to x86_64_v2 on Alma Linux
|
||||
if test -n "$pp_rpm_arch_override"; then
|
||||
pp_rpm_arch="$pp_rpm_arch_override"
|
||||
fi
|
||||
|
||||
# Add distro info to release
|
||||
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,3\}\).*/\1/'`
|
||||
case "$pp_rpm_distro" in
|
||||
|
@ -84,6 +84,11 @@
|
||||
%endif
|
||||
|
||||
%if [rpm]
|
||||
# Used to set rpm_arch to x86_64_v2 on Alma Linux
|
||||
if test -n "$pp_rpm_arch_override"; then
|
||||
pp_rpm_arch="$pp_rpm_arch_override"
|
||||
fi
|
||||
|
||||
# Add distro info to release
|
||||
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,3\}\).*/\1/'`
|
||||
case "$pp_rpm_distro" in
|
||||
|
@ -149,6 +149,11 @@ still allow people to get their work done."
|
||||
%endif
|
||||
|
||||
%if [rpm]
|
||||
# Used to set rpm_arch to x86_64_v2 on Alma Linux
|
||||
if test -n "$pp_rpm_arch_override"; then
|
||||
pp_rpm_arch="$pp_rpm_arch_override"
|
||||
fi
|
||||
|
||||
# Add distro info to release
|
||||
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,3\}\).*/\1/'`
|
||||
case "$pp_rpm_distro" in
|
||||
|
@ -17,8 +17,8 @@
|
||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# Build a binary package using polypkg
|
||||
# Usage: mkpkg [--build-only] [--configure-only] [--debug] [--flavor flavor]
|
||||
# [--platform platform] [--osversion ver]
|
||||
# Usage: mkpkg [--arch arch] [--build-only] [--configure-only] [--debug]
|
||||
# [--flavor flavor] [--osversion ver] [--platform platform]
|
||||
#
|
||||
|
||||
# Make sure IFS is set to space, tab, newline in that order.
|
||||
@ -29,7 +29,7 @@ nl='
|
||||
IFS=" $nl"
|
||||
|
||||
# Parse arguments
|
||||
usage="usage: mkpkg [--build-only] [--configure-only] [--debug] [--flavor flavor] [--platform platform] [--osversion ver]"
|
||||
usage="usage: mkpkg [--arch arch] [--build-only] [--configure-only] [--debug] [--flavor flavor] [--osversion ver] [--platform platform]"
|
||||
debug=0
|
||||
flavor=vanilla
|
||||
crossbuild=false
|
||||
@ -37,6 +37,18 @@ build_packages=true;
|
||||
build_sudo=true;
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
--arch=?*)
|
||||
arch=`echo "$1" | sed -n 's/^--arch=\(.*\)/\1/p'`
|
||||
;;
|
||||
--arch)
|
||||
arch=`echo "$1" | sed -n 's/^--arch=\(.*\)/\1/p'`
|
||||
if [ $# -lt 2 ]; then
|
||||
echo "$usage" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
arch="$2"
|
||||
shift
|
||||
;;
|
||||
--debug)
|
||||
set -x
|
||||
debug=1
|
||||
@ -208,6 +220,10 @@ case "$osversion" in
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$arch" ]; then
|
||||
# Override the default rpm arch for, e.g. x86_64_v2
|
||||
PPVARS="${PPVARS}${PPVARS+$space}pp_rpm_arch_override=$arch"
|
||||
fi
|
||||
if [ X"$with_selinux" = X"true" ]; then
|
||||
configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user