rpms/cairo-dock/F-9 cairo-dock-1.6.0.1-plug_ins-configure_ac-must-revert.patch, NONE, 1.1 cairo-dock-fix-insecure-tmpfile.patch, NONE, 1.1 cairo-dock-svn1105-configure-missing.patch, NONE, 1.1 cairo-dock.spec, 1.4, 1.5

Mamoru Tasaka (mtasaka) fedora-extras-commits at redhat.com
Thu Jun 19 03:54:46 UTC 2008


Author: mtasaka

Update of /cvs/extras/rpms/cairo-dock/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28832/F-9

Modified Files:
	cairo-dock.spec 
Added Files:
	cairo-dock-1.6.0.1-plug_ins-configure_ac-must-revert.patch 
	cairo-dock-fix-insecure-tmpfile.patch 
	cairo-dock-svn1105-configure-missing.patch 
Log Message:
* Thu Jun 19 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.6.0.1-1.date20080619
- 1.6.0.1


cairo-dock-1.6.0.1-plug_ins-configure_ac-must-revert.patch:

--- NEW FILE cairo-dock-1.6.0.1-plug_ins-configure_ac-must-revert.patch ---
Index: plug-ins/configure.ac
===================================================================
--- plug-ins/configure.ac	(revision 1112)
+++ plug-ins/configure.ac	(revision 1114)
@@ -418,6 +418,7 @@
 	dustbin/data/themes/Silver/Makefile
 	dustbin/data/themes/I_Dustbin/Makefile
 	dustbin/data/themes/Neon/Makefile
+	dustbin/data/themes/Clear/Makefile
 	
 	gnome-integration/Makefile
 	gnome-integration/src/Makefile

cairo-dock-fix-insecure-tmpfile.patch:

--- NEW FILE cairo-dock-fix-insecure-tmpfile.patch ---
--- trunk/plug-ins/compiz-icon/src/applet-notifications.c.tmpuse	2008-06-15 02:04:01.000000000 +0900
+++ trunk/plug-ins/compiz-icon/src/applet-notifications.c	2008-06-15 20:51:54.000000000 +0900
@@ -8,6 +8,8 @@
 
 ******************************************************************************/
 
+#define _BSD_SOURCE
+#include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
 #include <glib/gi18n.h>
