[Bug 65102] New: Build fails due to a lacking component

2021-01-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65102

Bug ID: 65102
   Summary: Build fails due to a lacking component
   Product: Tomcat 9
   Version: 9.0.41
  Hardware: PC
Status: NEW
  Severity: major
  Priority: P2
 Component: Catalina
  Assignee: dev@tomcat.apache.org
  Reporter: piotr.wyder...@aptitudesoftware.com
  Target Milestone: -

Hi, 

I have just downloaded Tomcat sources for the version 9.0.41. The build fails
-- the build.properties refer to commons-daemon-1.2.3, but your server and the
mirrors host only commons-daemon-1.2.4. Please restore the old commons file or
update the dependencies, whichever fits you best.

Best regards, Piotr

testexist:
 [echo] Testing  for
/root/tomcat-build-libs/commons-daemon-1.2.3/commons-daemon-1.2.3.jar

downloadgz-2:

setproxy:

trydownload.check:

trydownload:
  [get] Getting:
http://www.apache.org/dyn/closer.lua?action=download&filename=/commons/daemon/binaries/commons-daemon-1.2.3-bin.tar.gz
  [get] To: /root/tomcat-build-libs/download-1961091249.tar.gz
  [get]
http://www.apache.org/dyn/closer.lua?action=download&filename=/commons/daemon/binaries/commons-daemon-1.2.3-bin.tar.gz
moved to
https://apache.mirrors.tworzy.net//commons/daemon/binaries/commons-daemon-1.2.3-bin.tar.gz
  [get] Error opening connection java.io.FileNotFoundException:
https://apache.mirrors.tworzy.net//commons/daemon/binaries/commons-daemon-1.2.3-bin.tar.gz
  [get] Error opening connection java.io.FileNotFoundException:
https://apache.mirrors.tworzy.net//commons/daemon/binaries/commons-daemon-1.2.3-bin.tar.gz
  [get] Error opening connection java.io.FileNotFoundException:
https://apache.mirrors.tworzy.net//commons/daemon/binaries/commons-daemon-1.2.3-bin.tar.gz

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



Re: [tomcat] branch master updated: Ensure Windows signing uses sha256 hash

2021-01-25 Thread Christopher Schultz

Mark,

On 1/24/21 04:44, ma...@apache.org wrote:

This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/master by this push:
  new 7bb9eec  Ensure Windows signing uses sha256 hash
7bb9eec is described below

commit 7bb9eeced9522058796c3dfdc759e3f5eedb258d
Author: Mark Thomas 
AuthorDate: Sun Jan 24 09:42:06 2021 +

 Ensure Windows signing uses sha256 hash
---
  build.xml | 4 
  1 file changed, 4 insertions(+)

diff --git a/build.xml b/build.xml
index 32142c8..be0f1da 100644
--- a/build.xml
+++ b/build.xml
@@ -2575,6 +2575,8 @@ skip.installer property in build.properties" />



+  
+  


I see there is a /sha1 option on the command as well. Does that mean 
that SHA1 is also being performed? Is it required?


We abandoned SHA-1 (and SHA-256 for that matter) for the signatures we 
put on our web sites some time ago. Is it possible to use SHA-512 for 
these signatures as well?


-chris

-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 65102] Build fails due to a lacking component

2021-01-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65102

Christopher Schultz  changed:

   What|Removed |Added

 OS||All
  Component|Catalina|Packaging

--- Comment #1 from Christopher Schultz  ---
Where did you get your source distro?

If you edit build.properties.default and change the following line, you should
be able to build:

- commons-daemon.version=1.2.3
+ commons-daemon.version=1.2.4

If your build is validating the signatures, you will have to update those or
disable the signing.

The current git main branch looks good to me.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 65102] Build fails due to a lacking component

2021-01-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65102

Mark Thomas  changed:

   What|Removed |Added

 Resolution|--- |INVALID
 Status|NEW |RESOLVED

--- Comment #2 from Mark Thomas  ---
9.0.41 depends on 1.2.3. Since that has been replaced by 1.2.4 you need to
either:
- configure the build, in build.properties, to point to the 1.2.3 release
(available from the ASF archives or Maven Central)
- configure the build, in build.properties to use 1.2.4

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 65102] Build fails due to a lacking component

