jskarvad pushed to fbb (f22). "Initial import (#1214834)"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri May 15 12:30:22 UTC 2015


From 5723a6ab681ccc837a00fc16035c94a0b885c383 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad at redhat.com>
Date: Fri, 15 May 2015 14:19:55 +0200
Subject: Initial import (#1214834)


diff --git a/.gitignore b/.gitignore
index e69de29..7028784 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/fbb-7.0.8-beta.tar.bz2
diff --git a/epurmess.ini b/epurmess.ini
new file mode 100644
index 0000000..5366b9a
--- /dev/null
+++ b/epurmess.ini
@@ -0,0 +1,88 @@
+#
+# Parameters for messages processing
+#
+# This file is in $CONFDIR
+#
+# Messages directory
+$DATADIR/mail/
+#
+# Compressed messages directory
+$DATADIR/binmail/
+#
+# Archive messages directory
+$DATADIR/oldmail/
+#
+# DIRMES.SYS file
+$DATADIR/dirmes.sys
+#
+# DIRMES.OLD file name
+$DATADIR/dirmes.old
+#
+# DIRMES.NEW file name
+$DATADIR/dirmes.new
+#
+# Report file name
+$DATADIR/epurmess.res
+#
+# Priv Bull (0=erased 1=archived)"
+  1        0
+#
+# Cleaning parameters for private mail (in days)
+#
+# PN -> PX
+60
+#
+# PY -> PX
+5
+#
+# PF -> PK
+1
+#
+# PX -> PK
+2
+#
+# PK -> PA
+2
+#
+# Cleaning parameters for bulletins (in days)
+#
+# BN -> BX
+7
+#
+# B$ -> BX
+7
+#
+# BY -> BX
+7
+#
+# BX -> BK
+4
+#
+# BF -> BX
+7
+#
+# BK -> BA
+1
+#
+# Automatic messages for not-forwarded messages. Days = 0 disables the message.
+# 255 characters maximum for the line.
+#
+# Private messages returned : Timeout link default. (Days + text, $W=new line).
+30 Sorry, the following message could not be routed due to link default.$WSuite a un probleme de reseau, le message suivant n'a pas pu etre achemine.$W
+#
+# Private messages returned : Unknown route. (Days + text, $W=new line).
+2 No defined route for the following message. Please check the h-address.$WPas de route connue pour le messsage suivant. Verifiez l'adresse hierarchique.$W
+#
+# Nb of lines max in a returned message
+10
+#
+------
+#
+# Special tests :
+#
+# Type To  Number_of_days
+  @  ALL    1
+  >  ALL    1
+#
+# End of file
+#
diff --git a/fbb-7.0.8-beta-ncurses-fix.patch b/fbb-7.0.8-beta-ncurses-fix.patch
new file mode 100644
index 0000000..229f587
--- /dev/null
+++ b/fbb-7.0.8-beta-ncurses-fix.patch
@@ -0,0 +1,68 @@
+diff --git a/src/xfbbC.c b/src/xfbbC.c
+index 1276d0a..564bd12 100644
+--- a/src/xfbbC.c
++++ b/src/xfbbC.c
+@@ -406,8 +406,8 @@ int main (int ac, char *av[])
+ 	else
+ 	{
+ 		sprintf(buffer, " xfbbC V%s (%s) -  Callsign : %s  -  Remote host : %s", VERSION, __DATE__, mycall, host);
+-#ifdef HAVE_NCURSES
++#ifdef HAVE_CURSES
+ 	if (use_curses)
+ 		init_terminal(mode, buffer);
+ 	else
+ #endif
+@@ -434,7 +431,7 @@ printf("%s\n", "no initterminal");
+ 
+ 		if (FD_ISSET (STDIN_FILENO, &sock_read))
+ 		{
+-#ifdef HAVE_NCURSES
++#ifdef HAVE_CURSES
+ 			if (use_curses)
+ 				nb = read_terminal(buffer, BUFFSIZE);
+ 			else
+@@ -446,7 +443,7 @@ printf("%s\n", "no initterminal");
+ 					perror ("read");
+ 					break;
+ 				}
+-#ifdef HAVE_NCURSES
++#ifdef HAVE_CURSES
+ 			}
+ #endif
+ 			nb = write (sock, buffer, nb);
+@@ -489,7 +486,7 @@ printf("%s\n", "no initterminal");
+ 				if (nb == 0)
+ 				{
+ 					printf ("Connection closed. Terminating\n");
+-#ifdef HAVE_NCURSES
++#ifdef HAVE_CURSES
+ 					if (use_curses)
+ 						end_terminal();
+ #endif
+@@ -517,7 +514,7 @@ printf("%s\n", "no initterminal");
+ 				if (nb == 0)
+ 				{
+ 					printf ("Connection closed. Terminating\n");
+-#ifdef HAVE_NCURSES
++#ifdef HAVE_CURSES
+ 					if (use_curses)
+ 						end_terminal();
+ #endif
+@@ -545,7 +542,7 @@ printf("%s\n", "no initterminal");
+ 						ptr = buffer + 3;
+ 						if (filter)
+ 							total = do_filter (ptr, total);
+-#ifdef HAVE_NCURSES
++#ifdef HAVE_CURSES
+ 						if (use_curses)
+ 							write_terminal(ptr, total);
+ 						else
+@@ -656,7 +653,7 @@ printf("%s\n", "no initterminal");
+ 
+ 	close (sock);
+ 	free (buffer);
+-#ifdef HAVE_NCURSES
++#ifdef HAVE_CURSES
+ 	if (use_curses)
+ 		end_terminal();
+ #endif
diff --git a/fbb-7.0.8-beta-non-interactive.patch b/fbb-7.0.8-beta-non-interactive.patch
new file mode 100644
index 0000000..2fcd10c
--- /dev/null
+++ b/fbb-7.0.8-beta-non-interactive.patch
@@ -0,0 +1,130 @@
+diff --git a/man/xfbbd.8 b/man/xfbbd.8
+index b6db443..654cbe0 100644
+--- a/man/xfbbd.8
++++ b/man/xfbbd.8
+@@ -23,6 +23,9 @@ configuration files without actually starting the daemon.
+ .TP
+ .B \-n
+ Don't start communication socket for the console.
++.TP
++.B \-N
++Non-interactive mode. Answer YES to all questions.
+ 
+ 
+ 
+diff --git a/scripts/fbb.in b/scripts/fbb.in
+index 628c6f1..aeb3a63 100644
+--- a/scripts/fbb.in
++++ b/scripts/fbb.in
+@@ -386,7 +386,7 @@ fbb_conf()
+ 	echo "Checking fbb configuration :"
+ 	if [ -x $FBB ] ; then
+ 		cd $FBBDIR
+-		$FBB -i
++		$FBB -i $FBB_PARAM_NI
+ 		if [ $? -ne 2 ] ; then
+ 			echo "Configuration error ! Giving up."
+ 			echo "Please read file @localstatedir@/lib/fbb/ERROR.SYS"
+@@ -449,7 +449,7 @@ fbb_loop()
+ 
+ 		cd $FBBDIR
+ 
+-		$FBB $FBB_PARAM &
++		$FBB $FBB_PARAM $FBB_PARAM_NI &
+ 		wait $!
+ 
+ 		fbb_return $?
+@@ -531,26 +531,43 @@ fbb_opt()
+ 
+ LOCALDIR=`pwd`
+ 
++[ "$NON_INTERACTIVE" = 1 ] && FBB_PARAM_NI="-N"
++
+ # Looking for 7.06 & 7.05 fbb.conf locations
+ if [ ! -f $FBBCONF/fbb.conf ] ; then
+ 	cd $FBBCONF
+ 	cd ../
+ 	if [ -f fbb.conf ] ; then
+-	cp fbb.conf $FBBCONF
++		cp fbb.conf $FBBCONF
+ 	else
+-	get_fbb_conf
++		if [ "$NON_INTERACTIVE" = 1 ]; then
++			echo "Configuration file '$FBBCONF/fbb.conf' not found."
++			exit 1
++		else
++			get_fbb_conf
++		fi
+ 	fi
+ fi
+ 
+ # Check if exists epurmess.ini file. If not create it
+ if [ ! -f $FBBCONF/epurmess.ini ] ; then
+-	if replace $CONFDIR/epurmess.ini ; then
+-		make_epurmess_ini > $CONFDIR/epurmess.ini
++	if [ "$NON_INTERACTIVE" = 1 ]; then
++		echo "Configuration file '$FBBCONF/epurmess.ini' not found."
++		exit 1
++	else
++		if replace $CONFDIR/epurmess.ini ; then
++			make_epurmess_ini > $CONFDIR/epurmess.ini
++		fi
+ 	fi
+ fi
+ 
+ if [ ! -f $FBBCONF/port.sys ] ; then
+-	get_fbb_port
++	if [ "$NON_INTERACTIVE" = 1 ]; then
++		echo "Configuration file '$FBBCONF/port.sys' not found."
++		exit 1
++	else
++		get_fbb_port
++	fi
+ fi
+ 
+ fbb_opt $*
+diff --git a/src/xfbbd.c b/src/xfbbd.c
+index 3f24246..eee85a9 100644
+--- a/src/xfbbd.c
++++ b/src/xfbbd.c
+@@ -44,6 +44,7 @@
+ static int verbose = 0;
+ static int init_phase = 1;
+ static int info_canal = -1;
++static int non_interactive = 0;
+ 
+ static void sig_fct (int sig)
+ {
+@@ -201,7 +202,7 @@ int main (int ac, char **av)
+ 	{
+ 		if (strcmp (av[ng], "-h") == 0)
+ 		{
+-			fprintf (stderr, "usage : xfbbd [-v] [-p port | -s service]\n");
++			fprintf (stderr, "usage : xfbbd [-v] [-p port | -s service] [-N]\n");
+ 			return (0);
+ 		}
+ 		else if (strcmp (av[ng], "-V") == 0)
+@@ -236,6 +237,10 @@ int main (int ac, char **av)
+ 		{
+ 			orb = 0;
+ 		}
++		else if (strcmp (av[ng], "-N") == 0)
++		{
++			non_interactive = 1;
++		}
+ 	}
+ 
+ 	banner ();
+@@ -1028,6 +1033,12 @@ int sel_option (char *texte, int *val)
+ {
+ 	char str[256];
+ 
++	if (non_interactive)
++	{
++		*val = 'y';
++		return 1;
++	}
++
+ 	for (;;)
+ 	{
+ 		fprintf (stderr, "%s (Y/N) ? ", texte);
diff --git a/fbb-7.0.8-beta-sample-conf.patch b/fbb-7.0.8-beta-sample-conf.patch
new file mode 100644
index 0000000..b609b03
--- /dev/null
+++ b/fbb-7.0.8-beta-sample-conf.patch
@@ -0,0 +1,52 @@
+diff --git a/doc/fbb.conf.sample.in b/doc/fbb.conf.sample.in
+index 83e1c4f..945c4da 100644
+--- a/doc/fbb.conf.sample.in
++++ b/doc/fbb.conf.sample.in
+@@ -15,22 +15,27 @@
+ version = FBB at package_version@
+ 
+ # Callsign of BBS with hierarchical information
+-callsign = F6FBB.FMLR.FRA.EU
++# callsign = F6FBB.FMLR.FRA.EU
++callsign =
+ 
+ # SSID of BBS
+ ssid = 1
+ 
+ # Qra Locator of BBS
+-qraloc = JN03QL
++# qraloc = JN03QL
++qraloc =
+ 
+ # Qth of BBS
+-city = Toulouse
++# city = Toulouse
++city =
+ 
+ # First name of SYSOP
+-name = Jean-Paul
++# name = Jean-Paul
++name =
+ 
+ # Callsign of SYSOP
+-sysop = F6FBB
++# sysop = F6FBB
++sysop =
+ 
+ ##################################################################
+ 
+@@ -39,10 +44,12 @@ sysop = F6FBB
+ #
+ 
+ # Callsign (and route if needed) that will have copy of SYSOP messages
+-sysmail = F6XXX F5XXX at F6XXX.FMLR.FRA.EU
++# sysmail = F6XXX F5XXX at F6XXX.FMLR.FRA.EU
++sysmail =
+ 
+ # Line to send WP messages
+-wpcalls = F1XXX
++# wpcalls = F1XXX
++wpcalls =
+ 
+ # BBS-UP batch or program
+ upbatch =
diff --git a/fbb-7.0.8-beta-stdout.patch b/fbb-7.0.8-beta-stdout.patch
new file mode 100644
index 0000000..bb0bf3b
--- /dev/null
+++ b/fbb-7.0.8-beta-stdout.patch
@@ -0,0 +1,31 @@
+diff --git a/scripts/fbb.in b/scripts/fbb.in
+index aeb3a63..385604e 100644
+--- a/scripts/fbb.in
++++ b/scripts/fbb.in
+@@ -471,14 +471,24 @@ fbb_run()
+ 		echo "Running XFBB in foreground mode ^C to abort"
+ 		sleep 5
+ 		echo "Starting XFBB (pwd = `pwd`)..."
+-		fbb_loop > $FBBLOG 2>&1
++		if [ "$FBBLOG" = - ] ; then
++			fbb_loop
++		else
++			fbb_loop > $FBBLOG 2>&1
++		fi
+ 	else
+ 		echo "Running XFBB in background mode ^C to abort"
+ 		sleep 5
+ 		FBB_BACKGROUND=1
+ 		export FBB_BACKGROUND
+ 		echo "Starting XFBB (pwd = `pwd`)..."
+-		(cd $LOCALDIR ; $MY_SHELL $FBB_PARAM > $FBBLOG 2>&1 & )
++		pushd $LOCALDIR
++		if [ "$FBBLOG" = - ]; then
++			$MY_SHELL $FBB_PARAM &
++		else
++			$MY_SHELL $FBB_PARAM > $FBBLOG 2>&1 &
++		fi
++		popd
+ 		exit 0
+ 	fi
+ }
diff --git a/fbb-7.0.8-beta-var-lib.patch b/fbb-7.0.8-beta-var-lib.patch
new file mode 100644
index 0000000..60d8ea7
--- /dev/null
+++ b/fbb-7.0.8-beta-var-lib.patch
@@ -0,0 +1,275 @@
+diff --git a/Makefile.am b/Makefile.am
+index 29b49d0..724e466 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -17,21 +17,21 @@ install-data-hook:
+ 	$(mkinstalldirs) $(DESTDIR)$(pkglibdir)/script/stop_system
+ 	$(mkinstalldirs) $(DESTDIR)$(pkglibdir)/script/sig_segv
+ 	$(mkinstalldirs) $(DESTDIR)$(pkglibdir)/script/reset
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/log
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/oldmail
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/sat
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/wp
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/fbbdos
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/fbbdos/yapp
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/fbbdos/readonly
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/mail
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/log
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/oldmail
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/sat
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/wp
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/fbbdos
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/fbbdos/yapp
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/fbbdos/readonly
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/mail
+ 	for n in 0 1 2 3 4 5 6 7 8 9; do \
+-	  $(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/mail/mail$$n; \
++	  $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/mail/mail$$n; \
+ 	done
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/binmail
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/binmail
+ 	for n in 0 1 2 3 4 5 6 7 8 9; do \
+-	  $(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/binmail/mail$$n; \
++	  $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/binmail/mail$$n; \
+ 	done
+ 	@echo
+ 	@echo " *** Read the \'README' if you haven't already done so!"
+diff --git a/Makefile.in b/Makefile.in
+index 977d9a5..b057159 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -785,21 +785,21 @@ install-data-hook:
+ 	$(mkinstalldirs) $(DESTDIR)$(pkglibdir)/script/stop_system
+ 	$(mkinstalldirs) $(DESTDIR)$(pkglibdir)/script/sig_segv
+ 	$(mkinstalldirs) $(DESTDIR)$(pkglibdir)/script/reset
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/log
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/oldmail
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/sat
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/wp
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/fbbdos
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/fbbdos/yapp
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/fbbdos/readonly
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/mail
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/log
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/oldmail
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/sat
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/wp
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/fbbdos
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/fbbdos/yapp
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/fbbdos/readonly
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/mail
+ 	for n in 0 1 2 3 4 5 6 7 8 9; do \
+-	  $(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/mail/mail$$n; \
++	  $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/mail/mail$$n; \
+ 	done
+-	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/binmail
++	$(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/binmail
+ 	for n in 0 1 2 3 4 5 6 7 8 9; do \
+-	  $(mkinstalldirs) $(DESTDIR)$(localstatedir)/ax25/fbb/binmail/mail$$n; \
++	  $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/fbb/binmail/mail$$n; \
+ 	done
+ 	@echo
+ 	@echo " *** Read the \'README' if you haven't already done so!"
+diff --git a/doc/fbb.conf.sample.in b/doc/fbb.conf.sample.in
+index 75fe821..945c4da 100644
+--- a/doc/fbb.conf.sample.in
++++ b/doc/fbb.conf.sample.in
+@@ -73,25 +73,25 @@ server = REQDIR  reqdir     Directory request
+ #
+ 
+ # Directory of data files
+-data = @localstatedir@/ax25/fbb
++data = @localstatedir@/lib/fbb
+ 
+ # Directory of config files
+ config = @sysconfdir@/ax25/fbb
+ 
+ # Directory of message files
+-messages = @localstatedir@/ax25/fbb/mail
++messages = @localstatedir@/lib/fbb/mail
+ 
+ # Directory of compressed files
+-compressed = @localstatedir@/ax25/fbb/binmail
++compressed = @localstatedir@/lib/fbb/binmail
+ 
+ # Directory of users
+-fbbdos = *,*, at localstatedir@/ax25/fbb/fbbdos,*,*,*,*,*
++fbbdos = *,*, at localstatedir@/lib/fbb/fbbdos,*,*,*,*,*
+ 
+ # Directory of YAPP files
+-yapp = @localstatedir@/ax25/fbb/fbbdos/yapp
++yapp = @localstatedir@/lib/fbb/fbbdos/yapp
+ 
+ # Directory of documentation files
+-docs = @localstatedir@/ax25/fbb/docs
++docs = @localstatedir@/lib/fbb/docs
+ 
+ # Directory of the pg programs
+ pg = @libdir@/fbb/pg
+@@ -106,7 +106,7 @@ sdir = @libdir@/fbb/server
+ tdir = @libdir@/fbb/tool
+ 
+ # Path and filename for import file
+-import = @localstatedir@/ax25/fbb/mail/mail.in
++import = @localstatedir@/lib/fbb/mail/mail.in
+ 
+ # Full log
+ logs = OK
+diff --git a/doc/satdoc-e.doc b/doc/satdoc-e.doc
+index 1813e57..2ff0b28 100644
+--- a/doc/satdoc-e.doc
++++ b/doc/satdoc-e.doc
+@@ -63,7 +63,7 @@ A AMSAT
+    G KEPLER
+    G AMSAT
+    P @
+-   c /usr/local/var/ax25/fbb/sat/amsat.txt
++   c /var/lib/fbb/sat/amsat.txt
+    B AMSAT
+    F AMSAT
+    F KEP
+diff --git a/doc/satdoc-f.doc b/doc/satdoc-f.doc
+index 589d364..bda4da2 100644
+--- a/doc/satdoc-f.doc
++++ b/doc/satdoc-f.doc
+@@ -69,7 +69,7 @@ A AMSAT
+    G KEPLER
+    G AMSAT
+    P @
+-   c /usr/local/var/ax25/fbb/sat/amsat.txt
++   c /var/lib/fbb/sat/amsat.txt
+    B AMSAT
+    F AMSAT
+    F KEP
+diff --git a/etc/amsat.fwd.in b/etc/amsat.fwd.in
+index 69a2061..0d7f883 100644
+--- a/etc/amsat.fwd.in
++++ b/etc/amsat.fwd.in
+@@ -2,7 +2,7 @@ A AMSAT
+ #
+   P @
+ #
+-  c @localstatedir@/ax25/fbb/sat/amsat.txt
++  c @localstatedir@/lib/fbb/sat/amsat.txt
+ #
+   B SAT
+   F SAT
+diff --git a/etc/fbbopt.conf.in b/etc/fbbopt.conf.in
+index aefefed..48545c8 100644
+--- a/etc/fbbopt.conf.in
++++ b/etc/fbbopt.conf.in
+@@ -33,22 +33,22 @@ server = REQDIR  reqdir     Directory request
+ #
+ 
+ # Directory of data files
+-data = @localstatedir@/ax25/fbb
++data = @localstatedir@/lib/fbb
+ 
+ # Directory of config files
+-config = @sysconfdir@/ax25/fbb
++config = @sysconfdir@/lib/fbb
+ 
+ # Directory of message files
+-messages = @localstatedir@/ax25/fbb/mail
++messages = @localstatedir@/lib/fbb/mail
+ 
+ # Directory of compressed files
+-compressed = @localstatedir@/ax25/fbb/binmail
++compressed = @localstatedir@/lib/fbb/binmail
+ 
+ # Directory of users
+-fbbdos = *,*, at localstatedir@/ax25/fbb/fbbdos,*,*,*,*,*
++fbbdos = *,*, at localstatedir@/lib/fbb/fbbdos,*,*,*,*,*
+ 
+ # Directory of YAPP files
+-yapp = @localstatedir@/ax25/fbb/fbbdos/yapp
++yapp = @localstatedir@/lib/fbb/fbbdos/yapp
+ 
+ # Directory of documentation files
+ docs = @docdir@
+@@ -66,7 +66,7 @@ sdir = @libdir@/fbb/server
+ tdir = @libdir@/fbb/tool
+ 
+ # Path and filename for import file
+-import = @localstatedir@/ax25/fbb/mail/mail.in
++import = @localstatedir@/lib/fbb/mail/mail.in
+ 
+ # Full log
+ logs = OK
+diff --git a/etc/protect.sys.in b/etc/protect.sys.in
+index 41edee7..2bb3d6c 100644
+--- a/etc/protect.sys.in
++++ b/etc/protect.sys.in
+@@ -10,6 +10,6 @@
+ # path MUST be LINUX ABSOLUTE path (starting with a "/")
+ #
+ 
+- at localstatedir@/ax25/fbb/fbbdos/readonly
++ at localstatedir@/lib/fbb/fbbdos/readonly
+ 
+ 
+diff --git a/scripts/20_epursat.in b/scripts/20_epursat.in
+index 2b3df41..8fef112 100644
+--- a/scripts/20_epursat.in
++++ b/scripts/20_epursat.in
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ BINDIR=@sbindir@
+-DATADIR=@localstatedir@/ax25/fbb
++DATADIR=@localstatedir@/lib/fbb
+ echo
+ echo "--- Running satdoc & satupdat"
+ echo
+diff --git a/scripts/fbb.in b/scripts/fbb.in
+index 71ee383..628c6f1 100644
+--- a/scripts/fbb.in
++++ b/scripts/fbb.in
+@@ -1,8 +1,8 @@
+ #!/bin/sh
+ FBBCONF=@sysconfdir@/ax25/fbb
+ CONFDIR=@sysconfdir@/ax25/fbb
+-DATADIR=@localstatedir@/ax25/fbb
+-FBBDIR=@localstatedir@/ax25/fbb
++DATADIR=@localstatedir@/lib/fbb
++FBBDIR=@localstatedir@/lib/fbb
+ LIBDIR=@libdir@/fbb
+ SBINDIR=@sbindir@
+ DOCDIR=@docdir@
+@@ -389,7 +389,7 @@ fbb_conf()
+ 		$FBB -i
+ 		if [ $? -ne 2 ] ; then
+ 			echo "Configuration error ! Giving up."
+-			echo "Please read file @localstatedir@/ax25/fbb/ERROR.SYS"
++			echo "Please read file @localstatedir@/lib/fbb/ERROR.SYS"
+ 			exit 1
+ 		fi
+ 	else
+diff --git a/src/fbb_conf.c.in b/src/fbb_conf.c.in
+index f1419c3..7b5e7c2 100644
+--- a/src/fbb_conf.c.in
++++ b/src/fbb_conf.c.in
+@@ -36,14 +36,14 @@
+ 
+ static char *defstr[] = {
+ 	"conf",	"@sysconfdir@/ax25/fbb",
+-	"data",	"@localstatedir@/ax25/fbb",
+-	"mess",	"@localstatedir@/ax25/fbb/mail",
+-	"comp",	"@localstatedir@/ax25/fbb/binmail",
+-	"fbbd",	"*,*, at localstatedir@/ax25/fbb/fbbdos,*,*,*,*,*",
+-	"yapp",	"@localstatedir@/ax25/fbb/fbbdos/yapp",
++	"data",	"@localstatedir@/lib/fbb",
++	"mess",	"@localstatedir@/lib/fbb/mail",
++	"comp",	"@localstatedir@/lib/fbb/binmail",
++	"fbbd",	"*,*, at localstatedir@/lib/fbb/fbbdos,*,*,*,*,*",
++	"yapp",	"@localstatedir@/lib/fbb/fbbdos/yapp",
+ 	"docs",	"@docdir@/ax25/fbb/docs",
+ 	"sysm", "",
+-	"impo",	"@localstatedir@/ax25/fbb/mail/mail.in",
++	"impo",	"@localstatedir@/lib/fbb/mail/mail.in",
+ 	"logs",	"OK",
+ 	"test",	"NO",
+ 	"fbbf",	"OK 160",
diff --git a/fbb-7.0.8-beta-write-port-errors.patch b/fbb-7.0.8-beta-write-port-errors.patch
new file mode 100644
index 0000000..db473a6
--- /dev/null
+++ b/fbb-7.0.8-beta-write-port-errors.patch
@@ -0,0 +1,24 @@
+diff --git a/src/initport.c b/src/initport.c
+index 601ce96..990ce53 100644
+--- a/src/initport.c
++++ b/src/initport.c
+@@ -966,6 +966,9 @@ static void errport (int lig, char *texte)
+ #endif
+ 	WinMessage (5, msg);
+ #endif
++#ifdef __linux__
++	fprintf (stderr, "%s\n", texte);
++#endif
+ 	fbb_error (ERR_SYNTAX, c_disque ("PORT.SYS"), lig);
+ }
+ 
+@@ -982,6 +985,9 @@ static void err_fic (char *nomfic, int ligne, char *texte)
+ 	sprintf (msg, "%s (%d) :\n%s", nomfic, ligne, texte);
+ 	WinMessage (0, msg);
+ #endif
++#ifdef __linux__
++	fprintf (stderr, "%s\n", texte);
++#endif
+ 	fbb_error (ERR_SYNTAX, nomfic, ligne);
+ }
+ 
diff --git a/fbb-icon.png b/fbb-icon.png
new file mode 100644
index 0000000..da5dd56
Binary files /dev/null and b/fbb-icon.png differ
diff --git a/fbb.desktop b/fbb.desktop
new file mode 100644
index 0000000..87d2d4e
--- /dev/null
+++ b/fbb.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=xfbb
+GenericName=xfbb
+Comment=F6FBB BBS software for bulletins and messages distribution
+Exec=pkexec /usr/sbin/xfbb
+Icon=fbb
+Terminal=false
+Type=Application
+Categories=Network;HamRadio;
+Version=1.0
diff --git a/fbb.service b/fbb.service
new file mode 100644
index 0000000..5f1edb8
--- /dev/null
+++ b/fbb.service
@@ -0,0 +1,11 @@
+[Unit]
+Description = F6FBB Packet Radio BBS
+After = network.target
+
+[Service]
+Type = simple
+Environment=NON_INTERACTIVE=1
+ExecStart = /usr/sbin/fbb -f -l -
+
+[Install]
+WantedBy = multi-user.target
diff --git a/fbb.spec b/fbb.spec
new file mode 100644
index 0000000..ea25796
--- /dev/null
+++ b/fbb.spec
@@ -0,0 +1,224 @@
+%global prerel beta
+
+# hardened build if not overridden
+%{!?_hardened_build:%global _hardened_build 1}
+
+Name:             fbb
+URL:              https://sourceforge.net/projects/linfbb/
+Version:          7.0.8
+Release:          %{?prerel:0.}3%{?prerel:.%{prerel}}%{?dist}
+License:          GPLv2+
+Group:            Applications/Communications
+Summary:          Packet radio mailbox and utilities
+BuildRequires:    automake, libax25-devel, ncurses-devel, libX11-devel
+BuildRequires:    libXt-devel, libXext-devel,libXpm-devel, lesstif-devel
+BuildRequires:    desktop-file-utils
+BuildRequires:    systemd
+Requires(post):   systemd
+Requires(preun):  systemd
+Requires(postun): systemd
+Source0:          http://downloads.sourceforge.net/linfbb/%{name}-%{version}%{?prerel:-%{prerel}}.tar.bz2
+Source1:          epurmess.ini
+Source2:          fbb.service
+Source3:          fbb-icon.png
+Source4:          fbb.desktop
+Source5:          org.fbb.gui.policy
+# Remove real callsigns
+Patch2:           fbb-7.0.8-beta-sample-conf.patch
+# Use /var/lib/fbb instead of /var/ax25/fbb
+# /var/ax25 is currently not allowed by FHS, but it was requested
+# to be added to the FHS
+Patch3:           fbb-7.0.8-beta-var-lib.patch
+# Non interactive service start
+Patch4:           fbb-7.0.8-beta-non-interactive.patch
+Patch5:           fbb-7.0.8-beta-write-port-errors.patch
+Patch6:           fbb-7.0.8-beta-stdout.patch
+Patch7:           fbb-7.0.8-beta-ncurses-fix.patch
+
+%description
+F6FBB BBS software for bulletins and messages distribution via Packet Radio
+and wired networks.
+
+%package          doc
+Group:            Applications/Communications
+Requires:         %{name} = %{version}-%{release}
+Summary:          Documentation for fbb
+BuildArch:        noarch
+
+%description doc
+Documentation for fbb.
+
+%package          gui
+Group:            Applications/Communications
+Requires:         %{name}%{?_isa} = %{version}-%{release}
+Summary:          GUI for fbb
+
+%description gui
+GUI for fbb.
+
+%prep
+%setup -q -n %{name}-%{version}%{?prerel:-%{prerel}}
+%patch2 -p1 -b .sample-conf
+%patch3 -p1 -b .var-lib
+%patch4 -p1 -b .non-interactive
+%patch5 -p1 -b .write-port-errors
+%patch6 -p1 -b .beta-stdout
+%patch7 -p1 -b .ncurses-fix
+
+# recode ISO-8859-15 (French) to UTF-8, reported upstream
+for f in doc/satdoc-f.doc src/*.c include/*.h;
+do
+  iconv -f ISO8859-15 -t UTF8 -o $f.utf-8 $f
+  mv $f.utf-8 $f
+done
+
+%build
+autoreconf -fi
+%configure
+make %{?_smp_mflags} CFLAGS="%{optflags} %{?_hardened_build:-pie}" \
+  LDFLAGS="%{?__global_ldflags} %{?_hardened_build:-pie -Wl,-z,relro,-z,now}"
+
+%install
+make install DESTDIR=%{buildroot}
+make installconf DESTDIR=%{buildroot}
+
+# Directories
+mkdir -p %{buildroot}%{_var}/lib/fbb/{binmail/mail{0..9},docs,fbbdos/{readonly,yapp},\
+log,mail/mail{0..9},oldmail,sat,wp}
+
+# Install sample configuration files
+mv %{buildroot}%{_docdir}/fbb/fbb.conf.sample %{buildroot}%{_sysconfdir}/ax25/fbb/fbb.conf
+install -Dpm 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/ax25/fbb/epurmess.ini
+pushd %{buildroot}%{_sysconfdir}/ax25/fbb
+mv port.sys.sample port.sys
+cd lang
+mv english.ent.sample english.ent
+mv francais.ent.sample francais.ent
+popd
+
+# Systemd
+install -Dpm 644 %{SOURCE2} %{buildroot}%{_unitdir}/fbb.service
+
+# Icon
+mkdir -p %{buildroot}%{_datadir}/icons/hicolor/128x128/apps
+install -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/icons/hicolor/128x128/apps/fbb.png
+
+# Desktop file
+mkdir -p  %{buildroot}%{_datadir}/applications
+desktop-file-install --dir=%{buildroot}%{_datadir}/applications %{SOURCE4}
+
+# Polkit policy
+install -Dpm 0644 %{SOURCE5} %{buildroot}%{_datadir}/polkit-1/actions/org.fbb.gui.policy
+
+# Ghosts
+touch %{buildroot}%{_var}/lib/fbb/{ERROR.SYS,dirmes.sys,etat.sys,heard.bin,inf.sys,\
+statis.dat,themes.dat,tpstat.sys,wfbid.sys,sat/satel.dat,wp/wp.sys}
+
+%post
+%systemd_post fbb.service
+
+%preun
+%systemd_preun fbb.service
+
+%postun
+%systemd_postun_with_restart fbb.service
+
+%post gui
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun gui
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+fi
+
+%posttrans gui
+/usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || :
+
+%files
+%license COPYING
+%doc AUTHORS ChangeLog README
+%exclude %{_docdir}/%{name}/html
+%exclude %{_docdir}/%{name}/*.doc
+%dir %{_sysconfdir}/ax25/fbb/
+%dir %{_sysconfdir}/ax25/fbb/lang
+%dir %{_sysconfdir}/ax25/fbb/fwd
+%dir %{_var}/lib/fbb
+%dir %{_var}/lib/fbb/docs
+%dir %{_var}/lib/fbb/sat
+%dir %{_var}/lib/fbb/wp
+%{_var}/lib/fbb/binmail
+%{_var}/lib/fbb/oldmail
+%{_var}/lib/fbb/fbbdos
+%{_var}/lib/fbb/mail
+%{_var}/lib/fbb/log
+%{_sbindir}/ajoursat
+%{_sbindir}/fbbgetconf
+%{_sbindir}/satupdat
+%{_sbindir}/xfbbC
+%{_sbindir}/fbb
+%{_sbindir}/satdoc
+%{_sbindir}/xfbbd
+%{_mandir}/man1/*
+%{_mandir}/man8/*
+%config(noreplace) %{_sysconfdir}/ax25/fbb/fbb.conf
+%config(noreplace) %{_sysconfdir}/ax25/fbb/port.sys
+%config(noreplace) %{_sysconfdir}/ax25/fbb/epurmess.ini
+%config(noreplace) %{_sysconfdir}/ax25/fbb/bbs.sys
+%config(noreplace) %{_sysconfdir}/ax25/fbb/cron.sys
+%config(noreplace) %{_sysconfdir}/ax25/fbb/fbbopt.conf
+%config(noreplace) %{_sysconfdir}/ax25/fbb/forward.sys
+%config(noreplace) %{_sysconfdir}/ax25/fbb/fwd/amsat.fwd
+%config(noreplace) %{_sysconfdir}/ax25/fbb/lang/english.ent
+%config(noreplace) %{_sysconfdir}/ax25/fbb/lang/english.hlp
+%config(noreplace) %{_sysconfdir}/ax25/fbb/lang/english.inf
+%config(noreplace) %{_sysconfdir}/ax25/fbb/lang/english.txt
+%config(noreplace) %{_sysconfdir}/ax25/fbb/lang/francais.ent
+%config(noreplace) %{_sysconfdir}/ax25/fbb/lang/francais.hlp
+%config(noreplace) %{_sysconfdir}/ax25/fbb/lang/francais.inf
+%config(noreplace) %{_sysconfdir}/ax25/fbb/lang/francais.txt
+%config(noreplace) %{_sysconfdir}/ax25/fbb/langue.sys
+%config(noreplace) %{_sysconfdir}/ax25/fbb/passwd.sys
+%config(noreplace) %{_sysconfdir}/ax25/fbb/protect.sys
+%config(noreplace) %{_sysconfdir}/ax25/fbb/redist.sys
+%config(noreplace) %{_sysconfdir}/ax25/fbb/reject.sys
+%config(noreplace) %{_sysconfdir}/ax25/fbb/swapp.sys
+%config(noreplace) %{_sysconfdir}/ax25/fbb/themes.sys
+%{_libdir}/fbb
+%{_unitdir}/fbb.service
+%ghost %{_var}/lib/fbb/sat/satel.dat
+%ghost %{_var}/lib/fbb/wp/wp.sys
+%ghost %{_var}/lib/fbb/ERROR.SYS
+%ghost %{_var}/lib/fbb/dirmes.sys
+%ghost %{_var}/lib/fbb/etat.sys
+%ghost %{_var}/lib/fbb/heard.bin
+%ghost %{_var}/lib/fbb/inf.sys
+%ghost %{_var}/lib/fbb/statis.dat
+%ghost %{_var}/lib/fbb/themes.dat
+%ghost %{_var}/lib/fbb/tpstat.sys
+%ghost %{_var}/lib/fbb/wfbid.sys
+
+%files doc
+%doc %{_docdir}/%{name}/html
+%doc %{_docdir}/%{name}/*.doc
+
+%files gui
+%{_sbindir}/xfbb
+%{_sbindir}/xfbbX
+%{_sbindir}/xfbbX_cl
+%{_datadir}/icons/hicolor/128x128/apps/fbb.png
+%{_datadir}/applications/fbb.desktop
+%{_datadir}/polkit-1/actions/org.fbb.gui.policy
+
+%changelog
+* Thu May 14 2015 Jaroslav Škarvada <jskarvad at redhat.com> - 7.0.8-0.3.beta
+- Added /var/lib/fbb/oldmail directory
+- Added policykit policy for xfbb
+- Other minor fixes according to fedora review
+
+* Wed May 13 2015 Jaroslav Škarvada <jskarvad at redhat.com> - 7.0.8-0.2.beta
+- Added icon and desktop files
+- Other minor fixes according to fedora review
+
+* Thu Apr 23 2015 Jaroslav Škarvada <jskarvad at redhat.com> - 7.0.8-0.1.beta
+- Initial version
diff --git a/org.fbb.gui.policy b/org.fbb.gui.policy
new file mode 100644
index 0000000..799cb4a
--- /dev/null
+++ b/org.fbb.gui.policy
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD polkit Policy Configuration 1.0//EN"
+"http://www.freedesktop.org/software/polkit/policyconfig-1.dtd">
+<policyconfig>
+  <action id="org.fbb.gui.run">
+    <description>Run xfbb as root</description>
+    <message>Authentication is required to run xfbb</message>
+    <defaults>
+      <allow_any>auth_admin</allow_any>
+      <allow_inactive>auth_admin</allow_inactive>
+      <allow_active>auth_admin</allow_active>
+    </defaults>
+     <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/xfbb</annotate>
+     <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
+  </action>
+</policyconfig>
diff --git a/sources b/sources
index e69de29..f3b9dba 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+2aa02be1731bc84abc94bef65b61afde  fbb-7.0.8-beta.tar.bz2
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/fbb.git/commit/?h=f22&id=5723a6ab681ccc837a00fc16035c94a0b885c383


More information about the scm-commits mailing list