@@ -23,13 +25,26 @@
 CD_APPLET_ABOUT (D_("This is the compiz-icon applet\n made by ChAnGFu for Cairo-Dock"))
 
 static void _compiz_get_version (void) {
+	char *tmpfile = g_strdup("/tmp/cd-compiz-version.XXXXXX");
+	char *cmd_header = "compiz.real --version | awk '{print $2}' > ";
+	char *cmd = g_malloc(strlen(cmd_header) + strlen(tmpfile) + 2);
+	int fds = mkstemp(tmpfile);
+	if (fds == -1) {
+		free (tmpfile);
+		free (cmd);
+		return;
+	}
+	close(fds);
+
 	if (myData.iCompizMajor != 0 || myData.iCompizMinor != 0 || myData.iCompizMicro != 0)
 		return ;
-	system ("compiz.real --version | awk '{print $2}' > /tmp/cd-compiz-version");
+	sprintf(cmd, "%s%s", cmd_header, tmpfile);
+	system (cmd);
+	g_free (cmd);
 	GError *erreur = NULL;
 	gsize length = 0;
 	gchar *cContent = NULL;
-	g_file_get_contents ("/tmp/cd-compiz-version", &cContent, &length, &erreur);
+	g_file_get_contents (tmpfile, &cContent, &length, &erreur);
 	if (erreur != NULL) {
 		cd_warning ("Attention : couldn't guess Compiz's version [%s]", erreur->message);
 		g_error_free (erreur);
@@ -40,7 +55,9 @@
 		g_free (cContent);
 	}
 	cd_message ("Compiz : %d.%d.%d", myData.iCompizMajor, myData.iCompizMinor, myData.iCompizMicro);
-	g_remove ("/tmp/cd-compiz-version");
+	g_remove (tmpfile);
+	g_free (tmpfile);
+	tmpfile = NULL;
 }
 
 static void _compiz_dbus_action (const gchar *cCommand) {
--- trunk/plug-ins/nVidia/src/applet-nvidia.c.tmpuse	2008-06-15 12:37:12.000000000 +0900
+++ trunk/plug-ins/nVidia/src/applet-nvidia.c	2008-06-15 21:15:21.000000000 +0900
@@ -100,6 +100,7 @@
 	gchar *cCommand = g_strdup_printf ("bash %s/nvidia-config %s", MY_APPLET_SHARE_DATA_DIR, s_cTmpFileConfig);
 	system (cCommand);
 	g_free (cCommand);
+	close(fds);
 }
 
 static gboolean _nvidia_get_values_from_file (gchar *cContent) {

cairo-dock-svn1105-configure-missing.patch:

--- NEW FILE cairo-dock-svn1105-configure-missing.patch ---
--- ./trunk/plug-ins/configure.ac.missing	2008-06-17 01:22:52.000000000 +0900
+++ ./trunk/plug-ins/configure.ac	2008-06-17 01:54:33.000000000 +0900
@@ -409,6 +409,7 @@
 	dustbin/data/readme
 	dustbin/data/themes/Makefile
 	dustbin/data/themes/Gion/Makefile
+	dustbin/data/themes/Clear/Makefile
 	dustbin/data/themes/Crystal/Makefile
 	dustbin/data/themes/NuoveXT-2/Makefile
 	dustbin/data/themes/OpenClipArt1/Makefile


Index: cairo-dock.spec
===================================================================
RCS file: /cvs/extras/rpms/cairo-dock/F-9/cairo-dock.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- cairo-dock.spec	28 May 2008 06:42:56 -0000	1.4
+++ cairo-dock.spec	19 Jun 2008 03:53:07 -0000	1.5
@@ -1,11 +1,11 @@
 # For svn
-# svn checkout svn://svn.berlios.de/cairo-dock/trunk
+# svn checkout http://svn.berlios.de/svnroot/repos/cairo-dock/trunk
 # mkdir -p opt/cairo-dock
 # mv trunk opt/cairo-dock
 # tar cjf cairo-dock-sources-%%{tag}.tar.bz2 opt/
 
-%define		tarballver	20080528
-%define		mainver		1.5.6
+%define		tarballver	20080619
+%define		mainver		1.6.0.1
 %define		build_gecko	1
 
 
@@ -28,6 +28,9 @@
 License:	GPLv3+
 URL:		http://www.cairo-dock.org/
 Source0:	http://download.berlios.de/cairo-dock/%{name}-sources-%{tarballver}.tar.bz2
+Patch0:		cairo-dock-fix-insecure-tmpfile.patch
+Patch1:		cairo-dock-svn1105-configure-missing.patch
+Patch2:		cairo-dock-1.6.0.1-plug_ins-configure_ac-must-revert.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	automake
@@ -127,10 +130,18 @@
 %prep
 %setup -q -c
 find . -type d -name \.svn | sort -r | xargs %{__rm} -rf
-find . -type d -name \*CVS | sort -r | xargs %{__rm} -rf
+find . -type d -name \*CVS\* | sort -r | xargs %{__rm} -rf
+
+#pushd opt/cairo-dock/trunk/cairo-dock
+pushd .
+%patch0 -p1 -b .tmpuse
+%patch1 -p2 -b .miss
+%patch2 -p0 -b .wrong -R
 
 # A. main
-pushd opt/cairo-dock/trunk/cairo-dock
+cd cairo-dock
+# temporary fix
+%{__sed} -i.inline -e 's|^inline ||' src/cairo-dock-icons.*
 
 # permission
 for dir in */
@@ -164,11 +175,6 @@
 %{__chmod} 0644 Applets.stable
 find . -name \*.h -or -name \*.c | xargs %{__chmod} 0644
 
-# gnome-integration: needs F-9+
-%if 0%{?fedora} < 9
-%{__rm} -rf gnome-integration/
-%endif
-
 # mail: license conflict
 %{__rm} -rf mail/
 
@@ -188,30 +194,76 @@
 %{__rm} -rf weblets/
 %endif
 
+# temporary fix
+## AC_SUBST fix
+%{__sed} -i.acdebug \
+	-e 's|\(AC_SUBST([^ ,][^ ,]*\) |\1, |'\
+	configure.ac
+
+# First deal with subdirs in topdir configure.ac, then else
+%{__sed} -i.typo \
+	-e 's|^xfce_dir=.*$|xfce_dir=xfce-integration|' \
+	Makefile.am
+
+Subdirs_1=$(%{__sed} -n '\@SUBDIR@,\@^.*[^\\]$@s|\\$||p' Makefile.am | tail -n +2)
+%{__sed} -n -e '\@_dir=@p' Makefile.am > eval.sh
+
+. eval.sh
+Subdirs=$(eval echo ${Subdirs_1})
+
+# gnome-integration: needs F-9+
+%if 0%{?fedora} < 9
+Subdirs="${Subdirs_2} gnome-integration"
+%endif
+
+# Register Subdirs
+echo $Subdirs > Subdirs.list
+
 for dir in */
 	do
+	skip=0
+	for ddir in $Subdirs
+		do
+		if [ $dir == ${ddir}/ ] ; then skip=1 ; fi
+	done
+	for ddir in autom* po translations
+		do
+		if [ $dir == ${ddir}/ ] ; then skip=2 ; fi
+	done
+	if [ $skip == 2 ] ; then continue ; fi
 	cd $dir
 	%{__sed} -i.error \
 		-e 's|-O3|-O2|' \
 		-e 's|-Werror\\|\\|' \
+		-e 's|-Werror$||' \
 		src/Makefile.am 
+	if [ $skip == 1 ] ; then 
+		cd ..
+		continue
+	fi
 	autoreconf -i -f
 	cd ..
 done
 
+# Makefile.am in Subdirs are modified, autoreconf must be called here
+autoreconf -f -i
+
 popd # from opt/cairo-dock/trunk/cairo-dock
 
 %build
 status=0
 
 # A. main
-pushd opt/cairo-dock/trunk/cairo-dock
+#pushd opt/cairo-dock/trunk/cairo-dock
+pushd cairo-dock
 
 %configure
 %{__make} %{?_smp_mflags} -k || status=$((status+1))
 
 # For plug-ins & themes
-export CFLAGS="%optflags -I$(pwd)/src"
+unlink cairo-dock || :
+ln -sf src cairo-dock
+export CFLAGS="%optflags -I$(pwd)/src -I$(pwd)"
 export PKG_CONFIG_PATH=$(pwd):${PKG_CONFIG_PATH}
 
 # B themes
@@ -222,8 +274,27 @@
 
 # C plug-ins
 cd ../plug-ins
+
+# First deal with subdirs in topdir configure.ac, then else
+%configure \
+%if 0%{?fedora} < 9
+	--disable-gnome-integration \
+%endif
+
+# Parallel make fails some times, but it is gerenally fast
+# so do parallel make anyway first
+%{__make} %{?_smp_mflags} -k || :
+%{__make} -k || status=$((status+1))
+
+Subdirs=$(cat Subdirs.list)
 for dir in */
 	do
+	skip=0
+	for ddir in $Subdirs autom* po translations
+		do
+		if [ $dir == ${ddir}/ ] ; then skip=1 ; fi
+	done
+	if [ $skip == 1 ] ; then continue ; fi
 	cd $dir
 
 	%configure
@@ -243,7 +314,8 @@
 TOPDIR=$(pwd)
 
 # A. main
-pushd opt/cairo-dock/trunk/cairo-dock
+#pushd opt/cairo-dock/trunk/cairo-dock
+pushd cairo-dock
 export PKG_CONFIG_PATH=$(pwd):${PKG_CONFIG_PATH}
 
 %{__make} install \
@@ -256,6 +328,9 @@
 	--dir $RPM_BUILD_ROOT%{_datadir}/applications \
 	--vendor fedora \
 	data/%{name}.desktop
+%{__mkdir_p} $RPM_BUILD_ROOT%{_datadir}/pixmaps
+%{__install} -cpm 644 data/%{name}.svg \
+	$RPM_BUILD_ROOT%{_datadir}/pixmaps/
 
 # documents
 %{__rm} -rf $TOPDIR/documents/main
@@ -289,10 +364,31 @@
 %{__mkdir} -p $TOPDIR/{lang-plug-ins,lang-gecko}
 
 cd ../plug-ins
+# First deal with subdirs in topdir configure.ac, then else
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	INSTALL="%{__install} -p"
+
+Subdirs=$(cat Subdirs.list)
 for dir in */
 	do
+	skip=0
+	for ddir in $Subdirs
+		do
+		if [ $dir == ${ddir}/ ] ; then skip=1 ; fi
+	done
+	# don't skip here
+	# if [ $skip == 1 ] ; then continue ; fi
+
+	for ddir in autom* po translations
+		do
+		if [ $dir == ${ddir}/ ] ; then skip=2 ; fi
+	done
+	if [ $skip == 2 ] ; then continue ; fi
+
 	cd $dir
-	%{__make} install \
+	[ $skip != 1 ] && \
+		%{__make} install \
 		DESTDIR=$RPM_BUILD_ROOT \
 		INSTALL="%{__install} -p"
 
@@ -302,7 +398,7 @@
 		continue
 	fi
 
-	GETTEXT_MO_PACKAGES=`sed -n -e 's|^GETTEXT_PACKAGE = ||p' po/Makefile.in`
+	GETTEXT_MO_PACKAGES=`sed -n -e 's|^GETTEXT_PACKAGE *= *||p' po/Makefile.in`
 	case $GETTEXT_MO_PACKAGES in
 		*weblet* )
 			%find_lang $GETTEXT_MO_PACKAGES && \
