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
|
%endif
|
||||||
|
|
||||||
%if [rpm]
|
%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
|
# Add distro info to release
|
||||||
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,3\}\).*/\1/'`
|
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,3\}\).*/\1/'`
|
||||||
case "$pp_rpm_distro" in
|
case "$pp_rpm_distro" in
|
||||||
|
@ -84,6 +84,11 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if [rpm]
|
%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
|
# Add distro info to release
|
||||||
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,3\}\).*/\1/'`
|
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,3\}\).*/\1/'`
|
||||||
case "$pp_rpm_distro" in
|
case "$pp_rpm_distro" in
|
||||||
|
@ -149,6 +149,11 @@ still allow people to get their work done."
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if [rpm]
|
%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
|
# Add distro info to release
|
||||||
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,3\}\).*/\1/'`
|
osrelease=`echo "$pp_rpm_distro" | sed -e 's/^[^0-9]*\([0-9]\{1,3\}\).*/\1/'`
|
||||||
case "$pp_rpm_distro" in
|
case "$pp_rpm_distro" in
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#
|
#
|
||||||
# Build a binary package using polypkg
|
# Build a binary package using polypkg
|
||||||
# Usage: mkpkg [--build-only] [--configure-only] [--debug] [--flavor flavor]
|
# Usage: mkpkg [--arch arch] [--build-only] [--configure-only] [--debug]
|
||||||
# [--platform platform] [--osversion ver]
|
# [--flavor flavor] [--osversion ver] [--platform platform]
|
||||||
#
|
#
|
||||||
|
|
||||||
# Make sure IFS is set to space, tab, newline in that order.
|
# Make sure IFS is set to space, tab, newline in that order.
|
||||||
@ -29,7 +29,7 @@ nl='
|
|||||||
IFS=" $nl"
|
IFS=" $nl"
|
||||||
|
|
||||||
# Parse arguments
|
# 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
|
debug=0
|
||||||
flavor=vanilla
|
flavor=vanilla
|
||||||
crossbuild=false
|
crossbuild=false
|
||||||
@ -37,6 +37,18 @@ build_packages=true;
|
|||||||
build_sudo=true;
|
build_sudo=true;
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
case "$1" in
|
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)
|
--debug)
|
||||||
set -x
|
set -x
|
||||||
debug=1
|
debug=1
|
||||||
@ -208,6 +220,10 @@ case "$osversion" in
|
|||||||
;;
|
;;
|
||||||
esac
|
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
|
if [ X"$with_selinux" = X"true" ]; then
|
||||||
configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux"
|
configure_opts="${configure_opts}${configure_opts+$tab}--with-selinux"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user