ScoopInstaller / Main

📦 The default bucket for Scoop.
https://scoop.sh
The Unlicense
1.58k stars 953 forks source link

[Bug]: Syncthing Shim works wrong, `serve` argument seems that is included #5888

Open SiriosDev opened 3 months ago

SiriosDev commented 3 months ago

Prerequisites

Package Name

Syncthing

Expected/Current Behaviour

The shims should reflect of syncthing.exe and instead reflects the functionality of syncthing.exe serves.

I respectively tried the original executable both installed from scoop and from the original repo, then I tested the shim executable and the output turns out to be equivalent to syncthing.exe serves, finally I checked the json here on github and found nothing that would cause these problems

Steps to Reproduce

scoop install main/syncthing
Installing 'syncthing' (1.27.8) [64bit] from 'main' bucket
syncthing-windows-amd64-v1.27.8.zip (10,4 MB) [===============================================================] 100%
Checking hash of syncthing-windows-amd64-v1.27.8.zip ... ok.
Extracting syncthing-windows-amd64-v1.27.8.zip ... done.
Running pre_install script...
Linking ~\scoop\apps\syncthing\current => ~\scoop\apps\syncthing\1.27.8
Creating shim for 'syncthing'.
Persisting config
'syncthing' (1.27.8) was installed successfully!
Notes
-----
To start syncthing automatically, use a method described at https://docs.syncthing.net/users/autostart.html#windows

(shim execution)
syncthing.exe -h
Usage: syncthing.exe serve [flags]

Run Syncthing

Flags:
  -h, --help                   Show context-sensitive help.

      --no-console             Hide console window
      --config=PATH            Set configuration directory (config and keys)
                               ($STCONFDIR)
      --home=PATH              Set configuration and data directory ($STHOMEDIR)
      --no-default-folder      Don't create the "default" folder on first
                               startup ($STNODEFAULTFOLDER)
      --skip-port-probing      Don't try to find free ports for GUI and listen
                               addresses on first startup
      --allow-newer-config     Allow loading newer than current config version
      --audit                  Write events to audit file
      --auditfile=PATH         Specify audit file (use "-" for stdout, "--" for
                               stderr)
      --browser-only           Open GUI in browser
      --data=PATH              Set data directory (database and logs)
                               ($STDATADIR)
      --device-id              Show the device ID
      --generate=PATH          Generate key and config in specified dir,
                               then exit
      --gui-address=URL        Override GUI address (e.g.
                               "http://192.0.2.42:8443")
      --gui-apikey=API-KEY     Override GUI API key
      --logfile=PATH           Log file name (see below)
      --logflags=BITS          Select information in log line prefix (see below)
      --log-max-old-files=N    Number of old files to keep (zero to keep only
                               current)
      --log-max-size=BYTES     Maximum size of any file (zero to disable log
                               rotation)
      --no-browser             Do not start browser
      --no-restart             Do not restart Syncthing when exiting due to
                               API/GUI command, upgrade, or crash ($STNORESTART)
      --no-upgrade             Disable automatic upgrades ($STNOUPGRADE)
      --paths                  Show configuration paths
      --paused                 Start with all devices and folders paused
      --unpaused               Start with all devices and folders unpaused
      --upgrade                Perform upgrade
      --upgrade-check          Check for available upgrade
      --upgrade-to=URL         Force upgrade directly from specified URL
      --verbose                Print verbose log output
      --version                Show version
      --debug-db-indirect-gc-interval=DURATION
                               Database indirection GC interval
                               ($STGCINDIRECTEVERY)
      --debug-db-recheck-interval=DURATION
                               Database metadata recalculation interval
                               ($STRECHECKDBEVERY)
      --debug-gui-assets-dir=PATH
                               Directory to load GUI assets from ($STGUIASSETS)
      --debug-perf-stats       Write running performance statistics to
                               perf-$pid.csv (Unix only) ($STPERFSTATS)
      --debug-profile-block    Write block profiles to
                               block-$pid-$timestamp.pprof every 20 seconds
                               ($STBLOCKPROFILE)
      --debug-profile-cpu      Write a CPU profile to cpu-$pid.pprof on exit
                               ($STCPUPROFILE)
      --debug-profile-heap     Write heap profiles to heap-$pid-$timestamp.pprof
                               each time heap usage increases ($STHEAPPROFILE)
      --debug-profiler-listen=ADDR
                               Network profiler listen address ($STPROFILER)
      --reset-database         Reset the database, forcing a full rescan and
                               resync
      --reset-deltas           Reset delta index IDs, forcing a full index
                               exchange

The --logflags value is a sum of the following:

   1  Date
   2  Time
   4  Microsecond time
   8  Long filename
  16  Short filename

