Hello community,
here is the log from the commit of package loki_setup
checked in at Thu Jun 8 15:12:42 CEST 2006.
--------
--- loki_setup/loki_setup.changes 2006-05-17 18:53:48.000000000 +0200
+++ loki_setup/loki_setup.changes 2006-06-01 20:33:11.000000000 +0200
@@ -1,0 +2,9 @@
+Thu Jun 1 20:31:22 CEST 2006 - sbrabec@suse.cz
+
+- Updated to latest CVS version:
+ * GTK2 support
+ * Minor fixes.
+- Fixed GTK2 support and switched from GTK1 to GTK2.
+- Enabled GPM.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ loki_setup.spec ++++++
--- /var/tmp/diff_new_pack.M9eaAm/_old 2006-06-08 15:12:20.000000000 +0200
+++ /var/tmp/diff_new_pack.M9eaAm/_new 2006-06-08 15:12:20.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package loki_setup (Version 1.6.1_20051201)
+# spec file for package loki_setup (Version 1.6.5_20060530)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,13 +11,13 @@
# norootforbuild
Name: loki_setup
-BuildRequires: gdk-pixbuf-devel libglade-devel python update-desktop-files xdelta
+BuildRequires: gpm gtk1-compat-devel gtk2-devel libglade2-devel pkgconfig python python-xml update-desktop-files xdelta
%define do_brandelf 1
License: GPL
URL: http://icculus.org/loki_setup/
Group: Development/Tools/Other
-Version: 1.6.1_20051201
-Release: 13
+Version: 1.6.5_20060530
+Release: 1
Summary: Installer Program Mainly for Games
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: loki_setup-current.tar.bz2
@@ -68,7 +68,7 @@
%package -n loki_uninstall
Version: 1.0.3_20051201
-Release: 13
+Release: 14
Summary: Uninstall program for games
Group: Amusements/Games/Other
@@ -85,7 +85,7 @@
%package -n loki_update
Version: 1.0.13_20040208
-Release: 48
+Release: 49
Summary: Updater program for games
Group: Amusements/Games/Other
@@ -166,6 +166,11 @@
qpush
popd
find -type d -name CVS -print0 |xargs -0 rm -rv
+# GTK2 issues:
+sed -i 's/\.gtk /.gtk2 /;s/\([^2]\).glade/\1.gtk2.glade/' loki-setup loki-uninstall
+libglade-convert loki_update/loki_update.glade | sed 's:"pixbuf">:&pixmaps/:' >loki_update/loki_update.gtk2.glade
+sed -i 's/".glade"/".gtk2.glade"/' loki_update/gtk_ui.c
+sed -i 's/ loki_update.glade/& loki_update.gtk2.glade/' loki_update/Makefile
%build
####### loki_setupdb #######
@@ -199,8 +204,13 @@
--enable-zip \
--enable-bzip2=dlopen \
--enable-uz2 \
+ --enable-gpm \
--disable-libz-static \
--disable-libncurses-static \
+ --disable-libglade-static \
+ --disable-libxml-static \
+ --enable-gtk2 \
+ --with-libxml2 \
$build_dynamic
#
echo make \
@@ -221,7 +231,7 @@
ln -s $dir image/setup.data/bin/Linux/$i
done
dir=image/setup.data/bin/Linux/$dir
- for i in setup.gtk setup uninstall; do
+ for i in setup.gtk2 setup uninstall; do
%if %{do_brandelf}
loki_setupdb/brandelf -t Linux $i
%endif
@@ -233,7 +243,7 @@
fi
done
find image/setup.data/locale -name '*.mo' | xargs rm -fv
-make LOCALES=de gettext
+make gettext
#
####### loki_update #######
pushd loki_update
@@ -294,6 +304,7 @@
install -m 755 gtk_sh_ui.so %{buildroot}%{_libdir}/loki_update
install -m 755 detect/[[:lower:]]* %{buildroot}%{_datadir}/loki_update/detect
install -m 644 loki_update.glade %{buildroot}%{_datadir}/loki_update
+install -m 644 loki_update.gtk2.glade %{buildroot}%{_datadir}/loki_update
install -m 644 pixmaps/*.xpm %{buildroot}%{_datadir}/loki_update/pixmaps
cp -a locale %{buildroot}%{_datadir}
cd ..
@@ -316,11 +327,12 @@
#
install -m 755 loki_setupdb/brandelf %{buildroot}%{_bindir}/brandelf
install -m 755 setup %{buildroot}%{_bindir}/loki-setup.curses
-install -m 755 setup.gtk %{buildroot}%{_bindir}/loki-setup.gtk
-install -m 755 loki_uninstall %{buildroot}%{_bindir}/loki-uninstall.gtk
+install -m 755 setup.gtk2 %{buildroot}%{_bindir}/loki-setup.gtk2
+install -m 755 loki_uninstall %{buildroot}%{_bindir}/loki-uninstall.gtk2
install -m 755 uninstall %{buildroot}%{_bindir}/loki-uninstall.curses
install -d -m 755 %{buildroot}%{_datadir}/loki_uninstall
install -m 644 uninstall.glade %{buildroot}%{_datadir}/loki_uninstall
+install -m 644 uninstall.gtk2.glade %{buildroot}%{_datadir}/loki_uninstall
install -m 755 loki-setup %{buildroot}%{_bindir}/loki-setup
install -m 755 loki-uninstall %{buildroot}%{_bindir}/loki-uninstall
install -m 755 %{SOURCE3} %{buildroot}%{_bindir}/stripmakeself
@@ -357,7 +369,7 @@
%{_bindir}/brandelf
%{_bindir}/loki-setup
%{_bindir}/loki-setup.curses
-%{_bindir}/loki-setup.gtk
+%{_bindir}/loki-setup.gtk2
%{_bindir}/stripmakeself
%{_datadir}/locale/*/*/setup.mo
%{_datadir}/loki-setup
@@ -387,6 +399,12 @@
%{_datadir}/loki_patch
%changelog -n loki_setup
+* Thu Jun 01 2006 - sbrabec@suse.cz
+- Updated to latest CVS version:
+ * GTK2 support
+ * Minor fixes.
+- Fixed GTK2 support and switched from GTK1 to GTK2.
+- Enabled GPM.
* Wed May 17 2006 - schwab@suse.de
- Don't strip binaries.
* Wed Jan 25 2006 - mls@suse.de
++++++ loki_patch-current.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/loki_patch/COMPILE new/loki_patch/COMPILE
--- old/loki_patch/COMPILE 2005-08-24 01:32:18.000000000 +0200
+++ new/loki_patch/COMPILE 2005-11-18 21:26:05.000000000 +0100
@@ -1,7 +1,10 @@
loki_patch uses a local (and patched) version of
-xdelta 1.1.3 version included here. Here are the
-steps to compile loki_patch:
+xdelta 1.1.3, it is included here. Additionally,
+you need libxml (latest is 1.8.17, not libxml2),
+and glib-1.2 (latest is 1.2.10).
+
+Here are the steps to compile loki_patch:
1. Extract the xdelta tarball:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/loki_patch/Makefile.in new/loki_patch/Makefile.in
--- old/loki_patch/Makefile.in 2005-11-08 10:40:29.000000000 +0100
+++ new/loki_patch/Makefile.in 2005-11-18 21:26:05.000000000 +0100
@@ -6,17 +6,19 @@
VERSION := @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_RELEASE@
PACKAGE = loki_patch-$(VERSION)
-XDELTA_DIR = xdelta-1.1.3
+XDELTA_DIR = ./xdelta-1.1.3
SETUPDB = ../loki_setupdb
CFLAGS = -g -Wall
CFLAGS += -I$(SETUPDB)
CFLAGS += $(shell glib-config --cflags) $(shell xml-config --cflags)
CFLAGS += -DVERSION=\"$(VERSION)\"
LFLAGS += -L$(SETUPDB)/$(ARCH) -lsetupdb
+LFLAGS += -L$(XDELTA_DIR)/.libs -lxdelta
+LFLAGS += -L$(XDELTA_DIR)/libedsio/.libs -ledsio
LFLAGS += $(shell glib-config --libs) $(shell xml-config --libs) -lz -static
SHARED_OBJS = load_patch.o size_patch.o print_patch.o loki_xdelta.o \
- libxdelta.a libedsio.a mkdirhier.o log_output.o
+ mkdirhier.o log_output.o
MAKE_PATCH_OBJS = make_patch.o tree_patch.o save_patch.o
@@ -26,12 +28,6 @@
all: make_patch loki_patch
-# this is butt-ugly, but it works..
-libxdelta.a:
- cp $(XDELTA_DIR)/.libs/libxdelta.a .
-libedsio.a:
- cp $(XDELTA_DIR)/libedsio/.libs/libedsio.a .
-
make_patch: $(MAKE_PATCH_OBJS) $(SHARED_OBJS)
$(CC) -o $@ $^ $(LFLAGS)
++++++ loki_patch-fixes.diff ++++++
--- /var/tmp/diff_new_pack.M9eaAm/_old 2006-06-08 15:12:22.000000000 +0200
+++ /var/tmp/diff_new_pack.M9eaAm/_new 2006-06-08 15:12:22.000000000 +0200
@@ -2,30 +2,32 @@
===================================================================
--- loki_patch.orig/Makefile.in
+++ loki_patch/Makefile.in
-@@ -5,15 +5,14 @@ ARCH := @ARCH@
+@@ -5,17 +5,14 @@
DISTDIR = ..
VERSION := @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_RELEASE@
PACKAGE = loki_patch-$(VERSION)
+CC=@CC@
- XDELTA_DIR = xdelta-1.1.3
+ XDELTA_DIR = ./xdelta-1.1.3
-SETUPDB = ../loki_setupdb
-CFLAGS = -g -Wall
-CFLAGS += -I$(SETUPDB)
-CFLAGS += $(shell glib-config --cflags) $(shell xml-config --cflags)
-CFLAGS += -DVERSION=\"$(VERSION)\"
-LFLAGS += -L$(SETUPDB)/$(ARCH) -lsetupdb
+-LFLAGS += -L$(XDELTA_DIR)/.libs -lxdelta
+-LFLAGS += -L$(XDELTA_DIR)/libedsio/.libs -ledsio
-LFLAGS += $(shell glib-config --libs) $(shell xml-config --libs) -lz -static
+SETUPDB = @SETUPDB@
+CFLAGS = @CFLAGS@
-+CPPFLAGS += @GTK_CFLAGS@ @XDELTA_CFLAGS@ @XML_CFLAGS@ @SETUPDB_CFLAGS@
++CPPFLAGS += $(shell gtk-config --cflags) @XDELTA_CFLAGS@ @XML_CFLAGS@ @SETUPDB_CFLAGS@
+CPPFLAGS += -DVERSION=\"$(VERSION)\"
-+LIBS = @LIBS@ @GTK_LIBS@ @XDELTA_LIBS@ @XML_LIBS@ @SETUPDB_LIBS@
++LIBS = @LIBS@ $(shell gtk-config --libs) @XDELTA_LIBS@ @XML_LIBS@ @SETUPDB_LIBS@ -L$(XDELTA_DIR)/.libs -lxdelta -L$(XDELTA_DIR)/libedsio/.libs -ledsio
SHARED_OBJS = load_patch.o size_patch.o print_patch.o loki_xdelta.o \
- libxdelta.a libedsio.a mkdirhier.o log_output.o
-@@ -33,10 +32,10 @@ libedsio.a:
- cp $(XDELTA_DIR)/libedsio/.libs/libedsio.a .
+ mkdirhier.o log_output.o
+@@ -29,10 +26,10 @@
+ all: make_patch loki_patch
make_patch: $(MAKE_PATCH_OBJS) $(SHARED_OBJS)
- $(CC) -o $@ $^ $(LFLAGS)
++++++ loki_patch-xdelta.diff ++++++
--- /var/tmp/diff_new_pack.M9eaAm/_old 2006-06-08 15:12:22.000000000 +0200
+++ /var/tmp/diff_new_pack.M9eaAm/_new 2006-06-08 15:12:22.000000000 +0200
@@ -1,36 +1,3 @@
-Index: loki_patch/Makefile.in
-===================================================================
---- loki_patch.orig/Makefile.in
-+++ loki_patch/Makefile.in
-@@ -10,12 +10,12 @@ CC=@CC@
- XDELTA_DIR = xdelta-1.1.3
- SETUPDB = @SETUPDB@
- CFLAGS = @CFLAGS@
--CPPFLAGS += @GTK_CFLAGS@ @XDELTA_CFLAGS@ @XML_CFLAGS@ @SETUPDB_CFLAGS@
-+CPPFLAGS += @GLIB_CFLAGS@ @XDELTA_CFLAGS@ @XML_CFLAGS@ @SETUPDB_CFLAGS@
- CPPFLAGS += -DVERSION=\"$(VERSION)\"
--LIBS = @LIBS@ @GTK_LIBS@ @XDELTA_LIBS@ @XML_LIBS@ @SETUPDB_LIBS@
-+LIBS = @LIBS@ @GLIB_LIBS@ @XDELTA_LIBS@ @XML_LIBS@ @SETUPDB_LIBS@
-
- SHARED_OBJS = load_patch.o size_patch.o print_patch.o loki_xdelta.o \
-- libxdelta.a libedsio.a mkdirhier.o log_output.o
-+ mkdirhier.o log_output.o
-
- MAKE_PATCH_OBJS = make_patch.o tree_patch.o save_patch.o
-
-@@ -25,12 +25,6 @@ ALL_OBJS = $(SHARED_OBJS) $(MAKE_PATCH_O
-
- all: make_patch loki_patch
-
--# this is butt-ugly, but it works..
--libxdelta.a:
-- cp $(XDELTA_DIR)/.libs/libxdelta.a .
--libedsio.a:
-- cp $(XDELTA_DIR)/libedsio/.libs/libedsio.a .
--
- make_patch: $(MAKE_PATCH_OBJS) $(SHARED_OBJS)
- $(CC) -o $@ $^ $(LIBS)
-
Index: loki_patch/loki_xdelta.c
===================================================================
--- loki_patch.orig/loki_xdelta.c
++++++ loki_setup-current.tar.bz2 ++++++
++++ 11195 lines of diff (skipped)
++++++ loki_setup-gpmstatic.diff ++++++
--- /var/tmp/diff_new_pack.M9eaAm/_old 2006-06-08 15:12:24.000000000 +0200
+++ /var/tmp/diff_new_pack.M9eaAm/_new 2006-06-08 15:12:24.000000000 +0200
@@ -1,17 +1,18 @@
-Index: loki_setup/configure.in
-===================================================================
---- loki_setup.orig/configure.in
-+++ loki_setup/configure.in
-@@ -283,8 +283,6 @@ AC_CHECK_HEADERS(libintl.h)
+--- loki_setup/configure.in 2006-05-30 13:31:41.000000000 +0200
++++ loki_setup/configure.in 2006-05-30 13:31:55.000000000 +0200
+@@ -286,11 +286,6 @@
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_HEADERS(locale.h)
-AC_CHECK_LIB(gpm, Gpm_Open, USE_GPM=yes)
-
+-dnl If NCURSES_MOUSE_VERSION is defined, we don't use GPM, so let's not link it in
+-AC_TRY_COMPILE([#include ], [int n = NCURSES_MOUSE_VERSION;], unset USE_GPM)
+-
dnl Check for gtk12 libraries in case those are available (FreeBSD)
AC_CHECK_LIB(glib12, g_log, GTK12="12")
-@@ -352,6 +350,17 @@ AC_ARG_WITH(ncurses,
+@@ -355,6 +350,17 @@
USE_NCURSES=yes
)
@@ -29,7 +30,7 @@
AC_ARG_ENABLE(libglade-static,
[ --enable-libglade-static whether to statically link libglade (default=yes)],,
enable_libglade_static=yes)
-@@ -573,9 +582,9 @@ else
+@@ -621,9 +627,9 @@
fi
fi
@@ -39,11 +40,11 @@
+if test "x$USE_GPM" = "xyes"; then
+ AC_CHECK_LIB(gpm, Gpm_Open,[:],AC_MSG_ERROR([libgpm not found]))
+ AC_CHECK_HEADERS(gpm.h,,AC_MSG_ERROR([gpm.h not found]))
+ else
+ CONSOLE_LIBS="$CONSOLE_LIBS $LIBDL"
fi
-
- X11_LIBS="\$(BDYNAMIC) $X_PRE_LIBS -L$x_libraries -lXi -lXext -lX11 -lm"
-@@ -658,6 +667,3 @@ AC_SUBST(BDYNAMIC)
- AC_SUBST(LD)
+@@ -710,6 +716,3 @@
+ AC_SUBST(GTK_SUBDIR)
AC_OUTPUT(Makefile plugins/Makefile dialog/Makefile)
-
++++++ loki_setup-gtkstatic.diff ++++++
--- /var/tmp/diff_new_pack.M9eaAm/_old 2006-06-08 15:12:24.000000000 +0200
+++ /var/tmp/diff_new_pack.M9eaAm/_new 2006-06-08 15:12:24.000000000 +0200
@@ -1,8 +1,6 @@
-Index: loki_setup/configure.in
-===================================================================
---- loki_setup.orig/configure.in
-+++ loki_setup/configure.in
-@@ -188,12 +188,13 @@ case "$target" in
+--- loki_setup/configure.in 2006-05-30 13:36:53.000000000 +0200
++++ loki_setup/configure.in 2006-05-30 13:37:09.000000000 +0200
+@@ -190,12 +190,13 @@
ARCH=`uname -p 2> /dev/null || uname -m` ;;
esac
@@ -19,7 +17,7 @@
esac
CFLAGS="$CFLAGS $REENTRANT"
-@@ -243,8 +244,8 @@ fi
+@@ -246,8 +247,8 @@
CFLAGS="$CFLAGS -I$SETUPDB_INCDIR"
@@ -30,7 +28,7 @@
#!!!TODO - Add carbon libs as necessary
CARBON_LIBS=
-@@ -361,6 +362,13 @@ elif test "x$enable_gpm" = "xyes"; then
+@@ -361,6 +362,13 @@
USE_GPM=yes
fi
@@ -44,12 +42,12 @@
AC_ARG_ENABLE(libglade-static,
[ --enable-libglade-static whether to statically link libglade (default=yes)],,
enable_libglade_static=yes)
-@@ -437,7 +445,7 @@ if test ! -z "$HAVEGTK"; then
+@@ -413,7 +421,7 @@
+ GTK_PREFIX=`$HAVEGTK --prefix`
GLIB_PREFIX=`$HAVEGLIB --prefix`
- CFLAGS="$CFLAGS $GTK_CFLAGS"
- GTK_LIBS="$GTK_LIBS -L$GTK_PREFIX/lib$LIBSUFFIX -L$GLIB_PREFIX/lib$LIBSUFFIX -lgtk$GTK12 -lgdk$GTK12 $RDYNAMIC -lgmodule$GTK12 -lglib$GTK12"
+ GTK_LIBS="$GTK_STATIC -L$GTK_PREFIX/lib$LIBSUFFIX -L$GLIB_PREFIX/lib$LIBSUFFIX -lgtk$GTK12 -lgdk$GTK12 $RDYNAMIC -lgmodule$GTK12 -lglib$GTK12 $BDYNAMIC"
- GUI_LIBS="$GUI_LIBS $GTK_LIBS"
else
AC_MSG_ERROR([*** gtk-config not found. You need a working GTK+ 1.2 installation.])
+ fi
++++++ loki_setup-overwrite.diff ++++++
--- /var/tmp/diff_new_pack.M9eaAm/_old 2006-06-08 15:12:24.000000000 +0200
+++ /var/tmp/diff_new_pack.M9eaAm/_new 2006-06-08 15:12:24.000000000 +0200
@@ -2,8 +2,8 @@
===================================================================
--- loki_setup.orig/install.c
+++ loki_setup/install.c
-@@ -332,21 +332,29 @@ const char *GetProductCDKey(install_info
- return (char *)xmlGetProp(info->config->root, BAD_CAST "cdkey");
+@@ -345,21 +345,29 @@
+ return (char *)xmlGetProp(XML_ROOT(info->config), BAD_CAST "cdkey");
}
-int GetProductPromptOverwrite(install_info *info)
@@ -20,8 +20,8 @@
+ str = getenv("SETUP_OVERWRITEFILES");
}
else {
-- str = (char *)xmlGetProp(info->config->root, BAD_CAST "nopromptoverwrite");
-+ str = (char *)xmlGetProp(info->config->root, BAD_CAST "overwritefiles");
+- str = (char *)xmlGetProp(XML_ROOT(info->config), BAD_CAST "nopromptoverwrite");
++ str = (char *)xmlGetProp(XML_ROOT(info->config), BAD_CAST "overwritefiles");
needfree = 1;
}
- if ( str && (!strcasecmp(str, "yes") || !strcasecmp(str, "true"))) {
++++++ loki_setup_noksycoca.diff ++++++
--- /var/tmp/diff_new_pack.M9eaAm/_old 2006-06-08 15:12:25.000000000 +0200
+++ /var/tmp/diff_new_pack.M9eaAm/_new 2006-06-08 15:12:25.000000000 +0200
@@ -1,21 +1,17 @@
-%patch
-Index: loki_setup/./install.c
-===================================================================
---- loki_setup.orig/./install.c 2003-12-01 23:35:24.000000000 +0000
-+++ loki_setup/./install.c 2004-02-01 15:55:39.000000000 +0000
-@@ -2351,12 +2351,14 @@
- run_command(info, "update-menus", NULL, 1);
+--- loki_setup/install.c 2006-05-18 21:49:46.000000000 +0200
++++ loki_setup/install.c 2006-05-30 13:29:14.000000000 +0200
+@@ -2928,12 +2928,14 @@
+ run_command(info, "update-menus", NULL, NULL, 1);
install_updatemenus_script = 1;
break;
+#if 0 /* not needed */
case DESKTOP_KDE:
/* Run kbuildsycoca */
if ( loki_valid_program("kbuildsycoca") )
- run_command(info, "kbuildsycoca", NULL, 0);
+ run_command(info, "kbuildsycoca", NULL, NULL, 0);
install_updatemenus_script = 1;
break;
+#endif
case DESKTOP_CDE:
/* Run dtaction */
- if ( loki_valid_program("dtaction") )
-
+ if ( loki_valid_program("dtaction") ) {
++++++ loki_setupdb-current.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/loki_setupdb/CHANGES new/loki_setupdb/CHANGES
--- old/loki_setupdb/CHANGES 2004-02-25 05:10:32.000000000 +0100
+++ new/loki_setupdb/CHANGES 2006-05-18 17:43:04.000000000 +0200
@@ -1,3 +1,15 @@
+current:
+Ryan C. Gordon (???) - Thu May 18 08:35:16 PDT 2006
+ * Generated uninstall script will try falling back to x86 binaries on
+ amd64 if native binaries don't exist.
+Stephane Peter (Codehost) - Mon Mar 6 16:49:25 PST 2006
+ * Support for storing optional SELinux context for files
+ * Working libxml2 support
+Stephane Peter (Codehost) - Tue Feb 7 16:18:42 PST 2006
+ * Support for libxml2 selection at compile time.
+Ryan C. Gordon (icculus.org) - Fri Jan 27 16:35:25 EST 2006
+ * Intel Mac support.
+
1.6.2:
Ryan C. Gordon (icculus.org) - Sat Feb 14 21:15:26 EST 2004
* AMD64 patches.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/loki_setupdb/arch.h new/loki_setupdb/arch.h
--- old/loki_setupdb/arch.h 2005-11-08 10:32:50.000000000 +0100
+++ new/loki_setupdb/arch.h 2006-01-27 22:50:13.000000000 +0100
@@ -31,7 +31,11 @@
# elif defined(_AIX)
# include
# elif defined(darwin)
-# include
+# ifdef __POWERPC__
+# include
+# else
+# include
+# endif
# else
# include
# endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/loki_setupdb/configure.in new/loki_setupdb/configure.in
--- old/loki_setupdb/configure.in 2005-11-08 10:32:50.000000000 +0100
+++ new/loki_setupdb/configure.in 2006-03-25 00:24:05.000000000 +0100
@@ -5,7 +5,7 @@
SETUPDB_VERSION_MAJOR=1
SETUPDB_VERSION_MINOR=6
-SETUPDB_VERSION_RELEASE=1
+SETUPDB_VERSION_RELEASE=5
PACKAGE_NAME="Loki Setup DataBase Library"
PACKAGE_TARNAME="setupdb"
@@ -22,7 +22,7 @@
LIBS="-L/opt/codehost/lib"
elif test -d /sw/lib; then
case "$target" in
- powerpc-apple-darwin*)
+ *-apple-darwin*)
LIBS="-L/sw/lib" ;;
esac
else
@@ -81,12 +81,12 @@
*solaris*)
EXTRA_LIBS="$EXTRA_LIBS -lsocket -lnsl -lresolv -ldl"
ARCH=`uname -p` ;;
-powerpc-apple-darwin*)
+*-apple-darwin*)
CFLAGS="-Ddarwin"
BSTATIC=""
BDYNAMIC=""
REENTRANT=""
- ARCH=ppc ;;
+ ARCH=`uname -p` ;;
*aix*)
BSTATIC=""
BDYNAMIC=""
@@ -138,14 +138,23 @@
dnl Look for the XML libraries
-AC_PATH_PROG(HAVEXML, xml-config, $PATH)
+XMLVER=""
+AC_ARG_WITH(libxml2,
+[ --with-libxml2 use libxml2 [default=libxml1]],
+ , with_libxml2=no)
+if test x$with_libxml2 != xno; then
+ XMLVER="2"
+ EXTRA_LIBS="$EXTRA_LIBS -lm"
+fi
+
+AC_PATH_PROG(HAVEXML, xml${XMLVER}-config, $PATH)
if test ! -z "$HAVEXML"; then
XML_CFLAGS=`$HAVEXML --cflags`
XML_LIBS=`$HAVEXML --libs`
XML_PREFIX=`$HAVEXML --prefix`
CFLAGS="$CFLAGS $XML_CFLAGS"
- LIBS="$LIBS $XML_PREFIX/lib$LIBSUFFIX/libxml.a $BSTATIC $ZLIB $BDYNAMIC $EXTRA_LIBS"
+ LIBS="$LIBS $XML_PREFIX/lib$LIBSUFFIX/libxml${XMLVER}.a $BSTATIC $ZLIB $BDYNAMIC $EXTRA_LIBS"
else
AC_MSG_ERROR([*** xml-config not found. You need a working libxml installation.])
fi
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/loki_setupdb/setup-xml.h new/loki_setupdb/setup-xml.h
--- old/loki_setupdb/setup-xml.h 1970-01-01 01:00:00.000000000 +0100
+++ new/loki_setupdb/setup-xml.h 2006-03-10 19:39:41.000000000 +0100
@@ -0,0 +1,41 @@
+/*
+ * Placeholder for libxml/libxml2 libraries, use this header instead.
+ *
+ * $Id: setup-xml.h,v 1.4 2006/03/10 18:39:41 megastep Exp $
+ */
+
+#ifndef __SETUP_XML_H__
+#define __SETUP_XML_H__
+
+#include
+#include
+#include
+
+#if LIBXML_VERSION < 20000
+/* libxml1 */
+
+#define XML_ROOT(doc) ((doc)->root)
+#define XML_CHILDREN(node) ((node)->childs)
+#define XML_ADD_TEXT(parent, text)
+#define XML_SAVE_FILE(path, doc) xmlSaveFile(path, doc)
+
+/* Useful if using Glade */
+#define GLADE_XML_UNREF(glade) gtk_object_unref(GTK_OBJECT(glade))
+#define GLADE_XML_NEW(a, b) glade_xml_new(a, b)
+
+int xmlUnsetProp(xmlNodePtr node, const xmlChar *name);
+
+#else
+/* libxml2 */
+
+#define XML_ROOT(doc) xmlDocGetRootElement(doc)
+#define XML_CHILDREN(node) ((node)->children)
+#define XML_ADD_TEXT(parent, text) xmlAddChild((parent),xmlNewText(text))
+#define XML_SAVE_FILE(path, doc) xmlSaveFormatFile(path, doc, 1)
+
+#define GLADE_XML_UNREF(glade) g_object_unref(G_OBJECT(glade))
+#define GLADE_XML_NEW(a, b) glade_xml_new(a, b, NULL)
+
+#endif
+
+#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/loki_setupdb/setupdb.c new/loki_setupdb/setupdb.c
--- old/loki_setupdb/setupdb.c 2005-11-08 10:32:50.000000000 +0100
+++ new/loki_setupdb/setupdb.c 2006-05-18 17:43:04.000000000 +0200
@@ -1,5 +1,5 @@
/* Implementation of the Loki Product DB API */
-/* $Id: setupdb.c,v 1.74 2005/08/23 00:19:35 megastep Exp $ */
+/* $Id: setupdb.c,v 1.87 2006/05/18 15:43:04 icculus Exp $ */
#include "config.h"
#include
@@ -17,9 +17,6 @@
#include
#endif
#include
-#include
-#include
-#include
#ifdef HAVE_SYS_MKDEV_H
#include
@@ -28,6 +25,7 @@
#include
#endif
+#include "setup-xml.h"
#include "setupdb.h"
#include "arch.h"
#include "md5.h"
@@ -88,10 +86,29 @@
unsigned char md5sum[16];
script_type_t scr_type;
} data;
+#ifdef __linux
+ char *se_context; /* SELinux context, optional */
+#endif
product_file_t *next;
};
+#if LIBXML_VERSION < 20000
+/* Implementation of this function that is only in libxml2 */
+int xmlUnsetProp(xmlNodePtr node, const xmlChar *name)
+{
+ xmlAttrPtr att = node->properties;
+ while ( att ) {
+ if ( !strcmp((char *)att->name, (char *)name ) ) {
+ xmlRemoveProp(att);
+ return 1;
+ }
+ att = att->next;
+ }
+ return 0;
+}
+#endif
+
/* Enumerate all products, returns name or NULL if end of list */
static glob_t globbed;
@@ -129,14 +146,14 @@
return file;
}
-/* Remove the install path component from the filename to obtain a relative path */
-const char *loki_remove_root(const product_t *prod, const char *path)
+/* Remove the root directory from the filename to obtain a relative path */
+const char *loki_remove_dirroot(const char *dir, const char *path)
{
- if ( prod ) {
- if ( !strcmp(path, prod->info.root) )
+ if ( dir ) {
+ if ( !strcmp(path, dir) )
return "";
- if ( strstr(path, prod->info.root) == path) {
- path += strlen(prod->info.root) + 1;
+ if ( strstr(path, dir) == path) {
+ path += strlen(dir) + 1;
/* Remove any extraneous slashes */
while ( *path && *path == '/' )
path ++;
@@ -149,6 +166,19 @@
return path;
}
+/* Remove the install path component from the filename to obtain a relative path */
+const char *loki_remove_root(const product_t *prod, const char *path)
+{
+ if ( prod ) {
+ return loki_remove_dirroot(prod->info.root, path);
+ }
+ /* Remove ./ if it is following */
+ if ( path[0]=='.' && path[1]=='/') {
+ path += 2;
+ }
+ return path;
+}
+
struct subst {
char ch;
const char *str;
@@ -195,7 +225,7 @@
static const char *get_xml_string(product_t *product, xmlNodePtr node)
{
- xmlChar *text = xmlNodeListGetString(product->doc, node->childs, 1);
+ xmlChar *text = xmlNodeListGetString(product->doc, XML_CHILDREN(node), 1);
return (const char *)text;
}
@@ -348,6 +378,8 @@
xmlNodePtr node;
product_t *prod;
+ LIBXML_TEST_VERSION;
+
if ( strchr(name, '/') != NULL ) { /* Absolute path to a manifest file */
doc = xmlParseFile(name);
} else {
@@ -379,27 +411,27 @@
prod->doc = doc;
prod->changed = 0;
- str = (char *)xmlGetProp(doc->root, BAD_CAST "name");
+ str = (char *)xmlGetProp(XML_ROOT(doc), BAD_CAST "name");
strncpy(prod->info.name, str, sizeof(prod->info.name));
xmlFree(str);
- str = (char *)xmlGetProp(doc->root, BAD_CAST "desc");
+ str = (char *)xmlGetProp(XML_ROOT(doc), BAD_CAST "desc");
if ( str ) {
strncpy(prod->info.description, str, sizeof(prod->info.description));
xmlFree(str);
} else {
*prod->info.description = '\0';
}
- str = (char *)xmlGetProp(doc->root, BAD_CAST "root");
+ str = (char *)xmlGetProp(XML_ROOT(doc), BAD_CAST "root");
strncpy(prod->info.root, str, sizeof(prod->info.root));
xmlFree(str);
- str = (char *)xmlGetProp(doc->root, BAD_CAST "prefix");
+ str = (char *)xmlGetProp(XML_ROOT(doc), BAD_CAST "prefix");
if ( str ) {
strncpy(prod->info.prefix, str, sizeof(prod->info.prefix));
xmlFree(str);
} else {
strcpy(prod->info.prefix, ".");
}
- str = (char *)xmlGetProp(doc->root, BAD_CAST "update_url");
+ str = (char *)xmlGetProp(XML_ROOT(doc), BAD_CAST "update_url");
strncpy(prod->info.url, str, sizeof(prod->info.url));
xmlFree(str);
if ( *name == '/' ) { /* Absolute path to a manifest.ini file */
@@ -411,7 +443,7 @@
}
/* Check for the xmlversion attribute for backwards compatibility */
- str = (char *)xmlGetProp(doc->root, BAD_CAST "xmlversion");
+ str = (char *)xmlGetProp(XML_ROOT(doc), BAD_CAST "xmlversion");
sscanf(str, "%d.%d", &major, &minor);
if ( (major > SETUPDB_VERSION_MAJOR) ||
((major == SETUPDB_VERSION_MAJOR) && (minor > SETUPDB_VERSION_MINOR)) ) {
@@ -425,7 +457,7 @@
/* Parse the XML tags and build a tree. Water every day so that it grows steadily. */
- for ( node = doc->root->childs; node; node = node->next ) {
+ for ( node = XML_CHILDREN(XML_ROOT(doc)); node; node = node->next ) {
if ( !strcmp((char *)node->name, "component") ) {
xmlNodePtr optnode;
@@ -448,7 +480,7 @@
comp->next = prod->components;
prod->components = comp;
- for ( optnode = node->childs; optnode; optnode = optnode->next ) {
+ for ( optnode = XML_CHILDREN(node); optnode; optnode = optnode->next ) {
if ( !strcmp((char *)optnode->name, "option") ) {
xmlNodePtr filenode;
product_option_t *opt = (product_option_t *)malloc(sizeof(product_option_t));
@@ -456,20 +488,24 @@
opt->node = optnode;
opt->component = comp;
opt->name = (char *)xmlGetProp(optnode, BAD_CAST "name");
- opt->tag = (char *)xmlGetProp(optnode, BAD_CAST "tag");
+ opt->tag = (char *)xmlGetProp(optnode, BAD_CAST "tag");
opt->files = NULL;
opt->next = comp->options;
comp->options = opt;
- for( filenode = optnode->childs; filenode; filenode = filenode->next ) {
+ for( filenode = XML_CHILDREN(optnode); filenode; filenode = filenode->next ) {
file_type_t t;
- product_file_t *file = (product_file_t *) malloc(sizeof(product_file_t));
+ product_file_t *file;
const char *cstr;
+ if ( !XML_CHILDREN(filenode) )
+ continue; /* Skip nodes with no children - likely text nodes */
+
+ file = (product_file_t *) malloc(sizeof(product_file_t));
memset(file->data.md5sum, 0, 16);
if ( !strcmp((char *)filenode->name, "file") ) {
char *md5;
- md5 = (char *)xmlGetProp(filenode, BAD_CAST "md5");
+ md5 = (char *)xmlGetProp(filenode, BAD_CAST "md5");
t = LOKI_FILE_REGULAR;
if ( md5 ) {
memcpy(file->data.md5sum, get_md5_bin(md5), 16);
@@ -530,6 +566,14 @@
file->mode = 0644;
}
xmlFree(str);
+#ifdef __linux
+ str = (char *)xmlGetProp(filenode, BAD_CAST "secontext");
+ if ( str ) {
+ file->se_context = strdup(str);
+ } else {
+ file->se_context = NULL;
+ }
+#endif
cstr = get_xml_string(prod, filenode);
file->path = strdup(cstr); /* The expansion is done in loki_getname_file() */
@@ -647,23 +691,23 @@
prod->components = prod->default_comp = NULL;
prod->envvars = NULL;
- doc->root = xmlNewDocNode(doc, NULL, BAD_CAST "product", NULL);
+ xmlDocSetRootElement(doc, xmlNewDocNode(doc, NULL, BAD_CAST "product", NULL));
strncpy(prod->info.name, name, sizeof(prod->info.name));
- xmlSetProp(doc->root, BAD_CAST "name", BAD_CAST name);
+ xmlSetProp(XML_ROOT(doc), BAD_CAST "name", BAD_CAST name);
if ( desc ) {
strncpy(prod->info.description, desc, sizeof(prod->info.description));
- xmlSetProp(doc->root, BAD_CAST "desc", BAD_CAST desc);
+ xmlSetProp(XML_ROOT(doc), BAD_CAST "desc", BAD_CAST desc);
} else {
*prod->info.description = '\0';
}
snprintf(homefile, sizeof(homefile), "%d.%d", SETUPDB_VERSION_MAJOR, SETUPDB_VERSION_MINOR);
- xmlSetProp(doc->root, BAD_CAST "xmlversion", BAD_CAST homefile);
+ xmlSetProp(XML_ROOT(doc), BAD_CAST "xmlversion", BAD_CAST homefile);
strncpy(prod->info.root, myroot, sizeof(prod->info.root));
- xmlSetProp(doc->root, BAD_CAST "root", BAD_CAST myroot);
+ xmlSetProp(XML_ROOT(doc), BAD_CAST "root", BAD_CAST myroot);
strncpy(prod->info.url, url, sizeof(prod->info.url));
strcpy(prod->info.prefix, ".");
- xmlSetProp(doc->root, BAD_CAST "update_url", BAD_CAST url);
+ xmlSetProp(XML_ROOT(doc), BAD_CAST "update_url", BAD_CAST url);
snprintf(prod->info.registry_path, sizeof(prod->info.registry_path), "%s/.manifest/%s.xml",
myroot, name);
@@ -675,7 +719,7 @@
void loki_setroot_product(product_t *product, const char *root)
{
strncpy(product->info.root, root, sizeof(product->info.root));
- xmlSetProp(product->doc->root, BAD_CAST "root", BAD_CAST root);
+ xmlSetProp(XML_ROOT(product->doc), BAD_CAST "root", BAD_CAST root);
product->changed = 1;
}
@@ -683,7 +727,7 @@
void loki_setprefix_product(product_t *product, const char *prefix)
{
strncpy(product->info.prefix, prefix, sizeof(product->info.prefix));
- xmlSetProp(product->doc->root, BAD_CAST "prefix", BAD_CAST prefix);
+ xmlSetProp(XML_ROOT(product->doc), BAD_CAST "prefix", BAD_CAST prefix);
product->changed = 1;
}
@@ -692,7 +736,7 @@
void loki_setupdateurl_product(product_t *product, const char *url)
{
strncpy(product->info.url, url, sizeof(product->info.url));
- xmlSetProp(product->doc->root, BAD_CAST "update_url", BAD_CAST url);
+ xmlSetProp(XML_ROOT(product->doc), BAD_CAST "update_url", BAD_CAST url);
product->changed = 1;
}
@@ -710,9 +754,9 @@
#if 1
char tmp[PATH_MAX];
/* This isn't harmful as long as it's not a world writeable directory */
- snprintf(tmp, sizeof(tmp), "%s.%05d", product->info.registry_path, getpid());
+ snprintf(tmp, sizeof(tmp), "%s.%05d", product->info.registry_path, (int)getpid());
/* Write XML file to disk if it has changed */
- xmlSaveFile(tmp, product->doc);
+ XML_SAVE_FILE(tmp, product->doc);
if(rename(tmp, product->info.registry_path) != 0)
{
@@ -722,7 +766,7 @@
ret = -1;
}
#else
- xmlSaveFile(product->info.registry_path, product->doc);
+ XML_SAVE_FILE(product->info.registry_path, product->doc);
#endif
}
@@ -743,6 +787,9 @@
while ( file ) {
nextfile = file->next;
free(file->path);
+#ifdef __linux
+ free(file->se_context);
+#endif
free(file);
file = nextfile;
}
@@ -900,7 +947,7 @@
xmlNodePtr node;
/* Look for a <message> tag */
- for ( node = comp->node->childs; node; node = node->next ) {
+ for ( node = XML_CHILDREN(comp->node); node; node = node->next ) {
if ( node->name && !strcmp((char *)node->name, "message") ) {
return get_xml_string(comp->product, node);
}
@@ -914,7 +961,7 @@
comp->product->changed = 1;
/* Look for a <message> tag */
- for ( node = comp->node->childs; node; node = node->next ) {
+ for ( node = XML_CHILDREN(comp->node); node; node = node->next ) {
if ( node->name && !strcmp((char *)node->name, "message") ) {
/* Remove the existing node */
xmlUnlinkNode(node);
@@ -960,7 +1007,7 @@
product_component_t *loki_create_component(product_t *product, const char *name, const char *version)
{
- xmlNodePtr node = xmlNewChild(product->doc->root, NULL, BAD_CAST "component", NULL);
+ xmlNodePtr node = xmlNewChild(XML_ROOT(product->doc), NULL, BAD_CAST "component", NULL);
if ( node ) {
product_component_t *ret = (product_component_t *)malloc(sizeof(product_component_t));
ret->node = node;
@@ -1262,6 +1309,24 @@
file->option->component->product->changed = 1;
}
+const char *loki_get_secontext_file(product_file_t *file)
+{
+#ifdef __linux
+ return file->se_context;
+#else
+ return NULL;
+#endif
+}
+
+void loki_set_secontext_file(product_file_t *file, const char *context)
+{
+#ifdef __linux
+ file->se_context = strdup(context);
+ xmlSetProp(file->node, BAD_CAST "secontext", BAD_CAST context);
+ file->option->component->product->changed = 1;
+#endif
+}
+
/* Get / set the 'patched' attribute of a flag, i.e. it should not be removed unless
the whole application is removed */
int loki_getpatched_file(product_file_t *file)
@@ -1366,6 +1431,9 @@
}
file = (product_file_t *)malloc(sizeof(product_file_t));
file->path = strdup(path);
+#ifdef __linux
+ file->se_context = NULL;
+#endif
file->desktop = NULL;
memset(file->data.md5sum, 0, 16);
if ( S_ISREG(st.st_mode) ) {
@@ -1666,6 +1734,9 @@
}
}
free(file->path);
+#ifdef __linux
+ free(file->se_context);
+#endif
free(file);
}
@@ -1794,6 +1865,9 @@
scr->path = strdup(name);
scr->type = LOKI_FILE_SCRIPT;
scr->data.scr_type = type;
+#ifdef __linux
+ scr->se_context = NULL;
+#endif
scr->desktop = NULL;
return scr;
}
@@ -1949,7 +2023,7 @@
return 0;
var->name = strdup(name);
var->value = strdup(env);
- var->node = xmlNewChild(product->doc->root, NULL, BAD_CAST "environment", NULL);
+ var->node = xmlNewChild(XML_ROOT(product->doc), NULL, BAD_CAST "environment", NULL);
var->next = *vars;
*vars = var;
@@ -2365,17 +2439,36 @@
" return 0\n"
"}\n\n"
- "if which " LOKI_PREFIX "-uninstall 2> /dev/null > /dev/null || type -p "
- LOKI_PREFIX "-uninstall 2> /dev/null > /dev/null; then\n"
- " UNINSTALL=" LOKI_PREFIX "-uninstall\n"
- "else\n"
- " UNINSTALL=\"$HOME/" LOKI_DIRNAME "/installed/bin/`DetectOS`/`DetectARCH`/uninstall\"\n"
- " if test ! -x \"$UNINSTALL\" ; then\n"
- " echo Could not find a usable uninstall program. Aborting.\n"
- " exit 1\n"
- " fi\n"
- "fi\n"
- "\"$UNINSTALL\" -L %s \"%s\" \"$1\"",
+ "FindBinary()\n"
+ "{\n"
+ " arch=$1\n"
+ " if which loki-uninstall 2> /dev/null > /dev/null || type -p loki-uninstall 2> /dev/null > /dev/null; then\n"
+ " if loki-uninstall -v > /dev/null 2> /dev/null; then\n"
+ " echo `exec 2>&-; which loki-uninstall || type loki-uninstall`\n"
+ " else\n"
+ " echo \"$HOME/.loki/installed/bin/`DetectOS`/$arch/uninstall\"\n"
+ " fi\n"
+ " else\n"
+ " echo \"$HOME/.loki/installed/bin/`DetectOS`/$arch/uninstall\"\n"
+ " fi\n"
+ "}\n\n"
+
+ "arch=`DetectARCH`\n"
+ "UNINSTALL=`FindBinary $arch`\n"
+ "\n"
+ "# Special case: if amd64 and binary is missing, try to run x86 build...\n"
+ "if test ! -x \"$UNINSTALL\" ; then\n"
+ " if test \"$arch\" = amd64 ; then\n"
+ " UNINSTALL=`FindBinary x86`\n"
+ " fi\n"
+ "fi\n\n"
+
+ "if test ! -x \"$UNINSTALL\" ; then\n"
+ " echo Could not find a usable uninstall program. Aborting.\n"
+ " exit 1\n"
+ "fi\n\n"
+
+ "exec \"$UNINSTALL\" -L %s \"%s\" \"$1\"\n\n",
SETUPDB_VERSION_MAJOR, SETUPDB_VERSION_MINOR,
pinfo->name,
pinfo->registry_path);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/loki_setupdb/setupdb.h new/loki_setupdb/setupdb.h
--- old/loki_setupdb/setupdb.h 2005-11-08 10:32:50.000000000 +0100
+++ new/loki_setupdb/setupdb.h 2006-03-10 01:29:56.000000000 +0100
@@ -165,6 +165,10 @@
/* Set the UNIX mode for the file */
void loki_setmode_file(product_file_t *file, unsigned int mode);
+/* SELinux contexts */
+const char *loki_get_secontext_file(product_file_t *file);
+void loki_set_secontext_file(product_file_t *file, const char *context);
+
/* Get / set the 'patched' attribute of a file, i.e. it should not be removed unless
the whole application is removed */
int loki_getpatched_file(product_file_t *file);
@@ -191,6 +195,8 @@
product_file_t *loki_findpath(const char *path, product_t *product);
+/* Remove the root directory from the filename to obtain a relative path */
+const char *loki_remove_dirroot(const char *dir, const char *path);
/* Remove the install path component from the filename to obtain a relative path */
const char *loki_remove_root(const product_t *prod, const char *path);
++++++ loki_update-current.tar.bz2 ++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit-unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit-help@opensuse.org