# # spec file for package lzo # # Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define library_package liblzo2-2 Name: lzo Version: 2.10 Release: 7.3 Summary: A Real-Time Data Compression Library License: GPL-2.0-or-later Group: Development/Libraries/C and C++ URL: https://www.oberhumer.com/opensource/lzo/ Source: https://www.oberhumer.com/opensource/%{name}/download/%{name}-%{version}.tar.gz Source2: baselibs.conf Patch1: https://src.fedoraproject.org/rpms/lzo/raw/master/f/lzo-2.08-rhbz1309225.patch BuildRequires: gcc-c++ BuildRequires: pkgconfig %description LZO is a portable lossless data compression library written in ANSI C. Decompression requires no memory. LZO is suitable for data compression and decompression in real-time. This means it favors speed over compression ratio. %package -n %{library_package} Summary: A Real-Time Data Compression Library Group: System/Libraries Provides: lzo = %{version}-%{release} Obsoletes: lzo < %{version} %description -n %{library_package} LZO is a portable lossless data compression library written in ANSI C. Decompression requires no memory. LZO is suitable for data compression and decompression in real-time. This means it favors speed over compression ratio. %package devel Summary: Development files for lzo Group: Development/Languages/C and C++ Requires: %{library_package} = %{version} %description devel LZO is a portable lossless data compression library written in ANSI C. Decompression requires no memory. LZO is suitable for data de-/compression in real-time. This means it favours speed over compression ratio. %package devel-static Summary: Development files for lzo Group: Development/Languages/C and C++ Requires: lzo-devel = %{version} Provides: lzo-devel:%{_libdir}/liblzo.a %description devel-static LZO is a portable lossless data compression library written in ANSI C. Decompression requires no memory. LZO is suitable for data de-/compression in real-time. This means it favours speed over compression ratio. %prep %setup -q %patch1 -p1 %build %global _lto_cflags %{_lto_cflags} -ffat-lto-objects export CFLAGS="%{optflags} -fvisibility=hidden" %configure --enable-shared \ --enable-static \ --disable-silent-rules \ --docdir=%{_docdir}/%{name}-devel #On windows, the build system defines __LZO_EXPORT1 to # __attribute__((dllexport))) which we can abuse to make #use of GCC visibility. ;-) #see http://gcc.gnu.org/wiki/Visibility #If you remove this, you must disable -fvisibility=hidden in CFLAGS! echo '#define __LZO_EXPORT1 __attribute__ ((visibility ("default")))' >> config.h make %{?_smp_mflags} %check make %{?_smp_mflags} check test %install %make_install rm -v %{buildroot}%{_libdir}/liblzo2.la rm -v %{buildroot}%{_docdir}/%{name}-devel/COPYING %post -n %{library_package} -p /sbin/ldconfig %postun -n %{library_package} -p /sbin/ldconfig %files -n %{library_package} %license COPYING %{_libdir}/liblzo2.so.* %files devel %doc AUTHORS BUGS NEWS README THANKS %doc doc/* util/* %{_libdir}/liblzo2.so %{_includedir}/lzo %{_libdir}/pkgconfig/lzo2.pc %files devel-static %{_libdir}/liblzo2.a %changelog * Tue Jan 26 2021 Dirk Müller - add lzo-2.08-rhbz1309225.patch to avoid aliasing issues * Wed Nov 20 2019 Martin Liška - Disable strict aliasing due to its violation (boo#1157271). * Fri Apr 26 2019 Martin Liška - Use FAT LTO objects in order to provide proper static library (boo#1133259). * Wed Aug 8 2018 jengelh@inai.de - Fix RPM groups. - Trim sentence that has no comparison point. * Tue Jul 31 2018 mpluskal@suse.com - Modernise spec file with spec-cleaner - Move license to subpackage that will allways be installed * Tue Nov 14 2017 dimstar@opensuse.org - Add pkgconfig BuildRequires: allow the rpm dep generator to inspect the shipped .pc file and produce requires/provides. * Wed Mar 29 2017 dsterba@suse.cz - Update to 2.10 * Improve CMake build support. * Add support for pkg-config. * Do not redefine "snprintf" so that the examples build with MSVC 2015. * Assorted cleanups. * Tue Feb 24 2015 mpluskal@suse.com - Cleanup spec file with spec-cleaner - Update to 2.09 * Work around gcc bug #64516 that could affect architectures like armv4, armv5 and sparc. * Thu Jul 24 2014 dsterba@suse.cz - enable lzo-devel-static package build * Wed Jul 2 2014 mrueckert@suse.de - update to 2.08 (bnc#883947) CVE-2014-4607 - Updated the Autoconf scripts to fix some reported build problems. - Added CMake build support. - Fixed lzo_init() on big-endian architectures like Sparc. - additional changes in 2.07 * Fixed a potential integer overflow condition in the "safe" decompressor variants which could result in a possible buffer overrun when processing maliciously crafted compressed input data. Fortunately this issue only affects 32-bit systems and also can only happen if you use uncommonly huge buffer sizes where you have to decompress more than 16 MiB (> 2^24 bytes) untrusted compressed bytes within a single function call, so the practical implications are limited. POTENTIAL SECURITY ISSUE. CVE-2014-4607. * Removed support for ancient configurations like 16-bit "huge" pointers - LZO now requires a flat 32-bit or 64-bit memory model. * Assorted cleanups. * Tue Apr 16 2013 mmeister@suse.com - Added url as source. Please see http://en.opensuse.org/SourceUrls * Mon Aug 27 2012 cfarrell@suse.com - license update: GPL-2.0+ No GPL-2.0 "only" licenses found in the package * Sat Feb 11 2012 crrodriguez@opensuse.org - move libraries back to %%{_libdir}, /usr merge project * Sun Sep 25 2011 crrodriguez@opensuse.org - Update to version 2.06 * Some minor optimizations for big-endian architectures. * Fixed overly strict malloc() misalignment check in examples. * Fri May 6 2011 crrodriguez@opensuse.org - Update to version 2.05 * Converted the configure system to non-recursive Automake. * Applied some overdue speed optimizations for modern x86/x64 architectures and current compilers like gcc 4.6 and MSVC 2010. * Wed Dec 22 2010 aj@suse.de - Fix specfile (remove deleted lzo-2.03-alias.patch). * Fri Nov 12 2010 mrueckert@suse.de - update to 2.0.4 * Fixed a gcc-4.5 aliasing issue in lzo_init(). * Updated the configure system. * Assorted cleanups. - dropped lzo-2.03-alias.patch: solved differently upstream - dropped debug_package_requires define * Sat Oct 30 2010 cristian.rodriguez@opensuse.org - Use GCC visibility. * Thu Feb 11 2010 rguenther@suse.de - fix aliasing problems * Sat Dec 19 2009 jengelh@medozas.de - add baselibs.conf as a source - enable parallel build * Wed Jan 7 2009 olh@suse.de - obsolete old -XXbit packages (bnc#437293) * Fri Aug 22 2008 mrueckert@suse.de - update to 2.03 featuring major speedups for 64-bit architectures like AMD64, minor overall speedups, portability enhancements for LLP64 programming models, and lots of other small improvements - dropped lzo-noexec.patch: fix included upstream - split out liblzo2-2 - move the lib to /%%_lib * Thu Apr 10 2008 ro@suse.de - added baselibs.conf file to build xxbit packages for multilib support * Mon Feb 25 2008 crrodriguez@suse.de - run ldconfig * Mon Feb 12 2007 meissner@suse.de - added marker for nonexec stack/heap to i386 assembler. * Wed Sep 27 2006 poeml@suse.de - add BuildRequires: gcc-c++ for building on Fedora * Wed Jan 25 2006 mls@suse.de - converted neededforbuild to BuildRequires * Mon Jan 16 2006 mrueckert@suse.de - update to version 2.02 * Mon Sep 26 2005 mls@suse.de - make devel package require base package * Tue Jun 28 2005 cthiel@suse.de - update to version 2.01 * Thu Jun 2 2005 hvogel@suse.de - update to version 2.0 * Fri Jan 9 2004 adrian@suse.de - move devel files to -devel package * Wed Aug 20 2003 cwh@suse.de - initial release