View previous topic :: View next topic |
Author |
Message |
vi2nano n00b
Joined: 24 Dec 2019 Posts: 4 Location: Iowa, USA
|
Posted: Thu Feb 06, 2020 4:15 am Post subject: ebuild - Local by Flywheel |
|
|
This is my first ever ebuild.
Please correct any mistakes as I'm sure there are enough to go around. It does install/run on my system. Fairly certain I have all of the dependencies at least.
Code: | # Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
MY_PN="local"
MY_PV=$(ver_rs 1- -)
MY_P="${MY_PN}-${MY_PV}"
inherit rpm xdg-utils
DESCRIPTION="A program to create a local WordPress development environment."
HOMEPAGE="https://localbyflywheel.com/"
SRC_URI="https://local-by-flywheel-flywheel.netdna-ssl.com/releases/${MY_PV}/${MY_P}-linux.rpm"
LICENSE="freedist"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
DEPEND="
sys-process/numactl
dev-libs/libaio
=sys-libs/ncurses-compat-5.9"
RDEPEND="${DEPEND}"
BDEPEND=""
S=${WORKDIR}
src_unpack() {
rpm_src_unpack ${A}
cd "${S}"
}
src_install() {
insinto /
doins -r "${S}"/usr
doins -r "${S}"/opt
fowners root:root /opt/Local/chrome-sandbox
fperms 4755 /opt/Local/chrome-sandbox
fperms 755 /opt/Local/local
}
pkg_postinst() {
xdg_desktop_database_update
xdg_mimeinfo_database_update
xdg_icon_cache_update
}
pkg_postrm() {
xdg_desktop_database_update
xdg_icon_cache_update
} |
_________________ Do or do not, there is no try |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Feb 06, 2020 7:20 am Post subject: |
|
|
Use "inherit xdg" instead of xdg-utils, it calls the xdg_* functions automatically so you don't have to. |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31255 Location: here
|
Posted: Thu Feb 06, 2020 7:34 am Post subject: Re: ebuild - Local by Flywheel |
|
|
Code: | # Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
MY_PN="local"
MY_PV=$(ver_rs 1- -)
MY_P="${MY_PN}-${MY_PV}"
inherit rpm xdg-utils
DESCRIPTION="A program to create a local WordPress development environment."
HOMEPAGE="https://localbyflywheel.com/"
SRC_URI="https://local-by-flywheel-flywheel.netdna-ssl.com/releases/${MY_PV}/${MY_P}-linux.rpm"
LICENSE="freedist"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
DEPEND="
sys-process/numactl
dev-libs/libaio
=sys-libs/ncurses-compat-5.9" |
I'm not sure if is better use <sys-libs/ncurses-compat-6.0 but in this case if ncurses-compat get a revision you can update it.
Code: | RDEPEND="${DEPEND}"
BDEPEND="" |
If you don't need BDEPEND remmove it
Code: | S=${WORKDIR}
src_unpack() {
rpm_src_unpack ${A}
cd "${S}"
}
src_install() {
insinto /
doins -r "${S}"/usr
doins -r "${S}"/opt
fowners root:root /opt/Local/chrome-sandbox
fperms 4755 /opt/Local/chrome-sandbox
fperms 755 /opt/Local/local
} |
You don't need use ${S} because you are already in this and I think same for ${A}.
In src_install you use fowners for root but I think is not needed because is already installed with this owner.
Set setuid (fperms 4755) isn't a good option. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
vi2nano n00b
Joined: 24 Dec 2019 Posts: 4 Location: Iowa, USA
|
Posted: Fri Feb 07, 2020 12:24 am Post subject: |
|
|
Thank you Ant P. I changed that and it's much more simple.
fedeliallalinea, I did change the ncurses depend just in case it gets a rev bump. I did also remove BDEPEND.
If I don't define ${S} portage complains that S' doesn't exist. I think it's because inside the binary are just the /opt and /usr folders, Instead of a folder with the app name.
If I only define ${S} but don't specify it in
It basically tries to reinstall everything in /usr to /usr and /opt to /opt, resetting permissions on everything. Yep, probably broke my system but that's fine.
I was able to do away with ${A} without any issue.
I added Code: | fowners root:root /opt/Local/chrome-sandbox
fperms 4755 /opt/Local/chrome-sandbox
|
specifically because if I didn't have it when I try to launch the installed application it complains
Code: | FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /opt/Local/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap |
Also was unable to launch from user session as the executable is not executable... so I added
Code: | fperms 755 /opt/Local/local |
Thank you for the feedback. _________________ Do or do not, there is no try |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 31255 Location: here
|
Posted: Fri Feb 07, 2020 6:48 am Post subject: |
|
|
vi2nano wrote: | If I don't define ${S} portage complains that S' doesn't exist. I think it's because inside the binary are just the /opt and /usr folders, Instead of a folder with the app name. |
S="${WORKDIR}" is ok, but doins -r ${S}/usr you can write simple doins -r usr because for doins ${S} is implied _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
|