@@ -368,12 +464,14 @@
 
 %{_bindir}/*%{name}*
 %{_datadir}/applications/fedora-%{name}.desktop
+%{_datadir}/pixmaps/%{name}.svg
 
 %dir	%{_datadir}/%{name}/
 %{_datadir}/%{name}/*.conf
 %{_datadir}/%{name}/*.png
 %{_datadir}/%{name}/*.svg
 %{_datadir}/%{name}/*view
+%{_datadir}/%{name}/emblems/
 %{_datadir}/%{name}/gauges/
 %dir	%{_datadir}/%{name}/themes/
 %{_datadir}/%{name}/themes/_default_/
@@ -408,6 +506,16 @@
 %{_libdir}/pkgconfig/*.pc
 
 %changelog
+* Thu Jun 19 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.6.0.1-1.date20080619
+- 1.6.0.1
+
+* Wed Jun 11 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.6.0-0.2.svn1089_trunk
+- Fix possibly unsafe tmpfile creation
+
+* Thu Jun  5 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.6.0-0.1.svn1080_trunk
+- Prepare for using unified configure script on plug-ins directory
+- Install desktop icon
+
 * Wed May 27 2008 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1.5.6-1.date20080528
 - 1.5.6
 




More information about the fedora-extras-commits mailing list