File: 03-installation.diff

package info (click to toggle)
nn 6.7.3-16.1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 3,688 kB
  • sloc: ansic: 32,039; sh: 1,491; awk: 138; makefile: 80
file content (294 lines) | stat: -rw-r--r-- 6,869 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
Description: Fix inst.sh to install nn in the correct directories
Origin: nn Package Maintainers
Index: nn-6.7.3/inst.sh
===================================================================
--- nn-6.7.3.orig/inst.sh
+++ nn-6.7.3/inst.sh
@@ -60,11 +60,11 @@ else
 	fi
 fi
 
-set $RECMAIL
-if [ ! -f "$1" ]
-then
-	echo ERROR: Mailer program $RECMAIL not found.
-fi
+#set $RECMAIL
+#if [ ! -f "$1" ]
+#then
+#	echo ERROR: Mailer program $RECMAIL not found.
+#fi
 ) > ErrorCheck
 
 if [ -s ErrorCheck ]
@@ -246,69 +246,69 @@ master)
 
 bin)
 	echo
-	if [ ! -d "$BIN"/. ]
+	if [ ! -d "$DESTDIR/$BIN"/. ]
 	then
-		echo Directory $BIN does not found!
+		echo Directory $DESTDIR/$BIN does not found!
 		exit 1
 	fi
 
-	echo Installing user programs in $BIN
+	echo Installing user programs in $DESTDIR/$BIN
 
-	if [ -f $BIN/nn ]
+	if [ -f $DESTDIR/$BIN/nn ]
 	then
 	     (
-		cd $BIN
+		cd $DESTDIR/$BIN
 		mv nn nn.old
-		rm -f $BIN_PROG $BIN_LINK
+		rm -f $BIN_PROG $DESTDIR/$BIN_LINK
 	     )
 	fi
 
 	for prog in $BIN_PROG
 	do
-		./inst copy 755 $BIN $prog
+		./inst copy 755 $DESTDIR/$BIN $prog
 	done
 
 	for link in $BIN_LINK
 	do
-		ln $BIN/nn $BIN/$link
-		echo $link linked to nn
+		ln -s nn $DESTDIR/$BIN/$link
+		echo $link symlinked to nn
 	done
 
-	if [ -f $BIN/nnacct ] ; then
-		chmod 4755 $BIN/nnacct
+	if [ -f $DESTDIR/$BIN/nnacct ] ; then
+		chmod 4755 $DESTDIR/$BIN/nnacct
 		echo nnacct is setuid ${OWNER}.
 	fi
 	;;
 
 aux)
 	echo
-	./inst mkdir $LIB 755 || exit 1
+	./inst mkdir $DESTDIR/$LIB 755 || exit 1
 
-	echo Installing auxiliary programs in $LIB
+	echo Installing auxiliary programs in $DESTDIR/$LIB
 
 	for prog in $LIB_PROG
 	do
-		./inst copy 755 $LIB $prog
+		./inst copy 755 $DESTDIR/$LIB $prog
 	done
 
-	./mkprefix conf > ${LIB}/conf
+	./mkprefix conf > $DESTDIR/${LIB}/conf
 	grep "^#" config.h |
-	sed -e '/_MAN_/d' -e 's/[ 	]*\/\*.*$//' >> ${LIB}/conf
-	./inst chmod 644 ${LIB}/conf
+	sed -e '/_MAN_/d' -e 's/[ 	]*\/\*.*$//' >> $DESTDIR/${LIB}/conf
+	./inst chmod 644 $DESTDIR/${LIB}/conf
 	;;
 
 help)
-	./inst mkdir $HELP 755 || exit 1
+	./inst mkdir $DESTDIR/$HELP 755 || exit 1
 
 	echo
-	echo Installing help files in $HELP
+	echo Installing help files in $DESTDIR/$HELP
 
 	cd help
 	for h in *
 	do
 		cd ..
-		./cvt-help < help/$h > $HELP/$h
-		./inst chmod 644 $HELP/$h
+		./cvt-help < help/$h > $DESTDIR/$HELP/$h
+		./inst chmod 644 $DESTDIR/$HELP/$h
 		echo $h
 		cd help
 	done
@@ -327,32 +327,32 @@ man)
 	} |
 	while read DIR SECT SRC
 	do
