Taken from https://raw.githubusercontent.com/archlinux/svntogit-community/packages/haskell-bytestring-handle/trunk/ghc9.patch --- bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Write.hs.orig 2021-06-21 14:54:12.217134401 +0800 +++ bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Write.hs 2021-06-21 15:24:01.794796505 +0800 @@ -17,7 +17,7 @@ import GHC.IO.Buffer ( BufferState(..), emptyBuffer, Buffer(..) ) import GHC.IO.BufferedIO ( BufferedIO(..) ) -import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..) ) +import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..), RawIO(..) ) #if MIN_VERSION_base(4,5,0) import GHC.IO.Encoding ( getLocaleEncoding ) #else @@ -138,6 +138,7 @@ seek_base = error "seek_base needs to be updated" }) modifyIORef (write_size ws) (`max` newSeekPos) + pure newSeekPos tell ws = do ss <- readIORef (write_seek_state ws) @@ -152,6 +153,12 @@ devType _ = return RegularFile -- TODO: is this correct? +instance RawIO WriteState where + read _ _ _ _ = return 0 + readNonBlocking _ _ _ _ = return Nothing + write _ _ _ _ = return () + writeNonBlocking _ _ _ _ = return 0 + ioe_seekOutOfRange :: IO a ioe_seekOutOfRange = ioException $ IOError Nothing InvalidArgument "" --- bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Read.hs.orig 2021-06-21 14:53:55.433129276 +0800 +++ bytestring-handle-0.1.0.6/src/Data/ByteString/Handle/Read.hs 2021-06-21 15:24:25.998784996 +0800 @@ -24,7 +24,7 @@ , emptyBuffer, isEmptyBuffer, newBuffer, newByteBuffer , bufferElems, withBuffer, withRawBuffer ) import GHC.IO.BufferedIO ( BufferedIO(..) ) -import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..) ) +import GHC.IO.Device ( IODevice(..), IODeviceType(..), SeekMode(..), RawIO(..) ) #if MIN_VERSION_base(4,5,0) import GHC.IO.Encoding ( getLocaleEncoding ) #else @@ -155,7 +155,7 @@ (seek_before_length curSeekState) (fromIntegral (seek_pos curSeekState) + seekPos) SeekFromEnd -> normalisedSeekState (read_chunks_backwards rs) [] (read_length rs) seekPos - maybe ioe_seekOutOfRange (writeIORef (read_seek_state rs)) newSeekState + maybe ioe_seekOutOfRange (\nss -> writeIORef (read_seek_state rs) nss >> pure (fromIntegral(seek_pos nss))) newSeekState tell rs = do ss <- readIORef (read_seek_state rs) @@ -166,6 +166,12 @@ devType _ = return RegularFile -- TODO: is this correct? +instance RawIO ReadState where + read _ _ _ _ = return 0 + readNonBlocking _ _ _ _ = return Nothing + write _ _ _ _ = return () + writeNonBlocking _ _ _ _ = return 0 + ioe_seekOutOfRange :: IO a ioe_seekOutOfRange = ioException $ IOError Nothing InvalidArgument "" n class='msg-tooltip'>* gnu/build/activation.scm (activate-firmware): Check if firmware loading is enabled before attempting to use it. Marius Bakke 2022-03-01initrd: Use non-hyphenated kernel command-line parameter names....This is to make it less surprising, given the common convention sets forth by the kernel Linux command-line parameters. * gnu/build/linux-boot.scm (boot-system): Rename '--load', '--repl', '--root' and '--system' to 'gnu.load', 'gnu.repl', 'root' and 'gnu.system', respectively. Adjust doc. (find-long-option): Adjust doc. * gnu/installer/parted.scm (installer-root-partition-path): Adjust accordingly. * gnu/system.scm (bootable-kernel-arguments): Add a VERSION argument and update doc. Use VERSION to conditionally return old style vs new style initrd arguments. (%boot-parameters-version): Increment to 1. (operating-system-boot-parameters): Adjust doc. (operating-system-boot-parameters-file): Likewise. * gnu/system/linux-initrd.scm (raw-initrd, base-initrd): Likewise. * doc/guix.texi: Adjust doc. * gnu/build/activation.scm (boot-time-system): Adjust accordingly. * gnu/build/hurd-boot.scm (boot-hurd-system): Likewise. * gnu/packages/commencement.scm (%final-inputs-riscv64): Adjust comment. Maxim Cournoyer 2021-07-29services: setuid: More configurable setuid support....New record <setuid-program> with fields for setting the specific user and group, as well as specifically selecting the setuid and setgid bits, for a program within the setuid-program-service. * gnu/services.scm (setuid-program-file-like-deprecated): New function. (setuid-program-service-type): Make use of setuid-program->activation-gexp. Adjust the extend property to handle <setuid-program>. * gnu/build/activation.scm (activate-setuid-programs): Update to expect a <setuid-record> list for each program entry. * gnu/system.scm: (operating-system-setuid-programs): Renamed to %operating-system-setuid-programs and replace it with new procedure. (operating-system-default-essential-services, hurd-default-essential-services): Replace operating-system-setuid-programs with %operating-system-setuid-programs. * gnu/system/setuid.scm: New file. * doc/guix.texi (Setuid Programs): Document <setuid-program>. Co-authored-by: Brice Waegeneire <brice@waegenei.re> Chris Lemmer-Webber 2021-04-03activation: Do not dereference symlinks during home directory creation....Fixes <https://bugs.gnu.org/47584>. * gnu/build/activation.scm (copy-account-skeletons): Do not chown the home directory; leave this to 'activate-user-home'. (activate-user-home): Only chown the home directory after the account skeletons have been copied. Co-authored-by: Ludovic Courtès <ludo@gnu.org>. Maxime Devos 2021-03-10services: Prevent following symlinks during activation....This addresses a potential security issue, where a compromised service could trick the activation code in changing the permissions, owner and group of arbitrary files. However, this patch is currently only a partial fix, due to a TOCTTOU (time-of-check to time-of-use) race, which can be fixed once guile has bindings to openat and friends. Fixes: <https://lists.gnu.org/archive/html/guix-devel/2021-01/msg00388.html> * gnu/build/activation.scm: new procedure 'mkdir-p/perms'. * gnu/services/authentication.scm (%nslcd-activation, nslcd-service-type): use new procedure. * gnu/services/cups.scm (%cups-activation): likewise. * gnu/services/dbus.scm (dbus-activation): likewise. * gnu/services/dns.scm (knot-activation): likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Maxime Devos