summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-06-17 11:49:22 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-06-17 11:49:22 -0400
commitc191af11616a3306b8e0a3650b6972eb61d2aba1 (patch)
treef5014a271d2c4c429113f4129d1d14ef73854470
parent896fdc18c430d8f6a5e5bd417b9ab0d3254941da (diff)
rearrange the go packages a bit
-rw-r--r--.gitignore1
-rw-r--r--Makefile20
-rw-r--r--src/cmd-nshd/.gitignore1
-rw-r--r--src/cmd-nshd/main.go.in (renamed from src/nshd/main.go.in)4
-rw-r--r--src/parabola_hackers/nslcd_backend/check_password.go (renamed from src/nshd/hackers_git/check_password.go)2
-rw-r--r--src/parabola_hackers/nslcd_backend/db_config.go (renamed from src/nshd/hackers_git/db_config.go)2
-rw-r--r--src/parabola_hackers/nslcd_backend/db_group.go (renamed from src/nshd/hackers_git/db_group.go)2
-rw-r--r--src/parabola_hackers/nslcd_backend/db_pam.go (renamed from src/nshd/hackers_git/db_pam.go)2
-rw-r--r--src/parabola_hackers/nslcd_backend/db_passwd.go (renamed from src/nshd/hackers_git/db_passwd.go)2
-rw-r--r--src/parabola_hackers/nslcd_backend/db_shadow.go (renamed from src/nshd/hackers_git/db_shadow.go)2
-rw-r--r--src/parabola_hackers/nslcd_backend/gid.go (renamed from src/nshd/hackers_git/gid.go)2
-rw-r--r--src/parabola_hackers/nslcd_backend/hackers.go (renamed from src/nshd/hackers_git/hackers.go)6
-rw-r--r--src/parabola_hackers/nslcd_backend/hackers_parse.go (renamed from src/nshd/hackers_git/hackers_parse.go)2
-rw-r--r--src/parabola_hackers/nslcd_backend/set.go (renamed from src/nshd/hackers_git/set.go)2
14 files changed, 25 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore
index f5a711d..0446d88 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,6 @@
*.o
*~
-/src/nshd/main.go
/nshd.service
/nshd.sysusers
/scripts/common.rb
diff --git a/Makefile b/Makefile
index d7cee40..e28e7f1 100644
--- a/Makefile
+++ b/Makefile
@@ -42,9 +42,9 @@ at.subdirs += src/lukeshu.com/git/go/libnslcd.git/proto
scripts = $(filter-out common.rb common.rb.in,$(notdir $(wildcard $(srcdir)/scripts/*))) common.rb
std.gen_files += LICENSE.lgpl-2.1.txt LICENSE.gpl-2.txt LICENSE.apache-2.0.txt
-std.out_files += bin/nshd nshd.service nshd.sysusers scripts/common.rb test/runner
+std.out_files += bin/cmd-nshd nshd.service nshd.sysusers scripts/common.rb test/runner
std.sys_files += $(addprefix $(bindir)/,nshd $(scripts)) $(systemunitdir)/nshd.socket $(systemunitdir)/nshd.service $(sysusersdir)/nshd.conf $(conf_file)
-std.clean_files += test/*.o pkg/ .tmp* .var*
+std.clean_files += test/*.o pkg/ .tmp* .var* src/cmd-nshd/main.go
$(srcdir)/LICENSE.lgpl-2.1.txt: $(NET)
curl https://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt > $@
@@ -55,12 +55,12 @@ $(srcdir)/LICENSE.apache-2.0.txt: $(NET)
$(srcdir)/LICENSE.wtfpl-2.txt: $(NET)
curl http://www.wtfpl.net/txt/copying/ > $@
-$(outdir)/bin/nshd: src/lukeshu.com/git/go/libnslcd.git/proto/server/interface_backend.go
-$(outdir)/bin/nshd: src/lukeshu.com/git/go/libnslcd.git/proto/server/func_handlerequest.go
-$(outdir)/bin/nshd: src/lukeshu.com/git/go/libnslcd.git/proto/server/type_nilbackend.go
-$(outdir)/bin/nshd: src/nshd/main.go
-$(outdir)/bin/nshd: $(call golang.src,$(srcdir)) $(var)conf_file $(var)bindir
- $(call golang.install,$(topsrcdir),nshd)
+$(outdir)/bin/cmd-nshd: src/lukeshu.com/git/go/libnslcd.git/proto/server/interface_backend.go
+$(outdir)/bin/cmd-nshd: src/lukeshu.com/git/go/libnslcd.git/proto/server/func_handlerequest.go
+$(outdir)/bin/cmd-nshd: src/lukeshu.com/git/go/libnslcd.git/proto/server/type_nilbackend.go
+$(outdir)/bin/cmd-nshd: src/cmd-nshd/main.go
+$(outdir)/bin/cmd-nshd: $(call golang.src,$(srcdir)) $(var)conf_file $(var)bindir
+ $(call golang.install,$(topsrcdir),cmd-nshd)
$(outdir)/%.o: $(srcdir)/%.c $(var)CC $(var)CPPFLAGS $(var)CFLAGS
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $(filter-out $(var)%,$^)
@@ -72,9 +72,9 @@ $(outdir)/%: $(srcdir)/%.in
$(outdir)/nshd.service: $(var)user $(var)bindir
$(outdir)/nshd.sysusers: $(var)user
$(outdir)/scripts/common.rb: $(var)conf_file
-$(outdir)/src/nshd/main.go: $(var)conf_file $(var)bindir
+$(outdir)/src/cmd-nshd/main.go: $(var)conf_file $(var)bindir
-$(DESTDIR)$(bindir)/%: $(outdir)/bin/%
+$(DESTDIR)$(bindir)/%: $(outdir)/bin/cmd-%
install -TDm755 $< $@
$(DESTDIR)$(bindir)/%: $(srcdir)/scripts/%
install -TDm755 $< $@
diff --git a/src/cmd-nshd/.gitignore b/src/cmd-nshd/.gitignore
new file mode 100644
index 0000000..00870e2
--- /dev/null
+++ b/src/cmd-nshd/.gitignore
@@ -0,0 +1 @@
+/main.go
diff --git a/src/nshd/main.go.in b/src/cmd-nshd/main.go.in
index 7dd4cae..d888f27 100644
--- a/src/nshd/main.go.in
+++ b/src/cmd-nshd/main.go.in
@@ -19,12 +19,12 @@ package main
import (
"lukeshu.com/git/go/libnslcd.git/systemd"
- "nshd/hackers_git"
+ hackers_nslcd_backend "parabola_hackers/nslcd_backend"
"os"
)
func main() {
- backend := &hackers_git.Hackers{
+ backend := &hackers_nslcd_backend.Hackers{
CfgFilename: "@conf_file@",
YamlCat: "@bindir@/meta-cat",
}
diff --git a/src/nshd/hackers_git/check_password.go b/src/parabola_hackers/nslcd_backend/check_password.go
index 84a5a24..1458b6f 100644
--- a/src/nshd/hackers_git/check_password.go
+++ b/src/parabola_hackers/nslcd_backend/check_password.go
@@ -14,7 +14,7 @@
// License along with this manual; if not, see
// <http://www.gnu.org/licenses/>.
-package hackers_git
+package hackers_nslcd_backend
import "lukeshu.com/git/go/libgnulinux.git/crypt"
diff --git a/src/nshd/hackers_git/db_config.go b/src/parabola_hackers/nslcd_backend/db_config.go
index cdbb7db..934498d 100644
--- a/src/nshd/hackers_git/db_config.go
+++ b/src/parabola_hackers/nslcd_backend/db_config.go
@@ -14,7 +14,7 @@
// License along with this manual; if not, see
// <http://www.gnu.org/licenses/>.
-package hackers_git
+package hackers_nslcd_backend
import (
p "lukeshu.com/git/go/libnslcd.git/proto"
diff --git a/src/nshd/hackers_git/db_group.go b/src/parabola_hackers/nslcd_backend/db_group.go
index af1ac2c..8990fad 100644
--- a/src/nshd/hackers_git/db_group.go
+++ b/src/parabola_hackers/nslcd_backend/db_group.go
@@ -14,7 +14,7 @@
// License along with this manual; if not, see
// <http://www.gnu.org/licenses/>.
-package hackers_git
+package hackers_nslcd_backend
import (
p "lukeshu.com/git/go/libnslcd.git/proto"
diff --git a/src/nshd/hackers_git/db_pam.go b/src/parabola_hackers/nslcd_backend/db_pam.go
index 977104e..6b2a7c7 100644
--- a/src/nshd/hackers_git/db_pam.go
+++ b/src/parabola_hackers/nslcd_backend/db_pam.go
@@ -14,7 +14,7 @@
// License along with this manual; if not, see
// <http://www.gnu.org/licenses/>.
-package hackers_git
+package hackers_nslcd_backend
import (
"crypto/rand"
diff --git a/src/nshd/hackers_git/db_passwd.go b/src/parabola_hackers/nslcd_backend/db_passwd.go
index d6e4f16..514a8b3 100644
--- a/src/nshd/hackers_git/db_passwd.go
+++ b/src/parabola_hackers/nslcd_backend/db_passwd.go
@@ -14,7 +14,7 @@
// License along with this manual; if not, see
// <http://www.gnu.org/licenses/>.
-package hackers_git
+package hackers_nslcd_backend
import (
p "lukeshu.com/git/go/libnslcd.git/proto"
diff --git a/src/nshd/hackers_git/db_shadow.go b/src/parabola_hackers/nslcd_backend/db_shadow.go
index 2df4026..26b1b05 100644
--- a/src/nshd/hackers_git/db_shadow.go
+++ b/src/parabola_hackers/nslcd_backend/db_shadow.go
@@ -14,7 +14,7 @@
// License along with this manual; if not, see
// <http://www.gnu.org/licenses/>.
-package hackers_git
+package hackers_nslcd_backend
import (
p "lukeshu.com/git/go/libnslcd.git/proto"
diff --git a/src/nshd/hackers_git/gid.go b/src/parabola_hackers/nslcd_backend/gid.go
index 852b9a3..eabdbd7 100644
--- a/src/nshd/hackers_git/gid.go
+++ b/src/parabola_hackers/nslcd_backend/gid.go
@@ -14,7 +14,7 @@
// License along with this manual; if not, see
// <http://www.gnu.org/licenses/>.
-package hackers_git
+package hackers_nslcd_backend
import "lukeshu.com/git/go/libgnulinux.git/getgr"
diff --git a/src/nshd/hackers_git/hackers.go b/src/parabola_hackers/nslcd_backend/hackers.go
index b9a0b9a..66312c6 100644
--- a/src/nshd/hackers_git/hackers.go
+++ b/src/parabola_hackers/nslcd_backend/hackers.go
@@ -14,9 +14,9 @@
// License along with this manual; if not, see
// <http://www.gnu.org/licenses/>.
-// Package hackers_git is an nslcd_server Backend that speaks to
-// hackers.git.
-package hackers_git
+// Package hackers_nslcd_backend is an nslcd_server Backend that
+// speaks to hackers.git.
+package hackers_nslcd_backend
import (
"lukeshu.com/git/go/libnslcd.git/proto"
diff --git a/src/nshd/hackers_git/hackers_parse.go b/src/parabola_hackers/nslcd_backend/hackers_parse.go
index af8c913..b18fdf8 100644
--- a/src/nshd/hackers_git/hackers_parse.go
+++ b/src/parabola_hackers/nslcd_backend/hackers_parse.go
@@ -14,7 +14,7 @@
// License along with this manual; if not, see
// <http://www.gnu.org/licenses/>.
-package hackers_git
+package hackers_nslcd_backend
import (
"fmt"
diff --git a/src/nshd/hackers_git/set.go b/src/parabola_hackers/nslcd_backend/set.go
index f0cf454..7a01c01 100644
--- a/src/nshd/hackers_git/set.go
+++ b/src/parabola_hackers/nslcd_backend/set.go
@@ -14,7 +14,7 @@
// License along with this manual; if not, see
// <http://www.gnu.org/licenses/>.
-package hackers_git
+package hackers_nslcd_backend
func set2list(set map[string]bool) []string {
list := make([]string, len(set))