auctex-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making AUCTeX ELPA releases from the master branch


From: Stefan Monnier
Subject: Re: Making AUCTeX ELPA releases from the master branch
Date: Tue, 09 Apr 2024 09:22:28 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Tassilo Horn [2024-04-09 14:09:53] wrote:

> Hi all,
>
> some weeks ago, Philip Kaludercic saw a commit of mine triggering a new
> AUCTeX ELPA release and asked why there were changes to files which
> shouldn't be committed because they are generated from other files,
> e.g., info files.
>
> The reason is that at the time where we added AUCTeX to ELPA (and
> created the externals/elpa branch for that purpose), the ELPA machinery
> wasn't able to perform our normal build procedure.  But Stefan Monnier
> chimed in and suggested that nowadays, those issues are most probably
> resolved or can be resolved in some less drastic way than a separate
> branch.  For example, building info manuals from multiple texi files
> residing in subdirectories are no problem anymore (one can specify `:doc
> ("doc/auctex.texi" "doc/preview-latex.texi")` in the ELPA package
> recipe) and we could have a separate elpa target in our Makefile and
> specify that as `:make "elpa"` in package recipe.
>
> I think it would be great if we could make it so that everyone of us
> could trigger a new ELPA release directly from the master branch by just
> incrementing the Version header which currently resides in auctex.el on
> the externals/elpa branch but which is generated from auctex.el.in on
> the master branch so not suitable for a Version header.  But no problem,
> the elpa recipe could specify some different `:main-file`.
>
> So basically, I see these challenges:
>
>   - We set the AUCTeX/preview version and date in the texi files from
>     AUCTEXVERSION, AUCTEXDATE, PREVIEWVERSION, and PREVIEWDATE which are
>     guessed by autoconf from the ChangeLog.1 and ChangeLog-preview files
>     which arranges that the *VERSION is just the same as the *DATE if
>     the top entry in the ChangeLogs is not a release entry in which case
>     the version is extracted there.
>
>     These ChangeLogs aren't usually edited.  Currently, the tarball
>     release process prepends the changes since the last tarball release,
>     and then the "release manager" (Mosè) adds an entry like
>
> --8<---------------cut here---------------start------------->8---
> 2024-01-17  Mosè Giordano  <mose@gnu.org>
>
>       * Version 13.3 released.
> --8<---------------cut here---------------end--------------->8---
>
>     on top.  So how should that work for ELPA releases?

For GNU ELPA releases,the "main" place where you keep version numbers
should be your "main file", ideally `auctex.el`.

So your make target will want to extract the version from there instead
of from the ChangeLog.  But that should be easy.  The "right" way would
be to fire an Emacs process and use `package-buffer-info` or just
`lm-header` to fetch the info.  But I'd use a `sed` one-liner.

That won't give you a date, tho.  You could try and use Git to find
a corresponding date, but personally, I'd just use the current date instead.

>   - There's also a completely different alternative: make the
>     externals/elpa the new "main" branch and drop master and tarball
>     releases altogether.  Is there still a justification for having
>     them?  I mean, we dropped XEmacs support anyway and it should be
>     easy enough for distros to just use the ELPA tarballs as basis for
>     their distro packages.

That's what I'd do if I were you, indeed.  🙂
But note that this will still require tweaking the GNUmakefile to fetch the
Version from the new place and a few things like that and changing the
recipe to add something like `:make "elpa"`.

>   - Mostly to Stefan: How can we test that safely?  I guess we'll find
>     some more issues.  I don't want to edit the AUCTeX recipe in
>     elpa-packages and then deploy broken packages to users.

You can also try and reproduce the build locally as follows:

    git clone --single-branch https://git.sv.gnu.org/git/emacs/elpa
    cd elpa
    make                  # Setup the infrastructure
    make packages/auctex  # Create a worktree of the package
    make auctex.tar       # Build the tarballs into `auctex.tar`

Note that the tarball is built from *the commit* rather than from the
current set of files (i.e. we start with `git stash` and we `git clean`
as well, IIRC, so be forewarned that it can throw away uncommitted data).

Once that's working, we can install it in `elpa.git` but without
changing the `Version:` header so it doesn't trigger a release: it will
still trigger building a new tarball in GNU-devel ELPA so we can confirm
that it all works according to plans.  And once we're satisfied with
http://elpa.gnu.org/devel/auctex.html, all that remains is to bump up
the `Version:`.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]