Markdown: apply Debian patch to exit gracefully if input cannot be opened

https://metadata.ftp-master.debian.org/changelogs//main/m/markdown/markdown_1.0.1-10_changelog

  markdown (1.0.1-10) unstable; urgency=medium

    * Exit with a non-zero exit code if the input file cannot be opened,
      thanks to Chris Lamb, closes: #886032.
This commit is contained in:
sborrill 2024-01-09 13:34:50 +00:00
parent c42d29bf18
commit b8600ae5ab
3 changed files with 22 additions and 3 deletions

View File

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.19 2022/06/28 11:36:07 wiz Exp $
# $NetBSD: Makefile,v 1.20 2024/01/09 13:34:50 sborrill Exp $
#
DISTNAME= Markdown_1.0.1
PKGNAME= Markdown-1.0.1
PKGREVISION= 10
PKGREVISION= 11
CATEGORIES= textproc converters
MASTER_SITES= http://daringfireball.net/projects/downloads/
EXTRACT_SUFX= .zip

View File

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.6 2021/10/26 11:21:29 nia Exp $
$NetBSD: distinfo,v 1.7 2024/01/09 13:34:50 sborrill Exp $
BLAKE2s (Markdown-1.0.1/Markdown_1.0.1.zip) = ea420f4fa2ab744cc4f3bae26bf1bc698648c8f2a5c32aa64752b68181f94a46
SHA512 (Markdown-1.0.1/Markdown_1.0.1.zip) = 962df356e641326fbf29cdedc36dafb5f04683f0b3f5eb1efb8e15994e1e000b5a6882c84f09db4a6f8f948811ebbe76759e27871c644e690884db31705eab1f
Size (Markdown-1.0.1/Markdown_1.0.1.zip) = 17823 bytes
SHA1 (patch-Markdown.pl) = afded5fadd7b81e2ed97bb56be034a4b64ebcaaf

View File

@ -0,0 +1,18 @@
$NetBSD: patch-Markdown.pl,v 1.1 2024/01/09 13:34:50 sborrill Exp $
Patch from Debian to exit with non-zero exit code if the input file cannot
be opened:
https://metadata.ftp-master.debian.org/changelogs//main/m/markdown/markdown_1.0.
--- Markdown.pl.orig 2004-12-14 22:57:42.000000000 +0000
+++ Markdown.pl 2024-01-09 13:31:50.483232360 +0000
@@ -215,7 +215,7 @@
my $text;
{
local $/; # Slurp the whole file
- $text = <>;
+ defined($text = <>) or exit 2;
}
print Markdown($text);
}