remove i386ancient and need at least debian stable to build

* Removed the i386ancient standalone tarball build for linux, which
  was increasingly unable to support new git-annex features.
* Removed support for building with ghc older than 9.0.2,
  and with older versions of haskell libraries than are in current Debian
  stable.
* stack.yaml: Update to lts-23.2.

Note that i386ancient was targeting linux 2.6.32, which has been EOL for
over 9 years now. Any old system still using such a kernel is certainly highly
insecure. And I suspect i386ancient had its own insecurities due to haskell
libraries and C libraries not having been updated.
This commit is contained in:
Joey Hess 2025-01-01 14:15:55 -04:00
parent 292acd3c28
commit da5e195597
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
24 changed files with 27 additions and 180 deletions

View file

@ -39,7 +39,7 @@ signingKey = "89C809CB"
-- it in the repository.
autobuilds :: [(URLString, FilePath)]
autobuilds =
(map linuxarch ["i386", "amd64", "armel", "arm64", "i386-ancient", "arm64-ancient"]) ++
(map linuxarch ["i386", "amd64", "armel", "arm64", "arm64-ancient"]) ++
[ (autobuild "x86_64-apple-catalina/git-annex.dmg", "git-annex/OSX/current/10.15_Catalina/git-annex.dmg")
, (autobuild "windows/git-annex-installer.exe", "git-annex/windows/current/git-annex-installer.exe")
]

View file

@ -13,6 +13,12 @@ git-annex (10.20241203) UNRELEASED; urgency=medium
transition when preferred content is set to "".
* Honor annex.addunlocked configuration when importing a tree from a
special remote.
* Removed the i386ancient standalone tarball build for linux, which
was increasingly unable to support new git-annex features.
* Removed support for building with ghc older than 9.0.2,
and with older versions of haskell libraries than are in current Debian
stable.
* stack.yaml: Update to lts-23.2.
-- Joey Hess <id@joeyh.name> Mon, 02 Dec 2024 13:41:31 -0400

View file

@ -170,7 +170,7 @@ getFeed o url st =
-- Use parseFeedFromFile rather than reading the file
-- ourselves because it goes out of its way to handle encodings.
parse tmpf = liftIO (parseFeedFromFile' tmpf) >>= \case
parse tmpf = liftIO (parseFeedFromFile tmpf) >>= \case
Nothing -> debugfeedcontent tmpf "parsing the feed failed"
Just f -> do
case decodeBS $ fromFeedText $ getFeedTitle f of
@ -201,13 +201,6 @@ getFeed o url st =
record (Just (Just (playlistDownloads url playlist)))
next $ return True
parseFeedFromFile' :: FilePath -> IO (Maybe Feed)
#if MIN_VERSION_feed(1,1,0)
parseFeedFromFile' = parseFeedFromFile
#else
parseFeedFromFile' f = catchMaybeIO (parseFeedFromFile f)
#endif
data ToDownload = ToDownload
{ feedurl :: URLString
, location :: DownloadLocation

View file

@ -12,10 +12,8 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DataKinds, FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
#if MIN_VERSION_persistent_template(2,8,0)
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE StandaloneDeriving #-}
#endif
module Database.ContentIdentifier (
ContentIdentifierHandle,

View file

@ -5,17 +5,14 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE QuasiQuotes, TypeFamilies, TypeOperators, TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DataKinds, FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
#if MIN_VERSION_persistent_template(2,8,0)
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE StandaloneDeriving #-}
#endif
module Database.Export (
ExportHandle,

View file

@ -5,7 +5,6 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
@ -13,10 +12,8 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeOperators #-}
#if MIN_VERSION_persistent_template(2,8,0)
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE StandaloneDeriving #-}
#endif
module Database.Fsck (
FsckHandle,

View file

@ -6,17 +6,14 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE QuasiQuotes, TypeFamilies, TypeOperators, TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleContexts, EmptyDataDecls #-}
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE DataKinds, FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
#if MIN_VERSION_persistent_template(2,8,0)
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE StandaloneDeriving #-}
#endif
module Database.ImportFeed (
ImportFeedDbHandle,

View file

@ -5,17 +5,14 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE QuasiQuotes, TypeFamilies, TypeOperators, TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
{-# LANGUAGE RankNTypes, ScopedTypeVariables #-}
{-# LANGUAGE DataKinds, FlexibleInstances #-}
{-# LANGUAGE UndecidableInstances #-}
#if MIN_VERSION_persistent_template(2,8,0)
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE StandaloneDeriving #-}
#endif
module Database.Keys.SQL where

View file

@ -5,7 +5,6 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE QuasiQuotes, TypeFamilies, TemplateHaskell #-}
{-# LANGUAGE OverloadedStrings, GADTs, FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses, GeneralizedNewtypeDeriving #-}
@ -13,10 +12,8 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE TypeOperators #-}
#if MIN_VERSION_persistent_template(2,8,0)
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE StandaloneDeriving #-}
#endif
module Database.RepoSize (
RepoSizeHandle,

View file

@ -5,7 +5,7 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE OverloadedStrings, GADTs, CPP #-}
{-# LANGUAGE OverloadedStrings, GADTs #-}
module Messages.JSON (
JSONBuilder,
@ -35,11 +35,7 @@ import Control.Applicative
import qualified Data.Map as M
import qualified Data.Vector as V
import qualified Data.ByteString.Lazy as L
#if MIN_VERSION_aeson(2,0,0)
import qualified Data.Aeson.KeyMap as HM
#else
import qualified Data.HashMap.Strict as HM
#endif
import System.IO
import System.IO.Unsafe (unsafePerformIO)
import Control.Concurrent

View file

@ -366,12 +366,8 @@ storeHelper info h magic f object p = liftIO $ case partSize info of
resp <- sendS3Handle h req
vid <- mkS3VersionID object
<$> extractFromResourceT (S3.porVersionId resp)
#if MIN_VERSION_aws(0,22,0)
etag <- extractFromResourceT (Just (S3.porETag resp))
return (etag, vid)
#else
return (Nothing, vid)
#endif
multipartupload fsz partsz = runResourceT $ do
contenttype <- liftIO getcontenttype
let startreq = (S3.postInitiateMultipartUpload (bucket info) object)
@ -751,11 +747,7 @@ rewritePreconditionException a = catchJust (Url.matchStatusCodeException want) a
storeExportWithContentIdentifierS3 :: S3HandleVar -> Remote -> RemoteStateHandle -> S3Info -> Maybe Magic -> FilePath -> Key -> ExportLocation -> [ContentIdentifier] -> MeterUpdate -> Annex ContentIdentifier
storeExportWithContentIdentifierS3 hv r rs info magic src k loc _overwritablecids p
| versioning info = go
#if MIN_VERSION_aws(0,22,0)
| otherwise = go
#else
| otherwise = giveup "git-annex is built with too old a version of the aws library to support this operation"
#endif
where
go = storeExportS3' hv r rs info magic src k loc p >>= \case
(_, Just vid) -> return $
@ -1370,11 +1362,7 @@ getS3VersionIDPublicUrls mk info rs k =
-- setting versioning in a bucket that git-annex has already exported
-- files to risks losing the content of those un-versioned files.
enableBucketVersioning :: SetupStage -> S3Info -> ParsedRemoteConfig -> RemoteGitConfig -> UUID -> Annex ()
#if MIN_VERSION_aws(0,21,1)
enableBucketVersioning ss info c gc u = do
#else
enableBucketVersioning ss info _ _ _ = do
#endif
case ss of
Init -> when (versioning info) $
enableversioning (bucket info)
@ -1382,7 +1370,6 @@ enableBucketVersioning ss info _ _ _ = do
AutoEnable oldc -> checkunchanged oldc
where
enableversioning b = do
#if MIN_VERSION_aws(0,21,1)
showAction "checking bucket versioning"
hdl <- mkS3HandleVar c gc u
let setversioning = S3.putBucketVersioning b S3.VersioningEnabled
@ -1401,15 +1388,6 @@ enableBucketVersioning ss info _ _ _ = do
#else
void $ liftIO $ runResourceT $ sendS3Handle h setversioning
#endif
#else
showLongNote $ unlines
[ "This version of git-annex cannot auto-enable S3 bucket versioning."
, "You need to manually enable versioning in the S3 console"
, "for the bucket \"" ++ T.unpack b ++ "\""
, "https://docs.aws.amazon.com/AmazonS3/latest/user-guide/enable-versioning.html"
, "It's important you enable versioning before storing anything in the bucket!"
]
#endif
checkunchanged oldc = do
oldpc <- parsedRemoteConfig remote oldc

View file

@ -5,8 +5,6 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module Test.Framework where
import Test.Tasty
@ -858,13 +856,7 @@ initTestsName :: String
initTestsName = "Init Tests"
tastyParser :: [TestTree] -> ([String], Parser Test.Tasty.Options.OptionSet)
#if MIN_VERSION_tasty(1,3,0)
tastyParser ts = go
#else
tastyParser ts = ([], go)
#endif
where
go = suiteOptionParser ingredients (topLevelTestGroup ts)
tastyParser ts = suiteOptionParser ingredients (topLevelTestGroup ts)
ingredients :: [Ingredient]
ingredients =

View file

@ -7,7 +7,7 @@
- License: BSD-2-clause
-}
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances, CPP #-}
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
module Utility.Aeson (
module X,
@ -21,9 +21,7 @@ module Utility.Aeson (
import Data.Aeson as X (decode, eitherDecode, parseJSON, FromJSON, Object, object, Value(..), (.=), (.:), (.:?))
import Data.Aeson hiding (encode)
import qualified Data.Aeson
#if MIN_VERSION_aeson(2,0,0)
import qualified Data.Aeson.Key as AK
#endif
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import qualified Data.ByteString.Lazy as L
@ -73,13 +71,8 @@ packString s = case T.decodeUtf8' (encodeBS s) of
Right t -> t
Left _ -> T.pack s
#if MIN_VERSION_aeson(2,0,0)
textKey :: T.Text -> AK.Key
textKey = AK.fromText
#else
textKey :: T.Text -> T.Text
textKey = id
#endif
-- | The same as packString . decodeBS, but more efficient in the usual
-- case.

View file

@ -10,11 +10,7 @@
module Utility.MonotonicClock where
#if MIN_VERSION_clock(0,3,0)
import qualified System.Clock as Clock
#else
import qualified System.Posix.Clock as Clock
#endif
#ifdef linux_HOST_OS
import Utility.Exception
#endif

View file

@ -219,21 +219,7 @@ waitForProcess h = do
return r
cleanupProcess :: (Maybe Handle, Maybe Handle, Maybe Handle, ProcessHandle) -> IO ()
#if MIN_VERSION_process(1,6,4)
cleanupProcess = Utility.Process.Shim.cleanupProcess
#else
cleanupProcess (mb_stdin, mb_stdout, mb_stderr, pid) = do
-- Unlike the real cleanupProcess, this does not wait
-- for the process to finish in the background, so if
-- the process ignores SIGTERM, this can block until the process
-- gets around the exiting.
terminateProcess pid
let void _ = return ()
maybe (return ()) (void . tryNonAsync . hClose) mb_stdin
maybe (return ()) hClose mb_stdout
maybe (return ()) hClose mb_stderr
void $ waitForProcess pid
#endif
{- | Like hGetLine, reads a line from the Handle. Returns Nothing if end of
- file is reached, or the handle is closed, or if the process has exited

View file

@ -12,7 +12,6 @@
-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
module Utility.TList (
TList,
@ -45,11 +44,7 @@ newTList = newEmptyTMVar
headTList :: TList a -> STM a
headTList tlist = do
dl <- takeTMVar tlist
#if MIN_VERSION_dlist(1,0,0)
let !dl' = D.fromList $ D.tail dl
#else
let !dl' = D.tail dl
#endif
unless (emptyDList dl') $
putTMVar tlist dl'
return (D.head dl)

View file

@ -5,8 +5,6 @@
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
module Utility.TimeStamp (
parserPOSIXTime,
parsePOSIXTime,
@ -62,11 +60,7 @@ formatPOSIXTime fmt t = formatTime defaultTimeLocale fmt (posixSecondsToUTCTime
{- Truncate the resolution to the specified number of decimal places. -}
truncateResolution :: Int -> POSIXTime -> POSIXTime
#if MIN_VERSION_time(1,9,1)
truncateResolution n t = secondsToNominalDiffTime $
fromIntegral ((truncate (nominalDiffTimeToSeconds t * d)) :: Integer) / d
where
d = 10 ^ n
#else
truncateResolution _ t = t
#endif

View file

@ -5,8 +5,6 @@
- Licensed under the GNU AGPL version 3 or higher.
-}
{-# LANGUAGE CPP #-}
module Utility.Tor (
OnionPort,
OnionAddress(..),
@ -51,12 +49,8 @@ connectHiddenService (OnionAddress address) port = do
return s
where
torsocksport = 9050
#if MIN_VERSION_socks(0,6,0)
torsockconf = defaultSocksConf $ SockAddrInet torsocksport $
tupleToHostAddress (127,0,0,1)
#else
torsockconf = defaultSocksConf "127.0.0.1" torsocksport
#endif
socksdomain = SocksAddrDomainName (BU8.fromString address)
socksaddr = SocksAddress socksdomain (fromIntegral port)

View file

@ -15,9 +15,6 @@
<h2>Linux arm64</h2>
<iframe width=1024 height=40em scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/arm64/build-version">
</iframe>
<h2>Linux i386-ancient</h2>
<iframe width=1024 height=40em scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/i386-ancient/build-version">
</iframe>
<h2>Linux arm64-ancient</h2>
<iframe width=1024 height=40em scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/arm64-ancient/build-version">
</iframe>
@ -43,9 +40,6 @@
<h2>Linux arm64</h2>
<iframe width=1024 scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/arm64/">
</iframe>
<h2>Linux i386-ancient</h2>
<iframe width=1024 scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/i386-ancient/">
</iframe>
<h2>Linux arm64-ancient</h2>
<iframe width=1024 scrolling=no frameborder=0 marginheight=0 marginwidth=0 src="https://downloads.kitenet.net/git-annex/autobuild/arm64-ancient/">
</iframe>

View file

@ -25,7 +25,7 @@ case $(uname -m) in
arch=amd64
;;
x86_32)
arch=i386-ancient
arch=i386
;;
*)
echo "unknown architecture $(uname -m), cannot install" >&2

View file

@ -7,7 +7,6 @@ dependencies and is self-contained.
* x86-64: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz)
* x86-32: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-i386.tar.gz)
* x86-32, for ancient kernels: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-i386-ancient.tar.gz)
* arm: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-armel.tar.gz)
* arm64: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-arm64.tar.gz)
* arm64, for ancient kernels: [download tarball](https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-arm64-ancient.tar.gz)
@ -27,11 +26,6 @@ linux systems.
* [[tips/Synology_NAS_and_git_annex]]
* [[forum_thread|forum/new_linux_arm_tarball_build]]
The x86-32 build for ancient kernels is for use with Linux kernel
versions such as 2.6.32. It will work on both 32 and 64 bit systems.
This build does not support some of git-annex's newer features,
notably [[smart_http|tips/smart_http_server]].
The arm64 build for ancient kernels is for Linux kernels such as 4.19,
which is still in use on Android phones.
@ -41,7 +35,6 @@ An hourly autobuild is also available, hosted by [[Joey]]:
* x86-64: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/amd64/git-annex-standalone-amd64.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/amd64/))
* x86-32: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/i386/git-annex-standalone-i386.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/i386/))
* x86-32, for ancient kernels: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/i386-ancient/git-annex-standalone-i386-ancient.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/i386-ancient/))
* arm64: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/arm64/git-annex-standalone-arm64.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/arm64/))
* arm64, for ancient kernels: [download tarball](https://downloads.kitenet.net/git-annex/autobuild/arm64-ancient/git-annex-standalone-arm64-ancient.tar.gz) ([build logs](https://downloads.kitenet.net/git-annex/autobuild/arm64-ancient/))

View file

@ -192,14 +192,14 @@ source-repository head
custom-setup
Setup-Depends:
base (>= 4.11.1.0 && < 5.0),
base (>= 4.15.1.0 && < 5.0),
split,
filepath,
exceptions,
bytestring,
filepath-bytestring (>= 1.4.2.1.4),
process (>= 1.6.3),
time (>= 1.5.0),
process (>= 1.6.4),
time (>= 1.9.1),
directory (>= 1.2.7.0),
async,
utf8-string,
@ -208,7 +208,7 @@ custom-setup
Executable git-annex
Main-Is: git-annex.hs
Build-Depends:
base (>= 4.11.1.0 && < 5.0),
base (>= 4.15.1.0 && < 5.0),
network-uri (>= 2.6),
optparse-applicative (>= 0.14.2),
containers (>= 0.5.8),
@ -216,11 +216,11 @@ Executable git-annex
stm (>= 2.3),
mtl (>= 2),
uuid (>= 1.2.6),
process (>= 1.6.3),
process (>= 1.6.4),
data-default,
case-insensitive,
random,
dlist,
dlist (>= 1.0),
unix-compat (>= 0.5 && < 0.8),
SafeSemaphore,
async,
@ -246,20 +246,20 @@ Executable git-annex
http-conduit (>= 2.3.0),
http-client-restricted (>= 0.0.2),
conduit,
time (>= 1.5.0),
time (>= 1.9.1),
old-locale,
persistent-sqlite (>= 2.8.1),
persistent (>= 2.8.1),
persistent-template,
persistent-template (>= 2.8.0),
unliftio-core,
microlens,
aeson,
aeson (>= 2.0.0),
vector,
tagsoup,
unordered-containers,
feed (>= 1.0.0),
feed (>= 1.1.0),
regex-tdfa,
socks,
socks (>= 0.6.0),
byteable,
stm-chans,
securemem,
@ -271,17 +271,17 @@ Executable git-annex
concurrent-output (>= 1.10),
unbounded-delays,
QuickCheck (>= 2.10.0),
tasty (>= 1.2),
tasty (>= 1.3.0),
tasty-hunit,
tasty-quickcheck,
tasty-rerun,
ansi-terminal >= 0.9,
aws (>= 0.20),
aws (>= 0.22.1),
DAV (>= 1.0),
network (>= 3.0.0.0),
network-bsd,
git-lfs (>= 1.2.0),
clock (>= 0.2.0.0)
clock (>= 0.3.0)
CC-Options: -Wall
GHC-Options: -Wall -fno-warn-tabs -Wincomplete-uni-patterns
Default-Language: Haskell2010

View file

@ -13,7 +13,6 @@ flags:
servant: true
packages:
- '.'
resolver: nightly-2024-07-29
resolver: lts-23.2
extra-deps:
- filepath-bytestring-1.4.100.3.2
- aws-0.24.3

View file

@ -1,45 +0,0 @@
flags:
git-annex:
production: true
parallelbuild: true
assistant: true
pairing: true
torrentparser: true
magicmime: false
dbus: false
debuglocks: false
benchmark: false
crypton: false
servant: false
packages:
- '.'
extra-deps:
- IfElse-0.85
- aws-0.22
- bloomfilter-2.0.1.0
- tasty-1.2
- tasty-rerun-1.1.14
- torrent-10000.1.1
- sandi-0.5
- filepath-bytestring-1.4.2.1.6
- ansi-terminal-0.9.1
- ansi-wl-pprint-0.6.9
- concurrent-output-1.10.15
- git-lfs-1.2.0
- http-client-restricted-0.0.5
- http-client-0.7.11
- http-client-tls-0.3.6.1
- http-conduit-2.3.8
- network-3.0.1.0
- network-bsd-2.8.1.0
- dbus-1.2.4
- simple-sendfile-0.2.30
- network-multicast-0.3.2
- socks-0.6.1
- wai-extra-3.0.25
- warp-3.2.26
- connection-0.3.0
- DAV-1.3.4
explicit-setup-deps:
git-annex: true
resolver: lts-12.14