Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

How do I manage 3rd-party dependencies in ebuilds?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
21 posts • Page 1 of 1
Author
Message
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

How do I manage 3rd-party dependencies in ebuilds?

  • Quote

Post by leyvi » Mon Dec 08, 2025 6:38 am

When writing ebuilds, how do I manage 3rd-party dependencies from other package managers, like npm, pip, etc?
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Mon Dec 08, 2025 7:00 am

Write ebuilds for them.

Best Regards,
Georgi
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Mon Dec 08, 2025 7:33 am

logrusx wrote:Write ebuilds for them.

Best Regards,
Georgi
That's easy enough for Python packages, now I see there's an eclass for that.

But what about npm packages? I can't find any ebuilds for npm packages in the Gentoo repository…
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Mon Dec 08, 2025 7:56 am

Go ask in #gentoo-dev-help. If they can't give you a direction, you're on your own.

Best Regards,
Georgi
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4693
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

We need npm.eclass?

  • Quote

Post by Zucca » Mon Dec 08, 2025 8:49 am

Seems like we miss npm.eclass.
I only checked ::gentoo and ::guru.
..: Zucca :..

Code: Select all

init=/sbin/openrc-init
-systemd -logind -elogind seatd
I am NaN! I am a man!
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Mon Dec 08, 2025 8:54 am

Npm is very messy and I guess that's why there isn't an eleclass for it. I'm not an expert and JS and node.js are far away from me but I think we're not likely to see an eclass for that. Moreover I think if something needs npm package it must be npm itself and can be managed on a per-user basis.

In fact, Leyvi, are you sure you need that thing avaliable system-wide or you need it only for your regular user? I mean writing ebuilds is a good thing but not all things need ebuilds.

Best Regards,
Georgi
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Mon Dec 08, 2025 9:15 am

logrusx wrote:Npm is very messy and I guess that's why there isn't an eleclass for it. I'm not an expert and JS and node.js are far away from me but I think we're not likely to see an eclass for that. Moreover I think if something needs npm package it must be npm itself and can be managed on a per-user basis.

In fact, Leyvi, are you sure you need that thing avaliable system-wide or you need it only for your regular user? I mean writing ebuilds is a good thing but not all things need ebuilds.

Best Regards,
Georgi
It's a web server (not a framework, it serves a web application) and I'd like to make it less annoying to install from GitHub.

On a side note: is there a way to have an ebuild create other package formats? That is, could I make it so that once done, a .rpm or .deb package is created?

This thing I'm making an ebuild for is GPL-3, but isn't distributed anywhere. FOSS is always better when it's accessible.
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

Re: We need npm.eclass?

  • Quote

Post by leyvi » Mon Dec 08, 2025 9:22 am

Zucca wrote:Seems like we miss npm.eclass.
I only checked ::gentoo and ::guru.
Adding to what logrusx said: npm feels very un-gentoo to me. Everyone here likes sh, perl, lisp, or python. JavaScript fits in with those languages about as well as AmongOS fits in with RHEL and Amazon Linux.
Last edited by leyvi on Mon Dec 08, 2025 9:27 am, edited 2 times in total.
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Mon Dec 08, 2025 9:25 am

If there are Deb or rpm packages already, you can write an ebuild that merges them. It would be very similar to what -bin ebuilds do. There are eclassrs for that as well (I think...)
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Mon Dec 08, 2025 9:29 am

logrusx wrote:If there are Deb or rpm packages already, you can write an ebuild that merges them. It would be very similar to what -bin ebuilds do. There are eclassrs for that as well (I think...)
leyvi wrote:This thing I'm making an ebuild for is GPL-3, but isn't distributed anywhere.
I'd like to make an ebuild for it, then maybe also package it for other package managers, if possible. I don't want to have to learn about other package managers though, I'd like it to be automatic.
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Mon Dec 08, 2025 9:31 am

I guess I experienced a stack overflow and that part fell off of the stack :D
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Mon Dec 08, 2025 9:34 am

Unfortunately I can only run circles around the issue, but you could still automate the prices of installing it from github the way you do it now with scripts?

Best Regards,
Georgi
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Mon Dec 08, 2025 9:55 am

logrusx wrote:I guess I experienced a stack overflow and that part fell off of the stack :D
:lol:
Top
Zucca
Administrator
Administrator
User avatar
Posts: 4693
Joined: Thu Jun 14, 2007 10:31 pm
Location: Rasi, Finland
Contact:
Contact Zucca
Website

  • Quote

Post by Zucca » Mon Dec 08, 2025 10:02 am

It seems like every language which provides its own package manager and repository is a problem that needs to be circumvented.
The first problem is that the package configuring, compilation and installation (among other phases) happens in sandboxed networkless environment.
Then there are several other problems, to which I won't go into here.
..: Zucca :..

Code: Select all

init=/sbin/openrc-init
-systemd -logind -elogind seatd
I am NaN! I am a man!
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Mon Dec 08, 2025 10:04 am

logrusx wrote:Unfortunately I can only run circles around the issue, but you could still automate the prices of installing it from github the way you do it now with scripts?

Best Regards,
Georgi
Sure, but that's harder to distribute than a package or something like an ebuild.
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Mon Dec 08, 2025 10:06 am

Zucca wrote:It seems like every language which provides its own package manager and repository is a problem that needs to be circumvented.
The first problem is that the package configuring, compilation and installation (among other phases) happens in sandboxed networkless environment.
Then there are several other problems, to which I won't go into here.
Should I write a bug report? (No eclass for building npm packages.)
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Mon Dec 08, 2025 10:12 am

You can. Whether you should is up to you. Either way search the tracker.

Best Regards,
Georgi
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Mon Dec 08, 2025 10:40 am

logrusx wrote:You can. Whether you should is up to you. Either way search the tracker.

Best Regards,
Georgi
There were no existing bugs, so I made a feature request.
Top
logrusx
Advocate
Advocate
User avatar
Posts: 3533
Joined: Thu Feb 22, 2018 2:29 pm

  • Quote

Post by logrusx » Mon Dec 08, 2025 11:00 am

So you've got a suggestion in the bug. I knew there must be something in portage that deals with this matter already.

Best Regards,
Georgi
Top
leyvi
l33t
l33t
Posts: 719
Joined: Fri Sep 08, 2023 1:22 pm

  • Quote

Post by leyvi » Mon Dec 08, 2025 11:14 am

Thanks everyone!
Top
Genone
Retired Dev
Retired Dev
User avatar
Posts: 9656
Joined: Fri Mar 14, 2003 6:02 pm
Location: beyond the rim

  • Quote

Post by Genone » Fri Dec 12, 2025 1:44 pm

leyvi wrote:I'd like to make an ebuild for it, then maybe also package it for other package managers, if possible. I don't want to have to learn about other package managers though, I'd like it to be automatic.
That is a pipe dream unfortunately. While you could convert a binary Gentoo package into an rpm or deb package technically, the result wouldn't be very useful, due to significant differences in the underlying systems.
If you want a universal distribution platform best to look into Docker.
Top
Post Reply

21 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic