153.7. vdirsyncer-0.21.0
Makes a CalDAV or CardDAV collection and a local vdir equal
| Version | 0.21.0, release 1 |
| Shelf | pim — Personal information: calendars, contacts, tasks, time tracking, notes and genealogy |
| Phase | 41_system (System), 852 of 1047 in build order |
| Licence | BSD-3-Clause AND Apache-2.0 AND MIT AND PSF-2.0 AND GPL-3.0-or-later |
| Homepage | https://github.com/pimutils/vdirsyncer |
| Build time | 1.4 SBU |
| Installed size | 5.5 MiB in 369 files |
| Recipe | ports/core/pim/vdirsyncer/kpkgbuild |
About
vdirsyncer makes a remote CalDAV or CardDAV collection and a local vdir equal, in both directions, the way mbsync does it for mail. It is how khal’s calendars and khard’s address books reach a server.
Why it is in KDOS
The comment above it in script/phases/41_system/packages.d/pim.txt:
WHAT MAKES A REMOTE COLLECTION AND THE LOCAL vdir EQUAL, the way mbsync does it for mail. Six of its dependencies carry C and three build through a PEP 517 backend that lives inside their own sdists, which is why it is a port of its own rather than another bundle inside khal's.
Sources
vdirsyncer-0.21.0.tar.gz(127.9 KiB)
sha256b6ac040b880da6758f65c17a369572f62e7323be8d21cd330c26fa134d1b1373
upstream: https://files.pythonhosted.org/packages/source/v/vdirsyncer/vdirsyncer-0.21.0.tar.gz
archive copy: sources-3/pim--vdirsyncer-0.21.0.tar.gzvdirsyncer-vendor-0.21.0.tar.xz(10.9 MiB)
sha256a5b92b007dcb53c1d52112b588b4f193a1d1265df855c6eabd6e3cffea98262b
a vendor bundle: the dependencies upstream’s own tool would download, packed once
archive copy: sources-3/pim--vdirsyncer-vendor-0.21.0.tar.xz
Dependencies
Depends on: python3, python3-setuptools, python3-pip, python3-sphinx, python3-setuptools-scm, python3-hatchling, python3-hatch-vcs, python3-poetry-core, python3-pkgconfig, python3-cython, python3-click-log, python3-certifi, python3-charset-normalizer, python3-click, python3-idna, python3-requests, python3-typing-extensions, python3-urllib3, python3-attrs.
Required by: no port names it.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install vdirsyncer'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/pim/vdirsyncer.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/pim/vdirsyncer
echo 'b6ac040b880da6758f65c17a369572f62e7323be8d21cd330c26fa134d1b1373 vdirsyncer-0.21.0.tar.gz' | sha256sum -c -
echo 'a5b92b007dcb53c1d52112b588b4f193a1d1265df855c6eabd6e3cffea98262b vdirsyncer-vendor-0.21.0.tar.xz' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/vdirsyncer
SRC=$SRC_ROOT/vdirsyncer-0.21.0
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf vdirsyncer-0.21.0.tar.gz -C "$SRC" --strip-components=1
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers pyrequirements, pyruntime and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
mkdir -p vendor
tar -xf $PORT_SRC/$name-vendor-$version.tar.xz --strip-components=1 -C vendor
_back="$SRC_ROOT/backends"
pip3 install --no-deps --no-index --find-links=vendor --no-build-isolation \
--target "$_back" expandvars hatch-fancy-pypi-readme
export PYTHONPATH="$_back${PYTHONPATH:+:$PYTHONPATH}"
pip3 install --ignore-installed --no-deps --no-index --find-links=vendor --no-build-isolation \
--root=$PKG --prefix=/usr \
aiohappyeyeballs aiohttp aiosignal aiostream \
frozenlist multidict propcache tenacity yarl .
_site=$(python3 -c 'import sys, sysconfig; print(sysconfig.get_path("purelib", vars={"base": sys.argv[1]}))' "$PKG/usr")
(cd docs && PYTHONPATH=$_site sphinx-build -b man -q \
-d "$SRC_ROOT/vdirsyncer-doctrees" . "$SRC_ROOT/vdirsyncer-man")
install -Dm644 "$SRC_ROOT/vdirsyncer-man/vdirsyncer.1" -t "$PKG/usr/share/man/man1"
The switches, and why each is set:
--target— The firstpip3 installputsexpandvarsandhatch-fancy-pypi-readme, two build-time packages that are not ports, into$SRC_ROOT/backendsand ontoPYTHONPATH, never into the build root, where their files would belong to no package.expandvarsis a build requirement offrozenlist,propcacheandyarl; no member of the bundle nameshatch-fancy-pypi-readmein its build requirements. See The three Python keys.aiohappyeyeballs— The secondpip3 installnames the bundle’s runtime members before.:aiohappyeyeballs,aiohttp,aiosignal,aiostream,frozenlist,multidict,propcache,tenacityandyarl, vdirsyncer’s asynchronous HTTP stack. Each is built from its source distribution, the C extensions ofaiohttp,frozenlist,multidict,propcacheandyarlincluded, and installed into this package. The modules vdirsyncer shares with other programs, such asclick-logandrequests, arepython3-*ports independs.
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/vdirsyncer, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf vdirsyncer-0.21.0-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/vdirsyncer, and runs the triggers its paths call for.
Contents
Installed programs: vdirsyncer.
Installed directories: /usr/lib/python3.14/site-packages/aiohappyeyeballs, /usr/lib/python3.14/site-packages/aiohappyeyeballs-2.7.1.dist-info, /usr/lib/python3.14/site-packages/aiohttp, /usr/lib/python3.14/site-packages/aiohttp-3.14.3.dist-info, /usr/lib/python3.14/site-packages/aiosignal, /usr/lib/python3.14/site-packages/aiosignal-1.4.0.dist-info, /usr/lib/python3.14/site-packages/aiostream, /usr/lib/python3.14/site-packages/aiostream-0.7.1.dist-info, /usr/lib/python3.14/site-packages/frozenlist, /usr/lib/python3.14/site-packages/frozenlist-1.8.0.dist-info, /usr/lib/python3.14/site-packages/multidict, /usr/lib/python3.14/site-packages/multidict-6.9.1.dist-info, /usr/lib/python3.14/site-packages/propcache, /usr/lib/python3.14/site-packages/propcache-0.5.4.dist-info, /usr/lib/python3.14/site-packages/tenacity, /usr/lib/python3.14/site-packages/tenacity-9.1.4.dist-info, /usr/lib/python3.14/site-packages/vdirsyncer, /usr/lib/python3.14/site-packages/vdirsyncer-0.21.0.dist-info, /usr/lib/python3.14/site-packages/yarl, /usr/lib/python3.14/site-packages/yarl-1.25.1.dist-info, /usr/share/licenses/vdirsyncer.
Short descriptions
vdirsyncer |
vdirsyncer Documentation Documentation <https://vdirsyncer.pimutils.org/en/stable/> Source code <https://github.com/pimutils/vdirsyncer> Vdirsyncer is a command-line tool for synchronizing calendars and addressbooks between a variety of servers and the local filesystem. The most popular usecase is to synchronize a server with a local folder and use a set of other |
Notes
Five of the bundled modules carry C, so the port compiles them; frozenlist, propcache and yarl build through a PEP 517 backend shipped inside their own sdists, which needs expandvars. Two members are pinned in pypackages, each below an upper bound another package declares: multidict below the bound in aiohttp’s requirements, and aiostream below the bound in vdirsyncer’s own. A version bump that moves either bound must move its pin with it.
The manual page is built with PYTHONPATH pointing at the site-packages in $PKG, where vdirsyncer and its bundle are installed.