aboutsummaryrefslogtreecommitdiff
path: root/reproduce/analysis/make/initialize.mk
diff options
context:
space:
mode:
authorMohammad Akhlaghi <mohammad@akhlaghi.org>2026-07-03 16:23:00 +0200
committerMohammad Akhlaghi <mohammad@akhlaghi.org>2026-07-03 19:22:40 +0200
commit4cfa34b1e101adcd050a476307b7680db8afcd8e (patch)
tree34e84bf02232f61b4ad2e38c1359d030d25630ca /reproduce/analysis/make/initialize.mk
parentd99b69fdb52f2fd522f53bba29a42d3ba8af5361 (diff)
Configuration: fixed portability issues, add jq and updated GCCHEADmaneage
Summary: this commit will not affect your analysis: only the version of GCC has been updated for portability and jq (a JSON parser) has been added. Until now, several portability issues existed in Maneage, causing problems mostl on macOS, but some also some on GNU/Linux. They are listed below along with the fix. With this commit, the problems mentioned above have been fixed: - 'pkg-config' on macOS needed some manual steps for a successful installation. The cause was its improper checks on the macOS "carbon" library. So we now manually fix this check within the code to fix the problem. This was found and fixed by Martin Wiesmann. - Apple chip variants like M1 Pro, M1 Max, M1 Ultra, M2 Pro, etc could not be properly recognized as a macOS system since we expected a single word. This was solved by using pattern matching instead. Found and fixed by Martin Wiesmann. - macOS's sha512sum wraps the 128-character hex hash across two output lines (80 + 48 chars) and the command that we used to read the output would only captured the first 80 characters, so checksums never matched. The solution was to merge the lines before the check. Found and fixed by Martin Wiesmann. - When a checksum failed, the script exited with an error but left the bad '.unchecked' file on disk. On the next run, the download script saw the file already existed and skipped downloading entirely. As a result, the corrupt file was passed to the checksum check again, failing forever. The fix was to remove the file when we confirmed a bad download. Found and fixed by Martin Wiesmann. - When the server of a file returns a HTML output instead of the file we want, the download script could not detect and would assume that the download was successful. Therefore, it would always crash with a checksum error. The fix was to check the first few bytes of the output and consider it failed if we detect '<html' in them. Found and fixed by Martin Wiesmann. - Unzip could not be built due to linking to old C library constructs. The fix was to edit that part of the code before starting the build. Found and fixed by Faezeh Bidjarchian. - top-prepare.mk: in a few cases, we had incorrectly written './project prepare' (which does not exist!); by Mohammad Akhlaghi. - Tar's 'acl' features were causing crashes with GCC 16.1.1 on an Arch GNU/Linux. Since this feature is not relevant in Maneage, the fix was to disable it; by Mohammad Akhlaghi. - To disable CFITSIO's fortran library (which could be problematic in macOS), we were using the wrong command! Found and fixed by Martin Wiesmann. - GCC 15.2.0 (the previous version on the 'maneage' branch) needed more patches to build with deprecated Linux headers (that are no longer present in Arch GNU/Linux, and will be removed from other distros in due time). The fix was to upgrade GCC to the latest version of 16.1.0 by Mohammad Akhlaghi. - Zenodo is no longer checked at the start of the Maneage configuration. This is because from early 2025, Zenodo does not allow having so many files in a single project, as described in this task: https://savannah.nongnu.org/task/?16621. Therefore many of the new software (since then) are no longer on Zenodo. Implemented by Mohammad Akhlaghi. - initialize.mk: when there was no 'maneage' branch in the project, a warning was printed when writing the LaTeX macros. However, this is only relevant when compiling the PDF. So when the user hasn't activated the PDF creation variable, this warning was not relevant and was just annoying. The fix was to put a condition and only print it when it can be useful by Mohammad Akhlaghi. - README-hacking.md: - There was no checklist for maintainers; by Mohammad Akhlaghi - Incorrect arXiv URL to Eskandarlou+2026; found by Boud Roukema. Furthermore, the jq program has been added to Maneage with this commit; it is useful when it is necessary to parse/edit JSON files.
Diffstat (limited to 'reproduce/analysis/make/initialize.mk')
-rw-r--r--reproduce/analysis/make/initialize.mk41
1 files changed, 27 insertions, 14 deletions
diff --git a/reproduce/analysis/make/initialize.mk b/reproduce/analysis/make/initialize.mk
index 7aefd3f..2752f47 100644
--- a/reproduce/analysis/make/initialize.mk
+++ b/reproduce/analysis/make/initialize.mk
@@ -685,27 +685,40 @@ $(mtexdir)/initialize.tex:
# Calculate the latest Maneage commit used to build this project:
# - The project may not have the 'maneage' branch (for example
# after cloning from a fork that didn't include it!). In this
-# case, we'll print a descriptive warning, telling the user what
-# should be done (reporting the last merged commit and its date
-# is very useful for the future).
+# case, if a PDF is to be created, print a descriptive warning,
+# telling the user what should be done (reporting the last merged
+# commit and its date is very useful for the future).
+# - This is not relevant when no PDF is requested because we only
+# use this to print the latest Maneage commit as a LaTeX macro.
# - The '--dirty' option (used in 'project-commit-hash') isn't
# applicable to "commit-ishes" (direct quote from Git's error
-# message!).
+# message!), so no need to include it here.
if git log maneage -1 &> /dev/null; then
c=$$(git merge-base HEAD maneage)
v=$$(git describe --always --long $$c)
d=$$(git show -s --format=%aD $$v | awk '{print $$2, $$3, $$4}')
+
+# No 'maneage' branch found
else
- echo
- echo "WARNING: no 'maneage' branch found! Without it, the latest merge of "
- echo "this project with Maneage can't be reported in the paper (which is bad "
- echo "for your readers; that includes yourself in a few years). Please run "
- echo "the commands below to fetch the 'maneage' branch from its own server "
- echo "and remove this warning (these commands will not affect your project):"
- echo " $ git remote add origin-maneage http://git.maneage.org/project.git"
- echo " $ git fetch origin-maneage"
- echo " $ git branch maneage --track origin-maneage/maneage"
- echo
+
+# Only print a warning if a PDF is to be created.
+ if [ x$(pdf-build-final) = xyes ]; then
+ echo
+ printf "WARNING: no 'maneage' branch found! Without it, "
+ printf "the latest merge of this project with Maneage can't "
+ printf "be reported in the paper (which is bad for your "
+ printf "readers; that includes yourself in a few years). "
+ printf "Please run the commands below to fetch the "
+ printf "'maneage' branch from its own server and remove "
+ printf "this warning (these commands will not affect your "
+ printf "project):\n"
+ printf " $ git remote add origin-maneage "
+ printf "http://git.maneage.org/project.git\n"
+ printf " $ git fetch origin-maneage\n"
+ printf " $ git branch maneage --track "
+ printf "origin-maneage/maneage\n"
+ echo
+ fi
v="\textcolor{red}{NO-MANEAGE-BRANCH (see printed warning to fix this)}"
d="\textcolor{red}{NO-MANEAGE-DATE}"
fi