diff options
Diffstat (limited to 'recipes-security/AppArmor/apparmor_2.12.bb')
| -rw-r--r-- | recipes-security/AppArmor/apparmor_2.12.bb | 154 |
1 files changed, 0 insertions, 154 deletions
diff --git a/recipes-security/AppArmor/apparmor_2.12.bb b/recipes-security/AppArmor/apparmor_2.12.bb deleted file mode 100644 index efa93e6..0000000 --- a/recipes-security/AppArmor/apparmor_2.12.bb +++ /dev/null | |||
| @@ -1,154 +0,0 @@ | |||
| 1 | SUMMARY = "AppArmor another MAC control system" | ||
| 2 | DESCRIPTION = "user-space parser utility for AppArmor \ | ||
| 3 | This provides the system initialization scripts needed to use the \ | ||
| 4 | AppArmor Mandatory Access Control system, including the AppArmor Parser \ | ||
| 5 | which is required to convert AppArmor text profiles into machine-readable \ | ||
| 6 | policies that are loaded into the kernel for use with the AppArmor Linux \ | ||
| 7 | Security Module." | ||
| 8 | HOMEAPAGE = "http://apparmor.net/" | ||
| 9 | SECTION = "admin" | ||
| 10 | |||
| 11 | LICENSE = "GPLv2 & GPLv2+ & BSD-3-Clause & LGPLv2.1+" | ||
| 12 | LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=fd57a4b0bc782d7b80fd431f10bbf9d0" | ||
| 13 | |||
| 14 | DEPENDS = "bison-native apr gettext-native coreutils-native" | ||
| 15 | |||
| 16 | SRC_URI = " \ | ||
| 17 | http://archive.ubuntu.com/ubuntu/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \ | ||
| 18 | file://disable_perl_h_check.patch \ | ||
| 19 | file://crosscompile_perl_bindings.patch \ | ||
| 20 | file://tool-paths.patch \ | ||
| 21 | file://apparmor.rc \ | ||
| 22 | file://functions \ | ||
| 23 | file://apparmor \ | ||
| 24 | file://apparmor.service \ | ||
| 25 | file://run-ptest \ | ||
| 26 | " | ||
| 27 | |||
| 28 | SRC_URI[md5sum] = "49054f58042f8e51ea92cc866575a833" | ||
| 29 | SRC_URI[sha256sum] = "8a2b0cd083faa4d0640f579024be3a629faa7db3b99540798a1a050e2eaba056" | ||
| 30 | |||
| 31 | PARALLEL_MAKE = "" | ||
| 32 | |||
| 33 | inherit pkgconfig autotools-brokensep update-rc.d python3native perlnative ptest cpan manpages systemd | ||
| 34 | |||
| 35 | PACKAGECONFIG ??= "python perl" | ||
| 36 | PACKAGECONFIG[manpages] = "--enable-man-pages, --disable-man-pages" | ||
| 37 | PACKAGECONFIG[python] = "--with-python, --without-python, python3 swig-native" | ||
| 38 | PACKAGECONFIG[perl] = "--with-perl, --without-perl, perl perl-native swig-native" | ||
| 39 | PACKAGECONFIG[apache2] = ",,apache2," | ||
| 40 | |||
| 41 | PAMLIB="${@bb.utils.contains('DISTRO_FEATURES', 'pam', '1', '0', d)}" | ||
| 42 | HTTPD="${@bb.utils.contains('PACKAGECONFIG', 'apache2', '1', '0', d)}" | ||
| 43 | |||
| 44 | |||
| 45 | python() { | ||
| 46 | if 'apache2' in d.getVar('PACKAGECONFIG').split() and \ | ||
| 47 | 'webserver' not in d.getVar('BBFILE_COLLECTIONS').split(): | ||
| 48 | raise bb.parse.SkipRecipe('Requires meta-webserver to be present.') | ||
| 49 | } | ||
| 50 | |||
| 51 | DISABLE_STATIC = "" | ||
| 52 | |||
| 53 | do_configure() { | ||
| 54 | cd ${S}/libraries/libapparmor | ||
| 55 | aclocal | ||
| 56 | autoconf --force | ||
| 57 | libtoolize --automake -c --force | ||
| 58 | automake -ac | ||
| 59 | ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF} | ||
| 60 | } | ||
| 61 | |||
| 62 | do_compile () { | ||
| 63 | oe_runmake -C ${B}/libraries/libapparmor | ||
| 64 | oe_runmake -C ${B}/binutils | ||
| 65 | oe_runmake -C ${B}/utils | ||
| 66 | oe_runmake -C ${B}/parser | ||
| 67 | oe_runmake -C ${B}/profiles | ||
| 68 | |||
| 69 | if test -z "${HTTPD}" ; then | ||
| 70 | oe_runmake -C ${B}/changehat/mod_apparmor | ||
| 71 | fi | ||
| 72 | |||
| 73 | if test -z "${PAMLIB}" ; then | ||
| 74 | oe_runmake -C ${B}/changehat/pam_apparmor | ||
| 75 | fi | ||
| 76 | } | ||
| 77 | |||
| 78 | do_install () { | ||
| 79 | install -d ${D}/${INIT_D_DIR} | ||
| 80 | install -d ${D}/lib/apparmor | ||
| 81 | |||
| 82 | oe_runmake -C ${B}/libraries/libapparmor DESTDIR="${D}" install | ||
| 83 | oe_runmake -C ${B}/binutils DESTDIR="${D}" install | ||
| 84 | oe_runmake -C ${B}/utils DESTDIR="${D}" install | ||
| 85 | oe_runmake -C ${B}/parser DESTDIR="${D}" install | ||
| 86 | oe_runmake -C ${B}/profiles DESTDIR="${D}" install | ||
| 87 | |||
| 88 | # If perl is disabled this script won't be any good | ||
| 89 | if ! ${@bb.utils.contains('PACKAGECONFIG','perl','true','false', d)}; then | ||
| 90 | rm -f ${D}${sbindir}/aa-notify | ||
| 91 | fi | ||
| 92 | |||
| 93 | if test -z "${HTTPD}" ; then | ||
| 94 | oe_runmake -C ${B}/changehat/mod_apparmor DESTDIR="${D}" install | ||
| 95 | fi | ||
| 96 | |||
| 97 | if test -z "${PAMLIB}" ; then | ||
| 98 | oe_runmake -C ${B}/changehat/pam_apparmor DESTDIR="${D}" install | ||
| 99 | fi | ||
| 100 | |||
| 101 | # aa-easyprof is installed by python-tools-setup.py, fix it up | ||
| 102 | sed -i -e 's:/usr/bin/env.*:/usr/bin/python3:' ${D}${bindir}/aa-easyprof | ||
| 103 | chmod 0755 ${D}${bindir}/aa-easyprof | ||
| 104 | |||
| 105 | install ${WORKDIR}/apparmor ${D}/${INIT_D_DIR}/apparmor | ||
| 106 | install ${WORKDIR}/functions ${D}/lib/apparmor | ||
| 107 | install -d ${D}${systemd_system_unitdir} | ||
| 108 | install ${WORKDIR}/apparmor.service ${D}${systemd_system_unitdir} | ||
| 109 | } | ||
| 110 | |||
| 111 | do_compile_ptest () { | ||
| 112 | oe_runmake -C ${B}/tests/regression/apparmor | ||
| 113 | oe_runmake -C ${B}/parser/tst | ||
| 114 | oe_runmake -C ${B}/libraries/libapparmor | ||
| 115 | } | ||
| 116 | |||
| 117 | do_install_ptest () { | ||
| 118 | t=${D}/${PTEST_PATH}/testsuite | ||
| 119 | install -d ${t} | ||
| 120 | install -d ${t}/tests/regression/apparmor | ||
| 121 | cp -rf ${B}/tests/regression/apparmor ${t}/tests/regression | ||
| 122 | |||
| 123 | install -d ${t}/parser/tst | ||
| 124 | cp -rf ${B}/parser/tst ${t}/parser | ||
| 125 | cp ${B}/parser/apparmor_parser ${t}/parser | ||
| 126 | cp ${B}/parser/frob_slack_rc ${t}/parser | ||
| 127 | |||
| 128 | install -d ${t}/libraries/libapparmor | ||
| 129 | cp -rf ${B}/libraries/libapparmor ${t}/libraries | ||
| 130 | |||
| 131 | install -d ${t}/common | ||
| 132 | cp -rf ${B}/common ${t} | ||
| 133 | |||
| 134 | install -d ${t}/binutils | ||
| 135 | cp -rf ${B}/binutils ${t} | ||
| 136 | } | ||
| 137 | |||
| 138 | INITSCRIPT_PACKAGES = "${PN}" | ||
| 139 | INITSCRIPT_NAME = "apparmor" | ||
| 140 | INITSCRIPT_PARAMS = "start 16 2 3 4 5 . stop 35 0 1 6 ." | ||
| 141 | |||
| 142 | SYSTEMD_PACKAGES = "${PN}" | ||
| 143 | SYSTEMD_SERVICE_${PN} = "apparmor.service" | ||
| 144 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 145 | |||
| 146 | PACKAGES += "mod-${PN}" | ||
| 147 | |||
| 148 | FILES_${PN} += "/lib/apparmor/ ${sysconfdir}/apparmor ${PYTHON_SITEPACKAGES_DIR}" | ||
| 149 | FILES_mod-${PN} = "${libdir}/apache2/modules/*" | ||
| 150 | |||
| 151 | RDEPENDS_${PN} += "bash lsb" | ||
| 152 | RDEPENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG','python','python3 python3-modules','', d)}" | ||
| 153 | RDEPENDS_${PN}_remove += "${@bb.utils.contains('PACKAGECONFIG','perl','','perl', d)}" | ||
| 154 | RDEPENDS_${PN}-ptest += "perl coreutils dbus-lib bash" | ||
