!6 upgrade version to v2.0

From: @duyiwei7w 
Reviewed-by: @dou33 
Signed-off-by: @dou33
This commit is contained in:
openeuler-ci-bot 2022-07-25 12:01:29 +00:00 committed by Gitee
commit 0ac1a06c2a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 46 additions and 55 deletions

Binary file not shown.

View File

@ -1,30 +0,0 @@
From 492f2ea1326d7825943f48aff31ed0ddc89fd2b7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
Date: Wed, 4 Jul 2012 17:04:44 +0200
Subject: [PATCH] Fix off-by-one error when copying RTF header
The RTF header (RTF_PREBUF) string is copied to temporary buffer. The
terminating '\0' is never accessed, so it's not needed and cannot be
written after the allocated buffer.
<http://sourceforge.net/tracker/?func=detail&aid=2949686&group_id=70352&atid=527487>
<https://bugzilla.redhat.com/show_bug.cgi?id=831322>
---
ytnef.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/ytnef.c b/ytnef.c
index 482ecdc..970c048 100644
--- a/ytnef.c
+++ b/ytnef.c
@@ -1328,7 +1328,7 @@ unsigned char *DecompressRTF(variableLength *p, int *size) {
comp_Prebuf.size = strlen(RTF_PREBUF);
comp_Prebuf.data = calloc(comp_Prebuf.size, 1);
- strcpy(comp_Prebuf.data, RTF_PREBUF);
+ memcpy(comp_Prebuf.data, RTF_PREBUF, comp_Prebuf.size);
src = p->data;
in = 0;
--
1.7.7.6

View File

@ -1,36 +1,41 @@
Name: libytnef Name: ytnef
Version: 1.5 Version: 2.0
Release: 1 Release: 1
Summary: TNEF Stream Parser Library Summary: TNEF Stream Parser Library
License: GPLv2+
Group: System Environment/Libraries URL: https://github.com/Yeraze/ytnef
License: GPL+ Source0: https://github.com/Yeraze/ytnef/archive/v%{version}/%{name}-%{version}.tar.gz
URL: http://ytnef.sf.net Patch0: ytnef-pkgconfig.patch
Source0: http://dl.sf.net/ytnef/libytnef-1.5.tar.bz BuildRequires: make autoconf automake libtool perl-generators
# fixes potential bufferoverflow Requires: libytnef = %{version}-%{release}
# rhbz#831322
Patch0: libytnef-bufferoverflow.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description %description
Yerase's TNEF Stream Reader. Can take a TNEF Stream (winmail.dat) sent from
Microsoft Outlook (or similar products) and extract the attachments, including
construction of Contact Cards & Calendar entries.
%package -n libytnef
Summary: TNEF Stream Reader Library
%description -n libytnef
TNEF Stream Parser Library, used by "ytnef" to decode TNEF (winmail.dat) TNEF Stream Parser Library, used by "ytnef" to decode TNEF (winmail.dat)
streams generated by Microsoft Outlook. streams generated by Microsoft Outlook.
%package -n libytnef-devel
Summary: Development files for libytnef
Requires: libytnef = %{version}-%{release}
%package devel %description -n libytnef-devel
Summary: Development files for %{name} The libytnef-devel package contains libraries and header files for
Group: Development/Libraries developing applications that use libytnef.
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b.bufferoverflow ./autogen.sh
%patch0 -p1
%build %build
%configure --disable-static %configure --disable-static
@ -39,7 +44,7 @@ make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT includedir=%{_includedir}/%{name} make install DESTDIR=$RPM_BUILD_ROOT includedir=%{_includedir}/libytnef
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
@ -51,18 +56,25 @@ rm -rf $RPM_BUILD_ROOT
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%files %files
%license COPYING
%{_bindir}/*
%files -n libytnef
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc ChangeLog COPYING %doc ChangeLog COPYING
%{_libdir}/*.so.* %{_libdir}/*.so.*
%files devel %files -n libytnef-devel
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_includedir}/%{name}/ %{_includedir}/libytnef/
%{_libdir}/*.so %{_libdir}/*.so
%{_libdir}/pkgconfig/libytnef.pc
%changelog %changelog
* Wen Sep 22 2021 douyan <douyan@kylinos.cn> - 1.5.1-1 * Thu Jul 21 2022 duyiwei <duyiwei@kylinos.cn> - 2.0-1
- Init package for openEuler - upgrade to v2.0
* Wed Sep 22 2021 douyan <douyan@kylinos.cn> - 1.5.1-1
- Init package for openEuler

BIN
ytnef-2.0.tar.gz Normal file

Binary file not shown.

9
ytnef-pkgconfig.patch Normal file
View File

@ -0,0 +1,9 @@
diff -up ytnef-1.9.2/lib/libytnef.pc.in.orig ytnef-1.9.2/lib/libytnef.pc.in
--- ytnef-1.9.2/lib/libytnef.pc.in.orig 2017-03-28 10:50:58.496400854 +0200
+++ ytnef-1.9.2/lib/libytnef.pc.in 2017-03-28 10:51:20.576558722 +0200
@@ -8,4 +8,4 @@ Description: Yerase's TNEF Stream Reader
URL: https://github.com/Yeraze/ytnef
Version: @VERSION@
Libs: -L${libdir} -lytnef
-Cflags: -I${includedir}
+Cflags: -I${includedir}/libytnef