initial import
This commit is contained in:
33
gimp-legacy/CVE-2025-2761.patch
Normal file
33
gimp-legacy/CVE-2025-2761.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From 0806bc76ca74543d20e1307ccf6aebd26395c56c Mon Sep 17 00:00:00 2001
|
||||
From: Alx Sa <cmyk.student@gmail.com>
|
||||
Date: Mon, 10 Mar 2025 04:07:44 +0000
|
||||
Subject: [PATCH] plug-ins: Fix ZDI-CAN-25100 for FLI plug-in
|
||||
|
||||
Resolves #13073
|
||||
This patch adds a check to make sure we're not
|
||||
writing beyond the bounds of the "pos" array.
|
||||
This is the same check that we do earlier when
|
||||
writing pos[xc++], but it was left off of the last
|
||||
write command. Since "n" will be 0 if we get to the
|
||||
end of the array, it prevents us from writing beyond
|
||||
that.
|
||||
---
|
||||
plug-ins/file-fli/fli.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/plug-ins/file-fli/fli.c b/plug-ins/file-fli/fli.c
|
||||
index 85dcc994395..1aba31e8f90 100644
|
||||
--- a/plug-ins/file-fli/fli.c
|
||||
+++ b/plug-ins/file-fli/fli.c
|
||||
@@ -1529,7 +1529,7 @@ fli_read_lc_2 (FILE *f,
|
||||
xc += len << 1;
|
||||
}
|
||||
}
|
||||
- if (lpf)
|
||||
+ if (lpf && xc < n)
|
||||
pos[xc] = lpn;
|
||||
yc++;
|
||||
}
|
||||
--
|
||||
GitLab
|
||||
|
||||
115
gimp-legacy/PKGBUILD
Normal file
115
gimp-legacy/PKGBUILD
Normal file
@@ -0,0 +1,115 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
# Based on gimp-package
|
||||
|
||||
_realpkgname=gimp
|
||||
pkgname=$_realpkgname-legacy
|
||||
pkgver=2.10.24
|
||||
_basever=2.0
|
||||
_debver=2.10.22
|
||||
_debrel=4
|
||||
pkgrel=2
|
||||
pkgdesc="GNU Image Manipulation Program (legacy version)"
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://www.gimp.org/'
|
||||
# plug-ins doesn't cover the license software, because contains an exception in GPL-3, read: LICENSE
|
||||
# script-fu is GPL-3 and contains some code with Modified-BSD
|
||||
license=('custom:GPL-3+Plugins-Special-Exception' LGPL-3 GPL-2) # software/plug-ins and libraries
|
||||
backup=(etc/$_realpkgname/$_basever/{controller,$_realpkgname,gtk,menu,session,template,tool,unit}rc)
|
||||
depends=('aalib' 'ghostscript' 'gtk2' 'libmng' 'libxmu' 'libxpm' 'mypaint-brushes1' 'poppler-data'
|
||||
'tauthon-pygtk' 'glib-networking' 'gexiv2')
|
||||
makedepends=('intltool' 'iso-codes' 'libxslt' 'quilt' 'xdg-utils')
|
||||
optdepends=('gutenprint: for sophisticated printing only as gimp has built-in cups print support'
|
||||
'xdg-utils: for send email support')
|
||||
source=("https://download.gimp.org/pub/$_realpkgname/v${pkgver%.*}/${_realpkgname}-${pkgver}.tar.bz2"
|
||||
"https://deb.debian.org/debian/pool/main/g/$_realpkgname/${_realpkgname}_${_debver}-${_debrel}+deb11u2.debian.tar.xz"
|
||||
"linux_kernel.gpl"
|
||||
"remove-update-check.patch"
|
||||
"remove-plugins.patch"
|
||||
"CVE-2025-2761.patch")
|
||||
sha512sums=('828350ad5c53b8409463c24693821d78a1940f18c221249ae7b864ad9db5cf01ab41d6ec5bbefd96115f0e91809ecdc61451d71881b56b07920c442f4a514936'
|
||||
'feccd981fc3a76da3322e6ccc6958cd92b37d01bec0beedb340e0a7daafbd996452da534b203bc9781fe780e7282a897d06d38ce5ad2135c522b9a313e9a5e57'
|
||||
'6f33d57f242fa8ce04b65e06a712bd54677306a45b22cb853fbe348089cd4673bd4ed91073074fe067166fe8951c370f8bbbc386783e3ed5170d52e9062666fe'
|
||||
'173b865f039c1b96b7dea9868acecfe62aeedf6721c7bf0bc8d56327e6f7c2be2efd78a91bb089d67b2e9f55dd78d6691be130de9010bb9c01cef856be5166a5'
|
||||
'f653872e6051f6cf870470f6da63eae33a65b853ce50e9ac0af0f5fb732641dcb47a0c05b51b8709861bc43ce54b31162ceb2ca171f56af8199104d24adaa0ea'
|
||||
'0d14f620179e41936fc8ac004f80851eb52943644d0173a2da124b4e435a98342693f357323b3677ae3c88bff4b118bf4a75ba44990389fb283f63a507fb5d1d')
|
||||
|
||||
prepare() {
|
||||
# gimp 2.10.22 requires gegl 0.4.26 and it's broken with gegl 0.4.30
|
||||
# gimp will update to 2.10.24 to use gegl 0.4.30
|
||||
# gegl 0.4.30 is needed by gimp-devel 2.99.6
|
||||
cd $srcdir/$_realpkgname-$pkgver
|
||||
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
|
||||
# removing the button on dialog for update-check
|
||||
# possible enhancement to include that in the configure-routine
|
||||
patch -Np1 -i ${srcdir}/remove-update-check.patch
|
||||
|
||||
# fix check gettext-tiny in configure.ac
|
||||
sed -i '\|XGETTEXT_APPLIED_VERSION| s| -f4| -f5|' configure.ac
|
||||
|
||||
# remove devel-docs: this part of source code requires gtk-doc to build
|
||||
# or will fail the configuration, due needs macro variables like:
|
||||
# HAVE_GTK_DOC, GTK_DOC_USE_LIBTOOL, GTK_DOC_BUILD_HTML and GTK_DOC_BUILD_PDF
|
||||
sed -i '\|devel-docs|d' Makefile.am configure.ac
|
||||
|
||||
# replace python to tauthon in m4macros/pythondev.m4
|
||||
sed -i 's|am_display_PYTHON=python|am_display_PYTHON=tauthon|;
|
||||
s|/include/python|/include/tauthon|' m4macros/pythondev.m4
|
||||
|
||||
# remove problematic plugins
|
||||
rm -rf ./plug-ins/file-{dds,faxg3,ico,psd}
|
||||
patch -Np1 -i ${srcdir}/remove-plugins.patch
|
||||
|
||||
# fix CVE-2025-2761
|
||||
patch -Np1 -i ${srcdir}/CVE-2025-2761.patch
|
||||
|
||||
autoreconf -vfi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd $_realpkgname-$pkgver
|
||||
PYTHON=/usr/bin/tauthon ./configure \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--enable-relocatable-bundle \
|
||||
--disable-check-update \
|
||||
--with-${_realpkgname}dir=$_realpkgname \
|
||||
--with-bug-report-url=https://issues.hyperbola.info \
|
||||
--without-libheif \
|
||||
--without-webp \
|
||||
--without-gudev \
|
||||
--without-webkit \
|
||||
--without-wmf \
|
||||
--without-openexr \
|
||||
--without-appdata-test
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $_realpkgname-$pkgver
|
||||
make DESTDIR=$pkgdir install
|
||||
|
||||
install -Dm644 LICENSE -t $pkgdir/usr/share/licenses/$pkgname
|
||||
install -Dm644 COPYING -t $pkgdir/usr/share/licenses/$pkgname/$_realpkgname
|
||||
install -Dm644 lib$_realpkgname/COPYING -t $pkgdir/usr/share/licenses/$pkgname/lib$_realpkgname
|
||||
install -Dm644 COPYING -t $pkgdir/usr/share/licenses/$pkgname/$_realpkgname/plug-ins
|
||||
|
||||
sed -i 's|#!/usr/bin/env python2|#!/usr/bin/env tauthon|' $pkgdir/usr/lib/$_realpkgname/$_basever/plug-ins/*/*.py
|
||||
|
||||
install -Dm644 $srcdir/linux_kernel.gpl $pkgdir/usr/share/$_realpkgname/$_basever/palettes
|
||||
|
||||
ln -s $_realpkgname-test-clipboard-$_basever $pkgdir/usr/bin/$_realpkgname-test-clipboard
|
||||
ln -s ${_realpkgname}tool-$_basever $pkgdir/usr/bin/${_realpkgname}tool
|
||||
ln -s ${_realpkgname}tool-$_basever.1.gz $pkgdir/usr/share/man/man1/${_realpkgname}tool.1.gz
|
||||
}
|
||||
19
gimp-legacy/linux_kernel.gpl
Normal file
19
gimp-legacy/linux_kernel.gpl
Normal file
@@ -0,0 +1,19 @@
|
||||
GIMP Palette
|
||||
Name: linux
|
||||
#
|
||||
0 0 0
|
||||
0 0 170
|
||||
0 170 0
|
||||
0 170 170
|
||||
170 0 0
|
||||
170 0 170
|
||||
170 85 0
|
||||
170 170 170
|
||||
85 85 85
|
||||
85 85 255
|
||||
85 255 85
|
||||
85 255 255
|
||||
255 85 85
|
||||
255 85 255
|
||||
255 255 85
|
||||
255 255 255
|
||||
62
gimp-legacy/remove-plugins.patch
Normal file
62
gimp-legacy/remove-plugins.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
--- a/plug-ins/Makefile.am 2021-03-28 23:52:56.000000000 +0200
|
||||
+++ b/plug-ins/Makefile.am 2025-05-06 15:58:13.543605935 +0200
|
||||
@@ -29,14 +29,10 @@
|
||||
$(pygimp) \
|
||||
file-bmp \
|
||||
$(file_darktable) \
|
||||
- file-dds \
|
||||
$(file_exr) \
|
||||
- file-faxg3 \
|
||||
file-fits \
|
||||
file-fli \
|
||||
- file-ico \
|
||||
file-jpeg \
|
||||
- file-psd \
|
||||
file-raw \
|
||||
file-sgi \
|
||||
file-tiff \
|
||||
--- a/plug-ins/Makefile.in 2025-05-06 15:55:32.000000000 +0200
|
||||
+++ b/plug-ins/Makefile.in 2025-05-06 15:59:08.124093723 +0200
|
||||
@@ -164,8 +164,8 @@
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
-DIST_SUBDIRS = script-fu pygimp file-bmp file-dds file-exr file-faxg3 \
|
||||
- file-fits file-fli file-ico file-jpeg file-psd file-raw \
|
||||
+DIST_SUBDIRS = script-fu pygimp file-bmp file-exr \
|
||||
+ file-fits file-fli file-jpeg file-raw \
|
||||
file-sgi file-tiff file-webp flame fractal-explorer gfig \
|
||||
gimpressionist gradient-flare help help-browser ifs-compose \
|
||||
imagemap lighting map-object metadata pagecurl print \
|
||||
@@ -613,14 +613,10 @@
|
||||
$(pygimp) \
|
||||
file-bmp \
|
||||
$(file_darktable) \
|
||||
- file-dds \
|
||||
$(file_exr) \
|
||||
- file-faxg3 \
|
||||
file-fits \
|
||||
file-fli \
|
||||
- file-ico \
|
||||
file-jpeg \
|
||||
- file-psd \
|
||||
file-raw \
|
||||
file-sgi \
|
||||
file-tiff \
|
||||
--- a/configure.ac 2025-05-06 15:55:02.000000000 +0200
|
||||
+++ b/configure.ac 2025-05-06 16:09:52.369851392 +0200
|
||||
@@ -2942,14 +2942,10 @@
|
||||
build/windows/installer/lang/Makefile
|
||||
plug-ins/Makefile
|
||||
plug-ins/file-bmp/Makefile
|
||||
-plug-ins/file-dds/Makefile
|
||||
plug-ins/file-exr/Makefile
|
||||
-plug-ins/file-faxg3/Makefile
|
||||
plug-ins/file-fits/Makefile
|
||||
plug-ins/file-fli/Makefile
|
||||
-plug-ins/file-ico/Makefile
|
||||
plug-ins/file-jpeg/Makefile
|
||||
-plug-ins/file-psd/Makefile
|
||||
plug-ins/file-raw/Makefile
|
||||
plug-ins/file-sgi/Makefile
|
||||
plug-ins/file-tiff/Makefile
|
||||
202
gimp-legacy/remove-update-check.patch
Normal file
202
gimp-legacy/remove-update-check.patch
Normal file
@@ -0,0 +1,202 @@
|
||||
--- a/app/dialogs/about-dialog.c 2021-03-28 23:52:55.000000000 +0200
|
||||
+++ b/app/dialogs/about-dialog.c 2022-02-25 02:02:24.229474625 +0100
|
||||
@@ -286,199 +286,6 @@
|
||||
about_dialog_add_update (GimpAboutDialog *dialog,
|
||||
GimpCoreConfig *config)
|
||||
{
|
||||
- GtkWidget *container;
|
||||
- GList *children;
|
||||
- GtkWidget *vbox;
|
||||
-
|
||||
- GtkWidget *frame;
|
||||
- GtkWidget *box;
|
||||
- GtkWidget *box2;
|
||||
- GtkWidget *label;
|
||||
- GtkWidget *button;
|
||||
- GtkWidget *button_image;
|
||||
- GtkWidget *button_label;
|
||||
- GDateTime *datetime;
|
||||
- gchar *date;
|
||||
- gchar *text;
|
||||
-
|
||||
- if (dialog->update_frame)
|
||||
- {
|
||||
- gtk_widget_destroy (dialog->update_frame);
|
||||
- dialog->update_frame = NULL;
|
||||
- }
|
||||
-
|
||||
- /* Get the dialog vbox. */
|
||||
- container = gtk_dialog_get_content_area (GTK_DIALOG (dialog->dialog));
|
||||
- children = gtk_container_get_children (GTK_CONTAINER (container));
|
||||
- g_return_if_fail (GTK_IS_BOX (children->data));
|
||||
- vbox = children->data;
|
||||
- g_list_free (children);
|
||||
-
|
||||
- /* The preferred localized date representation without the time. */
|
||||
- datetime = g_date_time_new_from_unix_local (config->last_release_timestamp);
|
||||
- date = g_date_time_format (datetime, "%x");
|
||||
- g_date_time_unref (datetime);
|
||||
-
|
||||
- /* The update frame. */
|
||||
- frame = gtk_frame_new (NULL);
|
||||
- gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 2);
|
||||
-
|
||||
- box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
- gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
-
|
||||
- /* Button in the frame. */
|
||||
- button = gtk_button_new ();
|
||||
- gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 0);
|
||||
- gtk_widget_show (button);
|
||||
-
|
||||
- box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
- gtk_container_add (GTK_CONTAINER (button), box2);
|
||||
- gtk_widget_show (box2);
|
||||
-
|
||||
- button_image = gtk_image_new_from_icon_name (NULL, GTK_ICON_SIZE_DIALOG);
|
||||
- gtk_box_pack_start (GTK_BOX (box2), button_image, FALSE, FALSE, 0);
|
||||
- gtk_widget_show (button_image);
|
||||
-
|
||||
- button_label = gtk_label_new (NULL);
|
||||
- gtk_box_pack_start (GTK_BOX (box2), button_label, FALSE, FALSE, 0);
|
||||
- gtk_container_child_set (GTK_CONTAINER (box2), button_label, "expand", TRUE, NULL);
|
||||
- gtk_widget_show (button_label);
|
||||
-
|
||||
- if (config->last_known_release != NULL)
|
||||
- {
|
||||
- /* There is a newer version. */
|
||||
- gchar *comment = NULL;
|
||||
-
|
||||
- /* We want the frame to stand out. */
|
||||
- label = gtk_label_new (NULL);
|
||||
- text = g_strdup_printf ("<tt><b><big>%s</big></b></tt>",
|
||||
- _("Update available!"));
|
||||
- gtk_label_set_markup (GTK_LABEL (label), text);
|
||||
- g_free (text);
|
||||
- gtk_widget_show (label);
|
||||
- gtk_frame_set_label_widget (GTK_FRAME (frame), label);
|
||||
- gtk_frame_set_label_align (GTK_FRAME (frame), 0.5, 0.5);
|
||||
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_ETCHED_OUT);
|
||||
- gtk_box_reorder_child (GTK_BOX (vbox), frame, 3);
|
||||
-
|
||||
- /* Button is an update link. */
|
||||
- gtk_image_set_from_icon_name (GTK_IMAGE (button_image),
|
||||
- "software-update-available",
|
||||
- GTK_ICON_SIZE_DIALOG);
|
||||
- g_signal_connect (button, "clicked",
|
||||
- (GCallback) about_dialog_download_clicked,
|
||||
- "https://www.gimp.org/downloads/");
|
||||
-
|
||||
- if (config->last_revision > 0)
|
||||
- {
|
||||
- /* This is actually a new revision of current version. */
|
||||
- text = g_strdup_printf (_("Download GIMP %s revision %d (released on %s)\n"),
|
||||
- config->last_known_release,
|
||||
- config->last_revision,
|
||||
- date);
|
||||
-
|
||||
- /* Finally an optional release comment. */
|
||||
- if (config->last_release_comment)
|
||||
- {
|
||||
- /* Translators: <> tags are Pango markup. Please keep these
|
||||
- * markups in your translation. */
|
||||
- comment = g_strdup_printf (_("<u>Release comment</u>: <i>%s</i>"), config->last_release_comment);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- text = g_strdup_printf (_("Download GIMP %s (released on %s)\n"),
|
||||
- config->last_known_release, date);
|
||||
- }
|
||||
- gtk_label_set_text (GTK_LABEL (button_label), text);
|
||||
- g_free (text);
|
||||
- g_free (date);
|
||||
-
|
||||
- if (comment)
|
||||
- {
|
||||
- label = gtk_label_new (NULL);
|
||||
- gtk_label_set_max_width_chars (GTK_LABEL (label), 80);
|
||||
- gtk_label_set_markup (GTK_LABEL (label), comment);
|
||||
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||
- g_free (comment);
|
||||
-
|
||||
- gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
|
||||
- gtk_widget_show (label);
|
||||
- }
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- /* Button is a "Check for updates" action. */
|
||||
- gtk_image_set_from_icon_name (GTK_IMAGE (button_image),
|
||||
- "view-refresh",
|
||||
- GTK_ICON_SIZE_MENU);
|
||||
- gtk_label_set_text (GTK_LABEL (button_label), _("Check for updates"));
|
||||
- g_signal_connect_swapped (button, "clicked",
|
||||
- (GCallback) gimp_update_check, config);
|
||||
-
|
||||
- }
|
||||
-
|
||||
- gtk_box_reorder_child (GTK_BOX (vbox), frame, 4);
|
||||
-
|
||||
- /* Last check date box. */
|
||||
- box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
- gtk_container_add (GTK_CONTAINER (box), box2);
|
||||
- gtk_widget_show (box2);
|
||||
-
|
||||
- /* Show a small "Check for updates" button only if the big one has
|
||||
- * been replaced by a download button.
|
||||
- */
|
||||
- if (config->last_known_release != NULL)
|
||||
- {
|
||||
- button = gtk_button_new ();
|
||||
- button_image = gtk_image_new_from_icon_name ("view-refresh", GTK_ICON_SIZE_MENU);
|
||||
- gtk_container_add (GTK_CONTAINER (button), button_image);
|
||||
- gtk_widget_set_tooltip_text (button, _("Check for updates"));
|
||||
- gtk_box_pack_start (GTK_BOX (box2), button, FALSE, FALSE, 0);
|
||||
- g_signal_connect_swapped (button, "clicked",
|
||||
- (GCallback) gimp_update_check, config);
|
||||
- gtk_widget_show (button);
|
||||
- gtk_widget_show (button_image);
|
||||
- }
|
||||
-
|
||||
- if (config->check_update_timestamp > 0)
|
||||
- {
|
||||
- gchar *subtext;
|
||||
- gchar *time;
|
||||
-
|
||||
- datetime = g_date_time_new_from_unix_local (config->check_update_timestamp);
|
||||
- date = g_date_time_format (datetime, "%x");
|
||||
- time = g_date_time_format (datetime, "%X");
|
||||
- /* Translators: first string is the date in the locale's date
|
||||
- * representation (e.g., 12/31/99), second is the time in the
|
||||
- * locale's time representation (e.g., 23:13:48).
|
||||
- */
|
||||
- subtext = g_strdup_printf (_("Last checked on %s at %s"), date, time);
|
||||
- g_date_time_unref (datetime);
|
||||
- g_free (date);
|
||||
- g_free (time);
|
||||
-
|
||||
- text = g_strdup_printf ("<i>%s</i>", subtext);
|
||||
- label = gtk_label_new (NULL);
|
||||
- gtk_label_set_markup (GTK_LABEL (label), text);
|
||||
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_CENTER);
|
||||
- gtk_box_pack_start (GTK_BOX (box2), label, FALSE, FALSE, 0);
|
||||
- gtk_container_child_set (GTK_CONTAINER (box2), label, "expand", TRUE, NULL);
|
||||
- gtk_widget_show (label);
|
||||
- g_free (text);
|
||||
- g_free (subtext);
|
||||
- }
|
||||
-
|
||||
- gtk_widget_show (box);
|
||||
- gtk_widget_show (frame);
|
||||
-
|
||||
- dialog->update_frame = frame;
|
||||
- g_object_add_weak_pointer (G_OBJECT (frame), (gpointer) &dialog->update_frame);
|
||||
-
|
||||
- /* Reconstruct the dialog when release info changes. */
|
||||
- g_signal_connect (config, "notify::last-known-release",
|
||||
- (GCallback) about_dialog_last_release_changed,
|
||||
- dialog);
|
||||
}
|
||||
|
||||
static void
|
||||
Reference in New Issue
Block a user