guibuilder_pel7x64builder0
6 years ago
4 changed files with 196 additions and 2 deletions
@ -0,0 +1,92 @@
@@ -0,0 +1,92 @@
|
||||
#!/bin/bash |
||||
|
||||
_SYSCONFDIR=${sysconfdir:-/etc} |
||||
_PREFIX=${prefix:-/usr} |
||||
_DATADIR=${datadir:-${_PREFIX}/share} |
||||
|
||||
ADDIR=${ADDIR:-${install_prefix}${_SYSCONFDIR}/xscreensaver} |
||||
CONFDIR=${CONFDIR:-${install_prefix}${_DATADIR}/xscreensaver/hacks.conf.d} |
||||
ADFILE=${ADFILE:-$ADDIR/XScreenSaver.ad} |
||||
|
||||
fix_hackconf () |
||||
{ |
||||
if [ ! -s $1 ] ; then |
||||
echo "$1 is empty" >&2 |
||||
echo "" |
||||
return 1 |
||||
fi |
||||
|
||||
tmpconf=`mktemp /tmp/hackconf.XXXXXXXX` |
||||
tmpconf_1=`mktemp /tmp/hackconf.XXXXXXXX` |
||||
tmpconf_2=`mktemp /tmp/hackconf.XXXXXXXX` |
||||
tmpconf_3=`mktemp /tmp/hackconf.XXXXXXXX` |
||||
sed -n -e '$p' $1 > $tmpconf_1 |
||||
sed -e '$d' $1 > $tmpconf_2 |
||||
for file in $tmpconf_1 $tmpconf_2 ; do |
||||
if ( [ -s $file ] && grep -q '\\n\(\|\\\)[^\\].*$' $file ) ; then |
||||
rm -f $tmpconf $tmpconf_1 $tmpconf_2 $tmpconf_3 |
||||
echo "" |
||||
echo "ignoring $1" >&2 |
||||
return 1 |
||||
fi |
||||
done |
||||
if ! grep -q '\\n[\\]*$' $tmpconf_1 ; then |
||||
sed -i -e 's|\(^.*$\)|\1 \\n\\|' $tmpconf_1 |
||||
fi |
||||
sed -i -e 's|\\n$|\\n\\|' $tmpconf_1 |
||||
while [ -s $tmpconf_2 ] ; do |
||||
sed -n -e '1p' $tmpconf_2 > $tmpconf_3 |
||||
sed -i -e '1d' $tmpconf_2 |
||||
if ! grep -q '\([ \t]\\$\|\\n\\$\)' $tmpconf_3 ; then |
||||
rm -f $tmpconf $tmpconf_1 $tmpconf_2 $tmpconf_3 |
||||
echo "" |
||||
echo "ignoring $1" >&2 |
||||
return 1 |
||||
fi |
||||
cat $tmpconf_3 >> $tmpconf |
||||
done |
||||
cat $tmpconf_1 >> $tmpconf |
||||
rm -f $tmpconf_1 $tmpconf_2 $tmpconf_3 |
||||
echo $tmpconf |
||||
return 0 |
||||
|
||||
} |
||||
|
||||
for suffix in header tail ; do |
||||
if [ ! -r $ADDIR/XScreenSaver.ad.$suffix ] ; then |
||||
echo "$ADDIR/XScreenSaver.ad.$suffix missing" |
||||
exit 1 |
||||
fi |
||||
done |
||||
|
||||
tmpfile=`mktemp /tmp/XScreenSaver.ad.XXXXXXXX` |
||||
|
||||
cat > $tmpfile <<EOF |
||||
! Don't edit this file directly by yourself!! |
||||
! This file is not meant to be edited directly. |
||||
! |
||||
! Instead, please edit /etc/xscreensaver/XScreenSaver.ad.header, |
||||
! /etc/xscreensaver/XScreenSaver.ad.tail and add files under |
||||
! /usr/share/xscreensaver/hacks.conf.d if you want. |
||||
! |
||||
! Then call /usr/sbin/update-xscreensaver-hacks to |
||||
! update this file. |
||||
! |
||||
EOF |
||||
|
||||
cat $ADDIR/XScreenSaver.ad.header >> $tmpfile |
||||
|
||||
for hackconf in $CONFDIR/*.conf ; do |
||||
hackconf_fixed=`fix_hackconf $hackconf` |
||||
if [ -n "$hackconf_fixed" ] ; then |
||||
cat $hackconf_fixed >> $tmpfile |
||||
rm -f $hackconf_fixed |
||||
fi |
||||
done |
||||
sed -i -e '$s|\\n\\$|\\n|' $tmpfile |
||||
|
||||
cat $ADDIR/XScreenSaver.ad.tail >> $tmpfile |
||||
install -c -p -m 644 $tmpfile $ADFILE |
||||
rm -f $tmpfile |
||||
|
||||
|
@ -0,0 +1,36 @@
@@ -0,0 +1,36 @@
|
||||
From 337d06b4c2f5f779de835c5eb54846db330b33cf Mon Sep 17 00:00:00 2001 |
||||
From: XScreenSaver owners <xscreensaver-owner@fedoraproject.org> |
||||
Date: Mon, 16 Apr 2018 21:39:38 +0900 |
||||
Subject: [PATCH] crumbler: fix loop enclosure for calculating keys in |
||||
split_chunk |
||||
|
||||
In split_chunk(), unique keys should be assigned to each chunks, |
||||
however current loop for calculating keys has logical mistake. |
||||
Fix this. |
||||
--- |
||||
hacks/glx/crumbler.c | 4 +++- |
||||
1 file changed, 3 insertions(+), 1 deletion(-) |
||||
|
||||
diff --git a/hacks/glx/crumbler.c b/hacks/glx/crumbler.c |
||||
index f9a908a..b4420e7 100644 |
||||
--- a/hacks/glx/crumbler.c |
||||
+++ b/hacks/glx/crumbler.c |
||||
@@ -352,12 +352,14 @@ split_chunk (ModeInfo *mi, chunk *c, int nchunks) |
||||
do { |
||||
keys[i] = random() % c->nverts; |
||||
for (j = 0; j < i; j++) |
||||
+ { |
||||
if (keys[i] == keys[j]) |
||||
{ |
||||
ok = False; |
||||
break; |
||||
} |
||||
- ok = True; |
||||
+ ok = True; |
||||
+ } |
||||
} while (!ok); |
||||
|
||||
c2 = make_chunk(); |
||||
-- |
||||
2.17.0 |
||||
|
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
From e0f453603296e55ca2588b822b840d724d535893 Mon Sep 17 00:00:00 2001 |
||||
From: Mamoru TASAKA <mtasaka@fedoraproject.org> |
||||
Date: Wed, 20 Jun 2018 18:21:45 +0900 |
||||
Subject: [PATCH] xscreensaver-getimage: avoid substitution to NULL pointer |
||||
|
||||
When user chooses not to use any image resource on "Image Manupulation" |
||||
in xscreensaver-demo, xscreensaver-getimage program tries to do |
||||
GRAB_BARS mode, then calls colorbars() function and it causes segfault |
||||
like: |
||||
|
||||
#0 0x000055555556227a in minixpm_to_ximage (dpy=dpy@entry=0x555555788b10, visual=visual@entry=0x555555795dd0, colormap=colormap@entry=32, depth=depth@entry=24, transparent_color=<optimized out>, data=<optimized out>, data@entry=0x555555775e80 <logo_180_xpm>, width_ret=0x7fffffffcb30, height_ret=0x7fffffffcb34, pixels_ret=0x0, npixels_ret=0x0, mask_ret=0x7fffffffcb38) at ../../utils/minixpm.c:248 |
||||
#1 0x0000555555561b93 in xscreensaver_logo (screen=screen@entry=0x55555578a1d0, visual=visual@entry=0x555555795dd0, drawable=drawable@entry=707, cmap=cmap@entry=32, background_color=<optimized out>, pixels_ret=pixels_ret@entry=0x0, npixels_ret=0x0, mask_ret=0x7fffffffccf0, big_p=1) at ../../utils/logo.c:49 |
||||
#2 0x000055555555ab5f in colorbars (cmap=32, drawable=707, visual=0x555555795dd0, screen=0x55555578a1d0) at ../../driver/xscreensaver-getimage.c:319 |
||||
#3 0x000055555555ab5f in get_image (screen=<optimized out>, file=<optimized out>, dir=<optimized out>, image_p=<optimized out>, video_p=<optimized out>, desk_p=<optimized out>, verbose_p=0, drawable=707, window=707) at ../../driver/xscreensaver-getimage.c:1697 |
||||
#4 0x000055555555ab5f in main (argc=<optimized out>, argv=<optimized out>) at ../../driver/xscreensaver-getimage.c:1994 |
||||
#5 0x00007ffff54d818b in __libc_start_main (main=0x55555555a4f0 <main>, argc=2, argv=0x7fffffffd428, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd418) |
||||
at ../csu/libc-start.c:308 |
||||
|
||||
This patch avoids NULL pointer accessment, as xscreensaver 5.38 was doing |
||||
in (5.38) draw_colorbars() function. |
||||
--- |
||||
driver/xscreensaver-getimage.c | 4 +++- |
||||
1 file changed, 3 insertions(+), 1 deletion(-) |
||||
|
||||
diff --git a/driver/xscreensaver-getimage.c b/driver/xscreensaver-getimage.c |
||||
index b9715ae..6cf5c99 100644 |
||||
--- a/driver/xscreensaver-getimage.c |
||||
+++ b/driver/xscreensaver-getimage.c |
||||
@@ -316,9 +316,11 @@ static void |
||||
colorbars (Screen *screen, Visual *visual, Drawable drawable, Colormap cmap) |
||||
{ |
||||
Pixmap mask = 0; |
||||
+ unsigned long *pixels; /* ignored - unfreed */ |
||||
+ int npixels; |
||||
Pixmap logo = xscreensaver_logo (screen, visual, drawable, cmap, |
||||
BlackPixelOfScreen (screen), |
||||
- 0, 0, &mask, True); |
||||
+ &pixels, &npixels, &mask, True); |
||||
draw_colorbars (screen, visual, drawable, cmap, 0, 0, 0, 0, logo, mask); |
||||
XFreePixmap (DisplayOfScreen (screen), logo); |
||||
XFreePixmap (DisplayOfScreen (screen), mask); |
||||
-- |
||||
2.17.1 |
||||
|
Loading…
Reference in new issue