#14 Fix hook to show hs_err*.log files on failures.
Merged 5 years ago by jvanek. Opened 5 years ago by jerboaa.
rpms/ jerboaa/java-1.8.0-openjdk master  into  master

file modified
+8 -2
@@ -955,7 +955,7 @@ 

  

  Name:    java-%{javaver}-%{origin}

  Version: %{javaver}.%{updatever}

- Release: 13.%{buildver}%{?dist}

+ Release: 14.%{buildver}%{?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
@@ -1713,6 +1713,9 @@ 

    debugbuild=`echo $suffix  | sed "s/-//g"`

  fi

  

+ # Variable used in hs_err hook on build failures

+ top_dir_abs_path=$(pwd)/%{top_level_dir_name}

+ 

  mkdir -p %{buildoutputdir -- $suffix}

  pushd %{buildoutputdir -- $suffix}

  
@@ -1761,7 +1764,7 @@ 

      POST_STRIP_CMD="" \

      LOG=trace \

      SCTP_WERROR= \

-     %{targets} || ( find -name "hs_err_pid*.log" | xargs cat && false )

+     %{targets} || ( pwd; find $top_dir_abs_path -name "hs_err_pid*.log" | xargs cat && false )

  

  make zip-docs

  
@@ -2266,6 +2269,9 @@ 

  %endif

  

  %changelog

+ * Tue Jul 10 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:1.8.0.172-14.b11

+ - Fix hook to show hs_err*.log files on failures.

+ 

  * Mon Jul 02 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:1.8.0.172-13.b11

  - Fix requires/provides filters for internal libs. See

    RHBZ#1590796

There has been another spurious failure on aarch64:
https://koji.fedoraproject.org/koji/getfile?taskID=28094195&volume=DEFAULT&name=build.log&offset=-4000

Specifically:

# An error report file with more information is saved as:
# /builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.172-13.b11.fc29.aarch64/openjdk/corba/make/hs_err_pid17471.log

We've got the hs_err hook in place but it seems the CWD is
openjdk/build/jdk8.build{,-debug}. Then the hs_err file is at path openjdk/make/hs_err_pid17471.log.
So find on the current working directory and below, won't find it. It's 2 levels up in the tree.

This should fix it. Thoughts?

The ../../.... Maybe dangerous. The top-level path can be saved to variable more above in spec file, and then reuse instead pwd. WDYT?

Sure. I'll change that.

Here is the ../.. Jiri is referring to :)

rebased onto 2d03e5b

5 years ago

From the latest scratch build I see this in the logs:

 + top_dir_abs_path=/builddir/build/BUILD/java-1.8.0-openjdk-1.8.0.172-14.b11.fc29.x86_64/openjdk

That looks correct to me to use as a base path in find.

Pull-Request has been merged by jvanek

5 years ago