Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Patching IcedTea with ebuild? [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
clavko
n00b
n00b


Joined: 02 Aug 2008
Posts: 25

PostPosted: Tue Jun 25, 2013 8:32 am    Post subject: Patching IcedTea with ebuild? [SOLVED] Reply with quote

I'd like to patch the current unstable tree icedtea with this patch:

https://gist.github.com/trustin/2893461

It should enable to use Infinality-style font rendering in Java apps,
and I'm very much interested in Netbeans, but can't use it without
proper font rendering (I'd go bananas :D), so i'd get this:

http://i40.tinypic.com/ezhggo.png

So when I do ebuild fetch, ebuild unpack, I get no unpacked source
of openjdk, but a folder with symlinks to tar.gz distfiles. I need to
patch two files in openjdk-sdk, but if I patch them in distfiles, all of
the checksums are invalid.

I'm very inexperienced in this, but I'm willing to learn. What would be
the easiest (if any) way to do it without creating my own ebuild in overlay?

I'm scared of the overlays :D


Last edited by clavko on Wed Jul 31, 2013 7:13 am; edited 1 time in total
Back to top
View user's profile Send private message
MustrumR
n00b
n00b


Joined: 15 Nov 2011
Posts: 66
Location: Right here

PostPosted: Tue Jun 25, 2013 4:09 pm    Post subject: Reply with quote

IcedTea unpacks the tarballs and applies patches.

You should write a patch that adds a patch to the IcedTea source tree.
Back to top
View user's profile Send private message
clavko
n00b
n00b


Joined: 02 Aug 2008
Posts: 25

PostPosted: Tue Jul 30, 2013 10:57 am    Post subject: Reply with quote

Ok, I've added the patch to the /etc/portage/patches/dev-java/icedtea
and added epatch_user function to the ebuild, digested it and the patch
failed. I would really appreciate if someone could direct me to the right
steps in making this. The current font rendering is just plain bad.
Back to top
View user's profile Send private message
clavko
n00b
n00b


Joined: 02 Aug 2008
Posts: 25

PostPosted: Tue Jul 30, 2013 8:28 pm    Post subject: Reply with quote

Well, here's what I did:

1. Fetched IcedTea JDK directly
2. Patched it localy and uploaded to a server
3. Created overlay and modified ebuild to fetch from my server
4. Created manifest and started emerge

There is just one problem. After unpacking my tarball, there is a sumcheck,
which fails but I don't know at what stage is this sumcheck performed, also
don't know how would I disable these sumchecks.

Pls, people, give me a hand :)

Code:

jaxws.tar.gz: OK
ln -sf /var/tmp/portage/dev-java/icedtea-7.2.4.1/distdir/2icedtea-2.4-jdk-65d95818d79e.tar.gz jdk.tar.gz
if ! echo "97edcd78d316f33a43278c5549cb58a06f67305b63ad51b7c1a1fca7c45c6432  jdk.tar.gz" \
  | /usr/bin/sha256sum --check ; \
then \
  if test "xno" = "xyes"; then \
    if [ jdk.tar.gz ] ; then \
      mv jdk.tar.gz jdk.tar.gz.old ; \
    fi ; \
    /usr/bin/wget http://icedtea.classpath.org/hg/release/icedtea7-forest-2.4/jdk/archive/65d95818d79e.tar.gz -O jdk.tar.gz; \
    if ! echo "97edcd78d316f33a43278c5549cb58a06f67305b63ad51b7c1a1fca7c45c6432  jdk.tar.gz" \
      | /usr/bin/sha256sum --check ; then \
      echo "ERROR: Bad download of JDK zip"; false; \
    fi; \
  else \
    echo "ERROR: No up-to-date OpenJDK JDK zip available"; exit -1; \
  fi ; \
fi ;
jdk.tar.gz: FAILED
/usr/bin/sha256sum: WARNING: 1 computed checksum did NOT match
ERROR: No up-to-date OpenJDK JDK zip available
make: *** [stamps/download-openjdk.stamp] Error 255
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 33957
Location: 56N 3W

PostPosted: Tue Jul 30, 2013 9:27 pm    Post subject: Reply with quote

clavko,

If you really want to skip the check delete

Code:
    if ! echo "97edcd78d316f33a43278c5549cb58a06f67305b63ad51b7c1a1fca7c45c6432  jdk.tar.gz" \
      | /usr/bin/sha256sum --check ; then \
      echo "ERROR: Bad download of JDK zip"; false; \
    fi; \


but you should understand why it fails first.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
clavko
n00b
n00b


Joined: 02 Aug 2008
Posts: 25

PostPosted: Tue Jul 30, 2013 9:38 pm    Post subject: Reply with quote

Well, this code is located in Makefile.am, and I think it fails because there is a
hard-coded checksum in a tarball, and I've obviously changed the checksum
with patching. I've removed the (exit -1) part and proceeded with compile phase.

I'll report the outcome, thanks for the suggestions!
Back to top
View user's profile Send private message
clavko
n00b
n00b


Joined: 02 Aug 2008
Posts: 25

PostPosted: Wed Jul 31, 2013 7:13 am    Post subject: Reply with quote

It worked alright. Everyone trying this must make sure that the "files" folder
included in the original portage ebuild folder is copied to the overlay as well,
otherwise the install phase will fail because of a missing certificate script.

The difference in Netbeans can be seen here: http://i39.tinypic.com/34r6td2.png

This wasn't easy, I'll tell you that, so I've created a Bug/Enhancement request
at Gentoo's Bugzilla: https://bugs.gentoo.org/show_bug.cgi?id=478960
So, if anyone thinks the result is worthwhile, vote for it and/or contribute code.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 33957
Location: 56N 3W

PostPosted: Wed Jul 31, 2013 6:30 pm    Post subject: Reply with quote

clavko,

You have just done the hard work, others may need to recreate it.

Post on the bug the things you did so others may build on your work.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ebast
n00b
n00b


Joined: 02 Nov 2008
Posts: 11

PostPosted: Sun Sep 22, 2013 2:01 pm    Post subject: Reply with quote

Yesterday, i've updated the bugzilla entry. Patching the ebuild was pretty easy in my book. The result is worth building icedtea yourself instead of using the pre-compiled binaries! Unfortunately, eclipse now is ugly as hell :? . But as i prefer using netbeans i can live with that.

Side note: every "-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true" settings (or similar ones) have to be disabled to achieve best font rendering results.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum