diff --git a/cli.go b/cli.go deleted file mode 100644 index c1b6994958139db61b77e7a3babe8a8ac180fa48..0000000000000000000000000000000000000000 --- a/cli.go +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2018-2021, Sylabs Inc. All rights reserved. -// This software is licensed under a 3-clause BSD license. Please consult the -// LICENSE.md file distributed with the sources of this project regarding your -// rights to use or distribute this software. - -package main - -import ( - "log" - "log/syslog" - "os" - "os/user" - "strings" - "fmt" - - "github.com/sylabs/singularity/v4/cmd/internal/cli" - "github.com/sylabs/singularity/v4/internal/pkg/buildcfg" - useragent "github.com/sylabs/singularity/v4/pkg/util/user-agent" -) - -func main() { - logger, err := syslog.New(syslog.LOG_INFO|syslog.LOG_USER, "singularity-start") - if err != nil { - log.Fatalf("Error while connecting to syslog: %v", err) - } - defer logger.Close() - - currentUser, err := user.Current() - if err != nil { - currentUser = &user.User{Username: "unknown"} - } - - hostname, err := os.Hostname() - if err != nil { - hostname = "unknown-host" - } - - pbsJobID := os.Getenv("PBS_JOBID") - if pbsJobID == "" { - pbsJobID = "out-of-job" - } - - cmd := os.Args[0] - args := strings.Join(os.Args[1:], " ") - - message := fmt.Sprintf("%s@%s %s %s %s", currentUser.Username, hostname, pbsJobID, cmd, args) - - logger.Info(message) - - useragent.InitValue(buildcfg.PACKAGE_NAME, buildcfg.PACKAGE_VERSION) - - // In cmd/internal/cli/singularity.go - cli.ExecuteSingularity() -} diff --git a/make.sh b/make.sh index 25491a2b484f4b42037a6dc3f72748e6a6366a65..7ad720f01c9b4130dd6706f5090c31f1e4d295c5 100755 --- a/make.sh +++ b/make.sh @@ -71,7 +71,7 @@ curl -LO https://proot.gitlab.io/proot/bin/proot chmod +x ./proot echo "proot usr/bin" >> debian/singularity-ce.install -# Kopie upraveneho cli.go kvuli logovani pouziti do syslogu +# Patch upraveneho cli.go kvuli logovani pouziti do syslogu #cp -v ${ROOTPWD}/cli.go cmd/singularity/cli.go cp -vr ${ROOTPWD}/debian/patches debian/