-		if [ -d "$DIR"/. ]
+		if [ -d "$DESTDIR/$DIR"/. ]
 		then
 			for i in man/*$SRC
 			do
 				MAN=`basename ${i} $SRC`
-				NEW=$DIR/${MAN}.$SECT
+				NEW=$DESTDIR/$DIR/${MAN}.$SECT
 				sed -e '/^\.TH /s/6.7/'${PL}'/' $i > $NEW
 				./inst chmod 644 $NEW
 				echo $MAN in $NEW
 			done
 		else
-			echo $DIR not found or not writeable
+			echo $DESTDIR/$DIR not found or not writeable
 		fi
 	done
 	;;
 
 online)
-	./inst mkdir $HELP 755 || exit 1
+	./inst mkdir $DESTDIR/$HELP 755 || exit 1
 
 	MAN=$HELP/Manual
 
 	echo
-	echo "Formatting online manual $MAN"
+	echo "Formatting online manual $DESTDIR/$MAN"
 	echo ".... (continues in background) ...."
 
-	rm -f $MAN
+	rm -f $DESTDIR/$MAN
 
 	(
 	sed 	-e 's/\\f[BPI]//g' \
@@ -362,9 +362,9 @@ online)
 		-e '/^\.if/d' -e '/^\.ta/d' -e '/^\.nr/d' \
 		-e '/^\.in/d' -e 's/^\.[BI] //' \
 		`ls -1 man/*.? man/*.??` |
-	${AWK} -f format.awk - > $MAN
+	${AWK} -f format.awk - > $DESTDIR/$MAN
 
-	./inst chmod 644 $MAN
+	./inst chmod 644 $DESTDIR/$MAN
 	) &
 	;;
 
@@ -502,9 +502,9 @@ esac
 
 done
 
-if [ -f $LOG ]
+if [ -f $DESTDIR/$LOG ]
 then
-	chmod 666 $LOG
+	chmod 666 $DESTDIR/$LOG
 fi
 
 if $PAUSE
Index: nn-6.7.3/admin.c
===================================================================
--- nn-6.7.3.orig/admin.c
+++ nn-6.7.3/admin.c
@@ -764,7 +764,7 @@ loop:
 		goto tr_failed;
 	    }
 	    log_entry('A', "Log Truncated");
-	    chmod(log_file, 0666);
+	    chmod(log_file, 0644);
 	}
 	return;
 
Index: nn-6.7.3/conf/s-linux.h
===================================================================
--- nn-6.7.3.orig/conf/s-linux.h
+++ nn-6.7.3/conf/s-linux.h
@@ -185,9 +185,9 @@ typedef struct dirent Direntry;		/* Syst
  *	Specify the default mailer
  */
 
-/* #define	MAILX		"/usr/bin/mailx"	/* SV */
+#define	MAILX		"/usr/bin/mailx"	/* SV */
 /* #define	MAILX	"/usr/ucb/Mail"		/* BSD */
-#define	MAILX	"/bin/mailx"	/* linux */
+/* #define	MAILX	"/bin/mailx"	/* linux */
 
 /*
  *	Define the maximum length of any pathname that may occur
Index: nn-6.7.3/global.c
===================================================================
--- nn-6.7.3.orig/global.c
+++ nn-6.7.3/global.c
@@ -312,12 +312,6 @@ init_global(void)
     help_directory = mk_file_name(lib_directory, "help");
 #endif
 
-#ifdef LOG_FILE
-    log_file = LOG_FILE;
-#else
-    log_file = mk_file_name(LIB_DIRECTORY, "Log");
-#endif
-
     if (who_am_i == I_AM_MASTER || who_am_i == I_AM_SPEW)
 	return 0;
 
@@ -337,6 +331,12 @@ init_global(void)
     if (!nn_directory)		/* if not set on command line */
 	nn_directory = mk_file_name(home_directory, ".nn");
 
+#ifdef LOG_FILE
+    log_file = LOG_FILE;
+#else
+    log_file = mk_file_name(nn_directory, "Log");
+#endif
+
     organization = getenv("ORGANIZATION");
 
     return 0;
Index: nn-6.7.3/menu.c
===================================================================
--- nn-6.7.3.orig/menu.c
+++ nn-6.7.3/menu.c
@@ -811,7 +811,7 @@ show_articles(void)
 	}
 
 	if (again > 1)
-	    sprintf(delayed_msg, "Showing %d articles again", again);
+	    sprintf(delayed_msg, "Showing %ld articles again", again);
     } while (again);
 
     return MC_READGROUP;
Index: nn-6.7.3/nntp.c
===================================================================
--- nn-6.7.3.orig/nntp.c
+++ nn-6.7.3/nntp.c
@@ -37,6 +37,10 @@
 #define NNTPCACHE	10
 #endif
 
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN 255
+#endif
+
 #ifdef NNTP
 #include "nntp.h"
 #include "patchlevel.h"
@@ -915,7 +919,11 @@ nntp_check(void)
 	server_real_name = hp->h_name;
     else
 	nn_exitmsg(1, "NNTPSERVER is invalid");
-    use_nntp = (strcmp(host_name, server_real_name) != 0);
+#ifdef USE_SPOOL
+    use_nntp = (strcasecmp(host, server_real_name) != 0);
+#else /* USE_SPOOL */
+    use_nntp = 1;
+#endif /* USE_SPOOL */
 
     if (use_nntp) {
 	freeobj(news_active);
Index: nn-6.7.3/prefix.c
===================================================================
--- nn-6.7.3.orig/prefix.c
+++ nn-6.7.3/prefix.c
@@ -73,7 +73,11 @@ make_nn_prefix(int flag, FILE * f)
     fprintf(f, "ACTIVE=%s/active\n", news_lib_directory);
 #endif
 
-    fprintf(f, "LOG=%s\n", log_file);
+    if (log_file == NULL) {
+	fprintf(f, "LOG=null\n");
+    } else {
+	fprintf(f, "LOG=%s\n", log_file);
+    }
     fprintf(f, "TMP=${TMPDIR-%s}\n", tmp_directory);
     fprintf(f, "DB=%s\n", db_directory);
     fprintf(f, "BIN=%s\n", bin_directory);