From d459b58df215a6c53609bcd0963c88020b6166ff Mon Sep 17 00:00:00 2001 From: basebuilder_pel7ppc64lebuilder0 Date: Mon, 27 Aug 2018 18:53:17 +0200 Subject: [PATCH] symlinks package update Signed-off-by: basebuilder_pel7ppc64lebuilder0 --- SOURCES/symlinks-LICENSE.txt | 25 +++ .../symlinks-coverity-overrun-dynamic.patch | 12 ++ SOURCES/symlinks-coverity-readlink.patch | 12 ++ SPECS/symlinks.spec | 198 ++++++++++++++++++ 4 files changed, 247 insertions(+) create mode 100644 SOURCES/symlinks-LICENSE.txt create mode 100644 SOURCES/symlinks-coverity-overrun-dynamic.patch create mode 100644 SOURCES/symlinks-coverity-readlink.patch create mode 100644 SPECS/symlinks.spec diff --git a/SOURCES/symlinks-LICENSE.txt b/SOURCES/symlinks-LICENSE.txt new file mode 100644 index 00000000..ff9cb981 --- /dev/null +++ b/SOURCES/symlinks-LICENSE.txt @@ -0,0 +1,25 @@ +From: http://packages.debian.org/changelogs/pool/main/s/symlinks/symlinks_1.2-4.2/symlinks.copyright + +Copyright (c) Mark Lord, freely distributable + +License clarification as found in Debian Bug #273338: + +Hi, + +My "symlinks" utility pre-dates the "open source licensing" fad +by a number of years. Just to clarify, this is 100% freeware, +written entirely by myself. The intent is to use it to detect +missing/obsolete symlink targets on an installed distro, before +creating the "gold" (or "final") release discs. + +Use and distribute and modify as you (or anyone else) sees fit. +There have no formal restrictions or requirements whatsoever +regarding distribution of either binaries or source code, +whether modified or original. + +Cheers +-- +Mark Lord +Real-Time Remedies Inc. +mlord@pobox.com + diff --git a/SOURCES/symlinks-coverity-overrun-dynamic.patch b/SOURCES/symlinks-coverity-overrun-dynamic.patch new file mode 100644 index 00000000..e5f0b491 --- /dev/null +++ b/SOURCES/symlinks-coverity-overrun-dynamic.patch @@ -0,0 +1,12 @@ +diff -up symlinks-1.4/symlinks.c.coverity-overrun-dynamic symlinks-1.4/symlinks.c +--- symlinks-1.4/symlinks.c.coverity-overrun-dynamic 2011-05-20 14:10:25.682843723 +0100 ++++ symlinks-1.4/symlinks.c 2011-05-20 14:11:15.792920839 +0100 +@@ -44,7 +44,7 @@ static int substr (char *s, char *old, c + newlen = strlen(new); + + if (newlen > oldlen) { +- if ((tmp = malloc(strlen(s))) == NULL) { ++ if ((tmp = malloc(strlen(s)+1)) == NULL) { + fprintf(stderr, "no memory\n"); + exit (1); + } diff --git a/SOURCES/symlinks-coverity-readlink.patch b/SOURCES/symlinks-coverity-readlink.patch new file mode 100644 index 00000000..ce28ff8f --- /dev/null +++ b/SOURCES/symlinks-coverity-readlink.patch @@ -0,0 +1,12 @@ +diff -up symlinks-1.4/symlinks.c.coverity-readlink symlinks-1.4/symlinks.c +--- symlinks-1.4/symlinks.c.coverity-readlink 2009-10-09 15:03:55.000000000 +0100 ++++ symlinks-1.4/symlinks.c 2011-05-20 14:10:25.682843723 +0100 +@@ -160,7 +160,7 @@ static void fix_symlink (char *path, dev + struct stat stbuf, lstbuf; + int c, fix_abs = 0, fix_messy = 0, fix_long = 0; + +- if ((c = readlink(path, lpath, sizeof(lpath))) == -1) { ++ if ((c = readlink(path, lpath, sizeof(lpath)-1)) == -1) { + perror(path); + return; + } diff --git a/SPECS/symlinks.spec b/SPECS/symlinks.spec new file mode 100644 index 00000000..aafd321d --- /dev/null +++ b/SPECS/symlinks.spec @@ -0,0 +1,198 @@ +Summary: A utility which maintains a system's symbolic links +Name: symlinks +URL: ftp://metalab.unc.edu/pub/Linux/utils/file/ +Version: 1.4 +Release: 9%{?dist} +Group: Applications/System +License: Copyright only +Source0: http://ibiblio.org/pub/Linux/utils/file/%{name}-%{version}.tar.gz +# Taken from http://packages.debian.org/changelogs/pool/main/s/symlinks/symlinks_1.2-4.2/symlinks.copyright +Source1: symlinks-LICENSE.txt +Patch1: symlinks-coverity-readlink.patch +Patch2: symlinks-coverity-overrun-dynamic.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +The symlinks utility performs maintenance on symbolic links. Symlinks +checks for symlink problems, including dangling symlinks which point +to nonexistent files. Symlinks can also automatically convert +absolute symlinks to relative symlinks. + +Install the symlinks package if you need a program for maintaining +symlinks on your system. + +%prep +%setup -q +cp %{SOURCE1} . + +# Fix off-by-one error in call to readlink. +%patch1 -p1 -b .coverity-readlink + +# Fix possible buffer overrun found by coverity. +%patch2 -p1 -b .coverity-overrun-dynamic + +%build +make CFLAGS="$RPM_OPT_FLAGS $(getconf LFS_CFLAGS)" %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT%{_bindir} +mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8 +install -m 755 symlinks $RPM_BUILD_ROOT%{_bindir} +install -m 644 symlinks.8 $RPM_BUILD_ROOT%{_mandir}/man8 + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +%doc symlinks-LICENSE.txt +%{_bindir}/symlinks +%{_mandir}/man8/symlinks.8* + +%changelog +* Fri Jan 24 2014 Daniel Mach - 1.4-9 +- Mass rebuild 2014-01-24 + +* Fri Dec 27 2013 Daniel Mach - 1.4-8 +- Mass rebuild 2013-12-27 + +* Fri Feb 15 2013 Fedora Release Engineering - 1.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 1.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 1.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Fri May 20 2011 Tim Waugh 1.4-4 +- Applied patches from Jiri Popelka: + - Fix off-by-one error in call to readlink. + - Fix possible buffer overrun found by coverity. + +* Wed Feb 09 2011 Fedora Release Engineering - 1.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Nov 13 2009 Tim Waugh 1.4-2 +- 1.4. All patches now upstream. + +* Sun Jul 26 2009 Fedora Release Engineering - 1.2-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 1.2-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Sep 6 2008 Tom "spot" Callaway 1.2-32 +- fix license tag + +* Mon Feb 11 2008 Tim Waugh 1.2-31 +- Rebuild for GCC 4.3. + +* Wed Aug 29 2007 Tim Waugh 1.2-30 +- Rebuilt. + +* Fri Feb 23 2007 Tim Waugh 1.2-29 +- Use smp_mflags (bug #226445). +- Better default attributes (bug #226445). +- Make setup macro quiet (bug #226445). +- Clean build root in %%install section (bug #226445). + +* Wed Feb 7 2007 Tim Waugh 1.2-28 +- Fixed build root (bug #226445). + +* Tue Feb 6 2007 Tim Waugh 1.2-27 +- Fixed summary (bug #226445). +- Added token URL tag (bug #226445). + +* Tue Jan 30 2007 Florian La Roche - 1.2-26 +- do not strip away debuginfo + +* Thu Jan 18 2007 Tim Waugh - 1.2-25 +- Build with LFS support (bug #206407). + +* Wed Jul 12 2006 Jesse Keating - 1.2-24.2.2 +- rebuild + +* Fri Feb 10 2006 Jesse Keating - 1.2-24.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1.2-24.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Wed Mar 2 2005 Tim Waugh 1.2-24 +- Rebuild for new GCC. + +* Wed Feb 9 2005 Tim Waugh 1.2-23 +- s/Copyright:/License:/. + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Thu Oct 16 2003 Florian La Roche +- add patch from #89655 + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Wed Dec 11 2002 Tim Powers 1.2-17 +- rebuild on all arches + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Tue Jun 13 2000 Preston Brown +- FHS paths + +* Tue May 30 2000 Preston Brown +- fix up help output (#10236) + +* Thu Feb 10 2000 Preston Brown +- do not link statically + +* Mon Feb 07 2000 Preston Brown +- rebuild to gzip man page + +* Mon Oct 04 1999 Cristian Gafton +- rebuild against the latest glibc in the sparc tree + +* Sun Mar 21 1999 Cristian Gafton +- auto rebuild in the new build environment (release 5) + +* 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 + +* Mon Oct 20 1997 Otto Hammersmith +- changed build root to /var/tmp, not /var/lib +- updated to version 1.2 + +* Wed Jul 09 1997 Erik Troan +- built against glibc +- build-rooted