Initialize for libnl3

This commit is contained in:
zyppe 2024-02-28 21:48:18 +08:00
commit bc115ce2b3
6 changed files with 364 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
libnl-3.3.0.tar.gz

1
.libnl3.metadata Normal file
View file

@ -0,0 +1 @@
bd14aa1616f9a9cc0e0e686ba060e8bf47f7b6fd327cde5cbb989a721462507c libnl-3.3.0.tar.gz

4
baselibs.conf Normal file
View file

@ -0,0 +1,4 @@
libnl3-200
libnl3-devel
requires -libnl3-<targettype>
requires "libnl3-200-<targettype> = <version>"

16
libnl-3.3.0.tar.gz.sig Normal file
View file

@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJZCagTAAoJECnCNm5N/FcouxEP/3xczTs8uHYw8bqiYUDFq3Dx
aamYMiEYxEaBtKU2KNIP46Sn2OuVH9esfDhityfbQcBvI+djjHGZcxL1G+oXiy+c
mN2KUuSSJI/Kn9wSimUaqjDrF/Av+Ln5I+I3heHUwbJschrR0QwWhjplG6QBq/6t
eBU+oLUw//FXgZlxRuwNrbS2CsxBPURb15vNxWvbqR9Aj+gZuR0Yaj0pr4+KsR4z
2Wp8HYabycl1Mv9W81A0Yqws+Cb9wQhIyg4ZDIaTJVZKj2Ne9JXE8xnvOvXWs7VK
ahntdyNSiBC/2wmScvBjd68A7RxDlEsRaXCSxdo+5q0vs8xkYDNxPK26+RSXzFZ4
eGghDA5UhDXY2dCnF3FzRYU8OE/4NiNCTER28COXxG4Cz5+oTYYktfw175trzOPu
BFsunOWPULSt6/xDdM7mfLP6LEJQmf/AoMFUA7uLIaW4SrUjTZ8wQ4exAr28EM8s
ZA4e/LONFMjUFuhuVLwOPH/7ezVe4I1lV4EglOX1AmYHOBg2GqnrH3RAlsUxAPU4
3mtyD5g66DwHAFQv0JMGL0f1UoJnM0STKFqUSN8eIQRVSfrXDJlVGWmv4Imm4sIv
8IBxluLyWXnAnS8zW4IB6fmVUJrvFkoayL/Dl/6iOnGVVEVdaGovp00AFnJF//gZ
2JAH+rQNIbqEjXQUp2Lz
=84cz
-----END PGP SIGNATURE-----

203
libnl3.changes Normal file
View file

