commit 1e66bd221a1d0ad4832e27299301ec39f97e20a5 Author: zhuchunyi Date: Wed Nov 6 19:55:35 2019 +0800 update code diff --git a/vconfig-1.9-Pass-compilation-with-Werror-format-security.patch b/vconfig-1.9-Pass-compilation-with-Werror-format-security.patch new file mode 100644 index 0000000..a41be37 --- /dev/null +++ b/vconfig-1.9-Pass-compilation-with-Werror-format-security.patch @@ -0,0 +1,31 @@ +From c84508d59dacf91a89582fed6115714f42f706aa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 3 Dec 2013 12:54:53 +0100 +Subject: [PATCH] Pass compilation with -Werror=format-security +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + + +Signed-off-by: Petr Písař +--- + vconfig.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/vconfig.c b/vconfig.c +index 5057cfd..77cf4b3 100644 +--- a/vconfig.c ++++ b/vconfig.c +@@ -36,7 +36,7 @@ + #define MAX_HOSTNAME 256 + + +-static char* usage = ++static const char usage[] = + "\n" + "Usage: add [interface-name] [vlan_id]\n" + " rem [vlan-name]\n" +-- +1.8.3.1 + diff --git a/vconfig.spec b/vconfig.spec new file mode 100644 index 0000000..d46facf --- /dev/null +++ b/vconfig.spec @@ -0,0 +1,43 @@ +Name: vconfig +Version: 1.9 +Release: 26 +Summary: 802.1Q VLAN implementation for Linux +License: GPLv2+ + +URL: https://www.candelatech.com/~greear/vlan.html +Source0: https://www.candelatech.com/~greear/vlan/vlan.%{version}.tar.gz + +Patch0: %{name}-1.9-Pass-compilation-with-Werror-format-security.patch +BuildRequires: coreutils gcc make + +%description +The %{name} program allows you to create and remove vlan-devices on a vlan +enabled kernel. Vlan-devices are virtual ethernet devices which represents +the virtual lans on the physical lan. + +%package_help + +%prep +%autosetup -n vlan -p1 + +%build +make clean +rm -f %{name} +make CCFLAGS="%{optflags}" LDFLAGS="%{build_ldflags}" STRIP=/bin/true %{name} + +%install +install -D -m755 %{name} %{buildroot}%{_sbindir}/%{name} +install -D -m644 %{name}.8 %{buildroot}%{_mandir}/man8/%{name}.8 + +%files +%defattr(-,root,root) +%{_sbindir}/%{name} + +%files help +%defattr(-,root,root) +%doc CHANGELOG README vlan.html vlan_test.pl +%{_mandir}/man8/%{name}.8.gz + +%changelog +* Fri Oct 11 2019 openEuler Buildteam - 1.9-26 +- Package init diff --git a/vlan.1.9.tar.gz b/vlan.1.9.tar.gz new file mode 100644 index 0000000..f321a5d Binary files /dev/null and b/vlan.1.9.tar.gz differ