diff options
author | Morten Linderud | 2022-08-27 11:53:54 +0200 |
---|---|---|
committer | Morten Linderud | 2022-08-27 11:53:54 +0200 |
commit | aa2f20156ffb7619da167fdac99172b5b8810151 (patch) | |
tree | e6f438f52802ea53641efe09969304cd625ba4f9 | |
download | aur-aa2f20156ffb7619da167fdac99172b5b8810151.tar.gz |
import from community
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 58 | ||||
-rw-r--r-- | dia-0.9.3-cve-2019-19451.patch | 26 |
3 files changed, 104 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c723381fc3f6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = dia + pkgdesc = A GTK+ based diagram creation program + pkgver = 0.97.3 + pkgrel = 9 + url = http://live.gnome.org/Dia + arch = x86_64 + license = GPL + makedepends = intltool + makedepends = python2 + makedepends = docbook-xsl + depends = libxslt + depends = gtk2 + options = docs + options = !emptydirs + source = https://ftp.gnome.org/pub/gnome/sources/dia/0.97/dia-0.97.3.tar.xz + source = dia-0.9.3-cve-2019-19451.patch + sha256sums = 22914e48ef48f894bb5143c5efc3d01ab96e0a0cde80de11058d3b4301377d34 + sha256sums = 32cecad212fbd0f87f304d9eaf48f8b3d6555b10733ead5a3943bac778bf8586 + +pkgname = dia diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a623e2f80680 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: Thorsten Töpper <atsutane-tu@freethoughts.de> +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: Juergen Hoetzel <juergen@archlinux.org> +# Contributor: Gregor Ibic <gregor.ibic@intelicom.si> + +pkgname=dia +pkgver=0.97.3 +pkgrel=9 +pkgdesc="A GTK+ based diagram creation program" +arch=('x86_64') +license=('GPL') +url="http://live.gnome.org/Dia" +depends=('libxslt' 'gtk2') +makedepends=('intltool' 'python2' 'docbook-xsl') +# See https://github.com/GNOME/dia/commit/75ca7c555871f12549a03e9a2933f68c31a2c2a0 +# Patches for python3, but no releases. We remove optdepends regardless +#optdepends=('python') +options=('docs' '!emptydirs') +source=("https://ftp.gnome.org/pub/gnome/sources/${pkgname}/0.97/${pkgname}-${pkgver}.tar.xz" + 'dia-0.9.3-cve-2019-19451.patch') +sha256sums=('22914e48ef48f894bb5143c5efc3d01ab96e0a0cde80de11058d3b4301377d34' + '32cecad212fbd0f87f304d9eaf48f8b3d6555b10733ead5a3943bac778bf8586') + +prepare() { + cd "${srcdir}/${pkgname}-${pkgver}" + # for file in `find -type f -name '*.py'`; do + # sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' "$file" + # done + # sed -i 's#python2\.1#python2 python2.1#' configure + sed -i 's#freetype-config --cflags#pkg-config --cflags freetype2#' configure + sed -i 's#freetype-config --libs#pkg-config --libs freetype2#' configure + + # FS#71257 + patch -Np1 -i "${srcdir}/dia-0.9.3-cve-2019-19451.patch" +} + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + export PYTHON=/usr/bin/python2 + ./configure --prefix=/usr \ + --with-cairo \ + --with-python \ + --disable-gnome \ + --with-hardbooks + sed -i 's#SUBDIRS = lib objects plug-ins shapes app bindings samples po sheets data doc tests installer#SUBDIRS = lib objects plug-ins shapes app bindings samples po sheets data tests installer#' Makefile + make + cd doc + make html +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + cd doc + make DESTDIR="${pkgdir}" install-html + ln -sf ../doc/dia/html "${pkgdir}"/usr/share/dia/help +} diff --git a/dia-0.9.3-cve-2019-19451.patch b/dia-0.9.3-cve-2019-19451.patch new file mode 100644 index 000000000000..2988e70c2b89 --- /dev/null +++ b/dia-0.9.3-cve-2019-19451.patch @@ -0,0 +1,26 @@ +From baa2df853f9fb770eedcf3d94c7f5becebc90bb9 Mon Sep 17 00:00:00 2001 +From: Nils Steinger <git@n-st.de> +Date: Thu, 7 Nov 2019 15:12:18 +0100 +Subject: [PATCH] Fix endless loop on filenames with invalid encoding + +See also: + - https://bugzilla.redhat.com/show_bug.cgi?id=1778767 + - https://gitlab.gnome.org/GNOME/dia/-/issues/428 +--- + app/app_procs.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/app/app_procs.c b/app/app_procs.c +index 434a092f6..53f8b8c38 100644 +--- a/app/app_procs.c ++++ b/app/app_procs.c +@@ -675,6 +675,7 @@ app_init (int argc, char **argv) + + if (!filename) { + g_print (_("Filename conversion failed: %s\n"), filenames[i]); ++ ++i; + continue; + } + +-- +GitLab |