I.e. to prefix each log line with time and filename, set --logflags=18 (2 + 16
from above). The value 0 is used to disable all of the above. The default is
to show date and time (3).

Logging always happens to the command line (stdout) and optionally to the
file at the path specified by --logfile=path. In addition to an path, the special
values "default" and "-" may be used. The former logs to DATADIR/syncthing.log
(see --data), which is the default on Windows, and the latter only to stdout,
no file, which is the default anywhere else.

Development Settings
--------------------

The following environment variables modify Syncthing's behavior in ways that
are mostly useful for developers. Use with care. See also the --debug-* options
above.

 STTRACE           A comma separated string of facilities to trace. The valid
                   facility strings are listed below.

 STLOCKTHRESHOLD   Used for debugging internal deadlocks; sets debug
                   sensitivity.  Use only under direction of a developer.

 STHASHING         Select the SHA256 hashing package to use. Possible values
                   are "standard" for the Go standard library implementation,
                   "minio" for the github.com/minio/sha256-simd implementation,
                   and blank (the default) for auto detection.

 STVERSIONEXTRA    Add extra information to the version string in logs and the
                   version line in the GUI. Can be set to the name of a wrapper
                   or tool controlling syncthing to communicate this to the end
                   user.

 GOMAXPROCS        Set the maximum number of CPU cores to use. Defaults to all
                   available CPU cores.

 GOGC              Percentage of heap growth at which to trigger GC. Default is
                   100. Lower numbers keep peak memory usage down, at the price
                   of CPU usage (i.e. performance).

Debugging Facilities
--------------------

The following are valid values for the STTRACE variable:

 api             - REST API
 app             - Main run facility
 backend         - The database backend
 beacon          - Multicast and broadcast discovery
 config          - Configuration loading and saving
 connections     - Connection handling
 db              - The database layer
 dialer          - Dialing connections
 discover        - Remote device discovery
 events          - Event generation and logging
 fs              - Filesystem access
 main            - Main package
 model           - The root hub
 nat             - NAT discovery and port mapping
 pmp             - NAT-PMP discovery and port mapping
 protocol        - The BEP protocol
 relay           -
 scanner         - File change detection and hashing
 sha256          - SHA256 hashing package
 stats           - Persistent device and folder statistics
 stun            - STUN functionality
 sync            - Mutexes
 upgrade         - Binary upgrades
 upnp            - UPnP discovery and port mapping
 ur              - Usage reporting
 versioner       - File versioning
 walkfs          - Filesystem access while walking
 watchaggregator - Filesystem event watcher

(directly execution)
syncthing.exe -h
Usage: syncthing.exe <command> [flags]

Flags:
  -h, --help    Show context-sensitive help.

Commands:
  serve                  Run Syncthing
  generate               Generate key and config, then exit
  decrypt                Decrypt or verify an encrypted folder
  cli                    Command line interface for Syncthing
  install-completions    Print commands to install shell completions

Run "syncthing.exe <command> --help" for more information on a command.

Possible Solution

I wouldn't know where to start to find a solution

Scoop and Buckets Version

scoop --version
Current Scoop version:
d337bb1f (HEAD -> master, tag: v0.4.2, origin/master, origin/HEAD) chore(release): Bump to version 0.4.2 (#5964)

'main' bucket:
d30ef5153 (HEAD -> master, origin/master, origin/HEAD) terraform-ls: Update to version 0.33.2

'extras' bucket:
d2a7838fd (HEAD -> master, origin/master, origin/HEAD) sidekick-browser: Update to version 122.60.1.40405-4e57373

'versions' bucket:
be8c8ccc3 (HEAD -> master, origin/master, origin/HEAD) zig-dev: Update to version 0.13.0-dev.378

'nirsoft' bucket:
08dbf0e (HEAD -> master, origin/master, origin/HEAD) 'updated'

'nerd-fonts' bucket:
da97035e (HEAD -> master, origin/master, origin/HEAD) LXGWNeoXiHei: Update to version 1.123.2

'nonportable' bucket:
27edf02c (HEAD -> master, origin/master, origin/HEAD) goodsync-np: Update to version 12.6.9

'games' bucket:
afe7f6f38 (HEAD -> master, origin/master, origin/HEAD) project64-dev: Update to version 4.0.0-6400-65a9097

Scoop Config

scoop config

last_update         scoop_branch scoop_repo
-----------         ------------ ----------
06/06/2024 13:33:36 master       https://github.com/ScoopInstaller/Scoop

PowerShell Version

$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.4.2
PSEdition                      Core
GitCommitId                    7.4.2
OS                             Microsoft Windows 10.0.26227
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Additional Softwares

No response