2021-01-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65102

--- Comment #3 from piotrw  ---
I took the source package from your official website:

https://downloads.apache.org/tomcat/tomcat-9/v9.0.41/src/apache-tomcat-9.0.41-src.tar.gz

together with the signature file:

https://downloads.apache.org/tomcat/tomcat-9/v9.0.41/src/apache-tomcat-9.0.41-src.tar.gz.sha512


I have independently verified earlier that the fix you suggested (1.2.4 bump +
signature hash update) is sufficient to restore compilability. However, to me
the problem is not a minor issue, as it derails my automated build pipelines.
Using my modified source package is technically possible, but it adds a lot of
security-related paperwork. I need to formally explain why we are not using the
official package issued by the vendor etc. So if you could please issue a fixed
source package, it would help me a lot.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 65102] Build fails due to a lacking component

2021-01-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65102

--- Comment #4 from Mark Thomas  ---
Sorry, not going to happen. ASF releases are immutable.

The release of Commons Daemon 1.2.4 (which removed 1.2.3 from the mirrors)
should have triggered the build process to download the file from archive. I'm
currently not sure why that isn't happening.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[Bug 65102] Build fails due to a lacking component

2021-01-25 Thread bugzilla
https://bz.apache.org/bugzilla/show_bug.cgi?id=65102

--- Comment #5 from Mark Thomas  ---
Looks like the http test in Ant's condition task (at least in 1.9.15) doesn't
behave they way the Tomcat build script expects it to when a URL first returns
a 302 and then a 404.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] michael-o commented on a change in pull request #401: Add support for unix domain sockets (APR Protocol)

2021-01-25 Thread GitBox


michael-o commented on a change in pull request #401:
URL: https://github.com/apache/tomcat/pull/401#discussion_r563890291



