Skip to content

Commit 4ce174d

Browse files
Upgrade apache-commons-net to 3.11.0 and fix build error (#15005)
1 parent 85a07a8 commit 4ce174d

5 files changed

Lines changed: 33 additions & 18 deletions

File tree

SPECS-EXTENDED/apache-commons-net/apache-commons-net-build.xml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<property name="project.groupId" value="commons-net"/>
1212
<property name="project.artifactId" value="commons-net"/>
13-
<property name="project.version" value="3.6"/>
13+
<property name="project.version" value="3.11.0"/>
1414
<property name="project.name" value="Apache Commons Net"/>
1515
<property name="project.description" value="Apache Commons Net library contains a collection of network utilities and protocol implementations. Supported protocols include: Echo, Finger, FTP, NNTP, NTP, POP3(S), SMTP(S), Telnet, Whois"/>
1616
<property name="project.url" value="http://commons.apache.org/proper/commons-net/"/>
@@ -19,12 +19,12 @@
1919
<property name="project.organization.name" value="The Apache Software Foundation"/>
2020
<property name="project.organization.id" value="org.apache"/>
2121

22-
<property name="bundle.version" value="${project.version}.0"/>
23-
24-
<property name="compiler.source" value="1.6"/>
22+
<property name="spec.version" value="3.11"/>
23+
24+
<property name="compiler.source" value="1.8"/>
2525
<property name="compiler.target" value="${compiler.source}"/>
2626

27-
<property name="build.finalName" value="${project.artifactId}-3.6"/>
27+
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
2828
<property name="build.dir" value="target"/>
2929
<property name="build.outputDir" value="${build.dir}/classes"/>
3030
<property name="build.srcDir" value="src/main/java"/>
@@ -235,23 +235,23 @@
235235
<attribute name="Bundle-Name" value="${project.name}"/>
236236
<attribute name="Bundle-SymbolicName" value="org.apache.commons.${project.artifactId}"/>
237237
<attribute name="Bundle-Vendor" value="${project.organization.name}"/>
238-
<attribute name="Bundle-Version" value="${bundle.version}"/>
239-
<attribute name="Export-Package" value="org.apache.commons.net;version=&quot;${project.version}&quot;,org.apache.commons.net.bsd;version=&quot;${project.version}&quot;,org.apache.commons.net.chargen;version=&quot;${project.version}&quot;,org.apache.commons.net.daytime;version=&quot;${project.version}&quot;,org.apache.commons.net.discard;version=&quot;${project.version}&quot;,org.apache.commons.net.echo;version=&quot;${project.version}&quot;,org.apache.commons.net.finger;version=&quot;${project.version}&quot;,org.apache.commons.net.ftp;version=&quot;${project.version}&quot;,org.apache.commons.net.ftp.parser;version=&quot;${project.version}&quot;,org.apache.commons.net.imap;version=&quot;${project.version}&quot;,org.apache.commons.net.io;version=&quot;${project.version}&quot;,org.apache.commons.net.nntp;version=&quot;${project.version}&quot;,org.apache.commons.net.ntp;version=&quot;${project.version}&quot;,org.apache.commons.net.pop3;version=&quot;${project.version}&quot;,org.apache.commons.net.smtp;version=&quot;${project.version}&quot;,org.apache.commons.net.telnet;version=&quot;${project.version}&quot;,org.apache.commons.net.tftp;version=&quot;${project.version}&quot;,org.apache.commons.net.time;version=&quot;${project.version}&quot;,org.apache.commons.net.util;version=&quot;${project.version}&quot;,org.apache.commons.net.whois;version=&quot;${project.version}&quot;"/>
238+
<attribute name="Bundle-Version" value="${project.version}"/>
239+
<attribute name="Export-Package" value="org.apache.commons.net.bsd;version=&quot;${project.version}&quot;,org.apache.commons.net.chargen;version=&quot;${project.version}&quot;,org.apache.commons.net.daytime;version=&quot;${project.version}&quot;,org.apache.commons.net.discard;version=&quot;${project.version}&quot;,org.apache.commons.net.echo;version=&quot;${project.version}&quot;,org.apache.commons.net.examples.cidr;version=&quot;${project.version}&quot;,org.apache.commons.net.examples.ftp;version=&quot;${project.version}&quot;,org.apache.commons.net.examples.mail;version=&quot;${project.version}&quot;,org.apache.commons.net.examples.nntp;version=&quot;${project.version}&quot;,org.apache.commons.net.examples.ntp;version=&quot;${project.version}&quot;,org.apache.commons.net.examples.telnet;version=&quot;${project.version}&quot;,org.apache.commons.net.examples.unix;version=&quot;${project.version}&quot;,org.apache.commons.net.examples.util;version=&quot;${project.version}&quot;,org.apache.commons.net.examples;version=&quot;${project.version}&quot;,org.apache.commons.net.finger;version=&quot;${project.version}&quot;,org.apache.commons.net.ftp.parser;version=&quot;${project.version}&quot;,org.apache.commons.net.ftp;version=&quot;${project.version}&quot;,org.apache.commons.net.imap;version=&quot;${project.version}&quot;,org.apache.commons.net.io;version=&quot;${project.version}&quot;,org.apache.commons.net.nntp;version=&quot;${project.version}&quot;,org.apache.commons.net.ntp;version=&quot;${project.version}&quot;,org.apache.commons.net.pop3;version=&quot;${project.version}&quot;,org.apache.commons.net.smtp;version=&quot;${project.version}&quot;,org.apache.commons.net.telnet;version=&quot;${project.version}&quot;,org.apache.commons.net.tftp;version=&quot;${project.version}&quot;,org.apache.commons.net.time;version=&quot;${project.version}&quot;,org.apache.commons.net.util;version=&quot;${project.version}&quot;,org.apache.commons.net.whois;version=&quot;${project.version}&quot;,org.apache.commons.net;version=&quot;${project.version}&quot;"/>
240240
<attribute name="Implementation-Title" value="${project.name}"/>
241241
<attribute name="Implementation-URL" value="${project.url}"/>
242242
<attribute name="Implementation-Vendor" value="${project.organization.name}"/>
243243
<attribute name="Implementation-Vendor-Id" value="${project.organization.id}"/>
244244
<attribute name="Implementation-Version" value="${project.version}"/>
245245
<attribute name="Import-Package" value="javax.crypto,javax.crypto.spec,javax.net,javax.net.ssl"/>
246-
<attribute name="Include-Resource" value="examples/examples.properties=src/main/resources/examples/examples.properties,META-INF/NOTICE.txt=NOTICE.txt,META-INF/LICENSE.txt=LICENSE.txt"/>
246+
<attribute name="Include-Resource" value="org/apache/commons/net/examples/examples.properties=src/main/resources/org/apache/commons/net/examples/examples.properties,META-INF/NOTICE.txt=NOTICE.txt,META-INF/LICENSE.txt=LICENSE.txt"/>
247247
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
248248
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
249249
<attribute name="JavaPackages-Version" value="${project.version}"/>
250250
<attribute name="Private-Package" value="examples,examples.cidr,examples.ftp,examples.mail,examples.nntp,examples.ntp,examples.telnet,examples.unix,examples.util"/>
251251
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
252252
<attribute name="Specification-Title" value="${project.name}"/>
253253
<attribute name="Specification-Vendor" value="${project.organization.name}"/>
254-
<attribute name="Specification-Version" value="${project.version}"/>
254+
<attribute name="Specification-Version" value="${spec.version}"/>
255255
</manifest>
256256
</jar>
257257
</target>
@@ -263,3 +263,4 @@
263263
<target name="jar" depends="package" description="Builds the jar for the application"/>
264264

265265
</project>
266+
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Signatures": {
3-
"apache-commons-net-build.xml": "78b61a466249b1d8fdcfcc5a8172d4deda6eedc38e80a3491952bd9cc1dc10f0",
4-
"commons-net-3.6-src.tar.gz": "b93715bccb078a31bbd1c1191346c4c2d6d4a06117a9b925c40da7d99aad0c58"
3+
"apache-commons-net-build.xml": "8b443492e8d6ee653df12c019fd65cf4c9843108c46ec9aa3e126dcf16ccf724",
4+
"commons-net-3.11.0-src.tar.gz": "e52a91b3fad129cbe8401bb6477c65596b12b9eebb554342a6e6fe13f77f9ff6"
55
}
6-
}
6+
}

