Release Version 1.1.0

parent 0254a805
# Changelog
## Version 1.1.0
* Add: Version dropdown next to product dropdown
* Add: Button to delete reports and associated minidump and text files
* Add: Symbolicator path configurable in the config file
* Add: Install target to Makefile **(Read updated UPDATE guide!)**
* Add: Changelog
* Change: Show more details of a crahs on the crash page
* Change: Updated UPDATE guide
* Change: Updated INSTALL guide
* Fix: Create version if symbols are uploaded for non-existing version
* Fix: Crash on wrong symbolicator output (CrashingThread > len(Threads))
## Version 1.0.3
* Add: Pagination on crashes page
* Change: Run migrations as transaction
* Change: Improve UPDATE guide
* Change: Update breakpad submodule
* Change: Order crashes by popularity
* Change: Store generated TXT reports in file system
* Change: Only return ID to report sender (instead of whole json object)
* Fix: Missing signature in report view
* Fix: Do not unnecessarily generate TXT reports
* Fix: Fail after first DB connection try
* Fix: Performance improvements
* Fix: Show full crashed thread instead of truncated version
* Fix: Check for errors on `io.Copy()`
* Fix: Migrations naming
* Remove: Obsolete upload_syms application
## Version 1.0.2
* Fix: Missing govendor dependency
## Version 1.0.1
* Add: UPDATE guide
* Add: Migrations
* Change: Move API endpoint `/api/` to `/api/v1/`
* Change: Serve Chart.js locally
## Version 1.0.0
Initial release
...@@ -40,6 +40,7 @@ govendor sync ...@@ -40,6 +40,7 @@ govendor sync
Run make to build the executable: Run make to build the executable:
``` ```
make make
make prefix=PREFIX install
``` ```
## Configuration ## Configuration
...@@ -49,13 +50,13 @@ DatabaseConnection = "host=localhost user=crashdragon password=crashdragon dbnam ...@@ -49,13 +50,13 @@ DatabaseConnection = "host=localhost user=crashdragon password=crashdragon dbnam
UseSocket = false UseSocket = false
BindAddress = "0.0.0.0:8080" BindAddress = "0.0.0.0:8080"
BindSocket = "/var/run/crashdragon/crashdragon.sock" BindSocket = "/var/run/crashdragon/crashdragon.sock"
ContentDirectory = "/root/CrashDragon/Files" ContentDirectory = "../share/crashdragon/files"
TemplatesDirectory = "./templates" TemplatesDirectory = "../share/crashdragon/templates"
AssetsDirectory = "./assets" AssetsDirectory = "../share/crashdragon/assets"
SymbolicatorPath = "./build/bin/minidump_stackwalk" SymbolicatorPath = "./minidump_stackwalk"
``` ```
The configuration file can be found in `$HOME/CrashDragon/config.toml` and can be edited with whatever editor you like. The configuration file can be found in `PREFIX/etc/crashdragon.toml` and can be edited with whatever editor you like.
## Running ## Running
The server can be started by running `./bin/crashdragon`, this will keep the server process in the foreground. You can write init.d or systemctl scripts based on this command. The server can be started by running `PREFIX/bin/crashdragon`, this will keep the server process in the foreground. You can write init.d or systemctl scripts based on this command.
...@@ -70,13 +70,32 @@ clean: ...@@ -70,13 +70,32 @@ clean:
rm -rf build/ rm -rf build/
cd breakpad && $(MAKE) distclean cd breakpad && $(MAKE) distclean
install: install: all
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) bin/crashdragon $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) bin/crashdragon $(DESTDIR)$(bindir)
$(INSTALL_PROGRAM) build/bin/minidump_stackwalk $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) build/bin/minidump_stackwalk $(DESTDIR)$(bindir)
$(INSTALL_DATA) -d assets/stylesheets/app.css $(DESTDIR)$(datadir)/crashdragon/assets $(INSTALL) -d $(DESTDIR)$(datadir)/crashdragon/assets
$(INSTALL_DATA) -d $(ASSETS_JS) $(DESTDIR)$(datadir)/crashdragon/assets/javascripts $(INSTALL_DATA) assets/stylesheets/app.css $(DESTDIR)$(datadir)/crashdragon/assets
$(INSTALL_DATA) -d $(ASSETS_FONTS) $(DESTDIR)$(datadir)/crashdragon/assets/fonts/bootstrap $(INSTALL) -d $(DESTDIR)$(datadir)/crashdragon/assets/javascripts
$(INSTALL_DATA) -d $(HTML_TEMPLATES) $(DESTDIR)$(datadir)/crashdragon/templates $(INSTALL_DATA) $(ASSETS_JS) $(DESTDIR)$(datadir)/crashdragon/assets/javascripts
$(INSTALL) -d $(DESTDIR)$(datadir)/crashdragon/assets/fonts/bootstrap
$(INSTALL_DATA) $(ASSETS_FONTS) $(DESTDIR)$(datadir)/crashdragon/assets/fonts/bootstrap
.PHONY: install clean all $(INSTALL) -d $(DESTDIR)$(datadir)/crashdragon/templates
$(INSTALL_DATA) $(HTML_TEMPLATES) $(DESTDIR)$(datadir)/crashdragon/templates
$(INSTALL) -d $(DESTDIR)$(sysconfdir)
uninstall:
rm $(DESTDIR)$(bindir)/crashdragon
rm $(DESTDIR)$(bindir)/minidump_stackwalk
rm $(DESTDIR)$(datadir)/crashdragon/assets/app.css
rm $(addprefix $(DESTDIR)$(datadir)/crashdragon/assets/javascripts/,$(notdir $(ASSETS_JS)))
rm $(addprefix $(DESTDIR)$(datadir)/crashdragon/assets/fonts/bootstrap/,$(notdir $(ASSETS_FONTS)))
rm $(addprefix $(DESTDIR)$(datadir)/crashdragon/templates/,$(notdir $(HTML_TEMPLATES)))
rmdir $(DESTDIR)$(datadir)/crashdragon/assets/fonts/bootstrap/
rmdir $(DESTDIR)$(datadir)/crashdragon/assets/fonts/
rmdir $(DESTDIR)$(datadir)/crashdragon/assets/javascripts/
rmdir $(DESTDIR)$(datadir)/crashdragon/assets
rmdir $(DESTDIR)$(datadir)/crashdragon/templates/
rmdir $(DESTDIR)$(datadir)/crashdragon
.PHONY: uninstall install clean all
# Updating # Updating
To update the project run ## Version 1.0.x to 1.1.0
If you upgrade from version 1.0.x to 1.1.0 your config file will be moved from
`$HOME/CrashDragon/config.toml` to `PREFIX/etc/crashdragon.toml`! Also the
directories for assets and templates change to `PREFIX/share/crashdragon/...`,
this must be changed in the config file *manually*! An example can be found in
`INSTALL.md`. If you changed assets or templates you will also have to move
these. Uploaded files (symfiles, minidumps and generated textfiles) are now
located in `PREFIX/share/crashdragon/files` so you will have to either move
them there or adapt the configuration to point to your custom directory!
## All versions
To update the project run
``` ```
git fetch git fetch
``` ```
followed by followed by
...@@ -25,7 +38,15 @@ After that you have to run the database migrations. This can be done by running ...@@ -25,7 +38,15 @@ After that you have to run the database migrations. This can be done by running
``` ```
psql -U username -d dataBase -a -f migrations/file.sql psql -U username -d dataBase -a -f migrations/file.sql
``` ```
or the command matching your database set up. The migrations must be run after or the command matching your database setup. The migrations must be run after
each other, so if you use v0.0.1 and want to update to v1.0.0 you have to run another, so if you use v0.0.1 and want to update to v1.0.0 you have to run
every migration on the way there (v0.0.1 -> v0.1.0 -> v0.1.1 -> v1.0.0) else every migration on the way there (v0.0.1 -> v0.1.0 -> v0.1.1 -> v1.0.0) else
there may be stuff missing. there may be stuff missing. If there is no migration file for your version you
only have to run the remaining migrations on the way to your version.
To compile the new version and also install it in your spcified `PREFIX` run
the following:
```
make prefix=PREFIX install
```
...@@ -55,10 +55,10 @@ func GetConfig(path string) error { ...@@ -55,10 +55,10 @@ func GetConfig(path string) error {
C.UseSocket = false C.UseSocket = false
C.BindAddress = "0.0.0.0:8080" C.BindAddress = "0.0.0.0:8080"
C.BindSocket = "/var/run/crashdragon/crashdragon.sock" C.BindSocket = "/var/run/crashdragon/crashdragon.sock"
C.ContentDirectory = filepath.Join(os.Getenv("HOME"), "/CrashDragon/Files") C.ContentDirectory = "../share/crashdragon/files"
C.TemplatesDirectory = "./templates" C.TemplatesDirectory = "../share/crashdragon/templates"
C.AssetsDirectory = "./assets" C.AssetsDirectory = "../share/crashdragon/assets"
C.SymbolicatorPath = "./build/bin/minidump_stackwalk" C.SymbolicatorPath = "./minidump_stackwalk"
var cerr error var cerr error
if _, err := os.Stat(path); err == nil { if _, err := os.Stat(path); err == nil {
......
...@@ -92,14 +92,26 @@ func initRouter() *gin.Engine { ...@@ -92,14 +92,26 @@ func initRouter() *gin.Engine {
router.POST("/reports", PostReports) router.POST("/reports", PostReports)
router.Static("/static", config.C.AssetsDirectory) router.Static("/static", config.C.AssetsDirectory)
router.LoadHTMLGlob("templates/*.html") router.LoadHTMLGlob(filepath.Join(config.C.TemplatesDirectory, "*.html"))
return router return router
} }
func main() { func main() {
log.SetFlags(log.Lshortfile) log.SetFlags(log.Lshortfile)
log.SetOutput(os.Stderr) log.SetOutput(os.Stderr)
err := config.GetConfig(filepath.Join(os.Getenv("HOME"), "CrashDragon/config.toml")) // TODO: Remove in next version
legacy := filepath.Join(os.Getenv("HOME"), "CrashDragon/config.toml")
current := "../etc/crashdragon.toml"
if _, err := os.Stat(legacy); err == nil {
// Legacy config exists
err := os.Rename(legacy, current)
if err != nil {
log.Panicf("Can not move config from %s to %s!", legacy, current)
}
log.Printf("Config moved from %s to %s to reflect new install method!", legacy, current)
}
// TODO: Allow user-specified config path
err := config.GetConfig(current)
if err != nil { if err != nil {
log.Fatalf("FAT Config error: %+v", err) log.Fatalf("FAT Config error: %+v", err)
return return
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment