clasp-developers / clasp

clasp Common Lisp environment
https://clasp-developers.github.io/
2.54k stars 142 forks source link

Gentoo distro build script for 2.6.0 #1599

Closed mgsouth closed 5 days ago

mgsouth commented 1 week ago

New "ebuild" script used to create Gentoo Portage packages. Includes metadata & Manifest files.

Tested with both settng of the only flag (selects :faso or :bytecode-faso). Ran w/ regression tests, although they are not enabled in the distro package.

Users will need to download these three files to a local repository (instructions for createing local repos are on Gentoo wiki).

REPOPATH is path to that repository, such as "/var/db/repos/myrepo".

REPONAME is its label for Portage purposes.

As root:

mkdir -p REPOPATH/dev-lisp/clasp
(Download the three files in https://github.com/clasp-developers/clasp/gentoo/
 to REPOPATH/dev-lisp/clasp)
egencache --repo=REPONAME --update dev-lisp/clasp
egencache --repo=REPONAME --update-pkg-desc-index
egencache --repo=REPONAME --update-manifests --sign-manifests=n
emerge --ask -j 2 dev-lisp/clasp

Job limit can be bumped up if user has the RAM. I saw about 1GB used per core.

yitzchak commented 1 week ago

Does it need to be named with the version number in the files name? This creates a problem because we would have to rename them constantly. Also, we can't store a file with hashes for the tarball in the repo, since the tarball is generated from the repo. We should probably have a script that generates the manifest instead.

mgsouth commented 1 week ago

It's worse than renaming them. You have to create a new one (minor edits), and the Manifest file must be recreated. Should probably keep the older ones for as long as those particular tarballs are available.

mgsouth commented 1 week ago

Uh. Hm. chicken-and-egg here. Maybe the .ebuild, metadata, and Manifest should be external to the tarball.

mgsouth commented 1 week ago

It's possible for the user to generate the Manifest themselves. In fact, my install steps might already be doing it. So: No manifest in tarball. If not already doing it, have step for user to create it--those steps go into the Wiki page (build/install).

Again, hopefully Gentoo will pull the ebuild in. Then it will be on "them" (who might even be me) to update as part of normal distro maintenance.

mgsouth commented 1 week ago

What's the script/kago task for building new packages? I can update it to automatically generate the next .ebuild.

yitzchak commented 1 week ago

If you want to build the ebuild files as a result of creating a source archive that would probably be fine. The function that does that is here: https://github.com/clasp-developers/clasp/blob/main/src/koga/archive.lisp#L8. I'd make a separate function called gentoo-ebuild that takes the archive name and version string as arguments. Then call it at the end of the existing archive function. I'd dump the files into the gentoo/clasp/ directory and add the gentoo directory .gitignore so we don't commit it by mistake.

yitzchak commented 6 days ago

Once you have fixed the remaining minor issues please squash the commits.

mgsouth commented 5 days ago

Squashed. Didn't know the requester could do that to an in-progress PR...

yitzchak commented 5 days ago

Merged. Well done!