Activity log for bug #2015234

Date Who What changed Old value New value Message
2023-04-04 12:46:32 Dirk Zimoch bug added bug
2023-04-04 12:52:34 Dirk Zimoch description After merging the current EPICS 7.0 branch into my PSI branch, I got a generated epicsVCS.h header file with invalid syntax on RHEL7 (but not on RHEL8): #ifndef EPICS_VCS_VERSION_DATE #define EPICS_VCS_VERSION_DATE "Git: 2023-03-29 13:36:52 +0200 " Note the newline withing the string. I tracked that down to a strange behavior of git show in git version 1.8.3.1 as installed by default on RHEL7: When the current commit is a merge, then the output of 'git show -s --format=%ci' (as used by genVersionHeader.pl) shows an extra newline! Piping it to hexdump show the issue: $git co 7.0 git show -s --format=%ci | hexdump -C 00000000 32 30 32 33 2d 30 33 2d 31 30 20 31 32 3a 30 32 |2023-03-10 12:02| 00000010 3a 32 39 20 2b 30 30 30 30 0a |:29 +0000.| 0000001a Just as it should be. Now check out a merge commit: $git co e63184e [...] HEAD is now at e63184e... Merge PR #63, longout.OOPT $ git show -s --format=%ci | hexdump -C 00000000 32 30 32 32 2d 31 32 2d 32 39 20 31 36 3a 33 31 |2022-12-29 16:31| 00000010 3a 34 32 20 2d 30 36 30 30 0a 0a |:42 -0600..| 0000001b Note the extra 0a! This extra newline gets pasted into epicsVCS.h. BTW: Git version 2.31.1 as installed by default on RHEL8 does not show this bug. Of course one could blame the problem on the old git version, but I think just to be on the save side, it would be better to remove all terminating newlines (and returns, maybe all whitespace) and not only the last one, as perl seems to do. After merging the current EPICS 7.0 branch into my PSI branch, I got a generated epicsVCS.h header file with invalid syntax on RHEL7 (but not on RHEL8): #ifndef EPICS_VCS_VERSION_DATE   #define EPICS_VCS_VERSION_DATE "Git: 2023-03-29 13:36:52 +0200 " Note the newline withing the string. I tracked that down to a strange behavior of git show in git version 1.8.3.1 as installed by default on RHEL7: When the current commit is a merge, then the output of 'git show -s --format=%ci' (as used by genVersionHeader.pl) shows an extra newline! Piping it to hexdump show the issue: $git co 7.0 git show -s --format=%ci | hexdump -C 00000000 32 30 32 33 2d 30 33 2d 31 30 20 31 32 3a 30 32 |2023-03-10 12:02| 00000010 3a 32 39 20 2b 30 30 30 30 0a |:29 +0000.| 0000001a Just as it should be. Now check out a merge commit: $git co e63184e [...] HEAD is now at e63184e... Merge PR #63, longout.OOPT $ git show -s --format=%ci | hexdump -C 00000000 32 30 32 32 2d 31 32 2d 32 39 20 31 36 3a 33 31 |2022-12-29 16:31| 00000010 3a 34 32 20 2d 30 36 30 30 0a 0a |:42 -0600..| 0000001b Note the extra 0a! This extra newline gets pasted into epicsVCS.h. BTW: Git version 2.31.1 as installed by default on RHEL8 does not show this bug. Of course one could blame the problem on the old git version, but I think just to be on the safe side, it would be better to remove all terminating newlines (and returns, maybe all whitespace) and not only the last one, as perl seems to do.
2023-04-04 12:58:06 Dirk Zimoch description After merging the current EPICS 7.0 branch into my PSI branch, I got a generated epicsVCS.h header file with invalid syntax on RHEL7 (but not on RHEL8): #ifndef EPICS_VCS_VERSION_DATE   #define EPICS_VCS_VERSION_DATE "Git: 2023-03-29 13:36:52 +0200 " Note the newline withing the string. I tracked that down to a strange behavior of git show in git version 1.8.3.1 as installed by default on RHEL7: When the current commit is a merge, then the output of 'git show -s --format=%ci' (as used by genVersionHeader.pl) shows an extra newline! Piping it to hexdump show the issue: $git co 7.0 git show -s --format=%ci | hexdump -C 00000000 32 30 32 33 2d 30 33 2d 31 30 20 31 32 3a 30 32 |2023-03-10 12:02| 00000010 3a 32 39 20 2b 30 30 30 30 0a |:29 +0000.| 0000001a Just as it should be. Now check out a merge commit: $git co e63184e [...] HEAD is now at e63184e... Merge PR #63, longout.OOPT $ git show -s --format=%ci | hexdump -C 00000000 32 30 32 32 2d 31 32 2d 32 39 20 31 36 3a 33 31 |2022-12-29 16:31| 00000010 3a 34 32 20 2d 30 36 30 30 0a 0a |:42 -0600..| 0000001b Note the extra 0a! This extra newline gets pasted into epicsVCS.h. BTW: Git version 2.31.1 as installed by default on RHEL8 does not show this bug. Of course one could blame the problem on the old git version, but I think just to be on the safe side, it would be better to remove all terminating newlines (and returns, maybe all whitespace) and not only the last one, as perl seems to do. After merging the current EPICS 7.0 branch into my PSI branch, I got a generated epicsVCS.h header file with invalid syntax on RHEL7 (but not on RHEL8): #ifndef EPICS_VCS_VERSION_DATE   #define EPICS_VCS_VERSION_DATE "Git: 2023-03-29 13:36:52 +0200 " Note the newline within the string. I tracked that down to a strange behavior of git show in git version 1.8.3.1 as installed by default on RHEL7: Whenever the current commit is a merge, then the output of 'git show -s --format=%ci' (as used by genVersionHeader.pl) shows an extra newline! Piping it to hexdump show the issue: $git co 7.0 git show -s --format=%ci | hexdump -C 00000000 32 30 32 33 2d 30 33 2d 31 30 20 31 32 3a 30 32 |2023-03-10 12:02| 00000010 3a 32 39 20 2b 30 30 30 30 0a |:29 +0000.| 0000001a Just as it should be. Now check out a merge commit: $git co e63184e [...] HEAD is now at e63184e... Merge PR #63, longout.OOPT $ git show -s --format=%ci | hexdump -C 00000000 32 30 32 32 2d 31 32 2d 32 39 20 31 36 3a 33 31 |2022-12-29 16:31| 00000010 3a 34 32 20 2d 30 36 30 30 0a 0a |:42 -0600..| 0000001b Note the extra 0a! This extra newline gets pasted into epicsVCS.h. BTW: Git version 2.31.1 as installed by default on RHEL8 does not show this bug. Of course one could blame the problem on the old git version, but I think just to be on the safe side, it would be better to remove all terminating newlines (and returns, maybe all whitespace) and not only the last one, as perl seems to do.
2023-04-05 07:23:21 Dirk Zimoch attachment added genVersionHeader.patch https://bugs.launchpad.net/epics-base/+bug/2015234/+attachment/5661142/+files/genVersionHeader.patch