summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/tinyproxy/tinyproxy_1.11.2.bb
blob: 8558291c18e4e47e1dd88029f46888cb165f157e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
SUMMARY = "Lightweight http(s) proxy daemon"
HOMEPAGE = "https://tinyproxy.github.io/"
LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"

SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.gz \
           file://tinyproxy.service \
           file://tinyproxy.conf \
           file://run-ptest \
           file://CVE-2025-63938.patch \
           "

SRC_URI[sha256sum] = "2c8fe5496f2c642bfd189020504ab98d74b9edbafcdb94d9f108e157b5bdf96d"

UPSTREAM_CHECK_URI = "https://github.com/tinyproxy/tinyproxy/releases"

EXTRA_OECONF += " \
	--enable-filter \
	--enable-transparent \
	--enable-reverse \
	--enable-upstream \
	--enable-xtinyproxy \
        --enable-manpage_support=no \
	"

inherit autotools systemd useradd ptest

#User specific
USERADD_PACKAGES = "${PN}"
USERADD_PARAM:${PN} = "--system --home /dev/null \
                       --no-user-group --gid nogroup tinyproxy"

SYSTEMD_PACKAGES += "${BPN}"
SYSTEMD_SERVICE:${PN} = "tinyproxy.service"
SYSTEMD_AUTO_ENABLE:${PN} = "enable"

do_install:append() {
	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
		install -d ${D}${systemd_system_unitdir}
		install -m 0644 ${UNPACKDIR}/tinyproxy.service ${D}${systemd_system_unitdir}
	fi
	install -m 0644 ${UNPACKDIR}/tinyproxy.conf ${D}${sysconfdir}/tinyproxy.conf
}

do_install_ptest() {
	install -d ${D}${PTEST_PATH}/tests/scripts
	install -d ${D}${PTEST_PATH}/data/templates
	install ${S}/tests/scripts/*.sh ${D}${PTEST_PATH}/tests/scripts
	install ${S}/tests/scripts/*.pl ${D}${PTEST_PATH}/tests/scripts
	install -m 0644 ${S}/data/templates/*.html ${D}${PTEST_PATH}/data/templates/
	# test the installed binary, not the one that was just compiled in the src folder
	sed -i 's,TINYPROXY_BIN=.*,TINYPROXY_BIN=tinyproxy,' ${D}${PTEST_PATH}/tests/scripts/run_tests.sh
}

RDEPENDS:${PN}-ptest += "\
    perl \
    perl-module-cwd \
    perl-module-encode-encoding \
    perl-module-file-spec \
    perl-module-getopt-long \
    perl-module-io-socket \
    perl-module-io-socket-inet \
    perl-module-pod-text \
    perl-module-posix \
    procps \
"