Skip to content

Commit

Permalink
Make rpm package for x86_64 (#4459)
Browse files Browse the repository at this point in the history
* Make rpm package for x86_64

* Accidentally deleted debug flag

* fix syntax

* add azure linux3 arm
  • Loading branch information
ami-GS authored Aug 15, 2024
1 parent e58b384 commit 512ed02
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 55 deletions.
5 changes: 5 additions & 0 deletions .azure/OneBranch.Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ variables:
DisableDockerDetector: true

parameters:
- name: debug # debug mode will not actually upload and publish packages
type: boolean
default: false

# build on ubuntu 20.04 openssl 1.1
- name: kernel5_4rpmcblrepos
type: object
Expand Down Expand Up @@ -72,6 +76,7 @@ parameters:
type: object
default:
- azurelinux-3.0-prod-ms-oss-x86_64-yum # 3.0 6.6
- azurelinux-3.0-prod-ms-oss-aarch64-yum # 3.0 6.6
- name: kernel6_8rpmrepos
type: object
default:
Expand Down
108 changes: 53 additions & 55 deletions scripts/make-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,62 +139,60 @@ echo "ARCH=$ARCH PKGARCH=$PKGARCH ARTIFACTS=$ARTIFACTS"
mkdir -p ${OUTPUT}

if [ "$OS" == "linux" ]; then
# RedHat/CentOS
FILES="${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
FILES="${FILES} ${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}"
if [ -e "$ARTIFACTS/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" ]; then
FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
fi
if [ "$PKGARCH" == 'aarch64' ] || [ "$PKGARCH" == 'x86_64' ]; then
BITS='64bit'
fi
# XDP is only validated on Ubuntu 24.04 and x64
if [ "$XDP" == "False" ] || [[ "$ARCH" == arm* ]]; then
# RedHat/CentOS
FILES="${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
FILES="${FILES} ${ARTIFACTS}/libmsquic.${LIBEXT}.${VER_MAJOR}=/usr/${LIBDIR}/libmsquic.${LIBEXT}.${VER_MAJOR}"
if [ -e "$ARTIFACTS/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}" ]; then
FILES="${FILES} ${ARTIFACTS}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}=/usr/${LIBDIR}/libmsquic.lttng.${LIBEXT}.${VER_MAJOR}.${VER_MINOR}.${VER_PATCH}"
fi
if [ "$PKGARCH" == 'aarch64' ] || [ "$PKGARCH" == 'x86_64' ]; then
BITS='64bit'
fi
if [ "$XDP" == "True" ] && [[ "$ARCH" == x* ]]; then
echo "Building rpm package (XDP)"
fpm \
--force \
--input-type dir \
--output-type rpm \
--architecture ${PKGARCH} \
--name ${NAME} \
--provides ${NAME} \
--depends "libcrypto.so.${TLSVERSION}()(${BITS})" \
--depends "libnuma.so.1()(${BITS})" \
--depends "libxdp.so.1.4.0" \
--depends "libnl-route-3.so.200" \
--conflicts ${CONFLICTS} \
--version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \
--description "${DESCRIPTION}" \
--vendor "${VENDOR}" \
--maintainer "${MAINTAINER}" \
--package "${OUTPUT}" \
--license MIT \
--url https://github.com/microsoft/msquic \
--log error \
${FILES} ${ARTIFACTS}/datapath_raw_xdp_kern.o=/usr/${LIBDIR}/datapath_raw_xdp_kern.o
else
echo "Building rpm package"
fpm \
--force \
--input-type dir \
--output-type rpm \
--architecture ${PKGARCH} \
--name ${NAME} \
--provides ${NAME} \
--depends "libcrypto.so.${TLSVERSION}()(${BITS})" \
--depends "libnuma.so.1()(${BITS})" \
--conflicts ${CONFLICTS} \
--version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \
--description "${DESCRIPTION}" \
--vendor "${VENDOR}" \
--maintainer "${MAINTAINER}" \
--package "${OUTPUT}" \
--license MIT \
--url https://github.com/microsoft/msquic \
--log error \
${FILES}
fi
if [ "$XDP" == "True" ] && [[ "$ARCH" == x* ]]; then
echo "Building rpm package (XDP)"
fpm \
--force \
--input-type dir \
--output-type rpm \
--architecture ${PKGARCH} \
--name ${NAME} \
--provides ${NAME} \
--depends "libcrypto.so.${TLSVERSION}()(${BITS})" \
--depends "libnuma.so.1()(${BITS})" \
--depends "libxdp >= 1.4.0" \
--depends "libnl3 >= 3.0" \
--conflicts ${CONFLICTS} \
--version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \
--description "${DESCRIPTION}" \
--vendor "${VENDOR}" \
--maintainer "${MAINTAINER}" \
--package "${OUTPUT}" \
--license MIT \
--url https://github.com/microsoft/msquic \
--log error \
${FILES} ${ARTIFACTS}/datapath_raw_xdp_kern.o=/usr/${LIBDIR}/datapath_raw_xdp_kern.o
else
echo "Building rpm package"
fpm \
--force \
--input-type dir \
--output-type rpm \
--architecture ${PKGARCH} \
--name ${NAME} \
--provides ${NAME} \
--depends "libcrypto.so.${TLSVERSION}()(${BITS})" \
--depends "libnuma.so.1()(${BITS})" \
--conflicts ${CONFLICTS} \
--version ${VER_MAJOR}.${VER_MINOR}.${VER_PATCH} \
--description "${DESCRIPTION}" \
--vendor "${VENDOR}" \
--maintainer "${MAINTAINER}" \
--package "${OUTPUT}" \
--license MIT \
--url https://github.com/microsoft/msquic \
--log error \
${FILES}
fi

# Debian/Ubuntu
Expand Down

0 comments on commit 512ed02

Please sign in to comment.