summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--content/en/slackware/mkhint/header.jpgbin0 -> 406608 bytes
-rw-r--r--content/en/slackware/mkhint/index.md123
-rw-r--r--content/en/slackware/mkhint/thumbnail.jpgbin0 -> 242235 bytes
-rw-r--r--content/it/slackware/mkhint/header.jpgbin0 -> 406608 bytes
-rw-r--r--content/it/slackware/mkhint/index.md125
-rw-r--r--content/it/slackware/mkhint/thumbnail.jpgbin0 -> 242235 bytes
m---------themes/danix-xyz-hacker0
7 files changed, 248 insertions, 0 deletions
diff --git a/content/en/slackware/mkhint/header.jpg b/content/en/slackware/mkhint/header.jpg
new file mode 100644
index 0000000..6c3322e
--- /dev/null
+++ b/content/en/slackware/mkhint/header.jpg
Binary files differ
diff --git a/content/en/slackware/mkhint/index.md b/content/en/slackware/mkhint/index.md
new file mode 100644
index 0000000..4f476c9
--- /dev/null
+++ b/content/en/slackware/mkhint/index.md
@@ -0,0 +1,123 @@
++++
+title = "mkhint"
+tagline = "Manage slackrepo hint files: bump versions, recompute checksums, track upstream releases."
+status = "active"
+repo_url = "https://git.danix.xyz/mkhintfile"
+tags = ["bash", "slackware", "slackrepo", "packaging"]
+
+[menus.main]
+ name = "hintfiles helper"
+ parent = "slackware"
+ weight = 10
++++
+
+**mkhint** is a single Bash script that takes the tedium out of maintaining
+[slackrepo](https://idlemoor.github.io/slackrepo/) *hint files*. A hint file
+overrides build details for an SBo package: which version to build, where to
+download the source, and the checksums to verify it. Keeping those in sync by
+hand, across dozens of packages, is exactly the kind of repetitive work a
+script should own.
+
+## What it does
+
+- **Update a hint** `-f package -v 2.0.1`: bump the version everywhere in the
+ file, re-download the source from `DOWNLOAD` / `DOWNLOAD_x86_64`, and recompute
+ `MD5SUM` / `MD5SUM_x86_64`. The old file is backed up to `.bak` first.
+- **Create a hint** `-n package`: generate a new hint from the matching
+ repository `.info` file, stripping the fields slackrepo does not want and
+ defaulting `ARCH` to `x86_64`. With no `.info`, it writes an empty skeleton.
+- **List** `-l`: print every hint with its `HintVer` (version in the hint) next
+ to the `SBOVer` (version in the repo `.info`), highlighting the rows where the
+ two are byte-equal so you can spot hints that have become redundant with
+ upstream.
+- **Review** `-R`: walk only those matched hints, showing each hint side by
+ side with its `.info` (`git diff --no-index`, falling back to `diff -y`), and
+ prompt to keep, delete, or skip.
+- **Check** `-C [package...]`: query
+ [nvchecker](https://github.com/lilydjwg/nvchecker) for the latest upstream
+ version of one, several, or all hints; report what is outdated; update accepted
+ packages with `nvtake`; and finish with a single `slackrepo update` prompt for
+ everything that changed.
+- **Housekeeping** `-d package` / `-c`: delete a hint and its backup, or clean
+ every `.bak` from the hint directory in one go.
+
+## Command reference
+
+```text
+mkhint - Manage hint files for slackrepo scripts
+
+Usage:
+ ./mkhint --version VERSION --hintfile FILE Update existing hint file
+ ./mkhint --version VERSION --new FILE Create new hint file
+ ./mkhint --new FILE Create new hint file (no version)
+ ./mkhint --hintfile FILE Update hint, suggest latest version via nvchecker
+ ./mkhint --check [FILE...] Check all (or named) hints for upstream updates
+ ./mkhint --list List hint files
+ ./mkhint --review Review hints matching SBo version, keep/delete each
+ ./mkhint --clean Remove .bak files from HINT_DIR
+ ./mkhint --no-dl --hintfile FILE Update hint, skip downloads, add NODOWNLOAD=yes
+ ./mkhint --no-dl --new FILE Create hint with NODOWNLOAD=yes
+ ./mkhint --help Show this help
+
+Options:
+ --version, -v VERSION New version string (required for --hintfile)
+ --hintfile, -f FILE Path to existing hint file (required with --version)
+ --new, -n FILE Create new hint file (required with --version or standalone)
+ --list, -l List all hint files in the default directory
+ --review, -R Review hints whose version matches the SBo .info; diff + keep/delete
+ --clean, -c Remove all .bak files from HINT_DIR
+ --check, -C [FILE...] Check hints for upstream updates via nvchecker, update interactively
+ --delete, -d FILE Delete a hint file (and .bak if present)
+ --no-dl, -N Skip downloads; add NODOWNLOAD=yes to hint file (use with -f or -n)
+ --help, -h Show this help message
+```
+
+## How it works
+
+mkhint is plain Bash with three small dependencies, each doing one job:
+
+- `wget` downloads archives so their MD5 can be computed,
+- `nvchecker` (and its companion `nvtake`) tracks upstream versions,
+- `jq` parses nvchecker's JSON output.
+
+Everything else is shell. Paths to the repository and the hint directory are
+two variables at the top of the script. The bash-completion file mirrors them,
+so `-f`, `-n`, `-d`, and `-C` autocomplete package names from the right
+directory, and `-v` even suggests the current version pulled straight from the
+named hint file.
+
+Multiline `DOWNLOAD` entries (a package with several source URLs) are handled
+carefully: the first URL is always re-fetched because the version changed,
+while each continuation URL is offered interactively so unchanged sources keep
+their existing checksum instead of being downloaded again for nothing.
+
+## Why it exists
+
+Maintaining a personal SBo overlay means a steady trickle of version bumps.
+Each one is the same dance: edit the version string, fetch the new tarball,
+recompute the checksum, hope you did not fat-finger a digit. mkhint turns that
+dance into one command, and the `--check` / `--list` / `--review` trio turns
+"which of my hints are now stale or pointless?" from a manual audit into a
+glance. It is the kind of small, sharp tool Slackware encourages: no daemon,
+no database, no framework, just a script that does one annoying job well.
+
+## Quick start
+
+```bash
+sudo cp mkhint /usr/local/bin/mkhint
+sudo cp mkhint.bash-completion /etc/bash-completion.d/mkhint
+
+# update an existing hint to a known version
+mkhint -f mypackage -v 2.0.1
+
+# create a new hint from the repo .info
+mkhint -n mypackage
+
+# see what upstream has moved on
+mkhint --check
+```
+
+Edit the `REPO_DIR` and `HINT_DIR` paths at the top of the script (and in the
+completion file) to match your setup before first use.
+
+{{< actions use="repo" url="https://git.danix.xyz/mkhintfile/" desc="Browse the source" caption="I hope you find it useful. If you maintain your own slackrepo overlay, mkhint might save you the same tedium it saves me. Patches and ideas are welcome." >}}
diff --git a/content/en/slackware/mkhint/thumbnail.jpg b/content/en/slackware/mkhint/thumbnail.jpg
new file mode 100644
index 0000000..dabefd5
--- /dev/null
+++ b/content/en/slackware/mkhint/thumbnail.jpg
Binary files differ
diff --git a/content/it/slackware/mkhint/header.jpg b/content/it/slackware/mkhint/header.jpg
new file mode 100644
index 0000000..6c3322e
--- /dev/null
+++ b/content/it/slackware/mkhint/header.jpg
Binary files differ
diff --git a/content/it/slackware/mkhint/index.md b/content/it/slackware/mkhint/index.md
new file mode 100644
index 0000000..9e2eb55
--- /dev/null
+++ b/content/it/slackware/mkhint/index.md
@@ -0,0 +1,125 @@
++++
+title = "mkhint"
+tagline = "Gestisce gli hint file di slackrepo: aggiorna versioni, ricalcola i checksum, segue i rilasci upstream."
+status = "active"
+repo_url = "https://git.danix.xyz/mkhintfile"
+tags = ["bash", "slackware", "slackrepo", "packaging"]
+
+[menus.main]
+ name = "hintfiles helper"
+ parent = "slackware"
+ weight = 10
++++
+
+**mkhint** è un singolo script Bash che elimina la noia di mantenere gli
+*hint file* di [slackrepo](https://idlemoor.github.io/slackrepo/). Un hint file
+sovrascrive i dettagli di build di un pacchetto SBo: quale versione compilare,
+da dove scaricare i sorgenti e i checksum con cui verificarli. Tenerli
+allineati a mano, su decine di pacchetti, è esattamente il tipo di lavoro
+ripetitivo che dovrebbe spettare a uno script.
+
+## Cosa fa
+
+- **Aggiorna un hint** `-f package -v 2.0.1`: porta la versione ovunque nel
+ file, riscarica i sorgenti da `DOWNLOAD` / `DOWNLOAD_x86_64` e ricalcola
+ `MD5SUM` / `MD5SUM_x86_64`. Il file precedente viene salvato in `.bak`.
+- **Crea un hint** `-n package`: genera un nuovo hint dal `.info`
+ corrispondente nel repository, rimuovendo i campi che slackrepo non vuole e
+ impostando `ARCH` a `x86_64`. Senza `.info`, scrive uno scheletro vuoto.
+- **Elenco** `-l`: stampa ogni hint con il suo `HintVer` (versione nell'hint)
+ accanto al `SBOVer` (versione nel `.info` del repository), evidenziando le
+ righe in cui i due valori coincidono byte per byte, così individui gli hint
+ ormai ridondanti rispetto all'upstream.
+- **Revisione** `-R`: scorre solo gli hint evidenziati, mostrando ciascuno
+ affiancato al suo `.info` (`git diff --no-index`, con ripiego su `diff -y`) e
+ chiedendo se tenere, cancellare o saltare.
+- **Controllo** `-C [package...]`: interroga
+ [nvchecker](https://github.com/lilydjwg/nvchecker) per l'ultima versione
+ upstream di uno, alcuni o tutti gli hint; segnala cosa è obsoleto; aggiorna i
+ pacchetti accettati con `nvtake`; e termina con un unico prompt
+ `slackrepo update` per tutto ciò che è cambiato.
+- **Manutenzione** `-d package` / `-c`: cancella un hint e il suo backup,
+ oppure rimuove tutti i `.bak` dalla directory degli hint in un colpo solo.
+
+## Riferimento dei comandi
+
+```text
+mkhint - Manage hint files for slackrepo scripts
+
+Usage:
+ ./mkhint --version VERSION --hintfile FILE Update existing hint file
+ ./mkhint --version VERSION --new FILE Create new hint file
+ ./mkhint --new FILE Create new hint file (no version)
+ ./mkhint --hintfile FILE Update hint, suggest latest version via nvchecker
+ ./mkhint --check [FILE...] Check all (or named) hints for upstream updates
+ ./mkhint --list List hint files
+ ./mkhint --review Review hints matching SBo version, keep/delete each
+ ./mkhint --clean Remove .bak files from HINT_DIR
+ ./mkhint --no-dl --hintfile FILE Update hint, skip downloads, add NODOWNLOAD=yes
+ ./mkhint --no-dl --new FILE Create hint with NODOWNLOAD=yes
+ ./mkhint --help Show this help
+
+Options:
+ --version, -v VERSION New version string (required for --hintfile)
+ --hintfile, -f FILE Path to existing hint file (required with --version)
+ --new, -n FILE Create new hint file (required with --version or standalone)
+ --list, -l List all hint files in the default directory
+ --review, -R Review hints whose version matches the SBo .info; diff + keep/delete
+ --clean, -c Remove all .bak files from HINT_DIR
+ --check, -C [FILE...] Check hints for upstream updates via nvchecker, update interactively
+ --delete, -d FILE Delete a hint file (and .bak if present)
+ --no-dl, -N Skip downloads; add NODOWNLOAD=yes to hint file (use with -f or -n)
+ --help, -h Show this help message
+```
+
+## Come funziona
+
+mkhint è puro Bash con tre piccole dipendenze, ciascuna con un compito solo:
+
+- `wget` scarica gli archivi per calcolarne l'MD5,
+- `nvchecker` (e il suo compagno `nvtake`) segue le versioni upstream,
+- `jq` analizza l'output JSON di nvchecker.
+
+Tutto il resto è shell. I percorsi del repository e della directory degli hint
+sono due variabili in cima allo script. Il file di bash-completion li rispecchia,
+così `-f`, `-n`, `-d` e `-C` completano i nomi dei pacchetti dalla directory
+giusta, e `-v` suggerisce persino la versione corrente letta direttamente
+dall'hint file indicato.
+
+Le voci `DOWNLOAD` multiriga (un pacchetto con più URL sorgente) sono gestite
+con cura: il primo URL viene sempre riscaricato perché la versione è cambiata,
+mentre ogni URL di continuazione viene proposto in modo interattivo, così i
+sorgenti invariati conservano il checksum esistente invece di essere riscaricati
+inutilmente.
+
+## Perché esiste
+
+Mantenere un overlay SBo personale significa un flusso costante di aggiornamenti
+di versione. Ogni volta la stessa danza: modificare la stringa di versione,
+scaricare il nuovo tarball, ricalcolare il checksum, sperare di non aver sbagliato
+una cifra. mkhint riduce quella danza a un comando, e il trio `--check` /
+`--list` / `--review` trasforma "quali dei miei hint sono ormai obsoleti o
+inutili?" da audit manuale a un'occhiata. È il tipo di strumento piccolo e
+affilato che Slackware incoraggia: niente demone, niente database, niente
+framework, solo uno script che fa bene un lavoro noioso.
+
+## Avvio rapido
+
+```bash
+sudo cp mkhint /usr/local/bin/mkhint
+sudo cp mkhint.bash-completion /etc/bash-completion.d/mkhint
+
+# aggiorna un hint esistente a una versione nota
+mkhint -f mypackage -v 2.0.1
+
+# crea un nuovo hint dal .info del repository
+mkhint -n mypackage
+
+# guarda cosa si è mosso a monte
+mkhint --check
+```
+
+Modifica i percorsi `REPO_DIR` e `HINT_DIR` in cima allo script (e nel file di
+completion) per adattarli alla tua configurazione prima del primo utilizzo.
+
+{{< actions use="repo" url="https://git.danix.xyz/mkhintfile/" desc="Sfoglia il sorgente" caption="Spero ti sia utile. Se mantieni un tuo overlay slackrepo, mkhint potrebbe risparmiarti la stessa noia che risparmia a me. Patch e idee sono benvenute." >}}
diff --git a/content/it/slackware/mkhint/thumbnail.jpg b/content/it/slackware/mkhint/thumbnail.jpg
new file mode 100644
index 0000000..dabefd5
--- /dev/null
+++ b/content/it/slackware/mkhint/thumbnail.jpg
Binary files differ
diff --git a/themes/danix-xyz-hacker b/themes/danix-xyz-hacker
-Subproject 9073908fb5e33c895b162d0418d6e67246af539
+Subproject 94ec68f7bc4a439b1373f754b202b0fa555b2d8