From noloader at gmail.com Wed Feb 23 16:33:47 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Wed, 23 Feb 2022 10:33:47 -0500 Subject: Testing libexpat, error: 'NAN' was not declared in this scope Message-ID: Hi Everyone, I'm trying to compile libexpat 2.4.5 on SOlaris 11.4. It has that antique GCC 4.8.2. The build is failing: $ make check -k ... /bin/g++ -DHAVE_CONFIG_H -I. -I.. -DXML_ENABLE_VISIBILITY=1 -I./../lib -I/opt/ssh/incl ude -DNDEBUG -Wall -fexceptions -fno-strict-aliasing -g2 -O2 -m64 -march=native -fPIC -pthread -MT runtestspp.o -MD -MP -MF .deps/runtestspp.Tpo -c -o runtestspp.o runtestspp .cpp In file included from runtestspp.cpp:36:0: runtests.c: In function 'void test_billion_laughs_attack_protection_api()': runtests.c:11712:32: error: 'NAN' was not declared in this scope parserWithoutParent, NAN) ^ runtests.c:11734:32: error: 'INFINITY' was not declared in this scope parserWithoutParent, INFINITY) ^ *** Error code 1 I've included but the defines/symbols are still missing. I also included headers mentioned at https://docs.oracle.com/cd/E19957-01/806-3568/ncg_lib.html. I'm out of ideas. Does anyone know what to include to get those symbols? Jeff From jira at team-1624933012059.atlassian.net Wed Feb 23 16:36:43 2022 From: jira at team-1624933012059.atlassian.net (cin) Date: Wed, 23 Feb 2022 15:36:43 +0000 (UTC) Subject: CIN-2789 Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: References: Message-ID: ?-?-?-? Reply above this line. Just confirming that we got your request. We're on it. View request: https://team-1624933012059.atlassian.net/servicedesk/customer/portal/1/CIN-2789?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJxc2giOiI1ZmYwNTE2OTA2M2VlYWE5OTEzYTUzNzMwM2E5MDUxMTZiMzFhMDAzM2YxOTA2OTRkNTRhZTA3NjZjYjU0YjM2IiwiaXNzIjoic2VydmljZWRlc2stand0LXRva2VuLWlzc3VlciIsImNvbnRleHQiOnsidXNlciI6IjEwMDk3IiwiaXNzdWUiOiJDSU4tMjc4OSJ9LCJleHAiOjE2NDgwNDk4MDIsImlhdCI6MTY0NTYzMDYwMn0.ZgVz7agq04L0KCoUo3w1gBxt8AyNQA9o8dIvds3eFNc&sda_source=notification-email Turn off this request's notifications: https://team-1624933012059.atlassian.net/servicedesk/customer/portal/1/CIN-2789/unsubscribe?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJxc2giOiIyYTk5MjU1OTU0ZmNiNDM4ODAzOThkNTViM2U4NjM3NjE4NmU5MTQ2OGJkNjc4YTU4ZjQ2OGEwNDk2ZjAxZWIxIiwiaXNzIjoic2VydmljZWRlc2stand0LXRva2VuLWlzc3VlciIsImNvbnRleHQiOnsidXNlciI6InFtOjcxYjM0YjNkLTIwZDQtNGFiNy04YTRhLTQ4YTkzZTVkMjMzNjpkNTc4OTQzZS1hOGZiLTRjYjItOTU5NC0zMzE5OGUzYTcwMDAiLCJpc3N1ZSI6IkNJTi0yNzg5In0sImV4cCI6MTY0ODA0OTgwMiwiaWF0IjoxNjQ1NjMwNjAyfQ.88y5bGqFS6iCW4y3KJn9NWzeOa3dIOjoiv58OKh8EyQ This is shared with users at lists.opencsw.org ------------------------------ Powered by Jira Service Management https://www.atlassian.com/software/jira/service-desk/powered-by?utm_medium=jira-in-product&utm_source=jira_service_desk_email_footer&utm_content=team-1624933012059 -------------- next part -------------- An HTML attachment was scrubbed... URL: From ihsan at opencsw.org Thu Feb 24 20:59:12 2022 From: ihsan at opencsw.org (=?utf-8?B?xLBoc2FuIERvxJ9hbg==?=) Date: Thu, 24 Feb 2022 20:59:12 +0100 Subject: CIN-2789 Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: References: Message-ID: <5DFEE47D-0B90-48CB-9937-0E98203862EA@opencsw.org> I?ve blocked this address on the mail server. It shouldn?t annoy us anymore. Regards Ihsan > Am 23.02.2022 um 16:36 schrieb cin via users : > > ?-?-?-? > Reply above this line. > Just confirming that we got your request. We're on it. > > View request ? Turn off this request's notifications > This is shared with users at lists.opencsw.org. > > Powered by Jira Service Management -------------- next part -------------- An HTML attachment was scrubbed... URL: From ihsan at opencsw.org Thu Feb 24 21:08:14 2022 From: ihsan at opencsw.org (=?utf-8?B?xLBoc2FuIERvxJ9hbg==?=) Date: Thu, 24 Feb 2022 21:08:14 +0100 Subject: Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: References: Message-ID: Hi, > Am 23.02.2022 um 16:33 schrieb Jeffrey Walton via users : > > I'm trying to compile libexpat 2.4.5 on SOlaris 11.4. It has that > antique GCC 4.8.2. The build is failing: > > $ make check -k > ... > /bin/g++ -DHAVE_CONFIG_H -I. -I.. -DXML_ENABLE_VISIBILITY=1 > -I./../lib -I/opt/ssh/incl > ude -DNDEBUG -Wall -fexceptions -fno-strict-aliasing -g2 -O2 -m64 > -march=native -fPIC > -pthread -MT runtestspp.o -MD -MP -MF .deps/runtestspp.Tpo -c -o > runtestspp.o runtestspp > .cpp > In file included from runtestspp.cpp:36:0: > runtests.c: In function 'void test_billion_laughs_attack_protection_api()': > runtests.c:11712:32: error: 'NAN' was not declared in this scope > parserWithoutParent, NAN) > ^ > runtests.c:11734:32: error: 'INFINITY' was not declared in this scope > parserWithoutParent, INFINITY) > ^ > *** Error code 1 > > I've included but the defines/symbols are still missing. I > also included headers mentioned at > https://docs.oracle.com/cd/E19957-01/806-3568/ncg_lib.html. I'm out of > ideas. > > Does anyone know what to include to get those symbols? I?m not an expert here, but you use our build recipe to build it on Solaris 11: https://sourceforge.net/p/gar/code/HEAD/tree/csw/mgar/pkg/libexpat1/trunk/Makefile#l4 But also in our case, ?make test? fails, but the build seems to be fine. Besides we have an up to date libexpat package in our repository. ? https://www.opencsw.org/packages/CSWlibexpat1/ Regards Ihsan -------------- next part -------------- An HTML attachment was scrubbed... URL: From noloader at gmail.com Thu Feb 24 21:08:53 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Thu, 24 Feb 2022 15:08:53 -0500 Subject: Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: References: Message-ID: On Wed, Feb 23, 2022 at 10:33 AM Jeffrey Walton wrote: > > I'm trying to compile libexpat 2.4.5 on SOlaris 11.4. It has that > antique GCC 4.8.2. The build is failing: > > $ make check -k > ... > /bin/g++ -DHAVE_CONFIG_H -I. -I.. -DXML_ENABLE_VISIBILITY=1 > -I./../lib -I/opt/ssh/incl > ude -DNDEBUG -Wall -fexceptions -fno-strict-aliasing -g2 -O2 -m64 > -march=native -fPIC > -pthread -MT runtestspp.o -MD -MP -MF .deps/runtestspp.Tpo -c -o > runtestspp.o runtestspp > .cpp > In file included from runtestspp.cpp:36:0: > runtests.c: In function 'void test_billion_laughs_attack_protection_api()': > runtests.c:11712:32: error: 'NAN' was not declared in this scope > parserWithoutParent, NAN) > ^ > runtests.c:11734:32: error: 'INFINITY' was not declared in this scope > parserWithoutParent, INFINITY) > ^ > *** Error code 1 > > I've included but the defines/symbols are still missing. I > also included headers mentioned at > https://docs.oracle.com/cd/E19957-01/806-3568/ncg_lib.html. I'm out of > ideas. > > Does anyone know what to include to get those symbols? Sebastian checked in a fix for this. See https://github.com/libexpat/libexpat/issues/569. I did not realize the portable way to get INFINITY and NAN is strtof("infinity", NULL) and strtof("nan", NULL), respectively. Jeff From ihsan at opencsw.org Thu Feb 24 21:13:44 2022 From: ihsan at opencsw.org (=?utf-8?B?xLBoc2FuIERvxJ9hbg==?=) Date: Thu, 24 Feb 2022 21:13:44 +0100 Subject: Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: References: Message-ID: <1092EEC5-6D28-49BF-AC0D-F5DC85FC68BE@opencsw.org> Hi Jeffrey, > Am 24.02.2022 um 21:08 schrieb Jeffrey Walton via users : >> >> I'm trying to compile libexpat 2.4.5 on SOlaris 11.4. It has that >> antique GCC 4.8.2. The build is failing: >> >> $ make check -k >> ... >> /bin/g++ -DHAVE_CONFIG_H -I. -I.. -DXML_ENABLE_VISIBILITY=1 >> -I./../lib -I/opt/ssh/incl >> ude -DNDEBUG -Wall -fexceptions -fno-strict-aliasing -g2 -O2 -m64 >> -march=native -fPIC >> -pthread -MT runtestspp.o -MD -MP -MF .deps/runtestspp.Tpo -c -o >> runtestspp.o runtestspp >> .cpp >> In file included from runtestspp.cpp:36:0: >> runtests.c: In function 'void test_billion_laughs_attack_protection_api()': >> runtests.c:11712:32: error: 'NAN' was not declared in this scope >> parserWithoutParent, NAN) >> ^ >> runtests.c:11734:32: error: 'INFINITY' was not declared in this scope >> parserWithoutParent, INFINITY) >> ^ >> *** Error code 1 >> >> I've included but the defines/symbols are still missing. I >> also included headers mentioned at >> https://docs.oracle.com/cd/E19957-01/806-3568/ncg_lib.html. I'm out of >> ideas. >> >> Does anyone know what to include to get those symbols? > > Sebastian checked in a fix for this. See > https://github.com/libexpat/libexpat/issues/569. > > I did not realize the portable way to get INFINITY and NAN is > strtof("infinity", NULL) and strtof("nan", NULL), respectively. Did this patch fix your issue? Regards Ihsan From noloader at gmail.com Thu Feb 24 21:13:58 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Thu, 24 Feb 2022 15:13:58 -0500 Subject: Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: References: Message-ID: On Thu, Feb 24, 2022 at 3:08 PM ?hsan Do?an wrote: > > Am 23.02.2022 um 16:33 schrieb Jeffrey Walton via users : > > I'm trying to compile libexpat 2.4.5 on SOlaris 11.4. It has that > antique GCC 4.8.2. The build is failing: > > $ make check -k > ... > /bin/g++ -DHAVE_CONFIG_H -I. -I.. -DXML_ENABLE_VISIBILITY=1 > -I./../lib -I/opt/ssh/incl > ude -DNDEBUG -Wall -fexceptions -fno-strict-aliasing -g2 -O2 -m64 > -march=native -fPIC > -pthread -MT runtestspp.o -MD -MP -MF .deps/runtestspp.Tpo -c -o > runtestspp.o runtestspp > .cpp > In file included from runtestspp.cpp:36:0: > runtests.c: In function 'void test_billion_laughs_attack_protection_api()': > runtests.c:11712:32: error: 'NAN' was not declared in this scope > parserWithoutParent, NAN) > ^ > runtests.c:11734:32: error: 'INFINITY' was not declared in this scope > parserWithoutParent, INFINITY) > ^ > *** Error code 1 > > I've included but the defines/symbols are still missing. I > also included headers mentioned at > https://docs.oracle.com/cd/E19957-01/806-3568/ncg_lib.html. I'm out of > ideas. > > Does anyone know what to include to get those symbols? > > > I?m not an expert here, but you use our build recipe to build it on Solaris 11: > https://sourceforge.net/p/gar/code/HEAD/tree/csw/mgar/pkg/libexpat1/trunk/Makefile#l4 > > But also in our case, ?make test? fails, but the build seems to be fine. > > Besides we have an up to date libexpat package in our repository. ? > https://www.opencsw.org/packages/CSWlibexpat1/ Thanks Ihsan, It looks like OpenCSW can bump libexpat to 2.4.5. Current OpenCSW version is 2.4.4. `make check` builds and executes Ok for me on i86pc amd64 using this patch: https://github.com/noloader/Build-Scripts/blob/master/patch/expat.patch. I'll check a Sparc machine later today through the Compile Farm. Jeff From noloader at gmail.com Thu Feb 24 21:15:01 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Thu, 24 Feb 2022 15:15:01 -0500 Subject: Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: <1092EEC5-6D28-49BF-AC0D-F5DC85FC68BE@opencsw.org> References: <1092EEC5-6D28-49BF-AC0D-F5DC85FC68BE@opencsw.org> Message-ID: On Thu, Feb 24, 2022 at 3:13 PM ?hsan Do?an wrote: > > > Am 24.02.2022 um 21:08 schrieb Jeffrey Walton via users : > >> > >> I'm trying to compile libexpat 2.4.5 on SOlaris 11.4. It has that > >> antique GCC 4.8.2. The build is failing: > >> > >> $ make check -k > >> ... > >> /bin/g++ -DHAVE_CONFIG_H -I. -I.. -DXML_ENABLE_VISIBILITY=1 > >> -I./../lib -I/opt/ssh/incl > >> ude -DNDEBUG -Wall -fexceptions -fno-strict-aliasing -g2 -O2 -m64 > >> -march=native -fPIC > >> -pthread -MT runtestspp.o -MD -MP -MF .deps/runtestspp.Tpo -c -o > >> runtestspp.o runtestspp > >> .cpp > >> In file included from runtestspp.cpp:36:0: > >> runtests.c: In function 'void test_billion_laughs_attack_protection_api()': > >> runtests.c:11712:32: error: 'NAN' was not declared in this scope > >> parserWithoutParent, NAN) > >> ^ > >> runtests.c:11734:32: error: 'INFINITY' was not declared in this scope > >> parserWithoutParent, INFINITY) > >> ^ > >> *** Error code 1 > >> > >> I've included but the defines/symbols are still missing. I > >> also included headers mentioned at > >> https://docs.oracle.com/cd/E19957-01/806-3568/ncg_lib.html. I'm out of > >> ideas. > >> > >> Does anyone know what to include to get those symbols? > > > > Sebastian checked in a fix for this. See > > https://github.com/libexpat/libexpat/issues/569. > > > > I did not realize the portable way to get INFINITY and NAN is > > strtof("infinity", NULL) and strtof("nan", NULL), respectively. > > Did this patch fix your issue? Yes, here's what you want: https://github.com/noloader/Build-Scripts/blob/master/patch/expat.patch. But it is against libexpat 2.4.5, not OpenCSW's 2.4.4. Jeff From ihsan at opencsw.org Thu Feb 24 21:17:34 2022 From: ihsan at opencsw.org (=?utf-8?B?xLBoc2FuIERvxJ9hbg==?=) Date: Thu, 24 Feb 2022 21:17:34 +0100 Subject: Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: References: Message-ID: <09A11EA5-93AA-4926-8B84-C177949CCD7D@opencsw.org> Hi Jeffrey, > Am 24.02.2022 um 21:13 schrieb Jeffrey Walton : > >> Besides we have an up to date libexpat package in our repository. ? >> https://www.opencsw.org/packages/CSWlibexpat1/ > > Thanks Ihsan, > > It looks like OpenCSW can bump libexpat to 2.4.5. Current OpenCSW > version is 2.4.4. We have 2.4.6. I?ve pushed it to the catalog an hour ago. It takes a while till the web site is updated. Regards Ihsan From ihsan at opencsw.org Thu Feb 24 21:19:24 2022 From: ihsan at opencsw.org (=?utf-8?B?xLBoc2FuIERvxJ9hbg==?=) Date: Thu, 24 Feb 2022 21:19:24 +0100 Subject: Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: References: <1092EEC5-6D28-49BF-AC0D-F5DC85FC68BE@opencsw.org> Message-ID: Hi Jeffrey, > Am 24.02.2022 um 21:15 schrieb Jeffrey Walton : > >>> >>> Sebastian checked in a fix for this. See >>> https://github.com/libexpat/libexpat/issues/569. >>> >>> I did not realize the portable way to get INFINITY and NAN is >>> strtof("infinity", NULL) and strtof("nan", NULL), respectively. >> >> Did this patch fix your issue? > > Yes, here's what you want: > https://github.com/noloader/Build-Scripts/blob/master/patch/expat.patch. > > But it is against libexpat 2.4.5, not OpenCSW's 2.4.4. Do you know by chance, if 2.4.6 includes the fix? Regads, Ihsan From noloader at gmail.com Thu Feb 24 21:19:46 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Thu, 24 Feb 2022 15:19:46 -0500 Subject: Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: <09A11EA5-93AA-4926-8B84-C177949CCD7D@opencsw.org> References: <09A11EA5-93AA-4926-8B84-C177949CCD7D@opencsw.org> Message-ID: On Thu, Feb 24, 2022 at 3:17 PM ?hsan Do?an wrote: > > Hi Jeffrey, > > > Am 24.02.2022 um 21:13 schrieb Jeffrey Walton : > > > >> Besides we have an up to date libexpat package in our repository. ? > >> https://www.opencsw.org/packages/CSWlibexpat1/ > > > > Thanks Ihsan, > > > > It looks like OpenCSW can bump libexpat to 2.4.5. Current OpenCSW > > version is 2.4.4. > > We have 2.4.6. I?ve pushed it to the catalog an hour ago. It takes a while till the web site is updated. Oh, I missed 2.4.6 (4 days ago). I found 2.4.5 (6 days ago). Thanks for the heads up. Jeff From noloader at gmail.com Thu Feb 24 21:21:01 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Thu, 24 Feb 2022 15:21:01 -0500 Subject: Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: References: <1092EEC5-6D28-49BF-AC0D-F5DC85FC68BE@opencsw.org> Message-ID: On Thu, Feb 24, 2022 at 3:19 PM ?hsan Do?an wrote: > > > Am 24.02.2022 um 21:15 schrieb Jeffrey Walton : > > > >>> > >>> Sebastian checked in a fix for this. See > >>> https://github.com/libexpat/libexpat/issues/569. > >>> > >>> I did not realize the portable way to get INFINITY and NAN is > >>> strtof("infinity", NULL) and strtof("nan", NULL), respectively. > >> > >> Did this patch fix your issue? > > > > Yes, here's what you want: > > https://github.com/noloader/Build-Scripts/blob/master/patch/expat.patch. > > > > But it is against libexpat 2.4.5, not OpenCSW's 2.4.4. > > Do you know by chance, if 2.4.6 includes the fix? 2.4.6 will not. 2.4.6 was released 6 days ago. The bug was reported 1 day ago. The patch may apply dirty. Give me 30 minutes and I'll update the patch from 2.4.5 to 2.4.6. Jeff From noloader at gmail.com Thu Feb 24 21:33:14 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Thu, 24 Feb 2022 15:33:14 -0500 Subject: Testing libexpat, error: 'NAN' was not declared in this scope In-Reply-To: References: <1092EEC5-6D28-49BF-AC0D-F5DC85FC68BE@opencsw.org> Message-ID: On Thu, Feb 24, 2022 at 3:21 PM Jeffrey Walton wrote: > > On Thu, Feb 24, 2022 at 3:19 PM ?hsan Do?an wrote: > > > > > Am 24.02.2022 um 21:15 schrieb Jeffrey Walton : > > > > > >>> > > >>> Sebastian checked in a fix for this. See > > >>> https://github.com/libexpat/libexpat/issues/569. > > >>> > > >>> I did not realize the portable way to get INFINITY and NAN is > > >>> strtof("infinity", NULL) and strtof("nan", NULL), respectively. > > >> > > >> Did this patch fix your issue? > > > > > > Yes, here's what you want: > > > https://github.com/noloader/Build-Scripts/blob/master/patch/expat.patch. > > > > > > But it is against libexpat 2.4.5, not OpenCSW's 2.4.4. > > > > Do you know by chance, if 2.4.6 includes the fix? > > 2.4.6 will not. 2.4.6 was released 6 days ago. The bug was reported 1 day ago. > > The patch may apply dirty. > > Give me 30 minutes and I'll update the patch from 2.4.5 to 2.4.6. Ok, the patch against 2.4.6 is available at https://github.com/noloader/Build-Scripts/blob/master/patch/expat.patch. And libexpat 2.4.6 tested Ok on Solaris i86pc amd64. Jeff From noloader at gmail.com Fri Feb 25 12:38:17 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Fri, 25 Feb 2022 06:38:17 -0500 Subject: libexpat and XML_POOR_ENTROPY Message-ID: Hi Everyone, I was looking at the libexpat recipe again. This kind of jumps out from https://sourceforge.net/p/gar/code/HEAD/tree/csw/mgar/pkg/libexpat1/trunk/Makefile#l42: # No high-entropy random in old Solaris versions EXTRA_CPPFLAGS += -DXML_POOR_ENTROPY Solaris has /dev/urandom. It meets requirements. As far as I know, even the earlier versions of the device were sufficient for cryptographic needs. It may be time to revisit that define. My apologies if I am missing something. Jeff From bwalton at opencsw.org Fri Feb 25 16:51:53 2022 From: bwalton at opencsw.org (Ben Walton) Date: Fri, 25 Feb 2022 15:51:53 +0000 Subject: libexpat and XML_POOR_ENTROPY In-Reply-To: References: Message-ID: On Fri 25 Feb 2022, 11:39 Jeffrey Walton via users, wrote: > Hi Everyone, > > I was looking at the libexpat recipe again. This kind of jumps out > from > https://sourceforge.net/p/gar/code/HEAD/tree/csw/mgar/pkg/libexpat1/trunk/Makefile#l42 > : > > # No high-entropy random in old Solaris versions > EXTRA_CPPFLAGS += -DXML_POOR_ENTROPY > > Solaris has /dev/urandom. It meets requirements. As far as I know, > even the earlier versions of the device were sufficient for > cryptographic needs. It may be time to revisit that define. > Yeah, I'd drop it and see that it passes the test suite. Not sure how far back you'd need to go os and hardware worse to still need it, but arms pretty ancient to me. > My apologies if I am missing something. > > Jeff > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ihsan at opencsw.org Fri Feb 25 20:45:34 2022 From: ihsan at opencsw.org (=?utf-8?B?xLBoc2FuIERvxJ9hbg==?=) Date: Fri, 25 Feb 2022 20:45:34 +0100 Subject: libexpat and XML_POOR_ENTROPY In-Reply-To: References: Message-ID: <83B055CB-FEAC-4E51-9DF5-9B88BB98599A@opencsw.org> Hi, > Am 25.02.2022 um 16:51 schrieb Ben Walton via users : > > I was looking at the libexpat recipe again. This kind of jumps out > from https://sourceforge.net/p/gar/code/HEAD/tree/csw/mgar/pkg/libexpat1/trunk/Makefile#l42 : > > # No high-entropy random in old Solaris versions > EXTRA_CPPFLAGS += -DXML_POOR_ENTROPY > > Solaris has /dev/urandom. It meets requirements. As far as I know, > even the earlier versions of the device were sufficient for > cryptographic needs. It may be time to revisit that define. > > Yeah, I'd drop it and see that it passes the test suite. Not sure how far back you'd need to go os and hardware worse to still need it, but arms pretty ancient to me. I guess it would make sense to remove this option from the build recipe, right? -Ihsan -------------- next part -------------- An HTML attachment was scrubbed... URL: From dam at opencsw.org Fri Feb 25 23:48:08 2022 From: dam at opencsw.org (Dagobert Michelsen) Date: Fri, 25 Feb 2022 23:48:08 +0100 Subject: libexpat and XML_POOR_ENTROPY In-Reply-To: <83B055CB-FEAC-4E51-9DF5-9B88BB98599A@opencsw.org> References: <83B055CB-FEAC-4E51-9DF5-9B88BB98599A@opencsw.org> Message-ID: Hi Ihsan, Am 25.02.2022 um 20:45 schrieb ?hsan Do?an via users : >> Am 25.02.2022 um 16:51 schrieb Ben Walton via users : >> >> I was looking at the libexpat recipe again. This kind of jumps out >> from https://sourceforge.net/p/gar/code/HEAD/tree/csw/mgar/pkg/libexpat1/trunk/Makefile#l42: >> >> # No high-entropy random in old Solaris versions >> EXTRA_CPPFLAGS += -DXML_POOR_ENTROPY >> >> Solaris has /dev/urandom. It meets requirements. As far as I know, >> even the earlier versions of the device were sufficient for >> cryptographic needs. It may be time to revisit that define. >> >> Yeah, I'd drop it and see that it passes the test suite. Not sure how far back you'd need to go os and hardware worse to still need it, but arms pretty ancient to me. > > I guess it would make sense to remove this option from the build recipe, right? Looks like I added it. From my comments above I think there was not code in libexpat to detect the proper entropy source at that time. Feel free to ditch it if the testsuite passes. Best regards ? Dago -- "You don't become great by trying to be great, you become great by wanting to do something, and then doing it so hard that you become great in the process." - xkcd #896 From noloader at gmail.com Sat Feb 26 20:14:02 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Sat, 26 Feb 2022 14:14:02 -0500 Subject: libexpat and XML_POOR_ENTROPY In-Reply-To: References: Message-ID: On Fri, Feb 25, 2022 at 10:52 AM Ben Walton wrote: > > On Fri 25 Feb 2022, 11:39 Jeffrey Walton via users, wrote: >> >> Hi Everyone, >> >> I was looking at the libexpat recipe again. This kind of jumps out >> from https://sourceforge.net/p/gar/code/HEAD/tree/csw/mgar/pkg/libexpat1/trunk/Makefile#l42: >> >> # No high-entropy random in old Solaris versions >> EXTRA_CPPFLAGS += -DXML_POOR_ENTROPY >> >> Solaris has /dev/urandom. It meets requirements. As far as I know, >> even the earlier versions of the device were sufficient for >> cryptographic needs. It may be time to revisit that define. > > Yeah, I'd drop it and see that it passes the test suite. Not sure how far back you'd need to go os and hardware worse to still need it, but arms pretty ancient to me. Here's some more reading on XML_POOR_ENTROPY: https://github.com/libexpat/libexpat/issues/172. It looks like libexpat needs a good random source for some hash tables. Or more specifically, to avoid collisions due to a poor entropy source. If the entropy source produces collisions, then it is considered poor. I personally think this problem should probably be addressed differently. Instead of asking users to evaluate their entropy source, I think libexpat should obtain a uniform distribution via something like operating system random source + SipHash. SipHash should produce a uniform distribution and it only requires entropy once to key the algorithm. It does not need a constant stream of bytes. Getting back to libexpat, it looks like /dev/urandom is sufficient nowadays. Also see https://github.com/libexpat/libexpat/blob/master/expat/lib/xmlparse.c#L122. You would get into trouble if the /dev/urandom device was missing. Jeff From noloader at gmail.com Sat Feb 26 20:22:24 2022 From: noloader at gmail.com (Jeffrey Walton) Date: Sat, 26 Feb 2022 14:22:24 -0500 Subject: libexpat and XML_POOR_ENTROPY In-Reply-To: References: Message-ID: On Sat, Feb 26, 2022 at 2:14 PM Jeffrey Walton wrote: > > On Fri, Feb 25, 2022 at 10:52 AM Ben Walton wrote: > > > > On Fri 25 Feb 2022, 11:39 Jeffrey Walton via users, wrote: > >> > >> I was looking at the libexpat recipe again. This kind of jumps out > >> from https://sourceforge.net/p/gar/code/HEAD/tree/csw/mgar/pkg/libexpat1/trunk/Makefile#l42: > >> > >> # No high-entropy random in old Solaris versions > >> EXTRA_CPPFLAGS += -DXML_POOR_ENTROPY > >> > >> Solaris has /dev/urandom. It meets requirements. As far as I know, > >> even the earlier versions of the device were sufficient for > >> cryptographic needs. It may be time to revisit that define. > > > > Yeah, I'd drop it and see that it passes the test suite. Not sure how far back you'd need to go os and hardware worse to still need it, but arms pretty ancient to me. > > Here's some more reading on XML_POOR_ENTROPY: > https://github.com/libexpat/libexpat/issues/172. > > It looks like libexpat needs a good random source for some hash > tables. Or more specifically, to avoid collisions due to a poor > entropy source. If the entropy source produces collisions, then it is > considered poor. > > I personally think this problem should probably be addressed > differently. Instead of asking users to evaluate their entropy source, > I think libexpat should obtain a uniform distribution via something > like operating system random source + SipHash. SipHash should produce > a uniform distribution and it only requires entropy once to key the > algorithm. It does not need a constant stream of bytes. > > Getting back to libexpat, it looks like /dev/urandom is sufficient > nowadays. Also see > https://github.com/libexpat/libexpat/blob/master/expat/lib/xmlparse.c#L122. > You would get into trouble if the /dev/urandom device was missing. Ok, here's the missing piece. According to https://docs.oracle.com/cd/E88353_01/html/E37851/urandom-4d.html , /dev/random and /dev/urandom was added at Solaris 9 with a patch for Solaris 8. I'm not sure how that affects the define. Does OpenCSW support Solaris 7 and below? Jeff From bwalton at opencsw.org Sat Feb 26 21:41:32 2022 From: bwalton at opencsw.org (Ben Walton) Date: Sat, 26 Feb 2022 20:41:32 +0000 Subject: libexpat and XML_POOR_ENTROPY In-Reply-To: References: Message-ID: No, ideally we should target 10+ these days as 9 is out of support. But even building for 9+ should be fine here. On Sat 26 Feb 2022, 19:22 Jeffrey Walton, wrote: > On Sat, Feb 26, 2022 at 2:14 PM Jeffrey Walton wrote: > > > > On Fri, Feb 25, 2022 at 10:52 AM Ben Walton wrote: > > > > > > On Fri 25 Feb 2022, 11:39 Jeffrey Walton via users, < > users at lists.opencsw.org> wrote: > > >> > > >> I was looking at the libexpat recipe again. This kind of jumps out > > >> from > https://sourceforge.net/p/gar/code/HEAD/tree/csw/mgar/pkg/libexpat1/trunk/Makefile#l42 > : > > >> > > >> # No high-entropy random in old Solaris versions > > >> EXTRA_CPPFLAGS += -DXML_POOR_ENTROPY > > >> > > >> Solaris has /dev/urandom. It meets requirements. As far as I know, > > >> even the earlier versions of the device were sufficient for > > >> cryptographic needs. It may be time to revisit that define. > > > > > > Yeah, I'd drop it and see that it passes the test suite. Not sure how > far back you'd need to go os and hardware worse to still need it, but arms > pretty ancient to me. > > > > Here's some more reading on XML_POOR_ENTROPY: > > https://github.com/libexpat/libexpat/issues/172. > > > > It looks like libexpat needs a good random source for some hash > > tables. Or more specifically, to avoid collisions due to a poor > > entropy source. If the entropy source produces collisions, then it is > > considered poor. > > > > I personally think this problem should probably be addressed > > differently. Instead of asking users to evaluate their entropy source, > > I think libexpat should obtain a uniform distribution via something > > like operating system random source + SipHash. SipHash should produce > > a uniform distribution and it only requires entropy once to key the > > algorithm. It does not need a constant stream of bytes. > > > > Getting back to libexpat, it looks like /dev/urandom is sufficient > > nowadays. Also see > > > https://github.com/libexpat/libexpat/blob/master/expat/lib/xmlparse.c#L122 > . > > You would get into trouble if the /dev/urandom device was missing. > > Ok, here's the missing piece. According to > https://docs.oracle.com/cd/E88353_01/html/E37851/urandom-4d.html , > /dev/random and /dev/urandom was added at Solaris 9 with a patch for > Solaris 8. > > I'm not sure how that affects the define. Does OpenCSW support Solaris > 7 and below? > > Jeff > -------------- next part -------------- An HTML attachment was scrubbed... URL: