From 37a4ca2b33cde831126d7c731031ba34ced673e1 Mon Sep 17 00:00:00 2001 From: Andrew Hughes Date: Fri, 29 Mar 2019 05:32:30 +0000 Subject: [PATCH] Sync SystemTap & desktop files with upstream IcedTea release using new script --- .gitignore | 1 + icedtea_sync.sh | 104 ++++++++++++++++++++++++++++++++++++++++ java-1.8.0-openjdk.spec | 28 +++++++---- jconsole.desktop.in | 8 ++-- policytool.desktop.in | 8 ++-- sources | 2 +- update_systemtap.sh | 32 ------------- 7 files changed, 132 insertions(+), 51 deletions(-) create mode 100755 icedtea_sync.sh delete mode 100644 update_systemtap.sh diff --git a/.gitignore b/.gitignore index 0644610..3807c60 100644 --- a/.gitignore +++ b/.gitignore @@ -131,3 +131,4 @@ /aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u191-b14.tar.xz /aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u192-b12.tar.xz /aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u201-b09.tar.xz +/tapsets-icedtea-3.11.0.tar.xz diff --git a/icedtea_sync.sh b/icedtea_sync.sh new file mode 100755 index 0000000..a9d5881 --- /dev/null +++ b/icedtea_sync.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +# Copyright (C) 2019 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 . + +ICEDTEA_VERSION=3.11.0 +ICEDTEA_URL=https://icedtea.classpath.org/download/source +ICEDTEA_SIGNING_KEY=CFDA0F9B35964222 + +set -e + +if test "x${WGET}" = "x"; then + WGET=$(which wget); + if test "x${WGET}" = "x"; then + echo "wget not found"; + exit 1; + fi +fi + +if test "x${CHECKSUM}" = "x"; then + CHECKSUM=$(which sha256sum) + if test "x${CHECKSUM}" = "x"; then + echo "sha256sum not found"; + exit 2; + fi +fi + +if test "x${PGP}" = "x"; then + PGP=$(which gpg) + if test "x${PGP}" = "x"; then + echo "gpg not found"; + exit 3; + fi +fi + +if test "x${TAR}" = "x"; then + TAR=$(which tar) + if test "x${TAR}" = "x"; then + echo "tar not found"; + exit 4; + fi +fi + +echo "Dependencies:"; +echo -e "\tWGET: ${WGET}"; +echo -e "\tCHECKSUM: ${CHECKSUM}"; +echo -e "\tPGP: ${PGP}\n"; +echo -e "\tTAR: ${TAR}\n"; + +echo "Checking for IcedTea signing key ${ICEDTEA_SIGNING_KEY}..."; +if ! gpg --list-keys ${ICEDTEA_SIGNING_KEY}; then + echo "IcedTea signing key ${ICEDTEA_SIGNING_KEY} not installed."; + exit 5; +fi + +echo "Downloading IcedTea release tarball..."; +${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.tar.xz +echo "Downloading IcedTea tarball signature..."; +${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.tar.xz.sig +echo "Downloading IcedTea tarball checksums..."; +${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.sha256 + +echo "Verifying checksums..."; +${CHECKSUM} --check --ignore-missing icedtea-${ICEDTEA_VERSION}.sha256 + +echo "Checking signature..."; +${PGP} --verify icedtea-${ICEDTEA_VERSION}.tar.xz.sig + +echo "Extracting files..."; +${TAR} xJf icedtea-${ICEDTEA_VERSION}.tar.xz \ + icedtea-${ICEDTEA_VERSION}/tapset \ + icedtea-${ICEDTEA_VERSION}/jconsole.desktop.in \ + icedtea-${ICEDTEA_VERSION}/policytool.desktop.in + +echo "Replacing desktop files..."; +mv -v icedtea-${ICEDTEA_VERSION}/jconsole.desktop.in . +mv -v icedtea-${ICEDTEA_VERSION}/policytool.desktop.in . + +echo "Adding temporary fix to policytool.desktop (PR3718)"; +sed -i 's#Development#Settings#' policytool.desktop.in +echo "Adding temporary fix to policytool.desktop (PR3719)"; +sed -i 's#_BINDIR_#_JREBINDIR_#' policytool.desktop.in + +echo "Creating new tapset tarball..."; +mv -v icedtea-${ICEDTEA_VERSION} openjdk +${TAR} cJf tapsets-icedtea-${ICEDTEA_VERSION}.tar.xz openjdk + +rm -rvf openjdk +rm -vf icedtea-${ICEDTEA_VERSION}.tar.xz +rm -vf icedtea-${ICEDTEA_VERSION}.tar.xz.sig +rm -vf icedtea-${ICEDTEA_VERSION}.sha256 diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec index 1a4d599..5a98f9c 100644 --- a/java-1.8.0-openjdk.spec +++ b/java-1.8.0-openjdk.spec @@ -231,6 +231,8 @@ %global project %{shenandoah_project} %global repo %{shenandoah_repo} %global revision %{shenandoah_revision} +# Define IcedTea version used for SystemTap tapsets and desktop files +%global icedteaver 3.11.0 # eg # jdk8u60-b27 -> jdk8u60 or # aarch64-jdk8u60-b27 -> aarch64-jdk8u60 (dont forget spec escape % by %%) %global whole_update %(VERSION=%{revision}; echo ${VERSION%%-*}) @@ -979,7 +981,7 @@ Provides: java-%{javaver}-%{origin}-accessibility = %{epoch}:%{version}-%{releas Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever}.%{buildver} -Release: 7%{?dist} +Release: 8%{?dist} # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -1019,10 +1021,10 @@ Source0: %{shenandoah_project}-%{shenandoah_repo}-%{shenandoah_revision}.tar.xz # Custom README for -src subpackage Source2: README.md - -# run update_systemtap.sh to regenerate or update systemtap sources -# update_package.sh contains hard-coded repos, revisions, tags, and projects to regenerate the source archives -Source8: systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz +# Use 'icedtea_sync.sh' to update the following +# They are based on code contained in the IcedTea project (3.x). +# Systemtap tapsets. Zipped up to keep it small. +Source8: tapsets-icedtea-%{icedteaver}.tar.xz # Desktop files. Adapted from IcedTea Source9: jconsole.desktop.in @@ -1694,7 +1696,7 @@ cp -r tapset tapset%{debug_suffix} for suffix in %{build_loop} ; do for file in "tapset"$suffix/*.in; do - OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g"` + OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:-%{version}-%{release}.%{_arch}.stp:g"` sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/jre/lib/%{archinstall}/server/libjvm.so:g" $file > $file.1 # TODO find out which architectures other than i686 have a client vm %ifarch %{ix86} @@ -1711,16 +1713,19 @@ done %endif # Prepare desktop files +# The _X_ syntax indicates variables that are replaced by make upstream +# The @X@ syntax indicates variables that are replaced by configure upstream for suffix in %{build_loop} ; do for file in %{SOURCE9} %{SOURCE10} ; do FILE=`basename $file | sed -e s:\.in$::g` EXT="${FILE##*.}" NAME="${FILE%.*}" OUTPUT_FILE=$NAME$suffix.$EXT - sed -e "s:@JAVA_HOME@:%{sdkbindir -- $suffix}:g" $file > $OUTPUT_FILE - sed -i -e "s:@JRE_HOME@:%{jrebindir -- $suffix}:g" $OUTPUT_FILE - sed -i -e "s:@ARCH@:%{version}-%{release}.%{_arch}$suffix:g" $OUTPUT_FILE - sed -i -e "s:@JAVA_MAJOR_VERSION@:%{javaver}:g" $OUTPUT_FILE + sed -e "s:_BINDIR_:%{sdkbindir -- $suffix}:g" $file > $OUTPUT_FILE + sed -i -e "s:_JREBINDIR_:%{jrebindir -- $suffix}:g" $OUTPUT_FILE + sed -i -e "s:@target_cpu@:%{version}-%{release}.%{_arch}$suffix:g" $OUTPUT_FILE + sed -i -e "s:@OPENJDK_VER@:%{javaver}:g" $OUTPUT_FILE + sed -i -e "s:@JAVA_VER@:%{javaver}:g" $OUTPUT_FILE sed -i -e "s:@JAVA_VENDOR@:%{origin}:g" $OUTPUT_FILE done done @@ -2332,6 +2337,9 @@ require "copy_jdk_configs.lua" %endif %changelog +* Fri Mar 29 2019 Andrew John Hughes - 1:1.8.0.201.b09-8 +- Sync SystemTap & desktop files with upstream IcedTea release using new script + * Wed Mar 20 2019 Peter Robinson 1:1.8.0.201.b09-7 - Drop chkconfig dep, 1.7 shipped in f24 diff --git a/jconsole.desktop.in b/jconsole.desktop.in index a8917c1..b88bd7c 100644 --- a/jconsole.desktop.in +++ b/jconsole.desktop.in @@ -1,8 +1,8 @@ [Desktop Entry] -Name=OpenJDK @JAVA_MAJOR_VERSION@ Monitoring & Management Console @ARCH@ -Comment=Monitor and manage OpenJDK @JAVA_MAJOR_VERSION@ applications for @ARCH@ -Exec=@JAVA_HOME@/jconsole -Icon=java-@JAVA_MAJOR_VERSION@-@JAVA_VENDOR@ +Name=OpenJDK @OPENJDK_VER@ for @target_cpu@ Monitoring & Management Console +Comment=Monitor and manage OpenJDK applications +Exec=_BINDIR_/jconsole +Icon=java-@JAVA_VER@-@JAVA_VENDOR@ Terminal=false Type=Application StartupWMClass=sun-tools-jconsole-JConsole diff --git a/policytool.desktop.in b/policytool.desktop.in index e38c0ec..112a24f 100644 --- a/policytool.desktop.in +++ b/policytool.desktop.in @@ -1,8 +1,8 @@ [Desktop Entry] -Name=OpenJDK @JAVA_MAJOR_VERSION@ Policy Tool @ARCH@ -Comment=Manage OpenJDK @JAVA_MAJOR_VERSION@ policy files @ARCH@ -Exec=@JRE_HOME@/policytool -Icon=java-@JAVA_MAJOR_VERSION@-@JAVA_VENDOR@ +Name=OpenJDK @OPENJDK_VER@ for @target_cpu@ Policy Tool +Comment=Manage OpenJDK policy files +Exec=_JREBINDIR_/policytool +Icon=java-@JAVA_VER@-@JAVA_VENDOR@ Terminal=false Type=Application StartupWMClass=sun-security-tools-PolicyTool diff --git a/sources b/sources index f3790e8..f2b1c0c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz) = cf578221b77d8c7e019f69909bc86c419c5fb5e10bceba9592ff6e7f96887b0a7f07c9cefe90800975247a078785ca190fdec5c2d0f841bb447cee784b570f7d +SHA512 (tapsets-icedtea-3.11.0.tar.xz) = f98420b2f9d7a0fc0af3a7e6a817c4330169db9378d9c38db56b0dd8281a3f1ff7747b4da0c66194695ca85a470b7963902d863d301e5e290dbfe11f6b6f2b5e SHA512 (aarch64-port-jdk8u-shenandoah-aarch64-shenandoah-jdk8u201-b09.tar.xz) = dc132d100488aa4f8a98baeb7aeba13820e62c96062a6ef7f9b69269a1a928bf1dec05b8f0e6aa40177a1f3d60ae15bbb94e7be46293b9c555893d03747fbf82 diff --git a/update_systemtap.sh b/update_systemtap.sh deleted file mode 100644 index 1a3e3c8..0000000 --- a/update_systemtap.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -x -# this file contains defaults for currently generated source tarball of systemtap - -set -e - -# TAPSET -export PROJECT_NAME="hg" -export REPO_NAME="icedtea8" -export VERSION="9d464368e06d" -export COMPRESSION=xz -export OPENJDK_URL=http://icedtea.classpath.org -export FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION} -export TO_COMPRESS="*/tapset" -# warning, filename and filenameroot creation is duplicated here from generate_source_tarball.sh -CLONED_FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION} -TAPSET_VERSION=3.2 -TAPSET=systemtap_"$TAPSET_VERSION"_tapsets_$CLONED_FILENAME -if [ ! -f ${TAPSET} ] ; then - if [ ! -f ${CLONED_FILENAME} ] ; then - echo "Generating ${CLONED_FILENAME}" - sh ./generate_singlerepo_source_tarball.sh - else - echo "exists exists exists exists exists exists exists " - echo "reusing reusing reusing reusing reusing reusing " - echo ${CLONED_FILENAME} - fi - mv -v $CLONED_FILENAME $TAPSET -else - echo "exists exists exists exists exists exists exists " - echo "reusing reusing reusing reusing reusing reusing " - echo ${TAPSET} -fi