summarylogtreecommitdiffstats
path: root/nostromo.patch
blob: 0fdc45b5962d9e9c29ecc407545f3dc9e17a55b5 (plain)
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
diff -rupN nostromo-1.9.7/conf/nhttpd.conf-dist nostromo-1.9.7b/conf/nhttpd.conf-dist
--- nostromo-1.9.7/conf/nhttpd.conf-dist	2016-04-12 14:54:16.000000000 -0400
+++ nostromo-1.9.7b/conf/nhttpd.conf-dist	2019-11-04 12:35:14.872534157 -0500
@@ -2,29 +2,31 @@
 
 # MAIN [MANDATORY]
 
-servername		www.nazgul.ch
-#servername		www.nazgul.ch:8080
+servername		localhost
+#servername		localhost:8080
 serverlisten		*
 #serverlisten		81.221.21.250 127.0.0.1 ::1
 serveradmin		webmaster@nazgul.ch
-serverroot		/var/nostromo
-servermimes		conf/mimes
-docroot			/var/nostromo/htdocs
+serverroot		/usr/share/nostromo
+servermimes		/etc/nostromo/conf/mimes
+docroot			/usr/share/nostromo/htdocs
 docindex		index.html
 
 # LOGS [OPTIONAL]
 
+# If you change logpid, you'll need to change the PIDFile parameter to match its absolute path
+# in the systemd nostromo.service unit.
 logpid			logs/nhttpd.pid
 logaccess		logs/access_log
 
 # SETUID [RECOMMENDED]
 
-user			_nostromo
+user			nostromo
 
 # BASIC AUTHENTICATION [OPTIONAL]
 
 #htaccess		.htaccess
-#htpasswd		/var/nostromo/conf/.htpasswd
+#htpasswd		/etc/nostromo/conf/.htpasswd
 #htpasswd		+bsdauth
 #htpasswd		+bsdauthnossl
 
@@ -44,12 +46,12 @@ user			_nostromo
 
 # ALIASES [OPTIONAL]
 
-/icons			/var/nostromo/icons
+/icons			/usr/share/nostromo/icons
 
 # VIRTUAL HOSTS [OPTIONAL]
 
-#www.rahel.ch		/var/nostromo/htdocs/www.rahel.ch
-#www.rahel.ch:8080	/var/nostromo/htdocs/www.rahel.ch
+#www.rahel.ch		/usr/share/nostromo/htdocs/www.rahel.ch
+#www.rahel.ch:8080	/usr/share/nostromo/htdocs/www.rahel.ch
 
 # HOMEDIRS [OPTIONAL]
 
diff -rupN nostromo-1.9.7/GNUmakefile nostromo-1.9.7b/GNUmakefile
--- nostromo-1.9.7/GNUmakefile	2016-04-12 14:52:41.000000000 -0400
+++ nostromo-1.9.7b/GNUmakefile	2019-11-04 12:35:14.875867502 -0500
@@ -5,30 +5,30 @@ all:
 
 install:
 	install -c -o root -g bin -m 555 src/nhttpd/nhttpd \
-		/usr/local/sbin/nhttpd
+		$(DESTDIR)/usr/bin/nhttpd
 	install -c -o root -g bin -m 444 src/nhttpd/nhttpd.8 \
-		/usr/share/man/man8/nhttpd.8
+		$(DESTDIR)/usr/share/man/man8/nhttpd.8
 	install -c -o root -g bin -m 555 src/tools/crypt \
-		/usr/local/sbin/crypt
-	install -d -o root -g daemon -m 755 /var/nostromo/conf
-	install -d -o root -g daemon -m 755 /var/nostromo/htdocs
-	install -d -o root -g daemon -m 755 /var/nostromo/htdocs/cgi-bin
-	install -d -o root -g daemon -m 755 /var/nostromo/icons
-	install -d -o root -g daemon -m 755 /var/nostromo/logs
+		$(DESTDIR)/usr/bin/crypt
+	install -d -o root -g daemon -m 755 $(DESTDIR)/etc/nostromo/conf
+	install -d -o root -g daemon -m 755 $(DESTDIR)/usr/share/nostromo/htdocs
+	install -d -o root -g daemon -m 755 $(DESTDIR)/usr/share/nostromo/htdocs/cgi-bin
+	install -d -o root -g daemon -m 755 $(DESTDIR)/usr/share/nostromo/icons
+	install -d -o root -g daemon -m 755 $(DESTDIR)/usr/share/nostromo/logs
 	install -c -o root -g bin -m 555 htdocs/cgi-bin/printenv \
-		/var/nostromo/htdocs/cgi-bin/printenv
+		$(DESTDIR)/usr/share/nostromo/htdocs/cgi-bin/printenv
 	install -c -o root -g bin -m 644 conf/mimes \
