diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2021-02-03 14:38:00 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2021-02-03 14:53:02 +1300 |
commit | 2a093fe701e0706830c340b7b2fbd03c26be60d4 (patch) | |
tree | 1c7d0d5f66fc610d2500e6df0cbe141e836c981b | |
parent | Remove executable content support (diff) | |
download | shavit-master.tar.gz shavit-master.zip |
Switch listen to systemd socket activationHEADv0.0.0-tejr1master
-rw-r--r-- | .build.yml | 31 | ||||
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | go.mod | 4 | ||||
-rw-r--r-- | go.sum | 9 | ||||
-rw-r--r-- | handler.go | 2 | ||||
-rw-r--r-- | logger.go | 2 | ||||
-rw-r--r-- | main.go | 2 | ||||
-rw-r--r-- | recover.go | 2 |
9 files changed, 19 insertions, 41 deletions
diff --git a/.build.yml b/.build.yml deleted file mode 100644 index 79ccb7b..0000000 --- a/.build.yml +++ /dev/null @@ -1,31 +0,0 @@ -image: fedora/latest -packages: - - go - - tar -sources: - - https://git.sr.ht/~yotam/shavit - - https://git.sr.ht/~sircmpwn/annotatego -secrets: - - f43da1db-697d-4101-8607-e96f574b035a -tasks: -- lint: | - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0 - go get honnef.co/go/tools/cmd/staticcheck - cd shavit - go vet - ~/go/bin/staticcheck - ~/go/bin/golangci-lint run -- test: | - cd shavit - go test -- build: | - cd shavit - go build -- annotatego: | - cd annotatego - go build - sudo cp annotatego /usr/bin/ -- annotate: | - cd shavit - annotatego -v git.sr.ht/~yotam/shavit... >annotations.json - ~/upload-annotations annotations.json yotam shavit diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b04db74 --- /dev/null +++ b/Makefile @@ -0,0 +1,3 @@ +all: shavit +shavit: + CGO_ENABLED=0 go build -a -ldflags '-extldflags "-static"' -o $@ . @@ -26,3 +26,8 @@ configuration file might look like this: With this configuration file the server will look for a certificate and key in `/var/gemini` and for documents in `/var/gemini/docs`. + +## Fork + +This is a fork by Tom Ryder <tom@sanctum.geek.nz> that replaces the default +listening socket with systemd activation. @@ -1,9 +1,9 @@ -module git.sr.ht/~yotam/shavit +module sanctum.geek.nz/code/shavit.git.git go 1.12 require ( - git.sr.ht/~yotam/go-gemini v0.0.0-20191109201753-fe15cf054c37 github.com/BurntSushi/toml v0.3.1 github.com/pelletier/go-toml v1.6.0 // indirect + sanctum.geek.nz/code/go-gemini.git.git v0.0.0-tejr1 ) @@ -1,12 +1,13 @@ -git.sr.ht/~yotam/go-gemini v0.0.0-20191101110121-e84e0b63cd37 h1:NWDz215k8nz6PGmbCb1YsUWrp9ocqnyKLnUoDCzzgU8= -git.sr.ht/~yotam/go-gemini v0.0.0-20191101110121-e84e0b63cd37/go.mod h1:KxQlipD0Ti7MfV3itYJfuvgcvd+SOlRTtbOK+A0DCCE= -git.sr.ht/~yotam/go-gemini v0.0.0-20191109201753-fe15cf054c37 h1:ga6iPmFGpSgIHAc3cxxqOksOyP14FcP2mQz86AF5q8k= -git.sr.ht/~yotam/go-gemini v0.0.0-20191109201753-fe15cf054c37/go.mod h1:KxQlipD0Ti7MfV3itYJfuvgcvd+SOlRTtbOK+A0DCCE= github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/coreos/go-systemd/v22 v22.1.0 h1:kq/SbG2BCKLkDKkjQf5OWwKWUKj1lgs3lFI4PxnR5lg= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/google/go-cmp v0.3.1 h1:Xye71clBPdm5HgqGwUkwhbynsUJZhDbS20FvLhQ2izg= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/pelletier/go-toml v1.6.0/go.mod h1:5N711Q9dKgbdkxHL+MEfF31hpT7l0S0s/t2kKREewys= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +sanctum.geek.nz/code/go-gemini.git.git v0.0.0-tejr1 h1:TFL6Ht6quaVkxv1+JdpTsg5SpqtCQHTyPc0mXAJucn0= +sanctum.geek.nz/code/go-gemini.git.git v0.0.0-tejr1/go.mod h1:Sr0lsNdlueaHKDHYN1jCEsCKLpGnhA0RaiuRAdaat8s= @@ -8,7 +8,7 @@ import ( "path/filepath" "strings" - gemini "git.sr.ht/~yotam/go-gemini" + gemini "sanctum.geek.nz/code/go-gemini.git.git" ) // Handler is the main handler of the server @@ -3,7 +3,7 @@ package main import ( "log" - gemini "git.sr.ht/~yotam/go-gemini" + gemini "sanctum.geek.nz/code/go-gemini.git.git" ) // LoggingHandler wrap a Gemini handler and log all the requsts and responses @@ -4,7 +4,7 @@ import ( "log" "mime" - gemini "git.sr.ht/~yotam/go-gemini" + gemini "sanctum.geek.nz/code/go-gemini.git.git" ) func main() { @@ -1,7 +1,7 @@ package main import ( - gemini "git.sr.ht/~yotam/go-gemini" + gemini "sanctum.geek.nz/code/go-gemini.git.git" ) // RecovererHandler wrap a Gemini handler and recover from panics |