You are not logged in.

#1 2017-12-13 05:27:04

khouli
Member
Registered: 2014-12-14
Posts: 70

How to handle packages in lang package manager but not AUR for newbs?

What is the recommended way to handle packages that are in a language package manager (e.g. Rust's Cargo, Python's pip, OCaml's OPAM, Haskell's Cabal, etc.) but not in the official Arch repositories or in AUR?

I've seen it recommended several times not to let more than one package manager install system-wide packages. At the same time, I regularly have a package I want to install on my Arch box that is only available in a language package manager but not the official repos or AUR. What is the recommended way to handle this with minimal future maintenance?

Is there a way to tell pacman to delegate package management and installation to another program?

Is the "right" way to deal with this situation to read through the wiki and add a package to the AUR?

As a newbie, I'm shy about the commitment of maintaining an AUR package.

Offline

#2 2017-12-13 09:22:16

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: How to handle packages in lang package manager but not AUR for newbs?

khouli wrote:

Is the "right" way to deal with this situation to read through the wiki and add a package to the AUR?

Correct.

Writing an AUR package is usually much easier than it sounds, and you can always post here for feedback before uploading.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2017-12-13 09:57:21

khouli
Member
Registered: 2014-12-14
Posts: 70

Re: How to handle packages in lang package manager but not AUR for newbs?

Alright, I'll make a serious effort to find something I'm using that isn't in the AUR and try to commit it in the next 2 weeks.

Again, this is something I'm shy about and I need some reassurance. Will others be significantly burdened if I add an AUR package and later lose interest or badly bungle the packaging or reply slowly, if ever, to comments or emails about the package? As an extreme, if I add a package to the AUR and then go 100% deadbeat, would anyone be worse off than they were before because of me? I'm not *planning* to leave others hanging, but I'm working on my email etiquette and the packages I do find that aren't in the AUR are often items of niche interest that I'm only exploring and after installing and test-driving for a bit, I might find that it's not as interesting as I thought.

Is it maybe a better idea to make a PKGBUILD, install it, and then sit on it for a week/month before uploading it to the AUR?

Offline

#4 2017-12-13 12:55:15

Muflone
Package Maintainer (PM)
From: Italy
Registered: 2013-10-08
Posts: 107
Website

Re: How to handle packages in lang package manager but not AUR for newbs?

Hi

If you don't intend to maintain the package in the AUR you don't have to submit forcefully.

You can straight make your PKGBUILD, install into your system and update it occasionally from your own system whenever you want without submit it to the AUR.

Another option would be to load it to AUR and then orphan it but it's heavily discouraged because orphaned and unmaintained package will be deleted without any warning.

Offline

#5 2017-12-13 13:22:29

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,534
Website

Re: How to handle packages in lang package manager but not AUR for newbs?

khouli wrote:

Is there a way to tell pacman to delegate package management and installation to another program?

In a way, yes.  A PKGBUILD is essentially how you tell pacman about this.

Whatever commands you would use to install through the other package manager (e.g. `pip install ...`) go in the PKGBUILD often with very minimal modification.  Then you use makepkg to trigger the running of those commands and pacman then knows about the results.

This is a slight simplification, but not an oversimplification.  A PKGBUILD is very little more than a listing of the commands needed to install the software.  Add a few descriptive variables, and ensure the other package manager has a target/install-root of $pkgir and that's it.

Muflone wrote:

You can straight make your PKGBUILD, install into your system ... without submit it to the AUR.

Agreed.

If it works well and may be of interest to others, please consider sharing it via the AUR.  But if you do not have any intent of maintaining it, then just use the PKGBUILD for yourself and do not submit it.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2017-12-13 13:39:08

Lone_Wolf
Forum Moderator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,925

Re: How to handle packages in lang package manager but not AUR for newbs?

You could also "publish" the PKGBUILD in Creating & Modifying Packages board and ask for comments.
Even if it gets never uploaded to AUR, it will still be findable for other users that way.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2017-12-13 15:46:07

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to handle packages in lang package manager but not AUR for newbs?

Agreed that as a general rule of thumb you should create a PKGBUILD.

That being said, just like you *can* install a package using `./configure; make; sudo make install` and have it install to /usr/local instead of /usr, you can install Python packages using `pip install --user` or even with a virtualenv. By the way, python3 comes with a builtin venv module which is quite handy. smile

More generally, haskell and rust packages can be built and installed to /usr/local -- I believe with both languages, it is common to build statically linked binaries, so this should be fairly safe even if it is a lot more elegant and clean to build via a PKGBUILD and install via the package manager.

ArchHaskell also uses their cblrepo tool to maintain their Haskell ABS tree and publish their unofficial repository of packages.

I have absolutely no idea about OCaml though.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2017-12-13 16:34:04

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: How to handle packages in lang package manager but not AUR for newbs?

As long as you keep in in $HOME and never ever run them as root then using pip/cargo/go is fine


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB