commit bf488ef6957f56a1fade8858a58e4889e68d2fe0 Author: CentOS Sources Date: Tue Jun 9 19:42:13 2020 +0000 import libexif-0.6.22-3.el8 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b166074 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libexif-0_6_22-release.tar.gz diff --git a/.libexif.metadata b/.libexif.metadata new file mode 100644 index 0000000..45eb589 --- /dev/null +++ b/.libexif.metadata @@ -0,0 +1 @@ +9925660e70ee8b5ce480c6a6f30c84b382929142 SOURCES/libexif-0_6_22-release.tar.gz diff --git a/SOURCES/strip-gettext-nondeterminism b/SOURCES/strip-gettext-nondeterminism new file mode 100755 index 0000000..a631757 --- /dev/null +++ b/SOURCES/strip-gettext-nondeterminism @@ -0,0 +1,117 @@ +#!/usr/bin/perl +# +# This is a hacked version of gettext.pm from Debian's strip-nondeterminism project. +# It is a workaround for https://savannah.gnu.org/bugs/?49654 +# +# Copyright 2016 Reiner Herrmann +# Copyright 2016 Chris Lamb +# +# This file is part of strip-nondeterminism. +# +# strip-nondeterminism is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# strip-nondeterminism is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with strip-nondeterminism. If not, see . +# + +use Time::Piece; +use POSIX qw(strftime); + +use strict; +use warnings; + +=head1 DEPRECATION PLAN + +Situation unclear. Whilst #792687 is closed, many Gettext related files are +being normalised based on anecdotal viewings of build logs. + +=cut + +sub read_file($) { + my $filename = shift; + + local $/ = undef; + open(my $fh, '<', $filename) + or die "Can't open file $filename for reading: $!"; + binmode($fh); + my $buf = <$fh>; + close($fh); + + return $buf; +} + +sub normalize { + my ($mo_filename, %options) = @_; + + my $fmt; + + my $buf = read_file($mo_filename); + + my $magic = unpack("V", substr($buf, 0*4, 4)); + if ($magic == 0x950412DE) { + # little endian + $fmt = "V"; + } elsif ($magic == 0xDE120495) { + # big endian + $fmt = "N"; + } else { + # unknown format + return 0; + } + + my ($revision, $nstrings, $orig_to, $trans_to) + = unpack($fmt x 4, substr($buf, 1*4, 4*4)); + my $major = int($revision / 256); + my $minor = int($revision % 256); + return 0 if $major > 1; + + my $modified = 0; + for (my $i=0; $i < $nstrings; $i++) { + my $len = unpack($fmt, substr($buf, $orig_to + $i*8, 4)); + next if $len > 0; + + my $offset = unpack($fmt, substr($buf, $orig_to + $i*8 + 4, 4)); + my $trans_len = unpack($fmt, substr($buf, $trans_to + $i*8)); + my $trans_offset = unpack($fmt, substr($buf, $trans_to + $i*8 + 4)); + my $trans_msg = substr($buf, $trans_offset, $trans_len); + next unless $trans_msg =~ m/^POT-Creation-Date: (.*)/m; + + my $pot_date = $1; + my $time; + eval {$time = Time::Piece->strptime($pot_date, "%Y-%m-%d %H:%M%z");}; + next if $@; + + my $new_time = strftime("%Y-%m-%d %H:%M+0000", gmtime(0)); + $trans_msg + =~ s/\QPOT-Creation-Date: $pot_date\E/POT-Creation-Date: $new_time/; + print("Replaced POT-Creation-Date $pot_date with $new_time.\n"); + next if length($trans_msg) != $trans_len; + + $buf + = substr($buf, 0, $trans_offset) + . $trans_msg + . substr($buf, $trans_offset + $trans_len); + $modified = 1; + } + + if ($modified) { + open(my $fh, '>', $mo_filename) + or die "Can't open file $mo_filename for writing: $!"; + binmode($fh); + print $fh $buf; + close($fh); + } + + return $modified; +} + +print("Removing timestamp from " . $ARGV[0] . "...\n"); +normalize($ARGV[0]) diff --git a/SPECS/libexif.spec b/SPECS/libexif.spec new file mode 100644 index 0000000..645d5ae --- /dev/null +++ b/SPECS/libexif.spec @@ -0,0 +1,250 @@ +Summary: Library for extracting extra information from image files +Name: libexif +Version: 0.6.22 +Release: 3%{?dist} +Group: System Environment/Libraries +License: LGPLv2+ +URL: https://libexif.github.io/ +%global tarball_version %(echo %{version} | sed -e 's|\\.|_|g') +Source0: https://github.com/libexif/libexif/archive/libexif-%{tarball_version}-release.tar.gz +Source1: strip-gettext-nondeterminism + +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: doxygen +BuildRequires: gettext-devel +BuildRequires: libtool +BuildRequires: pkgconfig + +# For strip-gettext-nondeterminism +BuildRequires: perl(Time::Piece) + +%description +Most digital cameras produce EXIF files, which are JPEG files with +extra tags that contain information about the image. The EXIF library +allows you to parse an EXIF file and read the data from those tags. + +%package devel +Summary: Files needed for libexif application development +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +The libexif-devel package contains the libraries and header files +for writing programs that use libexif. + +%package doc +Summary: The EXIF Library API documentation +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description doc +API Documentation for programmers wishing to use libexif in their programs. + +%prep +%autosetup -n libexif-libexif-%{tarball_version}-release -p1 + +%build +autoreconf -fiv +%configure --disable-static +make %{?_smp_mflags} + +%install +make DESTDIR=%{buildroot} install +find %{buildroot} -name "*.la" -exec rm -v {} \; +rm -rf %{buildroot}%{_datadir}/doc/libexif +cp -R doc/doxygen-output/libexif-api.html . +iconv -f latin1 -t utf-8 < COPYING > COPYING.utf8; cp COPYING.utf8 COPYING +iconv -f latin1 -t utf-8 < README > README.utf8; cp README.utf8 README +find %{buildroot} -type f -name '*.mo' -exec %{SOURCE1} {} \; +%find_lang libexif-12 + +%check +make check + +%ldconfig_scriptlets + +%files -f libexif-12.lang +%doc COPYING README NEWS +%{_libdir}/libexif.so.12* + +%files devel +%{_includedir}/libexif +%{_libdir}/*.so +%{_libdir}/pkgconfig/libexif.pc + +%files doc +%doc libexif-api.html + +%changelog +* Thu Jun 04 2020 Michael Catanzaro - 0.6.22-3 +- Also remove timezone from the .mo files +- Related: #1841320 + +* Wed Jun 03 2020 Michael Catanzaro - 0.6.22-2 +- Remove timestamps from the .mo files to avoid multilib conflicts +- Related: #1841320 + +* Mon Jun 01 2020 Michael Catanzaro - 0.6.22-1 +- Upgrade to 0.6.22 +- Resolves: #1841320 + +* Wed Feb 07 2018 Fedora Release Engineering - 0.6.21-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 0.6.21-15 +- Switch to %%ldconfig_scriptlets + +* Sun Dec 17 2017 Yaakov Selkowitz - 0.6.21-14 +- Patch for CVE-2016-6328 (#1484032) + +* Thu Aug 03 2017 Fedora Release Engineering - 0.6.21-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 0.6.21-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 0.6.21-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 0.6.21-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 0.6.21-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 0.6.21-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 0.6.21-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Aug 03 2013 Fedora Release Engineering - 0.6.21-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon Apr 29 2013 Petr Šabata - 0.6.21-5 +- Run the test suite, thanks to Ville Skyttä (#928539) + +* Wed Mar 27 2013 Petr Šabata - 0.6.21-4 +- Run autoreconf for aarch64 + +* Thu Feb 14 2013 Fedora Release Engineering - 0.6.21-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 0.6.21-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jul 13 2012 Petr Šabata - 0.6.21-1 +- 0.6.21 bump +- A security bugfixing release (CVE-2012-2812, CVE-2012-2813, CVE-2012-2814, + CVE-2012-2836, CVE-2012-2837, CVE-2012-2840, CVE-2012-2841 & CVE-2012-2845) +- Drop the pre-generated docs and introduce a doc subpackage + +* Fri Jan 13 2012 Fedora Release Engineering - 0.6.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri Mar 18 2011 Petr Sabata - 0.6.20-1 +- 0.6.20 bump +- Repackaging prehistoric libexif-docs, introducing version string in filename +- Buildroot cleanup + +* Mon Feb 07 2011 Fedora Release Engineering - 0.6.19-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed May 26 2010 Thomas Janssen 0.6.19-1 +- libexif 0.6.19 +- fixes #589283 + +* Fri Jul 24 2009 Fedora Release Engineering - 0.6.16-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 0.6.16-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Dec 11 2008 Caolán McNamara - 0.6.16-2 +- rebuild to get a pkgconfig(libexif) provides + +* Tue Feb 5 2008 Matthias Clasen - 0.6.16-1 +- Update to 0.6.16 +- Drop obsolete patch + +* Tue Feb 5 2008 Matthias Clasen - 0.6.15-6 +- Convert doc files to utf-8 (#240838) + +* Sat Dec 15 2007 Matthias Clasen - 0.6.15-5 +- Add patch for CVE-2007-6351. Fixes bug #425641 +- Add patch for CVE-2007-6352. Fixes bug #425641 + +* Wed Aug 29 2007 Fedora Release Engineering - 0.6.15-4 +- Rebuild for selinux ppc32 issue. + +* Tue Aug 7 2007 Matthias Clasen - 0.6.15-3 +- Update the license field + +* Wed Jun 13 2007 Matthias Clasen - 0.6.15-2 +- Add patch for CVE-2007-4168. Fix bug #243892 + +* Wed May 30 2007 Matthias Clasen - 0.6.15-1 +- Update to 0.6.15 +- Drop obsolete patch + +* Thu May 24 2007 Matthias Clasen - 0.6.13-4 +- Add patch for CVE-2007-2645. + +* Sun Feb 4 2007 Matthias Clasen - 0.6.13-3 +- Package review cleanups +- Avoid multilib conflicts by using pregenerated docs + +* Wed Jul 26 2006 Matthias Clasen - 0.6.13-2 +- Rebuild + +* Wed Jul 12 2006 Jesse Keating - 0.6.13-1.1 +- rebuild + +* Tue May 23 2006 Matthias Clasen - 0.6.13-1 +- Update to 0.6.13 +- Drop upstreamed patches +- Don't ship static libraries + +* Fri Feb 10 2006 Jesse Keating - 0.6.12-3.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 0.6.12-3.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Fri May 6 2005 Matthias Clasen +- Prevent infinite recursion (#156365) + +* Sun Apr 24 2005 Matthias Clasen +- Fix MakerNote handling (#153282) + +* Mon Mar 28 2005 Matthias Clasen +- Update to 0.6.12 + +* Tue Mar 8 2005 Marco Pesenti Gritti +- Add libexif-0.5.12-buffer-overflow.patch + +* Wed Mar 2 2005 Matthias Clasen +- Rebuild with gcc4 + +* Tue Nov 9 2004 Matthias Saou +- Use %%find_lang macro. +- Add %%doc files, including mandatory copy of the LGPL license. +- Use %%{?_smp_mflags} +- Improve the descriptions + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Mon Dec 22 2003 Matt Wilson +- Initial build.