blob: 6651e64352f731c16a2513fa2750f8550e3f6763 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001SUMMARY = "Package manager forked from Yum, using libsolv as a dependency resolver"
Brad Bishopf3f93bb2019-10-16 14:33:32 -04002DESCRIPTION = "Software package manager that installs, updates, and removes \
3packages on RPM-based Linux distributions. It automatically computes \
4dependencies and determines the actions required to install packages."
Andrew Geissler90fd73c2021-03-05 15:25:55 -06005HOMEPAGE = "https://github.com/rpm-software-management/dnf"
Brad Bishopc342db32019-05-15 21:57:59 -04006LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
8 file://PACKAGE-LICENSING;md5=4a0548e303dbc77f067335b4d688e745 \
9 "
10
11SRC_URI = "git://github.com/rpm-software-management/dnf.git \
12 file://0001-Corretly-install-tmpfiles.d-configuration.patch \
13 file://0001-Do-not-hardcode-etc-and-systemd-unit-directories.patch \
14 file://0005-Do-not-prepend-installroot-to-logdir.patch \
15 file://0029-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
16 file://0030-Run-python-scripts-using-env.patch \
Andrew Geissler82c905d2020-04-13 13:39:40 -050017 file://0001-set-python-path-for-completion_helper.patch \
Andrew Geissler4b740dc2020-05-05 08:54:39 -050018 file://0001-dnf-write-the-log-lock-to-root.patch \
Brad Bishopc342db32019-05-15 21:57:59 -040019 "
20
Andrew Geissler95ac1b82021-03-31 14:34:31 -050021SRCREV = "c826d7db401ebf9b59b2fa74570a919e4af2673e"
Brad Bishopc342db32019-05-15 21:57:59 -040022UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"
23
24S = "${WORKDIR}/git"
25
26inherit cmake gettext bash-completion distutils3-base systemd
27
28DEPENDS += "libdnf librepo libcomps python3-iniparse"
29
30# manpages generation requires http://www.sphinx-doc.org/
31EXTRA_OECMAKE = " -DWITH_MAN=0 -DPYTHON_INSTALL_DIR=${PYTHON_SITEPACKAGES_DIR} -DPYTHON_DESIRED=3"
32
33BBCLASSEXTEND = "native nativesdk"
34
35RDEPENDS_${PN} += " \
36 python3-core \
37 python3-codecs \
38 python3-netclient \
39 python3-email \
40 python3-threading \
41 python3-distutils \
42 python3-logging \
43 python3-fcntl \
44 librepo \
45 python3-shell \
46 libcomps \
47 libdnf \
48 python3-sqlite3 \
49 python3-compression \
50 python3-rpm \
51 python3-iniparse \
52 python3-json \
53 python3-curses \
54 python3-misc \
55 python3-gpg \
56 "
57
58RDEPENDS_${PN}_class-native = ""
59
60RRECOMMENDS_${PN}_class-target += "gnupg"
61
62# Create a symlink called 'dnf' as 'make install' does not do it, but
63# .spec file in dnf source tree does (and then Fedora and dnf documentation
64# says that dnf binary is plain 'dnf').
65do_install_append() {
66 lnr ${D}/${bindir}/dnf-3 ${D}/${bindir}/dnf
67 lnr ${D}/${bindir}/dnf-automatic-3 ${D}/${bindir}/dnf-automatic
68}
69
70# Direct dnf-native to read rpm configuration from our sysroot, not the one it was compiled in
71do_install_append_class-native() {
72 create_wrapper ${D}/${bindir}/dnf \
73 RPM_CONFIGDIR=${STAGING_LIBDIR_NATIVE}/rpm \
74 RPM_NO_CHROOT_FOR_SCRIPTS=1
75}
76
77do_install_append_class-nativesdk() {
78 create_wrapper ${D}/${bindir}/dnf \
79 RPM_CONFIGDIR=${SDKPATHNATIVE}${libdir_nativesdk}/rpm \
Brad Bishopf3f93bb2019-10-16 14:33:32 -040080 RPM_NO_CHROOT_FOR_SCRIPTS=1
Brad Bishopc342db32019-05-15 21:57:59 -040081}
82
83SYSTEMD_SERVICE_${PN} = "dnf-makecache.service dnf-makecache.timer \
84 dnf-automatic.service dnf-automatic.timer \
85 dnf-automatic-download.service dnf-automatic-download.timer \
86 dnf-automatic-install.service dnf-automatic-install.timer \
87 dnf-automatic-notifyonly.service dnf-automatic-notifyonly.timer \
88"
89SYSTEMD_AUTO_ENABLE ?= "disable"
Andrew Geissler82c905d2020-04-13 13:39:40 -050090
91PNBLACKLIST[dnf] ?= "${@bb.utils.contains('PACKAGE_CLASSES', 'package_rpm', '', 'does not build without package_rpm in PACKAGE_CLASSES due disabled rpm support in libsolv', d)}"