Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 353080 - app-emulation/x48-0.6.3 version bump
Summary: app-emulation/x48-0.6.3 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Diego Elio Pettenò (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-28 18:36 UTC by Kevin McCarthy (RETIRED)
Modified: 2011-01-30 19:48 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to fix buffer overflow (x48-off-by-one.patch,407 bytes, patch)
2011-01-28 18:36 UTC, Kevin McCarthy (RETIRED)
Details | Diff
Updated ebuild for app-emulation/x48-0.6.3 (x48-0.6.3.ebuild,1.85 KB, text/plain)
2011-01-28 18:37 UTC, Kevin McCarthy (RETIRED)
Details
Updated fix for strcpy+malloc overflow bugs (x48-0.6.3-off-by-one.patch,770 bytes, patch)
2011-01-29 18:25 UTC, Kevin McCarthy (RETIRED)
Details | Diff
Updated ebuild for new patch with version in name (x48-0.6.3.ebuild,1.85 KB, text/plain)
2011-01-29 18:25 UTC, Kevin McCarthy (RETIRED)
Details
EAPI=3 ebuild (x48-0.6.3.ebuild,1.75 KB, text/plain)
2011-01-30 15:00 UTC, Diego Elio Pettenò (RETIRED)
Details
Fix for build failure with --disable-readline (x48-0.6.3-no-readline.patch,480 bytes, patch)
2011-01-30 18:49 UTC, Kevin McCarthy (RETIRED)
Details | Diff
New EAPI=3 with requested fixes (x48-0.6.3.ebuild,1.93 KB, text/plain)
2011-01-30 19:07 UTC, Kevin McCarthy (RETIRED)
Details
Miscellaneous fix-ups (x48-0.6.3.ebuild,1.65 KB, text/plain)
2011-01-30 19:33 UTC, Kevin McCarthy (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 18:36:10 UTC
The version of app-emulation/x48 in the portage tree is out of date.

Reproducible: Always
Comment 1 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 18:36:51 UTC
Created attachment 260940 [details, diff]
Patch to fix buffer overflow
Comment 2 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 18:37:24 UTC
Created attachment 260941 [details]
Updated ebuild for app-emulation/x48-0.6.3
Comment 3 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-28 18:41:28 UTC
The patch from bug #336941 for the buffer overflow is applied. The "implicit declaration of exit()" patch from that bug is unneeded as it has been fixed upstream.
Comment 4 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-29 18:25:00 UTC
Created attachment 261029 [details, diff]
Updated fix for strcpy+malloc overflow bugs
Comment 5 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-29 18:25:49 UTC
Created attachment 261030 [details]
Updated ebuild for new patch with version in name
Comment 6 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-29 18:29:21 UTC
As was pointed out in the comments for bug #336941 there were a couple of similar off-by-one overflows in the debugger code that were not caught by _FORTIFY_SOURCE. The updated patch takes care of them as well. I also submitted a new ebuild that refers to the patch by its proper name "${P}-off-by-one.patch"
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-01-30 15:00:21 UTC
Created attachment 261102 [details]
EAPI=3 ebuild

Kevin, I know this is going to be a bit of a burden, but given you're interested in this, can I ask you to look a bit further into this?

I'm attaching a slightly reworked ebuild to use EAPI=3 rather than EAPI=1 (as that reduces the code required), but it's still not proper, I'm afraid.

The dependencies don't look right, as I can't find references to, for instance, gpm in the sources, and the install doesn'tinstall the app-defaults as it should — it was written before x48 moved to automake, the same was true for src_compile that used CCOPTIONS and LOCAL_LDFLAGS that the build system doesn't use. It looks like the original 0.6.1 bump was done quite blindly, and not correctly at all.

Among other things, readline support should be optional, and tied to an USE flag, and libXt is required at build time to find where to install the app-defaults (and pkg-config is also needed).

Also, the two ROMs have unclear licensing status; at the very least they should be installed as a separate package, and it would be nice to have a written license text for them.
Comment 8 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-30 15:17:18 UTC
(In reply to comment #7)
> Created an attachment (id=261102) [details]
> EAPI=3 ebuild
> 
> Kevin, I know this is going to be a bit of a burden, but given you're
> interested in this, can I ask you to look a bit further into this?
> 

Not a burden... an opportunity. I will investigate these problems and post an updated ebuild here when I finish.



Comment 9 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-30 18:49:35 UTC
Created attachment 261119 [details, diff]
Fix for build failure with --disable-readline
Comment 10 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-30 19:07:04 UTC
Created attachment 261120 [details]
New EAPI=3 with requested fixes

This is based on Diego's EAPI=3 ebuild. 

I have attempted to clean up the dependencies, but I'm a little unsure of myself there. I'm unclear if libXt needs to be in DEPEND or RDEPEND. I *think* it's DEPEND because the resulting binary is not linked against it, but I'm not sure on that.

I also added a 'readline' use flag. Unfortunately, configuring with "--disable-readline" caused an unrelated build failure and I had to patch configure.ac to make it work. There's a patch for that attached to this bug and applied by this ebuild. I also had to use eautoreconf because of the configure.ac patch. I hope this was the correct way to do it.

I've searched high and low for information about the licensing of the "free to use" ROMs from HP, but could find nothing concrete. I sent an e-mail to the hpcalc.org people asking if they had anything that would help, but have not gotten a response yet. For the time being, I have removed the ROMs from the ebuild and changed the elog message to inform the user that a ROM is needed and that it should be manually downloaded from hpcalc.org. Please take a look at the language and make sure I didn't say something I shouldn't have.

Otherwise, I think this should be good. Let me know if I made any mistakes...
Comment 11 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-30 19:15:03 UTC
Oh, the app-defaults are installed now too. It's OK that I use pkg-config from within the ebuild, isn't it?
Comment 12 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-01-30 19:15:42 UTC
Thanks for persisting, Kevin!

It seems almost perfect; although you should use

RDEPEND=".."
DEPEND="${RDEPEND}
 .."

as you need the runtime dependencies available at build-time as well (libXt is DEPEND only, yes, as it doesn't link against it). And eautoreconf goes in src_prepare not _configure, but those two chances I can do myself at commit time.

Two things are worth looking into, now, though: the LICENSE variable (I suppose that it's likely simply GPL-2 now that the roms are gone? and good thing to do it that way), and src_install: does 'emake DESTDIR="${D}" install || die' not work with the current version? I'd bet it does, but 0.6.1 didn't use that because nobody looked at the actual code when doing that bump at the time.

You also probably want to install with dodoc the files such as README, AUTHORS and ChangeLog (NEWS is empty, as usual).

Assigning to myself since I'll be committing this with Kevin as proxy.
Comment 13 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-30 19:22:00 UTC
It is actually GPL-3, so I'll change that. If you can wait a few minutes before commit, I will make the changes you mentioned and upload one (hopefully) last ebuild.
Comment 14 Kevin McCarthy (RETIRED) gentoo-dev 2011-01-30 19:33:48 UTC
Created attachment 261122 [details]
Miscellaneous fix-ups

Fixed the LICENSE. Added RDEPEND to DEPEND. Changed src_install() to use emake install, which works fine. Added dodoc for AUTHORS, README and ChangeLog.
Comment 15 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-01-30 19:48:18 UTC
Committed now. Thanks Kevin! You're now the proxied maintainer of x48!