-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Packaging is now up to date and follows the recommended project layout. See https://github.com/golang-standards/project-layout
- Loading branch information
Showing
353 changed files
with
167,471 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
bin/ | ||
src/hooktftp | ||
./hooktftp | ||
test/files/ | ||
test/fixtures/ | ||
test/shell/ | ||
test/web/ | ||
test/hooktftp.pid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ before_script: | |
- sudo apt-get install -q -y atftp python | ||
|
||
script: | ||
- make build | ||
- make test | ||
|
||
go: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
**This guide is intended for hooktftp maintainers. If you are not a maintainer, | ||
you probably want to check out the [documentation](README.md) instead.** | ||
**This guide is intended for hooktftp maintainers. If you are not a maintainer, you probably want to check out the [documentation](README.md) instead.** | ||
|
||
## Package release HOWTO | ||
|
||
You made some updates on hooktftp and want to release a new version for your | ||
users? Make sure to complete this todo list. | ||
You made some updates on hooktftp and want to release a new version for your users? Make sure to complete this todo list. | ||
|
||
|
||
### Docker image | ||
### Make sure debian package is still working | ||
|
||
Build the Docker image: | ||
A debian/ directory is provided to create a .deb package. To make sure it is still working, run the following commands: | ||
|
||
$> docker build -t tftpgoteam/hooktftp:latest . | ||
$> make shell | ||
#> apt-get install -y build-essential debhelper golang-go | ||
#> dpkg-buildpackage -us -uc | ||
#> cd .. | ||
#> dpkg -i hooktftp_.deb | ||
|
||
A docker image needs to be pushed on the [Docker | ||
hub](https://hub.docker.com/r/tftpgoteam/hooktftp/). Ping @brmzkw on Github or | ||
send him an email at castets.j - at - gmail.com to ask him to make the release. | ||
If you want to do it by yourself, ask him to grant you the permissions to do | ||
so. | ||
### Docker image | ||
|
||
Push the image: | ||
Build and release the [Docker image](https://hub.docker.com/r/tftpgoteam/hooktftp/): | ||
|
||
$> docker push tftpgoteam/hooktftp:latest | ||
$> make release-docker-image | ||
|
||
Alternatively, the command `make release` will build and push the image for you. | ||
Ping @brmzkw on Github or send him an email at castets.j - at - gmail.com to ask him to make the release. If you want to do it by yourself, ask him to grant you the permissions to do so. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,28 @@ | ||
.PHONY: build | ||
build: | ||
$(MAKE) -C src | ||
go build ./cmd/hooktftp | ||
|
||
.PHONY: build-docker-image | ||
build-docker-image: | ||
docker build -t tftpgoteam/hooktftp:latest . | ||
|
||
.PHONY: release-docker-image | ||
release-docker-image: build-docker-image | ||
docker push tftpgoteam/hooktftp:latest | ||
|
||
.PHONY: shell | ||
shell: build-docker-image | ||
docker run --rm -ti -v $(shell pwd):/go/src/github.com/tftp-go-team/hooktftp/ -w /go/src/github.com/tftp-go-team/hooktftp --name hooktftp hooktftp-shell bash | ||
|
||
.PHONY: test | ||
test: build | ||
$(MAKE) -C src test | ||
$(MAKE) -C test all | ||
go test ./... | ||
|
||
.PHONY: clean | ||
clean: | ||
$(MAKE) -C src clean | ||
go clean | ||
$(MAKE) -C test clean | ||
|
||
.PHONY: gox | ||
gox: | ||
$(MAKE) -C src gox | ||
|
||
shell: | ||
docker build -t hooktftp-shell . | ||
docker run --rm -ti -v $(shell pwd):/go/src/github.com/tftp-go-team/hooktftp -w /go/src/github.com/tftp-go-team/hooktftp --name hooktftp hooktftp-shell bash | ||
|
||
release: | ||
docker build -t tftpgoteam/hooktftp:latest . | ||
docker push tftpgoteam/hooktftp:latest | ||
$(MAKE) ./cmd/hooktftp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package main | ||
|
||
import hooktftp "github.com/tftp-go-team/hooktftp/internal" | ||
|
||
func main() { | ||
hooktftp.HookTFTP() | ||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
hooktftp_1.0.0_amd64.buildinfo utils extra | ||
hooktftp_1.0.0_amd64.deb utils extra |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
dh_update_autotools_config | ||
dh_auto_configure | ||
dh_auto_build | ||
dh_auto_test | ||
dh_prep | ||
dh_installdirs | ||
dh_auto_install | ||
dh_install | ||
dh_installdocs | ||
dh_installchangelogs | ||
dh_installinit | ||
dh_perl | ||
dh_link | ||
dh_strip_nondeterminism | ||
dh_compress | ||
dh_fixperms | ||
dh_missing | ||
dh_strip | ||
dh_makeshlibs | ||
dh_shlibdeps | ||
dh_installdeb | ||
dh_gencontrol | ||
dh_md5sums | ||
dh_builddeb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
src/hooktftp /usr/sbin/ | ||
src/hooktftp.yml /etc/ | ||
hooktftp /usr/sbin/ | ||
configs/hooktftp.yml /etc/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
shlibs:Depends=libc6 (>= 2.3.2) | ||
misc:Depends= | ||
misc:Pre-Depends= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module github.com/tftp-go-team/hooktftp | ||
|
||
go 1.14 | ||
|
||
require ( | ||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 | ||
github.com/tftp-go-team/libgotftp v0.0.0-20160115164016-99de0d58e1b9 | ||
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f | ||
launchpad.net/gocheck v0.0.0-20140225173054-000000000087 // indirect | ||
launchpad.net/goyaml v0.0.0-20140305200416-000000000051 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= | ||
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= | ||
github.com/tftp-go-team/libgotftp v0.0.0-20160115164016-99de0d58e1b9 h1:OM0wxbfcSN8wHp4nvvxpW9Horlvkp7FgndGNXhjoP8s= | ||
github.com/tftp-go-team/libgotftp v0.0.0-20160115164016-99de0d58e1b9/go.mod h1:cfvBegOY4cEfGffFkN7AdLZtFY1jo6gXMHCB15Ir72k= | ||
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f h1:gWF768j/LaZugp8dyS4UwsslYCYz9XgFxvlgsn0n9H8= | ||
golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= | ||
launchpad.net/gocheck v0.0.0-20140225173054-000000000087 h1:Izowp2XBH6Ya6rv+hqbceQyw/gSGoXfH/UPoTGduL54= | ||
launchpad.net/gocheck v0.0.0-20140225173054-000000000087/go.mod h1:hj7XX3B/0A+80Vse0e+BUHsHMTEhd0O4cpUHr/e/BUM= | ||
launchpad.net/goyaml v0.0.0-20140305200416-000000000051 h1:pgtOxpWGtZwl5VEGtXB3s+VPsO3QzsZPg4/AS0Ag9HI= | ||
launchpad.net/goyaml v0.0.0-20140305200416-000000000051/go.mod h1:HivH2TsqnIPviNUySFrCE+pbgbJCjrnMj2QH74o4y+w= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ package config | |
|
||
import ( | ||
"errors" | ||
|
||
"launchpad.net/goyaml" | ||
) | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package hooktftp | ||
|
||
import ( | ||
"os/user" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.