git-annex/BuildFlags.hs
Joey Hess 17c86e50c0
webapp: Remove support for local pairing
As a feature only supported by the webapp, and not by git-annex at the
command line, this is by now a very obscure corner of git-annex, and not
one I want to keep maintaining.

It's worth removing it to avoid the security expsure alone. People using
the assistant w/o the webapp probably don't expect it to be listening on
a UDP port for a handrolled protocol, but it was.

The webapp has supported pairing via magic-wormhole since 2016, which
makes a link including between local computers, albeit with the overhead
of tor. That sort of covers the same use case. Of course advanced users
can easily enough add a ssh remote to their repository themselves, using
a hostname on the local network.

git-annex-p2p-iroh would be a great alternative, since it should
communicate over LAN when both computers are on the same one. Before
supporting that in the webapp, dumbpipe would need to be reasonably
likely to be installed.

Sponsored-by: unqueued
2026-01-01 15:26:49 -04:00

92 lines
1.8 KiB
Haskell

{- git-annex build flags
-
- Copyright 2013-2017 Joey Hess <id@joeyh.name>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module BuildFlags where
import Data.List
import Data.Ord
import qualified Data.CaseInsensitive as CI
buildFlags :: [String]
buildFlags = filter (not . null)
[ ""
#ifdef WITH_ASSISTANT
, "Assistant"
#else
#warning Building without the assistant.
#endif
#ifdef WITH_WEBAPP
, "Webapp"
#else
#warning Building without the webapp.
#endif
#ifdef WITH_INOTIFY
, "Inotify"
#endif
#ifdef WITH_FSEVENTS
, "FsEvents"
#endif
#ifdef WITH_KQUEUE
, "Kqueue"
#endif
#ifdef WITH_DBUS
, "DBus"
#endif
#ifdef WITH_DESKTOP_NOTIFY
, "DesktopNotify"
#endif
#ifdef WITH_TORRENTPARSER
, "TorrentParser"
#endif
#ifdef WITH_MAGICMIME
, "MagicMime"
#endif
#ifdef WITH_BENCHMARK
, "Benchmark"
#endif
#ifdef DEBUGLOCKS
, "DebugLocks"
#endif
-- Always enabled now, but users may be used to seeing these flags
-- listed.
, "Feeds"
, "Testsuite"
, "S3"
, "WebDAV"
, "Servant"
#ifdef WITH_OSPATH
, "OsPath"
#else
#warning Building without the OsPath build flag set results in slower filename manipulation and is not recommended.
#endif
]
-- Not a complete list, let alone a listing transitive deps, but only
-- the ones that are often interesting to know.
dependencyVersions :: [String]
dependencyVersions = map fmt $ sortBy (comparing (CI.mk . fst))
[ ("feed", VERSION_feed)
, ("uuid", VERSION_uuid)
, ("bloomfilter", VERSION_bloomfilter)
, ("http-client", VERSION_http_client)
, ("crypton", VERSION_crypton)
, ("aws", VERSION_aws)
, ("DAV", VERSION_DAV)
#ifdef WITH_TORRENTPARSER
, ("torrent", VERSION_torrent)
#endif
#ifdef WITH_WEBAPP
, ("yesod", VERSION_yesod)
#endif
#ifdef TOOL_VERSION_ghc
, ("ghc", TOOL_VERSION_ghc)
#endif
]
where
fmt (p, v) = p ++ "-" ++ v