Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag
Index: geoipupdate/main.go
===================================================================
--- geoipupdate/main.go	(nonexistent)
+++ geoipupdate/main.go	(revision 5)
@@ -0,0 +1,78 @@
+package main
+
+import (
+	"fmt"
+	"log"
+	"net/http"
+	"os"
+	"path/filepath"
+
+	"github.com/maxmind/geoipupdate/v4/pkg/geoipupdate"
+	"github.com/maxmind/geoipupdate/v4/pkg/geoipupdate/database"
+	"github.com/pkg/errors"
+)
+
+var (
+	version                  = "4.8.0"
+	defaultConfigFile        = "/etc/GeoIP.conf"
+	defaultDatabaseDirectory = "/usr/share/GeoIP"
+)
+
+func main() {
+	log.SetFlags(0)
+
+	if defaultConfigFile == "" {
+		defaultConfigFile = geoipupdate.DefaultConfigFile
+	}
+	if defaultDatabaseDirectory == "" {
+		defaultDatabaseDirectory = geoipupdate.DefaultDatabaseDirectory
+	}
+
+	args := getArgs()
+	fatalLogger := func(message string, err error) {
+		if args.StackTrace {
+			log.Print(fmt.Sprintf("%s: %+v", message, err))
+		} else {
+			log.Print(fmt.Sprintf("%s: %s", message, err))
+		}
+		os.Exit(1)
+	}
+
+	config, err := geoipupdate.NewConfig(
+		args.ConfigFile, defaultDatabaseDirectory, args.DatabaseDirectory, args.Verbose)
+	if err != nil {
+		fatalLogger(fmt.Sprintf("error loading configuration file %s", args.ConfigFile), err)
+	}
+
+	if config.Verbose {
+		log.Printf("geoipupdate version %s", version)
+		log.Printf("Using config file %s", args.ConfigFile)
+		log.Printf("Using database directory %s", config.DatabaseDirectory)
+	}
+
+	client := geoipupdate.NewClient(config)
+
+	if err = run(client, config); err != nil {
+		fatalLogger("error retrieving updates", err)
+	}
+}
+
+func run(client *http.Client, config *geoipupdate.Config) error {
+	dbReader := database.NewHTTPDatabaseReader(client, config)
+
+	for _, editionID := range config.EditionIDs {
+		filename, err := geoipupdate.GetFilename(config, editionID, client)
+		if err != nil {
+			return errors.Wrapf(err, "error retrieving filename for %s", editionID)
+		}
+		filePath := filepath.Join(config.DatabaseDirectory, filename)
+		dbWriter, err := database.NewLocalFileDatabaseWriter(filePath, config.LockFile, config.Verbose)
+		if err != nil {
+			return errors.Wrapf(err, "error creating database writer for %s", editionID)
+		}
+		if err := dbReader.Get(dbWriter, editionID); err != nil {
+			return errors.WithMessagef(err, "error while getting database for %s", editionID)
+		}
+	}
+	return nil
+}
Index: geoipupdate
===================================================================
--- geoipupdate	(nonexistent)
+++ geoipupdate	(revision 5)

Property changes on: geoipupdate
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: .
===================================================================
--- .	(nonexistent)
+++ .	(revision 5)

Property changes on: .
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,73 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~