diff options
| author | Armin Kuster <akuster808@gmail.com> | 2017-04-02 16:56:25 -0700 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2017-04-04 05:50:36 -0700 |
| commit | 66bcc2399d34b07c9700b871da81c7daf0cacaef (patch) | |
| tree | 55b87b9577d059aabca3df48c20bc8f904304782 /recipes-security | |
| parent | 6c350a6086e26c67320e0cbaba3a3a6476a6ca07 (diff) | |
| download | meta-security-66bcc2399d34b07c9700b871da81c7daf0cacaef.tar.gz | |
apparmor: update to 2.11.0 plus ptest
update to 2.11
Add basic ptest support
v2: remove none existent file
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'recipes-security')
| -rw-r--r-- | recipes-security/AppArmor/apparmor_2.10.95.bb | 116 | ||||
| -rw-r--r-- | recipes-security/AppArmor/apparmor_2.11.0.bb | 126 | ||||
| -rw-r--r-- | recipes-security/AppArmor/files/run-ptest | 4 |
3 files changed, 130 insertions, 116 deletions
diff --git a/recipes-security/AppArmor/apparmor_2.10.95.bb b/recipes-security/AppArmor/apparmor_2.10.95.bb deleted file mode 100644 index de09e29..0000000 --- a/recipes-security/AppArmor/apparmor_2.10.95.bb +++ /dev/null | |||
| @@ -1,116 +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 apache2" | ||
| 15 | |||
| 16 | SRC_URI = " \ | ||
| 17 | http://archive.ubuntu.com/ubuntu/pool/main/a/${BPN}/${BPN}_${PV}.orig.tar.gz \ | ||
| 18 | file://disable_pdf.patch \ | ||
| 19 | file://apparmor.rc \ | ||
| 20 | file://functions \ | ||
| 21 | file://apparmor \ | ||
| 22 | file://apparmor.service \ | ||
| 23 | " | ||
| 24 | |||
| 25 | SRC_URI[md5sum] = "71a13b9d6ae0bca4f5375984df1a51e7" | ||
| 26 | SRC_URI[sha256sum] = "3f659a599718f4a5e2a33140916715f574a5cb3634a6b9ed6d29f7b0617e4d1a" | ||
| 27 | |||
| 28 | PARALLEL_MAKE = "" | ||
| 29 | |||
| 30 | inherit pkgconfig autotools-brokensep update-rc.d python-dir ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)} | ||
| 31 | |||
| 32 | S = "${WORKDIR}/apparmor-${PV}" | ||
| 33 | |||
| 34 | PACKAGECONFIG ?="man" | ||
| 35 | PACKAGECONFIG[man] = "--enable-man-pages, --disable-man-pages" | ||
| 36 | |||
| 37 | PAMLIB="${@bb.utils.contains('DISTRO_FEATURES', 'pam', '1', '0', d)}" | ||
| 38 | |||
| 39 | do_configure() { | ||
| 40 | cd ${S}/libraries/libapparmor | ||
| 41 | autoconf --force | ||
| 42 | libtoolize --automake -c | ||
| 43 | automake -ac | ||
| 44 | ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF} | ||
| 45 | sed -i -e 's#^YACC.*#YACC := bison#' ${S}/parser/Makefile | ||
| 46 | sed -i -e 's#^LEX.*#LEX := flex#' ${S}/parser/Makefile | ||
| 47 | } | ||
| 48 | |||
| 49 | do_compile () { | ||
| 50 | cd ${S}/libraries/libapparmor | ||
| 51 | oe_runmake | ||
| 52 | cd ${S}/binutils | ||
| 53 | oe_runmake | ||
| 54 | cd ${S}/utils | ||
| 55 | oe_runmake | ||
| 56 | cd ${S}/parser | ||
| 57 | oe_runmake | ||
| 58 | cd ${S}/profiles | ||
| 59 | oe_runmake | ||
| 60 | |||
| 61 | cd ${S}/changehat/mod_apparmor | ||
| 62 | oe_runmake | ||
| 63 | |||
| 64 | if test -z "${PAMLIB}" ; then | ||
| 65 | cd ${S}/changehat/pam_apparmor | ||
| 66 | oe_runmake | ||
| 67 | fi | ||
| 68 | } | ||
| 69 | |||
| 70 | do_install () { | ||
| 71 | install -d ${D}/${INIT_D_DIR} | ||
| 72 | install -d ${D}/lib/apparmor | ||
| 73 | |||
| 74 | cd ${S}/libraries/libapparmor | ||
| 75 | oe_runmake DESTDIR="${D}" install | ||
| 76 | |||
| 77 | cd ${S}/binutils | ||
| 78 | oe_runmake DESTDIR="${D}" install | ||
| 79 | |||
| 80 | cd ${S}/utils | ||
| 81 | oe_runmake DESTDIR="${D}" install | ||
| 82 | |||
| 83 | cd ${S}/parser | ||
| 84 | oe_runmake DESTDIR="${D}" install | ||
| 85 | |||
| 86 | cd ${S}/profiles | ||
| 87 | oe_runmake DESTDIR="${D}" install | ||
| 88 | |||
| 89 | cd ${S}/changehat/mod_apparmor | ||
| 90 | oe_runmake DESTDIR="${D}" install | ||
| 91 | |||
| 92 | if test -z "${PAMLIB}" ; then | ||
| 93 | cd ${S}/changehat/pam_apparmor | ||
| 94 | oe_runmake DESTDIR="${D}" install | ||
| 95 | fi | ||
| 96 | |||
| 97 | install ${WORKDIR}/apparmor ${D}/${INIT_D_DIR}/apparmor | ||
| 98 | |||
| 99 | install ${WORKDIR}/functions ${D}/lib/apparmor | ||
| 100 | } | ||
| 101 | |||
| 102 | INITSCRIPT_PACKAGES = "${PN}" | ||
| 103 | INITSCRIPT_NAME = "apparmor" | ||
| 104 | INITSCRIPT_PARAMS = "start 16 2 3 4 5 . stop 35 0 1 6 ." | ||
| 105 | |||
| 106 | SYSTEMD_PACKAGES = "${PN}" | ||
| 107 | SYSTEMD_SERVICE_${PN} = "apparmor.service" | ||
| 108 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 109 | |||
| 110 | PACKAGES += "python-${PN} mod-${PN}" | ||
| 111 | |||
| 112 | FILES_${PN} += "/lib/apparmor/ ${sysconfdir}/apparmor" | ||
| 113 | FILES_mod-${PN} = "${libdir}/apache2/modules/*" | ||
| 114 | FILES_python-${PN} = "${PYTHON_SITEPACKAGES_DIR}" | ||
| 115 | |||
| 116 | RDEPENDS_${PN} += "bash perl" | ||
diff --git a/recipes-security/AppArmor/apparmor_2.11.0.bb b/recipes-security/AppArmor/apparmor_2.11.0.bb new file mode 100644 index 0000000..8ad2d25 --- /dev/null +++ b/recipes-security/AppArmor/apparmor_2.11.0.bb | |||
| @@ -0,0 +1,126 @@ | |||
| 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 apache2 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://apparmor.rc \ | ||
| 19 | file://functions \ | ||
| 20 | file://apparmor \ | ||
| 21 | file://apparmor.service \ | ||
| 22 | file://run-ptest \ | ||
| 23 | " | ||
| 24 | |||
| 25 | SRC_URI[md5sum] = "899fd834dc5c8ebf2d52b97e4a174af7" | ||
| 26 | SRC_URI[sha256sum] = "b1c489ea11e7771b8e6b181532cafbf9ebe6603e3cb00e2558f21b7a5bdd739a" | ||
| 27 | |||
| 28 | PARALLEL_MAKE = "" | ||
| 29 | |||
| 30 | inherit pkgconfig autotools-brokensep update-rc.d python3-dir perlnative ptest | ||
| 31 | inherit ${@bb.utils.contains('VIRTUAL-RUNTIME_init_manager','systemd','systemd','', d)} | ||
| 32 | |||
| 33 | S = "${WORKDIR}/apparmor-${PV}" | ||
| 34 | |||
| 35 | PACKAGECONFIG ?="man" | ||
| 36 | PACKAGECONFIG[man] = "--enable-man-pages, --disable-man-pages" | ||
| 37 | PACKAGECONFIG[python3] = "--with-python, --without-python, python3 swig-native" | ||
| 38 | PACKAGECONFIG[perl] = "--with-perl, --without-perl, perl perl-native" | ||
| 39 | |||
| 40 | PAMLIB="${@bb.utils.contains('DISTRO_FEATURES', 'pam', '1', '0', d)}" | ||
| 41 | |||
| 42 | do_configure() { | ||
| 43 | cd ${S}/libraries/libapparmor | ||
| 44 | autoconf --force | ||
| 45 | libtoolize --automake -c | ||
| 46 | automake -ac | ||
| 47 | ./configure ${CONFIGUREOPTS} ${EXTRA_OECONF} | ||
| 48 | sed -i -e 's#^YACC.*#YACC := bison#' ${S}/parser/Makefile | ||
| 49 | sed -i -e 's#^LEX.*#LEX := flex#' ${S}/parser/Makefile | ||
| 50 | } | ||
| 51 | |||
| 52 | do_compile () { | ||
| 53 | oe_runmake -C ${B}/libraries/libapparmor | ||
| 54 | oe_runmake -C ${B}/binutils | ||
| 55 | oe_runmake -C ${B}/utils | ||
| 56 | oe_runmake -C ${B}/parser | ||
| 57 | oe_runmake -C ${B}/profiles | ||
| 58 | oe_runmake -C ${B}/changehat/mod_apparmor | ||
| 59 | |||
| 60 | if test -z "${PAMLIB}" ; then | ||
| 61 | oe_runmake -C ${B}/changehat/pam_apparmor | ||
| 62 | fi | ||
| 63 | } | ||
| 64 | |||
| 65 | do_install () { | ||
| 66 | install -d ${D}/${INIT_D_DIR} | ||
| 67 | install -d ${D}/lib/apparmor | ||
| 68 | |||
| 69 | oe_runmake -C ${B}/libraries/libapparmor DESTDIR="${D}" install | ||
| 70 | oe_runmake -C ${B}/binutils DESTDIR="${D}" install | ||
| 71 | oe_runmake -C ${B}/utils DESTDIR="${D}" install | ||
| 72 | oe_runmake -C ${B}/parser DESTDIR="${D}" install | ||
| 73 | oe_runmake -C ${B}/profiles DESTDIR="${D}" install | ||
| 74 | oe_runmake -C ${B}/changehat/mod_apparmor DESTDIR="${D}" install | ||
| 75 | |||
| 76 | if test -z "${PAMLIB}" ; then | ||
| 77 | oe_runmake -C ${B}/changehat/pam_apparmor DESTDIR="${D}" install | ||
| 78 | fi | ||
| 79 | |||
| 80 | install ${WORKDIR}/apparmor ${D}/${INIT_D_DIR}/apparmor | ||
| 81 | install ${WORKDIR}/functions ${D}/lib/apparmor | ||
| 82 | } | ||
| 83 | |||
| 84 | do_compile_ptest () { | ||
| 85 | oe_runmake -C ${B}/tests/regression/apparmor | ||
| 86 | oe_runmake -C ${B}/parser/tst | ||
| 87 | oe_runmake -C ${B}/libraries/libapparmor | ||
| 88 | } | ||
| 89 | |||
| 90 | do_install_ptest () { | ||
| 91 | t=${D}/${PTEST_PATH}/testsuite | ||
| 92 | install -d ${t} | ||
| 93 | install -d ${t}/tests/regression/apparmor | ||
| 94 | cp -rf ${B}/tests/regression/apparmor ${t}/tests/regression | ||
| 95 | |||
| 96 | install -d ${t}/parser/tst | ||
| 97 | cp -rf ${B}/parser/tst ${t}/parser | ||
| 98 | cp ${B}/parser/apparmor_parser ${t}/parser | ||
| 99 | cp ${B}/parser/frob_slack_rc ${t}/parser | ||
| 100 | |||
| 101 | install -d ${t}/libraries/libapparmor | ||
| 102 | cp -rf ${B}/libraries/libapparmor ${t}/libraries | ||
| 103 | |||
| 104 | install -d ${t}/common | ||
| 105 | cp -rf ${B}/common ${t} | ||
| 106 | |||
| 107 | install -d ${t}/binutils | ||
| 108 | cp -rf ${B}/binutils ${t} | ||
| 109 | } | ||
| 110 | |||
| 111 | INITSCRIPT_PACKAGES = "${PN}" | ||
| 112 | INITSCRIPT_NAME = "apparmor" | ||
| 113 | INITSCRIPT_PARAMS = "start 16 2 3 4 5 . stop 35 0 1 6 ." | ||
| 114 | |||
| 115 | SYSTEMD_PACKAGES = "${PN}" | ||
| 116 | SYSTEMD_SERVICE_${PN} = "apparmor.service" | ||
| 117 | SYSTEMD_AUTO_ENABLE = "disable" | ||
| 118 | |||
| 119 | PACKAGES += "python-${PN} mod-${PN}" | ||
| 120 | |||
| 121 | FILES_${PN} += "/lib/apparmor/ ${sysconfdir}/apparmor" | ||
| 122 | FILES_mod-${PN} = "${libdir}/apache2/modules/*" | ||
| 123 | FILES_python-${PN} = "${PYTHON_SITEPACKAGES_DIR}" | ||
| 124 | |||
| 125 | RDEPENDS_${PN} += "bash lsb" | ||
| 126 | RDEPENDS_${PN}-ptest += "coreutils dbus-lib" | ||
diff --git a/recipes-security/AppArmor/files/run-ptest b/recipes-security/AppArmor/files/run-ptest new file mode 100644 index 0000000..3b8e427 --- /dev/null +++ b/recipes-security/AppArmor/files/run-ptest | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #! /bin/sh | ||
| 2 | cd testsuite | ||
| 3 | |||
| 4 | make -C tests/regression/apparmor tests | ||
