Discussion:
RFR: Fix typo when translating characters in $USER.
Severin Gehwolf
2014-10-16 10:58:10 UTC
Permalink
Hi,

I've noticed that when I do a build of OpenJDK 9 hs-comp forest then the
generated build ID eats the "w" from my local username. Reproducer bash
snippet:

(USER=xwwwx; a=$(echo $USER | tr -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'); if [ "$a" == "xx" ]; then echo BAD; else echo GOOD; fi)

It should print GOOD, but prints BAD.

As it turns out there is a typo in common/autoconf/jdk-options.m4

webrev is here:
https://jerboaa.fedorapeople.org/bugs/openjdk/JDK-UNKNOWN-build-dev/webrev.00/

Could someone please sponsor this change for me?

Since I work for Red Hat the OCA has been signed.

Thanks,
Severin
Erik Joelsson
2014-10-16 14:52:52 UTC
Permalink
Hello Severin,

Thank you for the bugfix. It does indeed look like a typo. I can sponsor
the change for you. However, to satisfy legal requirements, you will
need to send the patch directly to us. Since it's small, you can just
paste it in a mail to the mailing list and it will be fine.

/Erik
Post by Severin Gehwolf
Hi,
I've noticed that when I do a build of OpenJDK 9 hs-comp forest then the
generated build ID eats the "w" from my local username. Reproducer bash
(USER=xwwwx; a=$(echo $USER | tr -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'); if [ "$a" == "xx" ]; then echo BAD; else echo GOOD; fi)
It should print GOOD, but prints BAD.
As it turns out there is a typo in common/autoconf/jdk-options.m4
https://jerboaa.fedorapeople.org/bugs/openjdk/JDK-UNKNOWN-build-dev/webrev.00/
Could someone please sponsor this change for me?
Since I work for Red Hat the OCA has been signed.
Thanks,
Severin
Severin Gehwolf
2014-10-16 15:04:01 UTC
Permalink
Hi Erik,
Post by Erik Joelsson
Hello Severin,
Thank you for the bugfix. It does indeed look like a typo. I can sponsor
the change for you. However, to satisfy legal requirements, you will
need to send the patch directly to us. Since it's small, you can just
paste it in a mail to the mailing list and it will be fine.
Sure, patch is attached and in the email body for reference:

diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4
--- a/common/autoconf/jdk-options.m4
+++ b/common/autoconf/jdk-options.m4
@@ -528,7 +528,7 @@
if test "x$USER_RELEASE_SUFFIX" = x; then
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
# Avoid [:alnum:] since it depends on the locale.
- CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
+ CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
fi

Thanks,
Severin
Post by Erik Joelsson
/Erik
Post by Severin Gehwolf
Hi,
I've noticed that when I do a build of OpenJDK 9 hs-comp forest then the
generated build ID eats the "w" from my local username. Reproducer bash
(USER=xwwwx; a=$(echo $USER | tr -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'); if [ "$a" == "xx" ]; then echo BAD; else echo GOOD; fi)
It should print GOOD, but prints BAD.
As it turns out there is a typo in common/autoconf/jdk-options.m4
https://jerboaa.fedorapeople.org/bugs/openjdk/JDK-UNKNOWN-build-dev/webrev.00/
Could someone please sponsor this change for me?
Since I work for Red Hat the OCA has been signed.
Thanks,
Severin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: typo_jdk-options.m4.patch
Type: text/x-patch
Size: 692 bytes
Desc: not available
URL: <http://mail.openjdk.java.net/pipermail/build-dev/attachments/20141016/5a991e68/typo_jdk-options.m4.patch>
Erik Joelsson
2014-10-17 08:16:23 UTC
Permalink
The change is now pushed to jdk9. Thanks!

/Erik
Post by Severin Gehwolf
Hi Erik,
Post by Erik Joelsson
Hello Severin,
Thank you for the bugfix. It does indeed look like a typo. I can sponsor
the change for you. However, to satisfy legal requirements, you will
need to send the patch directly to us. Since it's small, you can just
paste it in a mail to the mailing list and it will be fine.
diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4
--- a/common/autoconf/jdk-options.m4
+++ b/common/autoconf/jdk-options.m4
@@ -528,7 +528,7 @@
if test "x$USER_RELEASE_SUFFIX" = x; then
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
# Avoid [:alnum:] since it depends on the locale.
- CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
+ CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
fi
Thanks,
Severin
Post by Erik Joelsson
/Erik
Post by Severin Gehwolf
Hi,
I've noticed that when I do a build of OpenJDK 9 hs-comp forest then the
generated build ID eats the "w" from my local username. Reproducer bash
(USER=xwwwx; a=$(echo $USER | tr -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'); if [ "$a" == "xx" ]; then echo BAD; else echo GOOD; fi)
It should print GOOD, but prints BAD.
As it turns out there is a typo in common/autoconf/jdk-options.m4
https://jerboaa.fedorapeople.org/bugs/openjdk/JDK-UNKNOWN-build-dev/webrev.00/
Could someone please sponsor this change for me?
Since I work for Red Hat the OCA has been signed.
Thanks,
Severin
Severin Gehwolf
2014-10-17 08:56:46 UTC
Permalink
Post by Erik Joelsson
The change is now pushed to jdk9. Thanks!
/Erik
Thank you, Erik!

Cheers,
Severin
Post by Erik Joelsson
Post by Severin Gehwolf
Hi Erik,
Post by Erik Joelsson
Hello Severin,
Thank you for the bugfix. It does indeed look like a typo. I can sponsor
the change for you. However, to satisfy legal requirements, you will
need to send the patch directly to us. Since it's small, you can just
paste it in a mail to the mailing list and it will be fine.
diff --git a/common/autoconf/jdk-options.m4 b/common/autoconf/jdk-options.m4
--- a/common/autoconf/jdk-options.m4
+++ b/common/autoconf/jdk-options.m4
@@ -528,7 +528,7 @@
if test "x$USER_RELEASE_SUFFIX" = x; then
BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
# Avoid [:alnum:] since it depends on the locale.
- CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
+ CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
fi
fi
Thanks,
Severin
Post by Erik Joelsson
/Erik
Post by Severin Gehwolf
Hi,
I've noticed that when I do a build of OpenJDK 9 hs-comp forest then the
generated build ID eats the "w" from my local username. Reproducer bash
(USER=xwwwx; a=$(echo $USER | tr -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'); if [ "$a" == "xx" ]; then echo BAD; else echo GOOD; fi)
It should print GOOD, but prints BAD.
As it turns out there is a typo in common/autoconf/jdk-options.m4
https://jerboaa.fedorapeople.org/bugs/openjdk/JDK-UNKNOWN-build-dev/webrev.00/
Could someone please sponsor this change for me?
Since I work for Red Hat the OCA has been signed.
Thanks,
Severin
Loading...