You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/12/13 10:20:41 UTC

(camel) branch CAMEL-20205 created (now a2d31aa106f)

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

acosentino pushed a change to branch CAMEL-20205
in repository https://gitbox.apache.org/repos/asf/camel.git


      at a2d31aa106f CAMEL-20205 - Add SBOM to release and release-sbom script to LTS 4.0.x

This branch includes the following new commits:

     new 5cda3634076 CAMEL-20149 - Release guide: Add instructions to sign and publish SBOM files to dist/release folder (#12328)
     new 3d71d1a190e Release: Modify the name of SBOMs to be uploaded on dist/release
     new a2d31aa106f CAMEL-20205 - Add SBOM to release and release-sbom script to LTS 4.0.x

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(camel) 01/03: CAMEL-20149 - Release guide: Add instructions to sign and publish SBOM files to dist/release folder (#12328)

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch CAMEL-20205
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 5cda36340766b2175b3bbf9369b5c47f00f86346
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 6 11:49:56 2023 +0100

    CAMEL-20149 - Release guide: Add instructions to sign and publish SBOM files to dist/release folder (#12328)
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../modules/ROOT/pages/release-guide.adoc          |  5 ++
 etc/scripts/release-sbom.sh                        | 64 ++++++++++++++++++++++
 etc/scripts/sign.sh                                | 35 ++++++++++++
 3 files changed, 104 insertions(+)

diff --git a/docs/user-manual/modules/ROOT/pages/release-guide.adoc b/docs/user-manual/modules/ROOT/pages/release-guide.adoc
index 8baed844750..a37953a4d53 100644
--- a/docs/user-manual/modules/ROOT/pages/release-guide.adoc
+++ b/docs/user-manual/modules/ROOT/pages/release-guide.adoc
@@ -365,6 +365,11 @@ This will release the artifacts.
 
   cd ${CAMEL_ROOT_DIR}/etc/scripts
   ./release-distro.sh <Camel version>
+  
+. Copy SBOMs to Apache website:
+
+  cd ${CAMEL_ROOT_DIR}/etc/scripts
+  ./release-sbom.sh <Camel version>
 
 . Remove the old distribution version from the Apache website:
 
diff --git a/etc/scripts/release-sbom.sh b/etc/scripts/release-sbom.sh
new file mode 100755
index 00000000000..dc39b044816
--- /dev/null
+++ b/etc/scripts/release-sbom.sh
@@ -0,0 +1,64 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+VERSION=${1}
+DOWNLOAD=${2:-/tmp/camel-sbom}
+mkdir -p ${DOWNLOAD} 2>/dev/null
+
+# The following component contain schema definitions that must be published
+RUNDIR=$(cd ${0%/*} && echo $PWD)
+DIST_REPO="https://dist.apache.org/repos/dist/release/camel/camel/"
+
+if [ -z "${VERSION}" -o ! -d "${DOWNLOAD}" ]
+then
+ echo "Usage: release-sbom.sh <camel-version> [temp-directory]"
+ exit 1
+fi
+
+echo "################################################################################"
+echo "                  DOWNLOADING SBOMs FROM APACHE REPOSITORY                     "
+echo "################################################################################"
+echo "${DOWNLOAD}/${VERSION}"
+
+wget -e robots=off --wait 3 --no-check-certificate \
+ -r -np "--reject=html,txt" "--follow-tags=" \
+ -P "${DOWNLOAD}/${VERSION}" -nH "--cut-dirs=3" "--level=1" "--ignore-length" \
+ "https://repository.apache.org/content/repositories/releases/org/apache/camel/camel/${VERSION}/camel-${VERSION}-cyclonedx.xml"
+ 
+ wget -e robots=off --wait 3 --no-check-certificate \
+ -r -np "--reject=html,txt" "--follow-tags=" \
+ -P "${DOWNLOAD}/${VERSION}" -nH "--cut-dirs=3" "--level=1" "--ignore-length" \
+ "https://repository.apache.org/content/repositories/releases/org/apache/camel/camel/${VERSION}/camel-${VERSION}-cyclonedx.json"
+
+DOWNLOAD_LOCATION="${DOWNLOAD}/${VERSION}/org/apache/camel/camel/${VERSION}"
+
+mv ${DOWNLOAD_LOCATION}/camel-${VERSION}-cyclonedx.json ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.json
+mv ${DOWNLOAD_LOCATION}/camel-${VERSION}-cyclonedx.xml ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.xml
+./sign.sh ${DOWNLOAD_LOCATION}/
+
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.json https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.json -m "Import Camel SBOMs JSON release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.json.asc https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.json.asc -m "Import Camel SBOMs JSON release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.json.sha512 https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.json.sha512 -m "Import Camel SBOMs JSON release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.xml https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.xml -m "Import Camel SBOMs XML release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.xml.asc https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.xml.asc -m "Import Camel SBOMs XML release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.xml.sha512 https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.xml.sha512 -m "Import Camel SBOMs XML release"
+echo "SBOM uploaded in dist/release"
+
+rm -rf ${DOWNLOAD_LOCATION}/
+echo "Removed Temporary directory"
+
diff --git a/etc/scripts/sign.sh b/etc/scripts/sign.sh
new file mode 100755
index 00000000000..7aafd104772
--- /dev/null
+++ b/etc/scripts/sign.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# This is a utility script to sign and sha512 all files in the given directory.
+
+if [ "$#" -ne 1 ]; then
+    echo "usage: $0 dir"
+    exit 1
+fi
+
+dir=$1
+
+pushd . && cd $dir
+
+for f in $(ls);
+do
+    sha512sum -b $f > $f.sha512
+    gpg --output $f.asc --armor --detach-sig $f
+done
+
+popd


(camel) 03/03: CAMEL-20205 - Add SBOM to release and release-sbom script to LTS 4.0.x

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch CAMEL-20205
in repository https://gitbox.apache.org/repos/asf/camel.git

commit a2d31aa106f3aa15253e560f57eab5894e978fa3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Dec 13 11:20:11 2023 +0100

    CAMEL-20205 - Add SBOM to release and release-sbom script to LTS 4.0.x
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 dsl/camel-jbang/camel-jbang-main/dist/CamelJBang.java |  4 ++--
 pom.xml                                               | 19 ++++++++++++++++++-
 2 files changed, 20 insertions(+), 3 deletions(-)

diff --git a/dsl/camel-jbang/camel-jbang-main/dist/CamelJBang.java b/dsl/camel-jbang/camel-jbang-main/dist/CamelJBang.java
index be723b9007f..c5fba2e8752 100755
--- a/dsl/camel-jbang/camel-jbang-main/dist/CamelJBang.java
+++ b/dsl/camel-jbang/camel-jbang-main/dist/CamelJBang.java
@@ -19,8 +19,8 @@
 
 //JAVA 17+
 //REPOS central=https://repo1.maven.org/maven2,apache-snapshot=https://repository.apache.org/content/groups/snapshots/
-//DEPS org.apache.camel:camel-bom:${camel.jbang.version:4.0.1}@pom
-//DEPS org.apache.camel:camel-jbang-core:${camel.jbang.version:4.0.1}
+//DEPS org.apache.camel:camel-bom:${camel.jbang.version:4.0.3}@pom
+//DEPS org.apache.camel:camel-jbang-core:${camel.jbang.version:4.0.3}
 //DEPS org.apache.camel.kamelets:camel-kamelets:${camel-kamelets.version:4.0.1}
 
 package main;
diff --git a/pom.xml b/pom.xml
index 18a5af81a52..2d42735a6a3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -119,7 +119,7 @@
         <!-- reproduceable builds: https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
         <project.build.outputTimestamp>2023-11-14T11:50:56Z</project.build.outputTimestamp>
 
-        <cyclonedx-maven-plugin-version>2.7.9</cyclonedx-maven-plugin-version>
+        <cyclonedx-maven-plugin-version>2.7.10</cyclonedx-maven-plugin-version>
         <flatten-maven-plugin-version>1.5.0</flatten-maven-plugin-version>
         <gmavenplus-plugin-version>2.1.0</gmavenplus-plugin-version>
         <license-maven-plugin-version>4.2</license-maven-plugin-version>
@@ -750,6 +750,23 @@
                             </execution>
                         </executions>
                     </plugin>
+                    <plugin>
+                        <groupId>org.cyclonedx</groupId>
+                        <artifactId>cyclonedx-maven-plugin</artifactId>
+                        <version>${cyclonedx-maven-plugin-version}</version>
+                        <inherited>false</inherited>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>makeAggregateBom</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                        <configuration>
+                            <outputName>${project.artifactId}-${project.version}-sbom</outputName>
+                        </configuration>
+                    </plugin>
                 </plugins>
             </build>
         </profile>


(camel) 02/03: Release: Modify the name of SBOMs to be uploaded on dist/release

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch CAMEL-20205
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 3d71d1a190e48bf980531004038a317f3f802078
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Dec 7 13:23:37 2023 +0100

    Release: Modify the name of SBOMs to be uploaded on dist/release
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 etc/scripts/release-sbom.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/etc/scripts/release-sbom.sh b/etc/scripts/release-sbom.sh
index dc39b044816..4438b253b1e 100755
--- a/etc/scripts/release-sbom.sh
+++ b/etc/scripts/release-sbom.sh
@@ -47,16 +47,16 @@ wget -e robots=off --wait 3 --no-check-certificate \
 
 DOWNLOAD_LOCATION="${DOWNLOAD}/${VERSION}/org/apache/camel/camel/${VERSION}"
 
-mv ${DOWNLOAD_LOCATION}/camel-${VERSION}-cyclonedx.json ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.json
-mv ${DOWNLOAD_LOCATION}/camel-${VERSION}-cyclonedx.xml ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.xml
+mv ${DOWNLOAD_LOCATION}/camel-${VERSION}-cyclonedx.json ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-sbom.json
+mv ${DOWNLOAD_LOCATION}/camel-${VERSION}-cyclonedx.xml ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-sbom.xml
 ./sign.sh ${DOWNLOAD_LOCATION}/
 
-svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.json https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.json -m "Import Camel SBOMs JSON release"
-svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.json.asc https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.json.asc -m "Import Camel SBOMs JSON release"
-svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.json.sha512 https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.json.sha512 -m "Import Camel SBOMs JSON release"
-svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.xml https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.xml -m "Import Camel SBOMs XML release"
-svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.xml.asc https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.xml.asc -m "Import Camel SBOMs XML release"
-svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-cyclonedx.xml.sha512 https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-cyclonedx.xml.sha512 -m "Import Camel SBOMs XML release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-sbom.json https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-sbom.json -m "Import Camel SBOMs JSON release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-sbom.json.asc https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-sbom.json.asc -m "Import Camel SBOMs JSON release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-sbom.json.sha512 https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-sbom.json.sha512 -m "Import Camel SBOMs JSON release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-sbom.xml https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-sbom.xml -m "Import Camel SBOMs XML release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-sbom.xml.asc https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-sbom.xml.asc -m "Import Camel SBOMs XML release"
+svn import ${DOWNLOAD_LOCATION}/apache-camel-${VERSION}-sbom.xml.sha512 https://dist.apache.org/repos/dist/release/camel/apache-camel/${VERSION}/apache-camel-${VERSION}-sbom.xml.sha512 -m "Import Camel SBOMs XML release"
 echo "SBOM uploaded in dist/release"
 
 rm -rf ${DOWNLOAD_LOCATION}/