-		/var/nostromo/conf/mimes
+		$(DESTDIR)/etc/nostromo/conf/mimes
 	install -c -o root -g bin -m 644 conf/nhttpd.conf-dist \
-		/var/nostromo/conf/nhttpd.conf-dist
+		$(DESTDIR)/etc/nostromo/conf/nhttpd.conf
 	install -c -o root -g bin -m 644 htdocs/index.html \
-		/var/nostromo/htdocs/index.html
+		$(DESTDIR)/usr/share/nostromo/htdocs/index.html
 	install -c -o root -g bin -m 644 htdocs/nostromo.gif \
-		/var/nostromo/htdocs/nostromo.gif
+		$(DESTDIR)/usr/share/nostromo/htdocs/nostromo.gif
 	install -c -o root -g bin -m 644 icons/dir.gif \
-		/var/nostromo/icons/dir.gif
+		$(DESTDIR)/usr/share/nostromo/icons/dir.gif
 	install -c -o root -g bin -m 644 icons/file.gif \
-		/var/nostromo/icons/file.gif
+		$(DESTDIR)/usr/share/nostromo/icons/file.gif
 
 clean:
 	cd src; ${MAKE} clean
diff -rupN nostromo-1.9.7/Makefile nostromo-1.9.7b/Makefile
--- nostromo-1.9.7/Makefile	2016-04-12 14:52:41.000000000 -0400
+++ nostromo-1.9.7b/Makefile	2019-11-04 12:35:14.875867502 -0500
@@ -3,24 +3,24 @@
 SUBDIR+= src
 
 afterinstall:
-	install -d -o root -g daemon -m 755 /var/nostromo/conf
-	install -d -o root -g daemon -m 755 /var/nostromo/htdocs
-	install -d -o root -g daemon -m 755 /var/nostromo/htdocs/cgi-bin
-	install -d -o root -g daemon -m 755 /var/nostromo/icons
-	install -d -o root -g daemon -m 755 /var/nostromo/logs
+	install -d -o root -g daemon -m 755 $(DESTDIR)/etc/nostromo/conf
+	install -d -o root -g daemon -m 755 $(DESTDIR)/usr/share/nostromo/htdocs
+	install -d -o root -g daemon -m 755 $(DESTDIR)/usr/share/nostromo/htdocs/cgi-bin
+	install -d -o root -g daemon -m 755 $(DESTDIR)/usr/share/nostromo/icons
+	install -d -o root -g daemon -m 755 $(DESTDIR)/usr/share/nostromo/logs
 	install -c -o root -g bin -m 555 htdocs/cgi-bin/printenv \
-		/var/nostromo/htdocs/cgi-bin/printenv
+		$(DESTDIR)/usr/share/nostromo/htdocs/cgi-bin/printenv
 	install -c -o root -g bin -m 644 conf/mimes \
-		/var/nostromo/conf/mimes
+		$(DESTDIR)/etc/nostromo/conf/mimes
 	install -c -o root -g bin -m 644 conf/nhttpd.conf-dist \
-		/var/nostromo/conf/nhttpd.conf-dist
+		$(DESTDIR)/etc/nostromo/conf/nhttpd.conf
 	install -c -o root -g bin -m 644 htdocs/index.html \
-		/var/nostromo/htdocs/index.html
+		$(DESTDIR)/usr/share/nostromo/htdocs/index.html
 	install -c -o root -g bin -m 644 htdocs/nostromo.gif \
-		/var/nostromo/htdocs/nostromo.gif
+		$(DESTDIR)/usr/share/nostromo/htdocs/nostromo.gif
 	install -c -o root -g bin -m 644 icons/dir.gif \
-		/var/nostromo/icons/dir.gif
+		$(DESTDIR)/usr/share/nostromo/icons/dir.gif
 	install -c -o root -g bin -m 644 icons/file.gif \
-		/var/nostromo/icons/file.gif
+		$(DESTDIR)/usr/share/nostromo/icons/file.gif
 
 .include <bsd.subdir.mk>
diff -rupN nostromo-1.9.7/src/nhttpd/main.c nostromo-1.9.7b/src/nhttpd/main.c
--- nostromo-1.9.7/src/nhttpd/main.c	2019-10-22 14:59:34.000000000 -0400
+++ nostromo-1.9.7b/src/nhttpd/main.c	2019-11-04 12:28:26.981236630 -0500
@@ -61,7 +61,7 @@
  * global vars local
  */
 static int		ppid;
