diff --git a/.efax.metadata b/.efax.metadata new file mode 100644 index 0000000..8921cd0 --- /dev/null +++ b/.efax.metadata @@ -0,0 +1 @@ +ec8090eb38a827c69d37bf97a3acdd581c2a5781 SOURCES/efax-0.9a-001114.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/efax-0.9-config.patch b/SOURCES/efax-0.9-config.patch new file mode 100644 index 0000000..a2a5834 --- /dev/null +++ b/SOURCES/efax-0.9-config.patch @@ -0,0 +1,67 @@ +--- efax-0.9/Makefile.config 1999-03-12 02:00:34.000000000 +0100 ++++ efax-0.9/Makefile 2002-06-18 12:43:34.000000000 +0200 +@@ -8,7 +8,7 @@ + # Compile/load options. Add -DNO_STRERROR to CFLAGS if _strerror + # is undefined + +-CFLAGS= ++CFLAGS= $(RPM_OPT_FLAGS) + LDFLAGS= + + # Change the following to the destination directories for +@@ -25,11 +25,9 @@ + + efax: efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o + $(CC) -o efax $(LDFLAGS) efax.o efaxlib.o efaxio.o efaxos.o efaxmsg.o +- strip efax + + efix: efix.o efaxlib.o efaxmsg.o + $(CC) -o efix $(LDFLAGS) efix.o efaxlib.o efaxmsg.o +- strip efix + + install: + cp fax efax efix $(BINDIR) +--- efax-0.9/fax.config 1999-03-24 09:07:28.000000000 +0100 ++++ efax-0.9/fax 2002-06-18 12:41:53.000000000 +0200 +@@ -17,9 +17,9 @@ + # The names of the fax script, efax and efix, including full path + # if necessary. + +-FAX=fax +-EFAX=efax +-EFIX=efix ++FAX=/usr/bin/fax ++EFAX=/usr/bin/efax ++EFIX=/usr/bin/efix + + # The device to which the fax modem is connected (e.g. ttya for + # /dev/ttya). Use a dial-out (cua) device if available. If +@@ -28,16 +28,16 @@ + # /dev/modem is a link to /dev/cua1, then getty, uucp, kermit, + # pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1. + +-DEV=cua1 ++DEV=modem + + # Your fax number in international format, 20 characters maximum. + # Use only digits, spaces, and the "+" character. + +-FROM="+1 800 555 5555" ++FROM="+0 000 000 0000" + + # Your name as it should appear on the page header. + +-NAME="Put Your Name Here" ++NAME="Put Your Name Here" + + # The preferred page size for creating and printing faxes. + # Allowed values are "letter", "legal", and "a4". +@@ -67,7 +67,7 @@ + # The name of the Ghostscript executable including full path if + # necessary. Only required if faxing Postscript files. + +-GS=gs ++GS=/usr/bin/gs + + # Dial string prefix and suffix such as T for tone dialing, P for + # pulse dialing, 9 to get an external line, commas for delays or diff --git a/SOURCES/efax-0.9-manpage.patch b/SOURCES/efax-0.9-manpage.patch new file mode 100644 index 0000000..9998c53 --- /dev/null +++ b/SOURCES/efax-0.9-manpage.patch @@ -0,0 +1,12 @@ +--- efax.1 2002/07/22 05:28:31 1.1 ++++ efax.1 2002/07/22 05:30:21 +@@ -791,8 +791,8 @@ + + efax will lock the modem device before opening it if one or more + UUCP lock file names are given with \fB-x\fP options. Most +-programs place their lock files in the \fR/usr/spool/uucp\fP or +-\fR/var/lock\fP directories and use the name \fRLCK..\fP\fIdev\fP ++programs place their lock files in the \fB/usr/spool/uucp\fP or ++\fB/var/lock\fP directories and use the name \fBLCK..\fP\fIdev\fP + where \fIdev\fP is the name of the device file in the /dev + directory that is to be locked. diff --git a/SOURCES/efax-0.9-misc.patch b/SOURCES/efax-0.9-misc.patch new file mode 100644 index 0000000..64029e9 --- /dev/null +++ b/SOURCES/efax-0.9-misc.patch @@ -0,0 +1,11 @@ +--- efax-0.9/efax.c.orig 2003-05-20 14:33:31.000000000 +0200 ++++ efax-0.9/efax.c 2003-05-20 14:32:51.000000000 +0200 +@@ -759,7 +759,7 @@ + c = tgetd ( f, TO_CHAR ) ; + + rd_state = ( rd_state & rd_allowed[c] ) ? +- ( ( rd_state & rd_nexts[c] ) ? rd_state <<= 1 : rd_state ) : ++ ( ( rd_state & rd_nexts[c] ) ? rd_state << 1 : rd_state ) : + RD_BEGIN ; + + if ( rd_state == RD_END ) diff --git a/SOURCES/efax-0.9-msg-va_list.patch b/SOURCES/efax-0.9-msg-va_list.patch new file mode 100644 index 0000000..18e6ae6 --- /dev/null +++ b/SOURCES/efax-0.9-msg-va_list.patch @@ -0,0 +1,11 @@ +--- efax-0.9/efaxmsg.c.ORIG 1999-03-19 22:38:20.000000000 -0600 ++++ efax-0.9/efaxmsg.c 2008-10-14 15:39:12.000000000 -0500 +@@ -142,6 +142,8 @@ int msg ( char *fmt, ... ) + logfile[i] ) ; + } + vfprintf( logfile[i], p, ap ) ; ++ va_end ( ap ); ++ va_start ( ap, fmt ); + if ( flags & S ) fprintf ( logfile[i], " %s", strerror ( errno ) ) ; + if ( ! ( flags & NOLF ) ) fputs ( "\n", logfile[i] ) ; + atcol1[i] = flags & NOLF ? 0 : 1 ; diff --git a/SOURCES/efax-0.9-nullptr.patch b/SOURCES/efax-0.9-nullptr.patch new file mode 100644 index 0000000..d98e68e --- /dev/null +++ b/SOURCES/efax-0.9-nullptr.patch @@ -0,0 +1,30 @@ +--- efax-0.9/efax.c.nullptr Sat Mar 27 09:24:10 1999 ++++ efax-0.9/efax.c Wed Jan 12 22:17:21 2000 +@@ -2186,6 +2186,7 @@ + + /* print initial message to both stderr & stdout */ + argv0 = argv[0] ; ++ memset((void *)lkfile, 0, sizeof(lkfile)); /* random effects on sparc linux */ + verb[1] = "ewia" ; + msg ( "I " Version " " Copyright ) ; + argv0 = efaxbasename ( argv0 ) ; +--- efax-0.9/efaxos.c.nullptr Tue Mar 2 01:18:30 1999 ++++ efax-0.9/efaxos.c Wed Jan 12 22:16:04 2000 +@@ -482,7 +482,7 @@ + { + int err = 0 ; + char **p = lkfiles ; +- while ( *p && ! err ) ++ while ( *p && **p && ! err ) + if ( ( err = ttlock ( *p++, log ) ) == 3 ) err = 0 ; + return err ; + } +@@ -495,7 +495,7 @@ + { + int err = 0, i ; + char **p = lkfiles ; +- while ( *p ) ++ while ( *p && **p ) + if ( ( i = ttunlock ( *p++ ) ) != 0 ) err = i ; + return err ; + } diff --git a/SOURCES/efax-0.9-numlines.patch b/SOURCES/efax-0.9-numlines.patch new file mode 100644 index 0000000..f66c43c --- /dev/null +++ b/SOURCES/efax-0.9-numlines.patch @@ -0,0 +1,28 @@ +This patch fixes the '-l' option in efix 0.3 which is part of efax 0.9. +Without this patch, lines on page 2 and subsequent are missing if the +specified number of lines per page is lower than the default (66). + + +diff -Naur efax-0.9-orig/efix.c efax-0.9/efix.c +--- efax-0.9-orig/efix.c Tue Mar 2 07:02:47 1999 ++++ efax-0.9/efix.c Fri Aug 25 00:34:18 2000 +@@ -297,6 +297,9 @@ + + if ( ! err && ! done ) { + ++ if ( pfont ) ifile.font = pfont ; ++ if ( pglines ) ifile.pglines = pglines ; ++ + if ( nxtoptind < argc ) { + ifnames = argv + nxtoptind ; + if ( argv [ argc ] ) { +@@ -307,9 +310,6 @@ + } else { + err = msg ( "E3 missing input file name" ) ; + } +- +- if ( pfont ) ifile.font = pfont ; +- if ( pglines ) ifile.pglines = pglines ; + + newIFILE ( &ovfile, ovfnames ) ; + diff --git a/SOURCES/efax-0.9-quote.patch b/SOURCES/efax-0.9-quote.patch new file mode 100644 index 0000000..732ebc1 --- /dev/null +++ b/SOURCES/efax-0.9-quote.patch @@ -0,0 +1,11 @@ +--- efax-0.9/fax.orig 2006-01-17 14:24:48.000000000 +0100 ++++ efax-0.9/fax 2006-01-17 14:28:40.000000000 +0100 +@@ -862,7 +862,7 @@ + esac + + DATE=`eval "$DATECMD"` +- eval HDR=\"$HDR\" ++ eval HDR=\""$HDR"\" + + $NICE $EFAX -v "$VERB" -v "$VERBLOG" \ + -d/dev/$DEV $LOCK $INIT $SPKR \ diff --git a/SOURCES/efax-0.9-viewcmd.patch b/SOURCES/efax-0.9-viewcmd.patch new file mode 100644 index 0000000..3fb90af --- /dev/null +++ b/SOURCES/efax-0.9-viewcmd.patch @@ -0,0 +1,19 @@ +--- efax-0.9/fax.orig 2005-10-10 11:05:57.000000000 +0200 ++++ efax-0.9/fax 2005-10-10 11:08:01.000000000 +0200 +@@ -60,9 +60,13 @@ + # The command to view a Portable Gray Map (PGM) image from the + # standard input. Typically "xv -" or "xloadimage stdin". + +-VIEWCMD="xloadimage stdin" # best +-# VIEWCMD="pnmtoxwd | xwud" # slower alternative +-# VIEWCMD="xv -" # much slower alternative ++VIEWCMD="pnmtoxwd | xwud" ++if [ -x /usr/bin/display ] ; then ++ VIEWCMD="display -" ++elif [ -x /usr/bin/xloadimage -o -x /usr/X11R6/bin/xloadimage ] ; then ++ VIEWCMD="xloadimage stdin" # best ++fi ++# VIEWCMD="xv -" # much slower alternative + + # The name of the Ghostscript executable including full path if + # necessary. Only required if faxing Postscript files. diff --git a/SOURCES/efax-0.9a-001114-crash.patch b/SOURCES/efax-0.9a-001114-crash.patch new file mode 100644 index 0000000..89026b0 --- /dev/null +++ b/SOURCES/efax-0.9a-001114-crash.patch @@ -0,0 +1,13 @@ +diff -up efax-0.9a-001114/efix.c.orig efax-0.9a-001114/efix.c +--- efax-0.9a-001114/efix.c.orig 2009-09-07 15:55:23.000000000 +0200 ++++ efax-0.9a-001114/efix.c 2009-09-07 15:56:34.000000000 +0200 +@@ -235,7 +235,8 @@ int main( int argc, char **argv) + float /* values used: */ + xres = 0, yres = 0, xsz = 0, ysz = 0 ; + +- IFILE ifile, ovfile ; ++ IFILE ifile = { 0 }; ++ IFILE ovfile = { 0 }; + OFILE ofile ; + + char **ifnames, *ovfnames [ 2 ] = { 0, 0 } ; diff --git a/SOURCES/efax08a-time.patch b/SOURCES/efax08a-time.patch new file mode 100644 index 0000000..440e59a --- /dev/null +++ b/SOURCES/efax08a-time.patch @@ -0,0 +1,10 @@ +--- efax08a/efaxio.c.ewt Thu Dec 1 21:26:31 2016 ++++ efax08a/efaxio.c Thu Dec 1 21:26:31 2016 +@@ -2,6 +2,7 @@ + #include + #include + #include ++#include + + #include "efaxio.h" /* EFAX */ + #include "efaxmsg.h" diff --git a/SOURCES/logrotate-efax b/SOURCES/logrotate-efax new file mode 100644 index 0000000..bb1e95f --- /dev/null +++ b/SOURCES/logrotate-efax @@ -0,0 +1,5 @@ +/var/log/fax/* { + weekly + notifempty + missingok +} diff --git a/SPECS/efax.spec b/SPECS/efax.spec new file mode 100644 index 0000000..7296750 --- /dev/null +++ b/SPECS/efax.spec @@ -0,0 +1,229 @@ +Summary: A program for faxing using a Class 1, 2 or 2.0 fax modem +Name: efax +Version: 0.9a +Release: 14.001114%{?dist} +License: GPLv2+ +Group: Applications/Communications +Url: http://www.cce.com/efax/ +Source: http://www.cce.com/efax/download/%{name}-%{version}-001114.tar.gz +Source1: logrotate-efax +Patch0: efax-0.9-config.patch +Patch1: efax-0.9-numlines.patch +Patch2: efax08a-time.patch +Patch3: efax-0.9-manpage.patch +Patch5: efax-0.9-nullptr.patch +Patch6: efax-0.9-misc.patch +Patch7: efax-0.9-viewcmd.patch +Patch8: efax-0.9-quote.patch +Patch9: efax-0.9-msg-va_list.patch +Patch10: efax-0.9a-001114-crash.patch + +ExcludeArch: s390 s390x +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: make +Requires: netpbm-progs + +%description +Efax is a small ANSI C/POSIX program that sends and receives faxes +using any Class 1, 2 or 2.0 fax modem. + +You need to install efax if you want to send faxes and you have a +Class 1, 2 or 2.0 fax modem. + +%prep +%setup -q -n %{name}-%{version}-001114 + +%patch0 -p1 -b .config +%patch1 -p1 -b .numlines +%patch2 -p1 -b .time +%patch3 -p0 -b .manpage +%patch5 -p1 -b .nullptr +%patch6 -p1 -b .misc +%patch7 -p1 -b .viewcmd +%patch8 -p1 -b .quote +%patch9 -p1 -b .msg-va_list +%patch10 -p1 -b .crash + +%build +make %{?_smp_mflags} RPM_OPT_FLAGS="-ansi $RPM_OPT_FLAGS -fno-strict-aliasing" + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}%{_mandir}/man1 +mkdir -p %{buildroot}%{_localstatedir}/spool/fax +mkdir -p %{buildroot}%{_localstatedir}/log/fax + +make BINDIR=%{buildroot}%{_bindir} MANDIR=%{buildroot}%{_mandir} install +mkdir -p %{buildroot}/etc/logrotate.d/ +install -c -m 644 %{SOURCE1} %{buildroot}/etc/logrotate.d/efax + +%clean +rm -rf %{buildroot} + +%files +%defattr(-, root, root, -) +%doc README COPYING +%config(noreplace) /etc/logrotate.d/efax +%{_bindir}/* +%{_mandir}/*/* +%dir %{_localstatedir}/spool/fax +%dir %{_localstatedir}/log/fax + +%changelog +* Wed Mar 06 2013 Than Ngo - 0.9a-14.001114 +- add -fno-strict-aliasing into RPM_OPT_FLAGS + +* Wed Feb 13 2013 Fedora Release Engineering - 0.9a-13.001114 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Nov 22 2012 Than Ngo - 0.9a-12.001114 +- drop Red Hat trademarks + +* Wed Jul 18 2012 Fedora Release Engineering - 0.9a-11.001114 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jan 13 2012 Fedora Release Engineering - 0.9a-10.001114 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 0.9a-9.001114 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Sep 29 2010 Than Ngo - 0.9a-8.001114 +- bz#225719, review + +* Mon Dec 07 2009 Than Ngo - 0.9a-7.001114 +- fix url + +* Mon Sep 07 2009 Than Ngo - 0.9a-6.001114 +- fix a crash in efix + +* Fri Jul 24 2009 Fedora Release Engineering - 0.9a-5.001114 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 0.9a-4.001114 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Oct 24 2008 Than Ngo 0.9a-3.001114 +- fix efax segfaults while sending fax, thanks to Jeff Bastian + +* Thu Jul 17 2008 Tom "spot" Callaway 0.9a-2.001114 +- fix license tag + +* Fri Feb 15 2008 Than Ngo 0.9a-1.001114 +- 0.9a-001114 + +* Wed Jul 12 2006 Jesse Keating - 0.9-27.2.1 +- rebuild + +* Fri Feb 10 2006 Jesse Keating - 0.9-27.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 0.9-27.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Tue Jan 17 2006 Than Ngo 0.9-27 +- apply patch to fix #177892 + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Wed Nov 23 2005 Than Ngo 0.9-26 +- fix for modular X #173707 + +* Mon Oct 10 2005 Than Ngo 0.9-25 +- use pnmtoxwd instead xloadimage which is not in the core anymore #169413 + +* Sat Mar 05 2005 Than Ngo 0.9-24 +- rebuilt + +* Wed Feb 09 2005 Than Ngo 0.9-23 +- rebuilt + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Tue May 20 2003 Than Ngo 0.9-19 +- fix bug #79635 + +* Wed Nov 20 2002 Florian La Roche +- do not build on mainframe + +* Wed Aug 7 2002 Than Ngo 0.9-16 +- Fixed a bug in manpage (bug #70935) + +* Fri Jun 21 2002 Tim Powers +- automated rebuild +- Copyright->License + +* Tue Jun 18 2002 Than Ngo 0.9-14 +- don't forcibly strip binaries +- add valid Url + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Tue Feb 26 2002 Than Ngo 0.9-12 +- rebuild in new enviroment + +* Wed Jan 09 2002 Tim Powers +- automated rebuild + +* Sun Jun 24 2001 Elliot Lee +- Bump release + rebuild. + +* Wed Aug 30 2000 Preston Brown +- fix -l option for efix (#16898) + +* Wed Jul 12 2000 Prospector +- automatic rebuild + +* Mon Jun 12 2000 Preston Brown +- FHS paths + +* Thu May 11 2000 Nalin Dahyabhai +- add dependency on make (bug #11268) + +* Thu Feb 03 2000 Preston Brown +- add /var/spool/fax and /var/log/fax +- /usr/bin/fax not a config file. Use .efaxrc instead. + +* Wed Feb 02 2000 Cristian Gafton +- fix description. Oops about the last one. + +* Wed Jan 12 2000 Preston Brown +- no you didn't Cristian. You said you did but didn't. :) I did. Now. + +* Tue Jun 29 1999 Cristian Gafton +- updated to 0.9 (#3808) + +* 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. + +* Tue Feb 02 1999 Preston Brown +- patch to fix null ptr dereference +- added -ansi flag; fixes efix problem (produced bad tiff files) + +* Fri Dec 18 1998 Preston Brown +- bumped spec number for initial rh 6.0 build + +* Tue Aug 11 1998 Jeff Johnson +- build root + +* Mon Apr 27 1998 Prospector System +- translations modified for de, fr, tr + +* Wed Oct 22 1997 Michael Fulbright +- cleaned spec file to new standard, confirmed package is up to date + +* Tue Mar 25 1997 Erik Troan +- Added efax-08a-64bit.patch from David Mosberger