-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net-p2p/ipfs-desktop-bin: new package, add 0.39.0 #251
base: master
Are you sure you want to change the base?
Conversation
Hello? any maintainers here? |
In first place, please read the relevant links found in the README. About the ebuild. Indent the ebuild to make it easier to read. Move pkg_* functions to the end of the ebuild. For icons, use doicon instead of doins |
OK, I'm new here, and I would fix it |
So I would commit this repo directly? |
b756e95
to
dd496c3
Compare
OK, I fix it |
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the email address you registered with bugs.gentoo.org.
https://wiki.gentoo.org/wiki/Project:GURU#The_regulations
- Users that list themselves as maintainers must use an e-mail address known to bugs.gentoo.org in metadata.xml and keep it up to date in case it changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a alias name for my email registered in bugs.gentoo.org. But I won't leave my phone numbers on GitHub, I wold change my gentoo bugzilla's email.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, Bugzilla wouldn't know whether it's an alias or not.
$ curl 'https://bugs.gentoo.org/rest/[email protected]'
{"code":51,"error":true,"message":"There is no user named '[email protected]'. Either you mis-typed the name or that user has not yet registered for a Gentoo's Bugzilla account.","documentation":"https://bugzilla.readthedocs.org/en/5.0/api/"}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your new email is still not registered. Can you login to Bugzilla with your new email address?
$ curl 'https://bugs.gentoo.org/rest/[email protected]'
{"code":51,"message":"There is no user named '[email protected]'. Either you mis-typed the name or that user has not yet registered for a Gentoo's Bugzilla account.","error":true,"documentation":"https://bugzilla.readthedocs.org/en/5.0/api/"}
EAPI=8 | ||
inherit desktop xdg unpacker optfeature | ||
DESCRIPTION="A desktop client for IPFS. The IPFS's Native Application" | ||
HOMEPAGE="https://github.com/ipfs-shipyard/ipfs-desktop" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HOMEPAGE="https://github.com/ipfs-shipyard/ipfs-desktop" | |
HOMEPAGE="https://github.com/ipfs/ipfs-desktop" |
inherit desktop xdg unpacker optfeature | ||
DESCRIPTION="A desktop client for IPFS. The IPFS's Native Application" | ||
HOMEPAGE="https://github.com/ipfs-shipyard/ipfs-desktop" | ||
SRC_URI="https://github.com/ipfs/ipfs-desktop/releases/download/v${PV}/ipfs-desktop-${PV}-linux-amd64.deb" |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
app-crypt/libsecret | ||
" | ||
RDEPEND="${DEPEND}" | ||
S="${WORKDIR}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S="${WORKDIR}" |
S should be defined right after SRC_URI.
pkg_postinst(){ | ||
xdg_pkg_postinst | ||
optfeature "cli interface" net-p2p/kubo | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
} |
S="${WORKDIR}" | ||
|
||
src_prepare(){ | ||
default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default | |
default |
DEPEND=" | ||
x11-libs/gtk+:3 | ||
x11-libs/libnotify | ||
dev-libs/nss | ||
x11-libs/libXScrnSaver | ||
x11-libs/libXtst | ||
x11-misc/xdg-utils | ||
app-accessibility/at-spi2-core | ||
sys-apps/util-linux | ||
app-crypt/libsecret | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are not build-time dependencies. You only need them as RDEPEND.
There are also many missing runtime dependencies. You can check the linked libraries using lddtree /opt/IPFS\ Desktop/ipfs-desktop
.
dev-libs/expat
dev-libs/glib:2
dev-libs/nspr
media-libs/alsa-lib
media-libs/mesa
net-print/cups
sys-apps/dbus
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/libX11
x11-libs/libXcomposite
x11-libs/libXdamage
x11-libs/libXext
x11-libs/libXfixes
x11-libs/libXrandr
x11-libs/libdrm
x11-libs/libxcb:=
x11-libs/libxkbcommon
x11-libs/pango
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK got it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I think the packages in list are commonly for desktop profile users..., =_=
insinto "/usr/share" | ||
# doins -r "${S}/usr/share/icons" | ||
local size | ||
for size in 16 24 32 48 64 128 256 512; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no 24x24 icons.
default | ||
unpacker "${S}/usr/share/doc/ipfs-desktop/changelog.gz" | ||
# to prevent ipfs-desktop install build-in ipfs exe into /usr/local/bin or ${HOME}/.local/bin | ||
# sed -i "s/^binpaths=\(.*\)$/binpaths=\'\/usr\/bin\'/" "${S}/opt/IPFS Desktop/resources/app.asar.unpacked/node_modules/kubo/kubo/install.sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this? Is there a reason to leave a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for experimental... I'm trying to make ipfs-desktop run with system-wide ipfs, not the bundled...But It doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which was the problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which was the problem?
Seems the path was hard-coded into ipfs-desktop...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to remove resources/app.asar.unpacked/node_modules/kubo/kubo/ipfs
and then adjust resources/app.asar.unpacked/node_modules/kubo/src/index.js
to grab ipfs binary from PATH.
Wow, thanks for the package. What is your use case for IPFS? |
Just for fun... and to download something |
Signed-off-by: Dawn Xu <[email protected]>
dd496c3
to
b487c5c
Compare
DEPEND=" | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just remove DEPEND here.
x11-libs/libxkbcommon | ||
x11-libs/pango | ||
" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QA_PREBUILT="*" |
I forgot to mention, but please add QA_PREBUILT since this is a binary ebuild. Otherwise, QA will notify you that it doesn't respect {C,LD}FLAGS.
https://devmanual.gentoo.org/eclass-reference/ebuild/index.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot to mention, but please add QA_PREBUILT since this is a binary ebuild. Otherwise, QA will notify you that it doesn't respect {C,LD}FLAGS. https://devmanual.gentoo.org/eclass-reference/ebuild/index.html
Hello... I fix it on WebIDE... sorry
Sorry, but I have to commit it on webIDE |
I'm still waiting for you to sync Bugzilla with the email address. Also, could you squash the commits into one? |
And also unbundle the pre-built ipfs binary. |
This patch seems to work to unbundle the ipfs without having to touch the javascript code --- a/net-p2p/ipfs-desktop-bin/ipfs-desktop-bin-0.39.0.ebuild
+++ b/net-p2p/ipfs-desktop-bin/ipfs-desktop-bin-0.39.0.ebuild
@@ -2,7 +2,9 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=8
-inherit desktop xdg unpacker optfeature
+
+inherit desktop xdg unpacker optfeature wrapper
+
DESCRIPTION="A desktop client for IPFS. The IPFS's Native Application"
HOMEPAGE="https://github.com/ipfs/ipfs-desktop"
SRC_URI="https://github.com/ipfs/ipfs-desktop/releases/download/v${PV}/ipfs-desktop-${PV}-linux-amd64.deb"
@@ -11,50 +13,55 @@ LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
-RDEPEND="x11-libs/gtk+:3
-x11-libs/libnotify
-dev-libs/nss
-x11-libs/libXScrnSaver
-x11-libs/libXtst
-x11-misc/xdg-utils
-app-accessibility/at-spi2-core
-sys-apps/util-linux
-app-crypt/libsecret
-dev-libs/expat
-dev-libs/glib:2
-dev-libs/nspr
-media-libs/alsa-lib
-media-libs/mesa
-net-print/cups
-sys-apps/dbus
-x11-libs/cairo
-x11-libs/gdk-pixbuf:2
-x11-libs/libX11
-x11-libs/libXcomposite
-x11-libs/libXdamage
-x11-libs/libXext
-x11-libs/libXfixes
-x11-libs/libXrandr
-x11-libs/libdrm
-x11-libs/libxcb
-x11-libs/libxkbcommon
-x11-libs/pango
+RDEPEND="
+ x11-libs/gtk+:3
+ dev-libs/nss
+ app-accessibility/at-spi2-core
+ sys-apps/util-linux
+ app-crypt/libsecret
+ dev-libs/expat
+ dev-libs/glib:2
+ dev-libs/nspr
+ media-libs/alsa-lib
+ media-libs/mesa
+ net-p2p/kubo
+ net-print/cups
+ sys-apps/dbus
+ x11-libs/cairo
+ x11-libs/gdk-pixbuf:2
+ x11-libs/libnotify
+ x11-libs/libX11
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXext
+ x11-libs/libXfixes
+ x11-libs/libXrandr
+ x11-libs/libdrm
+ x11-libs/libxcb
+ x11-libs/libxkbcommon
+ x11-libs/libXScrnSaver
+ x11-libs/libXtst
+ x11-libs/pango
+ x11-misc/xdg-utils
"
QA_PREBUILT="*"
+
src_prepare(){
default
unpacker "${S}/usr/share/doc/ipfs-desktop/changelog.gz"
}
+
src_install(){
+ rm -r "${S}/opt/IPFS Desktop/resources/app.asar.unpacked/node_modules/kubo/kubo" || die
+
# clean up build-in kubo
insinto "/opt"
doins -r "${S}/opt/IPFS Desktop"
- dosym -r "/opt/IPFS Desktop/ipfs-desktop" "/usr/bin/ipfs-desktop"
+ make_wrapper ipfs-desktop "env KUBO_BINARY=$(which ipfs) /opt/IPFS\\ Desktop/ipfs-desktop"
domenu "${S}/usr/share/applications/ipfs-desktop.desktop"
dodoc "${S}/changelog"
insinto "/usr/share"
- # doins -r "${S}/usr/share/icons"
local size
for size in 16 32 48 64 128 256 512; do
doicon -s ${size} "${S}/usr/share/icons/hicolor/${size}x${size}/apps/ipfs-desktop.png"
@@ -62,13 +69,4 @@ src_install(){
fperms +x "/opt/IPFS Desktop/ipfs-desktop"
fperms +x "/opt/IPFS Desktop/chrome-sandbox"
fperms +x "/opt/IPFS Desktop/chrome_crashpad_handler"
- fperms +x "/opt/IPFS Desktop/resources/app.asar.unpacked/node_modules/kubo/kubo/ipfs"
-}
-
-pkg_postinst(){
- xdg_pkg_postinst
- optfeature "cli interface" net-p2p/kubo
-}
-pkg_postrm(){
- xdg_pkg_postrm
} |
but the xdg_pkg_postinst&postrm is necessary |
I changed my email address on bugzilla, should I re-post my application mail? |
It's called automatically if _postrm _postinst are not overwritten |
hmmm.... I would re-push and fix this to guru's dev branch on gitweb.gentoo.org, tomorrow |
I'm not sure what happened here, but whatever. Context: #251 (comment) Signed-off-by: Takuya Wakazono <[email protected]>
I guess you can close this PR given it's already on the tree |
I'm newbie here, am I do something wrong?