Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 585722 - games-emulation/ppsspp: release ebuild uses git-r3 eclass (instead of snapshot)
Summary: games-emulation/ppsspp: release ebuild uses git-r3 eclass (instead of snapshot)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: RobinDX
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 585712 587342
  Show dependency tree
 
Reported: 2016-06-12 17:28 UTC by Michał Górny
Modified: 2017-04-04 21:15 UTC (History)
4 users (show)

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


Attachments
ppsspp-1.2.2.ebuild (ppsspp-1.2.2.ebuild,3.59 KB, text/plain)
2016-07-02 04:10 UTC, Thomas Kear
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-12 17:28:04 UTC
The ebuild listed in summary uses a live eclass to fetch sources, and is not masked. Please update it to use a fetchable snapshot instead. Rationale is available in tracker bug #585712.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-06-28 18:00:42 UTC
Well, looks like it's worse than I anticipated. The ebuild actually relies on a lot of submodules being fetched, and therefore the github generated tarball is no good here.
Comment 2 Thomas Kear 2016-07-02 04:09:51 UTC
Since I do actually use ppsspp and would like it to hang around in portage, took a crack at re-writing this without any of the git dependencies.

Starting from tag 1.2.2 - https://github.com/hrydgard/ppsspp/tree/8c9f3b9509e8a6850e086ec36a59ca7fa4082d60

We've got six submodules, all of which we have to fetch from random commit ids.  At least github lets us grab a tarball with a consistent checksum from a commit ID.

https://github.com/hrydgard/minidx9/tree/ec19e643461c84dbb256f6faaaab02cba61d4edc
https://github.com/hrydgard/ppsspp-ffmpeg/tree/a7cae9c5a5b48e903ae97f4c8afecc82b41eb218
https://github.com/hrydgard/ppsspp-lang/tree/16a50e33001aa4bff80e4f55c3a01e314b65755f
https://github.com/hrydgard/pspautotests/tree/e18cface3db64ccb96738dc128fe769b28fff65c
https://github.com/Kingcom/armips/tree/9b225d99a5eb1eef957544dc422b08ba3b6efbae
https://github.com/hrydgard/ppsspp-glslang/tree/7aaea5a33ba0c4165cdffb008e7cda2858d0c985

So we should be able to do this to pull down a snapshot from each of the six, something like so:

SRC_URI="
    https://github.com/hrydgard/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
    https://github.com/hrydgard/ppsspp-ffmpeg/archive/a7cae9c5a5b48e903ae97f4c8afecc82b41eb218.tar.gz     -> ${P}-ffmpeg.tar.gz
    https://github.com/hrydgard/ppsspp-lang/archive/16a50e33001aa4bff80e4f55c3a01e314b65755f.tar.gz       -> ${P}-lang.tar.gz
    https://github.com/hrydgard/pspautotests/archive/e18cface3db64ccb96738dc128fe769b28fff65c.tar.gz      -> ${P}-pspautotests.tar.gz
    https://github.com/hrydgard/minidx9/archive/ec19e643461c84dbb256f6faaaab02cba61d4edc.tar.gz           -> ${P}-dx9sdk.tar.gz
    https://github.com/hrydgard/ppsspp-glslang/archive/7aaea5a33ba0c4165cdffb008e7cda2858d0c985.tar.gz    -> ${P}-ext_glslang.tar.gz
    https://github.com/Kingcom/armips/archive/9b225d99a5eb1eef957544dc422b08ba3b6efbae.tar.gz             -> ${P}-ext_armips.tar.gz
"

What I'm struggling with is finding a "nice" example of unpacking multiple archive files when you've got a list like this, I've arrived at this piece of code:

src_unpack() {
    unpack "${P}.tar.gz"
    cd "${S}"
    for i in ffmpeg lang pspautotests dx9sdk ext_glslang ext_armips; do
        tar xf "${DISTDIR}/${P}-${i}.tar.gz" --strip-components 1 -C "${i//_//}" || die "Failed to unpack ${P}-${i}.tar.gz"
    done
}

which unpacks all six into their nominated subdirectories as expected (the ebuild succeeds, and the app runs, huzzah), but I'm not sure it's the best, or correct way to achieve this.

Neither does there seem to be a nice way to get a list of all the submodules every time the app updates, beyond either scouring the github web interface, or checking out the tag and running 'git submodule status'

~/repos/ppsspp master $ git checkout v1.2.2
~/repos/ppsspp $ git submodule status
-ec19e643461c84dbb256f6faaaab02cba61d4edc dx9sdk
-9b225d99a5eb1eef957544dc422b08ba3b6efbae ext/armips
-7aaea5a33ba0c4165cdffb008e7cda2858d0c985 ext/glslang
-a7cae9c5a5b48e903ae97f4c8afecc82b41eb218 ffmpeg
-16a50e33001aa4bff80e4f55c3a01e314b65755f lang
-e18cface3db64ccb96738dc128fe769b28fff65c pspautotests
Comment 3 Thomas Kear 2016-07-02 04:10:29 UTC
Created attachment 439364 [details]
ppsspp-1.2.2.ebuild
Comment 4 Richard H. 2017-01-26 05:55:00 UTC
Thanks, the attached ebuild works very well!
Comment 5 tsmksubc 2017-04-01 20:20:15 UTC
pr to fix this https://github.com/gentoo/gentoo/pull/4342
Comment 6 Patrice Clement gentoo-dev 2017-04-04 21:15:04 UTC
commit 07dcd0e1a674de8b3c71b2e5b34335b3f555eb9f (HEAD)
Author:     soredake <fdsfgs@krutt.org>
AuthorDate: Tue Apr 4 16:17:54 2017 +0300
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: Tue Apr 4 23:13:58 2017 +0200

games-emulation/ppsspp: version bump to 1.4.

Gentoo-Bug: https://bugs.gentoo.org/583818
Gentoo-Bug: https://bugs.gentoo.org/612826
Gentoo-Bug: https://bugs.gentoo.org/587342
Gentoo-Bug: https://bugs.gentoo.org/574118
Gentoo-Bug: https://bugs.gentoo.org/585722

Closes: https://github.com/gentoo/gentoo/pull/4342

games-emulation/ppsspp/Manifest                    |  8 ++
games-emulation/ppsspp/files/ppsspp-1.4-O2.patch   | 32 ++++++++
.../ppsspp/files/ppsspp-1.4-assets-lookup.patch    | 13 ++++
games-emulation/ppsspp/metadata.xml                |  8 +-
games-emulation/ppsspp/ppsspp-1.4.ebuild           | 87 ++++++++++++++++++++++
5 files changed, 145 insertions(+), 3 deletions(-)
create mode 100644 games-emulation/ppsspp/Manifest
create mode 100644 games-emulation/ppsspp/files/ppsspp-1.4-O2.patch
create mode 100644 games-emulation/ppsspp/files/ppsspp-1.4-assets-lookup.patch
create mode 100644 games-emulation/ppsspp/ppsspp-1.4.ebuild