summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm-sequoia/rpm-sequoia-crypto-policy_git.bb
blob: 658b9ab36aad45db498d67961185c26c545822ee (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
SUMMARY = "Crypto policy for rpm-sequoia"
HOMEPAGE = "https://gitlab.com/redhat-crypto/fedora-crypto-policies/"

LICENSE = "LGPL-2.1-or-later"

LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=a6f89e2100d9b6cdffcea4f398e37343"

# Python 3.11+ is needed to build fedora-crypto-policies
inherit allarch python3native

SRC_URI = " \
    git://gitlab.com/redhat-crypto/fedora-crypto-policies.git;protocol=https;branch=master \
    file://0001-libreswan-Allow-skipping-test_config-for-old-ipsec.patch \
"

SRCREV = "032b418a6db842f0eab330eb5909e4604e888728"
UPSTREAM_CHECK_COMMITS = "1"

do_compile () {
	# Remove most policy variants, leave DEFAULT.pol
	# It speeds up the build and we only need DEFAULT/rpm-sequoia.
	rm -f $(ls -1 policies/*.pol | grep -v DEFAULT.pol) || echo nothing to delete

	# Don't validate openssh, gnutls and libreswan policy variants.
	# Validation may fail and these variants are not needed.
	export OLD_OPENSSH=1
	export OLD_GNUTLS=1
	export OLD_LIBRESWAN=1

	make ASCIIDOC=echo XSLTPROC=echo
}

do_install () {
	install -d -m755 ${D}${datadir}/crypto-policies/back-ends
	install -m644 ${S}/output/DEFAULT/rpm-sequoia.txt ${D}${datadir}/crypto-policies/back-ends/rpm-sequoia.config
}

FILES:${PN} = "${datadir}/crypto-policies/back-ends/*"

BBCLASSEXTEND = "native"