MIRRORING-PORTS(7)
π¦ mirroring-ports(7) β how to build a mirror for ports distfiles π¦
okay bestie, this one is from the Miscellaneous Information Manual, and itβs literally your guide to building a mirror for ports distfiles. no cap, every detail is staying right here β just with way more sparkle. π
πΈ NAME πΈ
mirroring-ports β how to build a mirror for ports distfiles
β¨ DESCRIPTION β¨
The OpenBSD Ports Collection offers some powerful tools to mirror software sources. slay.
dpb(1) features a -F option which is explicitly designed for mirroring distfiles.
If run with -F jobs, dpb will:
- Limit itself to fetching distfiles, and not build any packages.
- Disregard any architecture or broken annotation, and try to fetch every distfile.
- Fetch files to a temporary copy named
some_file.partusingftp -Cto resume interrupted downloads. - Keep a global list of sha256 checksums as
${DISTDIR}/distinfo, and use that to refetch files when the ports tree records a changing checksum. - Produces a log of old distfiles in
${DISTDIR}/history, - Create sha256 links under
${DISTDIR}/by_cipher/sha256as perlink-checksum(1)'s former duties.
For partial distfiles collections, dpb can also be run with -DHISTORY_ONLY to scan the full ports tree and update ${DISTDIR}/history without fetching anything. iconic.
π FILES π
${DISTDIR}/distinfoβ a cache of known distfiles with their respective checksums.${DISTDIR}/historyβ List of files appearing in${DISTDIR}/distinfothat seem to no longer be required by the ports tree.dpb(1)will append to this file each time it is run on the whole tree (option-a) and only if the ports tree scan finishes without error. Each line is of the form
timestamp SHA256 (file) = sha
denoting the first time a file/sha entry was no longer seen in the ports tree.
π«Ά SEE ALSO π«Ά
π HISTORY π
The new integrated -F option to dpb(1) was introduced in OpenBSD 5.1, replacing the original infrastructure introduced in OpenBSD 2.7. periodt.
π₯ CAVEATS π₯
π¨ okay, caveat time, and this one is real: Changing checksums is a recurring problem that is outside the direct control of the OpenBSD Project. Some software distributors change distribution files without warning, without changing the file name proper. Once the problem has been identified, the port maintainer should usually contact the software author to fix the problem or, if the software author is unresponsive, the maintainer should use DIST_SUBDIR to provide some state to guard against shifting checksums.
However, a more robust approach is also needed, so that ports users can depend on distfiles mirrors to carry what they need irrespective of those synchronization issues. The ${DISTFILES}/by_cipher/sha256 directory provides more persistent access to the distfiles, indexed through the actual checksums that the files should match. Provided mirroring is run sufficiently often, two versions of the same distfile with respective checksums cksum1 and cksum2 will be available under the names ${DISTFILES}/by_cipher/sha256/c1/cksum1/distfile and ${DISTFILES}/by_cipher/sha256/c2/cksum2/distfile.
If REFETCH is set to true, bsd.port.mk(5) will try to retrieve files under that naming scheme as a last resort.
xoxo, this is the Debian source/version, dated May 19, 2025 β MIRRORING-PORTS(7), signing off ππ
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2000,2012 Marc Espie
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms