Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1270338 > unrolled thread

Bug#1120778: "cabal unpack foo" adds MSDOS/Windows carriage returns (^M)

Started byNicholas D Steeves <sten@debian.org>
First post2025-11-16 03:50 +0100
Last post2025-11-18 19:40 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#1120778: "cabal unpack foo" adds MSDOS/Windows carriage returns (^M) Nicholas D Steeves <sten@debian.org> - 2025-11-16 03:50 +0100
    Bug#1120778: "cabal unpack foo" adds MSDOS/Windows carriage returns (^M) Clint Adams <clint@debian.org> - 2025-11-17 23:30 +0100
      Bug#1120778: "cabal unpack foo" adds MSDOS/Windows carriage returns (^M) Nicholas D Steeves <sten@debian.org> - 2025-11-18 19:40 +0100

#1270338 — Bug#1120778: "cabal unpack foo" adds MSDOS/Windows carriage returns (^M)

FromNicholas D Steeves <sten@debian.org>
Date2025-11-16 03:50 +0100
SubjectBug#1120778: "cabal unpack foo" adds MSDOS/Windows carriage returns (^M)
Message-ID<LRAZX-diu3-1@gated-at.bofh.it>
Package: cabal-debian
Severity: normal
X-Debbugs-Cc: sten@debian.org
Control: block 1120777 by -1

package-plan/README.txt says one should use "cabal unpack foo" to get
the source that is used to create the package-plan's copy of quilt
patches for foo.  Unfortunately, these patches cannot be applied to
the Debian upstream source, because "cabal unpack foo" corrupts the
upstream source by adding MSDOS/Windows carriage returns (^M).  I
encountered this issue when I tried to apply the package-plan
hledger-ui quilt series to haskell-hledger-ui.  The patch does not
apply.

Best,
Nicholas

[toc] | [next] | [standalone]


#1270574

FromClint Adams <clint@debian.org>
Date2025-11-17 23:30 +0100
Message-ID<LSfTr-dJA2-13@gated-at.bofh.it>
In reply to#1270338
reassign 1120778 cabal-install
quit

>package-plan/README.txt says one should use "cabal unpack foo" to get
>the source that is used to create the package-plan's copy of quilt
>patches for foo.  Unfortunately, these patches cannot be applied to
>the Debian upstream source, because "cabal unpack foo" corrupts the
>upstream source by adding MSDOS/Windows carriage returns (^M).  I
>encountered this issue when I tried to apply the package-plan
>hledger-ui quilt series to haskell-hledger-ui.  The patch does not
>apply.

I think what `cabal unpack` is doing is downloading https://hackage.haskell.org/package/hledger-ui-1.50.2/hledger-ui-1.50.2.tar.gz and then overwriting hledger-ui.cabal from the tarball (which has proper line endings) with https://hackage.haskell.org/package/hledger-ui-1.50.2/hledger-ui.cabal (which does not).

[toc] | [prev] | [next] | [standalone]


#1270699

FromNicholas D Steeves <sten@debian.org>
Date2025-11-18 19:40 +0100
Message-ID<LSyMp-dWCU-3@gated-at.bofh.it>
In reply to#1270574

[Multipart message — attachments visible in raw view] — view raw

forwarded 1120778 https://github.com/haskell/hackage-server/issues/316
clone 1120778 -1
retitle -1 'dht upgrade foo' should merge Hackage's x-revision of foo.cabal
thanks

Scott Talbert, thank you for finding this!  I hope our Debian copy of
this bug will be enough to encourage them to deploy the sternenseemann's
fix.

Clint Adams <clint@debian.org> writes:

> I think what `cabal unpack` is doing is downloading https://hackage.haskell.org/package/hledger-ui-1.50.2/hledger-ui-1.50.2.tar.gz and then overwriting hledger-ui.cabal from the tarball (which has proper line endings) with https://hackage.haskell.org/package/hledger-ui-1.50.2/hledger-ui.cabal (which does not).

I think you're right, and it explains a bug I hadn't yet filed:

If you manually compare the hledger-interest.cabal generated by 'cabal
unpack' (downloads cabal file from Hackage and applies it on top) to the
hledger-interest.cabal of 'dht upgrade' (the cabal file in the release
tarball), the latter doesn't represent the state of hledger-interest on
Hackage.  In other words, the package-plan is consistent with Hackage,
but the Debian package (DHG_packages/p/foo) is not consistent with the
package-plan, nor with Hackage.  The addition of "x-revision" in the
updated cabal file header makes this easier to identify.

The work per-package-update that is currently required is thus: the
person who runs 'dht upgrade' reads Hackage's foo.cabal with their eyes
and brain and then manually creates a quilt series that replicates the
logical delta without importing Hackage's current CR/LF issue into the
Debian package at DHG_packages/p/foo.  Do I need to add more detail to
this newly cloned bug ('dht upgrade foo' should merge Hackage's
x-revision of foo.cabal)?

Cheers,
Nicholas

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web