diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 2c6f8d4..0000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -concordance-0.21.tar.bz2 -/concordance-0.23.tar.bz2 -/concordance-0.24.tar.bz2 -/concordance-1.0.tar.bz2 -/concordance-1.1.tar.bz2 diff --git a/concordance-1.1-fix-buffer-overrun.patch b/concordance-1.1-fix-buffer-overrun.patch deleted file mode 100644 index 7b487e9..0000000 --- a/concordance-1.1-fix-buffer-overrun.patch +++ /dev/null @@ -1,113 +0,0 @@ -From 8d02c60a3ecfffffd7075129ce0bcbaca5558e96 Mon Sep 17 00:00:00 2001 -From: Scott Talbert -Date: Sat, 22 Nov 2014 12:11:39 -0500 -Subject: [PATCH] Fix buffer overrun crash in website communications - -Add a new format_string() function that automatically calculates buffer sizes -and use it where appropriate instead of sprintf(). - -Signed-off-by: Scott Talbert -Signed-off-by: Phil Dibowitz ---- - libconcord/web.cpp | 56 ++++++++++++++++++++++++++++++++++++++---------------- - 1 file changed, 40 insertions(+), 16 deletions(-) - -diff --git a/libconcord/web.cpp b/libconcord/web.cpp -index 0a67a71..7910563 100644 ---- a/libconcord/web.cpp -+++ b/libconcord/web.cpp -@@ -19,6 +19,7 @@ - * (C) Copyright Phil Dibowitz 2008 - */ - -+#include - #include - #include "libconcord.h" - #include "lc_internal.h" -@@ -62,6 +63,28 @@ static const uint8_t urlencodemap[32]={ - 0xFF, 0xFF, 0xFF, 0xFF - }; - -+/* -+ * This function does C-style string formatting, but uses a C++ string and -+ * automatically handles buffer sizing. It is intended to be used in place of -+ * sprintf()/snprintf() where we don't necessarily know the required buffer -+ * size in advance. The formatted string is appended to the supplied C++ -+ * string. -+ */ -+void format_string(string *str, const char *format, ...) -+{ -+ va_list args; -+ va_start(args, format); -+ int size = vsnprintf(NULL, 0, format, args); -+ va_end(args); -+ size++; // Add room for \0 -+ char *buffer = new char[size]; -+ va_start(args, format); -+ vsnprintf(buffer, size, format, args); -+ va_end(args); -+ *str += buffer; -+ delete[] buffer; -+} -+ - static void UrlEncode(const char *in, string &out) - { - out = ""; -@@ -351,25 +374,26 @@ int Post(uint8_t *xml, uint32_t xml_size, const char *root, TRemoteInfo &ri, - - string post; - if (learn_seq == NULL) { -- char serial[144]; -- sprintf(serial, "%s%s%s", ri.serial1, ri.serial2, ri.serial3); -- char post_data[4000]; // large enough for extra usbnet headers -+ string serial; -+ format_string(&serial, "%s%s%s", ri.serial1, ri.serial2, ri.serial3); -+ string post_data; - if (z_post) { -- sprintf(post_data, z_post_xml, ri.hw_ver_major, ri.hw_ver_minor, -- ri.flash_mfg, ri.flash_id, ri.fw_ver_major, -+ format_string(&post_data, z_post_xml, ri.hw_ver_major, -+ ri.hw_ver_minor, ri.flash_mfg, ri.flash_id, ri.fw_ver_major, - ri.fw_ver_minor); - } else { -- sprintf(post_data, post_xml, ri.fw_ver_major, ri.fw_ver_minor, -- ri.fw_type, serial, ri.hw_ver_major, ri.hw_ver_minor, -- ri.hw_ver_micro, ri.flash_mfg, ri.flash_id, ri.protocol, -- ri.architecture, ri.skin); -- sprintf(post_data+strlen(post_data), "%s", post_xml_trailer); -+ format_string(&post_data, post_xml, ri.fw_ver_major, -+ ri.fw_ver_minor, ri.fw_type, serial.c_str(), -+ ri.hw_ver_major, ri.hw_ver_minor, ri.hw_ver_micro, -+ ri.flash_mfg, ri.flash_id, ri.protocol, ri.architecture, -+ ri.skin); -+ format_string(&post_data, "%s", post_xml_trailer); - } - -- debug("post data: %s",post_data); -+ debug("post data: %s", post_data.c_str()); - - string post_data_encoded; -- UrlEncode(post_data, post_data_encoded); -+ UrlEncode(post_data.c_str(), post_data_encoded); - - post = "Data=" + post_data_encoded; - } else { -@@ -382,11 +406,11 @@ int Post(uint8_t *xml, uint32_t xml_size, const char *root, TRemoteInfo &ri, - - debug("%s", post.c_str()); - -- char http_header[1000]; -- sprintf(http_header, post_header, path.c_str(), server.c_str(), -+ string http_header; -+ format_string(&http_header, post_header, path.c_str(), server.c_str(), - cookie.c_str(), post.length()); - -- debug("%s", http_header); -+ debug("%s", http_header.c_str()); - -- return Zap(server, http_header,post.c_str()); -+ return Zap(server, http_header.c_str(), post.c_str()); - } --- -2.1.0 - diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..bdedab9 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Merged into concordance package diff --git a/libconcord.spec b/libconcord.spec deleted file mode 100644 index d28b68c..0000000 --- a/libconcord.spec +++ /dev/null @@ -1,329 +0,0 @@ -%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -%define mainpkg concordance - -Name: libconcord -Version: 1.1 -Release: 6%{?dist} -Summary: Library to talk to Logitech Harmony universal remote controls - -Group: Development/Libraries -License: GPLv3+ -URL: http://phildev.net/concordance/ -Source0: http://downloads.sourceforge.net/sourceforge/concordance/%{mainpkg}-%{version}.tar.bz2 -# Fixes crash during website communications due to buffer overrun -# http://sourceforge.net/p/concordance/bugs/40/ -Patch0: concordance-1.1-fix-buffer-overrun.patch - -BuildRequires: hidapi-devel -BuildRequires: swig -BuildRequires: perl(ExtUtils::MakeMaker) -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: libtool -BuildRequires: libzip-devel -Requires: udev -# For usbnet-based remotes: 900, 1000, 1100 -Requires: dnsmasq -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig - -%description -Library to talk to Logitech Harmony universal remote controls - - -%package devel -Summary: Development libraries for libconcord -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -Development libraries for libconcord - - -%package perl -Summary: Perl bindings for libconcord -Group: Development/Libraries -Requires: libconcord = %{version}-%{release} -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) - -%description perl -Perl bindings for libconcord - - -%package python -Summary: Python bindings for libconcord -Group: Development/Libraries -Requires: libconcord = %{version}-%{release} - -%description python -Python bindings for libconcord - - -%prep -%setup -q -n %{mainpkg}-%{version} -%patch0 -p1 -b .fix-buffer-overrun - -%build -cd %{name} - -%configure --disable-static --disable-mime-update -make %{_smp_mflags} - - -# perl bindings -cd bindings/perl -swig -perl5 concord.i -%{__perl} Makefile.PL INSTALLDIRS=vendor INC=-I../../ -#sed -i -e 's|LDFLAGS =|LDFLAGS = -L../../|' Makefile -make %{_smp_mflags} -cd - - -# python bindings -cd bindings/python -CFLAGS="%{optflags}" %{__python} setup.py build -cd - - - -%install -cd %{name} -make DESTDIR=%{buildroot} install -make DESTDIR=%{buildroot} install_udev - -find %{buildroot} -type f -name \*.a -exec %{__rm} -f {} \; -find %{buildroot} -type f -name \*.la -exec %{__rm} -f {} \; - -# perl bindings -cd bindings/perl -make pure_install PERL_INSTALL_ROOT=%{buildroot} -find %{buildroot} -type f -name .packlist -exec rm -f {} ';' -find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';' -find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';' -%{__chmod} 755 %{buildroot}%{perl_vendorarch}/auto/concord/concord.so -cd - - -# python bindings -cd bindings/python -%{__python} setup.py install -O1 --skip-build --root %{buildroot} --install-purelib %{python_sitearch} -cd - - - -%post -/sbin/ldconfig -/sbin/udevadm control --reload-rules -touch --no-create %{_datadir}/mime/packages &> /dev/null || : - -%postun -/sbin/ldconfig -/sbin/udevadm control --reload-rules -if [ $1 -eq 0 ] ; then -touch --no-create %{_datadir}/mime/packages &> /dev/null || : -update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : -fi - -%posttrans -update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : - -%files -%defattr(-, root, root, -) -%doc Changelog CodingStyle LICENSE SubmittingPatches -%doc %{name}/README %{name}/INSTALL.linux -/lib/udev/rules.d/*.rules -/lib/udev/*.sh -%{_datadir}/mime/packages/%{name}.xml -%{_libdir}/*.so.* - -%files devel -%defattr(-, root, root) -%doc TODO -%{_includedir}/*.h -%{_libdir}/*.so - -%files perl -%defattr(-, root, root) -%doc %{name}/bindings/perl/README -%{perl_vendorarch}/auto/* -%{perl_vendorarch}/concord.pm - -%files python -%doc %{name}/bindings/python/README -%defattr(-, root, root) -%{python_sitearch}/* - - -%changelog -* Sun Dec 21 2014 Scott Talbert - 1.1-6 -- Added patch from upstream to fix buffer overrun crash, RHBZ #1162877 - -* Wed Aug 27 2014 Jitka Plesnikova - 1.1-5 -- Perl 5.20 rebuild - -* Mon Aug 18 2014 Rex Dieter 1.1-4 -- update mime scriptlets - -* Sun Aug 17 2014 Fedora Release Engineering - 1.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sat Jun 07 2014 Fedora Release Engineering - 1.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Sat Mar 29 2014 Scott Talbert - 1.1-1 -- New upstream release 1.1 -- Removed patches (incorporated/fixed upstream) -- Switch to hidapi (vs libusb) and libzip (vs zziplib) -- Removed unused perl bindings check -- Removed items no longer required in recent Fedoras - -* Fri Feb 28 2014 Scott Talbert - 1.0-6 -- Update python build dependency per: - https://fedoraproject.org/wiki/Changes/Remove_Python-setuptools-devel -- Remove old patches -- Remove old python bindings setup for Fedora < 8 - -* Wed Jan 29 2014 Scott Talbert - 1.0-5 -- Update autoconf patch to fix FTBFS, RHBZ #1059107 - -* Sat Aug 03 2013 Fedora Release Engineering - 1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Wed Jul 17 2013 Petr Pisar - 1.0-3 -- Perl 5.18 rebuild - -* Sat Jun 22 2013 Adam Williamson - 1.0-2 -- requires dnsmasq for usbnet remotes (thanks Scott Talbert) - -* Fri Jun 21 2013 Adam Williamson - 1.0-1 -- new upstream release 1.0 -- buildrequires zziplib-devel - -* Thu Feb 14 2013 Fedora Release Engineering - 0.24-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Sun Aug 19 2012 Tom Callaway - 0.24-1 -- update to 0.24 - -* Thu Jul 19 2012 Fedora Release Engineering - 0.23-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Mon Jun 11 2012 Petr Pisar - 0.23-10 -- Perl 5.16 rebuild - -* Mon Jan 16 2012 Adam Williamson - 0.23-9 -- gcc47.patch: fix build with gcc 4.7 by including unistd.h -- modern_udev.patch: add a 'modern udev' option to the rules generator - which uses udev-acl support, and use it. should finally fix - permissions issues, RHBZ #559412. Also fixes RHBZ #622670 -- drop the old acl patch, modern_udev.patch supersedes it -- from upstream CVS: - + fix flash_base for the 525 (and 550) - RHBZ #772517 - + give the 515 a name, just to prettify output - -* Fri Jan 13 2012 Fedora Release Engineering - 0.23-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Fri Jun 17 2011 Marcela Mašláňová - 0.23-7 -- Perl mass rebuild - -* Tue Jun 14 2011 Marcela Mašláňová - 0.23-6 -- Perl mass rebuild - -* Thu Mar 17 2011 Bill Nottingham - 0.23-5 -- don't require hal or polkit; the udev rules are enough -- put udev rules in /lib, not /etc - -* Thu Mar 17 2011 Adam Williamson - 0.23-4 -- udev_acl.patch: change to ID_REMOTE_CONTROL per upstream request - -* Thu Mar 17 2011 Adam Williamson - 0.23-3 -- add udev_acl.patch: add ID_PROGRAMMABLE_REMOTE so udev can set acls - -* Mon Feb 07 2011 Fedora Release Engineering - 0.23-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Fri Nov 19 2010 Adam Williamson - 0.23-1 -- new version 0.23 - -* Wed Jul 21 2010 David Malcolm - 0.21-10 -- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild - -* Tue Jun 01 2010 Marcela Maslanova - 0.21-9 -- Mass rebuild with perl-5.12.0 - -* Fri Dec 4 2009 Stepan Kasal - 0.21-8 -- rebuild against perl 5.10.1 - -* Fri Jul 31 2009 Douglas E. Warner 0.21-7 -- updating mime patch with different source: - http://stuff.onse.fi/concordance-mime2.patch - https://sourceforge.net/tracker/?func=detail&aid=2807865&group_id=201579&atid=978130 - -* Thu Jul 30 2009 Douglas E. Warner 0.21-6 -- updated patch w/ autoreconf run - -* Fri Jul 24 2009 Fedora Release Engineering - 0.21-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jun 17 2009 Douglas E. Warner 0.21-4 -- updated patch w/ autoreconf run - -* Wed Jun 17 2009 Douglas E. Warner 0.21-3 -- adding a mime-type definition so other packages can handle them appropriately - (bug#506536) - -* Wed Jun 17 2009 Douglas E. Warner 0.21-2 -- fixing name of hal policy to allow device to be accessed from non-root user - properly (bug#506371) - -* Tue Mar 10 2009 Douglas E. Warner 0.21-1 -- moving policykit rule generation from concordnace to here -- including new upstream install for policykit/hal/udev rules -- removing registered marks -- supports updating firmware on 5** remotes -- improved IR learning support - -* Wed Feb 25 2009 Fedora Release Engineering - 0.20-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Fri Jan 30 2009 Douglas E. Warner 0.20-7 -- removing registered marks - -* Sat Nov 29 2008 Ignacio Vazquez-Abrams - 0.20-6 -- Rebuild for Python 2.6 - -* Sat May 03 2008 Douglas E. Warner 0.20-5 -- fixing TODO file included twice -- adding bindings docs - -* Sat May 03 2008 Douglas E. Warner 0.20-4 -- installing python packages to sitearch again -- adding additional docs - -* Wed Apr 23 2008 Douglas E. Warner 0.20-3 -- fixed Source0 url to downloads.sourceforge.net instead of dl.sourceforge.net -- fixing mode of concord.so -- fixing python egg generation; adding buildrequire for python-setuptools-devel - -* Tue Apr 22 2008 Douglas E. Warner 0.20-2 -- fixed Source0 url -- changing to build/install dir rather than setting it in setup macro -- adding perl/python bindings - -* Mon Apr 21 2008 Douglas E. Warner 0.20-1 -- update to 0.20 -- removing unneeded gcc 4.3 patch - -* Mon Mar 24 2008 Douglas E. Warner 0.20-0.3.20080318cvs -- moved Requires ldconfig to post/postun -- adding patch for gcc 4.3 to define extra headers - -* Tue Mar 18 2008 Douglas E. Warner 0.20-0.2.20080318cvs -- adding devel dependancy on main package -- moved TODO from main package to devel -- fixed license to be GPLv3+, not GPLv2+ -- disabling static linking -- removing static libraries - -* Tue Mar 18 2008 Douglas E. Warner 0.20-0.1.20080318cvs -- Initial RPM release. - diff --git a/sources b/sources deleted file mode 100644 index 12938ec..0000000 --- a/sources +++ /dev/null @@ -1,2 +0,0 @@ -e805c92222b620ae65ed1ce963d7cd48 concordance-1.0.tar.bz2 -6f98c2121710282b52afc82f11bcfce9 concordance-1.1.tar.bz2