update code

This commit is contained in:
zhuchunyi 2019-11-06 19:55:35 +08:00
commit 1e66bd221a
3 changed files with 74 additions and 0 deletions

View File

@ -0,0 +1,31 @@
From c84508d59dacf91a89582fed6115714f42f706aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
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
<https://bugzilla.redhat.com/show_bug.cgi?id=1037376>
Signed-off-by: Petr Písař <ppisar@redhat.com>
---
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

43
vconfig.spec Normal file
View File

@ -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 <buildteam@openeuler.org> - 1.9-26
- Package init

BIN
vlan.1.9.tar.gz Normal file

Binary file not shown.