Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Oct 2014 22:07:53 +0200
From:      Enrico Maria Crisostomo <enrico.m.crisostomo@gmail.com>
To:        freebsd-ports@freebsd.org
Subject:   Patching a Java package substituting a precompiled class
Message-ID:  <F5829461-F030-4274-8DF8-ECBA8A832A63@gmail.com>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Hi,

I’m trying to fix a Java port (logstash) that's crashing in FreeBSD because of a bug in a Java class in a JAR that's included as a dependency.  Three different persons, included I, have submitted a PR upstream (you can see mine here: https://github.com/jnr/jnr-ffi/pull/26) but the activity in that project is pretty slow and nobody has taken action yet.

Now, this issue is blocking the port update in FreeBSD and since I'm not confident upstream is going to answer quickly, I thought about updating the port so that it patches the binary distribution.  Fortunately, the offending class is just one so that the patching process may be as simple as this:

  * Download the binary distribution.
  * Extract it to the working directory.
  * Copy the library containing the offending class to a temporary directory.
  * Extract the JAR.
  * Substitute the offending class with the patched class.
  * Recreate the JAR.
  * Copy the update library to the working directory.

The patched class could be distributed as a binary file belonging to the port itself.

I'm not sure this approach fits the FreeBSD port philosophy, but on the other hand we could leverage the Java platform independence to simplify a great deal the patch phase of the port: after all, this is a no-build port.  Otherwise, the port should grab the sources of the dependent library, building them, and then use the compiled class to perform the aforementioned changes.  Since this library (jnr-ffi) is a Maven project, building it would require Maven as a dependency, and during the build Maven would fetch quite a lot of dependencies to perform its job.  If I should give somebody a solution, I'm not sure I'd choose the latter.

Would you please share your thoughts about this issue?  Any feedback and suggestions are greatly appreciated.

Regards,
-- 
Enrico
[-- Attachment #2 --]
0	*H
010	+0	*H
0400
	*H
0}10	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1)0'U StartCom Certification Authority0
071024210155Z
171024210155Z010	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0"0
	*H
0
	-).2AUGo#G
B|NDRpM-B=o-we5JQpa>O.#._<V
[~**pz~3WG.ᘟMlr[<Ce6fqO"uxfWN#uicgkv$Lb%y`_{`xK'GN00U00U0USr풜\|~5NԸQ0U#0N@[i04hCA0f+Z0X0'+0http://ocsp.startssl.com/ca0-+0!http://www.startssl.com/sfsca.crt0[UT0R0'%#!http://www.startssl.com/sfsca.crl0'%#!http://crl.startssl.com/sfsca.crl0U y0w0u+70f0.+"http://www.startssl.com/policy.pdf04+(http://www.startssl.com/intermediate.pdf0
	*H

}x,\c^#wMq}>UK/^yX֏y	frMIŲB61ymQ󸟆ҨݬZ0&;@#13qۑ&	̢o	6r_;GO>*I(	74XS1r3)!LJy6Kotˆ#
_wSr
;B
ADp(fs䰷6%.W0J3:bC<8t X1<Cn=t==wST~\wkBf|15zUP)(IjVB!OfI=bb\4-*em/нSJm7N[]'@ڽD9Kr>R7/|o^I@ټ'Pa$ z9a'L)(
I}vcH]۸D*W}
m>Q|C.(,lQ0E0-[0
	*H
010	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA0
131211152739Z
141212092201Z0V1&0$Uenrico.m.crisostomo@gmail.com1,0*	*H
	enrico.m.crisostomo@gmail.com0"0
	*H
0
Ob>v߭v0vt5T`%HRɸ?q>DƄ	rN>Um%טůչQ1ZLlFK.'UG٤w+B-CVQpozPxa_c^8G%Gq7Eg/Yc4VIK@nAjiGÙFUap5+U襺Ķl
W*qWzhu`
A00	U00U0U%0++0UTB-X&{'"Q~0U#0Sr풜\|~5NԸQ0(U!0enrico.m.crisostomo@gmail.com0LU C0?0;+70*0.+"http://www.startssl.com/policy.pdf0+00' StartCom Certification Authority0This certificate was issued according to the Class 1 Validation requirements of the StartCom CA policy, reliance only for the intended purpose in compliance of the relying party obligations.06U/0-0+)'%http://crl.startssl.com/crtu1-crl.crl0+009+0-http://ocsp.startssl.com/sub/class1/client/ca0B+06http://aia.startssl.com/certs/sub.class1.client.ca.crt0#U0http://www.startssl.com/0
	*H
zJf0>oᙆڜC!ߋMXO uIAmL2М)XtU9H{zǚLITu8a8?"C-s׌S'_tZ9+GiElĄuvX5U#hswcS{O{I
GM`Y@Iz,VV@;&Qe[c72Z|좍1o0k0010	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA[0	+0	*H
	1	*H
0	*H
	1
141018200754Z0#	*H
	1CRY/8p0	+710010	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA[0*H
	1010	UIL10U

StartCom Ltd.1+0)U"Secure Digital Certificate Signing1806U/StartCom Class 1 Primary Intermediate Client CA[0
	*H
c\ Gdw=rsN̺qu$@tK-V6,2,$P	3Q(^!tj1OQ`5+]7@
.4@izKͮ!'%R0b%^z
|M\4KҖkK5!+<	's$iK(4pE@ʙ	iY\6LED
!hwt04|<3ia]@b1Ꮍ@|^i&na
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F5829461-F030-4274-8DF8-ECBA8A832A63>