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: Sat, 20 Apr 2024 09:56:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

> Alright, I've had some time to do some fiddling.  In the auctex
> repository, there's some new main branch (based on externals/auctex)
> where I've changed how AUCTEXVERSION and AUCTEXDATE are determined.
> Instead of looking at specially formatted lines in ChangeLog, it just
> looks at the git diffs to check when there was a "+;; Version: ..."
> change in auctex.el.  It seems to work fine when I run "make -f
> GNUMakefile".

FWIW, the `elpa-admin.el` code needs to do something similar and it asks
Git a bit more directly (i.e. with the generating the diff):

               (elpaa--call
                (current-buffer)
                "git" "log" "-n1" "--oneline" "--no-patch"
                "--pretty=format:%H"
                (when (elpaa--spec-get pkg-spec :merge)
                  ;; Finding "the" revision when there's a merge involved is
                  ;; fundamentally unreliable.
                  ;; Ideally we should probably signal an error when the commit
                  ;; we found is not on all paths from FROM to avoid making an
                  ;; arbitrary choice.
                  ;; For `:merge'd packages, the commit that flipped `Version:'
                  ;; is usually not what we want, since that one was on the
                  ;; upstream branch, without our own changes.
                  ;; We use `--first-parent' for this reason, so it prefers
                  ;; the corresponding merge commit (which is not ideal either
                  ;; but is arguably the best we can do in that case).
                  "--first-parent")
                "-L" (concat "/^;;* *\\(Package-\\)\\?Version:/,+1:"
                             (file-name-nondirectory
                              (elpaa--main-file pkg-spec)))

The "%H" above makes it output the commit hash where `Version:` was
changed, so you can replace that with an appropriate % thingy to get the
date instead.

> Now I'd like to test building auctex.tar using your recipe.  I've
> checked out that new main branch into ../elpa/packages/auctex/ (or
> actually auctex is a symlink to my auctex clone).  With the current
> elpa-packages recipe
>
>    (auctex :url "https://git.savannah.gnu.org/git/auctex.git";
>            :news "NEWS.org")
>
> an auctex.tar is built successfully but apparently that didn't run the
> GNUMakefile, for example, tex-site.el isn't included because it's not
> generated from tex-site.el.in.

Indeed, by default we don't run any make or any such thing, we just tar
up the files.

> So I've tried to add :make "all" or even :shell-command "make -g
> GNUMakefile" to the auctex recipe

Sounds good.

> but then I get this error:
>
> --8<---------------cut here---------------start------------->8---
> ❯ make auctex.tar
> emacs --batch -Q -l admin/elpa-admin.el \
> -f elpaa-batch-pkg-spec-make-dependencies .pkg-descs.mk
> emacs --batch -l /home/horn/tmp/elpa/admin/elpa-admin.el        \
> -f elpaa-batch-make-one-tarball auctex.tar
> ======== Building tarball auctex.tar...
> Build error for auctex.tar: (error "Error-indicating exit code in 
> elpaa--call-sandboxed:
> bwrap: Can't bind mount /oldroot/home/horn/Repos/el/auctex on 
> /newroot/home/horn/tmp/elpa/packages/auctex/: Unable to mount source on 
> destination: No such file or directory
> ")
> ######## Build of package auctex.tar FAILED!!
> --8<---------------cut here---------------end--------------->8---
>
> What does that error try to tell me?

Good question.  I haven't seen this error yet, so I don't know.
Maybe the problem is in the "actually auctex is a symlink to my auctex
clone".

If you want to try and debug this, then edit the `elpa-config` file to
put

    (debug t)

in the config, so that you'll get a much more verbose output showing for
example exactly the `bwrap` command executed, which you can then
reproduce "by hand".

But another option is to disregard the problem: presumably you trust
AUCTeX's code, so you don't need to run that make recipe within
a sandbox to confine its misdeeds, and the above error will not appear
on `elpa.gnu.org`.
So, instead of (or in addition to, if you prefer) the above (debug t)
thingy, put:

    (sandbox nil)

so the commands are run without Bubblewrap.  


        Stefan




reply via email to

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