This is an automated email from the ASF dual-hosted git repository.

slawrence pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil.git


The following commit(s) were added to refs/heads/main by this push:
     new 974921ca1 Updates to the release candidate script
974921ca1 is described below

commit 974921ca1c7da3dfddfc08905eb4c6e5d4469634
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Tue Jun 21 08:47:27 2022 -0400

    Updates to the release candidate script
    
    - Bumps fedora-minimal from 35 to 36
    - Add set -x to the container build script so that we immediately exit
      and fail if there are any build errors instead of silently ignoring
    - Disable the fedora updates repository when installing needed RPMs.
      This way, no matter when we build this container and no matter what
      updates Fedora adds, we will always get the same reproducable results
    - Clean up the dnf cache after installation. This saves a little space
      and avoids errors about certain cache socket files that can't be saved
      in the container
    - Verify the hash of the WIX binaries. We download these from github so
      it's possible that the files could change without us knowing. This
      will fail if those files ever change
    - Update the daffodil-release-candidate script to run yarn install
      before building the vsix file
    - Allow users to select key from a list instead of needing to copy/paste
---
 containers/release-candidate/Dockerfile            |  2 +-
 .../release-candidate/daffodil-release-candidate   | 31 +++++++++++++++++-----
 containers/release-candidate/setup-container.sh    | 11 ++++++--
 3 files changed, 34 insertions(+), 10 deletions(-)

diff --git a/containers/release-candidate/Dockerfile 
b/containers/release-candidate/Dockerfile
index 951cc5e34..2b678bbf7 100644
--- a/containers/release-candidate/Dockerfile
+++ b/containers/release-candidate/Dockerfile
@@ -15,7 +15,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM registry.fedoraproject.org/fedora-minimal:35
+FROM registry.fedoraproject.org/fedora-minimal:36
 
 WORKDIR /root
 
diff --git a/containers/release-candidate/daffodil-release-candidate 
b/containers/release-candidate/daffodil-release-candidate
index 37dc98b14..53df6265b 100755
--- a/containers/release-candidate/daffodil-release-candidate
+++ b/containers/release-candidate/daffodil-release-candidate
@@ -117,21 +117,37 @@ export LANG=en_US.UTF-8
 export CC=clang
 export AR=llvm-ar
 
-
-read -p "Pre Release label (e.g. rc1): " PRE_RELEASE
-
-echo
-echo "Available Signing Key IDs:"
+AVAILABLE_KEYS=()
 SHORT_SEC_KEY_IDS=`gpg --list-secret-keys --with-colons | grep '^sec'  | cut 
-d: -f 5`
 for SHORT_SEC_KEY_ID in $SHORT_SEC_KEY_IDS
 do
     LONG_SEC_KEY_ID=`gpg --list-secret-keys --with-colons $SHORT_SEC_KEY_ID | 
grep -m 1 '^fpr' | cut -d: -f10`
     SEC_KEY_UID=`gpg --list-secret-keys --with-colons $LONG_SEC_KEY_ID | grep 
'^uid' | cut -d: -f10`
-    echo "  $LONG_SEC_KEY_ID [$SEC_KEY_UID]"
+    AVAILABLE_KEYS+=("$LONG_SEC_KEY_ID [$SEC_KEY_UID]")
 done
+
+if [ ${#AVAILABLE_KEYS[@]} -eq 0 ]
+then
+    echo -e "\n!!! No secret keys found !!!\n"
+    echo -e "\n!!! Ensure you have created a bind mount of your gpg directory, 
for example with -v ~/.gnupg/:/root/.gnupg/ !!!\n"
+    exit
+fi
+
 echo
+echo "Which code signing key:"
+select PGP_KEY_SELECTION in "${AVAILABLE_KEYS[@]}"
+do
+    if [ -z "$PGP_KEY_SELECTION" ]
+    then
+        echo -e "\n!!! Bad key selection !!!\n"
+        exit
+    fi
+    PGP_SIGNING_KEY_ID=$(echo $PGP_KEY_SELECTION | cut -d" " -f 1)
+    break
+done
 
-read -p "Signing Key ID (long format): " PGP_SIGNING_KEY_ID
+echo
+read -p "Pre Release label (e.g. rc1): " PRE_RELEASE
 read -p "Git Commit Name: " GIT_COMMIT_NAME
 read -p "Git Commit Email: " GIT_COMMIT_EMAIL
 read -p "Apache Username: " APACHE_USERNAME
@@ -281,6 +297,7 @@ case $PROJECT_REPO in
 
     echo "Building Convenience Binaries..."
     mkdir -p $DAFFODIL_RELEASE_DIR/bin/
+    yarn install
     yarn build
     cp *.vsix $DAFFODIL_RELEASE_DIR/bin/
 
diff --git a/containers/release-candidate/setup-container.sh 
b/containers/release-candidate/setup-container.sh
index 5fd85efc2..82cbb3916 100755
--- a/containers/release-candidate/setup-container.sh
+++ b/containers/release-candidate/setup-container.sh
@@ -15,6 +15,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+set -e
+
 export BUILD_DIR=`pwd`
 export WINEDEBUG=-all
 
@@ -31,8 +33,9 @@ repo_gpgcheck=0
 enabled=1
 EOF
 
-# install dependencies
-microdnf -y install \
+# install dependencies, explicitly not enabling the updates repo so we are
+# frozen at a particular fedora release
+microdnf -y --disablerepo="*" --enablerepo=fedora --enablerepo=sbt-rpm install 
\
   clang \
   git \
   java-1.8.0-devel \
@@ -49,8 +52,12 @@ microdnf -y install \
   wine \
   winetricks
 
+# remove left over cache files--this saves space and avoids certain warnings
+microdnf clean all
+
 # install wix
 curl -L 
https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip
 -o wix311-binaries.zip
+echo 
"6fd961c85e1e6adafb99ef50c9659e3eb83c84ecaf49f523e556788845b206e1857aba2c39409405d4cda1df9b30a552ce5aab808be5f8368a37a447d78d1a05
 wix311-binaries.zip" | sha512sum -c -
 mkdir /opt/wix311
 unzip wix311-binaries.zip -d /opt/wix311/
 rm wix311-binaries.zip

Reply via email to