From a91d351ffb69812de847e384a6f0d91e2a114611 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 6 Jul 2023 10:28:02 -0500 Subject: [PATCH] Fix pki-tomcat.jar and pki-tomcat-9.0.jar The CMake scripts for pki-tomcat.jar and pki-tomcat-9.0.jar have been updated to use separate build folders. The Azure pipelines have been updated to verify the content of the JAR files. --- azure-pipelines.yml | 40 ++++++++++++++++++++++++++++++++++ base/tomcat-9.0/CMakeLists.txt | 4 ++-- base/tomcat/CMakeLists.txt | 4 ++-- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2d6b0ee71e0..6984d32e34d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -147,6 +147,38 @@ jobs: diff cmake.out maven.out displayName: Compare pki-tools.jar + - script: | + docker exec runner \ + jar tvf /root/build/dist/pki-tomcat.jar | awk '{print $8;}' | grep -v '/$' | sort | tee cmake.out + docker exec runner \ + jar tvf /root/src/base/tomcat/target/pki-tomcat.jar | awk '{print $8;}' | grep -v -E '^META-INF/maven/|/$' | sort > maven.out + diff cmake.out maven.out + displayName: Compare pki-tomcat.jar + + - script: | + docker exec runner \ + jar tvf /root/build/dist/pki-tomcat-9.0.jar | awk '{print $8;}' | grep -v '/$' | sort | tee cmake.out + docker exec runner \ + jar tvf /root/src/base/tomcat-9.0/target/pki-tomcat-9.0.jar | awk '{print $8;}' | grep -v -E '^META-INF/maven/|/$' | sort > maven.out + diff cmake.out maven.out + displayName: Compare pki-tomcat-9.0.jar + + - script: | + docker exec runner \ + jar tvf /root/build/dist/pki-server.jar | awk '{print $8;}' | grep -v '/$' | sort | tee cmake.out + docker exec runner \ + jar tvf /root/src/base/server/target/pki-server.jar | awk '{print $8;}' | grep -v -E '^META-INF/maven/|/$' | sort > maven.out + diff cmake.out maven.out + displayName: Compare pki-server.jar + + - script: | + docker exec runner \ + jar tvf /root/build/dist/pki-server-webapp.jar | awk '{print $8;}' | grep -v '/$' | sort | tee cmake.out + docker exec runner \ + jar tvf /root/src/base/server-webapp/target/pki-server-webapp.jar | awk '{print $8;}' | grep -v -E '^META-INF/maven/|/$' | sort > maven.out + diff cmake.out maven.out + displayName: Compare pki-server-webapp.jar + - script: | docker exec runner \ jar tvf /root/build/dist/pki-ca.jar | awk '{print $8;}' | grep -v '/$' | sort | tee cmake.out @@ -195,6 +227,14 @@ jobs: diff cmake.out maven.out displayName: Compare pki-acme.jar + - script: | + docker exec runner \ + jar tvf /root/build/dist/pki-est.jar | awk '{print $8;}' | grep -v '/$' | sort | tee cmake.out + docker exec runner \ + jar tvf /root/src/base/est/target/pki-est.jar | awk '{print $8;}' | grep -v -E '^META-INF/maven/|/$' | sort > maven.out + diff cmake.out maven.out + displayName: Compare pki-est.jar + - script: | docker exec runner \ /root/src/build.sh \ diff --git a/base/tomcat-9.0/CMakeLists.txt b/base/tomcat-9.0/CMakeLists.txt index 9b589d39b4b..7b8236daa62 100644 --- a/base/tomcat-9.0/CMakeLists.txt +++ b/base/tomcat-9.0/CMakeLists.txt @@ -16,7 +16,7 @@ javac(pki-tomcat-9.0-classes ${PKI_COMMON_JAR} ${PKI_TOMCAT_JAR} OUTPUT_DIR - ${CMAKE_BINARY_DIR}/classes + ${CMAKE_CURRENT_BINARY_DIR}/classes DEPENDS pki-tomcat-jar ) @@ -38,7 +38,7 @@ jar(pki-tomcat-9.0-jar PARAMS ${CMAKE_CURRENT_BINARY_DIR}/MANIFEST.MF INPUT_DIR - ${CMAKE_BINARY_DIR}/classes + ${CMAKE_CURRENT_BINARY_DIR}/classes DEPENDS pki-tomcat-9.0-classes ) diff --git a/base/tomcat/CMakeLists.txt b/base/tomcat/CMakeLists.txt index 23f0d74bd51..1e0f07bf97b 100644 --- a/base/tomcat/CMakeLists.txt +++ b/base/tomcat/CMakeLists.txt @@ -15,7 +15,7 @@ javac(pki-tomcat-classes ${TOMCATJSS_TOMCAT_9_0_JAR} ${PKI_COMMON_JAR} OUTPUT_DIR - ${CMAKE_BINARY_DIR}/classes + ${CMAKE_CURRENT_BINARY_DIR}/classes DEPENDS pki-common-jar ) @@ -37,7 +37,7 @@ jar(pki-tomcat-jar PARAMS ${CMAKE_CURRENT_BINARY_DIR}/MANIFEST.MF INPUT_DIR - ${CMAKE_BINARY_DIR}/classes + ${CMAKE_CURRENT_BINARY_DIR}/classes DEPENDS pki-tomcat-classes )