diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-03-10 21:47:04 +0000 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-03-10 22:00:51 +0000 |
commit | ffdc60f406731855904d8f6f94532ca74891090a (patch) | |
tree | a54255e6dc124e4646ade95d7c68b48e8864d50c /dladm/debian | |
parent | 0477d46380d0303977e563173e91972813e9d70e (diff) | |
download | illumos-packaging-ffdc60f406731855904d8f6f94532ca74891090a.tar.gz |
dladm (2.10-2) unstable; urgency=low
* Build dladm, dlmgmtd, flowadm, flowstat as well
* Patch libdlstat.h to include missing prototypes
* Create /etc/dladm on post-install, delete on purging
* Strip binaries
Diffstat (limited to 'dladm/debian')
36 files changed, 1288 insertions, 0 deletions
diff --git a/dladm/debian/README.source b/dladm/debian/README.source new file mode 100644 index 0000000..9988910 --- /dev/null +++ b/dladm/debian/README.source @@ -0,0 +1,10 @@ +Real sources are in the package illumos-source-X.Y, +where X and Y are numbers. Exact values of X and Y +are set in Build-Depends field of debian/control as +well as in the version string in debian/changelog, +in a form of X.Y-1. + +To add a patch you need first to unpack files from +illumos-source-X.Y using ./debian/rules unpack +and, desirably, ./debian/rules patch + diff --git a/dladm/debian/changelog b/dladm/debian/changelog new file mode 100644 index 0000000..55b82f3 --- /dev/null +++ b/dladm/debian/changelog @@ -0,0 +1,14 @@ +dladm (2.10-2) unstable; urgency=low + + * Build dladm, dlmgmtd, flowadm, flowstat as well + * Patch libdlstat.h to include missing prototypes + * Create /etc/dladm on post-install, delete on purging + * Strip binaries + + -- Igor Pashev <pashev.igor@gmail.com> Sun, 10 Mar 2013 21:41:58 +0000 + +libdladm (2.10-1) unstable; urgency=low + + * Initial release. + + -- Igor Pashev <pashev.igor@gmail.com> Tue, 23 Oct 2012 03:02:05 +0400 diff --git a/dladm/debian/compat b/dladm/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/dladm/debian/compat @@ -0,0 +1 @@ +9 diff --git a/dladm/debian/control b/dladm/debian/control new file mode 100644 index 0000000..58b4c29 --- /dev/null +++ b/dladm/debian/control @@ -0,0 +1,87 @@ +Source: dladm +Section: admin +Priority: optional +Maintainer: Igor Pashev <pashev.igor@gmail.com> +Build-Depends: + illumos-source-2.10, + dh-illumos, + gcc-multilib [illumos-amd64], + libncurses5-dev , lib32ncurses5-dev [illumos-amd64] , + libdevinfo1-dev , lib32devinfo1-dev [illumos-amd64] , + libexacct1-dev , lib32exacct1-dev [illumos-amd64] , + libinetutil1-dev , lib32inetutil1-dev [illumos-amd64] , + libkstat1-dev , lib32kstat1-dev [illumos-amd64] , + libnvpair1-dev , lib32nvpair1-dev [illumos-amd64] , + libpool1-dev , lib32pool1-dev [illumos-amd64] , + librcm1-dev , lib32rcm1-dev [illumos-amd64] , + libscf1-dev , lib32scf1-dev [illumos-amd64] , + libsunavl-dev, +# only headers: + librstp1-dev, + quilt, + symlinks, +Standards-Version: 3.9.3 +Homepage: https://www.illumos.org + +Package: dladm +Section: admin +Priority: required +Architecture: illumos-any +Replaces: illumos-net-tools (<< 2.10) +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: administer data links + The dladm command is used to administer data-links. A datalink is + represented in the system as a STREAMS DLPI (v2) interface which can be + plumbed under protocol stacks such as TCP/IP. Each data-link relies on + either a single network device or an aggregation of devices to send packets + to or receive packets from a network. + . + This package also includes flowad and flowstat utilities. + . + The flowadm command is used to create, modify, remove, and show networking + bandwidth and associated resources for a type of traffic on a particular link. + . + The flowstat command reports run time statistics about user defined flows. + +Package: libdladm1 +Section: libs +Priority: standard +Multi-Arch: same +Pre-Depends: ${misc:Pre-Depends} +Architecture: illumos-any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: data-link administration library + This package contains libdladm shared library. + +Package: libdladm1-dev +Section: libdevel +Priority: optional +Architecture: illumos-any +Provides: libdladm-dev +Depends: libdladm1 (= ${binary:Version}), ${misc:Depends}, libc1-dev, + librstp1-dev +Description: data-link administration library (development files) + This package contains the header files and symlinks needed + to compile applications that use libdladm. + +Package: lib32dladm1 +Section: libs +Priority: standard +Architecture: illumos-amd64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: data-link administration library (32 bit) + This package contains libdladm shared library. + . + This is a 32-bit version of the library. + +Package: lib32dladm1-dev +Section: libdevel +Priority: optional +Architecture: illumos-amd64 +Provides: lib32dladm-dev +Depends: lib32dladm1 (= ${binary:Version}), libdladm1-dev (= ${binary:Version}), + ${misc:Depends} +Description: data-link administration library (32-bit development files) + This package contains files needed to compile + 32-bit applications that use libdladm. + diff --git a/dladm/debian/copyright b/dladm/debian/copyright new file mode 100644 index 0000000..2b18913 --- /dev/null +++ b/dladm/debian/copyright @@ -0,0 +1,62 @@ +Files: debian/* +Copyright: 2012, Igor Pashev <pashev.igor@gmail.com> +License: WTFPL-2 + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + . + Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> + . + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + . + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + . + 0. You just DO WHAT THE FUCK YOU WANT TO. + + +Files: usr/src/lib/libinetutil/common/ifaddrlist.c +Copyright: 1997, The Regents of the University of California. + 2009 Sun Microsystems, Inc. +License: 4-clause BSD + Copyright (c) 1997 + The Regents of the University of California. All rights reserved. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the Computer Systems + Engineering Group at Lawrence Berkeley Laboratory. + 4. Neither the name of the University nor of the Laboratory may be used + to endorse or promote products derived from this software without + specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +Files: * +License: CDDL + Note that sources are not in this package but in the package + illumos-source-X.Y. Those sources are covered by Common Development + and Distribution License (CDDL). + . + On Dyson system, the full text of the CDDL license + can be found in the file `/usr/share/common-licenses/CDDL-1.0'. + diff --git a/dladm/debian/dladm.install b/dladm/debian/dladm.install new file mode 100644 index 0000000..b1b8a1d --- /dev/null +++ b/dladm/debian/dladm.install @@ -0,0 +1,8 @@ +lib/svc/manifest/network/dlmgmt.xml +lib/svc/method/svc-dlmgmtd +sbin/dladm +sbin/dlmgmtd +sbin/flowadm +usr/sbin/dladm +usr/sbin/flowadm +usr/sbin/flowstat diff --git a/dladm/debian/dladm.manpages b/dladm/debian/dladm.manpages new file mode 100644 index 0000000..884343d --- /dev/null +++ b/dladm/debian/dladm.manpages @@ -0,0 +1,3 @@ +usr/src/man/man1m/dladm.1m +usr/src/man/man1m/dlmgmtd.1m +usr/src/man/man1m/flowadm.1m diff --git a/dladm/debian/dladm.postinst b/dladm/debian/dladm.postinst new file mode 100644 index 0000000..177aa08 --- /dev/null +++ b/dladm/debian/dladm.postinst @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e +set -u + +if [ ! -e /etc/dladm ]; then + mkdir /etc/dladm || true +fi + +exit 0 + diff --git a/dladm/debian/dladm.postrm b/dladm/debian/dladm.postrm new file mode 100644 index 0000000..f4219ef --- /dev/null +++ b/dladm/debian/dladm.postrm @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e +set -u + +if [ "$1" == purge ]; then + rm -rf /etc/dladm +fi + +exit 0 + diff --git a/dladm/debian/lib32dladm1-dev.install b/dladm/debian/lib32dladm1-dev.install new file mode 100644 index 0000000..f6e53c1 --- /dev/null +++ b/dladm/debian/lib32dladm1-dev.install @@ -0,0 +1 @@ +usr/lib32/libdladm.so diff --git a/dladm/debian/lib32dladm1.install b/dladm/debian/lib32dladm1.install new file mode 100644 index 0000000..2d0de89 --- /dev/null +++ b/dladm/debian/lib32dladm1.install @@ -0,0 +1 @@ +lib32/libdladm.so.1 diff --git a/dladm/debian/libdladm1-dev.install b/dladm/debian/libdladm1-dev.install new file mode 100644 index 0000000..313349b --- /dev/null +++ b/dladm/debian/libdladm1-dev.install @@ -0,0 +1,2 @@ +usr/lib/*/libdladm.so +usr/include/* diff --git a/dladm/debian/libdladm1.install b/dladm/debian/libdladm1.install new file mode 100644 index 0000000..072c0b5 --- /dev/null +++ b/dladm/debian/libdladm1.install @@ -0,0 +1 @@ +lib/*/libdladm.so.1 diff --git a/dladm/debian/libdladm1.symbols b/dladm/debian/libdladm1.symbols new file mode 100644 index 0000000..30f0f96 --- /dev/null +++ b/dladm/debian/libdladm1.symbols @@ -0,0 +1,218 @@ +libdladm.so.1 libdladm1 #MINVER# + SUNWprivate_1.1@SUNWprivate_1.1 2.10-1 + dladm_aggr_add@SUNWprivate_1.1 2.10-1 + dladm_aggr_create@SUNWprivate_1.1 2.10-1 + dladm_aggr_delete@SUNWprivate_1.1 2.10-1 + dladm_aggr_info@SUNWprivate_1.1 2.10-1 + dladm_aggr_lacpmode2str@SUNWprivate_1.1 2.10-1 + dladm_aggr_lacptimer2str@SUNWprivate_1.1 2.10-1 + dladm_aggr_macaddr2str@SUNWprivate_1.1 2.10-1 + dladm_aggr_modify@SUNWprivate_1.1 2.10-1 + dladm_aggr_policy2str@SUNWprivate_1.1 2.10-1 + dladm_aggr_portstate2str@SUNWprivate_1.1 2.10-1 + dladm_aggr_remove@SUNWprivate_1.1 2.10-1 + dladm_aggr_str2lacpmode@SUNWprivate_1.1 2.10-1 + dladm_aggr_str2lacptimer@SUNWprivate_1.1 2.10-1 + dladm_aggr_str2macaddr@SUNWprivate_1.1 2.10-1 + dladm_aggr_str2policy@SUNWprivate_1.1 2.10-1 + dladm_aggr_up@SUNWprivate_1.1 2.10-1 + dladm_attr_is_linkprop@SUNWprivate_1.1 2.10-1 + dladm_bridge_configure@SUNWprivate_1.1 2.10-1 + dladm_bridge_delete@SUNWprivate_1.1 2.10-1 + dladm_bridge_enable@SUNWprivate_1.1 2.10-1 + dladm_bridge_free_fwdtable@SUNWprivate_1.1 2.10-1 + dladm_bridge_free_portlist@SUNWprivate_1.1 2.10-1 + dladm_bridge_free_trillnick@SUNWprivate_1.1 2.10-1 + dladm_bridge_get_fwdtable@SUNWprivate_1.1 2.10-1 + dladm_bridge_get_nick@SUNWprivate_1.1 2.10-1 + dladm_bridge_get_portlist@SUNWprivate_1.1 2.10-1 + dladm_bridge_get_privprop@SUNWprivate_1.1 2.10-1 + dladm_bridge_get_properties@SUNWprivate_1.1 2.10-1 + dladm_bridge_get_trillnick@SUNWprivate_1.1 2.10-1 + dladm_bridge_getlink@SUNWprivate_1.1 2.10-1 + dladm_bridge_link_state@SUNWprivate_1.1 2.10-1 + dladm_bridge_prot2str@SUNWprivate_1.1 2.10-1 + dladm_bridge_run_properties@SUNWprivate_1.1 2.10-1 + dladm_bridge_set_nick@SUNWprivate_1.1 2.10-1 + dladm_bridge_setlink@SUNWprivate_1.1 2.10-1 + dladm_bridge_state@SUNWprivate_1.1 2.10-1 + dladm_bridge_str2prot@SUNWprivate_1.1 2.10-1 + dladm_bw2str@SUNWprivate_1.1 2.10-1 + dladm_class2str@SUNWprivate_1.1 2.10-1 + dladm_close@SUNWprivate_1.1 2.10-1 + dladm_continuous@SUNWprivate_1.1 2.10-1 + dladm_create_conf@SUNWprivate_1.1 2.10-1 + dladm_create_datalink_id@SUNWprivate_1.1 2.10-1 + dladm_datalink_id2info@SUNWprivate_1.1 2.10-1 + dladm_destroy_conf@SUNWprivate_1.1 2.10-1 + dladm_destroy_datalink_id@SUNWprivate_1.1 2.10-1 + dladm_dev2linkid@SUNWprivate_1.1 2.10-1 + dladm_dld_fd@SUNWprivate_1.1 2.10-1 + dladm_door_fd@SUNWprivate_1.1 2.10-1 + dladm_ether_autoneg2str@SUNWprivate_1.1 2.10-1 + dladm_ether_info@SUNWprivate_1.1 2.10-1 + dladm_ether_info_done@SUNWprivate_1.1 2.10-1 + dladm_ether_pause2str@SUNWprivate_1.1 2.10-1 + dladm_ether_spdx2str@SUNWprivate_1.1 2.10-1 + dladm_flow_add@SUNWprivate_1.1 2.10-1 + dladm_flow_attr_dsfield2str@SUNWprivate_1.1 2.10-1 + dladm_flow_attr_ip2str@SUNWprivate_1.1 2.10-1 + dladm_flow_attr_port2str@SUNWprivate_1.1 2.10-1 + dladm_flow_attr_proto2str@SUNWprivate_1.1 2.10-1 + dladm_flow_info@SUNWprivate_1.1 2.10-1 + dladm_flow_init@SUNWprivate_1.1 2.10-1 + dladm_flow_parse_db@SUNWprivate_1.1 2.10-1 + dladm_flow_remove@SUNWprivate_1.1 2.10-1 + dladm_flow_stat_diff@SUNWprivate_1.1 2.10-1 + dladm_flow_stat_free@SUNWprivate_1.1 2.10-1 + dladm_flow_stat_query@SUNWprivate_1.1 2.10-1 + dladm_flow_stat_query_all@SUNWprivate_1.1 2.10-1 + dladm_flow_stat_query_all_free@SUNWprivate_1.1 2.10-1 + dladm_free_attrs@SUNWprivate_1.1 2.10-1 + dladm_free_ib_info@SUNWprivate_1.1 2.10-1 + dladm_free_props@SUNWprivate_1.1 2.10-1 + dladm_get_conf_field@SUNWprivate_1.1 2.10-1 + dladm_get_flowprop@SUNWprivate_1.1 2.10-1 + dladm_get_linkprop@SUNWprivate_1.1 2.10-1 + dladm_get_linkprop_values@SUNWprivate_1.1 2.10-1 + dladm_get_secobj@SUNWprivate_1.1 2.10-1 + dladm_get_single_mac_stat@SUNWprivate_1.1 2.10-1 + dladm_get_stats@SUNWprivate_1.1 2.10-1 + dladm_getsnap_conf@SUNWprivate_1.1 2.10-1 + dladm_ib_info@SUNWprivate_1.1 2.10-1 + dladm_info@SUNWprivate_1.1 2.10-1 + dladm_init_linkprop@SUNWprivate_1.1 2.10-1 + dladm_init_secobj@SUNWprivate_1.1 2.10-1 + dladm_iptun_create@SUNWprivate_1.1 2.10-1 + dladm_iptun_delete@SUNWprivate_1.1 2.10-1 + dladm_iptun_down@SUNWprivate_1.1 2.10-1 + dladm_iptun_get6to4relay@SUNWprivate_1.1 2.10-1 + dladm_iptun_getparams@SUNWprivate_1.1 2.10-1 + dladm_iptun_modify@SUNWprivate_1.1 2.10-1 + dladm_iptun_set6to4relay@SUNWprivate_1.1 2.10-1 + dladm_iptun_up@SUNWprivate_1.1 2.10-1 + dladm_ipv4addr2str@SUNWprivate_1.1 2.10-1 + dladm_ipv6addr2str@SUNWprivate_1.1 2.10-1 + dladm_key2linkid@SUNWprivate_1.1 2.10-1 + dladm_kstat_lookup@SUNWprivate_1.1 2.10-1 + dladm_kstat_value@SUNWprivate_1.1 2.10-1 + dladm_link_stat_diffchain@SUNWprivate_1.1 2.10-1 + dladm_link_stat_free@SUNWprivate_1.1 2.10-1 + dladm_link_stat_query@SUNWprivate_1.1 2.10-1 + dladm_link_stat_query_all@SUNWprivate_1.1 2.10-1 + dladm_link_stat_query_all_free@SUNWprivate_1.1 2.10-1 + dladm_linkduplex2str@SUNWprivate_1.1 2.10-1 + dladm_linkid2legacyname@SUNWprivate_1.1 2.10-1 + dladm_linkprop_is_set@SUNWprivate_1.1 2.10-1 + dladm_linkstate2str@SUNWprivate_1.1 2.10-1 + dladm_list2range@SUNWprivate_1.1 2.10-1 + dladm_mac_walk@SUNWprivate_1.1 2.10-1 + dladm_mask2prefixlen@SUNWprivate_1.1 2.10-1 + dladm_media2str@SUNWprivate_1.1 2.10-1 + dladm_name2info@SUNWprivate_1.1 2.10-1 + dladm_observe_to_bridge@SUNWprivate_1.1 2.10-1 + dladm_open@SUNWprivate_1.1 2.10-1 + dladm_open_conf@SUNWprivate_1.1 2.10-1 + dladm_parse_flow_attrs@SUNWprivate_1.1 2.10-1 + dladm_parse_flow_props@SUNWprivate_1.1 2.10-1 + dladm_parse_link_props@SUNWprivate_1.1 2.10-1 + dladm_parselink@SUNWprivate_1.1 2.10-1 + dladm_part_create@SUNWprivate_1.1 2.10-1 + dladm_part_delete@SUNWprivate_1.1 2.10-1 + dladm_part_info@SUNWprivate_1.1 2.10-1 + dladm_part_up@SUNWprivate_1.1 2.10-1 + dladm_phys_delete@SUNWprivate_1.1 2.10-1 + dladm_phys_info@SUNWprivate_1.1 2.10-1 + dladm_prefixlen2mask@SUNWprivate_1.1 2.10-1 + dladm_pri2str@SUNWprivate_1.1 2.10-1 + dladm_protect2str@SUNWprivate_1.1 2.10-1 + dladm_proto2str@SUNWprivate_1.1 2.10-1 + dladm_range2list@SUNWprivate_1.1 2.10-1 + dladm_range2strs@SUNWprivate_1.1 2.10-1 + dladm_remap_datalink_id@SUNWprivate_1.1 2.10-1 + dladm_remove_conf@SUNWprivate_1.1 2.10-1 + dladm_rename_link@SUNWprivate_1.1 2.10-1 + dladm_secobjclass2str@SUNWprivate_1.1 2.10-1 + dladm_set_conf_field@SUNWprivate_1.1 2.10-1 + dladm_set_flowprop@SUNWprivate_1.1 2.10-1 + dladm_set_linkprop@SUNWprivate_1.1 2.10-1 + dladm_set_rootdir@SUNWprivate_1.1 2.10-1 + dladm_set_secobj@SUNWprivate_1.1 2.10-1 + dladm_simnet_create@SUNWprivate_1.1 2.10-1 + dladm_simnet_delete@SUNWprivate_1.1 2.10-1 + dladm_simnet_info@SUNWprivate_1.1 2.10-1 + dladm_simnet_modify@SUNWprivate_1.1 2.10-1 + dladm_simnet_up@SUNWprivate_1.1 2.10-1 + dladm_start_usagelog@SUNWprivate_1.1 2.10-1 + dladm_stats_diff@SUNWprivate_1.1 2.10-1 + dladm_stats_total@SUNWprivate_1.1 2.10-1 + dladm_status2str@SUNWprivate_1.1 2.10-1 + dladm_stop_usagelog@SUNWprivate_1.1 2.10-1 + dladm_str2bw@SUNWprivate_1.1 2.10-1 + dladm_str2interval@SUNWprivate_1.1 2.10-1 + dladm_str2ipv4addr@SUNWprivate_1.1 2.10-1 + dladm_str2ipv6addr@SUNWprivate_1.1 2.10-1 + dladm_str2media@SUNWprivate_1.1 2.10-1 + dladm_str2pri@SUNWprivate_1.1 2.10-1 + dladm_str2protect@SUNWprivate_1.1 2.10-1 + dladm_str2proto@SUNWprivate_1.1 2.10-1 + dladm_str2secobjclass@SUNWprivate_1.1 2.10-1 + dladm_strs2range@SUNWprivate_1.1 2.10-1 + dladm_unset_conf_field@SUNWprivate_1.1 2.10-1 + dladm_unset_secobj@SUNWprivate_1.1 2.10-1 + dladm_up_datalink_id@SUNWprivate_1.1 2.10-1 + dladm_usage_dates@SUNWprivate_1.1 2.10-1 + dladm_usage_summary@SUNWprivate_1.1 2.10-1 + dladm_valid_bridgename@SUNWprivate_1.1 2.10-1 + dladm_valid_linkname@SUNWprivate_1.1 2.10-1 + dladm_valid_secobj_name@SUNWprivate_1.1 2.10-1 + dladm_vlan_create@SUNWprivate_1.1 2.10-1 + dladm_vlan_delete@SUNWprivate_1.1 2.10-1 + dladm_vlan_info@SUNWprivate_1.1 2.10-1 + dladm_vlan_up@SUNWprivate_1.1 2.10-1 + dladm_vnic_create@SUNWprivate_1.1 2.10-1 + dladm_vnic_delete@SUNWprivate_1.1 2.10-1 + dladm_vnic_info@SUNWprivate_1.1 2.10-1 + dladm_vnic_str2macaddrtype@SUNWprivate_1.1 2.10-1 + dladm_vnic_up@SUNWprivate_1.1 2.10-1 + dladm_walk@SUNWprivate_1.1 2.10-1 + dladm_walk_datalink_id@SUNWprivate_1.1 2.10-1 + dladm_walk_flow@SUNWprivate_1.1 2.10-1 + dladm_walk_flowprop@SUNWprivate_1.1 2.10-1 + dladm_walk_hwgrp@SUNWprivate_1.1 2.10-1 + dladm_walk_linkprop@SUNWprivate_1.1 2.10-1 + dladm_walk_macaddr@SUNWprivate_1.1 2.10-1 + dladm_walk_secobj@SUNWprivate_1.1 2.10-1 + dladm_walk_usage_res@SUNWprivate_1.1 2.10-1 + dladm_walk_usage_time@SUNWprivate_1.1 2.10-1 + dladm_wlan_auth2str@SUNWprivate_1.1 2.10-1 + dladm_wlan_bssid2str@SUNWprivate_1.1 2.10-1 + dladm_wlan_bsstype2str@SUNWprivate_1.1 2.10-1 + dladm_wlan_connect@SUNWprivate_1.1 2.10-1 + dladm_wlan_disconnect@SUNWprivate_1.1 2.10-1 + dladm_wlan_essid2str@SUNWprivate_1.1 2.10-1 + dladm_wlan_get_linkattr@SUNWprivate_1.1 2.10-1 + dladm_wlan_linkstatus2str@SUNWprivate_1.1 2.10-1 + dladm_wlan_mode2str@SUNWprivate_1.1 2.10-1 + dladm_wlan_scan@SUNWprivate_1.1 2.10-1 + dladm_wlan_secmode2str@SUNWprivate_1.1 2.10-1 + dladm_wlan_speed2str@SUNWprivate_1.1 2.10-1 + dladm_wlan_str2auth@SUNWprivate_1.1 2.10-1 + dladm_wlan_str2bssid@SUNWprivate_1.1 2.10-1 + dladm_wlan_str2bsstype@SUNWprivate_1.1 2.10-1 + dladm_wlan_str2essid@SUNWprivate_1.1 2.10-1 + dladm_wlan_str2linkstatus@SUNWprivate_1.1 2.10-1 + dladm_wlan_str2mode@SUNWprivate_1.1 2.10-1 + dladm_wlan_str2secmode@SUNWprivate_1.1 2.10-1 + dladm_wlan_str2speed@SUNWprivate_1.1 2.10-1 + dladm_wlan_str2strength@SUNWprivate_1.1 2.10-1 + dladm_wlan_strength2str@SUNWprivate_1.1 2.10-1 + dladm_wlan_wpa_del_key@SUNWprivate_1.1 2.10-1 + dladm_wlan_wpa_get_sr@SUNWprivate_1.1 2.10-1 + dladm_wlan_wpa_set_ie@SUNWprivate_1.1 2.10-1 + dladm_wlan_wpa_set_key@SUNWprivate_1.1 2.10-1 + dladm_wlan_wpa_set_mlme@SUNWprivate_1.1 2.10-1 + dladm_wlan_wpa_set_wpa@SUNWprivate_1.1 2.10-1 + dladm_write_conf@SUNWprivate_1.1 2.10-1 + dladm_zone_boot@SUNWprivate_1.1 2.10-1 + dladm_zone_halt@SUNWprivate_1.1 2.10-1 diff --git a/dladm/debian/patches/dladm-avoid-libvrrpadm.patch b/dladm/debian/patches/dladm-avoid-libvrrpadm.patch new file mode 100644 index 0000000..a41b057 --- /dev/null +++ b/dladm/debian/patches/dladm-avoid-libvrrpadm.patch @@ -0,0 +1,31 @@ +Index: dladm/usr/src/cmd/dladm/dladm.c +=================================================================== +--- dladm.orig/usr/src/cmd/dladm/dladm.c 2012-10-08 00:25:23.000000000 +0000 ++++ dladm/usr/src/cmd/dladm/dladm.c 2013-03-10 15:56:55.473880632 +0000 +@@ -60,7 +60,6 @@ + #include <libdlsim.h> + #include <libdlbridge.h> + #include <libinetutil.h> +-#include <libvrrpadm.h> + #include <bsm/adt.h> + #include <bsm/adt_event.h> + #include <libdlvnic.h> +@@ -75,6 +74,18 @@ + #include <stp_in.h> + #include <ofmt.h> + ++#ifndef VRRP_VRID_NONE ++#define VRRP_VRID_NONE 0 ++#endif ++ ++#ifndef VRRP_VRID_MIN ++#define VRRP_VRID_MIN 1 ++#endif ++ ++#ifndef VRRP_VRID_MAX ++#define VRRP_VRID_MAX 255 ++#endif ++ + #define MAXPORT 256 + #define MAXVNIC 256 + #define BUFLEN(lim, ptr) (((lim) > (ptr)) ? ((lim) - (ptr)) : 0) diff --git a/dladm/debian/patches/dladm-fix-libinetutil-callbacks.patch b/dladm/debian/patches/dladm-fix-libinetutil-callbacks.patch new file mode 100644 index 0000000..7ddc910 --- /dev/null +++ b/dladm/debian/patches/dladm-fix-libinetutil-callbacks.patch @@ -0,0 +1,105 @@ +Description: libinetutil headers was fixed to use size_t instead of uint_t + see /usr/include/ofmt.h for ofmt_cb_t +Index: dladm/usr/src/cmd/dladm/dladm.c +=================================================================== +--- dladm.orig/usr/src/cmd/dladm/dladm.c 2013-03-10 15:59:22.394179421 +0000 ++++ dladm/usr/src/cmd/dladm/dladm.c 2013-03-10 16:04:15.888907278 +0000 +@@ -2880,7 +2880,7 @@ + } + + static boolean_t +-print_link_stats_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_link_stats_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + link_args_t *largs = ofarg->ofmt_cbarg; + pktsum_t *diff_stats = largs->link_s_psum; +@@ -2995,7 +2995,7 @@ + } + + static boolean_t +-print_xaggr_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_xaggr_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + const laggr_args_t *l = ofarg->ofmt_cbarg; + boolean_t is_port = (l->laggr_lport >= 0); +@@ -3093,7 +3093,7 @@ + } + + static boolean_t +-print_lacp_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_lacp_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + const laggr_args_t *l = ofarg->ofmt_cbarg; + int portnum; +@@ -3180,7 +3180,7 @@ + } + + static boolean_t +-print_aggr_stats_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_aggr_stats_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + const laggr_args_t *l = ofarg->ofmt_cbarg; + int portnum; +@@ -3781,7 +3781,7 @@ + * callback for ofmt_print() + */ + static boolean_t +-print_phys_one_mac_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_phys_one_mac_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + print_phys_mac_state_t *mac_state = ofarg->ofmt_cbarg; + dladm_macaddr_attr_t *attr = mac_state->ms_mac_attr; +@@ -3826,7 +3826,7 @@ + } print_phys_hwgrp_state_t; + + static boolean_t +-print_phys_one_hwgrp_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_phys_one_hwgrp_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + int i; + boolean_t first = B_TRUE; +@@ -5968,7 +5968,7 @@ + } wlan_scan_args_t; + + static boolean_t +-print_wlan_attr_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_wlan_attr_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + wlan_scan_args_t *w = ofarg->ofmt_cbarg; + print_wifi_state_t *statep = w->ws_state; +@@ -6049,7 +6049,7 @@ + } + + static boolean_t +-print_wifi_status_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_wifi_status_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + static char tmpbuf[DLADM_STRSIZE]; + wlan_scan_args_t *w = ofarg->ofmt_cbarg; +@@ -6063,7 +6063,7 @@ + } + + static boolean_t +-print_link_attr_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_link_attr_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + wlan_scan_args_t *w = ofarg->ofmt_cbarg, w1; + print_wifi_state_t *statep = w->ws_state; +@@ -6566,7 +6566,7 @@ + } + + static boolean_t +-print_linkprop_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_linkprop_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + linkprop_args_t *arg = ofarg->ofmt_cbarg; + char *propname = arg->ls_propname; +@@ -9057,7 +9057,7 @@ + * prints string which is offset by ofmt_arg->ofmt_id within buf. + */ + static boolean_t +-print_default_cb(ofmt_arg_t *ofarg, char *buf, uint_t bufsize) ++print_default_cb(ofmt_arg_t *ofarg, char *buf, size_t bufsize) + { + char *value; + diff --git a/dladm/debian/patches/dladm-no-etc.patch b/dladm/debian/patches/dladm-no-etc.patch new file mode 100644 index 0000000..496067e --- /dev/null +++ b/dladm/debian/patches/dladm-no-etc.patch @@ -0,0 +1,13 @@ +Index: dladm/usr/src/cmd/dladm/Makefile +=================================================================== +--- dladm.orig/usr/src/cmd/dladm/Makefile 2012-10-08 00:25:23.000000000 +0000 ++++ dladm/usr/src/cmd/dladm/Makefile 2013-03-10 16:26:14.822144263 +0000 +@@ -53,7 +53,7 @@ + + all: $(ROOTFS_PROG) + +-install: all $(ROOTSBINPROG) $(ROOTCFGDIR) $(ROOTCFGFILES) ++install: all $(ROOTSBINPROG) + $(RM) $(ROOTUSRSBINPROG) + -$(SYMLINK) ../../sbin/$(PROG) $(ROOTUSRSBINPROG) + diff --git a/dladm/debian/patches/dladm-pointers.patch b/dladm/debian/patches/dladm-pointers.patch new file mode 100644 index 0000000..e048214 --- /dev/null +++ b/dladm/debian/patches/dladm-pointers.patch @@ -0,0 +1,49 @@ +Index: dladm/usr/src/cmd/dladm/dladm.c +=================================================================== +--- dladm.orig/usr/src/cmd/dladm/dladm.c 2013-03-10 16:06:50.675291504 +0000 ++++ dladm/usr/src/cmd/dladm/dladm.c 2013-03-10 16:08:28.829870523 +0000 +@@ -579,7 +579,7 @@ + { "link", required_argument, 0, 'l' }, + { "max-age", required_argument, 0, 'm' }, + { "priority", required_argument, 0, 'p' }, +- { NULL, NULL, 0, 0 } ++ { 0, 0, 0, 0 } + }; + + static const struct option bridge_show_lopts[] = { +@@ -844,7 +844,7 @@ + offsetof(link_fields_buf_t, link_phys_device), print_default_cb}, + { "FLAGS", 7, + offsetof(link_fields_buf_t, link_flags), print_default_cb}, +-{ NULL, 0, NULL, 0}} ++{ 0, 0, 0, 0}} + ; + + /* +@@ -6205,7 +6205,7 @@ + char *field, *token, *lasts = NULL, c; + + token = str; +- while ((c = *token++) != NULL) { ++ while ((c = *token++) != '\0') { + if (c == ',') + nfields++; + } +@@ -7390,7 +7390,7 @@ + die("secure object name required"); + + token = argv[optind]; +- while ((c = *token++) != NULL) { ++ while ((c = *token++) != '\0') { + if (c == ',') + nfields++; + } +@@ -7543,7 +7543,7 @@ + token = argv[optind]; + if (token == NULL) + die("secure object name required"); +- while ((c = *token++) != NULL) { ++ while ((c = *token++) != '\0') { + if (c == ',') + obj_fields++; + } diff --git a/dladm/debian/patches/dlmgmtd-libsunavl.patch b/dladm/debian/patches/dlmgmtd-libsunavl.patch new file mode 100644 index 0000000..fff949a --- /dev/null +++ b/dladm/debian/patches/dlmgmtd-libsunavl.patch @@ -0,0 +1,49 @@ +Index: dladm/usr/src/cmd/dlmgmtd/dlmgmt_door.c +=================================================================== +--- dladm.orig/usr/src/cmd/dlmgmtd/dlmgmt_door.c 2012-10-08 00:25:23.000000000 +0000 ++++ dladm/usr/src/cmd/dlmgmtd/dlmgmt_door.c 2013-03-10 18:44:26.301522909 +0000 +@@ -58,6 +58,7 @@ + #include <libsysevent.h> + #include <libdlmgmt.h> + #include <librcm.h> ++#include <libsunavl.h> + #include "dlmgmt_impl.h" + + typedef void dlmgmt_door_handler_t(void *, void *, size_t *, zoneid_t, +Index: dladm/usr/src/cmd/dlmgmtd/dlmgmt_util.c +=================================================================== +--- dladm.orig/usr/src/cmd/dlmgmtd/dlmgmt_util.c 2012-10-08 00:25:23.000000000 +0000 ++++ dladm/usr/src/cmd/dlmgmtd/dlmgmt_util.c 2013-03-10 18:45:16.140772330 +0000 +@@ -40,6 +40,7 @@ + #include <zone.h> + #include <errno.h> + #include <libdlpi.h> ++#include <libsunavl.h> + #include "dlmgmt_impl.h" + + /* +Index: dladm/usr/src/cmd/dlmgmtd/dlmgmt_db.c +=================================================================== +--- dladm.orig/usr/src/cmd/dlmgmtd/dlmgmt_db.c 2012-10-08 00:25:23.000000000 +0000 ++++ dladm/usr/src/cmd/dlmgmtd/dlmgmt_db.c 2013-03-10 18:45:48.964227762 +0000 +@@ -40,6 +40,7 @@ + #include <pthread.h> + #include <unistd.h> + #include <wait.h> ++#include <libsunavl.h> + #include <libcontract.h> + #include <libcontract_priv.h> + #include <sys/contract/process.h> +Index: dladm/usr/src/cmd/dlmgmtd/Makefile +=================================================================== +--- dladm.orig/usr/src/cmd/dlmgmtd/Makefile 2012-10-08 00:25:23.000000000 +0000 ++++ dladm/usr/src/cmd/dlmgmtd/Makefile 2013-03-10 18:46:11.726503329 +0000 +@@ -38,7 +38,7 @@ + + $(ROOTCFGDIR)/datalink.conf := FILEMODE= 644 + +-LDLIBS += -ldladm -ldlpi -lavl -lnvpair -lsysevent -lcontract ++LDLIBS += -ldladm -ldlpi -lsunavl -lnvpair -lsysevent -lcontract + + CERRWARN += -_gcc=-Wno-unused-label + CERRWARN += -_gcc=-Wno-uninitialized diff --git a/dladm/debian/patches/dlmgmtd-no-etc.patch b/dladm/debian/patches/dlmgmtd-no-etc.patch new file mode 100644 index 0000000..dae64ce --- /dev/null +++ b/dladm/debian/patches/dlmgmtd-no-etc.patch @@ -0,0 +1,14 @@ +Index: dladm/usr/src/cmd/dlmgmtd/Makefile +=================================================================== +--- dladm.orig/usr/src/cmd/dlmgmtd/Makefile 2013-03-10 18:46:11.726503329 +0000 ++++ dladm/usr/src/cmd/dlmgmtd/Makefile 2013-03-10 18:52:08.427907854 +0000 +@@ -59,8 +59,7 @@ + $(LINK.c) -o $@ $(OBJS) $(LDLIBS) $(CTFMERGE_HOOK) + $(POST_PROCESS) + +-install: all $(ROOTSBINPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD) $(ROOTCFGDIR) \ +- $(ROOTCFGFILES) ++install: all $(ROOTSBINPROG) $(ROOTMANIFEST) $(ROOTSVCMETHOD) + + check: $(CHKMANIFEST) + diff --git a/dladm/debian/patches/flowadm-fix-libinetutil-callbacks.patch b/dladm/debian/patches/flowadm-fix-libinetutil-callbacks.patch new file mode 100644 index 0000000..22521c8 --- /dev/null +++ b/dladm/debian/patches/flowadm-fix-libinetutil-callbacks.patch @@ -0,0 +1,24 @@ +Description: libinetutil headers was fixed to use size_t instead of uint_t + see /usr/include/ofmt.h for ofmt_cb_t +Index: dladm/usr/src/cmd/flowadm/flowadm.c +=================================================================== +--- dladm.orig/usr/src/cmd/flowadm/flowadm.c 2012-10-08 00:25:23.000000000 +0000 ++++ dladm/usr/src/cmd/flowadm/flowadm.c 2013-03-10 21:07:36.032773781 +0000 +@@ -1027,7 +1027,7 @@ + } + + static boolean_t +-print_flowprop_cb(ofmt_arg_t *of_arg, char *buf, uint_t bufsize) ++print_flowprop_cb(ofmt_arg_t *of_arg, char *buf, size_t bufsize) + { + flowprop_args_t *arg = of_arg->ofmt_cbarg; + char *propname = arg->fs_propname; +@@ -1269,7 +1269,7 @@ + * prints string which is offset by of_arg->ofmt_id within buf. + */ + static boolean_t +-print_default_cb(ofmt_arg_t *of_arg, char *buf, uint_t bufsize) ++print_default_cb(ofmt_arg_t *of_arg, char *buf, size_t bufsize) + { + char *value; + diff --git a/dladm/debian/patches/flowadm-make.patch b/dladm/debian/patches/flowadm-make.patch new file mode 100644 index 0000000..32bc1b9 --- /dev/null +++ b/dladm/debian/patches/flowadm-make.patch @@ -0,0 +1,80 @@ +Description: rewrite buggy Makefile: + flowadm <- flowadm circular dependency. + Take Makefile from beadm +Index: dladm/usr/src/cmd/flowadm/Makefile +=================================================================== +--- dladm.orig/usr/src/cmd/flowadm/Makefile 2012-10-08 00:25:23.000000000 +0000 ++++ dladm/usr/src/cmd/flowadm/Makefile 2013-03-10 21:04:10.530460089 +0000 +@@ -23,52 +23,41 @@ + # Use is subject to license terms. + # + +-PROG=flowadm +- +-ROOTFS_PROG= $(PROG) +- +-POFILE= $(PROG).po +-CONFIGFILES= flowadm.conf flowprop.conf ++PROG= flowadm ++OBJS= flowadm.o ++SRCS= $(OBJS:%.o=%.c) ++POFILE= flowadm.po + + include ../Makefile.cmd + +-XGETFLAGS += -a -x $(PROG).xcl +-LDLIBS += -L$(ROOT)/lib + LDLIBS += -ldladm -linetutil + +-ROOTCFGDIR= $(ROOTETC)/dladm +-ROOTCFGFILES= $(CONFIGFILES:%=$(ROOTCFGDIR)/%) ++$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG + +-$(ROOTCFGFILES):= FILEMODE= 644 ++ROOTUSRSBINLINKS = $(PROG:%=$(ROOTUSRSBIN)/%) + + .KEEP_STATE: + +-all: $(ROOTFS_PROG) ++.PARALLEL: + +-# +-# Message catalog +-# +-_msg: $(POFILE) ++all: $(PROG) ++ ++$(PROG): $(OBJS) ++ $(LINK.c) -o $@ $(OBJS) $(LDLIBS) ++ $(POST_PROCESS) + +-$(POFILE): $(PROG).c +- $(RM) $@ +- $(COMPILE.cpp) $(PROG).c > $(POFILE).i +- $(XGETTEXT) $(XGETFLAGS) $(POFILE).i +- sed "/^domain/d" messages.po > $@ +- $(RM) messages.po $(POFILE).i +- +-install: all $(ROOTSBINPROG) $(ROOTCFGDIR) $(ROOTCFGFILES) +- $(RM) $(ROOTUSRSBINPROG) +- -$(SYMLINK) ../../sbin/$(PROG) $(ROOTUSRSBINPROG) ++install: all $(ROOTSBINPROG) $(ROOTUSRSBINLINKS) + + clean: ++ $(RM) $(OBJS) + +-lint: lint_PROG ++lint: lint_SRCS + +-$(ROOTCFGDIR): +- $(INS.dir) ++# Links from /usr/sbin to /sbin ++$(ROOTUSRSBINLINKS): ++ -$(RM) $@; $(SYMLINK) ../../sbin/$(PROG) $@ + +-$(ROOTCFGDIR)/%: $(ROOTCFGDIR) % +- $(INS.file) ++FRC: + + include ../Makefile.targ ++ diff --git a/dladm/debian/patches/flowstat-fix-libinetutil-callbacks.patch b/dladm/debian/patches/flowstat-fix-libinetutil-callbacks.patch new file mode 100644 index 0000000..998e58b --- /dev/null +++ b/dladm/debian/patches/flowstat-fix-libinetutil-callbacks.patch @@ -0,0 +1,22 @@ +Index: dladm/usr/src/cmd/flowstat/flowstat.c +=================================================================== +--- dladm.orig/usr/src/cmd/flowstat/flowstat.c 2012-10-08 00:25:23.000000000 +0000 ++++ dladm/usr/src/cmd/flowstat/flowstat.c 2013-03-10 21:15:22.121934824 +0000 +@@ -360,7 +360,7 @@ + } + + static boolean_t +-print_flow_stats_cb(ofmt_arg_t *of_arg, char *buf, uint_t bufsize) ++print_flow_stats_cb(ofmt_arg_t *of_arg, char *buf, size_t bufsize) + { + flow_args_t *fargs = of_arg->ofmt_cbarg; + flow_stat_t *diff_stats = fargs->flow_s_stat; +@@ -1116,7 +1116,7 @@ + * prints string which is offset by of_arg->ofmt_id within buf. + */ + static boolean_t +-print_default_cb(ofmt_arg_t *of_arg, char *buf, uint_t bufsize) ++print_default_cb(ofmt_arg_t *of_arg, char *buf, size_t bufsize) + { + char *value; + diff --git a/dladm/debian/patches/flowstat-fprev-may-be-used-uninitialized.patch b/dladm/debian/patches/flowstat-fprev-may-be-used-uninitialized.patch new file mode 100644 index 0000000..233cdbb --- /dev/null +++ b/dladm/debian/patches/flowstat-fprev-may-be-used-uninitialized.patch @@ -0,0 +1,33 @@ +Index: dladm/usr/src/cmd/flowstat/flowstat.c +=================================================================== +--- dladm.orig/usr/src/cmd/flowstat/flowstat.c 2013-03-10 21:21:03.827271359 +0000 ++++ dladm/usr/src/cmd/flowstat/flowstat.c 2013-03-10 21:35:39.050747132 +0000 +@@ -23,6 +23,7 @@ + * Use is subject to license terms. + */ + ++#include <assert.h> + #include <stdio.h> + #include <locale.h> + #include <stdarg.h> +@@ -331,7 +332,7 @@ + cleanup_removed_flows(show_flow_state_t *state) + { + flow_chain_t *fcurr; +- flow_chain_t *fprev; ++ flow_chain_t *fprev = NULL; + flow_chain_t *tofree; + + /* Delete all nodes from the list that have fc_visited marked false */ +@@ -347,8 +348,10 @@ + /* Is it head of the list? */ + if (fcurr == state->fs_flowchain) + state->fs_flowchain = fcurr->fc_next; +- else ++ else { ++ assert(fprev != NULL); + fprev->fc_next = fcurr->fc_next; ++ } + + /* fprev remains the same */ + tofree = fcurr; diff --git a/dladm/debian/patches/flowstat-include-time.h.patch b/dladm/debian/patches/flowstat-include-time.h.patch new file mode 100644 index 0000000..13b4dfd --- /dev/null +++ b/dladm/debian/patches/flowstat-include-time.h.patch @@ -0,0 +1,12 @@ +Index: dladm/usr/src/cmd/flowstat/flowstat.c +=================================================================== +--- dladm.orig/usr/src/cmd/flowstat/flowstat.c 2013-03-10 21:15:22.121934824 +0000 ++++ dladm/usr/src/cmd/flowstat/flowstat.c 2013-03-10 21:21:03.827271359 +0000 +@@ -27,6 +27,7 @@ + #include <locale.h> + #include <stdarg.h> + #include <stdlib.h> ++#include <time.h> + #include <fcntl.h> + #include <string.h> + #include <stropts.h> diff --git a/dladm/debian/patches/flowstat-make.patch b/dladm/debian/patches/flowstat-make.patch new file mode 100644 index 0000000..dca2c36 --- /dev/null +++ b/dladm/debian/patches/flowstat-make.patch @@ -0,0 +1,74 @@ +Description: rewrite buggy Makefile: + flowstat <- flowstat circular dependency. +Index: dladm/usr/src/cmd/flowstat/Makefile +=================================================================== +--- dladm.orig/usr/src/cmd/flowstat/Makefile 2012-10-08 00:25:23.000000000 +0000 ++++ dladm/usr/src/cmd/flowstat/Makefile 2013-03-10 21:12:07.122986733 +0000 +@@ -23,51 +23,35 @@ + # Use is subject to license terms. + # + +-PROG=flowstat +- +-ROOTFS_PROG= $(PROG) +- +-POFILE= $(PROG).po ++PROG= flowstat ++OBJS= flowstat.o ++SRCS= $(OBJS:%.o=%.c) ++POFILE= flowstat.po + + include ../Makefile.cmd + +-XGETFLAGS += -a -x $(PROG).xcl +-LDLIBS += -L$(ROOT)/lib + LDLIBS += -ldladm -linetutil + +-CERRWARN += -_gcc=-Wno-implicit-function-declaration +-CERRWARN += -_gcc=-Wno-uninitialized +- +-ROOTCFGDIR= $(ROOTETC)/dladm ++$(NOT_RELEASE_BUILD)CPPFLAGS += -DDEBUG + + .KEEP_STATE: + +-all: $(ROOTFS_PROG) ++.PARALLEL: + +-# +-# Message catalog +-# +-_msg: $(POFILE) ++all: $(PROG) + +-$(POFILE): $(PROG).c +- $(RM) $@ +- $(COMPILE.cpp) $(PROG).c > $(POFILE).i +- $(XGETTEXT) $(XGETFLAGS) $(POFILE).i +- sed "/^domain/d" messages.po > $@ +- $(RM) messages.po $(POFILE).i +- +-install: all $(ROOTSBINPROG) $(ROOTCFGDIR) +- $(RM) $(ROOTUSRSBINPROG) +- -$(SYMLINK) ../../sbin/$(PROG) $(ROOTUSRSBINPROG) ++$(PROG): $(OBJS) ++ $(LINK.c) -o $@ $(OBJS) $(LDLIBS) ++ $(POST_PROCESS) + +-clean: ++install: all $(ROOTUSRSBINPROG) + +-lint: lint_PROG ++clean: ++ $(RM) $(OBJS) + +-$(ROOTCFGDIR): +- $(INS.dir) ++lint: lint_SRCS + +-$(ROOTCFGDIR)/%: $(ROOTCFGDIR) % +- $(INS.file) ++FRC: + + include ../Makefile.targ ++ diff --git a/dladm/debian/patches/libdladm-NULL-0.patch b/dladm/debian/patches/libdladm-NULL-0.patch new file mode 100644 index 0000000..a509980 --- /dev/null +++ b/dladm/debian/patches/libdladm-NULL-0.patch @@ -0,0 +1,61 @@ +Index: libdladm/usr/src/lib/libdladm/common/linkprop.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/linkprop.c 2012-11-03 04:36:12.126660715 +0400 ++++ libdladm/usr/src/lib/libdladm/common/linkprop.c 2012-11-03 04:36:24.257307451 +0400 +@@ -2452,7 +2452,7 @@ + fail: + for (i = 0; i < val_cnt; i++) { + free((void *)vdp[i].vd_val); +- vdp[i].vd_val = NULL; ++ vdp[i].vd_val = 0; + } + return (status); + } +@@ -2790,7 +2790,7 @@ + fail: + for (i = 0; i < val_cnt; i++) { + free((void *)vdp[i].vd_val); +- vdp[i].vd_val = NULL; ++ vdp[i].vd_val = 0; + } + return (status); + } +Index: libdladm/usr/src/lib/libdladm/common/libdlwlan.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/libdlwlan.c 2012-11-03 04:36:24.135282410 +0400 ++++ libdladm/usr/src/lib/libdladm/common/libdlwlan.c 2012-11-03 04:36:24.258352453 +0400 +@@ -558,7 +558,7 @@ + { + int i; + char buf[WLDP_BUFSIZE]; +- connect_state_t state = {0, NULL, NULL}; ++ connect_state_t state = {0, 0, NULL}; + attr_node_t *nodep = NULL; + boolean_t create_ibss, set_authmode; + dladm_wlan_attr_t **wl_list = NULL; +Index: libdladm/usr/src/lib/libdladm/common/flowprop.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/flowprop.c 2012-11-03 04:36:12.126602820 +0400 ++++ libdladm/usr/src/lib/libdladm/common/flowprop.c 2012-11-03 04:36:24.258988614 +0400 +@@ -61,7 +61,7 @@ + static fpd_checkf_t do_check_priority; + + static fprop_desc_t prop_table[] = { +- { "maxbw", { "", NULL }, NULL, 0, B_FALSE, ++ { "maxbw", { "", 0 }, NULL, 0, B_FALSE, + do_set_maxbw, NULL, + do_get_maxbw, do_check_maxbw}, + { "priority", { "", MPL_RESET }, NULL, 0, B_FALSE, +Index: libdladm/usr/src/lib/libdladm/common/libdlstat.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/libdlstat.c 2012-11-03 04:36:24.213256195 +0400 ++++ libdladm/usr/src/lib/libdladm/common/libdlstat.c 2012-11-03 04:36:50.064568239 +0400 +@@ -98,7 +98,7 @@ + /* match the flowname */ + if (flowname != NULL) { + if (strncmp(flowname, flist->flowname, MAXFLOWNAMELEN) +- == NULL) ++ == 0) + return (flist); + /* match the linkid */ + } else { diff --git a/dladm/debian/patches/libdladm-avoid-libvrrpadm.h.patch b/dladm/debian/patches/libdladm-avoid-libvrrpadm.h.patch new file mode 100644 index 0000000..d87643a --- /dev/null +++ b/dladm/debian/patches/libdladm-avoid-libvrrpadm.h.patch @@ -0,0 +1,48 @@ +Description: avoid libvrrpadm. + We need only two numbers defined by RFC, and cannot + build libvrrpadm because it depends on libdladm. + See http://tools.ietf.org/id/draft-ietf-vrrp-spec-v2-10.txt +Index: libdladm/usr/src/lib/libdladm/common/libdlvlan.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/libdlvlan.c 2012-11-03 04:09:50.256036369 +0400 ++++ libdladm/usr/src/lib/libdladm/common/libdlvlan.c 2012-11-03 04:18:39.016597664 +0400 +@@ -25,7 +25,10 @@ + + #include <libdlvlan.h> + #include <libdlvnic.h> +-#include <libvrrpadm.h> ++ ++#ifndef VRRP_VRID_NONE ++#define VRRP_VRID_NONE 0 ++#endif + + /* + * VLAN Administration Library. +Index: libdladm/usr/src/lib/libdladm/common/libdlvnic.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/libdlvnic.c 2012-11-03 04:09:50.266314394 +0400 ++++ libdladm/usr/src/lib/libdladm/common/libdlvnic.c 2012-11-03 04:18:39.852643042 +0400 +@@ -37,11 +37,22 @@ + #include <net/if_dl.h> + #include <sys/dld.h> + #include <libdladm_impl.h> +-#include <libvrrpadm.h> + #include <libdllink.h> + #include <libdlbridge.h> + #include <libdlvnic.h> + ++#ifndef VRRP_VRID_NONE ++#define VRRP_VRID_NONE 0 ++#endif ++ ++#ifndef VRRP_VRID_MIN ++#define VRRP_VRID_MIN 1 ++#endif ++ ++#ifndef VRRP_VRID_MAX ++#define VRRP_VRID_MAX 255 ++#endif ++ + /* + * VNIC administration library. + */ diff --git a/dladm/debian/patches/libdladm-include-time.h.patch b/dladm/debian/patches/libdladm-include-time.h.patch new file mode 100644 index 0000000..6af4862 --- /dev/null +++ b/dladm/debian/patches/libdladm-include-time.h.patch @@ -0,0 +1,12 @@ +Index: dladm/usr/src/lib/libdladm/common/usage.c +=================================================================== +--- dladm.orig/usr/src/lib/libdladm/common/usage.c 2012-10-08 00:25:38.000000000 +0000 ++++ dladm/usr/src/lib/libdladm/common/usage.c 2013-03-10 15:48:22.076046714 +0000 +@@ -26,6 +26,7 @@ + + #include <fcntl.h> + #include <stdlib.h> ++#include <time.h> + #include <strings.h> + #include <exacct.h> + #include <net/if.h> diff --git a/dladm/debian/patches/libdladm-missing-prototypes.patch b/dladm/debian/patches/libdladm-missing-prototypes.patch new file mode 100644 index 0000000..8a79139 --- /dev/null +++ b/dladm/debian/patches/libdladm-missing-prototypes.patch @@ -0,0 +1,14 @@ +Index: dladm/usr/src/lib/libdladm/common/libdlstat.h +=================================================================== +--- dladm.orig/usr/src/lib/libdladm/common/libdlstat.h 2012-10-08 00:25:38.000000000 +0000 ++++ dladm/usr/src/lib/libdladm/common/libdlstat.h 2013-03-10 21:19:53.021675386 +0000 +@@ -287,6 +287,9 @@ + flow_stat_t *); + extern name_value_stat_entry_t *dladm_flow_stat_query_all(const char *); + ++extern void dladm_flow_stat_free(flow_stat_t *); ++extern void dladm_flow_stat_query_all_free(name_value_stat_entry_t *); ++ + #ifdef __cplusplus + } + #endif diff --git a/dladm/debian/patches/libdladm-ncurses-workaround.patch b/dladm/debian/patches/libdladm-ncurses-workaround.patch new file mode 100644 index 0000000..2976620 --- /dev/null +++ b/dladm/debian/patches/libdladm-ncurses-workaround.patch @@ -0,0 +1,19 @@ +Description: Debian's libncurses workaround. + libcurses.so is a linker script for GNU ld. + The linker we have to use (SunOS ld) does not understand it. + So we create symbolic links for libncurses.so.5 under debian/tmp. + And thus we need to explicitly link with libtinfo. + +Index: libdladm/usr/src/lib/libdladm/Makefile.com +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/Makefile.com 2012-10-08 04:25:38.000000000 +0400 ++++ libdladm/usr/src/lib/libdladm/Makefile.com 2012-11-03 04:50:56.227575464 +0400 +@@ -36,7 +36,7 @@ + + LIBS = $(DYNLIB) $(LINTLIB) + LDLIBS += -ldevinfo -lc -linetutil -lsocket -lscf -lrcm -lnvpair \ +- -lexacct -lnsl -lkstat -lcurses -lpool ++ -lexacct -lnsl -lkstat -lcurses -ltinfo -lpool + + SRCDIR = ../common + $(LINTLIB) := SRCS = $(SRCDIR)/$(LINTSRC) diff --git a/dladm/debian/patches/libdladm-no-libdlpi.h.patch b/dladm/debian/patches/libdladm-no-libdlpi.h.patch new file mode 100644 index 0000000..16a8eea --- /dev/null +++ b/dladm/debian/patches/libdladm-no-libdlpi.h.patch @@ -0,0 +1,50 @@ +Description: libdlpi.h is not used. + And libdlpi itself depends on libdladm. +Index: libdladm/usr/src/lib/libdladm/common/libdladm.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/libdladm.c 2012-10-08 04:25:38.000000000 +0400 ++++ libdladm/usr/src/lib/libdladm/common/libdladm.c 2012-11-03 04:09:50.099923107 +0400 +@@ -37,7 +37,6 @@ + #include <sys/dld_ioc.h> + #include <libdladm_impl.h> + #include <libintl.h> +-#include <libdlpi.h> + #include <libdllink.h> + + static char dladm_rootdir[MAXPATHLEN] = "/"; +Index: libdladm/usr/src/lib/libdladm/common/libdliptun.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/libdliptun.c 2012-10-08 04:25:38.000000000 +0400 ++++ libdladm/usr/src/lib/libdladm/common/libdliptun.c 2012-11-03 04:09:50.185403979 +0400 +@@ -37,7 +37,6 @@ + #include <netinet/in.h> + #include <inet/iptun.h> + #include <sys/dls.h> +-#include <libdlpi.h> + #include <libdladm_impl.h> + #include <libdllink.h> + #include <libdliptun.h> +Index: libdladm/usr/src/lib/libdladm/common/libdllink.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/libdllink.c 2012-10-08 04:25:38.000000000 +0400 ++++ libdladm/usr/src/lib/libdladm/common/libdllink.c 2012-11-03 04:09:50.196162879 +0400 +@@ -34,7 +34,6 @@ + #include <sys/vlan.h> + #include <zone.h> + #include <librcm.h> +-#include <libdlpi.h> + #include <libdevinfo.h> + #include <libdlaggr.h> + #include <libdlvlan.h> +Index: libdladm/usr/src/lib/libdladm/common/libdlwlan.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/libdlwlan.c 2012-11-03 04:08:16.391939978 +0400 ++++ libdladm/usr/src/lib/libdladm/common/libdlwlan.c 2012-11-03 04:09:50.293605868 +0400 +@@ -35,7 +35,6 @@ + #include <net/if.h> + #include <net/if_dl.h> + #include <net/if_types.h> +-#include <libdlpi.h> + #include <libdllink.h> + #include <libscf.h> + #include <libdlwlan.h> diff --git a/dladm/debian/patches/libdladm-offsetof.patch b/dladm/debian/patches/libdladm-offsetof.patch new file mode 100644 index 0000000..dae852c --- /dev/null +++ b/dladm/debian/patches/libdladm-offsetof.patch @@ -0,0 +1,12 @@ +Index: libdladm/usr/src/lib/libdladm/common/libdlstat.c +=================================================================== +--- libdladm.orig/usr/src/lib/libdladm/common/libdlstat.c 2012-11-03 04:22:40.306078268 +0400 ++++ libdladm/usr/src/lib/libdladm/common/libdlstat.c 2012-11-03 04:31:13.445477848 +0400 +@@ -25,6 +25,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <stddef.h> + #include <strings.h> + #include <err.h> + #include <errno.h> diff --git a/dladm/debian/patches/series b/dladm/debian/patches/series new file mode 100644 index 0000000..0697c34 --- /dev/null +++ b/dladm/debian/patches/series @@ -0,0 +1,19 @@ +libdladm-no-libdlpi.h.patch +libdladm-avoid-libvrrpadm.h.patch +libdladm-offsetof.patch +libdladm-NULL-0.patch +libdladm-ncurses-workaround.patch +libdladm-include-time.h.patch +dladm-avoid-libvrrpadm.patch +dladm-fix-libinetutil-callbacks.patch +dladm-pointers.patch +dladm-no-etc.patch +dlmgmtd-libsunavl.patch +dlmgmtd-no-etc.patch +flowadm-make.patch +flowadm-fix-libinetutil-callbacks.patch +flowstat-make.patch +flowstat-fix-libinetutil-callbacks.patch +libdladm-missing-prototypes.patch +flowstat-include-time.h.patch +flowstat-fprev-may-be-used-uninitialized.patch diff --git a/dladm/debian/rules b/dladm/debian/rules new file mode 100755 index 0000000..cf2006a --- /dev/null +++ b/dladm/debian/rules @@ -0,0 +1,116 @@ +#!/usr/bin/make -f + +include /usr/share/dpkg/architecture.mk +export DH_VERBOSE = 1 + +# libs having "install_h" target to install headers: +libs_headers := \ +libdladm \ + +# All libraries to build and to package. +# Order is important: +libs := $(libs_headers) \ + +cmd := dladm dlmgmtd flowadm flowstat + + +unpack: unpack-stamp +unpack-stamp: + dh_testdir + dh_illumos_gate --build \ + $(libs:%=usr/src/lib/%) \ + $(cmd:%=usr/src/cmd/%) \ + usr/src/man/man1m/dladm.1m \ + usr/src/man/man1m/dlmgmtd.1m \ + usr/src/man/man1m/flowadm.1m + + # Not used and buggy: + echo > usr/src/Makefile.msg.targ + touch $@ + +patch: patch-stamp +patch-stamp: unpack-stamp + dh_testdir + [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2 + touch $@ + +unpatch: + dh_testdir + [ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2 + rm -f patch-stamp + +dirs-stamp: + . usr/env.sh; mkdir -p \ + debian/tmp$$DEB_LIBDIR_32 \ + debian/tmp$$DEB_LIBDIR_64 \ + debian/tmp$$DEB_USRLIBDIR_32 \ + debian/tmp$$DEB_USRLIBDIR_64 \ + debian/tmp/lib/svc/manifest/network \ + debian/tmp/lib/svc/method \ + debian/tmp/sbin \ + debian/tmp/usr/include \ + debian/tmp/usr/sbin + touch $@ + +headers-stamp: patch-stamp dirs-stamp + dh_illumos_make $(libs_headers:%=usr/src/lib/%) -t install_h + touch $@ + +install install install-arch install-indep: install-stamp +install-stamp: build-stamp + # Move dev symlink from /lib into /usr/lib: + for l in `find debian/tmp/lib32 -maxdepth 1 -type l -name \*.so`; do \ + ln -sf `readlink -f $$l` debian/tmp/usr/lib32/`basename $$l`; \ + rm $$l; \ + done + for l in `find debian/tmp/lib/$(DEB_HOST_MULTIARCH) -maxdepth 1 -type l -name \*.so`; do \ + ln -sf `readlink -f $$l` debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/`basename $$l`; \ + rm $$l; \ + done + # Make symlinks relative: + symlinks -c debian/tmp/usr/lib32 + symlinks -c debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) + touch $@ + +build build-arch build-indep: build-stamp +build-stamp: patch-stamp dirs-stamp headers-stamp + # libncurses workaround: + # libcurses.so is a linker script for GNU ld. + # The linker we have to use (SunOS ld) does not understand it. + # So we create symbolic links for libncurses.so.5 under debian/tmp. + # Also note that we've patched usr/lib/libdladm/Makefile.com to + # explicitly link with libtinfo + ln -sf /lib32/libncurses.so.5 debian/tmp/usr/lib32/libcurses.so + ln -sf /lib/$(DEB_HOST_MULTIARCH)/libncurses.so.5 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libcurses.so + dh_illumos_make $(libs:%=usr/src/lib/%) + dh_illumos_make --native $(cmd:%=usr/src/cmd/%) + touch $@ + +binary binary-arch binary-indep: binary-stamp +binary-stamp: install-stamp + dh_testdir + dh_testroot + dh_installdirs + dh_install + dh_installman + dh_installdocs + dh_installexamples + dh_installchangelogs + dh_link + dh_compress + dh_fixperms + dh_makeshlibs -- -c4 + dh_installdeb + dh_shlibdeps + dh_strip + dh_gencontrol + dh_md5sums + dh_builddeb + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + dh_clean + rm -rf usr .pc + diff --git a/dladm/debian/source/format b/dladm/debian/source/format new file mode 100644 index 0000000..89ae9db --- /dev/null +++ b/dladm/debian/source/format @@ -0,0 +1 @@ +3.0 (native) |