1 |
chutzpah 14/09/22 18:09:19 |
2 |
|
3 |
Added: lldpd-0.7.10-only-use-physical-for-chassis-id.patch |
4 |
lldpd-0.7.10-completions.patch |
5 |
lldpd-0.7.10-handle-read-errors.patch |
6 |
lldpd-0.7.10-zsh-completion-dir.patch |
7 |
Log: |
8 |
Version bump, add json-c USE flag and rename json to jansson. Import bash and zsh completions from upstream git. Import some bugfix patches from upstream. |
9 |
|
10 |
(Portage version: 2.2.13/cvs/Linux x86_64, signed Manifest commit with key 0xE3F69979BB4B8928DA78E3D17CBF44EF) |
11 |
|
12 |
Revision Changes Path |
13 |
1.1 net-misc/lldpd/files/lldpd-0.7.10-only-use-physical-for-chassis-id.patch |
14 |
|
15 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/lldpd/files/lldpd-0.7.10-only-use-physical-for-chassis-id.patch?rev=1.1&view=markup |
16 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/lldpd/files/lldpd-0.7.10-only-use-physical-for-chassis-id.patch?rev=1.1&content-type=text/plain |
17 |
|
18 |
Index: lldpd-0.7.10-only-use-physical-for-chassis-id.patch |
19 |
=================================================================== |
20 |
commit 790752d0b5e7941a2e368cee6e30df6695162752 |
21 |
Author: Vincent Bernat <vincent@××××××.im> |
22 |
Date: Thu Sep 18 11:27:21 2014 +0200 |
23 |
|
24 |
interfaces: only use physical interfaces to get a chassis ID |
25 |
|
26 |
diff --git a/src/daemon/interfaces.c b/src/daemon/interfaces.c |
27 |
index d29eacc..a52e99c 100644 |
28 |
--- a/src/daemon/interfaces.c |
29 |
+++ b/src/daemon/interfaces.c |
30 |
@@ -288,8 +288,8 @@ interfaces_helper_vlan(struct lldpd *cfg, |
31 |
} |
32 |
#endif |
33 |
|
34 |
-/* Fill out chassis ID if not already done. This handler is special |
35 |
- because we will only handle interfaces that are already handled. */ |
36 |
+/* Fill out chassis ID if not already done. Only physical interfaces are |
37 |
+ * considered. */ |
38 |
void |
39 |
interfaces_helper_chassis(struct lldpd *cfg, |
40 |
struct interfaces_device_list *interfaces) |
41 |
@@ -313,7 +313,7 @@ interfaces_helper_chassis(struct lldpd *cfg, |
42 |
return; /* We already have one */ |
43 |
|
44 |
TAILQ_FOREACH(iface, interfaces, next) { |
45 |
- if (iface->flags) continue; |
46 |
+ if (!(iface->type & IFACE_PHYSICAL_T)) continue; |
47 |
if (cfg->g_config.c_cid_pattern && |
48 |
!pattern_match(iface->name, cfg->g_config.c_cid_pattern, 0)) continue; |
49 |
|
50 |
|
51 |
|
52 |
|
53 |
1.1 net-misc/lldpd/files/lldpd-0.7.10-completions.patch |
54 |
|
55 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/lldpd/files/lldpd-0.7.10-completions.patch?rev=1.1&view=markup |
56 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/lldpd/files/lldpd-0.7.10-completions.patch?rev=1.1&content-type=text/plain |
57 |
|
58 |
Index: lldpd-0.7.10-completions.patch |
59 |
=================================================================== |
60 |
diff --git a/src/client/Makefile.am b/src/client/Makefile.am |
61 |
index af747ea..f7305db 100644 |
62 |
--- a/src/client/Makefile.am |
63 |
+++ b/src/client/Makefile.am |
64 |
@@ -39,3 +39,9 @@ lldpcli_SOURCES += jsonc_writer.c |
65 |
lldpcli_CFLAGS += @JSONC_CFLAGS@ |
66 |
lldpcli_LDADD += @JSONC_LIBS@ |
67 |
endif |
68 |
+ |
69 |
+# Completions |
70 |
+bashcompletiondir = $(sysconfdir)/bash_completion.d |
71 |
+bashcompletion_DATA = lldpcli.bash-completion |
72 |
+zshcompletiondir = $(datadir)/zsh/vendor-completions |
73 |
+zshcompletion_DATA = _lldpcli |
74 |
diff --git a/src/client/_lldpcli b/src/client/_lldpcli |
75 |
new file mode 100644 |
76 |
index 0000000..9f7a98a |
77 |
--- /dev/null |
78 |
+++ b/src/client/_lldpcli |
79 |
@@ -0,0 +1,40 @@ |
80 |
+#compdef lldpcli |
81 |
+# |
82 |
+# zsh completion for lldpcli |
83 |
+# |
84 |
+# Copyright (c) 2014 Vincent Bernat <bernat@×××××.cx> |
85 |
+# |
86 |
+# Permission to use, copy, modify, and/or distribute this software for any |
87 |
+# purpose with or without fee is hereby granted, provided that the above |
88 |
+# copyright notice and this permission notice appear in all copies. |
89 |
+# |
90 |
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
91 |
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
92 |
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
93 |
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
94 |
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
95 |
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
96 |
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
97 |
+ |
98 |
+ |
99 |
+__lldpcli_command () { |
100 |
+ local -a completions |
101 |
+ completions=(${(f)"$(_call_program commands lldpcli complete ${words[1,$(($CURRENT-1))]})"}) |
102 |
+ completions=(${completions:s/ /:/}) |
103 |
+ _describe -t lldpcli-command "lldpcli completion" completions "$@" |
104 |
+} |
105 |
+ |
106 |
+_lldpcli () { |
107 |
+ local curcontext="$curcontext" state line |
108 |
+ |
109 |
+ _arguments -C \ |
110 |
+ '*-d[print more debugging information]' \ |
111 |
+ '(- *)-v[print version number and exit]' \ |
112 |
+ '-u[use an alternate socket with lldpd]:UNIX socket:_files' \ |
113 |
+ '-f[output format]:format:(plain xml json keyvalue)' \ |
114 |
+ '*-c[read a configuration file]:configuration file:_files' \ |
115 |
+ '(-)*::lldpcli command:__lldpcli_command' |
116 |
+} |
117 |
+ |
118 |
+ |
119 |
+_lldpcli "$@" |
120 |
diff --git a/src/client/lldpcli.bash-completion b/src/client/lldpcli.bash-completion |
121 |
new file mode 100755 |
122 |
index 0000000..8ce68d7 |
123 |
--- /dev/null |
124 |
+++ b/src/client/lldpcli.bash-completion |
125 |
@@ -0,0 +1,19 @@ |
126 |
+# -*- sh -*- |
127 |
+_lldpcli() |
128 |
+{ |
129 |
+ COMPREPLY=() |
130 |
+ COMP_WORDBREAKS=" " |
131 |
+ local cur=${COMP_WORDS[COMP_CWORD]} |
132 |
+ local cmd=(${COMP_WORDS[*]}) |
133 |
+ |
134 |
+ if [ "" != "$cur" ]; then |
135 |
+ unset cmd[COMP_CWORD] |
136 |
+ fi |
137 |
+ |
138 |
+ local choices=$(${cmd[0]} complete ${cmd[@]:1} | \ |
139 |
+ cut -d " " -f 1) |
140 |
+ COMPREPLY=($(compgen -W '${choices}' -- ${cur} )) |
141 |
+ return 0 |
142 |
+} |
143 |
+ |
144 |
+complete -F _lldpcli lldpcli |
145 |
|
146 |
|
147 |
|
148 |
1.1 net-misc/lldpd/files/lldpd-0.7.10-handle-read-errors.patch |
149 |
|
150 |
<<Binary file>> |
151 |
|
152 |
|
153 |
1.1 net-misc/lldpd/files/lldpd-0.7.10-zsh-completion-dir.patch |
154 |
|
155 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/lldpd/files/lldpd-0.7.10-zsh-completion-dir.patch?rev=1.1&view=markup |
156 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/lldpd/files/lldpd-0.7.10-zsh-completion-dir.patch?rev=1.1&content-type=text/plain |
157 |
|
158 |
Index: lldpd-0.7.10-zsh-completion-dir.patch |
159 |
=================================================================== |
160 |
diff --git a/src/client/Makefile.am b/src/client/Makefile.am |
161 |
index 8281555..994904c 100644 |
162 |
--- a/src/client/Makefile.am |
163 |
+++ b/src/client/Makefile.am |
164 |
@@ -43,5 +43,5 @@ endif |
165 |
# Completions |
166 |
bashcompletiondir = $(sysconfdir)/bash_completion.d |
167 |
bashcompletion_DATA = lldpcli.bash-completion |
168 |
-zshcompletiondir = $(datadir)/zsh/vendor-completions |
169 |
+zshcompletiondir = $(datadir)/zsh/site-functions |
170 |
zshcompletion_DATA = _lldpcli |