summaryrefslogtreecommitdiffstats
path: root/meta-app-framework
AgeCommit message (Expand)AuthorFilesLines
2019-06-19af-main: Version bump for running as agl-driverJosé Bollo1-1/+1
2019-06-19af-platform-setup: Add recipe for setting platformJosé Bollo3-0/+21
2019-06-19Enforce separation of users using UMASKJosé Bollo2-2/+10
2019-06-19af-main: Remove afm-user-daemon and bump versionJosé Bollo2-7/+1
2019-06-19af-main: Add dependency to m4 and sedJosé Bollo1-1/+1
2019-06-19af-main: Drop capabilities of applicationsJosé Bollo2-1/+2
2019-06-19af-main: Improve readabilityJosé Bollo1-2/+2
2019-06-13af-binder: Add recent improvements and fixesBechir Mghirbi1-1/+1
2019-04-30af-binder: New packagingJosé Bollo1-28/+53
2019-04-09af-binder: Add recent improvements and fixesJosé Bollo1-1/+1
2019-04-04Upgrade to thudScott Murray4-3/+8
2019-03-25af-binder: Ensure validy of event loopJosé Bollo1-1/+1
2019-03-25af-main: Add ability to manage all widgetJosé Bollo1-1/+1
2019-03-15af-binder: Fix lock issueJosé Bollo1-1/+1
2019-02-18af-main: Update version and datesJosé Bollo1-1/+1
2019-02-18af-binder: Fix concurrent issue SPEC-2163José Bollo1-1/+1
2019-02-06af-binder: bump to latest revision (fix SPEC-2161)Stephane Desneux1-1/+1
2019-02-06af-main: bump to latest revisionStephane Desneux1-1/+1
2019-02-05af-binder: Fix multithreadingJose Bollo1-1/+1
2019-01-18systemd-agl-sync: raise priority of the fragment that reloads systemdStephane Desneux1-1/+1
2019-01-05af-binder: bump revisionStephane Desneux1-1/+1
2019-01-02af-main: Upgrade app-framework-mainJose Bollo1-1/+1
2018-12-31af-binder: Fix lock of sync/async callsJose Bollo1-1/+1
2018-12-14systemd: Refactor build using smack-system-setupJosé Bollo2-20/+1
2018-12-13af-binder: UpgradeJosé Bollo1-1/+1
2018-12-10af-main: UpgradeJose Bollo1-1/+1
2018-11-22app-framework: Update versionsJosé Bollo2-2/+2
2018-11-22Change default aglwgt build procedureRomain Forlot1-7/+22
2018-11-09nss-localuser: Add the NSS plugin for localuserJosé Bollo2-0/+38
2018-11-06af-binder: Bump versionJosé Bollo1-1/+1
2018-11-02af-main: Bump versionJosé Bollo1-1/+1
2018-10-31meta-app-framework/base-files: fix /usr/local symlink target pathStephane Desneux1-1/+1
2018-10-29Add CMake Apps module recipeRomain Forlot1-0/+3
2018-09-28Move security manager database under /var/localAnton Gerasimov2-5/+5
2018-09-14af-main & af-binder: Set version from AGLVERSIONJose Bollo7-0/+8
2018-09-09af-binder & af-main: Update to version 5.99.FFRC6José Bollo2-2/+2
2018-08-24Add the afb-test binding in the devel AGL imageRomain Forlot1-0/+10
2018-08-24af-binder & af-main: Bump to version FF-rc4José Bollo2-2/+2
2018-08-20af-binder & af-main: Add external binding featureJose Bollo2-2/+2
2018-08-03af-binder: UpgradeJosé Bollo1-1/+1
2018-08-01Remove porter reference from meta-aglRonan Le Martret1-4/+0
2018-07-25af-main: set relax handling for apps signatures even when agl-devel is not setStephane Desneux1-1/+21
2018-07-20af-main: Bug fixesJosé Bollo2-2/+2
2018-07-20af-binder: Bug fixesJosé Bollo1-1/+1
2018-07-11af-binder: Remove call to niceJosé Bollo1-1/+1
2018-07-10Application Framework: Fix bugsJosé Bollo2-2/+2
2018-07-06meta-app-framework/af-binder: bump to latest master revision for (version 5.9...Stephane Desneux1-1/+1
2018-06-22af-binder: Upgrade to binding v3José Bollo2-2/+2
2018-05-313rd part of the layer/profile rework [1/2]Jan-Simon Möller12-141/+3
2018-04-06af-main: Refactor of user session managementJosé Bollo2-3/+5
="nx">Config.Options.LogFile != "stdout" { logFile := ctx.Config.Options.LogFile fdL, err := os.OpenFile(logFile, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0666) if err != nil { msgErr := fmt.Sprintf("Cannot create log file %s", logFile) return cli.NewExitError(msgErr, int(syscall.EPERM)) } ctx.Log.Out = fdL logPrint(ctx, "Logging file: %s\n", logFile) } logFileHTTPReq := filepath.Join(ctx.Config.FileConf.LogsDir, "xds-server-verbose.log") fdLH, err := os.OpenFile(logFileHTTPReq, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0666) if err != nil { msgErr := fmt.Sprintf("Cannot create log file %s", logFileHTTPReq) return cli.NewExitError(msgErr, int(syscall.EPERM)) } ctx.Config.LogVerboseOut = fdLH logPrint(ctx, "Logging file for HTTP requests: %s\n", logFileHTTPReq) } // Create syncthing instance when section "syncthing" is present in config.json if ctx.Config.FileConf.SThgConf != nil { ctx.SThg = st.NewSyncThing(ctx.Config, ctx.Log) } // Start local instance of Syncthing and Syncthing-notify if ctx.SThg != nil { ctx.Log.Infof("Starting Syncthing...") ctx.SThgCmd, err = ctx.SThg.Start() if err != nil { return cli.NewExitError(err, -4) } logPrint(ctx, "Syncthing started (PID %d)\n", ctx.SThgCmd.Process.Pid) ctx.Log.Infof("Starting Syncthing-inotify...") ctx.SThgInotCmd, err = ctx.SThg.StartInotify() if err != nil { return cli.NewExitError(err, -4) } logPrint(ctx, "Syncthing-inotify started (PID %d)\n", ctx.SThgInotCmd.Process.Pid) // Establish connection with local Syncthing (retry if connection fail) logPrint(ctx, "Establishing connection with Syncthing...\n") time.Sleep(2 * time.Second) maxRetry := 30 retry := maxRetry err = nil for retry > 0 { if err = ctx.SThg.Connect(); err == nil { break } ctx.Log.Warningf("Establishing connection to Syncthing (retry %d/%d)", retry, maxRetry) time.Sleep(time.Second) retry-- } if err != nil || retry == 0 { return cli.NewExitError(err, -4) } // FIXME: do we still need Builder notion ? if no cleanup if ctx.Config.Builder, err = xdsconfig.NewBuilderConfig(ctx.SThg.MyID); err != nil { return cli.NewExitError(err, -4) } } // Init model folder ctx.MFolders = model.FoldersNew(ctx.Config, ctx.SThg) // Load initial folders config from disk if err := ctx.MFolders.LoadConfig(); err != nil { return cli.NewExitError(err, -5) } // Init cross SDKs ctx.SDKs, err = crosssdk.Init(ctx.Config, ctx.Log) if err != nil { return cli.NewExitError(err, -6) } // Create Web Server ctx.WWWServer = webserver.New(ctx.Config, ctx.MFolders, ctx.SDKs, ctx.Log) // Run Web Server until exit requested (blocking call) if err = ctx.WWWServer.Serve(); err != nil { ctx.Log.Println(err) return cli.NewExitError(err, -7) } return cli.NewExitError("Program exited ", -99) } // main func main() { // Create a new instance of the logger log := logrus.New() // Create a new App instance app := cli.NewApp() app.Name = appName app.Description = appDescription app.Usage = appUsage app.Version = AppVersion + " (" + AppSubVersion + ")" app.Authors = appAuthors app.Copyright = appCopyright app.Metadata = make(map[string]interface{}) app.Metadata["version"] = AppVersion app.Metadata["git-tag"] = AppSubVersion app.Metadata["logger"] = log app.Flags = []cli.Flag{ cli.StringFlag{ Name: "config, c", Usage: "JSON config file to use\n\t", EnvVar: "APP_CONFIG", }, cli.StringFlag{ Name: "log, l", Value: "error", Usage: "logging level (supported levels: panic, fatal, error, warn, info, debug)\n\t", EnvVar: "LOG_LEVEL", }, cli.StringFlag{ Name: "logfile", Value: "stdout", Usage: "filename where logs will be redirected (default stdout)\n\t", EnvVar: "LOG_FILENAME", }, cli.BoolFlag{ Name: "no-folderconfig, nfc", Usage: fmt.Sprintf("Do not read folder config file (%s)\n\t", xdsconfig.FoldersConfigFilename), EnvVar: "NO_FOLDERCONFIG", }, } // only one action: Web Server app.Action = xdsApp app.Run(os.Args) }