Allow patching from mummi issues

  • Open
  • quality assurance status badge
Details
4 participants
  • Daniel Meißner
  • Liliana Marie Prikler
  • Maxime Devos
  • Nicolas Graves
Owner
unassigned
Submitted by
Nicolas Graves
Severity
normal
N
N
Nicolas Graves wrote on 25 May 2022 00:14
(address . bug-guix@gnu.org)
874k1ek1ue.fsf@ngraves.fr
Hi !

I was tring to fix a local build using an online patch on mummi, this
way :

(define-public my-emacs-list-utils
(package
(inherit emacs-list-utils)
(name "my-emacs-list-utils")
(version "0.4.6")
(source
(origin
(method git-fetch)
(uri (git-reference
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "07hbz2md52ccy95gv4d5n6szrfmpfqf3w4kwqdg2cf54c7kgf7hw"))
(patches
(list
(origin
(method url-fetch)
(sha256
(base32
"1ysjb23g21m0jhkn63hq56snjd6skd9pl58c365g519q03hq5s87")))))))))

As it is a quick and convenient way to apply someone's work while the
patch is not upstream, I expected it to work, but it failed with the
following error during download:

Starting download of /gnu/store/v91i1m61skr42136vnxhzm4gzyidp11y-0
Bad media-type header component: text

I don't now if the fix should come from mummi's or guix's side, but I
found it a relevant way to quickly test an existing patch for one's
needs.

Thanks if you can enable this type of patches, or get alternatives if
there are. Also thanks for all the work on guix, it's amazing.

Nicolas Graves
M
M
Maxime Devos wrote on 25 May 2022 13:06
92fba7b9bbb4fb5f7ac30cf6c49f833c12feb57f.camel@telenet.be
Nicolas Graves via Bug reports for GNU Guix schreef op wo 25-05-2022 om
00:14 [+0200]:
Toggle quote (4 lines)
> Starting download of /gnu/store/v91i1m61skr42136vnxhzm4gzyidp11y-0
> From https://issues.guix.gnu.org/issue/55498/attachment/0...
> Bad media-type header component: text

That page sets

Content-Type text;charset=utf-8

which apperently Guile's HTTP parser doesn't like.
Maybe it can be changed to text/patch (*) or text/diff (*) (or
text/plain) instead?

(*) x- prefixes are deprecated

Or is text;charset=utf-8 actually valid?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYo4NmBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ohJAP4vwnllWxvJhegKOktzzYzG8bGu
u4dUd+sJ8GpogvpQGQEApygBu5q7FbyILYyQC9ctxuCdaX3Mu7ma7+ewO5TbQAA=
=CGWT
-----END PGP SIGNATURE-----


D
D
Daniel Meißner wrote on 25 May 2022 14:06
Re: Allow patching from mummi issues
(name . Maxime Devos)(address . maximedevos@telenet.be)
87mtf5hl5e.fsf@ruhr-uni-bochum.de
Hi,

Maxime Devos writes:

Toggle quote (2 lines)
> Or is text;charset=utf-8 actually valid?

There is a clear answer from RFC 2045, Section 5.1 [1]:

Toggle quote (3 lines)
> Note also that a subtype specification is MANDATORY -- it may not be
> omitted from a Content-Type header field.

L
L
Liliana Marie Prikler wrote on 25 May 2022 14:16
Re: bug#55618: Allow patching from mummi issues
1f550c0c2958d79c46db5a2143b2af43e8f6b60d.camel@ist.tugraz.at
Am Mittwoch, dem 25.05.2022 um 13:06 +0200 schrieb Maxime Devos:
Toggle quote (1 lines)
> is text;charset=utf-8 actually valid?
Not as far as I'm aware. The first part should be a proper MIME type,
which ought to be registered by the IANA [1].

Toggle quote (9 lines)
> That page sets
>
>  Content-Type text;charset=utf-8
>
> which apperently Guile's HTTP parser doesn't like.
> Maybe it can be changed to text/patch (*) or text/diff (*) (or
> text/plain) instead?
>
> (*) x- prefixes are deprecated
As fate would have it, neither text/patch nor text/diff are registered
over at the IANA [1]. As far as I'm aware, both (Linux/GNU)
applications and browsers should understand the x- notation.

Cheers


M
M
Maxime Devos wrote on 25 May 2022 16:21
eaea97237d725e18bea55f07486cc3580701bee2.camel@telenet.be
Liliana Marie Prikler schreef op wo 25-05-2022 om 14:16 [+0200]:
Toggle quote (18 lines)
> Am Mittwoch, dem 25.05.2022 um 13:06 +0200 schrieb Maxime Devos:
> > is text;charset=utf-8 actually valid?
> Not as far as I'm aware. The first part should be a proper MIME type,
> which ought to be registered by the IANA [1].
>
> > That page sets
> >
> >  Content-Type text;charset=utf-8
> >
> > which apperently Guile's HTTP parser doesn't like.
> > Maybe it can be changed to text/patch (*) or text/diff (*) (or
> > text/plain) instead?
> >
> > (*) x- prefixes are deprecated
> As fate would have it, neither text/patch nor text/diff are registered
> over at the IANA [1]. As far as I'm aware, both (Linux/GNU)
> applications and browsers should understand the x- notation.

Neither is text/x-patch nor text/diff. I am not aware of any browser
that supports text/x-patch or text/x-diff (or text/patch for that
matter). If there are any applications that understand text/x-patch
but not text/patch, it should be easy to patch them to support the more
standard-ish text/patch (or text/diff).

(Registering them would be even better, but AFAICT no-one is interested
in writing a formal spec to submit.)

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYo47bBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vFUAQDtKHVMz37uEZe0ZdkV8eMoQhgB
8AMd3BS1pA1+Syk3TgEA1+CB5cxpZst0B8sxpQe7H4k+F0Hsc+xOTjWhZWatYws=
=LBU5
-----END PGP SIGNATURE-----


?