diff --git a/.github/workflows/portage-stable-packages-list b/.github/workflows/portage-stable-packages-list index f7eea886f38..7e92f85d4a6 100644 --- a/.github/workflows/portage-stable-packages-list +++ b/.github/workflows/portage-stable-packages-list @@ -123,6 +123,7 @@ app-crypt/libb2 app-crypt/libmd app-crypt/mhash app-crypt/mit-krb5 +app-crypt/p11-kit app-crypt/pinentry app-crypt/rhash app-crypt/shash @@ -188,6 +189,10 @@ dev-build/meson-format-array dev-build/ninja dev-cpp/abseil-cpp +dev-cpp/azure-core +dev-cpp/azure-identity +dev-cpp/azure-security-keyvault-certificates +dev-cpp/azure-security-keyvault-keys dev-cpp/gflags dev-cpp/glog dev-cpp/gtest diff --git a/build_library/build_image_util.sh b/build_library/build_image_util.sh index 01c0d0d0c81..8edaaf355e0 100755 --- a/build_library/build_image_util.sh +++ b/build_library/build_image_util.sh @@ -20,6 +20,7 @@ BUILD_DIR="${FLAGS_output_root}/${BOARD}/${IMAGE_SUBDIR}" OUTSIDE_OUTPUT_DIR="../build/images/${BOARD}/${IMAGE_SUBDIR}" source "${BUILD_LIBRARY_DIR}/reports_util.sh" || exit 1 +source "${BUILD_LIBRARY_DIR}/sbsign_util.sh" || exit 1 set_build_symlinks() { local build=$(basename ${BUILD_DIR}) @@ -826,13 +827,9 @@ EOF fi # Sign the kernel after /usr is in a consistent state and verity is calculated - if [[ ${COREOS_OFFICIAL:-0} -ne 1 ]]; then - sudo sbsign --key /usr/share/sb_keys/shim.key \ - --cert /usr/share/sb_keys/shim.pem \ - "${root_fs_dir}/boot/flatcar/vmlinuz-a" - sudo mv "${root_fs_dir}/boot/flatcar/vmlinuz-a.signed" \ - "${root_fs_dir}/boot/flatcar/vmlinuz-a" - fi + [[ ${COREOS_OFFICIAL:-0} -ne 1 ]] && \ + do_sbsign --output "${root_fs_dir}/boot/flatcar/vmlinuz-a"{,} + cleanup_sbsign_certs if [[ -n "${image_kernel}" ]]; then # copying kernel from vfat so ignore the permissions diff --git a/build_library/grub_install.sh b/build_library/grub_install.sh index 6149131760b..5c5e7a43b3b 100755 --- a/build_library/grub_install.sh +++ b/build_library/grub_install.sh @@ -35,56 +35,49 @@ switch_to_strict_mode # must be sourced after flags are parsed. . "${BUILD_LIBRARY_DIR}/toolchain_util.sh" || exit 1 . "${BUILD_LIBRARY_DIR}/board_options.sh" || exit 1 +. "${BUILD_LIBRARY_DIR}/sbsign_util.sh" || exit 1 # Our GRUB lives under flatcar/grub so new pygrub versions cannot find grub.cfg GRUB_DIR="flatcar/grub/${FLAGS_target}" -# GRUB install location inside the SDK -GRUB_SRC="/usr/lib/grub/${FLAGS_target}" - # Modules required to boot a standard CoreOS configuration CORE_MODULES=( normal search test fat part_gpt search_fs_uuid gzio search_part_label terminal gptprio configfile memdisk tar echo read btrfs ) -# Name of the core image, depends on target -CORE_NAME= - -# Whether the SDK's grub or the board root's grub is used. Once amd64 is -# fixed up the board root's grub will always be used. -BOARD_GRUB=1 - SBAT_ARG=() case "${FLAGS_target}" in - i386-pc) - CORE_MODULES+=( biosdisk serial ) - CORE_NAME="core.img" - ;; x86_64-efi) - CORE_MODULES+=( serial linux efi_gop efinet pgp http tftp tpm ) - CORE_NAME="core.efi" - SBAT_ARG=( --sbat "${BOARD_ROOT}/usr/share/grub/sbat.csv" ) - ;; - x86_64-xen) - CORE_NAME="core.elf" + EFI_ARCH="x64" ;; arm64-efi) + EFI_ARCH="aa64" + ;; +esac + +case "${FLAGS_target}" in + x86_64-efi|arm64-efi) + GRUB_IMAGE="EFI/boot/grub${EFI_ARCH}.efi" CORE_MODULES+=( serial linux efi_gop efinet pgp http tftp tpm ) - CORE_NAME="core.efi" - BOARD_GRUB=1 SBAT_ARG=( --sbat "${BOARD_ROOT}/usr/share/grub/sbat.csv" ) ;; + i386-pc) + GRUB_IMAGE="${GRUB_DIR}/core.img" + CORE_MODULES+=( biosdisk serial ) + ;; + x86_64-xen) + GRUB_IMAGE="xen/pvboot-x86_64.elf" + ;; *) die_notrace "Unknown GRUB target ${FLAGS_target}" ;; esac -if [[ $BOARD_GRUB -eq 1 ]]; then - info "Updating GRUB in ${BOARD_ROOT}" - emerge-${BOARD} \ - --nodeps --select --verbose --update --getbinpkg --usepkgonly --newuse \ - sys-boot/grub - GRUB_SRC="${BOARD_ROOT}/usr/lib/grub/${FLAGS_target}" -fi +info "Updating GRUB in ${BOARD_ROOT}" +emerge-${BOARD} \ + --nodeps --select --verbose --update --getbinpkg --usepkgonly --newuse \ + sys-boot/grub + +GRUB_SRC="${BOARD_ROOT}/usr/lib/grub/${FLAGS_target}" [[ -d "${GRUB_SRC}" ]] || die "GRUB not installed at ${GRUB_SRC}" # In order for grub-setup-bios to properly detect the layout of the disk @@ -97,6 +90,7 @@ ESP_DIR= LOOP_DEV= cleanup() { + cleanup_sbsign_certs if [[ -d "${ESP_DIR}" ]]; then if mountpoint -q "${ESP_DIR}"; then sudo umount "${ESP_DIR}" @@ -130,7 +124,7 @@ done if [[ -z ${MOUNTED} ]]; then failboat "${LOOP_DEV}p1 where art thou? udev has forsaken us!" fi -sudo mkdir -p "${ESP_DIR}/${GRUB_DIR}" +sudo mkdir -p "${ESP_DIR}/${GRUB_DIR}" "${ESP_DIR}/${GRUB_IMAGE%/*}" info "Compressing modules in ${GRUB_DIR}" for file in "${GRUB_SRC}"/*{.lst,.mod}; do @@ -172,7 +166,7 @@ if [[ ! -f "${ESP_DIR}/flatcar/grub/grub.cfg.tar" ]]; then -C "${GRUB_TEMP_DIR}" "grub.cfg" fi -info "Generating ${GRUB_DIR}/${CORE_NAME}" +info "Generating ${GRUB_IMAGE}" sudo grub-mkimage \ --compression=auto \ --format "${FLAGS_target}" \ @@ -180,7 +174,7 @@ sudo grub-mkimage \ --config "${ESP_DIR}/${GRUB_DIR}/load.cfg" \ --memdisk "${ESP_DIR}/flatcar/grub/grub.cfg.tar" \ "${SBAT_ARG[@]}" \ - --output "${ESP_DIR}/${GRUB_DIR}/${CORE_NAME}" \ + --output "${ESP_DIR}/${GRUB_IMAGE}" \ "${CORE_MODULES[@]}" for mod in "${CORE_MODULES[@]}"; do @@ -189,77 +183,55 @@ done # Now target specific steps to make the system bootable case "${FLAGS_target}" in - i386-pc) - info "Installing MBR and the BIOS Boot partition." - sudo cp "${GRUB_SRC}/boot.img" "${ESP_DIR}/${GRUB_DIR}" - sudo grub-bios-setup --device-map=/dev/null \ - --directory="${ESP_DIR}/${GRUB_DIR}" "${LOOP_DEV}" - # boot.img gets manipulated by grub-bios-setup so it alone isn't - # sufficient to restore the MBR boot code if it gets corrupted. - sudo dd bs=448 count=1 status=none if="${LOOP_DEV}" \ - of="${ESP_DIR}/${GRUB_DIR}/mbr.bin" - ;; - x86_64-efi) - info "Installing default x86_64 UEFI bootloader." - sudo mkdir -p "${ESP_DIR}/EFI/boot" - # Use the test keys for signing unofficial builds - if [[ ${COREOS_OFFICIAL:-0} -ne 1 ]]; then - # Sign the GRUB with the shim-embedded key - sudo sbsign --key /usr/share/sb_keys/shim.key \ - --cert /usr/share/sb_keys/shim.pem \ - "${ESP_DIR}/${GRUB_DIR}/${CORE_NAME}" - sudo mv "${ESP_DIR}/${GRUB_DIR}/${CORE_NAME}.signed" \ - "${ESP_DIR}/EFI/boot/grubx64.efi" - sudo rm "${ESP_DIR}/${GRUB_DIR}/${CORE_NAME}" - # Sign the mokmanager(mm) with the shim-embedded key - sudo sbsign --key /usr/share/sb_keys/shim.key \ - --cert /usr/share/sb_keys/shim.pem \ - "/usr/lib/shim/mmx64.efi" - sudo cp "/usr/lib/shim/mmx64.efi.signed" \ - "${ESP_DIR}/EFI/boot/mmx64.efi" + x86_64-efi|arm64-efi) + info "Installing default ${FLAGS_target} UEFI bootloader." - sudo sbsign --key /usr/share/sb_keys/DB.key \ + if [[ ${COREOS_OFFICIAL:-0} -ne 1 ]]; then + # Sign GRUB and mokmanager(mm) with the shim-embedded key. + do_sbsign --output "${ESP_DIR}/${GRUB_IMAGE}"{,} + do_sbsign --output "${ESP_DIR}/EFI/boot/mm${EFI_ARCH}.efi" \ + "${BOARD_ROOT}/usr/lib/shim/mm${EFI_ARCH}.efi" + + # Unofficial build: Sign shim with our development key. + sudo sbsign \ + --key /usr/share/sb_keys/DB.key \ --cert /usr/share/sb_keys/DB.crt \ - --output "${ESP_DIR}/EFI/boot/bootx64.efi" \ - "/usr/lib/shim/shim.efi" + --output "${ESP_DIR}/EFI/boot/boot${EFI_ARCH}.efi" \ + "${BOARD_ROOT}/usr/lib/shim/shim${EFI_ARCH}.efi" else - sudo mv "${ESP_DIR}/${GRUB_DIR}/${CORE_NAME}" \ - "${ESP_DIR}/EFI/boot/grubx64.efi" - sudo cp "/usr/lib/shim/shim.efi" \ - "${ESP_DIR}/EFI/boot/bootx64.efi" - sudo cp "/usr/lib/shim/mmx64.efi" \ - "${ESP_DIR}/EFI/boot/mmx64.efi" + # Official build: Copy the unsigned files. + sudo cp "${BOARD_ROOT}/usr/lib/shim/mm${EFI_ARCH}.efi" \ + "${ESP_DIR}/EFI/boot/mm${EFI_ARCH}.efi" + sudo cp "${BOARD_ROOT}/usr/lib/shim/shim${EFI_ARCH}.efi" \ + "${ESP_DIR}/EFI/boot/boot${EFI_ARCH}.efi" fi + # copying from vfat so ignore permissions - if [[ -n "${FLAGS_copy_efi_grub}" ]]; then - cp --no-preserve=mode "${ESP_DIR}/EFI/boot/grubx64.efi" \ + if [[ -n ${FLAGS_copy_efi_grub} ]]; then + cp --no-preserve=mode "${ESP_DIR}/${GRUB_IMAGE}" \ "${FLAGS_copy_efi_grub}" fi - if [[ -n "${FLAGS_copy_shim}" ]]; then - cp --no-preserve=mode "${ESP_DIR}/EFI/boot/bootx64.efi" \ + if [[ -n ${FLAGS_copy_shim} ]]; then + cp --no-preserve=mode "${ESP_DIR}/EFI/boot/boot${EFI_ARCH}.efi" \ "${FLAGS_copy_shim}" fi ;; + i386-pc) + info "Installing MBR and the BIOS Boot partition." + sudo cp "${GRUB_SRC}/boot.img" "${ESP_DIR}/${GRUB_DIR}" + sudo grub-bios-setup --device-map=/dev/null \ + --directory="${ESP_DIR}/${GRUB_DIR}" "${LOOP_DEV}" + # boot.img gets manipulated by grub-bios-setup so it alone isn't + # sufficient to restore the MBR boot code if it gets corrupted. + sudo dd bs=448 count=1 status=none if="${LOOP_DEV}" \ + of="${ESP_DIR}/${GRUB_DIR}/mbr.bin" + ;; x86_64-xen) info "Installing default x86_64 Xen bootloader." - sudo mkdir -p "${ESP_DIR}/xen" "${ESP_DIR}/boot/grub" - sudo mv "${ESP_DIR}/${GRUB_DIR}/${CORE_NAME}" \ - "${ESP_DIR}/xen/pvboot-x86_64.elf" + sudo mkdir -p "${ESP_DIR}/boot/grub" sudo cp "${BUILD_LIBRARY_DIR}/menu.lst" \ "${ESP_DIR}/boot/grub/menu.lst" ;; - arm64-efi) - info "Installing default arm64 UEFI bootloader." - sudo mkdir -p "${ESP_DIR}/EFI/boot" - #FIXME(andrejro): shim not ported to aarch64 - sudo mv "${ESP_DIR}/${GRUB_DIR}/${CORE_NAME}" \ - "${ESP_DIR}/EFI/boot/bootaa64.efi" - if [[ -n "${FLAGS_copy_efi_grub}" ]]; then - # copying from vfat so ignore permissions - cp --no-preserve=mode "${ESP_DIR}/EFI/boot/bootaa64.efi" \ - "${FLAGS_copy_efi_grub}" - fi - ;; esac cleanup diff --git a/build_library/sbsign_util.sh b/build_library/sbsign_util.sh new file mode 100644 index 00000000000..76c3c7abd3f --- /dev/null +++ b/build_library/sbsign_util.sh @@ -0,0 +1,55 @@ +# Copyright (c) 2024 The Flatcar Maintainers. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +if [[ ${COREOS_OFFICIAL:-0} -ne 1 ]]; then + SBSIGN_KEY="/usr/share/sb_keys/shim.key" + SBSIGN_CERT="/usr/share/sb_keys/shim.pem" +else + SBSIGN_KEY="pkcs11:token=flatcar-dev-cert" + unset SBSIGN_CERT +fi + +PKCS11_MODULE_PATH="/usr/$(get_sdk_libdir)/pkcs11/azure_kms_pkcs11.so" + +PKCS11_ENV=( + AZURE_KEYVAULT_URL="https://chewi-test.vault.azure.net/" + PKCS11_MODULE_PATH="${PKCS11_MODULE_PATH}" + AWS_KMS_PKCS11_DEBUG=1 +) + +get_sbsign_cert() { + if [[ ${SBSIGN_KEY} != pkcs11:* || -s ${SBSIGN_CERT-} ]]; then + return + fi + + SBSIGN_CERT=$(mktemp -t signing-cert.XXXXXXXXXX.pem) + info "Fetching ${SBSIGN_KEY} from Azure" + + # Needs Key Vault Reader role. + env "${PKCS11_ENV[@]}" p11-kit export-object \ + --provider "${PKCS11_MODULE_PATH}" \ + "${SBSIGN_KEY};type=cert" \ + | tee "${SBSIGN_CERT}" +} + +cleanup_sbsign_certs() { + if [[ ${SBSIGN_CERT-} == "${TMPDIR-/tmp}"/* ]]; then + rm -f -- "${SBSIGN_CERT}" + fi +} + +do_sbsign() { + get_sbsign_cert + info "Signing ${@:$#} with ${SBSIGN_KEY}" + + if [[ ${SBSIGN_KEY} == pkcs11:* ]]; then + set -- --engine pkcs11 "${@}" + fi + + # Needs Key Vault Crypto User role. + sudo env "${PKCS11_ENV[@]}" sbsign \ + --key "${SBSIGN_KEY}" \ + --cert "${SBSIGN_CERT}" \ + "${@}" +} diff --git a/ci-automation/vendor-testing/qemu.sh b/ci-automation/vendor-testing/qemu.sh index 03baf409954..c0cd25f8d82 100755 --- a/ci-automation/vendor-testing/qemu.sh +++ b/ci-automation/vendor-testing/qemu.sh @@ -14,7 +14,7 @@ SECUREBOOT="" ovmf_vars="" # ARM64 qemu tests only supported on UEFI -if [ "${CIA_ARCH}" = "arm64" ] && [ "${CIA_TESTSCRIPT}" != "qemu_uefi.sh" ] ; then +if [[ ${CIA_ARCH} == arm64 && ${CIA_TESTSCRIPT} != qemu_uefi*.sh ]] ; then echo "1..1" > "${CIA_TAPFILE}" echo "not ok - all qemu tests" >> "${CIA_TAPFILE}" echo " ---" >> "${CIA_TAPFILE}" diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/azure-keyvault-pkcs11/Manifest b/sdk_container/src/third_party/coreos-overlay/app-crypt/azure-keyvault-pkcs11/Manifest new file mode 100644 index 00000000000..fd8082853d7 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-crypt/azure-keyvault-pkcs11/Manifest @@ -0,0 +1 @@ +DIST azure-keyvault-pkcs11-0_p20240923.tar.gz 23626 BLAKE2B 54be12edd44c7bc59c58d11ad02632d2717a7d83b19ac8d5ac70cddd5e9c2db0a41b332e82cec0467494f934f75c7fc94c336f452bc5c77ad80cea591009bfe8 SHA512 470157d672c9eac35d0026b0c8413c056bd600fff300d64a3bf2d0e218bb9e09c677e649bbe221ad60b937116676218c25f764641a5f4c709c62d9f1336a3e68 diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/azure-keyvault-pkcs11/azure-keyvault-pkcs11-0_p20240923.ebuild b/sdk_container/src/third_party/coreos-overlay/app-crypt/azure-keyvault-pkcs11/azure-keyvault-pkcs11-0_p20240923.ebuild new file mode 100644 index 00000000000..b5dae102f98 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-crypt/azure-keyvault-pkcs11/azure-keyvault-pkcs11-0_p20240923.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +COMMIT="7b0ca93ad046adad807ac1a6e2c56ea87c7a78ec" +DESCRIPTION="PKCS#11 module for Azure Key Vault" +HOMEPAGE="https://github.com/jepio/azure_keyvault_pkcs11" +SRC_URI="https://github.com/jepio/azure_keyvault_pkcs11/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${PN}-${COMMIT}" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" + +# libcurl is only NEEDED because of the Azure SDK. +RDEPEND=" + dev-cpp/azure-core:= + dev-cpp/azure-identity:= + dev-cpp/azure-security-keyvault-certificates:= + dev-cpp/azure-security-keyvault-keys:= + dev-libs/json-c:= + dev-libs/openssl:= +" +DEPEND=" + ${RDEPEND} + app-crypt/p11-kit +" +BDEPEND=" + virtual/pkgconfig +" diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/azure-keyvault-pkcs11/metadata.xml b/sdk_container/src/third_party/coreos-overlay/app-crypt/azure-keyvault-pkcs11/metadata.xml new file mode 100644 index 00000000000..82a9fd9486d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/app-crypt/azure-keyvault-pkcs11/metadata.xml @@ -0,0 +1,11 @@ + + + + + chewi@gentoo.org + James Le Cuirot + + + jepio/azure_keyvault_pkcs11 + + diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/Manifest b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/Manifest deleted file mode 100644 index 8b75e07bb5a..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/Manifest +++ /dev/null @@ -1 +0,0 @@ -DIST p11-kit-0.23.22.tar.xz 830016 BLAKE2B 4e1edfd9e2441d237c07a16c003aee5ffde38f1cf545c26e435645429f2cfa4fe7ca61cdc3c3940390aa040ba991f2ee3995b14cc31bb886d5eeffa8ed5e1721 SHA512 098819e6ca4ad9cc2a0bc2e478aea67354d051a4f03e6c7d75d13d2469b6dc7654f26b15530052f6ed51acb35531c2539e0f971b31e29e6673e857c903afb080 diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/README.md b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/README.md deleted file mode 100644 index 92a30382726..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/README.md +++ /dev/null @@ -1,4 +0,0 @@ -We forked this package to fix the systemd user unit directory and bash -completion directory detection in the cross-compilation scenario. - -These fixes could be upstreamed to gentoo. diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/metadata.xml b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/metadata.xml deleted file mode 100644 index ff17590b69a..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/metadata.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - zlogene@gentoo.org - Mikle Kolyada - - - Enable ASN.1 certificate support - Build the trust policy module - - - p11-glue/p11-kit - - diff --git a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/p11-kit-0.23.22.ebuild b/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/p11-kit-0.23.22.ebuild deleted file mode 100644 index b36df3db264..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/app-crypt/p11-kit/p11-kit-0.23.22.ebuild +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -# Flatcar: inherit systemd eclass for the systemd user unit directory -# getter, and bash-completion-r1 for bash completion directory getter. -inherit multilib-minimal systemd bash-completion-r1 - -DESCRIPTION="Provides a standard configuration setup for installing PKCS#11" -HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html" -SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" -IUSE="+asn1 debug +libffi systemd +trust" -REQUIRED_USE="trust? ( asn1 )" - -RDEPEND="asn1? ( >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}] ) - libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] ) - systemd? ( sys-apps/systemd:= ) - trust? ( app-misc/ca-certificates )" -DEPEND="${RDEPEND}" -BDEPEND="virtual/pkgconfig" - -pkg_setup() { - # disable unsafe tests, bug#502088 - export FAKED_MODE=1 -} - -src_prepare() { - if [[ ${CHOST} == *-solaris2.* && ${CHOST##*-solaris2.} -lt 11 ]] ; then - # Solaris 10 and before doesn't know about XPG7 (XOPEN_SOURCE=700) - # drop to XPG6 to make feature_tests.h happy - sed -i -e '/define _XOPEN_SOURCE/s/700/600/' common/compat.c || die - # paths.h isn't available, oddly enough also not used albeit included - sed -i -e '/#include /d' trust/test-trust.c || die - # we don't have SUN_LEN here - sed -i -e 's/SUN_LEN \(([^)]\+)\)/strlen (\1->sun_path)/' \ - p11-kit/server.c || die - fi - default -} - -multilib_src_configure() { - # Flatcar: Override the detection of the systemd user unit - # directory and bash completion directory with these - # environment variables. - local -x systemduserunitdir=$(systemd_get_userunitdir) - local -x bashcompdir=$(get_bashcompdir) - ECONF_SOURCE="${S}" econf \ - $(use_enable trust trust-module) \ - $(use_with trust trust-paths ${EPREFIX}/etc/ssl/certs/ca-certificates.crt) \ - $(use_enable debug) \ - $(use_with libffi) \ - $(use_with asn1 libtasn1) \ - $(multilib_native_use_with systemd) - - if multilib_is_native_abi; then - # re-use provided documentation - ln -s "${S}"/doc/manual/html doc/manual/html || die - fi -} - -multilib_src_install_all() { - einstalldocs - find "${D}" -name '*.la' -delete || die -} diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1-r15.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1-r16.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1-r15.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1-r16.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild index 24614e71d84..f1a8b24861c 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild @@ -26,6 +26,8 @@ RDEPEND=" coreos-base/nova-agent-watcher ) sys-boot/grub + sys-boot/shim + sys-boot/shim-signed app-containers/containerd app-containers/docker app-containers/docker-cli diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-devel/sdk-depends/sdk-depends-0.0.1-r51.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-devel/sdk-depends/sdk-depends-0.0.1-r52.ebuild similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/coreos-devel/sdk-depends/sdk-depends-0.0.1-r51.ebuild rename to sdk_container/src/third_party/coreos-overlay/coreos-devel/sdk-depends/sdk-depends-0.0.1-r52.ebuild diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-devel/sdk-depends/sdk-depends-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-devel/sdk-depends/sdk-depends-0.0.1.ebuild index ed4d4fe0b26..b040f4d953f 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-devel/sdk-depends/sdk-depends-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-devel/sdk-depends/sdk-depends-0.0.1.ebuild @@ -17,6 +17,8 @@ DEPEND=" app-admin/sudo app-admin/updateservicectl app-arch/pbzip2 + app-crypt/azure-keyvault-pkcs11 + app-crypt/p11-kit app-crypt/sbsigntools app-emulation/open-vmdk app-emulation/virt-firmware @@ -42,7 +44,6 @@ DEPEND=" amd64? ( sys-apps/iucode_tool ) sys-apps/seismograph sys-boot/grub - amd64? ( sys-boot/shim ) sys-firmware/edk2-bin sys-fs/btrfs-progs sys-fs/cryptsetup diff --git a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords index 835744e5130..e8f3100b032 100644 --- a/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords +++ b/sdk_container/src/third_party/coreos-overlay/profiles/coreos/base/package.accept_keywords @@ -47,12 +47,18 @@ # Seems to be the only available ebuild in portage-stable right now. =app-crypt/adcli-0.9.2 ~arm64 +# Needs cleaning up and adding to Gentoo before stabilising +=app-crypt/azure-keyvault-pkcs11-0_p20240923 ~amd64 + # Needed by arm64-native SDK =app-crypt/ccid-1.5.4 ~arm64 # The only available ebuild (from GURU) has ~amd64 and no keyword for arm64 yet. =app-crypt/clevis-19-r1 ** +# We need the new --provider option. +=app-crypt/p11-kit-0.25.5 ~amd64 ~arm64 + # Needed in SDK for Secure Boot. =app-emulation/virt-firmware-24.7 ~amd64 ~arm64 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim-signed/Manifest b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim-signed/Manifest new file mode 100644 index 00000000000..01961010c96 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim-signed/Manifest @@ -0,0 +1,2 @@ +DIST shimaa64-15.8.efi.signed 995206 BLAKE2B fc858188d800dd785a6b989f154ddb3bb07748b8ee91ec3ffbabddf7452bb12eecfb788d9df97d1d900395c0825a4336f8b428bafa978d31995c0f671b7d1726 SHA512 d7875c906b715819b8d1b2a3a79adce64e4b37cfd7d8164cdf76fbb73a8e0b8264b01c403f8d71869f7a78bb5f840e81061f41d75d85cb49c58d3bee5e65004c +DIST shimx64-15.8.efi.signed 948418 BLAKE2B 7c92989ec63111799cc0f481cef47108e58f96dc3b53116e1cee1e24cc940d3e5470a0aa6c057d86339f435eddc22272281c08e46db0856ada6db69d7cd32c64 SHA512 ff6e4f4add5c9d3914118e53e2669b7f63168c41be95b07c5a8308c64bf1a1d4ff133bb0dde602f0a0c7ef035e4847eac14969c3d9ff3a99c9011c2d8dd20014 diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim-signed/metadata.xml b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim-signed/metadata.xml new file mode 100644 index 00000000000..408e4b227de --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim-signed/metadata.xml @@ -0,0 +1,8 @@ + + + + + cpe:/a:redhat:shim + rhboot/shim + + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim-signed/shim-signed-15.8.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim-signed/shim-signed-15.8.ebuild new file mode 100644 index 00000000000..113f9d1c9c1 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim-signed/shim-signed-15.8.ebuild @@ -0,0 +1,25 @@ +# Copyright (c) 2024 The Flatcar Maintainers. +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +declare -A ARCHES +ARCHES[amd64]="x64" +ARCHES[arm64]="aa64" + +DESCRIPTION="Signed UEFI Shim loader" +HOMEPAGE="https://github.com/rhboot/shim" +S="${WORKDIR}" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 arm64" + +for arch in ${KEYWORDS}; do + SRC_URI+="${arch}? ( https://mirror.release.flatcar-linux.net/coreos/shim${ARCHES[$arch]}-${PV}.efi.signed ) " +done + +src_install() { + insinto /usr/lib/shim + newins "${DISTDIR}/shim${ARCHES[$ARCH]}-${PV}.efi.signed" "shim${ARCHES[$ARCH]}.efi.signed" +} diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/README.md b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/README.md new file mode 100644 index 00000000000..c0aeae1081d --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/README.md @@ -0,0 +1,12 @@ +shim +==== + +The repo is used to build the shim required for secure boot. The `flatcar/shim-review` +repo hosts a `Dockerfile` that builds the shim ebuild and produces the binary +required for shim-review. The generated `shim.efi` is then submitted for review. + +Once the signed shim is received, a release is cut in the `flatcar/shim-review` +repo, which is then used during the build process. It's important to note that +the version of the shim and the shim-signed ebuild should be the same. For +example, if the current version of the shim is `15.8`, the ebuild files should +be `shim-15.8.ebuild` and `shim-signed-15.8.ebuild` respectively. diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/files/sbat.csv.in b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/files/sbat.csv.in new file mode 100644 index 00000000000..43b9f68a7ab --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/files/sbat.csv.in @@ -0,0 +1,3 @@ +sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md +shim,4,UEFI shim,shim,1,https://github.com/rhboot/shim +shim.flatcar,1,Flatcar Container Linux,shim,@@VERSION@@,security@flatcar-linux.org diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/metadata.xml b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/metadata.xml index 097975e3adc..408e4b227de 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/metadata.xml @@ -1,4 +1,8 @@ - + + + cpe:/a:redhat:shim + rhboot/shim + diff --git a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r2.ebuild similarity index 76% rename from sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r2.ebuild index 2e0dd7096ea..10defae63cb 100644 --- a/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/sys-boot/shim/shim-15.8-r2.ebuild @@ -11,7 +11,7 @@ KEYWORDS="amd64 arm64" LICENSE="BSD" SLOT="0" -IUSE="" +IUSE="official" RDEPEND="" # TODO: Would be ideal to depend on sys-boot/gnu-efi package, but @@ -31,6 +31,9 @@ src_compile() { local emake_args=( CROSS_COMPILE="${CHOST}-" ) + + sed -e "s/@@VERSION@@/${PVR}/" "${FILESDIR}"/sbat.csv.in >"${WORKDIR}/sbat.csv" || die + # Apparently our environment already has the ARCH variable in # it, and Makefile picks it up instead of figuring it out # itself with the compiler -dumpmachine flag. But also it @@ -41,8 +44,17 @@ src_compile() { elif use arm64; then emake_args+=( ARCH=aarch64 ) fi - emake_args+=( ENABLE_SBSIGN=1 ) + emake_args+=( ENABLE_SBSIGN=1 ) + emake_args+=( SBATPATH="${WORKDIR}/sbat.csv" ) + + if use official; then + if [ -z "${SHIM_SIGNING_CERTIFICATE}" ]; then + die "use production flag needs env SHIM_SIGNING_CERTIFICATE" + fi + emake_args+=( VENDOR_CERT_FILE="${SHIM_SIGNING_CERTIFICATE}" ) + else emake_args+=( VENDOR_CERT_FILE="/usr/share/sb_keys/shim.der" ) + fi emake "${emake_args[@]}" || die } @@ -55,6 +67,6 @@ src_install() { suffix=aa64 fi insinto /usr/lib/shim - newins "shim${suffix}.efi" 'shim.efi' + newins "shim${suffix}.efi" "shim${suffix}.efi" newins "mm${suffix}.efi" "mm${suffix}.efi" } diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/Manifest b/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/Manifest new file mode 100644 index 00000000000..851345f5f63 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/Manifest @@ -0,0 +1,2 @@ +DIST p11-kit-0.25.3.tar.xz 991528 BLAKE2B 5c695c1ef95edf4bbbab001aa634076c433df0bc89cb8104deaec2ce00c6908640e467755b49c6900e5d7d5d81e1a3871f4978a212c6f6ae088386ac0b95289a SHA512 ad2d393bf122526cbba18dc9d5a13f2c1cad7d70125ec90ffd02059dfa5ef30ac59dfc0bb9bc6380c8f317e207c9e87e895f1945634f56ddf910c2958868fb4c +DIST p11-kit-0.25.5.tar.xz 1002056 BLAKE2B 96d6a9c2807586abafae4da4df89f566672733963997d6a83e00aaf83a7a0c0e2995638f505e98fb87a90c60bde28814f1e8b7d5071bf0af96bb0467105a1ddc SHA512 177ec6ff5eb891901078306dce2bf3f5c1a0e5c2a8c493bdf5a08ae1ff1240fdf6952961e973c373f80ac3d1d5a9927e07f4da49e4ff92269d992e744889fc94 diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/files/p11-kit-0.25.3-pointer.patch b/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/files/p11-kit-0.25.3-pointer.patch new file mode 100644 index 00000000000..9b316ee2fad --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/files/p11-kit-0.25.3-pointer.patch @@ -0,0 +1,109 @@ +https://bugs.gentoo.org/918982 +https://github.com/p11-glue/p11-kit/commit/d49c92c8420db6ee4c88515bdb014f68f4d471d9 + +From d49c92c8420db6ee4c88515bdb014f68f4d471d9 Mon Sep 17 00:00:00 2001 +From: Daiki Ueno +Date: Sat, 2 Dec 2023 09:24:01 +0900 +Subject: [PATCH] import-object: Avoid integer truncation on 32-bit platforms +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The build fails when compiling for 32-bit platforms with +-Werror=incompatible-pointer-types: + + CFLAGS="-m32 -march=i686 -Werror=incompatible-pointer-types -Werror=implicit -Werror=int-conversion" setarch i686 -- meson setup _build + setarch i686 -- meson compile -C _build -v + ... + + ../p11-kit/import-object.c: In function ‘add_attrs_pubkey_rsa’: + ../p11-kit/import-object.c:223:62: error: passing argument 3 of ‘p11_asn1_read’ from incompatible pointer type [-Werror=incompatible-pointer-types] + 223 | attr_modulus.pValue = p11_asn1_read (asn, "modulus", &attr_modulus.ulValueLen); + | ^~~~~~~~~~~~~~~~~~~~~~~~ + | | + | long unsigned int * + +Reported by Sam James in: +https://github.com/p11-glue/p11-kit/issues/608 + +Signed-off-by: Daiki Ueno +--- + p11-kit/import-object.c | 30 +++++++++++++++++++++++++++--- + 1 file changed, 27 insertions(+), 3 deletions(-) + +diff --git a/p11-kit/import-object.c b/p11-kit/import-object.c +index feee0765..fb47b964 100644 +--- a/p11-kit/import-object.c ++++ b/p11-kit/import-object.c +@@ -55,6 +55,7 @@ + #endif + + #include ++#include + #include + #include + #include +@@ -201,6 +202,7 @@ add_attrs_pubkey_rsa (CK_ATTRIBUTE *attrs, + CK_ATTRIBUTE attr_encrypt = { CKA_ENCRYPT, &tval, sizeof (tval) }; + CK_ATTRIBUTE attr_modulus = { CKA_MODULUS, }; + CK_ATTRIBUTE attr_exponent = { CKA_PUBLIC_EXPONENT, }; ++ size_t len = 0; + + pubkey = p11_asn1_read (info, "subjectPublicKey", &pubkey_len); + if (pubkey == NULL) { +@@ -220,17 +222,31 @@ add_attrs_pubkey_rsa (CK_ATTRIBUTE *attrs, + goto cleanup; + } + +- attr_modulus.pValue = p11_asn1_read (asn, "modulus", &attr_modulus.ulValueLen); ++ attr_modulus.pValue = p11_asn1_read (asn, "modulus", &len); + if (attr_modulus.pValue == NULL) { + p11_message (_("failed to obtain modulus")); + goto cleanup; + } ++#if ULONG_MAX < SIZE_MAX ++ if (len > ULONG_MAX) { ++ p11_message (_("failed to obtain modulus")); ++ goto cleanup; ++ } ++#endif ++ attr_modulus.ulValueLen = len; + +- attr_exponent.pValue = p11_asn1_read (asn, "publicExponent", &attr_exponent.ulValueLen); ++ attr_exponent.pValue = p11_asn1_read (asn, "publicExponent", &len); + if (attr_exponent.pValue == NULL) { + p11_message (_("failed to obtain exponent")); + goto cleanup; + } ++#if ULONG_MAX < SIZE_MAX ++ if (len > ULONG_MAX) { ++ p11_message (_("failed to obtain exponent")); ++ goto cleanup; ++ } ++#endif ++ attr_exponent.ulValueLen = len; + + result = p11_attrs_build (attrs, &attr_key_type, &attr_encrypt, &attr_modulus, &attr_exponent, NULL); + if (result == NULL) { +@@ -260,12 +276,20 @@ add_attrs_pubkey_ec (CK_ATTRIBUTE *attrs, + CK_ATTRIBUTE attr_key_type = { CKA_KEY_TYPE, &key_type, sizeof (key_type) }; + CK_ATTRIBUTE attr_ec_params = { CKA_EC_PARAMS, }; + CK_ATTRIBUTE attr_ec_point = { CKA_EC_POINT, }; ++ size_t len = 0; + +- attr_ec_params.pValue = p11_asn1_read (info, "algorithm.parameters", &attr_ec_params.ulValueLen); ++ attr_ec_params.pValue = p11_asn1_read (info, "algorithm.parameters", &len); + if (attr_ec_params.pValue == NULL) { + p11_message (_("failed to obtain EC parameters")); + goto cleanup; + } ++#if ULONG_MAX < SIZE_MAX ++ if (len > ULONG_MAX) { ++ p11_message (_("failed to obtain EC parameters")); ++ goto cleanup; ++ } ++#endif ++ attr_ec_params.ulValueLen = len; + + /* subjectPublicKey is read as BIT STRING value which contains + * EC point data. We need to DER encode this data as OCTET STRING. diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/metadata.xml b/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/metadata.xml new file mode 100644 index 00000000000..91df1af79aa --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/metadata.xml @@ -0,0 +1,8 @@ + + + + + + p11-glue/p11-kit + + diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/p11-kit-0.25.3-r2.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/p11-kit-0.25.3-r2.ebuild new file mode 100644 index 00000000000..f27bbaf48cf --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/p11-kit-0.25.3-r2.ebuild @@ -0,0 +1,77 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +inherit bash-completion-r1 meson-multilib python-any-r1 + +DESCRIPTION="Provides a standard configuration setup for installing PKCS#11" +HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html" +SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="+libffi gtk-doc nls systemd test" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-misc/ca-certificates + >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}] + libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] ) + systemd? ( sys-apps/systemd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + virtual/pkgconfig + gtk-doc? ( dev-util/gtk-doc ) + nls? ( sys-devel/gettext ) +" + +PATCHES=( + "${FILESDIR}"/p11-kit-0.25.3-pointer.patch +) + +src_prepare() { + default + + # Relies on dlopen which won't work for multilib tests (bug #913971) + cat <<-EOF > "${S}"/p11-kit/test-server.sh || die + #!/bin/sh + exit 77 + EOF +} + +multilib_src_configure() { + # Disable unsafe tests, bug#502088 + export FAKED_MODE=1 + + local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local + + # p11-kit doesn't need this to build and castxml needs Clang. To get + # a deterministic non-automagic build, always disable the search for + # castxml. + cat >> ${native_file} <<-EOF || die + [binaries] + castxml='castxml-falseified' + EOF + + local emesonargs=( + --native-file "${native_file}" + -Dbashcompdir="$(get_bashcompdir)" + -Dtrust_module=enabled + -Dtrust_paths="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt + $(meson_feature libffi) + $(meson_use nls) + $(meson_use test) + $(meson_native_use_bool gtk-doc gtk_doc) + $(meson_native_true man) + $(meson_native_use_feature systemd) + ) + + meson_src_configure +} diff --git a/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/p11-kit-0.25.5.ebuild b/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/p11-kit-0.25.5.ebuild new file mode 100644 index 00000000000..0c23a73251f --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/app-crypt/p11-kit/p11-kit-0.25.5.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +inherit bash-completion-r1 meson-multilib python-any-r1 + +DESCRIPTION="Provides a standard configuration setup for installing PKCS#11" +HOMEPAGE="https://p11-glue.github.io/p11-glue/p11-kit.html" +SRC_URI="https://github.com/p11-glue/p11-kit/releases/download/${PV}/${P}.tar.xz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris" +IUSE="+libffi gtk-doc nls systemd test" +RESTRICT="!test? ( test )" + +RDEPEND=" + app-misc/ca-certificates + >=dev-libs/libtasn1-3.4:=[${MULTILIB_USEDEP}] + libffi? ( dev-libs/libffi:=[${MULTILIB_USEDEP}] ) + systemd? ( sys-apps/systemd:= ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + ${PYTHON_DEPS} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + virtual/pkgconfig + gtk-doc? ( dev-util/gtk-doc ) + nls? ( sys-devel/gettext ) +" + +src_prepare() { + default + + # Relies on dlopen which won't work for multilib tests (bug #913971) + cat <<-EOF > "${S}"/p11-kit/test-server.sh || die + #!/bin/sh + exit 77 + EOF +} + +multilib_src_configure() { + # Disable unsafe tests, bug#502088 + export FAKED_MODE=1 + + local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local + + # p11-kit doesn't need this to build and castxml needs Clang. To get + # a deterministic non-automagic build, always disable the search for + # castxml. + cat >> ${native_file} <<-EOF || die + [binaries] + castxml='castxml-falseified' + EOF + + local emesonargs=( + --native-file "${native_file}" + -Dbashcompdir="$(get_bashcompdir)" + -Dtrust_module=enabled + -Dtrust_paths="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt + $(meson_feature libffi) + $(meson_use nls) + $(meson_use test) + $(meson_native_use_bool gtk-doc gtk_doc) + $(meson_native_true man) + $(meson_native_use_feature systemd) + ) + + meson_src_configure +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/Manifest b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/Manifest new file mode 100644 index 00000000000..b19c03567a2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/Manifest @@ -0,0 +1,2 @@ +DIST azure-sdk-for-cpp-0180c8ee5cc9f54d4edf8d39415f3733e4296e0f.tar.gz 3147847 BLAKE2B 3a67df60a0098243fdcf577d3bbb7d66b3e090ea10a0dc14b57780802d700aa5f15025158bb32dca558868691e64f4db8d072c92e87abbb9feccf1acd7c7dc32 SHA512 ae9dcbc2c1c4b97045379fe9194ce9ee6f252b980faa62b293ca86c540cc8d21a986aa81f767f80516766f8b10c345aec1d16629cb71e5265c36e05e88f5269d +DIST azure-sdk-for-cpp-1289063cc2a7ba01fa7a8c7cd92155ef401c4cba.tar.gz 3130906 BLAKE2B 8fab2710f9c8bc5eb69b5f6bc389cf00cfaba1c6902ffa9a9e67e96bd91e508a9b1c643e57fbe74c68fa840bc707e00672ca0e3979baaabefb021849bb5815bb SHA512 19d122bd153ababd90d238a94b8227e56c17a677dc478fd680c099856fc874367a4c8aa83ccf372139400772951dad69899471970ac18088f901d67047b7755f diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/azure-core-1.14.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/azure-core-1.14.0.ebuild new file mode 100644 index 00000000000..dac17e6af52 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/azure-core-1.14.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +COMMIT="1289063cc2a7ba01fa7a8c7cd92155ef401c4cba" +MY_P="azure-sdk-for-cpp-${COMMIT}" +DESCRIPTION="Azure SDK for C++" +HOMEPAGE="https://azure.github.io/azure-sdk-for-cpp/" +SRC_URI="https://github.com/Azure/azure-sdk-for-cpp/archive/${COMMIT}.tar.gz -> ${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}/sdk/core/${PN}" +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="amd64" +IUSE="doc" +RESTRICT="test" # Too many online tests. + +RDEPEND=" + dev-libs/openssl:= + net-misc/curl[ssl] +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen ) +" + +src_prepare() { + cmake_src_prepare + cd ../../.. || die + eapply "${FILESDIR}"/azure-sdk-for-cpp-soversion.patch +} + +src_configure() { + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc) + -DWARNINGS_AS_ERRORS=no + ) + + AZURE_SDK_DISABLE_AUTO_VCPKG=yes \ + cmake_src_configure +} + +src_install() { + cmake_src_install + rm -v "${ED}"/usr/share/*/copyright || die + use doc && dodoc -r "${BUILD_DIR}"/docs/html +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/azure-core-1.14.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/azure-core-1.14.1.ebuild new file mode 100644 index 00000000000..72868481bef --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/azure-core-1.14.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +COMMIT="0180c8ee5cc9f54d4edf8d39415f3733e4296e0f" +MY_P="azure-sdk-for-cpp-${COMMIT}" +DESCRIPTION="Azure SDK for C++" +HOMEPAGE="https://azure.github.io/azure-sdk-for-cpp/" +SRC_URI="https://github.com/Azure/azure-sdk-for-cpp/archive/${COMMIT}.tar.gz -> ${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}/sdk/core/${PN}" +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="doc" +RESTRICT="test" # Too many online tests. + +RDEPEND=" + dev-libs/openssl:= + net-misc/curl[ssl] +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen ) +" + +src_configure() { + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc) + -DWARNINGS_AS_ERRORS=no + ) + + AZURE_SDK_DISABLE_AUTO_VCPKG=yes \ + cmake_src_configure +} + +src_install() { + cmake_src_install + rm -v "${ED}"/usr/share/*/copyright || die + use doc && dodoc -r "${BUILD_DIR}"/docs/html +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/files/azure-sdk-for-cpp-soversion.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/files/azure-sdk-for-cpp-soversion.patch new file mode 100644 index 00000000000..550f9f22847 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/files/azure-sdk-for-cpp-soversion.patch @@ -0,0 +1,216 @@ +diff --git a/sdk/attestation/azure-security-attestation/CMakeLists.txt b/sdk/attestation/azure-security-attestation/CMakeLists.txt +index 8dec8cf..dff3461 100644 +--- a/sdk/attestation/azure-security-attestation/CMakeLists.txt ++++ b/sdk/attestation/azure-security-attestation/CMakeLists.txt +@@ -86,6 +86,7 @@ create_code_coverage(attestation azure-security-attestation azure-security-attes + + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-attestation PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-attestation ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/core/azure-core-amqp/CMakeLists.txt b/sdk/core/azure-core-amqp/CMakeLists.txt +index 3ef7bf8..e99d57f 100644 +--- a/sdk/core/azure-core-amqp/CMakeLists.txt ++++ b/sdk/core/azure-core-amqp/CMakeLists.txt +@@ -177,6 +177,7 @@ target_link_libraries(azure-core-amqp PRIVATE + PUBLIC Azure::azure-core) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core-amqp PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core-amqp ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt b/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt +index 23cf7d1..3834d6c 100644 +--- a/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt ++++ b/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt +@@ -80,6 +80,7 @@ if (BUILD_AZURE_CORE_TRACING_OPENTELEMETRY) + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core-tracing-opentelemetry PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core-tracing-opentelemetry ${AZ_LIBRARY_VERSION}) + + if(BUILD_AZURE_CORE_TRACING_OPENTELEMETRY) +diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt +index 87c5cfd..9dbf5a0 100644 +--- a/sdk/core/azure-core/CMakeLists.txt ++++ b/sdk/core/azure-core/CMakeLists.txt +@@ -192,6 +192,7 @@ if(BUILD_TRANSPORT_WINHTTP) + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt +index 2152690..4af757c 100644 +--- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt ++++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt +@@ -91,6 +91,7 @@ target_link_libraries(azure-messaging-eventhubs-checkpointstore-blob + create_code_coverage(eventhubs azure-messaging-eventhubs-checkpointstore-blob azure-messaging-eventhubs-blobcheckpointstore-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-messaging-eventhubs-checkpointstore-blob PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + #generate_documentation(azure-messaging-eventhubs-checkpointstore-blob ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-messaging-eventhubs-checkpointstore-blob ${AZ_LIBRARY_VERSION}) + +diff --git a/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt b/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt +index 0ea0b8e..e0dbe51 100644 +--- a/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt ++++ b/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt +@@ -116,6 +116,7 @@ target_compile_definitions(azure-messaging-eventhubs PRIVATE _azure_BUILDING_SDK + create_code_coverage(eventhubs azure-messaging-eventhubs azure-messaging-eventhubs-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-messaging-eventhubs PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-messaging-eventhubs ${AZ_LIBRARY_VERSION}) + + add_subdirectory(test) +diff --git a/sdk/identity/azure-identity/CMakeLists.txt b/sdk/identity/azure-identity/CMakeLists.txt +index 57fe6bb..3c21177 100644 +--- a/sdk/identity/azure-identity/CMakeLists.txt ++++ b/sdk/identity/azure-identity/CMakeLists.txt +@@ -117,6 +117,7 @@ else() + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-identity PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-identity ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt +index 5f70eb3..b065d33 100644 +--- a/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt +@@ -95,6 +95,7 @@ target_compile_definitions(azure-security-keyvault-administration PRIVATE _azure + create_code_coverage(keyvault azure-security-keyvault-administration azure-security-keyvault-administration-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-administration PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-administration ${AZ_LIBRARY_VERSION}) + if(BUILD_TESTING) + +diff --git a/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt +index 0806e09..8014038 100644 +--- a/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt +@@ -100,6 +100,7 @@ target_compile_definitions(azure-security-keyvault-certificates PRIVATE _azure_B + create_code_coverage(keyvault azure-security-keyvault-certificates azure-security-keyvault-certificates-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-certificates PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-certificates ${AZ_LIBRARY_VERSION}) + + if(BUILD_TESTING) +diff --git a/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt +index 6217fd1..2de5e64 100644 +--- a/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt +@@ -138,6 +138,7 @@ target_compile_definitions(azure-security-keyvault-keys PRIVATE _azure_BUILDING_ + create_code_coverage(keyvault azure-security-keyvault-keys azure-security-keyvault-keys-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-keys PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-keys ${AZ_LIBRARY_VERSION}) + + if(BUILD_TESTING) +diff --git a/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt +index 7cc62a8..3664d8c 100644 +--- a/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt +@@ -115,6 +115,7 @@ target_compile_definitions(azure-security-keyvault-secrets PRIVATE _azure_BUILDI + create_code_coverage(keyvault azure-security-keyvault-secrets azure-security-keyvault-secrets-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-secrets PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-secrets ${AZ_LIBRARY_VERSION}) + if(BUILD_TESTING) + +diff --git a/sdk/storage/azure-storage-blobs/CMakeLists.txt b/sdk/storage/azure-storage-blobs/CMakeLists.txt +index f87ceae..657ef33 100644 +--- a/sdk/storage/azure-storage-blobs/CMakeLists.txt ++++ b/sdk/storage/azure-storage-blobs/CMakeLists.txt +@@ -96,6 +96,7 @@ target_link_libraries(azure-storage-blobs PUBLIC Azure::azure-storage-common) + target_compile_definitions(azure-storage-blobs PRIVATE _azure_BUILDING_SDK) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-blobs PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-blobs ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-common/CMakeLists.txt b/sdk/storage/azure-storage-common/CMakeLists.txt +index 30f056d..ce90e8a 100644 +--- a/sdk/storage/azure-storage-common/CMakeLists.txt ++++ b/sdk/storage/azure-storage-common/CMakeLists.txt +@@ -107,6 +107,7 @@ else() + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-common PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-common ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-files-datalake/CMakeLists.txt b/sdk/storage/azure-storage-files-datalake/CMakeLists.txt +index 71905c8..ac82507 100644 +--- a/sdk/storage/azure-storage-files-datalake/CMakeLists.txt ++++ b/sdk/storage/azure-storage-files-datalake/CMakeLists.txt +@@ -92,6 +92,7 @@ target_include_directories( + target_link_libraries(azure-storage-files-datalake PUBLIC Azure::azure-storage-blobs) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-files-datalake PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-files-datalake ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-files-shares/CMakeLists.txt b/sdk/storage/azure-storage-files-shares/CMakeLists.txt +index 891f954..cf6cd92 100644 +--- a/sdk/storage/azure-storage-files-shares/CMakeLists.txt ++++ b/sdk/storage/azure-storage-files-shares/CMakeLists.txt +@@ -88,6 +88,7 @@ target_include_directories( + target_link_libraries(azure-storage-files-shares PUBLIC Azure::azure-storage-common) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-files-shares PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-files-shares ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-queues/CMakeLists.txt b/sdk/storage/azure-storage-queues/CMakeLists.txt +index e567623..2e340d5 100644 +--- a/sdk/storage/azure-storage-queues/CMakeLists.txt ++++ b/sdk/storage/azure-storage-queues/CMakeLists.txt +@@ -81,6 +81,7 @@ target_include_directories( + target_link_libraries(azure-storage-queues PUBLIC Azure::azure-storage-common) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-queues PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-queues ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/tables/azure-data-tables/CMakeLists.txt b/sdk/tables/azure-data-tables/CMakeLists.txt +index 038e267..d7e7976 100644 +--- a/sdk/tables/azure-data-tables/CMakeLists.txt ++++ b/sdk/tables/azure-data-tables/CMakeLists.txt +@@ -106,6 +106,7 @@ target_include_directories( + target_link_libraries(azure-data-tables PUBLIC Azure::azure-core) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-data-tables PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-data-tables ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/template/azure-template/CMakeLists.txt b/sdk/template/azure-template/CMakeLists.txt +index 84e3d17..43f3320 100644 +--- a/sdk/template/azure-template/CMakeLists.txt ++++ b/sdk/template/azure-template/CMakeLists.txt +@@ -78,6 +78,7 @@ add_library(Azure::azure-template ALIAS azure-template) + create_code_coverage(template azure-template azure-template-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-template PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-template ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/metadata.xml new file mode 100644 index 00000000000..5db219e6b1e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-core/metadata.xml @@ -0,0 +1,11 @@ + + + + + chewi@gentoo.org + James Le Cuirot + + + Azure/azure-sdk-for-cpp + + diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/Manifest b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/Manifest new file mode 100644 index 00000000000..c0b8ef7a46c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/Manifest @@ -0,0 +1,2 @@ +DIST azure-sdk-for-cpp-4b913e073e50466e8b2d674e65234e7b66d7db49.tar.gz 3130918 BLAKE2B 09f85c1d984b74de2ecfe7de3953b5d4d9898dd087d5a507f4a9a26ab79782a03022adf0fe5cd27cf998fbe277279a3dc0b3cc1977a8599338229146263fffaa SHA512 d243465b248b671495cf94c6d6a53639f6976cfd888a7963e98ba7381ae2b659e39af0102be31e2ad6912b4d3c78bbfc8038318fb98cfb736f5aa99d38207d93 +DIST azure-sdk-for-cpp-c7d19e283278af1eb9e8a8eb8375c7ce65956195.tar.gz 3152357 BLAKE2B 83063aed51cd25d623af6252f70e72284fce07a646d92d0221b2c35d0a0aec55af718146a8d342ef1bbbea9fdcf6be5a84033bf14befeff90a777cc004e064a1 SHA512 a70b2dfc64db5c5799352101bdade9e6acea0bf89cc0896386e5e46344734a674af10463ecb6d141a59257ab21d2b59f7cf663b30c1272560cb2d657132732c3 diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/azure-identity-1.10.0.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/azure-identity-1.10.0.ebuild new file mode 100644 index 00000000000..ee92b0473c8 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/azure-identity-1.10.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +COMMIT="4b913e073e50466e8b2d674e65234e7b66d7db49" +MY_P="azure-sdk-for-cpp-${COMMIT}" +DESCRIPTION="Azure SDK for C++" +HOMEPAGE="https://azure.github.io/azure-sdk-for-cpp/" +SRC_URI="https://github.com/Azure/azure-sdk-for-cpp/archive/${COMMIT}.tar.gz -> ${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}/sdk/identity/${PN}" +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="amd64" +IUSE="doc" +RESTRICT="test" # Too many online tests. + +RDEPEND=" + dev-cpp/azure-core:= + dev-libs/openssl:= + net-misc/curl[ssl] +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen ) +" + +src_prepare() { + cmake_src_prepare + cd ../../.. || die + eapply "${FILESDIR}"/azure-sdk-for-cpp-soversion.patch +} + +src_configure() { + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc) + -DWARNINGS_AS_ERRORS=no + ) + + AZURE_SDK_DISABLE_AUTO_VCPKG=yes \ + cmake_src_configure +} + +src_install() { + cmake_src_install + rm -v "${ED}"/usr/share/*/copyright || die + use doc && dodoc -r "${BUILD_DIR}"/docs/html +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/azure-identity-1.10.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/azure-identity-1.10.1.ebuild new file mode 100644 index 00000000000..ce20d08c4c0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/azure-identity-1.10.1.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +COMMIT="c7d19e283278af1eb9e8a8eb8375c7ce65956195" +MY_P="azure-sdk-for-cpp-${COMMIT}" +DESCRIPTION="Azure SDK for C++" +HOMEPAGE="https://azure.github.io/azure-sdk-for-cpp/" +SRC_URI="https://github.com/Azure/azure-sdk-for-cpp/archive/${COMMIT}.tar.gz -> ${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}/sdk/identity/${PN}" +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64" +IUSE="doc" +RESTRICT="test" # Too many online tests. + +RDEPEND=" + dev-cpp/azure-core:= + dev-libs/openssl:= + net-misc/curl[ssl] +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen ) +" + +src_configure() { + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc) + -DWARNINGS_AS_ERRORS=no + ) + + AZURE_SDK_DISABLE_AUTO_VCPKG=yes \ + cmake_src_configure +} + +src_install() { + cmake_src_install + rm -v "${ED}"/usr/share/*/copyright || die + use doc && dodoc -r "${BUILD_DIR}"/docs/html +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/files/azure-sdk-for-cpp-soversion.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/files/azure-sdk-for-cpp-soversion.patch new file mode 100644 index 00000000000..550f9f22847 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/files/azure-sdk-for-cpp-soversion.patch @@ -0,0 +1,216 @@ +diff --git a/sdk/attestation/azure-security-attestation/CMakeLists.txt b/sdk/attestation/azure-security-attestation/CMakeLists.txt +index 8dec8cf..dff3461 100644 +--- a/sdk/attestation/azure-security-attestation/CMakeLists.txt ++++ b/sdk/attestation/azure-security-attestation/CMakeLists.txt +@@ -86,6 +86,7 @@ create_code_coverage(attestation azure-security-attestation azure-security-attes + + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-attestation PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-attestation ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/core/azure-core-amqp/CMakeLists.txt b/sdk/core/azure-core-amqp/CMakeLists.txt +index 3ef7bf8..e99d57f 100644 +--- a/sdk/core/azure-core-amqp/CMakeLists.txt ++++ b/sdk/core/azure-core-amqp/CMakeLists.txt +@@ -177,6 +177,7 @@ target_link_libraries(azure-core-amqp PRIVATE + PUBLIC Azure::azure-core) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core-amqp PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core-amqp ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt b/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt +index 23cf7d1..3834d6c 100644 +--- a/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt ++++ b/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt +@@ -80,6 +80,7 @@ if (BUILD_AZURE_CORE_TRACING_OPENTELEMETRY) + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core-tracing-opentelemetry PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core-tracing-opentelemetry ${AZ_LIBRARY_VERSION}) + + if(BUILD_AZURE_CORE_TRACING_OPENTELEMETRY) +diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt +index 87c5cfd..9dbf5a0 100644 +--- a/sdk/core/azure-core/CMakeLists.txt ++++ b/sdk/core/azure-core/CMakeLists.txt +@@ -192,6 +192,7 @@ if(BUILD_TRANSPORT_WINHTTP) + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt +index 2152690..4af757c 100644 +--- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt ++++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt +@@ -91,6 +91,7 @@ target_link_libraries(azure-messaging-eventhubs-checkpointstore-blob + create_code_coverage(eventhubs azure-messaging-eventhubs-checkpointstore-blob azure-messaging-eventhubs-blobcheckpointstore-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-messaging-eventhubs-checkpointstore-blob PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + #generate_documentation(azure-messaging-eventhubs-checkpointstore-blob ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-messaging-eventhubs-checkpointstore-blob ${AZ_LIBRARY_VERSION}) + +diff --git a/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt b/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt +index 0ea0b8e..e0dbe51 100644 +--- a/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt ++++ b/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt +@@ -116,6 +116,7 @@ target_compile_definitions(azure-messaging-eventhubs PRIVATE _azure_BUILDING_SDK + create_code_coverage(eventhubs azure-messaging-eventhubs azure-messaging-eventhubs-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-messaging-eventhubs PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-messaging-eventhubs ${AZ_LIBRARY_VERSION}) + + add_subdirectory(test) +diff --git a/sdk/identity/azure-identity/CMakeLists.txt b/sdk/identity/azure-identity/CMakeLists.txt +index 57fe6bb..3c21177 100644 +--- a/sdk/identity/azure-identity/CMakeLists.txt ++++ b/sdk/identity/azure-identity/CMakeLists.txt +@@ -117,6 +117,7 @@ else() + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-identity PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-identity ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt +index 5f70eb3..b065d33 100644 +--- a/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt +@@ -95,6 +95,7 @@ target_compile_definitions(azure-security-keyvault-administration PRIVATE _azure + create_code_coverage(keyvault azure-security-keyvault-administration azure-security-keyvault-administration-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-administration PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-administration ${AZ_LIBRARY_VERSION}) + if(BUILD_TESTING) + +diff --git a/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt +index 0806e09..8014038 100644 +--- a/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt +@@ -100,6 +100,7 @@ target_compile_definitions(azure-security-keyvault-certificates PRIVATE _azure_B + create_code_coverage(keyvault azure-security-keyvault-certificates azure-security-keyvault-certificates-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-certificates PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-certificates ${AZ_LIBRARY_VERSION}) + + if(BUILD_TESTING) +diff --git a/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt +index 6217fd1..2de5e64 100644 +--- a/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt +@@ -138,6 +138,7 @@ target_compile_definitions(azure-security-keyvault-keys PRIVATE _azure_BUILDING_ + create_code_coverage(keyvault azure-security-keyvault-keys azure-security-keyvault-keys-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-keys PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-keys ${AZ_LIBRARY_VERSION}) + + if(BUILD_TESTING) +diff --git a/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt +index 7cc62a8..3664d8c 100644 +--- a/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt +@@ -115,6 +115,7 @@ target_compile_definitions(azure-security-keyvault-secrets PRIVATE _azure_BUILDI + create_code_coverage(keyvault azure-security-keyvault-secrets azure-security-keyvault-secrets-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-secrets PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-secrets ${AZ_LIBRARY_VERSION}) + if(BUILD_TESTING) + +diff --git a/sdk/storage/azure-storage-blobs/CMakeLists.txt b/sdk/storage/azure-storage-blobs/CMakeLists.txt +index f87ceae..657ef33 100644 +--- a/sdk/storage/azure-storage-blobs/CMakeLists.txt ++++ b/sdk/storage/azure-storage-blobs/CMakeLists.txt +@@ -96,6 +96,7 @@ target_link_libraries(azure-storage-blobs PUBLIC Azure::azure-storage-common) + target_compile_definitions(azure-storage-blobs PRIVATE _azure_BUILDING_SDK) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-blobs PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-blobs ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-common/CMakeLists.txt b/sdk/storage/azure-storage-common/CMakeLists.txt +index 30f056d..ce90e8a 100644 +--- a/sdk/storage/azure-storage-common/CMakeLists.txt ++++ b/sdk/storage/azure-storage-common/CMakeLists.txt +@@ -107,6 +107,7 @@ else() + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-common PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-common ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-files-datalake/CMakeLists.txt b/sdk/storage/azure-storage-files-datalake/CMakeLists.txt +index 71905c8..ac82507 100644 +--- a/sdk/storage/azure-storage-files-datalake/CMakeLists.txt ++++ b/sdk/storage/azure-storage-files-datalake/CMakeLists.txt +@@ -92,6 +92,7 @@ target_include_directories( + target_link_libraries(azure-storage-files-datalake PUBLIC Azure::azure-storage-blobs) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-files-datalake PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-files-datalake ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-files-shares/CMakeLists.txt b/sdk/storage/azure-storage-files-shares/CMakeLists.txt +index 891f954..cf6cd92 100644 +--- a/sdk/storage/azure-storage-files-shares/CMakeLists.txt ++++ b/sdk/storage/azure-storage-files-shares/CMakeLists.txt +@@ -88,6 +88,7 @@ target_include_directories( + target_link_libraries(azure-storage-files-shares PUBLIC Azure::azure-storage-common) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-files-shares PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-files-shares ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-queues/CMakeLists.txt b/sdk/storage/azure-storage-queues/CMakeLists.txt +index e567623..2e340d5 100644 +--- a/sdk/storage/azure-storage-queues/CMakeLists.txt ++++ b/sdk/storage/azure-storage-queues/CMakeLists.txt +@@ -81,6 +81,7 @@ target_include_directories( + target_link_libraries(azure-storage-queues PUBLIC Azure::azure-storage-common) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-queues PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-queues ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/tables/azure-data-tables/CMakeLists.txt b/sdk/tables/azure-data-tables/CMakeLists.txt +index 038e267..d7e7976 100644 +--- a/sdk/tables/azure-data-tables/CMakeLists.txt ++++ b/sdk/tables/azure-data-tables/CMakeLists.txt +@@ -106,6 +106,7 @@ target_include_directories( + target_link_libraries(azure-data-tables PUBLIC Azure::azure-core) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-data-tables PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-data-tables ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/template/azure-template/CMakeLists.txt b/sdk/template/azure-template/CMakeLists.txt +index 84e3d17..43f3320 100644 +--- a/sdk/template/azure-template/CMakeLists.txt ++++ b/sdk/template/azure-template/CMakeLists.txt +@@ -78,6 +78,7 @@ add_library(Azure::azure-template ALIAS azure-template) + create_code_coverage(template azure-template azure-template-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-template PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-template ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/metadata.xml new file mode 100644 index 00000000000..5db219e6b1e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-identity/metadata.xml @@ -0,0 +1,11 @@ + + + + + chewi@gentoo.org + James Le Cuirot + + + Azure/azure-sdk-for-cpp + + diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/Manifest b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/Manifest new file mode 100644 index 00000000000..61c00a3d0a9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/Manifest @@ -0,0 +1 @@ +DIST azure-sdk-for-cpp-1d22b9bc578fec09364f7271ff7bd679d713e1f2.tar.gz 2966243 BLAKE2B ca2b1ba84dc358bbdee752329bcecfac42ecf19b4b89ba6998625a3612d9387226e58c50be683eedfb5cde9678e2508a4212b95380ccb1d7451a3092b01fd27c SHA512 991a10ad5ed45b93a8681e97a77c9aa91a25c8b2622c08862471484c9cb0c94354e83553505b20f0e05472bbc984bced0130429b770931c1dbf23a9bbeb22b8c diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/azure-security-keyvault-certificates-4.2.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/azure-security-keyvault-certificates-4.2.1.ebuild new file mode 100644 index 00000000000..1d54a4d397c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/azure-security-keyvault-certificates-4.2.1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +COMMIT="1d22b9bc578fec09364f7271ff7bd679d713e1f2" +MY_P="azure-sdk-for-cpp-${COMMIT}" +DESCRIPTION="Azure SDK for C++" +HOMEPAGE="https://azure.github.io/azure-sdk-for-cpp/" +SRC_URI="https://github.com/Azure/azure-sdk-for-cpp/archive/${COMMIT}.tar.gz -> ${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}/sdk/keyvault/${PN}" +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="amd64" +IUSE="doc" +RESTRICT="test" # Too many online tests. + +RDEPEND=" + dev-cpp/azure-core:= + net-misc/curl[ssl] +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen ) +" + +src_prepare() { + cmake_src_prepare + cd ../../.. || die + eapply "${FILESDIR}"/azure-sdk-for-cpp-doc-assets-dir.patch + eapply "${FILESDIR}"/azure-sdk-for-cpp-soversion.patch +} + +src_configure() { + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc) + -DWARNINGS_AS_ERRORS=no + ) + + AZURE_SDK_DISABLE_AUTO_VCPKG=yes \ + cmake_src_configure +} + +src_install() { + cmake_src_install + rm -v "${ED}"/usr/share/*/copyright || die + use doc && dodoc -r "${BUILD_DIR}"/docs/html +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/files/azure-sdk-for-cpp-doc-assets-dir.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/files/azure-sdk-for-cpp-doc-assets-dir.patch new file mode 100644 index 00000000000..7346d5ae833 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/files/azure-sdk-for-cpp-doc-assets-dir.patch @@ -0,0 +1,51 @@ +From c8f662204f7858a38b485c23b387e5abdf13042c Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Fri, 20 Sep 2024 17:17:50 +0100 +Subject: [PATCH] Fix building docs from subprojects by not using + CMAKE_SOURCE_DIR + +The generate_documentation function currently uses CMAKE_SOURCE_DIR to +find documentation assets at the SDK top-level, but when building from a +subproject like sdk/core/azure-core, the variable points to that +directory instead. + +Fix this by defining SDK_ROOT_DIR, which is based on PROJECT_SOURCE_DIR. +This should always work as long as each subproject calling the function +is always 3 levels down, which is currently the case. +--- + cmake-modules/AzureDoxygen.cmake | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/cmake-modules/AzureDoxygen.cmake b/cmake-modules/AzureDoxygen.cmake +index 31b2e2f..eb64c39 100644 +--- a/cmake-modules/AzureDoxygen.cmake ++++ b/cmake-modules/AzureDoxygen.cmake +@@ -14,8 +14,9 @@ function(generate_documentation PROJECT_NAME PROJECT_VERSION) + set(DOXYGEN_PROJECT_NAME ${PROJECT_NAME}) + set(DOXYGEN_PROJECT_NUMBER ${PROJECT_VERSION}) + ++ set(SDK_ROOT_DIR ${PROJECT_SOURCE_DIR}/../../..) + set(DOXYGEN_OUTPUT_DIRECTORY docs) +- set(DOXYGEN_LAYOUT_FILE ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/DoxygenLayout.xml) ++ set(DOXYGEN_LAYOUT_FILE ${SDK_ROOT_DIR}/eng/docs/api/assets/DoxygenLayout.xml) + set(DOXYGEN_RECURSIVE YES) + if (MSVC) + set(DOXYGEN_WARN_FORMAT "$file($line) : $text") +@@ -45,10 +46,10 @@ function(generate_documentation PROJECT_NAME PROJECT_VERSION) + az_ + AZ_ + ) +- set(DOXYGEN_HTML_HEADER ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/header.html) +- set(DOXYGEN_HTML_FOOTER ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/footer.html) +- set(DOXYGEN_HTML_STYLESHEET ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/style.css) +- set(DOXYGEN_PROJECT_LOGO ${CMAKE_SOURCE_DIR}/eng/common/docgeneration/assets/logo.svg) ++ set(DOXYGEN_HTML_HEADER ${SDK_ROOT_DIR}/eng/docs/api/assets/header.html) ++ set(DOXYGEN_HTML_FOOTER ${SDK_ROOT_DIR}/eng/docs/api/assets/footer.html) ++ set(DOXYGEN_HTML_STYLESHEET ${SDK_ROOT_DIR}/eng/docs/api/assets/style.css) ++ set(DOXYGEN_PROJECT_LOGO ${SDK_ROOT_DIR}/eng/common/docgeneration/assets/logo.svg) + + set(DOXYGEN_GENERATE_XML YES) + set(DOXYGEN_GENERATE_LATEX NO) +-- +2.46.0 + diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/files/azure-sdk-for-cpp-soversion.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/files/azure-sdk-for-cpp-soversion.patch new file mode 100644 index 00000000000..550f9f22847 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/files/azure-sdk-for-cpp-soversion.patch @@ -0,0 +1,216 @@ +diff --git a/sdk/attestation/azure-security-attestation/CMakeLists.txt b/sdk/attestation/azure-security-attestation/CMakeLists.txt +index 8dec8cf..dff3461 100644 +--- a/sdk/attestation/azure-security-attestation/CMakeLists.txt ++++ b/sdk/attestation/azure-security-attestation/CMakeLists.txt +@@ -86,6 +86,7 @@ create_code_coverage(attestation azure-security-attestation azure-security-attes + + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-attestation PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-attestation ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/core/azure-core-amqp/CMakeLists.txt b/sdk/core/azure-core-amqp/CMakeLists.txt +index 3ef7bf8..e99d57f 100644 +--- a/sdk/core/azure-core-amqp/CMakeLists.txt ++++ b/sdk/core/azure-core-amqp/CMakeLists.txt +@@ -177,6 +177,7 @@ target_link_libraries(azure-core-amqp PRIVATE + PUBLIC Azure::azure-core) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core-amqp PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core-amqp ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt b/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt +index 23cf7d1..3834d6c 100644 +--- a/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt ++++ b/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt +@@ -80,6 +80,7 @@ if (BUILD_AZURE_CORE_TRACING_OPENTELEMETRY) + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core-tracing-opentelemetry PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core-tracing-opentelemetry ${AZ_LIBRARY_VERSION}) + + if(BUILD_AZURE_CORE_TRACING_OPENTELEMETRY) +diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt +index 87c5cfd..9dbf5a0 100644 +--- a/sdk/core/azure-core/CMakeLists.txt ++++ b/sdk/core/azure-core/CMakeLists.txt +@@ -192,6 +192,7 @@ if(BUILD_TRANSPORT_WINHTTP) + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt +index 2152690..4af757c 100644 +--- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt ++++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt +@@ -91,6 +91,7 @@ target_link_libraries(azure-messaging-eventhubs-checkpointstore-blob + create_code_coverage(eventhubs azure-messaging-eventhubs-checkpointstore-blob azure-messaging-eventhubs-blobcheckpointstore-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-messaging-eventhubs-checkpointstore-blob PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + #generate_documentation(azure-messaging-eventhubs-checkpointstore-blob ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-messaging-eventhubs-checkpointstore-blob ${AZ_LIBRARY_VERSION}) + +diff --git a/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt b/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt +index 0ea0b8e..e0dbe51 100644 +--- a/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt ++++ b/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt +@@ -116,6 +116,7 @@ target_compile_definitions(azure-messaging-eventhubs PRIVATE _azure_BUILDING_SDK + create_code_coverage(eventhubs azure-messaging-eventhubs azure-messaging-eventhubs-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-messaging-eventhubs PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-messaging-eventhubs ${AZ_LIBRARY_VERSION}) + + add_subdirectory(test) +diff --git a/sdk/identity/azure-identity/CMakeLists.txt b/sdk/identity/azure-identity/CMakeLists.txt +index 57fe6bb..3c21177 100644 +--- a/sdk/identity/azure-identity/CMakeLists.txt ++++ b/sdk/identity/azure-identity/CMakeLists.txt +@@ -117,6 +117,7 @@ else() + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-identity PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-identity ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt +index 5f70eb3..b065d33 100644 +--- a/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt +@@ -95,6 +95,7 @@ target_compile_definitions(azure-security-keyvault-administration PRIVATE _azure + create_code_coverage(keyvault azure-security-keyvault-administration azure-security-keyvault-administration-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-administration PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-administration ${AZ_LIBRARY_VERSION}) + if(BUILD_TESTING) + +diff --git a/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt +index 0806e09..8014038 100644 +--- a/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt +@@ -100,6 +100,7 @@ target_compile_definitions(azure-security-keyvault-certificates PRIVATE _azure_B + create_code_coverage(keyvault azure-security-keyvault-certificates azure-security-keyvault-certificates-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-certificates PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-certificates ${AZ_LIBRARY_VERSION}) + + if(BUILD_TESTING) +diff --git a/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt +index 6217fd1..2de5e64 100644 +--- a/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt +@@ -138,6 +138,7 @@ target_compile_definitions(azure-security-keyvault-keys PRIVATE _azure_BUILDING_ + create_code_coverage(keyvault azure-security-keyvault-keys azure-security-keyvault-keys-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-keys PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-keys ${AZ_LIBRARY_VERSION}) + + if(BUILD_TESTING) +diff --git a/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt +index 7cc62a8..3664d8c 100644 +--- a/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt +@@ -115,6 +115,7 @@ target_compile_definitions(azure-security-keyvault-secrets PRIVATE _azure_BUILDI + create_code_coverage(keyvault azure-security-keyvault-secrets azure-security-keyvault-secrets-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-secrets PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-secrets ${AZ_LIBRARY_VERSION}) + if(BUILD_TESTING) + +diff --git a/sdk/storage/azure-storage-blobs/CMakeLists.txt b/sdk/storage/azure-storage-blobs/CMakeLists.txt +index f87ceae..657ef33 100644 +--- a/sdk/storage/azure-storage-blobs/CMakeLists.txt ++++ b/sdk/storage/azure-storage-blobs/CMakeLists.txt +@@ -96,6 +96,7 @@ target_link_libraries(azure-storage-blobs PUBLIC Azure::azure-storage-common) + target_compile_definitions(azure-storage-blobs PRIVATE _azure_BUILDING_SDK) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-blobs PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-blobs ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-common/CMakeLists.txt b/sdk/storage/azure-storage-common/CMakeLists.txt +index 30f056d..ce90e8a 100644 +--- a/sdk/storage/azure-storage-common/CMakeLists.txt ++++ b/sdk/storage/azure-storage-common/CMakeLists.txt +@@ -107,6 +107,7 @@ else() + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-common PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-common ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-files-datalake/CMakeLists.txt b/sdk/storage/azure-storage-files-datalake/CMakeLists.txt +index 71905c8..ac82507 100644 +--- a/sdk/storage/azure-storage-files-datalake/CMakeLists.txt ++++ b/sdk/storage/azure-storage-files-datalake/CMakeLists.txt +@@ -92,6 +92,7 @@ target_include_directories( + target_link_libraries(azure-storage-files-datalake PUBLIC Azure::azure-storage-blobs) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-files-datalake PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-files-datalake ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-files-shares/CMakeLists.txt b/sdk/storage/azure-storage-files-shares/CMakeLists.txt +index 891f954..cf6cd92 100644 +--- a/sdk/storage/azure-storage-files-shares/CMakeLists.txt ++++ b/sdk/storage/azure-storage-files-shares/CMakeLists.txt +@@ -88,6 +88,7 @@ target_include_directories( + target_link_libraries(azure-storage-files-shares PUBLIC Azure::azure-storage-common) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-files-shares PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-files-shares ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-queues/CMakeLists.txt b/sdk/storage/azure-storage-queues/CMakeLists.txt +index e567623..2e340d5 100644 +--- a/sdk/storage/azure-storage-queues/CMakeLists.txt ++++ b/sdk/storage/azure-storage-queues/CMakeLists.txt +@@ -81,6 +81,7 @@ target_include_directories( + target_link_libraries(azure-storage-queues PUBLIC Azure::azure-storage-common) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-queues PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-queues ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/tables/azure-data-tables/CMakeLists.txt b/sdk/tables/azure-data-tables/CMakeLists.txt +index 038e267..d7e7976 100644 +--- a/sdk/tables/azure-data-tables/CMakeLists.txt ++++ b/sdk/tables/azure-data-tables/CMakeLists.txt +@@ -106,6 +106,7 @@ target_include_directories( + target_link_libraries(azure-data-tables PUBLIC Azure::azure-core) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-data-tables PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-data-tables ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/template/azure-template/CMakeLists.txt b/sdk/template/azure-template/CMakeLists.txt +index 84e3d17..43f3320 100644 +--- a/sdk/template/azure-template/CMakeLists.txt ++++ b/sdk/template/azure-template/CMakeLists.txt +@@ -78,6 +78,7 @@ add_library(Azure::azure-template ALIAS azure-template) + create_code_coverage(template azure-template azure-template-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-template PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-template ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/metadata.xml new file mode 100644 index 00000000000..5db219e6b1e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-certificates/metadata.xml @@ -0,0 +1,11 @@ + + + + + chewi@gentoo.org + James Le Cuirot + + + Azure/azure-sdk-for-cpp + + diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/Manifest b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/Manifest new file mode 100644 index 00000000000..61c00a3d0a9 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/Manifest @@ -0,0 +1 @@ +DIST azure-sdk-for-cpp-1d22b9bc578fec09364f7271ff7bd679d713e1f2.tar.gz 2966243 BLAKE2B ca2b1ba84dc358bbdee752329bcecfac42ecf19b4b89ba6998625a3612d9387226e58c50be683eedfb5cde9678e2508a4212b95380ccb1d7451a3092b01fd27c SHA512 991a10ad5ed45b93a8681e97a77c9aa91a25c8b2622c08862471484c9cb0c94354e83553505b20f0e05472bbc984bced0130429b770931c1dbf23a9bbeb22b8c diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/azure-security-keyvault-keys-4.4.1.ebuild b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/azure-security-keyvault-keys-4.4.1.ebuild new file mode 100644 index 00000000000..1d54a4d397c --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/azure-security-keyvault-keys-4.4.1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +COMMIT="1d22b9bc578fec09364f7271ff7bd679d713e1f2" +MY_P="azure-sdk-for-cpp-${COMMIT}" +DESCRIPTION="Azure SDK for C++" +HOMEPAGE="https://azure.github.io/azure-sdk-for-cpp/" +SRC_URI="https://github.com/Azure/azure-sdk-for-cpp/archive/${COMMIT}.tar.gz -> ${MY_P}.tar.gz" +S="${WORKDIR}/${MY_P}/sdk/keyvault/${PN}" +LICENSE="MIT" +SLOT="0/${PV}" +KEYWORDS="amd64" +IUSE="doc" +RESTRICT="test" # Too many online tests. + +RDEPEND=" + dev-cpp/azure-core:= + net-misc/curl[ssl] +" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + virtual/pkgconfig + doc? ( app-text/doxygen ) +" + +src_prepare() { + cmake_src_prepare + cd ../../.. || die + eapply "${FILESDIR}"/azure-sdk-for-cpp-doc-assets-dir.patch + eapply "${FILESDIR}"/azure-sdk-for-cpp-soversion.patch +} + +src_configure() { + local mycmakeargs=( + -DBUILD_DOCUMENTATION=$(usex doc) + -DWARNINGS_AS_ERRORS=no + ) + + AZURE_SDK_DISABLE_AUTO_VCPKG=yes \ + cmake_src_configure +} + +src_install() { + cmake_src_install + rm -v "${ED}"/usr/share/*/copyright || die + use doc && dodoc -r "${BUILD_DIR}"/docs/html +} diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/files/azure-sdk-for-cpp-doc-assets-dir.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/files/azure-sdk-for-cpp-doc-assets-dir.patch new file mode 100644 index 00000000000..7346d5ae833 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/files/azure-sdk-for-cpp-doc-assets-dir.patch @@ -0,0 +1,51 @@ +From c8f662204f7858a38b485c23b387e5abdf13042c Mon Sep 17 00:00:00 2001 +From: James Le Cuirot +Date: Fri, 20 Sep 2024 17:17:50 +0100 +Subject: [PATCH] Fix building docs from subprojects by not using + CMAKE_SOURCE_DIR + +The generate_documentation function currently uses CMAKE_SOURCE_DIR to +find documentation assets at the SDK top-level, but when building from a +subproject like sdk/core/azure-core, the variable points to that +directory instead. + +Fix this by defining SDK_ROOT_DIR, which is based on PROJECT_SOURCE_DIR. +This should always work as long as each subproject calling the function +is always 3 levels down, which is currently the case. +--- + cmake-modules/AzureDoxygen.cmake | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/cmake-modules/AzureDoxygen.cmake b/cmake-modules/AzureDoxygen.cmake +index 31b2e2f..eb64c39 100644 +--- a/cmake-modules/AzureDoxygen.cmake ++++ b/cmake-modules/AzureDoxygen.cmake +@@ -14,8 +14,9 @@ function(generate_documentation PROJECT_NAME PROJECT_VERSION) + set(DOXYGEN_PROJECT_NAME ${PROJECT_NAME}) + set(DOXYGEN_PROJECT_NUMBER ${PROJECT_VERSION}) + ++ set(SDK_ROOT_DIR ${PROJECT_SOURCE_DIR}/../../..) + set(DOXYGEN_OUTPUT_DIRECTORY docs) +- set(DOXYGEN_LAYOUT_FILE ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/DoxygenLayout.xml) ++ set(DOXYGEN_LAYOUT_FILE ${SDK_ROOT_DIR}/eng/docs/api/assets/DoxygenLayout.xml) + set(DOXYGEN_RECURSIVE YES) + if (MSVC) + set(DOXYGEN_WARN_FORMAT "$file($line) : $text") +@@ -45,10 +46,10 @@ function(generate_documentation PROJECT_NAME PROJECT_VERSION) + az_ + AZ_ + ) +- set(DOXYGEN_HTML_HEADER ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/header.html) +- set(DOXYGEN_HTML_FOOTER ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/footer.html) +- set(DOXYGEN_HTML_STYLESHEET ${CMAKE_SOURCE_DIR}/eng/docs/api/assets/style.css) +- set(DOXYGEN_PROJECT_LOGO ${CMAKE_SOURCE_DIR}/eng/common/docgeneration/assets/logo.svg) ++ set(DOXYGEN_HTML_HEADER ${SDK_ROOT_DIR}/eng/docs/api/assets/header.html) ++ set(DOXYGEN_HTML_FOOTER ${SDK_ROOT_DIR}/eng/docs/api/assets/footer.html) ++ set(DOXYGEN_HTML_STYLESHEET ${SDK_ROOT_DIR}/eng/docs/api/assets/style.css) ++ set(DOXYGEN_PROJECT_LOGO ${SDK_ROOT_DIR}/eng/common/docgeneration/assets/logo.svg) + + set(DOXYGEN_GENERATE_XML YES) + set(DOXYGEN_GENERATE_LATEX NO) +-- +2.46.0 + diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/files/azure-sdk-for-cpp-soversion.patch b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/files/azure-sdk-for-cpp-soversion.patch new file mode 100644 index 00000000000..550f9f22847 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/files/azure-sdk-for-cpp-soversion.patch @@ -0,0 +1,216 @@ +diff --git a/sdk/attestation/azure-security-attestation/CMakeLists.txt b/sdk/attestation/azure-security-attestation/CMakeLists.txt +index 8dec8cf..dff3461 100644 +--- a/sdk/attestation/azure-security-attestation/CMakeLists.txt ++++ b/sdk/attestation/azure-security-attestation/CMakeLists.txt +@@ -86,6 +86,7 @@ create_code_coverage(attestation azure-security-attestation azure-security-attes + + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-attestation PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-attestation ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/core/azure-core-amqp/CMakeLists.txt b/sdk/core/azure-core-amqp/CMakeLists.txt +index 3ef7bf8..e99d57f 100644 +--- a/sdk/core/azure-core-amqp/CMakeLists.txt ++++ b/sdk/core/azure-core-amqp/CMakeLists.txt +@@ -177,6 +177,7 @@ target_link_libraries(azure-core-amqp PRIVATE + PUBLIC Azure::azure-core) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core-amqp PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core-amqp ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt b/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt +index 23cf7d1..3834d6c 100644 +--- a/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt ++++ b/sdk/core/azure-core-tracing-opentelemetry/CMakeLists.txt +@@ -80,6 +80,7 @@ if (BUILD_AZURE_CORE_TRACING_OPENTELEMETRY) + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core-tracing-opentelemetry PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core-tracing-opentelemetry ${AZ_LIBRARY_VERSION}) + + if(BUILD_AZURE_CORE_TRACING_OPENTELEMETRY) +diff --git a/sdk/core/azure-core/CMakeLists.txt b/sdk/core/azure-core/CMakeLists.txt +index 87c5cfd..9dbf5a0 100644 +--- a/sdk/core/azure-core/CMakeLists.txt ++++ b/sdk/core/azure-core/CMakeLists.txt +@@ -192,6 +192,7 @@ if(BUILD_TRANSPORT_WINHTTP) + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-core PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-core ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt +index 2152690..4af757c 100644 +--- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt ++++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CMakeLists.txt +@@ -91,6 +91,7 @@ target_link_libraries(azure-messaging-eventhubs-checkpointstore-blob + create_code_coverage(eventhubs azure-messaging-eventhubs-checkpointstore-blob azure-messaging-eventhubs-blobcheckpointstore-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-messaging-eventhubs-checkpointstore-blob PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + #generate_documentation(azure-messaging-eventhubs-checkpointstore-blob ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-messaging-eventhubs-checkpointstore-blob ${AZ_LIBRARY_VERSION}) + +diff --git a/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt b/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt +index 0ea0b8e..e0dbe51 100644 +--- a/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt ++++ b/sdk/eventhubs/azure-messaging-eventhubs/CMakeLists.txt +@@ -116,6 +116,7 @@ target_compile_definitions(azure-messaging-eventhubs PRIVATE _azure_BUILDING_SDK + create_code_coverage(eventhubs azure-messaging-eventhubs azure-messaging-eventhubs-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-messaging-eventhubs PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-messaging-eventhubs ${AZ_LIBRARY_VERSION}) + + add_subdirectory(test) +diff --git a/sdk/identity/azure-identity/CMakeLists.txt b/sdk/identity/azure-identity/CMakeLists.txt +index 57fe6bb..3c21177 100644 +--- a/sdk/identity/azure-identity/CMakeLists.txt ++++ b/sdk/identity/azure-identity/CMakeLists.txt +@@ -117,6 +117,7 @@ else() + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-identity PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-identity ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt +index 5f70eb3..b065d33 100644 +--- a/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-administration/CMakeLists.txt +@@ -95,6 +95,7 @@ target_compile_definitions(azure-security-keyvault-administration PRIVATE _azure + create_code_coverage(keyvault azure-security-keyvault-administration azure-security-keyvault-administration-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-administration PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-administration ${AZ_LIBRARY_VERSION}) + if(BUILD_TESTING) + +diff --git a/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt +index 0806e09..8014038 100644 +--- a/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-certificates/CMakeLists.txt +@@ -100,6 +100,7 @@ target_compile_definitions(azure-security-keyvault-certificates PRIVATE _azure_B + create_code_coverage(keyvault azure-security-keyvault-certificates azure-security-keyvault-certificates-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-certificates PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-certificates ${AZ_LIBRARY_VERSION}) + + if(BUILD_TESTING) +diff --git a/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt +index 6217fd1..2de5e64 100644 +--- a/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-keys/CMakeLists.txt +@@ -138,6 +138,7 @@ target_compile_definitions(azure-security-keyvault-keys PRIVATE _azure_BUILDING_ + create_code_coverage(keyvault azure-security-keyvault-keys azure-security-keyvault-keys-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-keys PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-keys ${AZ_LIBRARY_VERSION}) + + if(BUILD_TESTING) +diff --git a/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt b/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt +index 7cc62a8..3664d8c 100644 +--- a/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt ++++ b/sdk/keyvault/azure-security-keyvault-secrets/CMakeLists.txt +@@ -115,6 +115,7 @@ target_compile_definitions(azure-security-keyvault-secrets PRIVATE _azure_BUILDI + create_code_coverage(keyvault azure-security-keyvault-secrets azure-security-keyvault-secrets-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-security-keyvault-secrets PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-security-keyvault-secrets ${AZ_LIBRARY_VERSION}) + if(BUILD_TESTING) + +diff --git a/sdk/storage/azure-storage-blobs/CMakeLists.txt b/sdk/storage/azure-storage-blobs/CMakeLists.txt +index f87ceae..657ef33 100644 +--- a/sdk/storage/azure-storage-blobs/CMakeLists.txt ++++ b/sdk/storage/azure-storage-blobs/CMakeLists.txt +@@ -96,6 +96,7 @@ target_link_libraries(azure-storage-blobs PUBLIC Azure::azure-storage-common) + target_compile_definitions(azure-storage-blobs PRIVATE _azure_BUILDING_SDK) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-blobs PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-blobs ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-common/CMakeLists.txt b/sdk/storage/azure-storage-common/CMakeLists.txt +index 30f056d..ce90e8a 100644 +--- a/sdk/storage/azure-storage-common/CMakeLists.txt ++++ b/sdk/storage/azure-storage-common/CMakeLists.txt +@@ -107,6 +107,7 @@ else() + endif() + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-common PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-common ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-files-datalake/CMakeLists.txt b/sdk/storage/azure-storage-files-datalake/CMakeLists.txt +index 71905c8..ac82507 100644 +--- a/sdk/storage/azure-storage-files-datalake/CMakeLists.txt ++++ b/sdk/storage/azure-storage-files-datalake/CMakeLists.txt +@@ -92,6 +92,7 @@ target_include_directories( + target_link_libraries(azure-storage-files-datalake PUBLIC Azure::azure-storage-blobs) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-files-datalake PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-files-datalake ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-files-shares/CMakeLists.txt b/sdk/storage/azure-storage-files-shares/CMakeLists.txt +index 891f954..cf6cd92 100644 +--- a/sdk/storage/azure-storage-files-shares/CMakeLists.txt ++++ b/sdk/storage/azure-storage-files-shares/CMakeLists.txt +@@ -88,6 +88,7 @@ target_include_directories( + target_link_libraries(azure-storage-files-shares PUBLIC Azure::azure-storage-common) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-files-shares PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-files-shares ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/storage/azure-storage-queues/CMakeLists.txt b/sdk/storage/azure-storage-queues/CMakeLists.txt +index e567623..2e340d5 100644 +--- a/sdk/storage/azure-storage-queues/CMakeLists.txt ++++ b/sdk/storage/azure-storage-queues/CMakeLists.txt +@@ -81,6 +81,7 @@ target_include_directories( + target_link_libraries(azure-storage-queues PUBLIC Azure::azure-storage-common) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-storage-queues PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-storage-queues ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/tables/azure-data-tables/CMakeLists.txt b/sdk/tables/azure-data-tables/CMakeLists.txt +index 038e267..d7e7976 100644 +--- a/sdk/tables/azure-data-tables/CMakeLists.txt ++++ b/sdk/tables/azure-data-tables/CMakeLists.txt +@@ -106,6 +106,7 @@ target_include_directories( + target_link_libraries(azure-data-tables PUBLIC Azure::azure-core) + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-data-tables PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-data-tables ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( +diff --git a/sdk/template/azure-template/CMakeLists.txt b/sdk/template/azure-template/CMakeLists.txt +index 84e3d17..43f3320 100644 +--- a/sdk/template/azure-template/CMakeLists.txt ++++ b/sdk/template/azure-template/CMakeLists.txt +@@ -78,6 +78,7 @@ add_library(Azure::azure-template ALIAS azure-template) + create_code_coverage(template azure-template azure-template-test "tests?/*;samples?/*") + + get_az_version("${CMAKE_CURRENT_SOURCE_DIR}/src/private/package_version.hpp") ++set_target_properties(azure-template PROPERTIES VERSION ${AZ_LIBRARY_VERSION}) + generate_documentation(azure-template ${AZ_LIBRARY_VERSION}) + + az_vcpkg_export( diff --git a/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/metadata.xml b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/metadata.xml new file mode 100644 index 00000000000..5db219e6b1e --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/dev-cpp/azure-security-keyvault-keys/metadata.xml @@ -0,0 +1,11 @@ + + + + + chewi@gentoo.org + James Le Cuirot + + + Azure/azure-sdk-for-cpp + +