commit 3e454999897faffbcc64ce34a5e558f1e8b580fe Author: CentOS Sources Date: Sun Apr 25 06:13:37 2021 +0000 import ed-1.14.2-4.el8 diff --git a/.ed.metadata b/.ed.metadata new file mode 100644 index 0000000..a1cadfc --- /dev/null +++ b/.ed.metadata @@ -0,0 +1 @@ +f02cd93190f5d34dc5f6abd8bc8c1cd2e7b067b8 SOURCES/ed-1.14.2.tar.xz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d9a4f65 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/ed-1.14.2.tar.xz diff --git a/SOURCES/ed-1.14.2-fix-resource-leaks.patch b/SOURCES/ed-1.14.2-fix-resource-leaks.patch new file mode 100644 index 0000000..310ab1e --- /dev/null +++ b/SOURCES/ed-1.14.2-fix-resource-leaks.patch @@ -0,0 +1,76 @@ +diff -urN ed-1.14.2/carg_parser.c ed-1.14.2_patched/carg_parser.c +--- ed-1.14.2/carg_parser.c 2017-01-12 23:05:08.000000000 +0100 ++++ ed-1.14.2_patched/carg_parser.c 2018-10-04 11:12:59.857570021 +0200 +@@ -204,6 +204,8 @@ + int non_options_size = 0; /* number of skipped non-options */ + int argind = 1; /* index in argv */ + int i; ++ int Status = 0; ++ void * tmp = NULL; + + ap->data = 0; + ap->error = 0; +@@ -223,9 +225,15 @@ + if( ch2 == '-' ) + { + if( !argv[argind][2] ) { ++argind; break; } /* we found "--" */ +- else if( !parse_long_option( ap, opt, arg, options, &argind ) ) return 0; ++ else if( !parse_long_option( ap, opt, arg, options, &argind ) ) { ++ Status = 0; ++ goto Exit; ++ } + } +- else if( !parse_short_option( ap, opt, arg, options, &argind ) ) return 0; ++ else if( !parse_short_option( ap, opt, arg, options, &argind ) ) { ++ Status = 0; ++ goto Exit; ++ } + if( ap->error ) break; + } + else +@@ -234,7 +242,7 @@ + { if( !push_back_record( ap, 0, argv[argind++] ) ) return 0; } + else + { +- void * tmp = ap_resize_buffer( non_options, ++ tmp = ap_resize_buffer( non_options, + ( non_options_size + 1 ) * sizeof *non_options ); + if( !tmp ) return 0; + non_options = (const char **)tmp; +@@ -246,12 +254,21 @@ + else + { + for( i = 0; i < non_options_size; ++i ) +- if( !push_back_record( ap, 0, non_options[i] ) ) return 0; ++ if( !push_back_record( ap, 0, non_options[i] ) ) { ++ Status = 0; ++ goto Exit; ++ } + while( argind < argc ) +- if( !push_back_record( ap, 0, argv[argind++] ) ) return 0; ++ if( !push_back_record( ap, 0, argv[argind++] ) ) { ++ Status = 0; ++ goto Exit; ++ } + } ++ Status = 1; ++ goto Exit; ++Exit: + if( non_options ) free( non_options ); +- return 1; ++ return(Status); + } + + +diff -urN ed-1.14.2/main_loop.c ed-1.14.2_patched/main_loop.c +--- ed-1.14.2/main_loop.c 2017-02-22 17:25:34.000000000 +0100 ++++ ed-1.14.2_patched/main_loop.c 2018-10-01 17:19:46.555004735 +0200 +@@ -614,7 +614,7 @@ + !print_lines( second_addr, second_addr, 0 ) ) + return ERR; + break; +- case '#': while( *(*ibufpp)++ != '\n' ) ; ++ case '#': while( *(*ibufpp)++ != '\n' ) {} ; + break; + default : set_error_msg( "Unknown command" ); return ERR; + } diff --git a/SPECS/ed.spec b/SPECS/ed.spec new file mode 100644 index 0000000..89613cc --- /dev/null +++ b/SPECS/ed.spec @@ -0,0 +1,305 @@ +Summary: The GNU line editor +Name: ed +Version: 1.14.2 +Release: 4%{?dist} +License: GPLv3+ and GFDL +# Note: Upstream provides only lzip compressed tarballs which +# koji can't handle. Repackaging required: +#Source: https://download.savannah.gnu.org/releases/ed/%{name}-%{version}.tar.lz +Source: %{name}-%{version}.tar.xz +Patch0: %{name}-%{version}-fix-resource-leaks.patch +URL: http://www.gnu.org/software/ed/ +Requires(post): info +Requires(preun): info + +%description +Ed is a line-oriented text editor, used to create, display, and modify +text files (both interactively and via shell scripts). For most +purposes, ed has been replaced in normal usage by full-screen editors +(emacs and vi, for example). + +Ed was the original UNIX editor, and may be used by some programs. In +general, however, you probably don't need to install it and you probably +won't use it. + +%prep +%setup -q +%patch0 -p1 + +%build +%configure +%make_build CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}" + +%install +%make_install +rm -vrf %{buildroot}%{_infodir}/dir + +%post +/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : + +%preun +if [ $1 = 0 ] ; then + /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : +fi + +%files +%license COPYING +%doc ChangeLog NEWS README TODO AUTHORS +%{_bindir}/ed +%{_bindir}/red +%{_mandir}/man1/ed.1* +%{_mandir}/man1/red.1* +%{_infodir}/ed.info* + +%changelog +* Tue Oct 09 2018 Karsten Hopp - 1.14.2-4 +- fix license tag + +* Mon Oct 01 2018 Karsten Hopp - 1.14.2-3 +- fix resource leaks + +* Wed Feb 07 2018 Fedora Release Engineering - 1.14.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Nov 09 2017 Igor Gnatenko - 1.14.2-1 +- Update to 1.14.2 + +* Wed Aug 02 2017 Fedora Release Engineering - 1.14.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 1.14.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Feb 01 2017 Stephen Gallagher - 1.14.1-2 +- Add missing %%license macro + +* Thu Jan 12 2017 Karsten Hopp - 1.14-1 +- update to 1.14 + +* Tue Apr 05 2016 Karsten Hopp 1.13-1 +- update to 1.13 + +* Wed Feb 03 2016 Fedora Release Engineering - 1.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Nov 12 2015 Karsten Hopp - 1.12-1 +- update to 1.12 + +* Wed Jun 17 2015 Fedora Release Engineering - 1.10-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Feb 21 2015 Till Maas - 1.10-4 +- Rebuilt for Fedora 23 Change + https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code + +* Sat Aug 16 2014 Fedora Release Engineering - 1.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Feb 24 2014 Karsten Hopp 1.10-1 +- update to 1.10 + +* Wed Jul 31 2013 Karsten Hopp 1.9-2 +- add GFDL to licenses + +* Tue Jul 23 2013 Karsten Hopp 1.9-1 +- update to ed-1.9 +- fix changelog dates + +* Tue May 14 2013 Karsten Hopp 1.8-1 +- update to ed-1.8 +- spec file cleanups + +* Wed Feb 13 2013 Fedora Release Engineering - 1.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 1.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Mar 15 2012 Karsten Hopp 1.6-1 +- ed-1.6 + +* Fri Jan 13 2012 Fedora Release Engineering - 1.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jan 24 2011 Karsten Hopp 1.5-1 +- update to version 1.5 (#630693) + +* Tue Apr 20 2010 Karsten Hopp 1.4-2 +- drop duplicate man pages (#583178) + +* Tue Mar 02 2010 Karsten Hopp 1.4-1 +- update to latest version + +* Fri Jul 24 2009 Fedora Release Engineering - 1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Oct 29 2008 Karsten Hopp 1.1-1 +- update to latest version, fixes CVE-2008-3916 + +* Tue Jun 24 2008 Karsten Hopp 0.9-1 +- version 0.9 + +* Mon Mar 24 2008 Tom "spot" Callaway - 0.8-3 +- fix license tag + +* Tue Feb 19 2008 Fedora Release Engineering - 0.8-2 +- Autorebuild for GCC 4.3 + +* Wed Aug 22 2007 Karsten Hopp 0.8-1 +- update to 0.8 + +* Wed Aug 22 2007 Karsten Hopp 0.7-2 +- update license tags + +* Mon Jul 23 2007 Karsten Hopp 0.7-1 +- update to 0.7 to fix an endless loop (#234689) +- add disttag + +* Mon Jul 02 2007 Karsten Hopp 0.6-1 +- update to 0.6 + +* Wed Mar 14 2007 Karsten Hopp 0.5-1 +- version 0.5, fixes #228329 + +* Mon Feb 05 2007 Karsten Hopp 0.4-3 +- clean up spec file for merge review (#225717) + +* Wed Jan 31 2007 Karsten Hopp 0.4-2 +- use RPM_OPT_FLAGS, this fixes debuginfo + +* Tue Jan 23 2007 Karsten Hopp 0.4-1 +- new upstream version + +* Thu Jan 18 2007 Karsten Hopp 0.3-3 +- don't abort (un)install scriptlets when _excludedocs is set (Ville Skyttä) + +* Thu Jan 18 2007 Karsten Hopp 0.3-2 +- fix man page permissions (#222581) + +* Mon Nov 13 2006 Karsten Hopp 0.3-1 +- update to ed-0.3 + +* Wed Jul 12 2006 Jesse Keating - 0.2-38.2.2 +- rebuild + +* Fri Feb 10 2006 Jesse Keating - 0.2-38.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 0.2-38.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Wed Mar 02 2005 Karsten Hopp 0.2-38 +- build with gcc-4 + +* Mon Jan 03 2005 Karsten Hopp 0.2-37 +- spec file fix from Marcin Garski (#143723) + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Tue Jun 17 2003 Karsten Hopp 0.2-34 +- rebuild + +* Tue Jun 17 2003 Karsten Hopp 0.2-33 +- rebuild to fix crt*.o problems + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Tue Dec 17 2002 Karsten Hopp č +- remove regex, use glibc's regex (#79132) + +* Thu Dec 12 2002 Tim Powers 0.2-29 +- rebuild on all arches + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Mon May 6 2002 Bernhard Rosenkraenzer 0.2-26 +- Fix build with current toolchain + +* Wed Apr 03 2002 Karsten Hopp +- don't use gcc -s + +* Fri Feb 22 2002 Karsten Hopp +- bump version + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Mon Oct 15 2001 Karsten Hopp +- add home page (#54602) + +* Sat Jul 07 2001 Karsten Hopp +- Copyright -> License +- fix URL + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Mon Dec 04 2000 Karsten Hopp +- back out fixes for compiler warnings + +* Wed Nov 29 2000 Karsten Hopp +- Security bugfix (mkstemp instead of mktemp) Bugzilla #21470 + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Sun Jun 18 2000 Than Ngo +- fix typo + +* Sat Jun 17 2000 Than Ngo +- add %%defattr +- clean up specfile + +* Sat May 20 2000 Ngo Than +- rebuild for 7.0 +- put man pages and infos in right place + +* Thu Feb 03 2000 Preston Brown +- rebuild to gzip man pages. + +* Tue Mar 23 1999 Jeff Johnson +- fix %%post syntax error (#1689). + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 11) + +* Wed Feb 24 1999 Preston Brown +- Injected new description and group. + +* Fri Dec 18 1998 Preston Brown +- bumped spec number for initial rh 6.0 build + +* Mon Apr 27 1998 Prospector System +- translations modified for de, fr, tr + +* Fri Oct 17 1997 Donnie Barnes +- added install-info support +- added BuildRoot +- correct URL in Source line + +* Mon Jun 02 1997 Erik Troan +- built against glibc