Commit add40c4fa581b1c31e3fa63c45dde97138b56583

Tracey Emery 2020-01-15T22:10:31

remove examples file

diff --git a/Makefile.inc b/Makefile.inc
index 5952e3a..cb06f08 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -36,7 +36,6 @@ GOTWEB_DIR =	/cgi-bin/gotweb
 LIBEXECDIR =	${GOTWEB_DIR}/libexec
 LIBEXEC_DIR =	${CHROOT_DIR}${LIBEXECDIR}
 ETC_DIR =	${CHROOT_DIR}/etc
-EXPL_DIR =	${ETC_DIR}/examples
 HTTPD_DIR =	${CHROOT_DIR}/htdocs
 TMP_DIR =	${CHROOT_DIR}/tmp
 PROG_DIR =	${HTTPD_DIR}/${PROG}
diff --git a/gotweb/Makefile b/gotweb/Makefile
index fd425d0..a8779fe 100644
--- a/gotweb/Makefile
+++ b/gotweb/Makefile
@@ -35,11 +35,6 @@ realinstall:
 	if [ ! -d ${ETC_DIR}/. ]; then \
 		${INSTALL} -d -o root -g daemon -m 755 ${ETC_DIR}; \
 	fi
-	if [ ! -d ${EXPL_DIR}/. ]; then \
-		${INSTALL} -d -o root -g daemon -m 755 ${EXPL_DIR}; \
-	fi
-	${INSTALL} -c -o ${WWWUSR} -g ${WWWGRP} -m 0755 files/etc/gotweb.conf \
-		${ETC_DIR}/examples/gotweb.conf
 	if [ ! -d ${HTTPD_DIR}/. ]; then \
 		${INSTALL} -d -o root -g daemon -m 755 ${HTTPD_DIR}; \
 	fi
diff --git a/gotweb/files/etc/gotweb.conf b/gotweb/files/etc/gotweb.conf
deleted file mode 100644
index c13c81b..0000000
--- a/gotweb/files/etc/gotweb.conf
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# gotweb options
-# all paths relative to /var/www (httpd chroot jail)
-#
-
-got_repos_path			"/got/public"
-got_www_path			"/gotweb"
-
-#got_max_repos			100
-#got_max_repos_display		25
-got_max_commits_display		50
-
-got_site_name			"my public repos"
-got_site_owner			"Got Owner"
-got_site_link			"repos"
-
-got_logo			"got.png"
-got_logo_url			"https://gameoftrees.org"
-
-# on by default
-#got_show_site_owner		off
-#got_show_repo_owner		off
-#got_show_repo_age		false
-#got_show_repo_description	no
-#got_show_repo_cloneurl		off
diff --git a/gotweb/gotweb.c b/gotweb/gotweb.c
index 9072492..c7b010c 100644
--- a/gotweb/gotweb.c
+++ b/gotweb/gotweb.c
@@ -2009,7 +2009,7 @@ gw_get_repo_tags(struct gw_trans *gw_trans, int limit, int tag_type)
 	if (error)
 		goto done;
 
-	error = got_ref_list(&refs, repo, "refs/tags", got_repo_cmp_tags, repo);
+	error = got_ref_list(&refs, repo, "refs/tags", got_ref_cmp_tags, repo);
 	if (error)
 		goto done;
 
diff --git a/gotweb/gotweb.conf.5 b/gotweb/gotweb.conf.5
index dc7cb15..e38c892 100644
--- a/gotweb/gotweb.conf.5
+++ b/gotweb/gotweb.conf.5
@@ -65,6 +65,37 @@ Set whether to display the site owner, or not.
 .It Ic got_www_path Ar string
 Set the public gotweb httpd path.
 .El
+.Sh EXAMPLES
+These are the currently configurable items for Gotweb.
+The configuration file gotweb.conf must be located at /var/www/etc/gotweb.conf.
+.Bd -literal -offset indent
+
+#
+# gotweb options
+# all paths relative to /var/www (httpd chroot jail)
+#
+
+got_repos_path			"/got/public"
+got_www_path			"/gotweb"
+
+#got_max_repos			100
+#got_max_repos_display		25
+got_max_commits_display		50
+
+got_site_name			"my public repos"
+got_site_owner			"Got Owner"
+got_site_link			"repos"
+
+got_logo			"got.png"
+got_logo_url			"https://gameoftrees.org"
+
+# on by default
+#got_show_site_owner		off
+#got_show_repo_owner		off
+#got_show_repo_age		false
+#got_show_repo_description	no
+#got_show_repo_cloneurl		off
+.Ed
 .Sh FILES
 .Bl -tag -width Ds -compact
 .It Pa /var/www/etc/gotweb.conf
diff --git a/gotweb/parse.y b/gotweb/parse.y
index 0101a26..c3ab529 100644
--- a/gotweb/parse.y
+++ b/gotweb/parse.y
@@ -511,7 +511,6 @@ parse_conf(const char *filename, struct gotweb_conf *gconf)
 	gw_conf->got_max_repos_display = D_MAXREPODISP;
 	gw_conf->got_max_commits_display = D_MAXCOMMITDISP;
 	if ((file = pushfile(filename)) == NULL) {
-		error = got_error_from_errno2("parse_conf", GOTWEB_CONF);
 		goto done;
 	}
 	topfile = file;