diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 14:41:29 -0500 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2015-09-15 14:41:29 -0500 |
commit | c124f4f2e04dca16a428a76c89677328bc7bf908 (patch) | |
tree | cc1bfbbced5244130a102cdd63c72584b1d6e408 /meta/recipes-extended/procps | |
download | blackbird-openbmc-c124f4f2e04dca16a428a76c89677328bc7bf908.tar.gz blackbird-openbmc-c124f4f2e04dca16a428a76c89677328bc7bf908.zip |
Squashed 'yocto-poky/' content from commit ea562de
git-subtree-dir: yocto-poky
git-subtree-split: ea562de57590c966cd5a75fda8defecd397e6436
Diffstat (limited to 'meta/recipes-extended/procps')
-rw-r--r-- | meta/recipes-extended/procps/procps/fix-configure.patch | 19 | ||||
-rw-r--r-- | meta/recipes-extended/procps/procps/sysctl.conf | 64 | ||||
-rw-r--r-- | meta/recipes-extended/procps/procps_3.3.10.bb | 67 |
3 files changed, 150 insertions, 0 deletions
diff --git a/meta/recipes-extended/procps/procps/fix-configure.patch b/meta/recipes-extended/procps/procps/fix-configure.patch new file mode 100644 index 000000000..934ae8095 --- /dev/null +++ b/meta/recipes-extended/procps/procps/fix-configure.patch @@ -0,0 +1,19 @@ + +exec_prefix is /usr default in OE-Core + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Saul Wold <sgw@linux.intel.com> +Index: procps-ng-3.3.10/configure.ac +=================================================================== +--- procps-ng-3.3.10.orig/configure.ac ++++ procps-ng-3.3.10/configure.ac +@@ -70,7 +70,7 @@ AC_FUNC_MMAP + AC_FUNC_REALLOC + AC_FUNC_STRTOD + +-usrbin_execdir='${exec_prefix}/usr/bin' ++usrbin_execdir='${exec_prefix}/bin' + AC_SUBST([usrbin_execdir]) + + AM_GNU_GETTEXT_VERSION([0.14.1]) diff --git a/meta/recipes-extended/procps/procps/sysctl.conf b/meta/recipes-extended/procps/procps/sysctl.conf new file mode 100644 index 000000000..34e7488bf --- /dev/null +++ b/meta/recipes-extended/procps/procps/sysctl.conf @@ -0,0 +1,64 @@ +# This configuration file is taken from Debian. +# +# /etc/sysctl.conf - Configuration file for setting system variables +# See sysctl.conf (5) for information. +# + +#kernel.domainname = example.com + +# Uncomment the following to stop low-level messages on console +#kernel.printk = 4 4 1 7 + +##############################################################3 +# Functions previously found in netbase +# + +# Uncomment the next two lines to enable Spoof protection (reverse-path filter) +# Turn on Source Address Verification in all interfaces to +# prevent some spoofing attacks +net.ipv4.conf.default.rp_filter=1 +net.ipv4.conf.all.rp_filter=1 + +# Uncomment the next line to enable TCP/IP SYN cookies +#net.ipv4.tcp_syncookies=1 + +# Uncomment the next line to enable packet forwarding for IPv4 +#net.ipv4.ip_forward=1 + +# Uncomment the next line to enable packet forwarding for IPv6 +#net.ipv6.conf.all.forwarding=1 + + +################################################################### +# Additional settings - these settings can improve the network +# security of the host and prevent against some network attacks +# including spoofing attacks and man in the middle attacks through +# redirection. Some network environments, however, require that these +# settings are disabled so review and enable them as needed. +# +# Ignore ICMP broadcasts +#net.ipv4.icmp_echo_ignore_broadcasts = 1 +# +# Ignore bogus ICMP errors +#net.ipv4.icmp_ignore_bogus_error_responses = 1 +# +# Do not accept ICMP redirects (prevent MITM attacks) +#net.ipv4.conf.all.accept_redirects = 0 +#net.ipv6.conf.all.accept_redirects = 0 +# _or_ +# Accept ICMP redirects only for gateways listed in our default +# gateway list (enabled by default) +# net.ipv4.conf.all.secure_redirects = 1 +# +# Do not send ICMP redirects (we are not a router) +#net.ipv4.conf.all.send_redirects = 0 +# +# Do not accept IP source route packets (we are not a router) +#net.ipv4.conf.all.accept_source_route = 0 +#net.ipv6.conf.all.accept_source_route = 0 +# +# Log Martian Packets +#net.ipv4.conf.all.log_martians = 1 +# + +#kernel.shmmax = 141762560 diff --git a/meta/recipes-extended/procps/procps_3.3.10.bb b/meta/recipes-extended/procps/procps_3.3.10.bb new file mode 100644 index 000000000..dcfaba71f --- /dev/null +++ b/meta/recipes-extended/procps/procps_3.3.10.bb @@ -0,0 +1,67 @@ +SUMMARY = "System and process monitoring utilities" +DESCRIPTION = "Procps contains a set of system utilities that provide system information about processes using \ +the /proc filesystem. The package includes the programs ps, top, vmstat, w, kill, and skill." +HOMEPAGE = "https://gitorious.org/procps" +SECTION = "base" +LICENSE = "GPLv2+ & LGPLv2+" +LIC_FILES_CHKSUM="file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LIB;md5=4cf66a4984120007c9881cc871cf49db \ + " + +DEPENDS = "ncurses" + +inherit autotools gettext pkgconfig update-alternatives + +SRC_URI = "http://downloads.sourceforge.net/project/procps-ng/Production/procps-ng-${PV}.tar.xz \ + file://fix-configure.patch \ + file://sysctl.conf \ + " + +SRC_URI[md5sum] = "1fb7f3f6bf92ce6c5c9ed9949ae858fe" +SRC_URI[sha256sum] = "a02e6f98974dfceab79884df902ca3df30b0e9bad6d76aee0fb5dce17f267f04" + +S = "${WORKDIR}/procps-ng-${PV}" + +EXTRA_OECONF = "--enable-skill --disable-modern-top" + +CPPFLAGS += "-I${S}" + +do_install_append () { + install -d ${D}${base_bindir} + [ "${bindir}" != "${base_bindir}" ] && for i in ${base_bindir_progs}; do mv ${D}${bindir}/$i ${D}${base_bindir}/$i; done + install -d ${D}${base_sbindir} + [ "${sbindir}" != "${base_sbindir}" ] && for i in ${base_sbindir_progs}; do mv ${D}${sbindir}/$i ${D}${base_sbindir}/$i; done + if [ "${base_sbindir}" != "${sbindir}" ]; then + rmdir ${D}${sbindir} + fi + + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${sysconfdir}/sysctl.d + ln -sf ../sysctl.conf ${D}${sysconfdir}/sysctl.d/99-sysctl.conf + fi +} + +CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" + +bindir_progs = "free pkill pmap pgrep pwdx skill snice top uptime" +base_bindir_progs += "kill pidof ps watch" +base_sbindir_progs += "sysctl" + +ALTERNATIVE_PRIORITY = "100" + +ALTERNATIVE_${PN} = "${bindir_progs} ${base_bindir_progs} ${base_sbindir_progs}" + +ALTERNATIVE_${PN}-doc = "kill.1 uptime.1" +ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1" +ALTERNATIVE_LINK_NAME[uptime.1] = "${mandir}/man1/uptime.1" + +python __anonymous() { + for prog in d.getVar('base_bindir_progs', True).split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_bindir', True), prog)) + + for prog in d.getVar('base_sbindir_progs', True).split(): + d.setVarFlag('ALTERNATIVE_LINK_NAME', prog, '%s/%s' % (d.getVar('base_sbindir', True), prog)) +} + |