diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index 26cfb46..a750e20 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -2535,6 +2535,7 @@ cjc.mainProgram(args) * Mon Oct 07 2024 Andrew Hughes - 1:21.0.4.0.7-2 - Vary portablesuffix depending on whether we are on RHEL ('el8') or CentOS ('el9') - Handle debugedit being a separate package installed in /usr on RHEL/CentOS 10 +- Add build scripts to repository to ease remembering all CentOS & RHEL targets and options - Related: RHEL-58797 * Fri Jul 12 2024 Andrew Hughes - 1:21.0.4.0.7-1 diff --git a/scripts/builds/build_centos.sh b/scripts/builds/build_centos.sh new file mode 100644 index 0000000..5625b93 --- /dev/null +++ b/scripts/builds/build_centos.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# Copyright (C) 2024 Red Hat, Inc. +# Written by: +# Andrew John Hughes +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# Builds the RPM on CentOS 9 or 10 + +centpkg -v build + +# Local Variables: +# compile-command: "shellcheck build_centos.sh" +# fill-column: 80 +# indent-tabs-mode: nil +# sh-basic-offset: 4 +# End: diff --git a/scripts/builds/build_centos_portable_build.sh b/scripts/builds/build_centos_portable_build.sh new file mode 100644 index 0000000..41eb62f --- /dev/null +++ b/scripts/builds/build_centos_portable_build.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# Copyright (C) 2024 Red Hat, Inc. +# Written by: +# Andrew John Hughes +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# Builds the portable on CentOS + +centpkg -v build --target java-openjdk-portable-build --rhel-target none + +# Local Variables: +# compile-command: "shellcheck build_centos_portable_build.sh" +# fill-column: 80 +# indent-tabs-mode: nil +# sh-basic-offset: 4 +# End: diff --git a/scripts/builds/build_rhel_10.sh b/scripts/builds/build_rhel_10.sh new file mode 100644 index 0000000..2e52c28 --- /dev/null +++ b/scripts/builds/build_rhel_10.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# Copyright (C) 2024 Red Hat, Inc. +# Written by: +# Andrew John Hughes +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# Builds the RPM on RHEL 10 + +NVR=${1} +USER=${2} + +if test "${NVR}" = ""; then + echo "${0} "; + exit 1; +fi + +if test "${USER}" = ""; then + echo "${0} "; + exit 2; +fi + +METADATA="{\"osci\": {\"upstream_nvr\": \"${NVR}\", \"upstream_owner_name\": \"${USER}\"}, \"rhel-target\": \"latest\"}" +rhpkg -v build --target=java-openjdk-rhel-10-build --custom-user-metadata "${METADATA}" + +# Local Variables: +# compile-command: "shellcheck build_rhel_10.sh" +# fill-column: 80 +# indent-tabs-mode: nil +# sh-basic-offset: 4 +# End: diff --git a/scripts/builds/build_rhel_7_portable_build.sh b/scripts/builds/build_rhel_7_portable_build.sh new file mode 100644 index 0000000..0cf02d0 --- /dev/null +++ b/scripts/builds/build_rhel_7_portable_build.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# Copyright (C) 2024 Red Hat, Inc. +# Written by: +# Andrew John Hughes +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# Builds the portable on RHEL 7 + +rhpkg -v build --target=java-openjdk-rhel-7-build --skip-nvr-check + +# Local Variables: +# compile-command: "shellcheck build_rhel_7_portable_build.sh" +# fill-column: 80 +# indent-tabs-mode: nil +# sh-basic-offset: 4 +# End: diff --git a/scripts/builds/build_rhel_8.sh b/scripts/builds/build_rhel_8.sh new file mode 100644 index 0000000..c1ea948 --- /dev/null +++ b/scripts/builds/build_rhel_8.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# Copyright (C) 2024 Red Hat, Inc. +# Written by: +# Andrew John Hughes +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# Builds the RPM on RHEL 8 + +NVR=${1} +USER=${2} + +if test "${NVR}" = ""; then + echo "${0} "; + exit 1; +fi + +if test "${USER}" = ""; then + echo "${0} "; + exit 2; +fi + +METADATA="{\"osci\": {\"upstream_nvr\": \"${NVR}\", \"upstream_owner_name\": \"${USER}\"}, \"rhel-target\": \"latest\"}" +rhpkg -v build --target=java-openjdk-rhel-8-build --custom-user-metadata "${METADATA}" + +# Local Variables: +# compile-command: "shellcheck build_rhel_8.sh" +# fill-column: 80 +# indent-tabs-mode: nil +# sh-basic-offset: 4 +# End: diff --git a/scripts/builds/build_rhel_9.sh b/scripts/builds/build_rhel_9.sh new file mode 100644 index 0000000..a39e35f --- /dev/null +++ b/scripts/builds/build_rhel_9.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# Copyright (C) 2024 Red Hat, Inc. +# Written by: +# Andrew John Hughes +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# Builds the RPM on RHEL 9 + +NVR=${1} +USER=${2} + +if test "${NVR}" = ""; then + echo "${0} "; + exit 1; +fi + +if test "${USER}" = ""; then + echo "${0} "; + exit 2; +fi + +METADATA="{\"osci\": {\"upstream_nvr\": \"${NVR}\", \"upstream_owner_name\": \"${USER}\"}, \"rhel-target\": \"latest\"}" +rhpkg -v build --target=java-openjdk-rhel-9-build --custom-user-metadata "${METADATA}" + +# Local Variables: +# compile-command: "shellcheck build_rhel_9.sh" +# fill-column: 80 +# indent-tabs-mode: nil +# sh-basic-offset: 4 +# End: diff --git a/scripts/builds/build_rhel_portable_build.sh b/scripts/builds/build_rhel_portable_build.sh new file mode 100644 index 0000000..3fd6a22 --- /dev/null +++ b/scripts/builds/build_rhel_portable_build.sh @@ -0,0 +1,29 @@ +#!/bin/sh + +# Copyright (C) 2024 Red Hat, Inc. +# Written by: +# Andrew John Hughes +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# Builds the portable on RHEL 8 + +rhpkg -v build --target=java-openjdk-rhel-8-build --skip-nvr-check + +# Local Variables: +# compile-command: "shellcheck build_rhel_portable_build.sh" +# fill-column: 80 +# indent-tabs-mode: nil +# sh-basic-offset: 4 +# End: diff --git a/scripts/builds/build_vanilla.sh b/scripts/builds/build_vanilla.sh new file mode 100644 index 0000000..c4f67f7 --- /dev/null +++ b/scripts/builds/build_vanilla.sh @@ -0,0 +1,43 @@ +#!/bin/sh + +# Copyright (C) 2024 Red Hat, Inc. +# Written by: +# Andrew John Hughes +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +# Builds a scratch build of vanilla OpenJDK with no local patches + +SEPARATE_ARCHES=${1} +CMD="--target java-openjdk-rhel-8-build --skip-nvr-check --nowait"; +SUPPORTED_ARCHES="aarch64 ppc64le s390x x86_64"; + +if [ "x${SEPARATE_ARCHES}" = "x" ] ; then + SEPARATE_ARCHES=0; +fi + +if [ ${SEPARATE_ARCHES} -eq 1 ] ; then + for arch in ${SUPPORTED_ARCHES}; do \ + rhpkg -v build --arches ${arch} --scratch ${CMD} ; \ + done && brew watch-task --mine +else + rhpkg -v build ${CMD} && brew watch-task --mine +fi + +# Local Variables: +# compile-command: "shellcheck build_vanilla.sh" +# fill-column: 80 +# indent-tabs-mode: nil +# sh-basic-offset: 4 +# End: