Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 156135
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Java team <java@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Kevin F. Quinn (RETIRED) <kevquinn@gentoo.org>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
sun-jdk-1.5.0.09-r1.ebuild.diff Proposed patch using pax-utils to manipulate PaX flags patch Kevin F. Quinn (RETIRED) 2006-11-24 07:10 0000 2.73 KB Details | Diff
pax-utils.eclass.patch Patch for pax-utils.eclass patch Petteri Räty 2006-12-02 02:36 0000 528 bytes Details | Diff
pax-utils.eclass.patch Patch for pax-utils.eclass patch Petteri Räty 2006-12-02 02:48 0000 528 bytes Details | Diff
sun-jdk-1.5.0.09-r1.ebuild.diff Updated ebuild diff - using list-paxables() patch Kevin F. Quinn (RETIRED) 2006-12-02 03:38 0000 2.64 KB Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 156135 depends on: Show dependency tree
Bug 156135 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-11-24 07:09 0000
Hi.  I've added to portage an eclass (eutil, really) that provides functions to
manipulate PaX flags on executables.  The eclass manages the use of the various
PaX flag manipulation programs that may or may not be present on the build
system, so that as these tools develop we can just modify the eclass without
nagging all the affected packages.

To follow; a patch for the sun-jdk-1.5.0.09-r1 ebuild, for your perusal.  I've
put the call at the start of src_install() instead of post_install(), so that
the checksums recorded by portage in its database agree with what is on the
filesystem.  If you're happy with that patch, let me know and I'll commit it
and similar across all the jdk/jre packages (if you don't want me to touch
anything I'll supply patches for them all here).

------- Comment #1 From Kevin F. Quinn (RETIRED) 2006-11-24 07:10:52 0000 -------
Created an attachment (id=102665) [details]
Proposed patch using pax-utils to manipulate PaX flags

Also worth noting is that the chpax method for PaX flags (currently used by the
ebuilds) is slowly being deprecated.

------- Comment #2 From Josh Nichols (RETIRED) 2006-11-24 07:53:24 0000 -------
The patch certainly does clean things up. Perhaps the eclass could use a helper
method for finding which should be tweaked? ie, something that would
effectively do:
file ${S}/bin/* ${S}/jre/bin/* | grep ELF | sed -e 's/:.*$//'

------- Comment #3 From Kevin F. Quinn (RETIRED) 2006-11-24 08:32:29 0000 -------
Sounds useful - something like:

list-paxables() {
    file $* 2> /dev/null | grep ELF | sed -e 's/:.*$//'
}

so you could have:

    pax-mark m $(list-paxables ${S}/{jre/}bin)

I shy away from using a 'find', as ideally each ebuild should know exactly
which files need the markings, and where they are.   In this case such a list
would be tedious, and I'm pretty sure most if not all the jdk/jre executables
use java themselves.

------- Comment #4 From Josh Nichols (RETIRED) 2006-11-27 20:58:47 0000 -------
That usage looks great to me.

------- Comment #5 From Petteri Räty 2006-12-02 02:30:28 0000 -------
Tested this on my hardened server and the eclass or the usage in the ebuild is
buggy:

/usr/portage//eclass/pax-utils.eclass: line 26:  
/var/tmp/portage/sun-jdk-1.5.0.10/work/jdk1.5.0_10/bin/appletviewer: No such
file or directory

------- Comment #6 From Petteri Räty 2006-12-02 02:36:09 0000 -------
Created an attachment (id=103180) [details]
Patch for pax-utils.eclass

My guess wold be that this is what you want.

------- Comment #7 From Petteri Räty 2006-12-02 02:48:01 0000 -------
Created an attachment (id=103181) [details]
Patch for pax-utils.eclass

My guess wold be that this is what you want.

------- Comment #8 From Kevin F. Quinn (RETIRED) 2006-12-02 03:35:48 0000 -------
Yes; sorry - had it fixed locally but not committed to CVS.

------- Comment #9 From Kevin F. Quinn (RETIRED) 2006-12-02 03:38:32 0000 -------
Created an attachment (id=103184) [details]
Updated ebuild diff - using list-paxables()

------- Comment #10 From Petteri Räty 2006-12-03 13:27:57 0000 -------
(In reply to comment #9)
> Created an attachment (id=103184) [edit] [details]
> Updated ebuild diff - using list-paxables()
> 

Yeah seems to work. Feel free to add the other VMs that need it. You can get
that by checking the ebuilds that inherit java-vm* eclasses. Should also add
the every slot of them. ;D sun-jdk and sun-jre-bin 1.5 are taken care off.

------- Comment #11 From Kevin F. Quinn (RETIRED) 2006-12-10 06:04:06 0000 -------
Quick q - just did blackdown-jdk but didn't do a rev-bump as I figured anyone
who already has it installed and working doesn't need to re-emerge.  Would you
prefer a rev-bump?

------- Comment #12 From Vlastimil Babka (Caster) 2006-12-13 18:38:09 0000 -------
I think it's fine without a revbump.

------- Comment #13 From Petteri Räty 2006-12-16 00:44:08 0000 -------
(In reply to comment #12)
> I think it's fine without a revbump.
> 

It's fine without a revbump for ~arch. I prefer to have revision bumps if there
are only stable versions as stable versions should never be modified directly.

------- Comment #14 From Alistair Bush 2009-06-10 19:23:16 0000 -------
Seems to have already been committed

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug