diff --git a/CHANGES b/CHANGES index 9796e57..b74f66b 100644 --- a/CHANGES +++ b/CHANGES @@ -50,6 +50,9 @@ Features: Red Hat issue 1853102 related. Thanks to Jonathan Casiot for sending an initial patch. + Socat now installs as socat1 and is referenced by symbolic link socat, + same with man page (socat1.1 by socat.1) + Corrections: When a sub process (EXEC, SYSTEM) terminated with exit code other than 0, its last sent data might have been lost depending on timing of read/ diff --git a/Makefile.in b/Makefile.in index 55dd355..aa17fa2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -124,17 +124,21 @@ strip: progs install: progs $(srcdir)/doc/socat.1 mkdir -p $(DESTDIR)$(BINDEST) - $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST) + $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST)/socat1 + ln -s socat1 $(DESTDIR)$(BINDEST)/socat $(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST) $(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST) mkdir -p $(DESTDIR)$(MANDEST)/man1 - $(INSTALL) -m 644 $(srcdir)/doc/socat.1 $(DESTDIR)$(MANDEST)/man1/ + $(INSTALL) -m 644 $(srcdir)/doc/socat.1 $(DESTDIR)$(MANDEST)/man1/socat1.1 + ln -s socat1.1 $(DESTDIR)$(MANDEST)/man1/socat.1 uninstall: rm -f $(DESTDIR)$(BINDEST)/socat + rm -f $(DESTDIR)$(BINDEST)/socat1 rm -f $(DESTDIR)$(BINDEST)/procan rm -f $(DESTDIR)$(BINDEST)/filan rm -f $(DESTDIR)$(MANDEST)/man1/socat.1 + rm -f $(DESTDIR)$(MANDEST)/man1/socat1.1 # make a GNU-zipped tar ball of the source files dist: socat.tar.gz socat.tar.bz2 diff --git a/socat.spec b/socat.spec index b5084b2..90f7309 100644 --- a/socat.spec +++ b/socat.spec @@ -38,6 +38,8 @@ mkdir -p $RPM_BUILD_ROOT%{_bindir} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 make install DESTDIR=$RPM_BUILD_ROOT +mv $RPM_BUILD_ROOT%{_bindir}/socat $RPM_BUILD_ROOT%{_bindir}/socat1 +mv $RPM_BUILD_ROOT%{_mandir}/man1/socat.1 $RPM_BUILD_ROOT%{_mandir}/man1/socat1.1 %clean rm -rf $RPM_BUILD_ROOT @@ -46,7 +48,15 @@ rm -rf $RPM_BUILD_ROOT %defattr(-,root,root) %doc README CHANGES EXAMPLES SECURITY doc/socat.html FAQ BUGREPORTS %doc COPYING COPYING.OpenSSL FILES PORTING DEVELOPMENT -%{_bindir}/socat +%{_bindir}/socat1 %{_bindir}/procan %{_bindir}/filan -%{_mandir}/man1/socat.1* +%{_mandir}/man1/socat1.1 + +%post +ln -s -f socat1 %{_binddir}/socat +ln -s -f socat1.1 %{_mandir}/man1/socat.1 + +%postun +rm -f %{_bindir}/socat +rm -f %{_mandir}/man1/socat.1