##
File path: java/org/apache/tomcat/util/net/AprEndpoint.java
##
@@ -287,6 +312,9 @@ public int getSendfileCount() {
 @Override
 public void bind() throws Exception {
 
+int family;
+String hostname = null;

Review comment:
   Why is this variable called `hostname`? The AF-agnostic name is 
`address`, isn't it?

##
File path: java/org/apache/tomcat/util/net/AprEndpoint.java
##
@@ -296,52 +324,88 @@ public void bind() throws Exception {
 
 // Create the pool for the server socket
 serverSockPool = Pool.create(rootPool);
+
 // Create the APR address that will be bound
-String addressStr = null;
-if (getAddress() != null) {
-addressStr = getAddress().getHostAddress();
-}
-int family = Socket.APR_INET;
-if (Library.APR_HAVE_IPV6) {
-if (addressStr == null) {
-if (!OS.IS_BSD) {
+if (getUnixDomainSocketPath() != null) {
+if (Library.APR_HAVE_UNIX) {
+hostname = getUnixDomainSocketPath();
+family = Socket.APR_UNIX;
+}
+else {
+throw new 
Exception(sm.getString("endpoint.init.unixnotavail"));
+}
+}
+else {
+
+if (getAddress() != null) {
+hostname = getAddress().getHostAddress();

Review comment:
   same here, address != hostname.

##
File path: test/org/apache/tomcat/jni/TestUnixDomainSocketServer.java
##
@@ -0,0 +1,240 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomcat.jni;
+
+import java.util.concurrent.CountDownLatch;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.Test;
+
+/*
+ * Tests for unix domain sockets.
+ *
+ * While System.nanotime() is available and may have a resolution of ~100ns on
+ * some platforms, those same platforms do not use as precise a timer for 
socket
+ * timeouts. Therefore, a much larger error margin (100ms) is used.
+ *
+ * It is known that this larger error margin is required for Windows 10. It may
+ * be worth revisiting the choice of error margin once that platform is no
+ * longer supported.
+ *
+ * @deprecated  The scope of the APR/Native Library will be reduced in Tomcat
+ *  10.1.x onwards to only those components required to provide
+ *  OpenSSL integration with the NIO and NIO2 connectors.
+ */
+@Deprecated
+public class TestUnixDomainSocketServer extends AbstractJniTest {
+
+   private static final String PATH = System.getProperty("java.io.tmpdir") 
+ System.getProperty("file.separator") + "tomcat.socket";
+// 100ms == 100,000,000ns
+private static final long ERROR_MARGIN = 1;
+
+private long pool = 0;
+private long serverSocket = 0;
+private long clientSocket = 0;
+
+@Before
+public void init() throws Exception {
+   Assume.assumeTrue(Library.APR_HAVE_UNIX);
+pool = Pool.create(0);

Review comment:
   Indentation is inconsistent.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] minfrin commented on a change in pull request #401: Add support for unix domain sockets (APR Protocol)

2021-01-25 Thread GitBox


minfrin commented on a change in pull request #401:
URL: https://github.com/apache/tomcat/pull/401#discussion_r564042386



##
File path: java/org/apache/tomcat/util/net/AprEndpoint.java
##
@@ -287,6 +312,9 @@ public int getSendfileCount() {
 @Override
 public void bind() throws Exception {
 
+int family;
+String hostname = null;

Review comment:
   The APR term is hostname:
   
   
http://apr.apache.org/docs/apr/1.7/group__apr__network__io.html#gaa2f399ca2b60b35c0abf7630298c6c9f
   
   So is the underlying getaddrinfo() function: 
https://en.wikipedia.org/wiki/Getaddrinfo 
   
   I can change it?





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] minfrin commented on a change in pull request #401: Add support for unix domain sockets (APR Protocol)

2021-01-25 Thread GitBox


minfrin commented on a change in pull request #401:
URL: https://github.com/apache/tomcat/pull/401#discussion_r564045870



##
File path: test/org/apache/tomcat/jni/TestUnixDomainSocketServer.java
##
@@ -0,0 +1,240 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomcat.jni;
+
+import java.util.concurrent.CountDownLatch;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.Test;
+
+/*
+ * Tests for unix domain sockets.
+ *
+ * While System.nanotime() is available and may have a resolution of ~100ns on
+ * some platforms, those same platforms do not use as precise a timer for 
socket
+ * timeouts. Therefore, a much larger error margin (100ms) is used.
+ *
+ * It is known that this larger error margin is required for Windows 10. It may
+ * be worth revisiting the choice of error margin once that platform is no
+ * longer supported.
+ *
+ * @deprecated  The scope of the APR/Native Library will be reduced in Tomcat
+ *  10.1.x onwards to only those components required to provide
+ *  OpenSSL integration with the NIO and NIO2 connectors.
+ */
+@Deprecated
+public class TestUnixDomainSocketServer extends AbstractJniTest {
+
+   private static final String PATH = System.getProperty("java.io.tmpdir") 
+ System.getProperty("file.separator") + "tomcat.socket";
+// 100ms == 100,000,000ns
+private static final long ERROR_MARGIN = 1;
+
+private long pool = 0;
+private long serverSocket = 0;
+private long clientSocket = 0;
+
+@Before
+public void init() throws Exception {
+   Assume.assumeTrue(Library.APR_HAVE_UNIX);
+pool = Pool.create(0);

Review comment:
   This is fixed.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] minfrin commented on a change in pull request #401: Add support for unix domain sockets (APR Protocol)

2021-01-25 Thread GitBox


minfrin commented on a change in pull request #401:
URL: https://github.com/apache/tomcat/pull/401#discussion_r564042386



##
File path: java/org/apache/tomcat/util/net/AprEndpoint.java
##
@@ -287,6 +312,9 @@ public int getSendfileCount() {
 @Override
 public void bind() throws Exception {
 
+int family;
+String hostname = null;

Review comment:
   The APR term is hostname:
   
   
http://apr.apache.org/docs/apr/1.7/group__apr__network__io.html#gaa2f399ca2b60b35c0abf7630298c6c9f
   
   So is the underlying getaddrinfo() function: 
https://en.wikipedia.org/wiki/Getaddrinfo 
   
   I can change it?

##
File path: test/org/apache/tomcat/jni/TestUnixDomainSocketServer.java
##
@@ -0,0 +1,240 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomcat.jni;
+
+import java.util.concurrent.CountDownLatch;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.Test;
+
+/*
+ * Tests for unix domain sockets.
+ *
+ * While System.nanotime() is available and may have a resolution of ~100ns on
+ * some platforms, those same platforms do not use as precise a timer for 
socket
+ * timeouts. Therefore, a much larger error margin (100ms) is used.
+ *
+ * It is known that this larger error margin is required for Windows 10. It may
+ * be worth revisiting the choice of error margin once that platform is no
+ * longer supported.
+ *
+ * @deprecated  The scope of the APR/Native Library will be reduced in Tomcat
+ *  10.1.x onwards to only those components required to provide
+ *  OpenSSL integration with the NIO and NIO2 connectors.
+ */
+@Deprecated
+public class TestUnixDomainSocketServer extends AbstractJniTest {
+
+   private static final String PATH = System.getProperty("java.io.tmpdir") 
+ System.getProperty("file.separator") + "tomcat.socket";
+// 100ms == 100,000,000ns
+private static final long ERROR_MARGIN = 1;
+
+private long pool = 0;
+private long serverSocket = 0;
+private long clientSocket = 0;
+
+@Before
+public void init() throws Exception {
+   Assume.assumeTrue(Library.APR_HAVE_UNIX);
+pool = Pool.create(0);

Review comment:
   This is fixed.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



[GitHub] [tomcat] michael-o commented on a change in pull request #401: Add support for unix domain sockets (APR Protocol)

2021-01-25 Thread GitBox


michael-o commented on a change in pull request #401:
URL: https://github.com/apache/tomcat/pull/401#discussion_r563890291



##
File path: java/org/apache/tomcat/util/net/AprEndpoint.java
##
@@ -287,6 +312,9 @@ public int getSendfileCount() {
 @Override
 public void bind() throws Exception {
 
+int family;
+String hostname = null;

Review comment:
   Why is this variable called `hostname`? The AF-agnostic name is 
`address`, isn't it?

##
File path: java/org/apache/tomcat/util/net/AprEndpoint.java
##
@@ -296,52 +324,88 @@ public void bind() throws Exception {
 
 // Create the pool for the server socket
 serverSockPool = Pool.create(rootPool);
+
 // Create the APR address that will be bound
-String addressStr = null;
-if (getAddress() != null) {
-addressStr = getAddress().getHostAddress();
-}
-int family = Socket.APR_INET;
-if (Library.APR_HAVE_IPV6) {
-if (addressStr == null) {
-if (!OS.IS_BSD) {
+if (getUnixDomainSocketPath() != null) {
+if (Library.APR_HAVE_UNIX) {
+hostname = getUnixDomainSocketPath();
+family = Socket.APR_UNIX;
+}
+else {
+throw new 
Exception(sm.getString("endpoint.init.unixnotavail"));
+}
+}
+else {
+
+if (getAddress() != null) {
+hostname = getAddress().getHostAddress();

Review comment:
   same here, address != hostname.

##
File path: test/org/apache/tomcat/jni/TestUnixDomainSocketServer.java
##
@@ -0,0 +1,240 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.tomcat.jni;
+
+import java.util.concurrent.CountDownLatch;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
+import org.junit.Test;
+
+/*
+ * Tests for unix domain sockets.
+ *
+ * While System.nanotime() is available and may have a resolution of ~100ns on
+ * some platforms, those same platforms do not use as precise a timer for 
socket
+ * timeouts. Therefore, a much larger error margin (100ms) is used.
+ *
+ * It is known that this larger error margin is required for Windows 10. It may
+ * be worth revisiting the choice of error margin once that platform is no
+ * longer supported.
+ *
+ * @deprecated  The scope of the APR/Native Library will be reduced in Tomcat
+ *  10.1.x onwards to only those components required to provide
+ *  OpenSSL integration with the NIO and NIO2 connectors.
+ */
+@Deprecated
+public class TestUnixDomainSocketServer extends AbstractJniTest {
+
+   private static final String PATH = System.getProperty("java.io.tmpdir") 
+ System.getProperty("file.separator") + "tomcat.socket";
+// 100ms == 100,000,000ns
+private static final long ERROR_MARGIN = 1;
+
+private long pool = 0;
+private long serverSocket = 0;
+private long clientSocket = 0;
+
+@Before
+public void init() throws Exception {
+   Assume.assumeTrue(Library.APR_HAVE_UNIX);
+pool = Pool.create(0);

Review comment:
   Indentation is inconsistent.





This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org