View previous topic :: View next topic |
Author |
Message |
M95D Tux's lil' helper
Joined: 03 Jan 2020 Posts: 94
|
Posted: Sun Jul 21, 2024 4:14 pm Post subject: How to install Alpine packages on Gentoo? |
|
|
Hi.
I need to install a package from Alpine Linux on a Gentoo system. Did anyone try this before?
I am aware that portage has packages.provided for this purpose. I am mostly interested in how to actually install the package (extract, copy files, create config files, startup, etc.) and not contaminate the Gentoo install too much. It would be best if I could install it entirely in /opt.
Thank you.
PS: The question is related to this topic:
https://forums.gentoo.org/viewtopic-t-1170031.html |
|
Back to top |
|
|
eschwartz Developer
Joined: 29 Oct 2023 Posts: 214
|
Posted: Sun Jul 21, 2024 4:39 pm Post subject: |
|
|
You could go to https://dl-cdn.alpinelinux.org/alpine/edge/community/armv7/ and download any of these apk files:
Code: |
openjdk8-8.402.06-r0.apk 27-Mar-2024 19:29 48K
openjdk8-dbg-8.402.06-r0.apk 27-Mar-2024 19:29 58M
openjdk8-demos-8.402.06-r0.apk 27-Mar-2024 19:29 2M
openjdk8-doc-8.402.06-r0.apk 27-Mar-2024 19:29 380K
openjdk8-jdk-8.402.06-r0.apk 27-Mar-2024 19:29 15M
openjdk8-jre-8.402.06-r0.apk 27-Mar-2024 19:29 296K
openjdk8-jre-base-8.402.06-r0.apk 27-Mar-2024 19:29 3M
openjdk8-jre-lib-8.402.06-r0.apk 27-Mar-2024 19:30 42M
|
And then you would write an ebuild that unpacks the apks into /opt, In particular I think you're going to need jre-lib, jre-base, and jre.
Note that all versions after 8 have comments in the alpine packaging observing that upstream doesn't support 32-bit anymore. |
|
Back to top |
|
|
M95D Tux's lil' helper
Joined: 03 Jan 2020 Posts: 94
|
Posted: Sun Jul 21, 2024 5:20 pm Post subject: |
|
|
eschwartz wrote: | [...] then you would write an ebuild that unpacks the apks into /opt, In particular I think you're going to need jre-lib, jre-base, and jre. |
Thanks, but I need more details, please:
- Each of those in it's own dir? Or all together?
- Do I need something extra in $PATH?
- Can't I just unpack them without an ebuild? I never wrote an ebuild before and I don't plan to keep the Alpine package. I just need it for a normal emerge with "system-bootstrap" and then remove it.
eschwartz wrote: | Note that all versions after 8 have comments in the alpine packaging observing that upstream doesn't support 32-bit anymore. |
SH|$! F@*#! G0# D4#%|$!
More e-waste. |
|
Back to top |
|
|
pingtoo Veteran
Joined: 10 Sep 2021 Posts: 1233 Location: Richmond Hill, Canada
|
Posted: Sun Jul 21, 2024 5:40 pm Post subject: |
|
|
M95D,
If you need a Gentoo solution, I have none to offer.
If you just want java work for your system. I suggest - Use a container
- setup a alpinelinux chroot env.
Container is straightward, just install docker/pacman
for chroot, setup a directory, download alpnelinux mini-root and unpack into the directory, do the usual chroot setup and can install package from there. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22612
|
Posted: Sun Jul 21, 2024 6:14 pm Post subject: |
|
|
M95D wrote: | eschwartz wrote: | Note that all versions after 8 have comments in the alpine packaging observing that upstream doesn't support 32-bit anymore. | More e-waste. | [Swearing dropped from the quote.] It's only e-waste if you discard your hardware due to it. You only need to discard your hardware if you cannot support your use cases with what you have available. Upstream withdrawing unpaid support for 32-bit doesn't mean that newer versions will definitely fail on 32-bit systems. It only means upstream will show little or no interest if it breaks, so you are on your own to support future versions.
There's also an argument that continuing to support systems that have a very small marketshare is itself e-waste, in terms of CPU time and storage spent on a package that almost no one is able to use. By that angle, withdrawing support for minimally used systems may be a net positive. |
|
Back to top |
|
|
eschwartz Developer
Joined: 29 Oct 2023 Posts: 214
|
Posted: Sun Jul 21, 2024 6:21 pm Post subject: |
|
|
M95D wrote: | eschwartz wrote: | [...] then you would write an ebuild that unpacks the apks into /opt, In particular I think you're going to need jre-lib, jre-base, and jre. |
Thanks, but I need more details, please:
- Each of those in it's own dir? Or all together?
|
All together into a single directory.
Quote: |
- Do I need something extra in $PATH?
|
The existing openjdk-bin package has this:
Code: |
# provide stable symlink
dosym "${P}" "/opt/${PN}-${SLOT}"
java-vm_install-env "${FILESDIR}"/${PN}.env.sh
java-vm_set-pax-markings "${ddest}"
java-vm_revdep-mask
|
The java-vm functions come from an eclass that automatically sets things up so that java-config works. It should be relatively simple as it's practically just setting up JAVA_HOME.
Quote: |
- Can't I just unpack them without an ebuild? I never wrote an ebuild before and I don't plan to keep the Alpine package. I just need it for a normal emerge with "system-bootstrap" and then remove it.
|
Probably, but I haven't tried it...
Quote: |
eschwartz wrote: | Note that all versions after 8 have comments in the alpine packaging observing that upstream doesn't support 32-bit anymore. |
SH|$! F@*#! G0# D4#%|$!
More e-waste. |
Yes, unfortunately that does tend to happen especially for overly commercialized software. Then again, I don't actually like Java in the first place...
It may still work even if not officially supported. The problem is getting bootstrapped binaries, but -- you may be able to bootstrap by using java 8 to compile the non-bin package for the next version and work your way up from there.
Some more fun reading: http://bootstrappable.org/projects/java.html |
|
Back to top |
|
|
|