builds and runs on intel-x86 and rpi4 with acceptable realtime performance
This commit is contained in:
1 parent
2bce6fa556
commit
3faf544f0b
120 files changed
+6317
-1
No files matched your search
@@ -0,0 +1,68 @@
|
||||
#
|
||||
# Add a few "redhat" modules to pam. Some have been accepted upstream and
|
||||
# are part of the distribution, but not the three we add here.
|
||||
#
|
||||
|
||||
PAM_PV = "1.3.1"
|
||||
PAM_SRCREV = "ac815ddc575d8fe4762352e4f78adf0179f3bf5780d2e5da27f52ffc0157f0c2985726efb4ff3a31ceb42071afddb9c9cd72c0ce79699ae40f9633b927c808f2"
|
||||
|
||||
FILESEXTRAPATHS:prepend := "${THISDIR}/libpam:"
|
||||
|
||||
SRC_URI += "https://src.fedoraproject.org/repo/pkgs/pam/pam-redhat-${PAM_PV}.tar.xz/sha512/${PAM_SRCREV}/pam-redhat-${PAM_PV}.tar.xz;name=redhat \
|
||||
file://wrlinux-redhat-pam-modules.patch \
|
||||
file://0002-modules-pam_postgresok-change-uid-to-28.patch \
|
||||
${@bb.utils.contains('PACKAGECONFIG', 'faillock', 'file://pam_faillock_add_uid.patch', '', d)} \
|
||||
"
|
||||
|
||||
SRC_URI[redhat.sha256sum] = "894213fafbb557d40fba28dcc66f557fa0b4bf0ab32b0e4931b1d2be47e381fc"
|
||||
|
||||
# If necessary, move pam-redhat modules to where they will be built.
|
||||
# We create a local function and use sh.
|
||||
#
|
||||
do_lcl_rh_move () {
|
||||
SAVED_PWD=`pwd`; cd ${S}
|
||||
if [ ! -e modules/pam_chroot ] ; then
|
||||
mv ${UNPACKDIR}/pam-redhat-${PAM_PV}/* modules/
|
||||
fi
|
||||
cd ${SAVED_PWD}
|
||||
}
|
||||
|
||||
# Now, we define our own do_patch. We rely on the fact
|
||||
# that the default do_patch just invokes patch_do_patch.
|
||||
#
|
||||
python do_patch () {
|
||||
bb.build.exec_func('do_lcl_rh_move', d)
|
||||
bb.build.exec_func('patch_do_patch', d)
|
||||
}
|
||||
|
||||
do_install:append() {
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'faillock', 'true', 'false', d)}; then
|
||||
sed -i '/end of pam-auth-update config/i \
|
||||
# faillock is required to reset the fail count on success\
|
||||
account required pam_faillock.so' \
|
||||
${D}${sysconfdir}/pam.d/common-account
|
||||
sed -i '/pam_unix.so/i \
|
||||
auth required pam_faillock.so preauth deny=5 even_deny_root unlock_time=60' \
|
||||
${D}${sysconfdir}/pam.d/common-auth
|
||||
sed -i '/pam_unix.so/a \
|
||||
auth [default=die] pam_faillock.so authfail deny=5 even_deny_root unlock_time=60 \
|
||||
auth sufficient pam_faillock.so authsucc deny=5 even_deny_root unlock_time=60' \
|
||||
${D}${sysconfdir}/pam.d/common-auth
|
||||
fi
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then
|
||||
install -d ${D}${sysconfdir}/tmpfiles.d
|
||||
echo "d /run/console 0755 root root - -" >> ${D}${sysconfdir}/tmpfiles.d/pam.conf
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'faillock', 'true', 'false', d)}; then
|
||||
echo "d /run/faillock 0755 root root - -" >> ${D}${sysconfdir}/tmpfiles.d/pam.conf
|
||||
fi
|
||||
else
|
||||
echo "d root root 0755 /var/run/console none" >> ${D}${sysconfdir}/default/volatiles/99_pam
|
||||
if ${@bb.utils.contains('PACKAGECONFIG', 'faillock', 'true', 'false', d)}; then
|
||||
echo "d root root 0755 /var/run/faillock none" >> ${D}${sysconfdir}/default/volatiles/99_pam
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
PACKAGECONFIG[faillock] = ",,,"
|
||||
RDEPENDS:${PN}-runtime += "${@bb.utils.contains('PACKAGECONFIG', 'faillock', 'pam-plugin-faillock', '', d)}"
|
||||
Reference in new issue
Block a user