@ -0,0 +1,203 @@
* Wed Jun 7 2017 jengelh@inai.de
- Update to final release 3.3.0
* No changes
* Fri Mar 17 2017 jengelh@inai.de
- Update to new upstream release 3.3.0~rc1
* sriov: fix crash in rtnl_link_sriov_parse_vflist
* sriov: avoid buffer overrun in rtnl_link_sriov_parse_vflist()
* use O_CLOEXEC
* lib/attr.c: check for valid length argument in nla_reserve()
* route: neigh: use NDA_MASTER for neigh->n_master if available
* xfrm: allow quering optional arguments from xfrmnl_sp_get_sec_ctx()
- Drop nla-reverse.diff (included upstream)
* Wed Jan 18 2017 jengelh@inai.de
- Add nla-reserve.diff [boo#1020123]
* Mon Jan 16 2017 jengelh@inai.de
- Update to new upstream release 3.2.29
* nl-addr: avoid read-out-of-bound in nl_addr_fill_sockaddr()
* lib: add utility function nl_strerror_l()
* lib/route: allow override of message type during link change
* lib/route: set IFLA_PROTINFO attribute in request message
* lib/route: Add port state translation functions
* lib/route: Extend Bridge Flags
* lib/route: Allow override of IFLA_AF_SPEC nesting
* lib/route: Support IFLA_BRIDGE_MODE
* macvlan: add support for "source" mode
* macvlan: adjust types and merge MACVLAN_HAS_MACCOUNT and
MACVLAN_HAS_MACDATA
* vxlan: add support for additional VXLAN attributes
* lib/route: SRIOV Parse, Read, Clone support
* Add PPP support
* route/act: add gact tc action
* link: add support for IFLA_CARRIER_CHANGES, IFLA_PHYS_PORT_NAME,
IFLA_PHYS_SWITCH_ID, IFLA_GSO_MAX_SEGS and IFLA_GSO_MAX_SIZE
* Wed Aug 10 2016 jengelh@inai.de
- Update to new upstream release 3.2.28
* route/link: IFLA_VLAN_PROTOCOL added to vlan_put_attrs
* route/vrf: add VRF support
* route/link: add macvtap support
* sit: add 6RD support
* lib/route: add macsec support
* Tue Feb 2 2016 jengelh@inai.de
- Update to new upstream release 3.2.27
* link: add ifb device support
* qdisc: add hfsc qdisc support
* route/act: add skbedit action
* New sublibraries: libnl-xfrm-3.0
* Wed Oct 8 2014 olaf@aepfle.de
- BuildRequire at least bison 2.4, version in SLE11 is too old
* Wed Jul 16 2014 jengelh@inai.de
- Update to new upstream release 3.2.25
* route: fix off-by-one in rtnl_act_parse()
* act: fix policy range check
* act: fix the logic of parsing actions
* u32: prevent memcpy from NULL
* attr: prevent garbage return value for NULL param
* introduce ipip, ip6, gre, sit tunnel support
* tc: add co_groups for tc qdisc and filter
* Fri Apr 25 2014 dmueller@suse.com
- remove python-devel dependency
* Sun Mar 9 2014 jengelh@inai.de
- Update to new upstream release 3.2.24
* Add support for: ingress qdiscs, veth links, link network
namespaces, tc action (general), mirred tc action, u32 tc action,
fq_codel qdisc
* Tue Nov 26 2013 jengelh@inai.de
- Update to new upstream release 3.2.23
* Add macvlan and VXVLAN support
* Wed Jun 5 2013 jengelh@inai.de
- Update to new upstream release 3.2.22
* ct: add ICMPv6 type,code and ID
* attr: Provide nla_is_nested() function
* bridge: Support the new bridging attributes
* bridge: Provide rtnl_link_bridge_alloc()
* vlan: Provide rtnl_link_vlan_alloc()
* bond: Provide rtnl_link_bond_alloc()
* attr: Add nla_nest_cancel() to remove partially added nested
attributes
- Remove 0001-Add-symbol-version-maps-to-libnl.patch
(merged upstream)
* Thu Mar 7 2013 jengelh@inai.de
- Add preliminary symbol versioning for libnl
(0001-Add-symbol-version-maps-to-libnl.patch)
* Fri Jan 25 2013 jengelh@inai.de
- Update to new upstream release 3.2.21
* SocketCAN support
* Add link carrier support
* Sun Nov 25 2012 jengelh@inai.de
- Update to new upstream release 3.2.16
* Optional hashtable backend for caches
* Improved netlink expectations support
* Extended AF_BRIDGE support for link and neighbour caches
* Better thread safety in module registration operations
* Wed Nov 14 2012 jengelh@inai.de
- Update to new upstream release 3.2.14
* This release contains bugfixes and adds support for some new link
features.
* Tue Oct 9 2012 jengelh@inai.de
- Update to new upstream release 3.2.13
* More clean NL_AUTO_PORT and NL_AUTO_SEQ usage in nl_complete_msg
* genl_ctrl_probe_by_name: fix checking of genlmsg_put() return value
* Fri Aug 31 2012 jengelh@inai.de
- Update to new upstream release 3.2.12
* Add new API to retrieve versioning information at runtime
suitable for python ctype.
* Tue Jun 19 2012 jengelh@inai.de
- Update to new upstream release 3.2.11
* add fwmark mask support
* genl: add genlmsg_hdr(), genlmsg_user_hdr(), genlmsg_user_data(),
and genlmsg_user_datalen()
* genl: Export genl_ops_resolve() and genl_mngt_resolve() in header
* rtnl_link_(get|set)_weight is deprecated in libnl
* Fri May 11 2012 vuntz@opensuse.org
- Update to version 3.2.9:
* Fix return value of nl_recvmsgs()
* Sat May 5 2012 jengelh@medozas.de
- Update to new upstream release 3.2.8
* Support plug qdisc - queue traffic until explicit release
* Wed Feb 8 2012 jengelh@medozas.de
- Update to new upstream release 3.2.7
* link: fix regression in link message parser
* nl_addr_cmp: handle prefix length during address comparison
* avoid dangling co_major_cache reference to NL_AUTO_PROVIDE caches
* dsmark: Add missing declarations for
rtnl_class_dsmark_(get|set)_bitmask
* rtnl_link_bond_add: allow to allocate bond name in case NULL
is given
* link: allow to add/get linkinfo of unknown type
* Thu Jan 12 2012 coolo@suse.com
- change license to be in spdx.org format
* Tue Jan 3 2012 adrian@suse.de
- add dangling-co_major_cache-reference fix required by ntrack
* Sat Nov 19 2011 coolo@suse.com
- add libtool as buildrequire to avoid implicit dependency
* Fri Nov 11 2011 jengelh@medozas.de
- Update to new upstream release 3.2.3
* Add missing libnl-cli-3.0 pkgconfig file
* Fix memory leaks durgin rtnl_addr object freeing
* Wed Sep 21 2011 jengelh@medozas.de
- Update to new upstream release 3.2.1
* new API to create/enslave/release bonding devices
* Tue Sep 20 2011 jengelh@medozas.de
- Relax Requires in libnl3-devel
* Wed Sep 14 2011 jengelh@medozas.de
- Update to libnl-3.2
* Sat Apr 24 2010 coolo@novell.com
- buildrequire pkg-config to fix provides
* Wed Dec 16 2009 jengelh@medozas.de
- Add baselibs.conf as a source
- Add baselib definitions for SPARC
- Enable parallel building
* Fri Jun 12 2009 coolo@novell.com
- fix build with glibc 2.10
* Thu Feb 5 2009 bphilips@suse.de
- baselibs.conf: create -32bit packages. Required to compile Intel
WiMax tools.
* Wed Jan 7 2009 olh@suse.de
- obsolete old -XXbit packages (bnc#437293)
* Tue Nov 11 2008 jpr@novell.com
- Add baselibs.conf (bnc#443023)
* Thu Oct 2 2008 maw@suse.de
- Install libraries in %%_lib, not %%{_libdir} (bnc#428433).
* Fri Feb 1 2008 coolo@suse.de
- update to 1.1:
o patches went upstream
o Generic netlink support
o Route Addition/Deletion
o Fixed reference counting while objects stay in caches.
... tons of other fixes
* Fri Jan 25 2008 adrian@suse.de
- fix changelog entries order
* Wed Oct 3 2007 maw@suse.de
- Apply libnl.route.metric-overflow.patch with -p1.
* Sat Aug 25 2007 olh@suse.de
- remove incomplete copies of kernel headers
linux/types.h were needed
* Fri Aug 24 2007 olh@suse.de
- include linux/types.h
do not redefine typedefs
use stddef.h offsetof
fix out of bounds access in route metric functions
fix incorrect char usage in nl_str2af
remove compiler warnings by checking vasprintf return value
* Wed Aug 22 2007 dmueller@suse.de
- fix accesses of free'd memory which crash NetworkManager-kde
* Wed Aug 22 2007 dmueller@suse.de
- update to 1.0-pre6:
* fixes write after delete crashes
* fixes realloc() handling
* fixes format string warnings
* fixes invalid free in nl_addr_parse for AF_UNSPEC addresses
* fixes double nlmsg_free() in nl_recvmsgs() while receiving
a multipart message and the read was interrupted.
* Sun Feb 19 2006 ro@suse.de
- fix build on ia64, ppc64, s390x
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Nov 15 2005 yxu@suse.de
- fixed conflicting type definition
* Fri Nov 4 2005 rml@suse.de
- Update to 1.0-pre5
* Mon Oct 31 2005 gekker@suse.de
- Initial import into autobuild Version 1.0-pre3
- Patch makefile

139
libnl3.spec Normal file
View file

@ -0,0 +1,139 @@
#
# spec file for package libnl3
#
# Copyright (c) 2022-2023 ZhuningOS
#
Name: libnl3
%define lname libnl3-200
%define with_tools 1
%define uver 3_3_0
%define rversion 3.3.0
Version: 3.3.0
Release: 1.29
Summary: Convenience library for working with Netlink sockets
License: LGPL-2.1 and GPL-2.0
Group: Development/Libraries/C and C++
Url: http://www.carisma.slowglass.com/~tgr/libnl/#(outdated)
#Git-Clone: git://github.com/thom311/libnl/
#Mailing-List: http://lists.infradead.org/mailman/listinfo/libnl
Source: https://github.com/thom311/libnl/releases/download/libnl%uver/libnl-%rversion.tar.gz
Source2: https://github.com/thom311/libnl/releases/download/libnl%uver/libnl-%rversion.tar.gz.sig
Source3: baselibs.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: bison >= 2.4
BuildRequires: flex >= 2.5.19
BuildRequires: pkgconfig >= 0.21
# Only used if python/ subdir would be built, which is not and
# is marked as
# "NOTE: The python wrapper is experimental and may or may not work."
# BuildRequires: python-devel >= 2.6
%if 0%{?suse_version}
BuildRequires: fdupes
%endif
%description
The libnl suite is a collection of libraries providing APIs to
Netlink protocol based Linux kernel interfaces.
%package -n %lname
Summary: Convenience library for working with Netlink sockets
License: LGPL-2.1
Group: System/Libraries
Requires: libnl-config >= %version
%description -n %lname
The libnl suite is a collection of libraries providing APIs to
netlink protocol based Linux kernel interfaces.
%package devel
Summary: Libraries and headers for libnl
License: LGPL-2.1
Group: Development/Libraries/C and C++
Requires: %lname = %version
Provides: libnl-devel = %version-%release
# Starting with libnl3(-3.2), no more conflicts
%description devel
The libnl suite is a collection of libraries providing APIs to
Netlink protocol based Linux kernel interfaces.
%if %with_tools
#
# Only one of the libnl packages should create the config and tools.
#
%package -n libnl-config
Summary: Name maps for libnl
License: LGPL-2.1 and GPL-2.0
Group: Productivity/Networking/Security
%if 0%{?suse_version} >= 1130
BuildArch: noarch
%endif
%description -n libnl-config
This package contains configuration files for libnl and programs using
the same; in particular
- name maps for class-ids -- class-names (like /etc/services)
- aliases for locations within a packet (ip6.dst => byte offset)
%package -n libnl-tools
Summary: Command line utilities to directly work with Netlink
License: GPL-2.0
Group: Productivity/Networking/Security
%description -n libnl-tools
Various test program with which the functionality of libnl is
demonstrated.
%endif
%prep
%setup -qn libnl-%rversion
%build
%configure --disable-static
make %{?_smp_mflags} pkglibdir="%_libdir/%lname"
%install
b="%buildroot";
make install DESTDIR="%buildroot" pkglibdir="%_libdir/%lname"
find "$b" -iname "*.la" -delete
%if !%with_tools
rm -Rf "$b/%_sysconfdir/libnl"
rm -Rf "$b/%_sbindir" "$b/%_mandir/man8"
%endif
%if 0%{?fdupes:1}
%fdupes %buildroot/%_prefix
%endif
%post -n %lname -p /sbin/ldconfig
%postun -n %lname -p /sbin/ldconfig
%files -n %lname
%defattr(-,root,root)
%_libdir/libnl*.so.200*
%_libdir/%lname
%files devel
%defattr(-,root,root)
%_includedir/%name
%_libdir/libnl*.so
%_libdir/pkgconfig/*
%if %with_tools
%files -n libnl-config
%defattr(-,root,root)
%dir %_sysconfdir/libnl
%config %_sysconfdir/libnl/*
%files -n libnl-tools
%defattr(-,root,root)
%_mandir/man*/*
%_bindir/*
%endif
%changelog