You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "olabusayoT (via GitHub)" <gi...@apache.org> on 2025/09/18 19:55:26 UTC

[PR] Enable SBOM generation during release [daffodil-infrastructure]

olabusayoT opened a new pull request, #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17

   - add SBT plugin to main.js
   - use "set every bomFormat" since "ThisBuild / bomFormat" in build.sbt is ignored
   
   DAFFODIL-2993


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2361193551


##########
actions/release-candidate/src/main.js:
##########
@@ -114,7 +114,10 @@ async function run() {
 		fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")\n');
 		fs.appendFileSync(`${ sbt_dir }/build.sbt`, `pgpSigningKey := Some("${ gpg_signing_key_id }")\n`);
 
-		if (publish) {
+        // enable SBT for publishing SBOM
+        fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" %% "sbt-sbom" % "0.4.0")\n');

Review Comment:
   I tried it and couldn't get it to work. I tried both the plain bomFormat and ThisBuild / bomFormat and neither worked. Only doing "set every bomFormat" seemed to work



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2363673791


##########
containers/build-release/src/daffodil-build-release:
##########
@@ -83,12 +83,13 @@ case $PROJECT in
     set_java_version 17
     mkdir -p $DIST_DIR/bin
     sbt \
-      +compile \
-      +publish \
-      daffodil-cli/Rpm/packageBin \
-      daffodil-cli/packageWindowsBin \
-      daffodil-cli/Universal/packageBin \
-      daffodil-cli/Universal/packageZipTarball
+      ";set every bomFormat := \"xml\"
+      ;+compile
+      ;+publish
+      ;daffodil-cli/Rpm/packageBin
+      ;daffodil-cli/packageWindowsBin
+      ;daffodil-cli/Universal/packageBin
+      ;daffodil-cli/Universal/packageZipTarball"
 
     cp daffodil-cli/target/universal/apache-daffodil-*.tgz $DIST_DIR/bin/

Review Comment:
   I was able to verify reproducibility for sbom stuff and update the check-release/README so other's can recreate checking local releases



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2361219913


##########
actions/release-candidate/src/main.js:
##########
@@ -114,7 +114,10 @@ async function run() {
 		fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")\n');
 		fs.appendFileSync(`${ sbt_dir }/build.sbt`, `pgpSigningKey := Some("${ gpg_signing_key_id }")\n`);
 
-		if (publish) {
+        // enable SBT for publishing SBOM
+        fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" %% "sbt-sbom" % "0.4.0")\n');

Review Comment:
   Have you tried `Global / bomFormat := ...` in the global sbt?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2363661436


##########
actions/release-candidate/src/main.js:
##########
@@ -114,7 +114,10 @@ async function run() {
 		fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")\n');
 		fs.appendFileSync(`${ sbt_dir }/build.sbt`, `pgpSigningKey := Some("${ gpg_signing_key_id }")\n`);
 
-		if (publish) {
+        // enable SBT for publishing SBOM
+        fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" %% "sbt-sbom" % "0.4.0")\n');

Review Comment:
   I was able to get ThisBuild / bomFormat to work for the container's global sbt



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2368463893


##########
containers/check-release/README.md:
##########
@@ -36,8 +36,34 @@ To use the container image to check a release, run the following:
 
 Alternatively, if you would like to do the same checks but also check for
 reproducibility, use the Release Candidate Container to build a release
-directory directory, then run the following:
+directory, then run the following:
 
     podman run -it --rm \
-      --volume <RELEASE_DIR>:/release
-      daffodil-check-release "<DIST_URL>" "<MAVEN_URL>" /release
+      --volume <RELEASE_DIR>:/release \
+      daffodil-check-release "<DIST_URL>" "<MAVEN_URL>" /release 
+
+To use the container image to check a local release, a few additional 
+steps are required. First, build the release directory as described 
+in the `build-release/README.md` file using rc0 as the release label. 

Review Comment:
   I think I would do the build release stuff last. So that the intrusctions are first about how to setup and configure forks, what changes need to be made, and now to trigger the action and download the release.zip. 
   
   That can be followed by something that just says if you want to validation things with the check-release container, follow its steps with XYZ modifications.



##########
actions/release-candidate/src/main.js:
##########
@@ -114,7 +114,12 @@ async function run() {
 		fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")\n');
 		fs.appendFileSync(`${ sbt_dir }/build.sbt`, `pgpSigningKey := Some("${ gpg_signing_key_id }")\n`);
 
-		if (publish) {
+        // enable SBT for publishing SBOM
+        fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" %% "sbt-sbom" % "0.4.0")\n');
+        fs.appendFileSync(`${ sbt_dir }/build.sbt`, `bomFormat := "xml"\n`);

Review Comment:
   This uses backticks around the `bomFormat := ...` parameter. But in .js I think backticks should only be used for templates where you want to expand variables, like in the first parameter. So the second parameter wants to either use single quotes or double quotes, and since the actual string contains double quotes single quotes is probably preferred. This also matches the above usage for sbt pgp configuration.



##########
containers/check-release/README.md:
##########
@@ -36,8 +36,34 @@ To use the container image to check a release, run the following:
 
 Alternatively, if you would like to do the same checks but also check for
 reproducibility, use the Release Candidate Container to build a release
-directory directory, then run the following:
+directory, then run the following:
 
     podman run -it --rm \
-      --volume <RELEASE_DIR>:/release
-      daffodil-check-release "<DIST_URL>" "<MAVEN_URL>" /release
+      --volume <RELEASE_DIR>:/release \
+      daffodil-check-release "<DIST_URL>" "<MAVEN_URL>" /release 
+
+To use the container image to check a local release, a few additional 
+steps are required. First, build the release directory as described 
+in the `build-release/README.md` file using rc0 as the release label. 
+Then build the check-release container as described above, and push your 
+changes to your fork. Then, update the `uses` action of the 
+`ASF Release Candidate` step in the 
+`.github/workflows/release-candidate.yml` file in the Daffodil repository.
+Push your changes to your fork on that repository as well. You will then need
+to add the secrets required by the `ASF Release Candidate` step to your
+Daffodil fork. The following secrets are required:
+DAFFODIL_GPG_SECRET_KEY, DAFFODIL_SVN_DEV_USERNAME, DAFFODIL_SVN_DEV_PASSWORD,
+NEXUS_STAGE_DEPLOYER_USER, NEXUS_STAGE_DEPLOYER_PW. The first
+can be any private key without a passphrase. The other 
+secrets can be set to any non-empty value, as they will not be used. 
+Now you can generate a local release, by going to the Actions tab of Daffodil fork, 
+and selecting the `Release Candidate` workflow. Click the `Run workflow` button,

Review Comment:
   Avoid "Release Candiate" since we don't know what the workflow will be called. Daffodil projects use Release Candiate, but we should have some other slightly more generic way to reference the GitHub Action that uses the release-candidate action.



##########
containers/check-release/README.md:
##########
@@ -36,8 +36,34 @@ To use the container image to check a release, run the following:
 
 Alternatively, if you would like to do the same checks but also check for
 reproducibility, use the Release Candidate Container to build a release
-directory directory, then run the following:
+directory, then run the following:
 
     podman run -it --rm \
-      --volume <RELEASE_DIR>:/release
-      daffodil-check-release "<DIST_URL>" "<MAVEN_URL>" /release
+      --volume <RELEASE_DIR>:/release \
+      daffodil-check-release "<DIST_URL>" "<MAVEN_URL>" /release 
+
+To use the container image to check a local release, a few additional 
+steps are required. First, build the release directory as described 
+in the `build-release/README.md` file using rc0 as the release label. 
+Then build the check-release container as described above, and push your 
+changes to your fork. Then, update the `uses` action of the 
+`ASF Release Candidate` step in the 
+`.github/workflows/release-candidate.yml` file in the Daffodil repository.

Review Comment:
   We should avoid using "Daffodil" here, since these same steps work for SBT, VSCode, or potentially other repos that want to use this--there actually isn't anything Daffodil specific in the release candidate action so we should avoid using daffodil and just mention different forks (e.g. the daffodil-infrastructure fork and the action .yml file that `uses` the action.



##########
actions/release-candidate/src/main.js:
##########
@@ -114,7 +114,12 @@ async function run() {
 		fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")\n');
 		fs.appendFileSync(`${ sbt_dir }/build.sbt`, `pgpSigningKey := Some("${ gpg_signing_key_id }")\n`);
 
-		if (publish) {
+        // enable SBT for publishing SBOM
+        fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" %% "sbt-sbom" % "0.4.0")\n');
+        fs.appendFileSync(`${ sbt_dir }/build.sbt`, `bomFormat := "xml"\n`);
+
+
+        if (publish) {

Review Comment:
   This .js file uses tabs for indentation. Can you change your new code so that it changes your spaces to tabs?
   
   I have no preference in tabs vs spaces, and I'm fine if we want to switch to spaces, but we should make this PR  be consistent with the current style.



##########
containers/check-release/src/check-release.sh:
##########
@@ -80,30 +80,34 @@ RELEASE_DIR=release-download
 DIST_DIR=$RELEASE_DIR/asf-dist
 MAVEN_DIR=$RELEASE_DIR/maven-local
 
-printf "\n==== Downloading Release Files ====\n"
 
-# download dist/dev/ files
-mkdir -p $DIST_DIR
-pushd $DIST_DIR &>/dev/null
-download_dir $DIST_URL
-popd &>/dev/null
-
-# download maven repository, delete nexus generated files, and remove the
-# orgapachedaffodil-1234 dir since the build-release container does not have
-# this directory
-if [ -n "$MAVEN_URL" ]
+if [ ! -d "$RELEASE_DIR" ]
 then
-	mkdir -p $MAVEN_DIR
-	pushd $MAVEN_DIR &>/dev/null
-	download_dir $MAVEN_URL
-	find . -type f \( -name 'archetype-catalog.xml' -o -name 'maven-metadata.xml*' \) -delete
-	REPO_DIR=(*/)
-	mv $REPO_DIR/* .
-	rmdir $REPO_DIR
-	popd &>/dev/null
-fi
+  printf "\n==== Downloading Release Files ====\n"
 
-printf "\n==== Download Complete ====\n"
+  # download dist/dev/ files
+  mkdir -p $DIST_DIR
+  pushd $DIST_DIR &>/dev/null
+  download_dir $DIST_URL
+  popd &>/dev/null
+
+  # download maven repository, delete nexus generated files, and remove the
+  # orgapachedaffodil-1234 dir since the build-release container does not have
+  # this directory
+  if [ -n "$MAVEN_URL" ]
+  then
+    mkdir -p $MAVEN_DIR
+    pushd $MAVEN_DIR &>/dev/null
+    download_dir $MAVEN_URL
+    find . -type f \( -name 'archetype-catalog.xml' -o -name 'maven-metadata.xml*' \) -delete
+    REPO_DIR=(*/)
+    mv $REPO_DIR/* .
+    rmdir $REPO_DIR
+    popd &>/dev/null
+  fi
+
+  printf "\n==== Download Complete ====\n"
+fi

Review Comment:
   Can we add an else that says something like
   > printf "\n==== Skipping Download, release-download/ directory already exists ====\n"
   
   That way if someone runs check release twice it will be clear that if they needed to delete the directory if they want to redownload files?



##########
containers/check-release/src/check-release.sh:
##########
@@ -80,30 +80,34 @@ RELEASE_DIR=release-download
 DIST_DIR=$RELEASE_DIR/asf-dist
 MAVEN_DIR=$RELEASE_DIR/maven-local
 
-printf "\n==== Downloading Release Files ====\n"
 
-# download dist/dev/ files
-mkdir -p $DIST_DIR
-pushd $DIST_DIR &>/dev/null
-download_dir $DIST_URL
-popd &>/dev/null
-
-# download maven repository, delete nexus generated files, and remove the
-# orgapachedaffodil-1234 dir since the build-release container does not have
-# this directory
-if [ -n "$MAVEN_URL" ]
+if [ ! -d "$RELEASE_DIR" ]
 then
-	mkdir -p $MAVEN_DIR
-	pushd $MAVEN_DIR &>/dev/null
-	download_dir $MAVEN_URL
-	find . -type f \( -name 'archetype-catalog.xml' -o -name 'maven-metadata.xml*' \) -delete
-	REPO_DIR=(*/)
-	mv $REPO_DIR/* .
-	rmdir $REPO_DIR
-	popd &>/dev/null
-fi
+  printf "\n==== Downloading Release Files ====\n"

Review Comment:
   This file uses tabs instead of spaces. Like a above, I have no preference either way, but this PR should be consistent. We can change it later if we want.



##########
containers/check-release/README.md:
##########
@@ -36,8 +36,34 @@ To use the container image to check a release, run the following:
 
 Alternatively, if you would like to do the same checks but also check for
 reproducibility, use the Release Candidate Container to build a release
-directory directory, then run the following:
+directory, then run the following:
 
     podman run -it --rm \
-      --volume <RELEASE_DIR>:/release
-      daffodil-check-release "<DIST_URL>" "<MAVEN_URL>" /release
+      --volume <RELEASE_DIR>:/release \
+      daffodil-check-release "<DIST_URL>" "<MAVEN_URL>" /release 
+
+To use the container image to check a local release, a few additional 

Review Comment:
   > To use the container image to check a local release ...
   
   I'm not sure "local release" is the best way to describe what this paragraph is talking about. I also wonder if this wants to be part of a new "Testing" section in the release-candidate action README, since most of these steps are about configuring a fork to be able to run the action and checking those results. It would also be more legible if the steps were in a numbered list. So maybe something more like:
   
   ```
   # Testing
   
   Perform the following steps to test changes to the daffodil-infrastructure repo on a GitHub fork:
   
   1. Foo ...
   1. Bar ...
   1. Baz ...
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2373020805


##########
actions/release-candidate/README.md:
##########
@@ -158,3 +158,37 @@ npm run build
 
 The changes this makes to `dist/` must be committed along with the changes to
 `src/`.
+
+# Testing
+
+Perform the following steps to test changes to the daffodil-infrastructure repo on a GitHub fork:
+
+1. Update the `uses` action of the `ASF Release Candidate` step in the
+   `.github/workflows/release-candidate.yml` file of the repository to be tested on. Then, 
+    push your changes to your fork of the test repository. 
+2. Add the secrets required by the `ASF Release Candidate` step to your
+    test repository. The following secrets are required:
+
+   - DAFFODIL_GPG_SECRET_KEY (any private key without a passphrase)
+   - DAFFODIL_SVN_DEV_USERNAME
+   - DAFFODIL_SVN_DEV_PASSWORD,
+   - NEXUS_STAGE_DEPLOYER_USER
+   - NEXUS_STAGE_DEPLOYER_PW
+
+   The other secrets can be set to any non-empty value, as they will not be used.

Review Comment:
   I would suggest making this stronger. Something like "The other secrets should be set to non-empty dummy values and not actual usernames/passwords. They will not be used."
   
   These values should never be used in testing, but I could imagine someone testing changes that accidentally do use them and publish things. By setting them to dummy values we avoid that.
   
   It might also be worth opening a ticket to modify this action so these aren't even required settings, so they are only needed when actually publishing things. Not only would that simplify setting up forks for testing, it would add even more assurances that we don't accidentally publish from forks.



##########
actions/release-candidate/README.md:
##########
@@ -158,3 +158,37 @@ npm run build
 
 The changes this makes to `dist/` must be committed along with the changes to
 `src/`.
+
+# Testing
+
+Perform the following steps to test changes to the daffodil-infrastructure repo on a GitHub fork:
+
+1. Update the `uses` action of the `ASF Release Candidate` step in the
+   `.github/workflows/release-candidate.yml` file of the repository to be tested on. Then, 
+    push your changes to your fork of the test repository. 
+2. Add the secrets required by the `ASF Release Candidate` step to your
+    test repository. The following secrets are required:
+
+   - DAFFODIL_GPG_SECRET_KEY (any private key without a passphrase)
+   - DAFFODIL_SVN_DEV_USERNAME
+   - DAFFODIL_SVN_DEV_PASSWORD,
+   - NEXUS_STAGE_DEPLOYER_USER
+   - NEXUS_STAGE_DEPLOYER_PW
+
+   The other secrets can be set to any non-empty value, as they will not be used.
+3.  Now you can generate a release by going to the Actions tab of your test fork,
+    and selecting the workflow that uses the release-candidate action. 
+    Click the `Run workflow` button, and select the branch you just pushed to.
+4.  Once the run is complete, you can download the release from the `Artifacts` 
+    tab under `Summary`. After downloading the release, extract it. 
+
+If you want to validate things with the check-release container, follow its steps 
+as defined in its README.md. The only modification you need to make is to set the
+release label to `rc0`. Then run the checks using the container using the 
+following command:
+
+    ```bash
+    podman run -it --rm \
+    --volume <DOWNLOADED-RELEASE-DIR>:/release-download \
+    --volume <ARTIFACT-DIR>:/release \
+    daffodil-check-release "NA" "NA" /release```

Review Comment:
   This doesn't render correctly, I think because the `\`\`\`bash` is indented and the closing `\`\`\`` is not on a new line. Should just be
   
       ```bash
       podman run -it --rm \
         --volume <DOWNLOADED-RELEASE-DIR>:/release-download \
         --volume <ARTIFACT-DIR>:/release \
         daffodil-check-release "NA" "NA" /release
       ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2361198417


##########
containers/build-release/src/daffodil-build-release:
##########
@@ -83,12 +83,13 @@ case $PROJECT in
     set_java_version 17
     mkdir -p $DIST_DIR/bin
     sbt \

Review Comment:
   Hmm I thought that's what main.js did. I'll update and test setting the bomFormat in the global sbt for the container



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2361222136


##########
containers/build-release/src/daffodil-build-release:
##########
@@ -83,12 +83,13 @@ case $PROJECT in
     set_java_version 17
     mkdir -p $DIST_DIR/bin
     sbt \

Review Comment:
   Nope, the stuff in the release-candidate action .js files are only used in githb actions. The build-release container is not used by release candiates and doesn't use the github actions script, it just tries to mimic the environment and steps done in release candidate actions.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT merged PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2373306077


##########
actions/release-candidate/README.md:
##########
@@ -158,3 +158,37 @@ npm run build
 
 The changes this makes to `dist/` must be committed along with the changes to
 `src/`.
+
+# Testing
+
+Perform the following steps to test changes to the daffodil-infrastructure repo on a GitHub fork:
+
+1. Update the `uses` action of the `ASF Release Candidate` step in the
+   `.github/workflows/release-candidate.yml` file of the repository to be tested on. Then, 
+    push your changes to your fork of the test repository. 
+2. Add the secrets required by the `ASF Release Candidate` step to your
+    test repository. The following secrets are required:
+
+   - DAFFODIL_GPG_SECRET_KEY (any private key without a passphrase)
+   - DAFFODIL_SVN_DEV_USERNAME
+   - DAFFODIL_SVN_DEV_PASSWORD,
+   - NEXUS_STAGE_DEPLOYER_USER
+   - NEXUS_STAGE_DEPLOYER_PW
+
+   The other secrets can be set to any non-empty value, as they will not be used.

Review Comment:
   Created DAFFODIL-3041 to track



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "stevedlawrence (via GitHub)" <gi...@apache.org>.
stevedlawrence commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2361039778


##########
containers/build-release/src/daffodil-build-release:
##########
@@ -83,12 +83,13 @@ case $PROJECT in
     set_java_version 17
     mkdir -p $DIST_DIR/bin
     sbt \
-      +compile \
-      +publish \
-      daffodil-cli/Rpm/packageBin \
-      daffodil-cli/packageWindowsBin \
-      daffodil-cli/Universal/packageBin \
-      daffodil-cli/Universal/packageZipTarball
+      ";set every bomFormat := \"xml\"
+      ;+compile
+      ;+publish
+      ;daffodil-cli/Rpm/packageBin
+      ;daffodil-cli/packageWindowsBin
+      ;daffodil-cli/Universal/packageBin
+      ;daffodil-cli/Universal/packageZipTarball"
 
     cp daffodil-cli/target/universal/apache-daffodil-*.tgz $DIST_DIR/bin/

Review Comment:
   Did you test if this still creates reproducible builds? If we create a sbom in a GitHub actions and then create a build using daffodil-build-release we need to make sure they result in the same sbom. If that's not possible, we maybe need to exclude sboms from the reproducible build part of the check-release script. 
   
   Related I also wonder if sbt-sbom includes things like SBT plugins? For example, the release-candidate action adds the sbt-pgp plugin, but the daffodil-build-release container does not. So that's a potential difference if sbt-sbom it includes that information. We may need to add that plugin in daffodil-build-release--we won't use it because there is no reason to sign things in this build-release container (it's purely for checking reproducibility which signing breaks), but it might be needed for reproducible sboms.



##########
containers/build-release/src/daffodil-build-release:
##########
@@ -83,12 +83,13 @@ case $PROJECT in
     set_java_version 17
     mkdir -p $DIST_DIR/bin
     sbt \

Review Comment:
   Does this container need to add sbt-bom to global plugin.sbt? Otherwise I think setting bomFormat will fail?



##########
actions/release-candidate/src/main.js:
##########
@@ -114,7 +114,10 @@ async function run() {
 		fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")\n');
 		fs.appendFileSync(`${ sbt_dir }/build.sbt`, `pgpSigningKey := Some("${ gpg_signing_key_id }")\n`);
 
-		if (publish) {
+        // enable SBT for publishing SBOM
+        fs.appendFileSync(`${ sbt_dir }/plugins/build.sbt`, 'addSbtPlugin("com.github.sbt" %% "sbt-sbom" % "0.4.0")\n');

Review Comment:
   Do we also need to put `bomFormat := "xml"` in build.sbt  like we do pgpSigningKey? That way our release candidate actions will publish the XML version?



##########
containers/build-release/src/daffodil-build-release:
##########
@@ -83,12 +83,13 @@ case $PROJECT in
     set_java_version 17
     mkdir -p $DIST_DIR/bin
     sbt \
-      +compile \
-      +publish \
-      daffodil-cli/Rpm/packageBin \
-      daffodil-cli/packageWindowsBin \
-      daffodil-cli/Universal/packageBin \
-      daffodil-cli/Universal/packageZipTarball
+      ";set every bomFormat := \"xml\"

Review Comment:
   Instead of putting this here, I woudl suggest putting this in the global sbt build.sbt. This bom stuff is also needed for sbt-daffodil, so putting it in the global config will enable that. It woudl also avoid the need for semicolons, since which is a bit confusing since it's easily confused with bash semicolons.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Enable SBOM generation during release [daffodil-infrastructure]

Posted by "olabusayoT (via GitHub)" <gi...@apache.org>.
olabusayoT commented on code in PR #17:
URL: https://github.com/apache/daffodil-infrastructure/pull/17#discussion_r2363668282


##########
containers/build-release/src/daffodil-build-release:
##########
@@ -83,12 +83,13 @@ case $PROJECT in
     set_java_version 17
     mkdir -p $DIST_DIR/bin
     sbt \

Review Comment:
   And ok, based on the release arifact, the ThisBuild / bomFormat in the action .js file worked as well



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org