Accepting request 25296 from Base:System
Copy from Base:System/ed based on submit request 25296 from user mvyskocil OBS-URL: https://build.opensuse.org/request/show/25296 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ed?expand=0&rev=5
This commit is contained in:
parent
9e5e21f2f2
commit
fe3d24c422
@ -1,51 +0,0 @@
|
|||||||
--- buf.c
|
|
||||||
+++ buf.c Mon Nov 27 00:06:51 2000
|
|
||||||
@@ -194,21 +194,17 @@
|
|
||||||
|
|
||||||
extern int newline_added;
|
|
||||||
|
|
||||||
-char sfn[15] = ""; /* scratch file name */
|
|
||||||
-
|
|
||||||
/* open_sbuf: open scratch file */
|
|
||||||
int
|
|
||||||
open_sbuf ()
|
|
||||||
{
|
|
||||||
- char *mktemp ();
|
|
||||||
int u;
|
|
||||||
|
|
||||||
isbinary = newline_added = 0;
|
|
||||||
u = umask(077);
|
|
||||||
- strcpy (sfn, "/tmp/ed.XXXXXX");
|
|
||||||
- if (mktemp (sfn) == NULL || (sfp = fopen (sfn, "w+")) == NULL)
|
|
||||||
+ if ((sfp = tmpfile()) == NULL)
|
|
||||||
{
|
|
||||||
- fprintf (stderr, "%s: %s\n", sfn, strerror (errno));
|
|
||||||
+ fprintf (stderr, "%s\n", strerror (errno));
|
|
||||||
sprintf (errmsg, "Cannot open temp file");
|
|
||||||
umask(u);
|
|
||||||
return ERR;
|
|
||||||
@@ -226,14 +222,14 @@
|
|
||||||
{
|
|
||||||
if (fclose (sfp) < 0)
|
|
||||||
{
|
|
||||||
- fprintf (stderr, "%s: %s\n", sfn, strerror (errno));
|
|
||||||
+ fprintf (stderr, "Cannot close temp file: %s\n", strerror (errno));
|
|
||||||
sprintf (errmsg, "Cannot close temp file");
|
|
||||||
return ERR;
|
|
||||||
}
|
|
||||||
sfp = NULL;
|
|
||||||
- unlink (sfn);
|
|
||||||
}
|
|
||||||
sfseek = seek_write = 0;
|
|
||||||
+
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -246,7 +242,6 @@
|
|
||||||
if (sfp)
|
|
||||||
{
|
|
||||||
fclose (sfp);
|
|
||||||
- unlink (sfn);
|
|
||||||
}
|
|
||||||
exit (n);
|
|
||||||
}
|
|
78
ed-0.2.diff
78
ed-0.2.diff
@ -1,78 +0,0 @@
|
|||||||
--- Makefile.in
|
|
||||||
+++ Makefile.in
|
|
||||||
@@ -40,9 +40,10 @@
|
|
||||||
|
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
-bindir = $(exec_prefix)/bin
|
|
||||||
-infodir = $(prefix)/info
|
|
||||||
-mandir = $(prefix)/man/man1
|
|
||||||
+bindir = @bindir@
|
|
||||||
+infodir = @infodir@
|
|
||||||
+mandir = @mandir@
|
|
||||||
+manxdir = $(mandir)/man1
|
|
||||||
manext = .1
|
|
||||||
|
|
||||||
CPPFLAGS = -I. -I$(srcdir) $(DEFS) @CPPFLAGS@
|
|
||||||
@@ -55,8 +56,8 @@
|
|
||||||
OBJECTS = buf.o glbl.o io.o main.o re.o signal.o sub.o undo.o version.o
|
|
||||||
|
|
||||||
LIBHDRS = pathmax.h getopt.h regex.h
|
|
||||||
-LIBSRCS = alloca.c error.c getopt.c getopt1.c regex.c xmalloc.c
|
|
||||||
-LIBOBJS = @ALLOCA@ getopt.o getopt1.o regex.o @LIBOBJS@
|
|
||||||
+LIBSRCS = alloca.c error.c getopt.c getopt1.c xmalloc.c
|
|
||||||
+LIBOBJS = @ALLOCA@ getopt.o getopt1.o @LIBOBJS@
|
|
||||||
|
|
||||||
DISTFILES = $(HEADERS) $(LIBHDRS) $(LIBSRCS) $(SOURCES) ChangeLog COPYING \
|
|
||||||
INSTALL Makefile.in NEWS POSIX README TODO THANKS \
|
|
||||||
@@ -68,11 +69,11 @@
|
|
||||||
ed: $(OBJECTS) libed.a
|
|
||||||
$(CC) $(LDFLAGS) -o ed $(OBJECTS) libed.a $(LIBS)
|
|
||||||
|
|
||||||
-buf.o: ed.h config.h regex.h
|
|
||||||
-ed.o: ed.h config.h regex.h
|
|
||||||
-main.o: ed.h config.h regex.h getopt.h pathmax.h
|
|
||||||
-re.o: ed.h config.h regex.h
|
|
||||||
-signal.o: ed.h config.h regex.h
|
|
||||||
+buf.o: ed.h config.h
|
|
||||||
+ed.o: ed.h config.h
|
|
||||||
+main.o: ed.h config.h getopt.h pathmax.h
|
|
||||||
+re.o: ed.h config.h
|
|
||||||
+signal.o: ed.h config.h
|
|
||||||
|
|
||||||
libed.a: $(LIBOBJS)
|
|
||||||
rm -f libed.a
|
|
||||||
@@ -80,7 +81,6 @@
|
|
||||||
$(RANLIB) libed.a
|
|
||||||
|
|
||||||
getopt.o getopt1.o: getopt.h
|
|
||||||
-regex.o: regex.h
|
|
||||||
|
|
||||||
check: ed
|
|
||||||
rootme=`pwd`; srcrootme=`cd $(srcdir); pwd`;\
|
|
||||||
@@ -104,20 +104,20 @@
|
|
||||||
cd $(bindir); \
|
|
||||||
$(LN_S) $(binprefix)ed $(binprefix)red
|
|
||||||
$(INSTALL_DATA) $(srcdir)/ed.info $(infodir)/$(binprefix)ed.info
|
|
||||||
- $(INSTALL_DATA) $(srcdir)/ed.1 $(mandir)/$(binprefix)ed$(manext)
|
|
||||||
- rm -f $(mandir)/$(binprefix)red$(manext)
|
|
||||||
- cd $(mandir); \
|
|
||||||
+ $(INSTALL_DATA) $(srcdir)/ed.1 $(manxdir)/$(binprefix)ed$(manext)
|
|
||||||
+ rm -f $(manxdir)/$(binprefix)red$(manext)
|
|
||||||
+ cd $(manxdir); \
|
|
||||||
$(LN_S) $(binprefix)ed$(manext) $(binprefix)red$(manext)
|
|
||||||
|
|
||||||
# Make sure all installation directories, e.g. $(bindir) actually exist by
|
|
||||||
# making them if necessary.
|
|
||||||
installdirs:
|
|
||||||
- $(srcdir)/mkinstalldirs $(bindir) $(infodir) $(mandir)
|
|
||||||
+ $(srcdir)/mkinstalldirs $(bindir) $(infodir) $(manxdir)
|
|
||||||
|
|
||||||
uninstall: all
|
|
||||||
rm -f $(bindir)/$(binprefix)ed $(bindir)/$(binprefix)red
|
|
||||||
rm -f $(infodir)/$(binprefix)ed.info
|
|
||||||
- rm -f $(mandir)/$(binprefix)ed.1 $(mandir)/$(binprefix)red.1
|
|
||||||
+ rm -f $(manxdir)/$(binprefix)ed.1 $(manxdir)/$(binprefix)red.1
|
|
||||||
|
|
||||||
tags: $(HEADERS) $(SOURCES)
|
|
||||||
ctags $(HEADERS) $(SOURCES)
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:2a8555c334b603882869c618c9b685c4e0fd1be5f4e84cb03a875f8f6c1f7a5e
|
|
||||||
size 185913
|
|
3
ed-1.4.tar.gz
Normal file
3
ed-1.4.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:db36da85ee1a9d8bafb4b041bd4c8c11becba0c43ec446353b67045de1634fda
|
||||||
|
size 90972
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 30 12:56:22 UTC 2009 - mvyskocil@suse.cz
|
||||||
|
|
||||||
|
- updated to latest upstream version 1.4 - major rewrite and bugfixes (see
|
||||||
|
Changelog for details)
|
||||||
|
- obsoleted all patches
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Oct 20 13:06:16 CEST 2006 - lrupp@suse.de
|
Fri Oct 20 13:06:16 CEST 2006 - lrupp@suse.de
|
||||||
|
|
||||||
|
99
ed.spec
99
ed.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package ed (Version 0.2)
|
# spec file for package ed (Version 1.4)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -20,18 +20,14 @@
|
|||||||
|
|
||||||
Name: ed
|
Name: ed
|
||||||
Url: http://www.gnu.org/software/ed/
|
Url: http://www.gnu.org/software/ed/
|
||||||
License: GPL v2 or later; LGPL v2.1 or later
|
License: GPLv3+ ; LGPLv2.1+
|
||||||
Group: Productivity/Editors/Other
|
Group: Productivity/Editors/Other
|
||||||
PreReq: %install_info_prereq
|
PreReq: %install_info_prereq
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Version: 0.2
|
Version: 1.4
|
||||||
Release: 1001
|
Release: 1
|
||||||
Summary: Standard UNIX Line Editor
|
Summary: Standard UNIX Line Editor
|
||||||
Source: ed-0.2.tar.gz
|
Source: ed-%{version}.tar.gz
|
||||||
Patch: ed-0.2.diff
|
|
||||||
Patch1: ed-0.2-tmpfile.patch
|
|
||||||
Patch2: proto.patch
|
|
||||||
Patch3: signal.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -44,38 +40,37 @@ Authors:
|
|||||||
Andrew Moore <alm@worm.talke.org>
|
Andrew Moore <alm@worm.talke.org>
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup
|
%setup -q
|
||||||
%patch
|
sed -i \
|
||||||
%patch1
|
-e "s/CFLAGS='.*/CFLAGS='%{optflags}'/" \
|
||||||
%patch2
|
-e "s/CXXFLAGS='.*/CXXFLAGS='%{optflags}'/" \
|
||||||
%patch3
|
configure
|
||||||
rm -f regex.*
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
chmod +w configure
|
%{configure}
|
||||||
autoreconf -fi
|
|
||||||
CFLAGS="$RPM_OPT_FLAGS" \
|
|
||||||
./configure --prefix=/usr --infodir=%{_infodir} --mandir=%{_mandir}
|
|
||||||
make
|
make
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make prefix=$RPM_BUILD_ROOT/usr mandir=$RPM_BUILD_ROOT%{_mandir} \
|
%{makeinstall}
|
||||||
infodir=$RPM_BUILD_ROOT%{_infodir} install
|
%{__install} -d -m 0755 %{buildroot}/bin
|
||||||
mkdir -p $RPM_BUILD_ROOT/bin
|
%{__mv} %{buildroot}/%{_bindir}/ed %{buildroot}/bin/ed
|
||||||
mv $RPM_BUILD_ROOT/usr/bin/ed $RPM_BUILD_ROOT/bin/ed
|
%{__ln_s} /bin/ed %{buildroot}/%{_bindir}/ed
|
||||||
ln -s /bin/ed $RPM_BUILD_ROOT/usr/bin/ed
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
/bin/ed
|
%doc AUTHORS ChangeLog COPYING NEWS README TODO
|
||||||
/usr/bin/ed
|
/bin/%{name}
|
||||||
/usr/bin/red
|
%{_bindir}/%{name}
|
||||||
%doc %{_infodir}/ed.info.gz
|
%{_bindir}/r%{name}
|
||||||
%doc %{_mandir}/man1/ed.1.gz
|
%doc %{_infodir}/%{name}.info.gz
|
||||||
%doc %{_mandir}/man1/red.1.gz
|
%doc %{_mandir}/man1/%{name}.1.gz
|
||||||
|
%doc %{_mandir}/man1/r%{name}.1.gz
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%install_info --entry="* ed: (ed). Line-oriented text editor" --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
%install_info --entry="* ed: (ed). Line-oriented text editor" --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
||||||
@ -84,43 +79,3 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Fri Oct 20 2006 lrupp@suse.de
|
|
||||||
- revert to 0.2: new version is broken (#212749)
|
|
||||||
* Tue Oct 10 2006 agruen@suse.de
|
|
||||||
- dash-option.diff: Fix `ed - filename' invocation.
|
|
||||||
* Mon Oct 09 2006 schwab@suse.de
|
|
||||||
- Update to ed 0.3-pre2.
|
|
||||||
* The symlink vulnerability has been fixed using the "tmpfile" function.
|
|
||||||
* The manual has been updated.
|
|
||||||
* An extensive code cleanup has been done.
|
|
||||||
- Fix signal handing again.
|
|
||||||
* Wed Jan 25 2006 mls@suse.de
|
|
||||||
- converted neededforbuild to BuildRequires
|
|
||||||
* Fri Oct 01 2004 schwab@suse.de
|
|
||||||
- Fix signal handling
|
|
||||||
(<http://lists.gnu.org/archive/html/bug-gnu-utils/2004-09/msg00123.html>).
|
|
||||||
* Sat Sep 11 2004 schwab@suse.de
|
|
||||||
- Don't use __P from glibc headers.
|
|
||||||
* Sat Jan 10 2004 adrian@suse.de
|
|
||||||
- add %%defattr
|
|
||||||
* Thu Apr 24 2003 ro@suse.de
|
|
||||||
- fix install_info --delete call and move from preun to postun
|
|
||||||
* Tue Apr 15 2003 coolo@suse.de
|
|
||||||
- use BuildRoot
|
|
||||||
* Mon Mar 03 2003 ro@suse.de
|
|
||||||
- fixed typo in dir entry
|
|
||||||
* Mon Mar 03 2003 ro@suse.de
|
|
||||||
- added info dir entry
|
|
||||||
* Fri Feb 07 2003 ro@suse.de
|
|
||||||
- use install_info macros
|
|
||||||
* Tue Sep 17 2002 ro@suse.de
|
|
||||||
- removed bogus self-provides
|
|
||||||
* Tue Dec 19 2000 werner@suse.de
|
|
||||||
- Close temporary file security hole
|
|
||||||
* Fri Feb 25 2000 kukuk@suse.de
|
|
||||||
- Use RPM_OPT_FLAGS
|
|
||||||
- Move /usr/{info,man} -> /usr/share/{info,man}
|
|
||||||
* Sat Nov 06 1999 bs@suse.de
|
|
||||||
- moved binary to /bin/ed and provide symlink /usr/bin/ed
|
|
||||||
* Mon Sep 13 1999 bs@suse.de
|
|
||||||
- ran old prepare_spec on spec file to switch to new prepare_spec.
|
|
||||||
|
10
proto.patch
10
proto.patch
@ -1,10 +0,0 @@
|
|||||||
--- ed.h
|
|
||||||
+++ ed.h
|
|
||||||
@@ -244,6 +244,7 @@
|
|
||||||
((n > 0 && n < sys_nerr) ? sys_errlist[n] : "Unknown system error")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#undef __P
|
|
||||||
#ifndef __P
|
|
||||||
#ifndef __STDC__
|
|
||||||
#define __P(proto) ()
|
|
65
signal.patch
65
signal.patch
@ -1,65 +0,0 @@
|
|||||||
--- configure.in
|
|
||||||
+++ configure.in
|
|
||||||
@@ -11,11 +11,11 @@
|
|
||||||
AC_C_CONST
|
|
||||||
AC_HEADER_STDC
|
|
||||||
AC_CHECK_HEADERS(limits.h memory.h string.h unistd.h locale.h)
|
|
||||||
-AC_CHECK_FUNCS(setbuffer sigsetjmp sigaction strerror)
|
|
||||||
+AC_CHECK_FUNCS(setbuffer siglongjmp sigaction strerror)
|
|
||||||
AC_FUNC_VPRINTF
|
|
||||||
AC_FUNC_ALLOCA
|
|
||||||
if test "$ALLOCA" = alloca.o; then
|
|
||||||
- AC_SUBST(LIBOBJS)LIBOBJS="$LIBOBJS xmalloc.o error.o"
|
|
||||||
+ AC_LIBOBJ(xmalloc) AC_LIBOBJ(error)
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_OUTPUT(Makefile)
|
|
||||||
--- main.c
|
|
||||||
+++ main.c
|
|
||||||
@@ -68,7 +68,7 @@
|
|
||||||
#include "getopt.h"
|
|
||||||
|
|
||||||
|
|
||||||
-#ifdef HAVE_SIGSETJMP
|
|
||||||
+#ifdef HAVE_SIGLONGJMP
|
|
||||||
sigjmp_buf env;
|
|
||||||
#else
|
|
||||||
jmp_buf env;
|
|
||||||
@@ -219,7 +219,7 @@
|
|
||||||
reliable_signal (SIGHUP, signal_hup);
|
|
||||||
reliable_signal (SIGQUIT, SIG_IGN);
|
|
||||||
reliable_signal (SIGINT, signal_int);
|
|
||||||
-#ifdef HAVE_SIGSETJMP
|
|
||||||
+#ifdef HAVE_SIGLONGJMP
|
|
||||||
if (status = sigsetjmp (env, 1))
|
|
||||||
#else
|
|
||||||
if (status = setjmp (env))
|
|
||||||
--- signal.c
|
|
||||||
+++ signal.c
|
|
||||||
@@ -39,7 +39,7 @@
|
|
||||||
void (*hndlr) ();
|
|
||||||
{
|
|
||||||
#ifndef HAVE_SIGACTION
|
|
||||||
- signal (sno, hndlr);
|
|
||||||
+ return signal (sno, hndlr);
|
|
||||||
#else
|
|
||||||
struct sigaction sa, osa;
|
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
-#ifdef HAVE_SIGSETJMP
|
|
||||||
+#ifdef HAVE_SIGLONGJMP
|
|
||||||
extern sigjmp_buf env;
|
|
||||||
#else
|
|
||||||
extern jmp_buf env;
|
|
||||||
@@ -116,7 +116,7 @@
|
|
||||||
if (!sigactive)
|
|
||||||
quit (1);
|
|
||||||
sigflags &= ~(1 << (signo - 1));
|
|
||||||
-#ifdef HAVE_SIGSETJMP
|
|
||||||
+#ifdef HAVE_SIGLONGJMP
|
|
||||||
siglongjmp (env, -1);
|
|
||||||
#else
|
|
||||||
longjmp (env, -1);
|
|
Loading…
Reference in New Issue
Block a user