MM(1L)

πŸ“¦ version 2.9, in opensuse-leap 16.0

πŸ’… MM(1L) β€” like, the mirror master manual, bestie πŸ’–

okay so first things first: this is MM(1L), the manual page for mm, and I'm gonna walk you through the whole thing so you actually get it. no gatekeeping, no cap. 🫢


✨ NAME ✨

mm β€” literally the mirror master. that's the whole name. iconic. πŸ‘‘


🌸 SYNOPSIS 🌸

mm [flags] [package-files]

πŸ¦‹ DESCRIPTION πŸ¦‹

so mm is the mirror master (yes, again, it's a whole thing). what it does is run multiple calls to mirror in parallel β€” slay β€” and it also handles the locking and the minimal retry times. multi-tasking queen behavior, honestly. πŸ’…

and just like mirror, mm is a package written in Perl. (iykyk πŸͺ)

here's the vibe check on how it finds stuff: mm presumes that all the package details are stored in a directory called packages. and like, all the packages for a given site have to be in a file whose name is the same as that of the site. so for example, in packages/sunsite.org.uk you'll find all the package details for the host sunsite.org.uk. one site, one file, no mixing. periodt. ✨


πŸŽ€ OPTIONS πŸŽ€

  • -t β€” ignore the minimal retry timers. like, we're not waiting, we're going. πŸ”₯
  • -o site:package β€” only mirror the given site:package. just the one. nobody else. πŸ’…
  • -debug β€” enable debugging. and bestie, if you give this argument more than once, the debugging level goes up each time. currently the maximum useful level is four. four is the limit, don't be extra about it. πŸ™ˆ
  • -s β€” enable status debugging. this prints out the status of any subprocess as it's spawned or as it exits β€” so you can literally watch everything happen in real time. πŸ‘€βœ¨

πŸ’œ CONFIGURATION FILE πŸ’œ

the configuration file gets parsed as a series of statements. blank lines and lines beginning with a hash are ignored (we love a low-effort comment section πŸ’–). there are two kinds of statements: controls and site:package details.

🧚 Control statements

control statements are of the form:

keyword=value

and yes, you can add whitespace around the equals sign. go off, format it however. 🌸

here's the list of keywords and their values β€” any defaults are given inside square brackets:

  • home β€” the directory that mm chdirs to before doing any work. ['']
  • max β€” maximum number of mirrors that can be running in parallel at any one time. ['6']
  • mirror β€” this is the way to call mirror. any occurrence of $args, $package or $site gets replaced with the appropriate entry from the package. and any $pkg gets replaced with a version of $package where all characters that cause problems in filenames are converted to underscore. the default is: exec ./mirror \$args -p'\$package' packages/\$site > logs/\$site:\$pkg 2>&1 ['']
  • cmd β€” run the given command. this can occur multiple times. ['']
  • cmdin β€” run the given command and use its output as mm input. this can also occur multiple times. ['']
  • skip β€” skip the given site:package when it occurs. ['']

🌈 Package details statements

in addition to control statements, there are also package details. each package details statement looks like this:

site:package min-restart-last-ok min-restart-last-notok mirror-args

the site and package fields are matched against those in the packages. a mirror will only be run to this site:package if the last mirror run was more than min hours out. the min-restart-last-ok limit gets used if the last call to mirror was successful. but if the mirror call failed, then min-restart-last-notok gets used instead. two different moods, two different timers. 😌


⭐ EXAMPLES ⭐

here's a simple mm input file to manage mirroring two packages:

home=/public/mirror

ftp.cl.cam.ac.uk:JIPS-nrs 20 20
hcrl.open.ac.uk:hcrl-psion 20 20

more usually though, the auxilly program pkgs_to_mmin is used to automatically convert the contents of the packages directory into the site:package statements:

home=/public/mirror

cmdin=./pkgs_to_mmin packages/*

like, automatic conversion? we love efficiency. πŸ¦‹βœ¨


πŸ‘‘ AUTHOR πŸ‘‘

written by Lee McLoughlin <lmjm@icparc.ic.ac.uk>. legend behavior, honestly. 🫢


and that's the whole thing, bestie! πŸŽ€ this page is from 21 April 1993 and it's the MM(1L) manual β€” vintage but still serving. go mirror something iconic. πŸ’–πŸ’…πŸŒˆ

πŸ“¦ where this page comes from