# Contributor: Christine Dodrill # Maintainer: omni pkgname=tor pkgver=0.4.7.13 pkgrel=2 pkgdesc="Anonymous network connectivity" url="https://www.torproject.org/" arch="all !s390x" # The extended_fmt test fail, try again next bump/upgrade license="BSD-3-Clause" pkgusers="tor" makedepends="libcap-dev libseccomp-dev libevent-dev openssl-dev>3 ca-certificates zlib-dev xz-dev zstd-dev" install="$pkgname.post-upgrade $pkgname.pre-install" subpackages="$pkgname-doc $pkgname-openrc" source="https://www.torproject.org/dist/tor-$pkgver.tar.gz 0002-disable-wildcard-escaping-test_patch 0003-disable-sandbox_chown_filename-test_patch 0004-disable-more-sandbox-tests_patch tor.initd tor.confd torrc.sample.patch " # secfixes: # 0.4.7.8-r0: # - CVE-2022-33903 # 0.4.6.7-r0: # - CVE-2021-38385 # 0.4.6.5-r0: # - CVE-2021-28548 # - CVE-2021-28549 # - CVE-2021-28550 # 0.4.5.7-r0: # - CVE-2021-28089 # - CVE-2021-28090 # 0.4.2.7-r0: # - CVE-2020-10592 # - CVE-2020-10593 # 0.3.5.8-r0: # - CVE-2019-8955 # 0.3.0.8-r0: # - CVE-2017-0376 # 0.3.2.10-r0: # - CVE-2018-0490 # - CVE-2018-0491 build() { ./configure \ --build="$CBUILD" \ --host="$CHOST" \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/share/man \ --disable-html-manual make } check() { # FIXME: find out why these specific tests only fail on these archs case "$CARCH" in ppc64le|s390x|x86) patch src/test/test_util.c \ "$srcdir"/0002-disable-wildcard-escaping-test_patch ;; aarch64) patch src/test/test_util.c \ "$srcdir"/0002-disable-wildcard-escaping-test_patch patch src/test/test_sandbox.c \ "$srcdir"/0003-disable-sandbox_chown_filename-test_patch patch src/test/test_sandbox.c \ "$srcdir"/0004-disable-more-sandbox-tests_patch ;; arm*) patch src/test/test_sandbox.c \ "$srcdir"/0003-disable-sandbox_chown_filename-test_patch ;; esac make test } package() { make DESTDIR="$pkgdir" install install -dm0755 -o "$pkgusers" \ "$pkgdir"/var/lib/"$pkgname" \ "$pkgdir"/var/log/"$pkgname" install -Dm0755 "$srcdir"/"$pkgname".initd \ "$pkgdir"/etc/init.d/"$pkgname" install -Dm0644 "$srcdir"/"$pkgname".confd \ "$pkgdir"/etc/conf.d/"$pkgname" } sha512sums=" 0900416887afbb24f7b72e6ef181b7b01308d1bb35c37736f3b13e06810a07febf9f47fadd9ff6c0e73204d93b49545e4e2516906eb3ba74398ad2b299f530be tor-0.4.7.13.tar.gz cbd3288ba792072f010f73a6dbcaf114108b592d730c1aa3c2e759b4d824bec673571194efe7052b39994fc8e33b760c3e3ecc0885077cd26f086f85aaa4c7a0 0002-disable-wildcard-escaping-test_patch 44a72a72a140c4fc7f3ce03b8a9a2b9244d6330ec5939778a2132470b8012676a5239fbb4b5a8b6dd80bf20f51e54d8e4a5b03384b0ec5a3aff22e22ee2970f5 0003-disable-sandbox_chown_filename-test_patch 2ea6ac4e02134903d85dc91ba90a20a94f95a0e950225c670b1364046277ba2fb4b6ab00d5d7d1b9dbfc072ee18c54603dd87ed8e4321362ca7102f8a965287d 0004-disable-more-sandbox-tests_patch 6de4ada16ba58264a247da70343eabd763e992d6b6683977fc1c67b7b4a9731748a7ec9751e869ad4b4ae9c72cf71b2e12dc289bb6e2aee499917f7663f4a735 tor.initd 2b0de119bfdf9eb57e13317b7392190b1b8272c8f96023c71d3fc29215d887e9a3d0ffcef37cdb50b18d34e4b2251f75a739e258e0bb72aabd3339418b22fd67 tor.confd da386ff7e387312e647f04d360517a1f4cb1efbee36f4a3a6feb89a979bb12fa350fe6dfed49af0cb076ae30bb0c527b5d54127683eaa5aa45d6940dddd89dfb torrc.sample.patch "