diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-12-06 08:43:04 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-12-07 09:41:15 -0700 |
commit | 6f0ef4a50aabbaed05c4d6f6c1d7c5a409b437c2 (patch) | |
tree | ede6b6f3e56591e7c8139748353ef6521b850c27 /lib-src | |
parent | d317674a62e8301771394e2b43eb5e50f929100c (diff) | |
download | dotfiles-6f0ef4a50aabbaed05c4d6f6c1d7c5a409b437c2.tar.gz |
tidy up primary myrepos configuration
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/mr/config | 473 |
1 files changed, 144 insertions, 329 deletions
diff --git a/lib-src/mr/config b/lib-src/mr/config index dd9efe12..449fc013 100644 --- a/lib-src/mr/config +++ b/lib-src/mr/config @@ -1,25 +1,33 @@ # -*- mode: conf -*- -[DEFAULT] - -# --- global settings +# Copyright (C) 2010-2022 Sean Whitton <spwhitton@spwhitton.name> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. -# avoid hangs due to SSH connection sharing -jobs = 1 +[DEFAULT] -# custom actions to be configured repository-by-repository, that do -# nothing by default -git_sync = : -git_autoci = : +git_update = git pull-safe "$@" -# avoid pushing non-matching branches, while trying to avoid errors -# from trying to push to read-only remotes +# Avoid trying to push to read-only remotes. +# Sometimes will want to redefine for a repository to include --no-tags. git_push = git push-all "$@" -# find dirty working directories, i.e., uncommitted changes, untracked -# files and stashes -git_isclean = git is-clean +# Custom actions to be configured repository-by-repository. +sync = : +autoci = : +git_isclean = git is-clean git_clean = git clean -xdff stow = hstow stow "$MR_REPO" @@ -27,19 +35,6 @@ unstow = hstow unstow "$MR_REPO" restow = hstow restow "$MR_REPO" adopt = hstow adopt "$MR_REPO" -# --- git-svn - -# include = [ -e "/usr/share/mr/git-svn" ] && cat /usr/share/mr/git-svn - -# --- Sensible pulls - -# Redefine git_update to avoid an unconditional `git pull`, which can -# result in unwanted merge commits all over $HOME -git_update = git pull-safe - -# --- joeyh's code for specifying what machine we're on for repo skip -# --- tests, plus my code for detecting Git-on-Windows - lib = if [ -n "$USER" ]; then whoami="$USER" @@ -51,11 +46,10 @@ lib = fi # Ensure it's a short hostname, not an FQDN. hostname="$(hostname)"; hostname="${hostname%%.*}" - # win32() { - test "$(perl -e 'print $^O')" = "msys" + test "$(perl -e 'print $^O')" = msys } - # + # This function is from joeyh's myrepos config. on() { for host in $@; do if [ "${host%@*}" != "${host#*@}" ]; then @@ -76,38 +70,11 @@ lib = mine() { workstation || on spwhitton@athena spwhitton@erebus } - # tucson() { - # on artemis shortgeese athena hephaestus iris melete - # } -# --- run a command on athena in a sane environment - -# lib = -# athena_cmd () { -# # here we rely on the fact that ssh already passes argument -# # through `/bin/sh -c' (note use of single-quotes in this -# # function) -# ssh athena 'cd $HOME/'"$1"' && . $HOME/.profile && '"$2" -# } - -# --- standard procedures - -lib = - # export plain text Org agenda in post_ hooks of ~/doc repo (not currently used) - export_org_agenda () { - if on athena; then - emacs --batch -l ~/.emacs.d/init.el -eval '(org-batch-agenda "a")' 2>/dev/null \ - >~/local/priv/agenda.txt - else - emacs --batch -l ~/.emacs.d/init.el -eval '(org-batch-agenda "a")' 2>/dev/null \ - | ssh athena "cat >/home/spwhitton/local/priv/agenda.txt" - fi - } - -# --- primary dotfiles repository +#################################################################### [src/dotfiles] -checkout = git clone https://git.spwhitton.name/dotfiles.git dotfiles +checkout = git clone https://git.spwhitton.name/dotfiles # We have a script to update master, and all other branches should be checked # out and committed to on only a single host, so no need to update them here, # and they'll always be rebaseable. @@ -128,16 +95,16 @@ pre_push = fi fixups = bstraph -# --- private dotfiles repositories - [lib/priv] checkout = git clone athenag:libpriv.git priv update = git annex sync --content cloud origin push = git annex sync --content cloud origin -post_update = +sync = mr autoci && git annex sync --no-commit --content cloud origin +fixups = + chmod 600 \ + .passwddb.pet .gnupg/*.kbx .gnupg/private-keys-v1.d/*.key .ssh/id_* hstow restow ~/lib/priv load-trustdb -sync = mr autoci && git annex sync --no-commit --content cloud origin skip = lazy post_checkout = @@ -148,24 +115,16 @@ post_checkout = # Delete any pubring.kbx created by INSINUATE-DOTFILES Consfigurator # property / 'insinuate-dotfiles' shell script: don't want to adopt it. rm -f ~/.gnupg/pubring.kbx - hstow stow ~/lib/priv - load-trustdb - -fixups = - chmod 600 .passwddb.pet \ - .gnupg/*.kbx \ - .gnupg/private-keys-v1.d/*.key \ - .ssh/id_* autoci = hstow stow ~/lib/priv # to perform adoptions git annex add .passwddb.pet .labbook.gpg .gnupg/pubring.kbx git commit -a -m \ - "auto passwddb, pubring and labbook commit on $(hostname -s)" || true + "auto passwddb, pubring and labbook commit on $(hostname -s)" ||: pre_update = mr autoci [src/athpriv] -checkout = git clone demeterp:athpriv athpriv +checkout = git clone demeterp:athpriv pre_update = on athena || git annex sync origin athenah pre_push = on athena || git annex sync --content origin athenah post_update = hstow restow ~/src/athpriv @@ -187,87 +146,102 @@ autoci = git annex add News/* git commit News -m"auto commit of Gnus score files" ||: -# --- hosts configuration +#################################################################### -[src/propellor] -checkout = git clone demeter:propellor propellor --branch spw3conf -post_checkout = - cd propellor - # get new release tags for merging into 'spw3conf' and 'debian' branches - git remote add -f upstream https://git.joeyh.name/git/propellor.git ||: - # This hook sets up .dir-locals.el to make it easier to follow - # Propellor's coding style. We have to use a hook because - # .dir-locals.el and the cabal sandbox must be nuked when working - # with dgit on the 'debian' branch - install-git-hooks propellor - echo ".dir-locals.el" >>.git/info/exclude -fixups = - # check that the link isn't already in place before making the link - # because otherwise we get an infinite loop of links that breaks propellor - [ -L ~/.propellor ] || ln -sf ~/src/propellor ~/.propellor - # my preferences when using propellor for configuring my own machines - git config propellor.spin-branch spw3conf - git config propellor.forbid-dirty-spin true - git config --local sendemail.to "Joey Hess <propellor@joeyh.name>" -skip = lazy - -# --- personal website source +[doc] +checkout = git clone demeterp:doc doc +update = git pull --rebase=false --no-edit "$@" +autoci = doccheckin +pre_update = win32 || doccheckin +sync = doccheckin && git pull --no-edit && git push +# Set mtimes to last commit, for Howm; doing so only in post_checkout, and not +# fixups, should be sufficient for summary buffer ordering purposes. +post_checkout = git utime +skip = ! mine [src/wiki] checkout = git clone demeter:wiki skip = ! mine -# --- misc. source repos with special config (e.g. installation of git -# --- hooks) +[lib/realloc] +checkout = git clone demeterp:realloc +skip = ! mine -[src/dgit] -checkout = git clone salsa:dgit-team/dgit -post_checkout = - cd dgit - git remote add -f demeter demeter:dgit ||: - dgit setup-new-tree -skip = lazy +#################################################################### + +[lib/radicale] +checkout = git clone demeterp:radicale radicale +skip = ! on spwhitton@athena + +[public_html] +clone = git clone https://git.spwhitton.name/sageweb public_html +skip = ! on spwhitton@sage -# [src/ublock-origin] -# checkout = git clone 'https://anonscm.debian.org/git/pkg-mozext/ublock-origin.git' 'ublock-origin' -# # beta, rc and alpha tags get deleted by upstream so there will very -# # often be unpushed tags -# push = git push-all --no-tags -# skip = lazy +[html] +clone = git clone https://git.spwhitton.name/sdfweb html +skip = ! [ "$(domainname)" = SDF ] -[src/grml-live] -checkout = git clone demeter:grml-live -b spw/std +#################################################################### + +[lib/annex] +checkout = git clone athenag:annex.git annex post_checkout = - cd grml-live - git remote add -f upstream github:grml/grml-live ||: -fixups = git config commit.gpgsign true + cd annex + git annex init + git annex enableremote athena rsyncurl=athena:local/rsync/annex +update = git annex sync --no-content origin +push = git annex sync --content origin athena skip = lazy -[src/mailscripts] -checkout = git clone 'demeter:mailscripts' 'mailscripts' -post_checkout = - cd mailscripts - git config branch.buster-bpo.signOffOptional true - dgit fetch buster-backports; dgit fetch sid +[annex] +checkout = git clone athenag:annex19.git annex +post_checkout = cd annex; git annex init; git annex enableremote cloud +update = git annex sync --no-content origin +push = git annex sync --content cloud origin skip = lazy -[src/p5-Git-Annex] -checkout = git clone demeter:p5-Git-Annex p5-Git-Annex -post_checkout = - cd p5-Git-Annex - git remote add -f salsa salsa:perl-team/modules/packages/libgit-annex-perl ||: - git branch --track debian salsa/master - git config branch.buster-bpo.signOffOptional true +[lib/wikiannex] +checkout = git clone demeter:wikiannex +post_checkout = cd wikiannex; git annex init +update = git annex sync --no-content +push = git annex sync --content +fixups = on demeter && git annex adjust --hide-missing --unlock skip = lazy -[src/p5-API-GitForge] -checkout = git clone demeter:p5-API-GitForge p5-API-GitForge +[lib/podcasts] +checkout = git clone demeterp:podcasts +post_checkout = cd podcasts; git annex init +update = ./update-and-sync +push = git annex --no-content sync +skip = lazy + +[lib/athena-apt] +checkout = git clone demeter:athena-apt post_checkout = - cd p5-API-GitForge - git remote add -f salsa salsa:perl-team/modules/packages/libapi-gitforge-perl ||: - git branch --track debian salsa/master + cd athena-apt + git annex init --version=7 + git annex enableremote demeter rsyncurl=demeter:/srv/www/debian + git annex get . +update = git annex sync --no-content skip = lazy +push = + git annex add + git annex unlock db + git annex sync --content demeter + git annex sync origin + ssh demeter find /srv/www/debian -type f -exec chmod 644 '{}' + + ssh demeter find /srv/www/debian -type d -exec chmod 755 '{}' + + +# The git-diff-files(1) call in ~/src/dotfiles/bin/git-is-clean fails in v7 +# git-annex repos with unlocked empty files, which this repo often has: empty +# Packages files. +isclean = + output="$(git annex status)" + test -z "$output" || ( echo "$output"; exit 1 ) + +#################################################################### + # "master" branch: just for installing changes to upstream master # # "$(hostname -s)" branch: @@ -345,8 +319,9 @@ skip = lazy # reprepro-rebuilder when updating athena/unstable as described above. # # See also bin/emacsclient wrapper script in dotfiles.git. + [src/emacs] -checkout = git clone https://git.savannah.gnu.org/git/emacs.git emacs +checkout = git clone https://git.savannah.gnu.org/git/emacs.git post_clean = ./autogen.sh autoconf post_checkout = cd emacs @@ -363,9 +338,8 @@ post_checkout = fi fi ./autogen.sh all -fixups = - git rev-parse "$hostname"@{upstream} >/dev/null 2>&1 \ - && git branch --unset-upstream "$hostname" +fixups = git rev-parse "$hostname"@{upstream} >/dev/null 2>&1 \ + && git branch --unset-upstream "$hostname" # We don't have the "$(hostname -s)" branch's upstream set to origin/master to # avoid accidentally pushing personal commits to Savannah (push.default cannot # help here). So for convenient updates of "$(hostname -s)" to its conceptual @@ -400,8 +374,10 @@ checkout = git -C "$HOME/src/emacs" worktree add -b deb/emacs-non-dfsg/d/sid/mas update = : skip = ! workstation || ! [ -d "$HOME/src/emacs" ] +#################################################################### + [src/elpa] -checkout = git clone https://git.savannah.gnu.org/git/emacs/elpa.git elpa +checkout = git clone https://git.savannah.gnu.org/git/emacs/elpa.git post_checkout = cd elpa && make setup skip = lazy @@ -411,208 +387,47 @@ post_checkout = cd elpa && make skip = lazy [src/org-mode] -checkout = git clone https://git.savannah.gnu.org/git/emacs/org-mode.git org-mode -skip = lazy - -[src/notmuch] -checkout = git clone 'https://git.notmuchmail.org/git/notmuch' 'notmuch' -skip = lazy - -[src/linux] -checkout = git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux -skip = lazy - -[src/sbcl] -checkout = git -c fetch.fsckobjects=false clone https://git.code.sf.net/p/sbcl/sbcl +checkout = git clone https://git.savannah.gnu.org/git/emacs/org-mode.git skip = lazy -# --- radicale collections - -[lib/radicale] -checkout = git clone demeterp:radicale radicale -skip = ! on spwhitton@athena - -# could use /usr/share/mr/git-annex helper to simplify the following -# configuration of annexes (overriding its update definition to avoid -# --content) but probably not flexible enough for all that's going on -# in the below - -# --- primary git annex +#################################################################### -[lib/annex] -checkout = git clone athenag:annex.git annex +[src/dgit] +checkout = git clone salsa:dgit-team/dgit post_checkout = - cd annex - git annex init - git annex enableremote athena rsyncurl=athena:local/rsync/annex -skip = lazy - -update = git annex sync --no-content origin -# disabled because required yubikey -# sync = git annex sync --no-content origin -push = git annex sync --content origin athena - -[annex] -checkout = git clone athenag:annex19.git annex -update = git annex sync --no-content origin -push = git annex sync --content cloud origin + cd dgit + git remote add -f demeter demeter:dgit ||: + dgit setup-new-tree skip = lazy +[src/p5-Git-Annex] +checkout = git clone demeter:p5-Git-Annex post_checkout = - cd annex - git annex init - git annex enableremote cloud - -# --- personal website big files annex - -[lib/wikiannex] -checkout = git clone demeter:wikiannex.git -post_checkout = - cd wikiannex - git annex init - - # if workstation; then - # git remote add bkupsd /media/${USER}/bkupsd/git/demeter/wikiannex.git - # git remote add m3 /media/${USER}/m3/git/demeter/wikiannex.git - # fi -update = git annex sync --no-content -push = git annex sync --content + cd p5-Git-Annex + git remote \ + add -f salsa salsa:perl-team/modules/packages/libgit-annex-perl ||: + git branch --track debian salsa/master skip = lazy -fixups = - if [ "$(hostname -s)" = "demeter" ]; then - git annex adjust --hide-missing --unlock - fi -# --- git annex for podcasts - -[lib/podcasts] -checkout = git clone demeterp:podcasts +[src/p5-API-GitForge] +checkout = git clone demeter:p5-API-GitForge post_checkout = - cd podcasts - git annex init -update = ./update-and-sync -push = git annex --no-content sync + cd p5-API-GitForge + git remote \ + add -f salsa salsa:perl-team/modules/packages/libapi-gitforge-perl ||: + git branch --track debian salsa/master skip = lazy -# --- git annex for use with rtorrent - -# [lib/rt] -# checkout = git clone athenag:rt.git rt -# post_checkout = -# cd rt -# git annex init -# if [ -d "$(hostname -s)" ]; then -# mkdir -p $HOME/local/rt -# cd $HOME/local/rt -# touch .duplicity-ignore -# mkdir -p session incomplete -# if ! [ -e "complete" ]; then -# ln -s $HOME/lib/rt/complete complete -# fi -# if ! [ -e "watch" ]; then -# ln -s $HOME/lib/rt/$(hostname -s) watch -# fi -# fi -# status = git annex status --fast -# update = git annex sync --no-content origin -# push = git annex sync --no-content origin -# autoci = (git annex add . && git commit -m "auto commit on $(hostname -s)") || true -# fixups = -# git config push.default matching -# # git config gcrypt.publish-participants true -# git config remote.origin.gcrypt-publish-participants true -# git config remote.origin.gcrypt-participants 0x0F56D0553B6D411B -# git config annex.startupscan false -# git config annex.autocommit true # needed for `git annex sync` -# git config remote.origin.annex-ignore true -# git config unpushed-tags.ignore true - -# skip = lazy -# pre_update = mr autoci - -# --- git annex for athena's apt repository - -[lib/athena-apt] -checkout = git clone demeter:athena-apt athena-apt -post_checkout = - cd athena-apt - git annex init --version=7 - git annex enableremote demeter rsyncurl=demeter:/srv/www/debian - git annex get . +[src/notmuch] +checkout = git clone https://git.notmuchmail.org/git/notmuch skip = lazy -update = git annex sync --no-content -push = - git annex add - git annex unlock db - git annex sync --content demeter - git annex sync origin - ssh demeter find /srv/www/debian -type f -exec chmod 644 '{}' + - ssh demeter find /srv/www/debian -type d -exec chmod 755 '{}' + - -# The git-diff-files(1) call in ~/bin/git-is-clean fails in v7 -# git-annex repos with unlocked empty files, which this repo often -# has: empty Packages files. So can't use that script in this repo -isclean = - output="$(git annex status)" - test -z "$output" || ( echo $output && exit 1 ) - -[lib/realloc] -checkout = git clone demeterp:realloc realloc -skip = ! mine - -# --- my personal documents. Override my global update command back -# --- to the myrepos default so that git automatically pulls and -# --- merges. Skipped on non-local hosts - -[doc] -checkout = git clone demeterp:doc doc -update = git pull --rebase=false --no-edit "$@" -skip = ! mine - -# Set mtimes to last commit, for Howm; doing so only in post_checkout, and not -# fixups, should be sufficient for summary buffer ordering purposes. -post_checkout = git utime - -# before pulling, automatically commit in the same way that my cron job does -pre_update = win32 || doccheckin -# ... and let me do it manually -autoci = doccheckin || true - -# quick syncs -sync = doccheckin && git pull --no-edit && git push - -# --- static websites on web host boxes - -[public_html] -clone = git clone https://git.spwhitton.name/sageweb public_html -skip = ! on spwhitton@sage - -[html] -clone = git clone https://git.spwhitton.name/sdfweb html -skip = ! [ "$(domainname)" = "SDF" ] - -# --- my offline e-mail (& machine's postfix queue) - -[.fmail] +[src/linux] checkout = - mkdir ~/.fmail - movemymail -sync = movemymail -update = movemymail -push = movemymail -status = : -clean = : -commit = : -record = : -fetch = : -diff = : -log = : -grep = : -autoci = : -isclean = : -skip = ! [ -e "$HOME/local/auth/fmailsyncpass" ] + git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git +skip = lazy -# this is slower than other repos for which sync is defined, so have -# it go last -order = 12 +[src/sbcl] +checkout = + git -c fetch.fsckobjects=false clone https://git.code.sf.net/p/sbcl/sbcl +skip = lazy |