From bc115ce2b32fd1f9a59bbde5f96b309db2c8c939 Mon Sep 17 00:00:00 2001 From: zyppe <210hcl@gmail.com> Date: Wed, 28 Feb 2024 21:48:18 +0800 Subject: [PATCH] Initialize for libnl3 --- .gitignore | 1 + .libnl3.metadata | 1 + baselibs.conf | 4 + libnl-3.3.0.tar.gz.sig | 16 ++++ libnl3.changes | 203 +++++++++++++++++++++++++++++++++++++++++ libnl3.spec | 139 ++++++++++++++++++++++++++++ 6 files changed, 364 insertions(+) create mode 100644 .gitignore create mode 100644 .libnl3.metadata create mode 100644 baselibs.conf create mode 100644 libnl-3.3.0.tar.gz.sig create mode 100644 libnl3.changes create mode 100644 libnl3.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3a99d43 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +libnl-3.3.0.tar.gz diff --git a/.libnl3.metadata b/.libnl3.metadata new file mode 100644 index 0000000..fea9e1d --- /dev/null +++ b/.libnl3.metadata @@ -0,0 +1 @@ +bd14aa1616f9a9cc0e0e686ba060e8bf47f7b6fd327cde5cbb989a721462507c libnl-3.3.0.tar.gz diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..e164f84 --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,4 @@ +libnl3-200 +libnl3-devel + requires -libnl3- + requires "libnl3-200- = " diff --git a/libnl-3.3.0.tar.gz.sig b/libnl-3.3.0.tar.gz.sig new file mode 100644 index 0000000..97f0130 --- /dev/null +++ b/libnl-3.3.0.tar.gz.sig @@ -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----- diff --git a/libnl3.changes b/libnl3.changes new file mode 100644 index 0000000..717b86c --- /dev/null +++ b/libnl3.changes @@ -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 diff --git a/libnl3.spec b/libnl3.spec new file mode 100644 index 0000000..cd7c9a6 --- /dev/null +++ b/libnl3.spec @@ -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