-static const char	*configfile = "/var/nostromo/conf/nhttpd.conf";
+static const char	*configfile = "/etc/nostromo/conf/nhttpd.conf";
 
 /*
  * global vars extern
diff -rupN nostromo-1.9.7/src/nhttpd/Makefile nostromo-1.9.7b/src/nhttpd/Makefile
--- nostromo-1.9.7/src/nhttpd/Makefile	2016-04-12 15:02:06.000000000 -0400
+++ nostromo-1.9.7b/src/nhttpd/Makefile	2019-11-04 12:35:14.875867502 -0500
@@ -12,7 +12,7 @@ MAN= nhttpd.8
 
 BINOWN=	root
 BINMOD=	0555
-BINDIR=	/usr/local/sbin
+BINDIR=	/usr/bin
 
 OS!= uname -s
 
diff -rupN nostromo-1.9.7/src/nhttpd/nhttpd.8 nostromo-1.9.7b/src/nhttpd/nhttpd.8
--- nostromo-1.9.7/src/nhttpd/nhttpd.8	2016-04-12 16:32:43.000000000 -0400
+++ nostromo-1.9.7b/src/nhttpd/nhttpd.8	2019-11-04 12:35:14.875867502 -0500
@@ -85,7 +85,7 @@ Enable IPv6 only.
 Uses
 .Ar configfile
 as configuration file.  If this option is not set,
-.Ar /var/nostromo/conf/nhttpd.conf
+.Ar /etc/nostromo/conf/nhttpd.conf
 will be used by default.
 .El
 .Sh CONFIGURATION RELOAD
@@ -234,7 +234,7 @@ For example, to let all links starting w
 just add the following line in your
 .Ar configfile :
 .Bd -literal -offset indent
-/icons /var/nostromo/icons
+/icons /usr/share/nostromo/icons
 .Ed
 .Sh VIRTUAL HOSTS
 To serve virtual hosts, just add a line for each virtual host in
@@ -243,8 +243,8 @@ with the domain name as option and port
 .Ar docroot
 of that virtual host, as in this example:
 .Bd -literal -offset indent
-www.rahel.ch     /var/nostromo/htdocs/www.rahel.ch
-www.nazgul.ch:81 /var/nostromo/htdocs/www.nazgul.ch
+www.rahel.ch     /usr/share/nostromo/htdocs/www.rahel.ch
+www.nazgul.ch:81 /usr/share/nostromo/htdocs/www.nazgul.ch
 .Ed
 .Pp
 For each virtual host a separate access_log is written automatically with
@@ -276,18 +276,18 @@ directory by defining it via the
 .Ar homedirs_public
 option.
 .Sh FILES
-.Bl -tag -width "/var/nostromo/conf/nhttpd.conf" -compact
-.It Pa /var/nostromo/conf/nhttpd.conf
+.Bl -tag -width "/etc/nostromo/conf/nhttpd.conf" -compact
+.It Pa /etc/nostromo/conf/nhttpd.conf
 server configuration
-.It Pa /var/nostromo/conf/mimes
+.It Pa /etc/nostromo/conf/mimes
 mime types
-.It Pa /var/nostromo/logs/nhttpd.pid
+.It Pa /usr/share/nostromo/logs/nhttpd.pid
 pid file
-.It Pa /var/nostromo/logs/access_log
+.It Pa /usr/share/nostromo/logs/access_log
 http log
-.It Pa /usr/local/sbin/crypt
+.It Pa /usr/bin/crypt
 create user with DES password
-.It Pa /usr/local/sbin/nhttpd
+.It Pa /usr/bin/nhttpd
 http daemon
 .El
 .Sh HISTORY
diff -rupN nostromo-1.9.7/src/tools/crypt.c nostromo-1.9.7b/src/tools/crypt.c
--- nostromo-1.9.7/src/tools/crypt.c	2016-04-12 15:02:58.000000000 -0400
+++ nostromo-1.9.7b/src/tools/crypt.c	2019-11-04 12:35:14.875867502 -0500
@@ -32,7 +32,7 @@
 #include "../libbsd/strlcat.h"
 #endif
 
-#define DEFAULT_FILENAME "/var/nostromo/conf/.htpasswd"
+#define DEFAULT_FILENAME "/etc/nostromo/conf/.htpasswd"
 
 /*
  * Prototypes
diff -rupN nostromo-1.9.7/src/tools/Makefile nostromo-1.9.7b/src/tools/Makefile
--- nostromo-1.9.7/src/tools/Makefile	2016-04-12 15:02:58.000000000 -0400
+++ nostromo-1.9.7b/src/tools/Makefile	2019-11-04 12:35:14.875867502 -0500
@@ -11,7 +11,7 @@ MAN=
 
 BINOWN=	root
 BINMOD=	0555
-BINDIR=	/usr/local/sbin
+BINDIR=	/usr/bin
 
 OS!= uname -s