willghatch/racket-rash

RPM packaging

willghatch opened this issue · 3 comments

@bitstreamout in scheme/scsh#41 (comment) mentions:

Nice but it seems not to be possible to get the install tool raco to
install without trying to connect download.racket-lang.org which is
never allowed within a chroot/container build system. Also it requires
root permissions to get installed as system package ... currently I've
not found a way with raco to do this a build user below DESTDIR nor a
way to refresh /usr/share/racket/info-cache.rktd and
/usr/share/racket/pkgs/pkgs.rktd within a %post and %preun rpm scriplet
to get the informations below /usr/share/racket/ uptodate if the rpm
becomes installed.

To install a package with Raco without connecting to the package server you can git clone the package, cd into its directory, and run raco pkg install. You can do this in any directory, eg. DESTDIR. But you need to have its dependencies already installed. These dependencies are listed in the info.rkt file. Note that for Rash the git repository contains the rash package as well as the linea and shell-pipeline packages that it depends on.

However, I'm not sure how to deal with the info-cache.rktd or pkgs.rktd. If there are distro packages for any other Racket packages (IE besides the Racket base package) then they should all be pretty similar, so if this problem is solved anywhere it should be easy to copy that solution.

It seems, we recently got an (offline buildable) rpm package in openSUSE:
https://build.opensuse.org/package/show/openSUSE:Factory/rash

Cool! I guess I'll close this unless someone has an objection.