SPECS-EXTENDED/apache-commons-net/apache-commons-net.spec

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Distribution: Azure Linux
2222
%global short_name commons-%{base_name}
2323
%bcond_with tests
2424
Name: apache-%{short_name}
25-
Version: 3.6
26-
Release: 3%{?dist}
25+
Version: 3.11.0
26+
Release: 1%{?dist}
2727
Summary: Internet protocol suite Java library
2828
License: Apache-2.0
2929
Group: Development/Libraries/Java
3030
URL: http://commons.apache.org/%{base_name}/
31-
Source0: http://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
31+
Source0: https://archive.apache.org/dist/commons/%{base_name}/source/%{short_name}-%{version}-src.tar.gz
3232
Source1: %{name}-build.xml
3333
BuildRequires: ant
3434
BuildRequires: fdupes
@@ -57,7 +57,7 @@ Group: Documentation/HTML
5757
%{summary}.
5858

5959
%prep
60-
%setup -q -n %{short_name}-%{version}-src
60+
%autosetup -p1 -n %{short_name}-%{version}-src
6161
cp %{SOURCE1} build.xml
6262
%pom_remove_parent .
6363

@@ -69,6 +69,8 @@ cp %{SOURCE1} build.xml
6969
jar javadoc
7070

7171
%install
72+
mv target/site/apidocs/legal/ADDITIONAL_LICENSE_INFO .
73+
mv target/site/apidocs/legal/LICENSE .
7274
# pom
7375
install -dm 0755 %{buildroot}%{_javadir}
7476
install -pm 0644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{short_name}.jar
@@ -92,6 +94,11 @@ cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
9294
%{_javadocdir}/%{name}
9395

9496
%changelog
97+
* Tue Nov 04 2025 Sandeep Karambelkar <skarambelkar@microsoft.com> - 3.11.0-1
98+
- Upgrade to 3.11.0
99+
- Fix Build Issues
100+
- License verified
101+
95102
* Thu Oct 14 2021 Pawel Winogrodzki <pawelwi@microsoft.com> - 3.6-3
96103
- Converting the 'Release' tag to the '[number].[distribution]' format.
97104

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@
425425
"type": "other",
426426
"other": {
427427
"name": "apache-commons-net",
428-
"version": "3.6",
429-
"downloadUrl": "http://archive.apache.org/dist/commons/net/source/commons-net-3.6-src.tar.gz"
428+
"version": "3.11.0",
429+
"downloadUrl": "https://archive.apache.org/dist/commons/net/source/commons-net-3.11.0-src.tar.gz"
430430
}
431431
}
432432
},

toolkit/resources/manifests/package/license_file_exceptions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,13 @@
3131
"^/usr/share/doc/tar-[0-9\\.]+/tar\\.html/GNU-Free-Documentation-License\\.html$"
3232
]
3333
},
34+
{
35+
"PackageName": "apache-commons-net-javadoc",
36+
"IgnoredFilesRegexList": [
37+
"^/usr/share/javadoc/apache-commons-net/org/apache/commons/net/bsd/.*",
38+
"^/usr/share/javadoc/apache-commons-net/src-html/org/apache/commons/net/bsd/.*"
39+
]
40+
},
3441
{
3542
"_comment1": "OpenSSL has multiple structs, constants and procedures that have the word 'NOTICE' in them, like 'NOTICEREF_free'.",
3643
"_comment2": "These man pages are for those items, not actual license notices.",

0 commit comments

Comments
 (0)