[arch-commits] Commit in urlwatch/repos/community-any (PKGBUILD PKGBUILD escape.patch)
Maxim Baz
maximbaz at archlinux.org
Fri Nov 15 21:47:06 UTC 2019
Date: Friday, November 15, 2019 @ 21:47:05
Author: maximbaz
Revision: 529456
archrelease: copy trunk to community-any
Added:
urlwatch/repos/community-any/PKGBUILD
(from rev 529455, urlwatch/trunk/PKGBUILD)
urlwatch/repos/community-any/escape.patch
(from rev 529455, urlwatch/trunk/escape.patch)
Deleted:
urlwatch/repos/community-any/PKGBUILD
--------------+
PKGBUILD | 65 +++++++++++++++++++++++++++++++--------------------------
escape.patch | 34 +++++++++++++++++++++++++++++
2 files changed, 70 insertions(+), 29 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2019-11-15 21:46:59 UTC (rev 529455)
+++ PKGBUILD 2019-11-15 21:47:05 UTC (rev 529456)
@@ -1,29 +0,0 @@
-# Maintainer: Balló György <ballogyor+arch at gmail dot com>
-# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
-# Contributor: Skydrome <skydrome at i2pmail.org>
-# Contributor: Allan McRae <allan at archlinux.org>
-
-pkgname=urlwatch
-pkgver=2.17
-pkgrel=2
-pkgdesc="Tool for monitoring webpages for updates"
-arch=('any')
-url="https://thp.io/2008/urlwatch/"
-license=('BSD')
-depends=('python-appdirs' 'python-keyring' 'python-lxml' 'python-cssselect' 'python-minidb' 'python-requests' 'python-yaml')
-optdepends=('lynx: convert HTML to plain text'
- 'python-beautifulsoup4: prettify HTML'
- 'python-html2text: convert HTML to plain text')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/thp/urlwatch/archive/$pkgver.tar.gz")
-sha256sums=('83101382c2cbc6e84752f12cdbdefed67b3018085fa5ffb68923d6b1fe97854d')
-
-build() {
- cd $pkgname-$pkgver
- python3 setup.py build
-}
-
-package() {
- cd $pkgname-$pkgver
- python3 setup.py install --root="$pkgdir" --optimize=1
- install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"
-}
Copied: urlwatch/repos/community-any/PKGBUILD (from rev 529455, urlwatch/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2019-11-15 21:47:05 UTC (rev 529456)
@@ -0,0 +1,36 @@
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
+# Contributor: Skydrome <skydrome at i2pmail.org>
+# Contributor: Allan McRae <allan at archlinux.org>
+
+pkgname=urlwatch
+pkgver=2.17
+pkgrel=3
+pkgdesc="Tool for monitoring webpages for updates"
+arch=('any')
+url="https://thp.io/2008/urlwatch/"
+license=('BSD')
+depends=('python-appdirs' 'python-keyring' 'python-lxml' 'python-cssselect' 'python-minidb' 'python-requests' 'python-yaml')
+optdepends=('lynx: convert HTML to plain text'
+ 'python-beautifulsoup4: prettify HTML'
+ 'python-html2text: convert HTML to plain text')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/thp/urlwatch/archive/${pkgver}.tar.gz"
+ "escape.patch")
+sha256sums=('83101382c2cbc6e84752f12cdbdefed67b3018085fa5ffb68923d6b1fe97854d'
+ '421653801e8c397c5147db30a67fcf44aaff8f471af33db83bf16847c2f90ecc')
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+ patch -Np1 -i "${srcdir}/escape.patch"
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ python3 setup.py build
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+ python3 setup.py install --root="${pkgdir}" --optimize=1
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+}
Copied: urlwatch/repos/community-any/escape.patch (from rev 529455, urlwatch/trunk/escape.patch)
===================================================================
--- escape.patch (rev 0)
+++ escape.patch 2019-11-15 21:47:05 UTC (rev 529456)
@@ -0,0 +1,34 @@
+From 7d1e89237f547ce57fa52360a5f8822474982780 Mon Sep 17 00:00:00 2001
+From: cfbao <cfbao.is at gmail.com>
+Date: Tue, 29 Oct 2019 23:37:57 -0400
+Subject: [PATCH] Replace `cgi.escape` with `html.escape`
+
+`cgi.escape` is unsafe and removed in Python 3.8.
+---
+ lib/urlwatch/reporters.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/lib/urlwatch/reporters.py b/lib/urlwatch/reporters.py
+index 29d7fd0..5de0b3a 100644
+--- a/lib/urlwatch/reporters.py
++++ b/lib/urlwatch/reporters.py
+@@ -38,7 +38,7 @@
+ import os
+ import sys
+ import time
+-import cgi
++import html
+ import functools
+
+ import requests
+@@ -140,8 +140,8 @@ def __str__(self):
+ return self.s
+
+ def format(self, *args, **kwargs):
+- return str(self).format(*(cgi.escape(str(arg)) for arg in args),
+- **{k: cgi.escape(str(v)) for k, v in kwargs.items()})
++ return str(self).format(*(html.escape(str(arg)) for arg in args),
++ **{k: html.escape(str(v)) for k, v in kwargs.items()})
+
+
+ class HtmlReporter(ReporterBase):
More information about the arch-commits
mailing list