diff options
author | Saul Wold <Saul.Wold@intel.com> | 2010-08-13 09:35:21 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-08-13 23:37:30 +0100 |
commit | 2c11926528df4459de9c4b6eca3f45c6d3908f06 (patch) | |
tree | 08c35de8c69c86c8b1a06207729b20419e3aa9bd /meta-lsb | |
parent | e8ac5a76d901ef247154bb06a6c27cd7dd6d4b61 (diff) | |
download | poky-2c11926528df4459de9c4b6eca3f45c6d3908f06.tar.gz |
procps: Move from meta-moblin to meta-lsb
Signed-off-by: Saul Wold <Saul.Wold@intel.com>
Diffstat (limited to 'meta-lsb')
-rw-r--r-- | meta-lsb/packages/procps/procps-3.2.7/install.patch | 27 | ||||
-rw-r--r-- | meta-lsb/packages/procps/procps-3.2.7/linux-limits.patch | 13 | ||||
-rw-r--r-- | meta-lsb/packages/procps/procps-3.2.7/pagesz-not-constant.patch | 22 | ||||
-rw-r--r-- | meta-lsb/packages/procps/procps-3.2.7/procmodule.patch | 36 | ||||
-rw-r--r-- | meta-lsb/packages/procps/procps-3.2.7/procps.init | 6 | ||||
-rw-r--r-- | meta-lsb/packages/procps/procps-3.2.7/psmodule.patch | 21 | ||||
-rw-r--r-- | meta-lsb/packages/procps/procps-3.2.7/sysctl.conf | 64 | ||||
-rw-r--r-- | meta-lsb/packages/procps/procps.inc | 16 | ||||
-rw-r--r-- | meta-lsb/packages/procps/procps_3.2.7.bb | 64 |
9 files changed, 269 insertions, 0 deletions
diff --git a/meta-lsb/packages/procps/procps-3.2.7/install.patch b/meta-lsb/packages/procps/procps-3.2.7/install.patch new file mode 100644 index 0000000000..9f1ef6915d --- /dev/null +++ b/meta-lsb/packages/procps/procps-3.2.7/install.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | --- procps-3.2.5.virgin/Makefile 2005-01-26 05:55:26.000000000 +0100 | ||
2 | +++ procps-3.2.5/Makefile 2005-08-03 04:55:26.346984488 +0200 | ||
3 | @@ -30,7 +30,10 @@ | ||
4 | install := install -D --owner 0 --group 0 | ||
5 | |||
6 | # Lame x86-64 /lib64 and /usr/lib64 abomination: | ||
7 | -lib64 := lib$(shell [ -d /lib64 ] && echo 64) | ||
8 | +# lib64 := lib$(shell [ -d /lib64 ] && echo 64) | ||
9 | + | ||
10 | +# Equally lame hack to work around makefile lameness when the host arch is 64bit, but the target is not. | ||
11 | +lib64 := lib | ||
12 | |||
13 | usr/bin := $(DESTDIR)/usr/bin/ | ||
14 | bin := $(DESTDIR)/bin/ | ||
15 | @@ -211,10 +214,10 @@ | ||
16 | ###### install | ||
17 | |||
18 | $(BINFILES) : all | ||
19 | - $(install) --mode a=rx $(notdir $@) $@ | ||
20 | + $(install) -m 555 $(notdir $@) $@ | ||
21 | |||
22 | $(MANFILES) : all | ||
23 | - $(install) --mode a=r $(notdir $@) $@ | ||
24 | + $(install) -m 444 $(notdir $@) $@ | ||
25 | |||
26 | install: $(filter-out $(SKIP) $(addprefix $(DESTDIR),$(SKIP)),$(INSTALL)) | ||
27 | cd $(usr/bin) && $(ln_f) skill snice | ||
diff --git a/meta-lsb/packages/procps/procps-3.2.7/linux-limits.patch b/meta-lsb/packages/procps/procps-3.2.7/linux-limits.patch new file mode 100644 index 0000000000..dcd66163ad --- /dev/null +++ b/meta-lsb/packages/procps/procps-3.2.7/linux-limits.patch | |||
@@ -0,0 +1,13 @@ | |||
1 | diff --git a/pwdx.c b/pwdx.c | ||
2 | index cb96a52..29ebce2 100644 | ||
3 | --- a/pwdx.c | ||
4 | +++ b/pwdx.c | ||
5 | @@ -13,7 +13,7 @@ | ||
6 | #include <stdlib.h> | ||
7 | #include <sys/types.h> | ||
8 | #include <regex.h> | ||
9 | -#include <limits.h> | ||
10 | +#include <linux/limits.h> | ||
11 | #include <unistd.h> | ||
12 | #include <errno.h> | ||
13 | |||
diff --git a/meta-lsb/packages/procps/procps-3.2.7/pagesz-not-constant.patch b/meta-lsb/packages/procps/procps-3.2.7/pagesz-not-constant.patch new file mode 100644 index 0000000000..8e9e1ebfe1 --- /dev/null +++ b/meta-lsb/packages/procps/procps-3.2.7/pagesz-not-constant.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Index: procps-3.2.1/proc/devname.c | ||
2 | =================================================================== | ||
3 | --- procps-3.2.1.orig/proc/devname.c 2004-03-18 05:43:50.000000000 +1100 | ||
4 | +++ procps-3.2.1/proc/devname.c 2005-04-02 10:40:17.462138000 +1000 | ||
5 | @@ -227,7 +227,7 @@ | ||
6 | |||
7 | /* number --> name */ | ||
8 | unsigned dev_to_tty(char *restrict ret, unsigned chop, dev_t dev_t_dev, int pid, unsigned int flags) { | ||
9 | - static char buf[PAGE_SIZE]; | ||
10 | + static char buf[4096]; | ||
11 | char *restrict tmp = buf; | ||
12 | unsigned dev = dev_t_dev; | ||
13 | unsigned i = 0; | ||
14 | @@ -249,7 +249,7 @@ | ||
15 | if((flags&ABBREV_TTY) && !strncmp(tmp,"tty", 3) && tmp[3]) tmp += 3; | ||
16 | if((flags&ABBREV_PTS) && !strncmp(tmp,"pts/", 4) && tmp[4]) tmp += 4; | ||
17 | /* gotta check before we chop or we may chop someone else's memory */ | ||
18 | - if(chop + (unsigned long)(tmp-buf) <= sizeof buf) | ||
19 | + if(chop + (unsigned long)(tmp-buf) < sizeof buf) | ||
20 | tmp[chop] = '\0'; | ||
21 | /* replace non-ASCII characters with '?' and return the number of chars */ | ||
22 | for(;;){ | ||
diff --git a/meta-lsb/packages/procps/procps-3.2.7/procmodule.patch b/meta-lsb/packages/procps/procps-3.2.7/procmodule.patch new file mode 100644 index 0000000000..fabfabaa59 --- /dev/null +++ b/meta-lsb/packages/procps/procps-3.2.7/procmodule.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | *** procps-3.2.5/proc/module.mk.orig Sun Jul 24 11:53:49 2005 | ||
2 | --- procps-3.2.5/proc/module.mk Sun Jul 24 11:54:32 2005 | ||
3 | *************** | ||
4 | *** 96,102 **** | ||
5 | #################### install rules ########################### | ||
6 | |||
7 | $(lib)$(SOFILE) : proc/$(SONAME) | ||
8 | ! $(install) --mode a=rx $< $@ | ||
9 | |||
10 | ifneq ($(SOLINK),$(SOFILE)) | ||
11 | .PHONY: $(lib)$(SOLINK) | ||
12 | --- 96,102 ---- | ||
13 | #################### install rules ########################### | ||
14 | |||
15 | $(lib)$(SOFILE) : proc/$(SONAME) | ||
16 | ! $(install) -m 555 $< $@ | ||
17 | |||
18 | ifneq ($(SOLINK),$(SOFILE)) | ||
19 | .PHONY: $(lib)$(SOLINK) | ||
20 | *************** | ||
21 | *** 115,121 **** | ||
22 | $(ldconfig) | ||
23 | |||
24 | $(usr/lib)$(ANAME) : proc/$(ANAME) | ||
25 | ! $(install) --mode a=r $< $@ | ||
26 | |||
27 | # Junk anyway... supposed to go in /usr/include/$(NAME) | ||
28 | #INSTALL += $(addprefix $(include),$(HDRFILES)) | ||
29 | --- 115,121 ---- | ||
30 | $(ldconfig) | ||
31 | |||
32 | $(usr/lib)$(ANAME) : proc/$(ANAME) | ||
33 | ! $(install) -m 444 $< $@ | ||
34 | |||
35 | # Junk anyway... supposed to go in /usr/include/$(NAME) | ||
36 | #INSTALL += $(addprefix $(include),$(HDRFILES)) | ||
diff --git a/meta-lsb/packages/procps/procps-3.2.7/procps.init b/meta-lsb/packages/procps/procps-3.2.7/procps.init new file mode 100644 index 0000000000..739dcf4be7 --- /dev/null +++ b/meta-lsb/packages/procps/procps-3.2.7/procps.init | |||
@@ -0,0 +1,6 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | SYSCTL_CONF="/etc/sysctl.conf" | ||
4 | if [ -f "${SYSCTL_CONF}" ]; then | ||
5 | /sbin/sysctl -q -p "${SYSCTL_CONF}" | ||
6 | fi | ||
diff --git a/meta-lsb/packages/procps/procps-3.2.7/psmodule.patch b/meta-lsb/packages/procps/procps-3.2.7/psmodule.patch new file mode 100644 index 0000000000..f298c1c1c4 --- /dev/null +++ b/meta-lsb/packages/procps/procps-3.2.7/psmodule.patch | |||
@@ -0,0 +1,21 @@ | |||
1 | *** procps-3.2.5/ps/module.mk.orig Sun Jul 24 11:54:40 2005 | ||
2 | --- procps-3.2.5/ps/module.mk Sun Jul 24 11:55:02 2005 | ||
3 | *************** | ||
4 | *** 33,40 **** | ||
5 | |||
6 | |||
7 | $(bin)ps: ps/ps | ||
8 | ! $(install) --mode a=rx $< $@ | ||
9 | |||
10 | $(man1)ps.1 : ps/ps.1 | ||
11 | ! $(install) --mode a=r $< $@ | ||
12 | -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz | ||
13 | --- 33,40 ---- | ||
14 | |||
15 | |||
16 | $(bin)ps: ps/ps | ||
17 | ! $(install) -m 555 $< $@ | ||
18 | |||
19 | $(man1)ps.1 : ps/ps.1 | ||
20 | ! $(install) -m 444 $< $@ | ||
21 | -rm -f $(DESTDIR)/var/catman/cat1/ps.1.gz $(DESTDIR)/var/man/cat1/ps.1.gz | ||
diff --git a/meta-lsb/packages/procps/procps-3.2.7/sysctl.conf b/meta-lsb/packages/procps/procps-3.2.7/sysctl.conf new file mode 100644 index 0000000000..34e7488bf7 --- /dev/null +++ b/meta-lsb/packages/procps/procps-3.2.7/sysctl.conf | |||
@@ -0,0 +1,64 @@ | |||
1 | # This configuration file is taken from Debian. | ||
2 | # | ||
3 | # /etc/sysctl.conf - Configuration file for setting system variables | ||
4 | # See sysctl.conf (5) for information. | ||
5 | # | ||
6 | |||
7 | #kernel.domainname = example.com | ||
8 | |||
9 | # Uncomment the following to stop low-level messages on console | ||
10 | #kernel.printk = 4 4 1 7 | ||
11 | |||
12 | ##############################################################3 | ||
13 | # Functions previously found in netbase | ||
14 | # | ||
15 | |||
16 | # Uncomment the next two lines to enable Spoof protection (reverse-path filter) | ||
17 | # Turn on Source Address Verification in all interfaces to | ||
18 | # prevent some spoofing attacks | ||
19 | net.ipv4.conf.default.rp_filter=1 | ||
20 | net.ipv4.conf.all.rp_filter=1 | ||
21 | |||
22 | # Uncomment the next line to enable TCP/IP SYN cookies | ||
23 | #net.ipv4.tcp_syncookies=1 | ||
24 | |||
25 | # Uncomment the next line to enable packet forwarding for IPv4 | ||
26 | #net.ipv4.ip_forward=1 | ||
27 | |||
28 | # Uncomment the next line to enable packet forwarding for IPv6 | ||
29 | #net.ipv6.conf.all.forwarding=1 | ||
30 | |||
31 | |||
32 | ################################################################### | ||
33 | # Additional settings - these settings can improve the network | ||
34 | # security of the host and prevent against some network attacks | ||
35 | # including spoofing attacks and man in the middle attacks through | ||
36 | # redirection. Some network environments, however, require that these | ||
37 | # settings are disabled so review and enable them as needed. | ||
38 | # | ||
39 | # Ignore ICMP broadcasts | ||
40 | #net.ipv4.icmp_echo_ignore_broadcasts = 1 | ||
41 | # | ||
42 | # Ignore bogus ICMP errors | ||
43 | #net.ipv4.icmp_ignore_bogus_error_responses = 1 | ||
44 | # | ||
45 | # Do not accept ICMP redirects (prevent MITM attacks) | ||
46 | #net.ipv4.conf.all.accept_redirects = 0 | ||
47 | #net.ipv6.conf.all.accept_redirects = 0 | ||
48 | # _or_ | ||
49 | # Accept ICMP redirects only for gateways listed in our default | ||
50 | # gateway list (enabled by default) | ||
51 | # net.ipv4.conf.all.secure_redirects = 1 | ||
52 | # | ||
53 | # Do not send ICMP redirects (we are not a router) | ||
54 | #net.ipv4.conf.all.send_redirects = 0 | ||
55 | # | ||
56 | # Do not accept IP source route packets (we are not a router) | ||
57 | #net.ipv4.conf.all.accept_source_route = 0 | ||
58 | #net.ipv6.conf.all.accept_source_route = 0 | ||
59 | # | ||
60 | # Log Martian Packets | ||
61 | #net.ipv4.conf.all.log_martians = 1 | ||
62 | # | ||
63 | |||
64 | #kernel.shmmax = 141762560 | ||
diff --git a/meta-lsb/packages/procps/procps.inc b/meta-lsb/packages/procps/procps.inc new file mode 100644 index 0000000000..2de32d2c83 --- /dev/null +++ b/meta-lsb/packages/procps/procps.inc | |||
@@ -0,0 +1,16 @@ | |||
1 | DESCRIPTION = "Procps is the package that has a bunch \ | ||
2 | of small useful utilities that give information \ | ||
3 | about processes using the /proc filesystem. The package \ | ||
4 | includes the programs ps, top, vmstat, w, kill, and skill." | ||
5 | HOMEPAGE = "http://procps.sf.net" | ||
6 | SECTION = "base" | ||
7 | PRIORITY = "optional" | ||
8 | LICENSE = "GPL" | ||
9 | DEPENDS = "ncurses" | ||
10 | |||
11 | FILES_${PN} += "${base_libdir}/libproc-*.so" | ||
12 | |||
13 | SRC_URI = "http://procps.sourceforge.net/procps-${PV}.tar.gz \ | ||
14 | file://install.patch;patch=1" | ||
15 | |||
16 | inherit autotools | ||
diff --git a/meta-lsb/packages/procps/procps_3.2.7.bb b/meta-lsb/packages/procps/procps_3.2.7.bb new file mode 100644 index 0000000000..6da975adc7 --- /dev/null +++ b/meta-lsb/packages/procps/procps_3.2.7.bb | |||
@@ -0,0 +1,64 @@ | |||
1 | require procps.inc | ||
2 | |||
3 | PR = "r8" | ||
4 | |||
5 | inherit update-rc.d | ||
6 | |||
7 | INITSCRIPT_NAME = "procps.sh" | ||
8 | INITSCRIPT_PARAMS = "start 30 S ." | ||
9 | |||
10 | SRC_URI += "file://procmodule.patch;patch=1 \ | ||
11 | file://psmodule.patch;patch=1 \ | ||
12 | file://linux-limits.patch;patch=1 \ | ||
13 | file://sysctl.conf \ | ||
14 | file://procps.init \ | ||
15 | " | ||
16 | |||
17 | FILES = "${bindir}/top.${PN} ${base_bindir}/ps.${PN} ${bindir}/uptime.${PN} ${base_bindir}/kill.${PN} \ | ||
18 | ${bindir}/free.${PN} ${bindir}/w ${bindir}/watch ${bindir}/pgrep ${bindir}/pmap ${bindir}/pwdx \ | ||
19 | ${bindir}/snice ${bindir}/vmstat ${bindir}/slabtop ${bindir}/pkill ${bindir}/skill ${bindir}/tload \ | ||
20 | ${base_sbindir}/sysctl.${PN}" | ||
21 | |||
22 | CONFFILES_${PN} = "${sysconfdir}/sysctl.conf" | ||
23 | |||
24 | EXTRA_OEMAKE = "CFLAGS=-I${STAGING_INCDIR} \ | ||
25 | CPPFLAGS=-I${STAGING_INCDIR} \ | ||
26 | LDFLAGS="${LDFLAGS}" \ | ||
27 | CURSES=-lncurses \ | ||
28 | install='install -D' \ | ||
29 | ldconfig=echo" | ||
30 | |||
31 | do_install_append () { | ||
32 | install -d ${D}${sysconfdir} | ||
33 | install -m 0644 ${WORKDIR}/sysctl.conf ${D}${sysconfdir}/sysctl.conf | ||
34 | install -d ${D}${sysconfdir}/init.d | ||
35 | install -m 0755 ${WORKDIR}/procps.init ${D}${sysconfdir}/init.d/procps.sh | ||
36 | |||
37 | mv ${D}${bindir}/uptime ${D}${bindir}/uptime.${PN} | ||
38 | mv ${D}${bindir}/top ${D}${bindir}/top.${PN} | ||
39 | mv ${D}${base_bindir}/kill ${D}${base_bindir}/kill.${PN} | ||
40 | mv ${D}${base_bindir}/ps ${D}${base_bindir}/ps.${PN} | ||
41 | mv ${D}${bindir}/free ${D}${bindir}/free.${PN} | ||
42 | mv ${D}${base_sbindir}/sysctl ${D}${base_sbindir}/sysctl.${PN} | ||
43 | mv ${D}${bindir}/pkill ${D}${bindir}/pkill.${PN} | ||
44 | } | ||
45 | |||
46 | pkg_postinst() { | ||
47 | update-alternatives --install ${bindir}/top top top.${PN} 90 | ||
48 | update-alternatives --install ${bindir}/uptime uptime uptime.${PN} 90 | ||
49 | update-alternatives --install ${base_bindir}/ps ps ps.${PN} 90 | ||
50 | update-alternatives --install ${base_bindir}/kill kill kill.${PN} 90 | ||
51 | update-alternatives --install ${bindir}/free free free.${PN} 90 | ||
52 | update-alternatives --install ${base_sbindir}/sysctl sysctl sysctl.${PN} 90 | ||
53 | update-alternatives --install ${bindir}/pkill pkill pkill.${PN} 90 | ||
54 | } | ||
55 | |||
56 | pkg_postrm() { | ||
57 | update-alternatives --remove top top.${PN} | ||
58 | update-alternatives --remove ps ps.${PN} | ||
59 | update-alternatives --remove uptime uptime.${PN} | ||
60 | update-alternatives --remove kill kill.${PN} | ||
61 | update-alternatives --remove free free.${PN} | ||
62 | update-alternatives --remove sysctl sysctl.${PN} | ||
63 | update-alternatives --remove pkill pkill.${PN} | ||
64 | } | ||