AUCTeX Sync -- Add a PKG_NOTES for synching tips
authorSteve Youngs <steve@sxemacs.org>
Sun, 5 Apr 2020 12:15:36 +0000 (22:15 +1000)
committerSteve Youngs <steve@sxemacs.org>
Sun, 5 Apr 2020 12:15:56 +0000 (22:15 +1000)
Signed-off-by: Steve Youngs <steve@sxemacs.org>
xemacs-packages/auctex/PKG_NOTES [new file with mode: 0644]

diff --git a/xemacs-packages/auctex/PKG_NOTES b/xemacs-packages/auctex/PKG_NOTES
new file mode 100644 (file)
index 0000000..279f1c8
--- /dev/null
@@ -0,0 +1,173 @@
+-*- mode: text -*-
+
+These notes are only relevant if you are planning to hack this package
+or sync it with the package's upstream.
+
+---[Note]---------------------------------------------------------------
+AUCTeX is not (yet) a "subtree" package.  It is my intention to
+convert it into one at some point in the future. But there are a few
+things I need to put in place and ensure that it all works OK before I
+unleash it onto an unsuspecting world.  Until then you can skip over
+all of the subtree-related stuff here and move straight to the
+"Pkg-Specific Quirks" section at the bottom.
+                            -----------
+
+This package was imported into the SXEmacs packages repository as a
+"subtree".  Most people, most of the time, will never need to know or
+care about that.  For all intents and purposes the fact that it came
+in as a subtree will be completely invisible.  It is only when you
+want to sync up with the external upstream repo that you need to care
+for a couple of things, as set out below...
+
+---[Pre-Requisites]-----------------------------------------------------
+AUCTeX isn't subtree yet, skip this section.
+
+First up, a couple of additions to your git config, if you haven't
+already done so:
+
+Staying out of conflict hell:
+
+       git config rerere.enabled true
+       git config rerere.autoupdate true
+
+git-rerere is something that is so handy that you'd probably want to
+turn it on globally, so perhaps add '--global' to those commands
+above.  You won't regret it.
+
+Needed custom merge driver:
+
+       git config merge.sxepkg.driver true
+
+For the packages that have come into our repo as a subtree there are
+often files that we don't ever want overwritten or changed when we pull
+in updates from upstream.  It is usually things like '.gitignore' or
+'Makefile'.  Instead of dealing with conflicts, or having to manually
+check and re-edit, we use a custom merge driver that makes git believe
+that a successful merge has happened so no changes need to be applied
+to the local file.
+
+The first half of achieving that is what the above command sets up.
+Please note, the config entry 'merge.sxepkg.driver' is not a bool.
+The 'true' refers to the command true(1), often /bin/true, or a shell
+built-in. 
+
+The other half of the magic is in '.gitattributes' in the toplevel of
+our repo.  It'll have entries like...
+
+    xemacs-packages/gnus/.gitignore merge=sxepkg
+    xemacs-packages/riece/.gitignore merge=sxepkg
+
+
+Add the upstream repo as a remote:
+
+       git remote add gnus https://git.sxemacs.org/gnus
+       git config remote.gnus.tagOpt --no-tags
+
+
+---[Updating]-----------------------------------------------------------
+AUCTeX isn't subtree yet, skip this section.
+
+OK, so you want to sync up our Gnus package with the upstream, here
+is what you do...
+
+It is safest to do this from our repo's toplevel directory so that is
+what the first command here does, puts you in the right directory...
+
+     cd $(git rev-parse --show-toplevel) &&
+     git checkout -b pkgsync &&
+     git fetch gnus &&
+     git merge -X subtree=xemacs-packages/gnus --squash gnus/master
+
+Notice that the merge command is using '--squash', so nothing has been
+committed yet.  You can now look over the changes (git-status,
+git-diff, etc), test build, make any needed tweaks or changes that the
+sync may have caused, or whatever else you may need to do to get the
+updated package playing nice with our packages.
+
+Once you have it all ready you'd follow pretty much the same steps as
+you would when submitting patches/contributions to SXEmacs itself.
+See:
+
+       (Info-goto-node "(sppm)Patches")
+
+Note that is SXEmacs specific, not package specific, so please apply
+common sense while reading it.  The SPPM will be updated shortly for
+packages. 
+
+Please note, and this is REALLY IMPORTANT, if you make changes to this
+package that should be sent upstream, you MUST put those changes into
+their own self-contained separate commits.  The reason for that is so
+we can cherry-pick them out and send them upstream.
+
+
+---[Pkg-Specific Quirks]------------------------------------------------
+This will change, but for the time being, before you can update our
+AUCTeX package you must be able to answer "yes" to at least one of the
+following questions:
+
+  1) Did you clone the upstream AUCTeX repo from a URL that began,
+     "https://git.sxemacs.org/" and _didn't_ have the word, "packages"
+     in it?
+
+  2) When you look in the mirror, do you see Steve Youngs looking back
+     at you?
+
+AUCTeX is a big and complicated package.  For that reason, synching is
+often a pretty huge task.  The upstream have ripped out all of the
+XEmacs (and hence, SXEmacs) compatibility code.  So synching is HARD,
+damned HARD.
+
+I have a local clone of the upstream repo in which I have branched at
+the last know XEmacs-compatible release.  That was v11.92.  From that
+point I will be cherry-picking individual patches into my branch and
+with a lot of luck I may be able to creep our AUCTeX package ever
+closer to the upstream mainline.  Note: I do not believe it will be
+possible to match them, but it should be possible to get close.
+
+The first thing you need to do to update is jump into the upstream
+repo and run 'autogen.sh' and 'configure --with-xemacs=sxemacs'.
+There is no need to run 'make', we have what we need after the
+configure run.
+
+Version strings/numbers:
+-----------------------
+Look in preview.el, tex-site.el.out, doc/version.texi
+
+,----[ tex-site.el.out (See below for more on this pig)]
+| (defconst AUCTeX-version "release_11_92"
+|     "AUCTeX version.
+| If not a regular release, the date of the last change.")
+| 
+| (defconst AUCTeX-date "2017-12-03"
+|   "AUCTeX release date using the ISO 8601 format, yyyy-mm-dd.")
+`----
+
+,----[ preview.el ]
+| (defconst preview-version "release_11_92"
+|   "Preview version.
+| If not a regular release, the date of the last change.")
+| 
+| (defconst preview-release-date "2017-12-03"
+|   "Preview release date using the ISO 8601 format, yyyy-mm-dd.")
+`----
+
+,----[ version.texi ]
+| @set VERSION release_11_92
+| @set UPDATED 2017-12-03
+`----
+
+Change "release_11_92" to "11.92" in all of those.
+
+Special Note: tex-site.el
+-------------------------
+Don't blindly update this file without checking through it.  The
+version we keep in our package repo has sane and sensible default
+settings.  Especially do not change 'TeX-auto-global'.
+
+
+*** NOTE ***
+If you make any changes that should be sent upstream, those changes
+MUST be in their own self-contained commit so that they can be easily
+cherry-picked. 
+
+------------------------------------------------------------------------