@ -1,9 +1,23 @@
%define name xscreensaver
%define name xscreensaver
%define mainversion 5.44
%define mainversion 5.45
%define beta_ver %{nil}
%define beta_ver %{nil}
%define modular_conf 1
%define modular_conf 1
%define split_getimage 0
%if 0%{?fedora} >= 14 || 0%{?el7} || 0%{?el8}
%define split_getimage 1
%define split_getimage 1
%define fedora_rel 1
%endif
%define enable_appres 1
%if 0%{?el7} || 0%{?el8}
# EL does not have appres
%define enable_appres 0
%endif
%define fedora_rel 5
%global use_clang_as_cc 0
%global use_clang_as_cc 0
%global use_clang_analyze 0
%global use_clang_analyze 0
%global use_cppcheck 0
%global use_cppcheck 0
@ -11,6 +25,7 @@
%global use_gcc_trap_on_sanitize 0
%global use_gcc_trap_on_sanitize 0
%global use_gcc_analyzer 0
%global use_gcc_analyzer 0
%undefine extrarel
%undefine extrarel
%global flagrel %{nil}
%global flagrel %{nil}
%if 0%{?use_cppcheck} >= 1
%if 0%{?use_cppcheck} >= 1
%global flagrel %{flagrel}.cppcheck
%global flagrel %{flagrel}.cppcheck
@ -19,18 +34,38 @@
%global flagrel %{flagrel}.san
%global flagrel %{flagrel}.san
%endif
%endif
# EPEL6
# EPEL6
%{!?__git:%define __git git}
%{!?__git:%define __git git}
%if 0%{?fedora}
%define default_text %{_sysconfdir}/fedora-release
%else
%define default_text %{_sysconfdir}/system-release
%define default_text %{_sysconfdir}/system-release
%endif
%define default_URL http://planet.fedoraproject.org/rss20.xml
%define default_URL http://planet.fedoraproject.org/rss20.xml
%define pam_ver 0.80-7
%define pam_ver 0.80-7
%define autoconf_ver 2.53
%define autoconf_ver 2.53
%define update_po 1
%define update_po 1
%define build_tests 0
%define build_tests 0
%global support_setcap 0
%global support_setcap 0
%if 0%{?fedora} >= 31 || 0%{?el7} > 0|| 0%{?el8} > 0
# TODO write selinux policy for selinux-policy-mls
# (currently works with selinux-policy-targeted)
#%%global support_setcap 1
%endif
# enable xscreensaver-systemd for F-33
%global support_systemd 0
%if 0%{?fedora} >= 33 || 0%{?el7} || 0%{?el8}
%global support_systemd 1
%endif
%undefine _changelog_trimtime
%undefine _changelog_trimtime
Summary: X screen saver and locker
Summary: X screen saver and locker
Name: %{name}
Name: %{name}
Version: %{mainversion}
Version: %{mainversion}
@ -42,30 +77,47 @@ Source0: http://www.jwz.org/xscreensaver/xscreensaver-%{mainversion}%{?b
%if %{modular_conf}
%if %{modular_conf}
Source10: update-xscreensaver-hacks
Source10: update-xscreensaver-hacks
%endif
%endif
%if 0%{?fedora} >= 12 || 0%{?el7} || 0%{?el8}
Source11: xscreensaver-autostart
Source11: xscreensaver-autostart
Source12: xscreensaver-autostart.desktop
Source12: xscreensaver-autostart.desktop
%endif
# wrapper script for switching user (bug 1878730)
Source13: xscreensaver-newlogin-wrapper
##
##
## Patches
## Patches
##
##
# bug 129335
# bug 129335
Patch1: xscreensaver-5.44-0001-barcode-glsnake-sanitize-the-names-of-modes.patch
Patch1: xscreensaver-5.45-0001-barcode-glsnake-sanitize-the-names-of-modes.patch
## Patches already sent to the upsteam
## Patches already sent to the upsteam
## Patches which must be discussed with upstream
## Patches which must be discussed with upstream
# See bug 472061
# See bug 472061
Patch21: xscreensaver-5.35-webcollage-default-nonet.patch
Patch21: xscreensaver-5.35-webcollage-default-nonet.patch
# Patch to compile driver/test-xdpms
# Patch to compile driver/test-xdpms
Patch52: xscreensaver-5.44-0002-Patch-to-compile-driver-test-xdpms.patch
Patch52: xscreensaver-5.44-0002-Patch-to-compile-driver-test-xdpms.patch
#
#
# init_crystal: kill gcc7 -Wint-in-bool-context
Patch3604: xscreensaver-5.36-0004-init_crystal-kill-gcc7-Wint-in-bool-context.patch
# misc: kill gcc warn_unused_result warnings
# misc: kill gcc warn_unused_result warnings
Patch3607: xscreensaver-5.36-0007-misc-kill-gcc-warn_unused_result-warnings.patch
Patch3607: xscreensaver-5.36-0007-misc-kill-gcc-warn_unused_result-warnings.patch
# open new window for man when using gnome-terminal
# open new window for man when using gnome-terminal
Patch4261: xscreensaver-5.42-0061-open-new-window-for-man-when-using-gnome-terminal.patch
Patch4261: xscreensaver-5.42-0061-open-new-window-for-man-when-using-gnome-terminal.patch
# free_gibson: fix order of freeing memory
# test-password.c: add skel definition for clientmessage_response
Patch4401: xscreensaver-5.44-0101-free_gibson-fix-order-of-freeing-memory.patch
Patch4501: xscreensaver-5.45-1001-test-password.c-add-skel-definition-for-clientmessa.patch
# ya_rand_init: avoid signed integer overflow by with recent pid_max value
# asm6502.c/immediate: readd free() call accidentally removed during gcc warnings fix
Patch4402: xscreensaver-5.44-0102-ya_rand_init-avoid-signed-integer-overflow-by-with-r.patch
Patch4502: xscreensaver-5.45-0002-asm6502.c-immediate-readd-free-call-accidentally-rem.patch
# beats/draw_beats: avoid integer overflow by multiplication
Patch4503: xscreensaver-5.45-0003-beats-draw_beats-avoid-integer-overflow-by-multiplic.patch
# xscreensaver-systemd: fix blurb strncpy
Patch4504: xscreensaver-5.45-0004-xscreensaver-systemd-fix-blurb-strncpy.patch
# recanim.c: fix up -Wformat-overflow warning
Patch4505: xscreensaver-5.45-0005-recanim.c-fix-up-Wformat-overflow-warning.patch
# asm6502.c/newAsmLine: shut up -Wstringop warning
Patch4506: xscreensaver-5.45-0006-asm6502.c-newAsmLine-shut-up-Wstringop-warning.patch
# lock.c/draw_passwd_window: show logo and ok button
Patch4507: xscreensaver-5.45-0007-lock.c-draw_passwd_window-show-logo-and-ok-button.patch
# test-screens.c: add skel XA_SCREENSAVER_VERSION definition
Patch4551: xscreensaver-5.45-0051-test-screens.c-add-skel-XA_SCREENSAVER_VERSION-defin.patch
#
# gcc warning cleanup
# Some cppcheck cleanup
#
#
# Debugging patch
# Debugging patch
# Not apply by default
# Not apply by default
@ -94,6 +146,7 @@ BuildRequires: cppcheck
BuildRequires: libasan
BuildRequires: libasan
BuildRequires: libubsan
BuildRequires: libubsan
%endif
%endif
BuildRequires: make
BuildRequires: git
BuildRequires: git
BuildRequires: autoconf
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: automake
@ -109,7 +162,9 @@ BuildRequires: sed
# BuildRequires: xdg-utils
# BuildRequires: xdg-utils
BuildRequires: xorg-x11-proto-devel
BuildRequires: xorg-x11-proto-devel
# extrusioni
# extrusioni
#BuildRequires: libgle-devel
%if 0%{?fedora} >= 13
BuildRequires: libgle-devel
%endif
BuildRequires: libX11-devel
BuildRequires: libX11-devel
BuildRequires: libXScrnSaver-devel
BuildRequires: libXScrnSaver-devel
BuildRequires: libXext-devel
BuildRequires: libXext-devel
@ -124,10 +179,8 @@ BuildRequires: libpng-devel
# Write explicitly
# Write explicitly
BuildRequires: libXrandr-devel
BuildRequires: libXrandr-devel
BuildRequires: libXt-devel
BuildRequires: libXt-devel
%if 0%{?fedora} <= 30
# libXxf86misc removed from F-31
# libXxf86misc removed from F-31
BuildRequires: libXxf86misc-devel
#BuildRequires: libXxf86misc-devel
%endif
BuildRequires: libXxf86vm-devel
BuildRequires: libXxf86vm-devel
# XScreenSaver 5.31
# XScreenSaver 5.31
BuildRequires: libXft-devel
BuildRequires: libXft-devel
@ -141,6 +194,10 @@ BuildRequires: libglade2-devel
%if 0%{?support_setcap} >= 1
%if 0%{?support_setcap} >= 1
BuildRequires: pkgconfig(libcap)
BuildRequires: pkgconfig(libcap)
%endif
%endif
# From F-33, enable systemd support
%if 0%{?support_systemd} >= 1
BuildRequires: pkgconfig(libsystemd)
%endif
%if 0%{?fedora}
%if 0%{?fedora}
BuildRequires: %{default_text}
BuildRequires: %{default_text}
%endif
%endif
@ -157,10 +214,12 @@ Requires: %{_sysconfdir}/pam.d/system-auth
Requires: pam > %{pam_ver}
Requires: pam > %{pam_ver}
# For xdg-open
# For xdg-open
Requires: xdg-utils
Requires: xdg-utils
%if ! %{split_getimage}
%if (! %{split_getimage}) || 0%{?enable_appres}
Requires: xorg-x11-resutils
Requires: appres
%endif
%endif
Requires: xorg-x11-fonts-ISO8859-1-100dpi
Requires: xorg-x11-fonts-ISO8859-1-100dpi
# For switch user wrapper
Requires: %{_sbindir}/pidof
%if 0%{?build_tests} < 1
%if 0%{?build_tests} < 1
# Obsoletes but not Provides
# Obsoletes but not Provides
Obsoletes: xscreeensaver-tests < %{epoch}:%{version}-%{release}
Obsoletes: xscreeensaver-tests < %{epoch}:%{version}-%{release}
@ -171,8 +230,9 @@ Summary: A base package for screensavers
%if 0%{?fedora} < 19
%if 0%{?fedora} < 19
Requires: %{name}-base = %{epoch}:%{version}-%{release}
Requires: %{name}-base = %{epoch}:%{version}-%{release}
%endif
%endif
# For appres, etc
%if 0%{?enable_appres}
Requires: xorg-x11-resutils
Requires: appres
%endif
%package extras
%package extras
Summary: An enhanced set of screensavers
Summary: An enhanced set of screensavers
@ -245,7 +305,7 @@ This package contains the bare minimum needed to blank and
lock your screen. The graphical display modes are the
lock your screen. The graphical display modes are the
"xscreensaver-extras" and "xscreensaver-gl-extras" packages.
"xscreensaver-extras" and "xscreensaver-gl-extras" packages.
%description -l fr base
%description -l fr base
Un économiseur d'écran modulaire pour le système X Window.
Un économiseur d'écran modulaire pour le système X Window.
Ce paquet contient le minimum vital pour éteindre et verouiller
Ce paquet contient le minimum vital pour éteindre et verouiller
votre écran. Les modes d'affichages graphiques sont inclus
votre écran. Les modes d'affichages graphiques sont inclus
@ -319,7 +379,7 @@ rm -f driver/XScreenSaver_ad.h
find . -name \*.c -exec chmod ugo-x {} \;
find . -name \*.c -exec chmod ugo-x {} \;
%__git init
%__git init
%__git config user.email "xscreensaver-owner@powerel.org"
%__git config user.email "xscreensaver-owner@fedoraproject.org"
%__git config user.name "XScreenSaver owners"
%__git config user.name "XScreenSaver owners"
%__git add .
%__git add .
%__git commit -m "base" -q
%__git commit -m "base" -q
@ -328,11 +388,17 @@ find . -name \*.c -exec chmod ugo-x {} \;
%__cat %PATCH21 | %__git am
%__cat %PATCH21 | %__git am
%__cat %PATCH52 | %__git am
%__cat %PATCH52 | %__git am
%__cat %PATCH3604 | %__git am
#%%__cat %PATCH3607 | %__git am
#%%__cat %PATCH3607 | %__git am
%__cat %PATCH4261 | %__git am
%__cat %PATCH4261 | %__git am
%__cat %PATCH4401 | %__git am
%__cat %PATCH4402 | %__git am
%__cat %PATCH4501 | %__git am
%__cat %PATCH4502 | %__git am
%__cat %PATCH4503 | %__git am
%__cat %PATCH4551 | %__git am
%__cat %PATCH4504 | %__git am
%__cat %PATCH4505 | %__git am
%__cat %PATCH4506 | %__git am
%__cat %PATCH4507 | %__git am
#%%__cat %PATCH13501 | %%__git am
#%%__cat %PATCH13501 | %%__git am
@ -395,16 +461,20 @@ change_option driver/XScreenSaver.ad.in \
splash=False \
splash=False \
ignoreUninstalledPrograms=True \
ignoreUninstalledPrograms=True \
textProgram=fortune\ -s \
textProgram=fortune\ -s \
%if 0%{?fedora} >= 12
textURL=%{default_URL}
textURL=%{default_URL}
%endif
%__git commit -m "%PATCH_desc" -a
%__git commit -m "%PATCH_desc" -a
# peepers: 5.39: too scary (mtasaka)
# peepers: 5.39: too scary (mtasaka)
# headroom: 5.45: too scary (mtasaka)
%global PATCH_desc \
%global PATCH_desc \
# Disable the following hacks by default \
# Disable the following hacks by default \
# (disable, not remove)
# (disable, not remove)
silence_hack driver/XScreenSaver.ad.in \
silence_hack driver/XScreenSaver.ad.in \
bsod flag \
bsod flag \
peepers \
peepers \
headroom \
%{nil}
%{nil}
%__git commit -m "%PATCH_desc" -a
%__git commit -m "%PATCH_desc" -a
@ -444,7 +514,7 @@ sed -i.manentry -e 's@man %%s@man 6x %%s 2>/dev/null || man 1 %%s @' \
%__git commit -m "%PATCH_desc" -a
%__git commit -m "%PATCH_desc" -a
# Suppress rpmlint warnings.
# Suppress rpmlint warnings.
# suppress about pam config (although this is
# suppress about pam config (although this is
# not the fault of xscreensaver.pam ......).
# not the fault of xscreensaver.pam ......).
#
#
# From xscreensaver-5.15-10, no longer do this
# From xscreensaver-5.15-10, no longer do this
@ -459,8 +529,10 @@ fi
%global PATCH_desc \
%global PATCH_desc \
# Fix for desktop-file-utils 0.14+
# Fix for desktop-file-utils 0.14+
%if 0%{?fedora} >= 9
sed -i.icon -e 's|xscreensaver\.xpm|xscreensaver|' \
sed -i.icon -e 's|xscreensaver\.xpm|xscreensaver|' \
driver/screensaver-properties.desktop.in
driver/screensaver-properties.desktop.in
%endif
%__git commit -m "%PATCH_desc" -a || echo "Nothing changed"
%__git commit -m "%PATCH_desc" -a || echo "Nothing changed"
%global PATCH_desc \
%global PATCH_desc \
@ -485,6 +557,11 @@ sed -i.delay -e 's| delay = 1| delay = 3|' driver/test-fade.c
sed -i.delay -e 's|60 \* 15|20|' driver/test-grab.c
sed -i.delay -e 's|60 \* 15|20|' driver/test-grab.c
%__git commit -m "%PATCH_desc" -a
%__git commit -m "%PATCH_desc" -a
# Well, clang misinterpretates how gcc / autoconf uses -Wunknown-warning-option ....
sed -i 's|-Wunknown-warning-option|-Wfoo-bar-baz|' ax_pthread.m4
%__git commit -m "Really use unknowing warning option" -a
aclocal
aclocal
autoconf
autoconf
autoheader
autoheader
@ -511,40 +588,42 @@ export PATH=$(pwd):$PATH
ln -sf /bin/true xdg-open
ln -sf /bin/true xdg-open
popd
popd
export CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}"
# Set optflags first
export CFLAGS='%{optflags}'
export CXXFLAGS='%{optflags}'
export FFLAGS='%{optflags}'
# Doesn't work well when generating debuginfo...
# Doesn't work well when generating debuginfo...
# export CFLAGS="$(echo $CFLAGS | sed -e 's|-g |-g3 -ggdb |')"
# export CFLAGS="$(echo $CFLAGS | sed -e 's|-g |-g3 -ggdb |')"
%if 0%{?fedora} >= 24
export CFLAGS="$CFLAGS -Wno-long-long"
export CFLAGS="$CFLAGS -Wno-long-long"
export CFLAGS="$CFLAGS -Wno-variadic-macros"
export CFLAGS="$CFLAGS -Wno-variadic-macros"
%endif
%if 0%{?use_clang_as_cc}
%if 0%{?use_clang_as_cc}
export CC=clang
export CC=clang
export CFLAGS="$(echo $CFLAGS | sed -e 's|-fstack-protector-strong|-fstack-protector|')"
export CFLAGS="$(echo $CFLAGS | sed -e 's|-fstack-protector-strong|-fstack-protector|')"
export CFLAGS="$(echo $CFLAGS | sed -e 's|-specs=[^ \t][^ \t]*||')"
export CFLAGS="$(echo $CFLAGS | sed -e 's|-specs=[^ \t][^ \t]*||g')"
export CFLAGS="$(echo $CFLAGS | sed -e 's|-flto=auto -ffat-lto-objects |-flto |')"
export CFLAGS="$CFLAGS -Wno-gnu-statement-expression"
export CFLAGS="$CFLAGS -Wno-gnu-statement-expression"
export LDFLAGS="$(echo $LDFLAGS %__global_ldflags | sed -e 's|-specs=[^ \t][^ \t]*||g')"
export LDFLAGS="$(echo $LDFLAGS | sed -e 's|-specs=[^ \t][^ \t]*||g')"
%if 0%{?fedora} >= 33
export LDFLAGS="$LDFLAGS -flto"
%endif
%endif
%endif
%if 0%{?use_gcc_strict_sanitize}
%if 0%{?use_gcc_strict_sanitize}
export CC="gcc -fsanitize=address -fsanitize=undefined"
export CC="${CC} -fsanitize=address -fsanitize=undefined"
%if 0%{?fedora} >= 24
export LDFLAGS="${LDFLAGS} -pthread"
export LDFLAGS="%__global_ldflags -pthread"
%endif
%if 0%{?use_gcc_trap_on_sanitize}
%if 0%{?use_gcc_trap_on_sanitize}
export CC="$CC -fsanitize-undefined-trap-on-error"
export CC="$CC -fsanitize-undefined-trap-on-error"
%endif
%endif
# Currently -fPIE binary cannot work with ASAN on kernel 4.12
# Currently -fPIE binary cannot work with ASAN on kernel 4.12
# https://github.com/google/sanitizers/issues/837
# https://github.com/google/sanitizers/issues/837
export CFLAGS="$(echo $CFLAGS | sed -e 's|-specs=[^ \t][^ \t]*||')"
export CFLAGS="$(echo $CFLAGS | sed -e 's|-specs=[^ \t][^ \t]*hardened[^ \t][^ \t]*||g')"
export LDFLAGS="$(echo $LDFLAGS %__global_ldflags | sed -e 's|-specs=[^ \t][^ \t]*||g')"
export LDFLAGS="$(echo $LDFLAGS | sed -e 's|-specs=[^ \t][^ \t]*hardened[^ \t][^ \t]*||g')"
%endif
%endif
%if 0%{?use_gcc_analyzer}
%if 0%{?use_gcc_analyzer}
if [ "x${CC}" == x ] ; then
export CC=gcc
fi
export CC="${CC} -fanalyzer"
export CC="${CC} -fanalyzer"
# make build log look clear
# make build log look clear
%global _smp_mflags -j1
%global _smp_mflags -j1
@ -556,24 +635,22 @@ CONFIG_OPTS="$CONFIG_OPTS --with-text-file=%{default_text}"
CONFIG_OPTS="$CONFIG_OPTS --with-x-app-defaults=%{_datadir}/X11/app-defaults"
CONFIG_OPTS="$CONFIG_OPTS --with-x-app-defaults=%{_datadir}/X11/app-defaults"
CONFIG_OPTS="$CONFIG_OPTS --disable-root-passwd"
CONFIG_OPTS="$CONFIG_OPTS --disable-root-passwd"
CONFIG_OPTS="$CONFIG_OPTS --with-browser=xdg-open"
CONFIG_OPTS="$CONFIG_OPTS --with-browser=xdg-open"
# From xscreensaver 5.12, login-manager option is on by default
# From xscreensaver 5.12, login-manager option is on by default
# For now, let's enable it on F-14 and above
# For now, let's enable it on F-14 and above
%if 0%{?fedora} >= 14
pushd TMPBINDIR
pushd TMPBINDIR
ln -sf /bin/true gdmflexiserver
# ln -sf /bin/true gdmflexiserver
install -cpm 0755 %{SOURCE13} .
CONFIG_OPTS="$CONFIG_OPTS --with-login-manager=xscreensaver-newlogin-wrapper"
popd
popd
%else
CONFIG_OPTS="$CONFIG_OPTS --without-login-manager"
%endif
# Enable extrusion on F-13 and above
# Enable extrusion on F-13 and above
%if 0%{?fedora} <= 12
# CONFIG_OPTS="$CONFIG_OPTS --with-gle" # default
CONFIG_OPTS="$CONFIG_OPTS --without-gle"
%endif
# Enable account type pam validation on F-18+,
# Enable account type pam validation on F-18+,
# debian bug 656766
# debian bug 656766
%if 0%{?fedora} >= 18
CONFIG_OPTS="$CONFIG_OPTS --enable-pam-check-account-type"
CONFIG_OPTS="$CONFIG_OPTS --enable-pam-check-account-type"
%endif
# xscreensaver 5.30
# xscreensaver 5.30
CONFIG_OPTS="$CONFIG_OPTS --with-record-animation"
CONFIG_OPTS="$CONFIG_OPTS --with-record-animation"
@ -581,6 +658,10 @@ CONFIG_OPTS="$CONFIG_OPTS --with-record-animation"
CONFIG_OPTS="$CONFIG_OPTS --with-setcap-hacks"
CONFIG_OPTS="$CONFIG_OPTS --with-setcap-hacks"
%endif
%endif
%if 0%{?support_systemd}
CONFIG_OPTS="$CONFIG_OPTS --with-systemd"
%endif
# This is flaky:
# This is flaky:
# CONFIG_OPTS="$CONFIG_OPTS --with-login-manager"
# CONFIG_OPTS="$CONFIG_OPTS --with-login-manager"
@ -593,10 +674,24 @@ ln -s ../configure .
%configure $CONFIG_OPTS || { cat config.log ; sleep 10 ; exit 1; }
%configure $CONFIG_OPTS || { cat config.log ; sleep 10 ; exit 1; }
rm -f configure
rm -f configure
# Remove embedded build path
sed -i driver/XScreenSaver.ad -e "s|$(pwd)/TMPBINDIR/||"
%if %{update_po}
%if %{update_po}
#( cd po ; make generate_potfiles_in update-po )
#( cd po ; make generate_potfiles_in update-po )
# ???
# ???
( cd po ; make generate_potfiles_in ; cp -p POTFILES.in .. ; export srcdir=.. ; make update-po ; rm -f ../POTFILES_in )
pushd po
make generate_potfiles_in
cp -p POTFILES.in ..
# Workaround for ui file
sed -i ../POTFILES.in POTFILES.in POTFILES \
-e '\@-demo\.ui@s|^\([ \t]*\)\(.*\)$|\1[type: gettext/glade]\2|'
make xscreensaver.pot srcdir=..
( export srcdir=.. ; make update-po )
rm -f ../POTFILES_in
popd
( cp -p ../po/*.po po/)
( cp -p ../po/*.po po/)
( ( cd ../po ; git add *.po ; git commit -m "po regenerated" ) || true )
( ( cd ../po ; git add *.po ; git commit -m "po regenerated" ) || true )
%endif
%endif
@ -616,6 +711,9 @@ EOF
fi
fi
# Workaround end
# Workaround end
# From 5.45: temporary workaround for installation issue
cp -p ../driver/xscreensaver-demo.ui driver/
%if 0%{?use_clang_analyze} < 1
%if 0%{?use_clang_analyze} < 1
# Workaround for ppc64 build failure
# Workaround for ppc64 build failure
make -C ../hacks/images -j1
make -C ../hacks/images -j1
@ -656,21 +754,24 @@ cd ..
# test
# test
# for now, build tests anyway (even if they are not to be installed)
# for now, build tests anyway (even if they are not to be installed)
#%if %{build_tests}
%if 1
make tests -C driver
make tests -C driver
%endif
%if 0%{?use_cppcheck} >= 1
%if 0%{?use_cppcheck} >= 1
cd ..
cd ..
CPPCHECK_FLAGS=""
CPPCHECK_FLAGS=""
CPPCHECK_FLAGS="$CPPCHECK_FLAGS --enable=all --std=c89 -U__STRICT_ANSI__"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS --enable=all --std=c89 -U__STRICT_ANSI__"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS -I. -Iutils -Idriver -Ihacks -I$archdir -I$archdir/hacks/"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS -I. -Iutils -Iutils/images -Idriver -Ihacks"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS -I$archdir -I$archdir/driver -I$archdir/hacks"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS -I$archdir/hacks/glx"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS -I%{_includedir}"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS -I%{_includedir}"
# find stddef.h
# find stddef.h
GCC_HEADER_PATH=$(echo '#include <stddef.h>' | gcc -E - | sed -n -e 's|^.*"\(.*\)stddef\.h".*$|\1|p' | head -n 1)
GCC_HEADER_PATH=$(echo '#include <stddef.h>' | gcc -E - | sed -n -e 's|^.*"\(.*\)stddef\.h".*$|\1|p' | head -n 1)
CPPCHECK_FLAGS="$CPPCHECK_FLAGS -I$GCC_HEADER_PATH"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS -I$GCC_HEADER_PATH"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS $(pkg-config --cflags gtk+-2.0 | sed -e 's|-pthread||')"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS $(pkg-config --cflags gtk+-2.0 | sed -e 's|-pthread||')"
# C default macros
CPPCHECK_FLAGS="$CPPCHECK_FLAGS $(echo "int foo; " | gcc -dM -E - | sed -n -e "s@^\#define \([^ ][^ ]*\) 1\$@-D\1@p")"
# xscreeensaver macros
CPPCHECK_FLAGS="$CPPCHECK_FLAGS -DSTANDALONE -DHAVE_CONFIG_H -DUSE_GL"
CPPCHECK_FLAGS="$CPPCHECK_FLAGS -DSTANDALONE -DHAVE_CONFIG_H -DUSE_GL"
cppcheck $CPPCHECK_FLAGS . 2>&1 | tee cppcheck-result.log
cppcheck $CPPCHECK_FLAGS . 2>&1 | tee cppcheck-result.log
@ -859,13 +960,13 @@ popd
# Leave autostart stuff installed (at least useful for LXDE),
# Leave autostart stuff installed (at least useful for LXDE),
# but not show them by default for all DE
# but not show them by default for all DE
# (bug 1266521) for F-27+
# (bug 1266521) for F-27+
%if 0%{?fedora} >= 12
%if 0%{?fedora} >= 12 || 0%{?el7} || 0%{?el8}
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart
install -cpm 0755 %{SOURCE11} ${RPM_BUILD_ROOT}%{_libexecdir}/
install -cpm 0755 %{SOURCE11} ${RPM_BUILD_ROOT}%{_libexecdir}/
desktop-file-install \
desktop-file-install \
--vendor "" \
--vendor "" \
--dir ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart \
--dir ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart \
%if 0%{?fedora} >= 27
%if 0%{?fedora} >= 27 || 0%{?el8}
--add-only-show-in=X-NODEFAULT \
--add-only-show-in=X-NODEFAULT \
%else
%else
--add-only-show-in=GNOME \
--add-only-show-in=GNOME \
@ -967,6 +1068,11 @@ chmod 0755 webcollage
echo "%%{_libexecdir}/%%{name}/webcollage.original" >> \
echo "%%{_libexecdir}/%%{name}/webcollage.original" >> \
$dd/extras.files
$dd/extras.files
# install wrapper-script for switching user
install -cpm 0755 %{SOURCE13} ${RPM_BUILD_ROOT}%{_libexecdir}/%{name}
echo "%{_libexecdir}/%{name}/xscreensaver-newlogin-wrapper" >> $dd/base.files
# Make sure all files are readable by all, and writable only by owner.
# Make sure all files are readable by all, and writable only by owner.
#
#
chmod -R a+r,u+w,og-w ${RPM_BUILD_ROOT}
chmod -R a+r,u+w,og-w ${RPM_BUILD_ROOT}
@ -976,7 +1082,7 @@ chmod -R a+r,u+w,og-w ${RPM_BUILD_ROOT}
%{_sbindir}/update-xscreensaver-hacks
%{_sbindir}/update-xscreensaver-hacks
%endif
%endif
%if 0%{?fedora} >= 18
%if 0%{?fedora} >= 18 || 0%{?el8}
# In the case that pam setting is edited locally by sysadmin:
# In the case that pam setting is edited locally by sysadmin:
if ! grep -q '^account' %{_sysconfdir}/pam.d/xscreensaver
if ! grep -q '^account' %{_sysconfdir}/pam.d/xscreensaver
then
then
@ -1035,10 +1141,63 @@ exit 0
%endif
%endif
%changelog
%changelog
* Thu Apr 16 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-1
* Tue Mar 02 2021 Ding-Yi Chen <dchen@redhat.com> - 1:5.45-5
- Fix EPEL 8 & EPEL 7 build
- Remove appres from EL8 and EL7, because they don't have it.
* Sat Jan 30 2021 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.45-4
- Bump release and rebuild
* Thu Jan 28 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:5.45-3.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Dec 28 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.45-3
- Fix up gcc -Wstringop or -Wformat-overflow warnings
- Make xscreensaver logo or ok button appear on lock screen
* Fri Dec 11 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.45-2
- test-screens.c: add skel XA_SCREENSAVER_VERSION definition
* Thu Dec 10 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.45-1
- Update to 5.45
- asm6502.c/immediate: readd free() call accidentally removed during gcc warnings fix
- beats/draw_beats: avoid integer overflow by multiplication
* Tue Nov 17 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-12
- Clean up gcc10 warnings, especially for -Wstringop
- Clean up some warnings by cppcheck
* Mon Nov 9 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-11
- Another way to make LTO happy with respecting upstream advice
* Sat Nov 7 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-10
- Remove unneeded undefining to make LTO happy
* Thu Oct 22 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-9
- Fix BR for systemd: use pkgconfig(libsystemd)
* Tue Oct 20 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-8
- peepers / reset_floater : fix logic for choosing color
* Wed Oct 14 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-6
- Install experimental wrapper script for switching user (bug 1878730)
* Sat Oct 3 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-5
- FuzzyFlakesFreeFlake: avoid double free on subsequent calls
such as when ConfigureNotify event happens (bug 1884822)
* Fri Sep 25 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-4
- Some spec file cleanup, deleting conditions for no longer supported branches
- Use %%set_build_flags
- F-33+: enable systemd integration
* Tue Jul 28 2020 Adam Jackson <ajax@redhat.com> 1:5.44-3
- Requires appres not xorg-x11-resutils
* Thu Apr 16 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-2
- ya_rand_init: avoid signed integer overflow by with recent pid_max value
- ya_rand_init: avoid signed integer overflow by with recent pid_max value
* Tue Mar 24 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-0
* Tue Mar 24 2020 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:5.44-1
- Update to 5.44
- Update to 5.44
- free_gibson: fix order of freeing memory
- free_gibson: fix order of freeing memory
@ -1389,7 +1548,7 @@ exit 0
* Wed Oct 24 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.20-2
* Wed Oct 24 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.20-2
- Kill dependency of -gss subpackages for gnome-screensaver
- Kill dependency of -gss subpackages for gnome-screensaver
to make MATE desktop happy
to make MATE desktop happy
* Wed Oct 17 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.20-1
* Wed Oct 17 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.20-1
- Update to 5.20
- Update to 5.20
@ -1437,7 +1596,7 @@ exit 0
- Update to 5.17
- Update to 5.17
* Thu Jun 21 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.16-1
* Thu Jun 21 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.16-1
- Update to 5.16
- Update to 5.16
* Mon Jun 18 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.15-10
* Mon Jun 18 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.15-10
- Enable account type pam validation on F-18+ (debian bug 656766)
- Enable account type pam validation on F-18+ (debian bug 656766)
@ -1473,7 +1632,7 @@ exit 0
* Fri Sep 30 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.15-1
* Fri Sep 30 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.15-1
- Update to 5.15
- Update to 5.15
* Sat May 21 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.14-1
* Sat May 21 2011 Mamoru Tasaka <mtasaka@fedoraproject.org> - 1:5.14-1
- 5.14 is released, with just fixing 5.13 DPMS issue
- 5.14 is released, with just fixing 5.13 DPMS issue
@ -1720,7 +1879,7 @@ exit 0
fix bug 336331).
fix bug 336331).
* Thu Oct 18 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1:5.03-12
* Thu Oct 18 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1:5.03-12
- Create -gl-base subpackage and split xscreensaver-gl-helper
- Create -gl-base subpackage and split xscreensaver-gl-helper
into -gl-base subpackage so that external GL screensavers can
into -gl-base subpackage so that external GL screensavers can
use it (bug 336331)
use it (bug 336331)
@ -1831,7 +1990,7 @@ exit 0
* Fri Aug 18 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1:5.00-17
* Fri Aug 18 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1:5.00-17
- Very nasty segv problem was brought by me. Fixing......
- Very nasty segv problem was brought by me. Fixing......
* Thu Aug 10 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1:5.00-16
* Thu Aug 10 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1:5.00-16
- Move man entry to 6x (bug #197741)
- Move man entry to 6x (bug #197741)
@ -1876,7 +2035,7 @@ exit 0
from current mock.
from current mock.
* Wed Jun 7 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1:5.00-6
* Wed Jun 7 2006 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 1:5.00-6
- Another fixes of config files for ifsmap as reported to jwz
- Another fixes of config files for ifsmap as reported to jwz
livejournal page.
livejournal page.
- Update Japanese translation.
- Update Japanese translation.
- Locale fix for xscreensaver-text.
- Locale fix for xscreensaver-text.
@ -1933,10 +2092,10 @@ exit 0
* Wed Sep 28 2005 Ray Strode <rstrode@redhat.com> 1:4.22-18
* Wed Sep 28 2005 Ray Strode <rstrode@redhat.com> 1:4.22-18
- accept zero timeout values for suspend and off.
- accept zero timeout values for suspend and off.
Patch from Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp>
Patch from Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp>
(bug 157501).
(bug 157501).
* Fri Sep 23 2005 Ray Strode <rstrode@redhat.com> 1:4.22-17
* Fri Sep 23 2005 Ray Strode <rstrode@redhat.com> 1:4.22-17
- remove explicit dependency on xscreensaver-base for
- remove explicit dependency on xscreensaver-base for
extras and gl-extras packages
extras and gl-extras packages
* Fri Sep 16 2005 Ray Strode <rstrode@redhat.com> 1:4.22-16
* Fri Sep 16 2005 Ray Strode <rstrode@redhat.com> 1:4.22-16
@ -1962,10 +2121,10 @@ exit 0
- ignore unprintable characters in password dialog (bug 135966).
- ignore unprintable characters in password dialog (bug 135966).
* Thu Aug 25 2005 Ray Strode <rstrode@redhat.com> 1:4.22-10
* Thu Aug 25 2005 Ray Strode <rstrode@redhat.com> 1:4.22-10
- Move man pages to section 6 (bug 166441).
- Move man pages to section 6 (bug 166441).
* Wed Aug 24 2005 Ray Strode <rstrode@redhat.com> 1:4.22-9
* Wed Aug 24 2005 Ray Strode <rstrode@redhat.com> 1:4.22-9
- The only legitimate way to call realpath is with NULL
- The only legitimate way to call realpath is with NULL
buffer (bug 165270).
buffer (bug 165270).
* Fri Aug 19 2005 Ray Strode <rstrode@redhat.com> 1:4.22-8
* Fri Aug 19 2005 Ray Strode <rstrode@redhat.com> 1:4.22-8
@ -1981,11 +2140,11 @@ exit 0
- Update to xscreensaver 4.22.
- Update to xscreensaver 4.22.
* Sun Jun 19 2005 Ray Strode <rstrode@redhat.com> 1:4.21-5
* Sun Jun 19 2005 Ray Strode <rstrode@redhat.com> 1:4.21-5
- Add build requires for desktop-file-utils (bug 160980).
- Add build requires for desktop-file-utils (bug 160980).
* Wed May 11 2005 Ray Strode <rstrode@redhat.com> 1:4.21-4
* Wed May 11 2005 Ray Strode <rstrode@redhat.com> 1:4.21-4
- Allow configuration gui to support hacks with absolute paths
- Allow configuration gui to support hacks with absolute paths
(bug 157417).
(bug 157417).
* Mon May 09 2005 Ray Strode <rstrode@redhat.com> 1:4.21-3
* Mon May 09 2005 Ray Strode <rstrode@redhat.com> 1:4.21-3
- Use @libexecdir@/xscreensaver instead of @HACKDIR@ in
- Use @libexecdir@/xscreensaver instead of @HACKDIR@ in
@ -2026,7 +2185,7 @@ exit 0
- Add utility xscreensaver-config-tool to make changing settings
- Add utility xscreensaver-config-tool to make changing settings
easier (replaces the short lived xscreensaver-register-hack
easier (replaces the short lived xscreensaver-register-hack
program). Use xscreensaver-config-tool to set default settings
program). Use xscreensaver-config-tool to set default settings
instead of using patches.
instead of using patches.
- Split up xscreensaver (fixes 121693).
- Split up xscreensaver (fixes 121693).
- Make preferences dialog slightly more pretty
- Make preferences dialog slightly more pretty
- Make lock dialog slightly more pretty
- Make lock dialog slightly more pretty
@ -2034,7 +2193,7 @@ exit 0
* Fri Nov 26 2004 Than Ngo <than@redhat.com> 1:4.18-13
* Fri Nov 26 2004 Than Ngo <than@redhat.com> 1:4.18-13
- add patch to fix vroot bug and make xscreensaver working in KDE again.
- add patch to fix vroot bug and make xscreensaver working in KDE again.
- get rid of webcollage, which often download porn images
- get rid of webcollage, which often download porn images
* Wed Nov 10 2004 Ray Strode <rstrode@redhat.com> 1:4.18-11
* Wed Nov 10 2004 Ray Strode <rstrode@redhat.com> 1:4.18-11
- Add xscreensaver-register-hack program to make
- Add xscreensaver-register-hack program to make
installing and uninstalling screensavers easier
installing and uninstalling screensavers easier
@ -2045,7 +2204,7 @@ exit 0
(bug 100641)
(bug 100641)
* Wed Nov 10 2004 Ray Strode <rstrode@redhat.com> 1:4.18-9
* Wed Nov 10 2004 Ray Strode <rstrode@redhat.com> 1:4.18-9
- Call pam_acct_mgmt() (might fix bug 137195)
- Call pam_acct_mgmt() (might fix bug 137195)
* Tue Nov 9 2004 Ray Strode <rstrode@redhat.com> 1:4.18-8
* Tue Nov 9 2004 Ray Strode <rstrode@redhat.com> 1:4.18-8
- Give vidwhacker screensaver working defaults
- Give vidwhacker screensaver working defaults
@ -2095,7 +2254,7 @@ exit 0
* Wed May 5 2004 Bill Nottingham <notting@redhat.com> 4.14-5
* Wed May 5 2004 Bill Nottingham <notting@redhat.com> 4.14-5
- config tweaks
- config tweaks
* Wed Mar 31 2004 Karsten Hopp <karsten@redhat.de> 4.14-4
* Wed Mar 31 2004 Karsten Hopp <karsten@redhat.de> 4.14-4
- fix fortune stand-in (#115369)
- fix fortune stand-in (#115369)
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
@ -2222,7 +2381,7 @@ exit 0
- Bump release + rebuild.
- Bump release + rebuild.
* Tue May 22 2001 Havoc Pennington <hp@redhat.com>
* Tue May 22 2001 Havoc Pennington <hp@redhat.com>
- putting in tree for David
- putting in tree for David
* Tue May 22 2001 David Sainty <dsainty@redhat.com>
* Tue May 22 2001 David Sainty <dsainty@redhat.com>
- added DPMS options to command line help
- added DPMS options to command line help
@ -2361,7 +2520,7 @@ exit 0
* Mon Apr 5 1999 Bill Nottingham <notting@redhat.com>
* Mon Apr 5 1999 Bill Nottingham <notting@redhat.com>
- remove setuid bit. Really. I mean it.
- remove setuid bit. Really. I mean it.
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
- auto rebuild in the new build environment (release 3)
- auto rebuild in the new build environment (release 3)
* Fri Mar 19 1999 Bill Nottingham <notting@redhat.com>
* Fri Mar 19 1999 Bill Nottingham <notting@redhat.com>