aboutsummaryrefslogtreecommitdiff
path: root/Makefile
AgeCommit message (Collapse)Author
2026-01-26make: add task to deploy to local machine using rsyncShulhan
2025-12-27make: fix building resolverShulhan
Seems like the "go tool doc" subcommand has been removed on latest release of Go.
2025-06-27Makefile: do not run "embed" when building rescachedShulhan
The embed command should be run once when the assets file in _www changes.
2025-06-13make: remove build task from install tasksShulhan
The build task should be run by user, while install tasks run by root. If we make build depends on install then the binaries will rebuild by user root.
2025-02-08internal/cmd/gocheck: add internal static analyzersShulhan
Instead of using binary fieldalignment and shadow, run them by creating command that call the same Analyzer internally. This analyzers help finding possible panic on httpd.go.
2025-01-11all: replace golangci-lint with "go vet"Shulhan
2024-07-15internal/cmd/www: an HTTP server for testing web UIShulhan
The web user interface can be run using existing rescached server by setting the SERVER value in class Rescached (_www/rescached.js).
2024-03-27all: comply with lintersShulhan
Fix the code as recommended by linters, for example using context for HTTP client request, using 0600 for file permission, using string concatenation instead of fmt, using "%w" for error, and reorder defer.
2024-03-21all: move repository to SourceHutShulhan
2023-09-23Makefile: replace golangci-lint linterShulhan
The golangci-lint become unusable. Even running "make" on the their master branch does not works. Since I use go tip (master) on local, sometimes golangci-lint does not run. This changes replace golangci-lint with "go vet", fieldalignment and shadow (from x/tools), and revive.
2022-05-22all: add all known licensesShulhan
2022-05-22cmd/resolver: add command to print the program versionShulhan
Executing "resolver version" will print the current version based on the latest tag, number of commit, and latest commit hash: v<TAG>.r<number-of-commit>.<commit-hash>
2022-05-22all: simplify cmd/resolver documentationShulhan
It is hard to keep the documentation in sync between manual page, the Go documentation, and command line usage. A changes in manual page need to be copied into two different places. To simplify this, we make the Go doc comment as summary and the command line usage is set from output of `go tool doc ./cmd/resolver`.
2022-05-22all: move the documentation under _www/doc directoryShulhan
This also allow the latest/released documentation viewed on the web user interface under /doc path. While at it, reformat HTML and CSS files using js-beautify and JavaScript files using clang-format [1]. [1] https://google.github.io/styleguide/jsguide.html#formatting
2022-04-20all: move all installation files into directory _sysShulhan
Previously, all files required for installing rescached scattered in different directories. This changes move all files into single directory _sys with the directory structure matched with target system.
2022-04-19all: move the rescached.cfg for test under _test directoryShulhan
2022-04-19all: add option to set the base directoryShulhan
Previously, running an instance of rescached assume that all configurations and cache are located in /etc/rescached and /var/cache/rescached. It possible that we may want to use different base directory (or $PREFIX, in the auto tools terms), for example "/opt/rescached" or as showed in the "dev" task in the Makefile, we use "_test" as base directory for running test instance. This changes also fix an error when loading hosts file from non-existant hosts.d directory.
2022-04-19all: refactoring the hosts blocks format and locationShulhan
This changes add new directory called "block.d" under rescached. This directory contains hosts file fetched from URL defined in hosts block configuration. In this way, we did not mixed between user created hosts file and external hosts file. In the configuration file, we changes the hosts block format from single line hosts_block = <URL> into subsection with dynamic name, [block.d "<name>"] name = <name> url = <URL>
2022-04-16all: apply suggestions from linterShulhan
List of changes, * Remove unused constants keyIsEnabled, keyIsSystem, and keyLastUpdated. * Use the method String on instance of Duration instead of fmt.Sprintf. * Replace any usage of io/ioutil package with its replacement. * Check for error from calling Environment.init and Zone.Add. * Prefix all returned error on hostsBlock.update method. * Add "lint" task as part of default target, build.
2022-04-15Makefile: add task serve-doc to preview documentation using ciigoShulhan
The serve-doc command require ciigo [1] command. [1] git.sr.ht/~shulhan/ciigo
2022-03-15all: change the rescached license to GPL 3.0 or laterShulhan
See https://kilabit.info/journal/2022/gpl/ for more information.
2021-12-27cmd/rescached: add command "embed" and to run in development modeShulhan
This two commands is used internally for development. The "embed" command embed all files inside "_www" directory into Go file "memfs_generate.go". This command replace "internal/generate_memfs.go". The "dev" command run the rescached server in development mode using "cmd/rescached/rescached.cfg.test" as the configuration. The "dev" command listen on DNS port 5350, so to prevent conflict with live rescached server, we run script _bin/nft_dnstest_chain.sh to redirect UDP and TCP requests from port 53 to port 5350.
2021-11-14Makefile: add deploy task, to differentiate with deploy-personal-serverShulhan
Previously, the deploy task is to deploy the new version of rescached to my personal, public server. To make the task names consistent with macos (install-macos, deploy-macos, ...), we rename the deploy to deploy-personal-server; and the deploy task is default to deploying to Linux.
2021-01-26Release rescached v4.0.0 (2021-01-25)v4.0.0Shulhan
== New features Rescached now have a web user interface (wui) that can be accessed at http://127.0.0.1:5380. The interface can be used to monitoring caches, managing caches, environment, blocked hosts, internal hosts files, and zone files. == Breaking changes * The `rescached::dir.hosts` now default to "/etc/rescached/hosts.d" * The `rescached::dir.master` now default to "/etc/rescached/zone.d"
2021-01-24Makefile: add deploy-macos as PHONY taskShulhan
2021-01-23Makefile: remove old memfs file on cleanShulhan
While at it fix the binaries path on uninstall-common.
2021-01-23Makefile: add task to deploy and restart the rescahed service on macosShulhan
Executing `make deploy-macos` will build the binaries and deploy it to DIR_BIN and stop the current running rescached service to allow it to restart automatically.
2021-01-23Makefile: force generate the templateShulhan
The $(wildcard ...) statements seems either does not works on macOS or it does not detech updated files.
2021-01-20all: rewrite the web user interface and the APIsShulhan
2021-01-13Makefile: simplify the tasksShulhan
Let the go tools handling the timestamp on source and test source codes when running build and test.
2021-01-12all: update with latest share modulesShulhan
This changes affect how the memfs.New and GoGenenerate called, does not affect the user.
2020-09-02Makefile: set DIR_BIN, DIR_MAN, and DIR_RESCACHED on uninstall-macosShulhan
While at it, remove unused, OS specific, "coverbrowse" task.
2020-09-02all: include the generated man pagesShulhan
This is to minimize user to install additional tools to build and install this software.
2020-08-22Makefile: generate static file only when one of build files changesShulhan
2020-07-26all: remove unused hosts.block fileShulhan
2020-07-26all: implement the user interface to change configurationShulhan
This is the first web UI (wui) where user can change configuration on the fly. The wui is implemented using svelte.dev and can be accessed on http://127.0.0.1:5380.
2020-05-07all: rename "doc" to "_doc"Shulhan
This is to ignore the directory being scanned by Go tools.
2020-05-07all: rename "scripts" to "_scripts"Shulhan
This is to ignore the directory being scanned by Go tools.
2020-05-07Makefile: add task to deploy rescached to remote serverShulhan
2019-12-26Makefile: remove unused option "CGO_ENABLED=0"Shulhan
2019-12-26Makefile: remove invalid task "install-service-systemd"Shulhan
2019-12-18Makefile: fix the installation scriptShulhan
On Makefile the shell compound syntax '{}' may not recognized and will result in the statement not executed as expected. Fix #4.
2019-09-29all: support macOSShulhan
This changes add the macOS launchd script and make tasks to install and uninstall in macOS.
2019-09-10Makefile: disable cgo when building and installing binariesShulhan
2019-03-02make: remove lint task from build and debugShulhan
lint-ing task optional actually, but it will display a warning when building binary without linting tools exist in user environment.
2019-01-28all: fix the example certificate and key for DNS over HTTPSShulhan
Previously, the Common Name (CN) for certificate is not a valid local domain name, because we tested it using IP address instead of domain name. This commit use the "localhost" in certificate CN and in configuration for DoH in browser.
2019-01-28makefile: run linter on buildShulhan
2018-12-24make: replace tool to generate manpage with asciidoctorShulhan
2018-11-30make.lint: enable all lintersShulhan
2018-09-29make: install an example of certificate filesShulhan