- moved binary to %{_bindir} instead of %{_prefix}/games
- patched ltris to prevent it from trying to save the highscores to a system-wide file - ltris no longer runs as SUID/GUID games, but as the regular user, as highscores are now only stored in the home directory OBS-URL: https://build.opensuse.org/package/show/games/ltris?expand=0&rev=11
This commit is contained in:
parent
5ee7c109a5
commit
2ced14fd91
44
ltris-no_system_wide_hiscore_file.patch
Normal file
44
ltris-no_system_wide_hiscore_file.patch
Normal file
@ -0,0 +1,44 @@
|
||||
--- src/chart.c.orig 2011-03-02 11:10:19.000000000 +0100
|
||||
+++ src/chart.c 2011-10-31 12:00:50.608000463 +0100
|
||||
@@ -189,14 +189,10 @@
|
||||
if ( charts ) list_delete( charts ); charts = 0;
|
||||
charts = list_create( LIST_AUTO_DELETE, chart_set_delete );
|
||||
/* load highscore */
|
||||
- if ( !chart_load_from_path( HI_DIR ) ) {
|
||||
- fprintf( stderr, "Unable to access highscore chart in '%s'.\n", HI_DIR );
|
||||
- fprintf( stderr, "Trying to use config directory '%s'.\n", config.dir_name );
|
||||
- if ( !chart_load_from_path( config.dir_name ) ) {
|
||||
+ if ( !chart_load_from_path( config.dir_name ) ) {
|
||||
fprintf( stderr, "Unable to access highscore chart in config directory... won't be "
|
||||
"able to save any results. Sorry.\n" );
|
||||
return;
|
||||
- }
|
||||
}
|
||||
printf( "Saving highscore chart in: %s\n", chart_path );
|
||||
/* load resources */
|
||||
--- src/Makefile.in.orig 2011-10-31 12:00:55.535000463 +0100
|
||||
+++ src/Makefile.in 2011-10-31 12:01:03.235000463 +0100
|
||||
@@ -610,10 +610,6 @@
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)
|
||||
$(INSTALL_DATA) figures $(DESTDIR)$(inst_dir)/figures
|
||||
- $(mkinstalldirs) $(DESTDIR)$(hi_dir)
|
||||
- if ! test -f $(DESTDIR)$(hi_dir)/ltris.hscr; then \
|
||||
- $(INSTALL_DATA) --mode=666 empty.hscr $(DESTDIR)$(hi_dir)/ltris.hscr; \
|
||||
- fi;
|
||||
|
||||
uninstall-local:
|
||||
-rm -fr $(DESTDIR)$(inst_dir)
|
||||
--- src/Makefile.am.orig 2011-03-02 11:10:19.000000000 +0100
|
||||
+++ src/Makefile.am 2011-10-31 12:00:50.627000462 +0100
|
||||
@@ -18,10 +18,6 @@
|
||||
install-data-local:
|
||||
$(mkinstalldirs) $(DESTDIR)$(inst_dir)
|
||||
$(INSTALL_DATA) figures $(DESTDIR)$(inst_dir)/figures
|
||||
- $(mkinstalldirs) $(DESTDIR)$(hi_dir)
|
||||
- if ! test -f $(DESTDIR)$(hi_dir)/ltris.hscr; then \
|
||||
- $(INSTALL_DATA) --mode=666 empty.hscr $(DESTDIR)$(hi_dir)/ltris.hscr; \
|
||||
- fi;
|
||||
|
||||
uninstall-local:
|
||||
-rm -fr $(DESTDIR)$(inst_dir)
|
@ -1 +0,0 @@
|
||||
setBadness('permissions-file-setuid-bit', 0)
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 31 11:06:53 UTC 2011 - pascal.bleser@opensuse.org
|
||||
|
||||
- moved binary to %{_bindir} instead of %{_prefix}/games
|
||||
- patched ltris to prevent it from trying to save the highscores to a
|
||||
system-wide file
|
||||
- ltris no longer runs as SUID/GUID games, but as the regular user, as
|
||||
highscores are now only stored in the home directory
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 31 10:12:17 UTC 2011 - pascal.bleser@opensuse.org
|
||||
|
||||
|
@ -1,5 +1,10 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=LTris
|
||||
Exec=ltris
|
||||
Version=1.0
|
||||
Terminal=false
|
||||
Icon=ltris.xpm
|
||||
Type=Application
|
||||
Categories=
|
||||
Exec=ltris
|
||||
Name=LTris
|
||||
GenericName=Falling Bricks Arcade Game
|
||||
Comment=LTris is an arcade game in the style of T*tr*s
|
||||
|
24
ltris.spec
24
ltris.spec
@ -31,9 +31,8 @@ Url: http://lgames.sourceforge.net/index.php?project=LTris
|
||||
# http://prdownloads.sourceforge.net/lgames/ltris-%{version}.tar.gz
|
||||
Source: ltris-%{version}.tar.bz2
|
||||
Source1: %{name}.desktop
|
||||
Source99: ltris-rpmlintrc
|
||||
Patch1: ltris-no_system_wide_hiscore_file.patch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
PreReq: permissions
|
||||
|
||||
%description
|
||||
LTris is a very polished Tetris clone. It is highly configurable due to
|
||||
@ -44,13 +43,17 @@ controlled.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1
|
||||
# we patch both Makefile.am and Makefile.in; touch Makefile.in here again
|
||||
# to make sure configure won't run autoreconf (which it does if the .am file
|
||||
# is newer than the .in file):
|
||||
touch src/Makefile.in
|
||||
|
||||
%build
|
||||
export CFLAGS="%{optflags} -fPIC -fPIE"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
%configure \
|
||||
--datadir=%{_datadir}/games \
|
||||
--bindir=%{_prefix}/games \
|
||||
--localstatedir=%{_localstatedir}/games
|
||||
|
||||
make %{?_smp_mflags}
|
||||
@ -73,23 +76,12 @@ mv $RPM_BUILD_ROOT%{_datadir}/games/locale $RPM_BUILD_ROOT%{_datadir}/locale
|
||||
%fdupes -s "%{buildroot}%{_datadir}/games/ltris"
|
||||
%endif
|
||||
|
||||
%post
|
||||
%if 0%{?suse_version} < 1140
|
||||
%run_permissions
|
||||
%else
|
||||
%set_permissions %{_prefix}/games/ltris
|
||||
%endif
|
||||
|
||||
%verifyscript
|
||||
%verify_permissions -e %{_prefix}/games/ltris
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(644,root,root,755)
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS COPYING ChangeLog README
|
||||
%attr(2755,games,games) %{_prefix}/games/ltris
|
||||
%{_bindir}/ltris
|
||||
%dir %{_datadir}/games/ltris
|
||||
%{_datadir}/games/ltris/*
|
||||
%attr(664,games,games) /var/games/ltris.hscr
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/pixmaps/ltris.xpm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user