HEADS UP: New gconf key policy

John Merryweather Cooper johnmary at adelphia.net
Wed Jun 23 21:49:20 PDT 2004


On Wed, Jun 23, 2004 at 11:54:30PM -0400, Joe Marcus Clarke wrote:
> On Wed, 2004-06-23 at 23:00, John Merryweather Cooper wrote:
> > On Wed, Jun 23, 2004 at 09:20:25PM -0400, Joe Marcus Clarke wrote:
> > > Please take a look at the latest update to archivers/fileroller, and let
> > > me know what you think.  This is the new gconf policy I think we need to
> > > adopt if we're to survive the upcoming gconf changes in GNOME 2.8 (it's
> > > similar to the way we handle OMF files now).  This will also make gconf
> > > handling much more robust with respect to plists.
> > > 
> > > The one downside I see with this is that we will miss Makefile bugs that
> > > prevent proper schema installation.  One way around that is to add a
> > > pkg-install script to each port that installs gconf schemas, and do
> > > gconf registration there.  This may be more work than it's worth,
> > > though.
> > > 
> > > What are people's thoughts on this?  Thanks.
> > > 
> > > Joe
> > > 
> > > -- 
> > > PGP Key : http://www.marcuscom.com/pgp.asc
> > 
> > Well, there seems to be an increasing amount of post-install tasks in
> > GNOME ports, so I think the idiom of using a pkg-install script for
> > each port is a good one.
> 
> So far, there are only two (counting gconf) post-[de]install handlers
> that are being added the plists.  I've written an omf.pl script (in my
> CVS repo) to handle automatically adding OMF handlers.  I plan on doing
> the same for gconf.  Given that, a pkg-install script might add more
> repo bloat that we need at this time.
> 
> >   Turning to a design issue, do you see the
> > changes to gconf handling as making debugging of gconf-related
> > issues easier or harder.  I'm having a devil of a time wrestling an
> > update of comms/gfax into working order because of gconf issues.
> 
> I don't think it will make gconf issues any harder to troubleshoot. 
> Like I said, it will "mask" the problem we see occasionally when a
> developer messes up one of the Makefiles, and schemas are not properly
> installed.
> 
> What gconf problems are you having?
> 
> Joe
> 
> > 
> > jmc
> > 
> -- 
> PGP Key : http://www.marcuscom.com/pgp.asc

See attached patch to make comms/gfax into 0.6.0 (the gtk#) version.

Everything compiles and installs fine, but attempting to start gfax
gives errors about not being able to find two key values.  I'd be
more specific, but I'm rebuilding GNOME right now and so my X is
unavailable to me.

jmc


-------------- next part --------------
# This is a patch for gfax to update it to gfax-0.6.0
# 
# To apply this patch:
# STEP 1: Chdir to the source directory.
# STEP 2: Run the 'applypatch' program with this patch file as input.
#
# If you do not have 'applypatch', it is part of the 'makepatch' package
# that you can fetch from the Comprehensive Perl Archive Network:
# http://www.perl.com/CPAN/authors/Johan_Vromans/makepatch-x.y.tar.gz
# In the above URL, 'x' should be 2 or higher.
#
# To apply this patch without the use of 'applypatch':
# STEP 1: Chdir to the source directory.
# If you have a decent Bourne-type shell:
# STEP 2: Run the shell with this file as input.
# If you don't have such a shell, you may need to manually create
# the files/directories as shown below.
# STEP 3: Run the 'patch' program with this file as input.
#
# These are the commands needed to create/delete files/directories:
#
mkdir 'files'
chmod 0755 'files'
touch 'files/patch-Makefile'
chmod 0644 'files/patch-Makefile'
touch 'files/patch-gfax'
chmod 0644 'files/patch-gfax'
touch 'files/patch-gfaxlpr'
chmod 0644 'files/patch-gfaxlpr'
touch 'files/patch-scripts::printer-setup.sh'
chmod 0644 'files/patch-scripts::printer-setup.sh'
touch 'pkg-install'
chmod 0644 'pkg-install'
#
# This command terminates the shell and need not be executed manually.
exit
#
#### End of Preamble ####

#### Patch data follows ####
diff -u 'gfax/Makefile' 'gfax-0.6.0/Makefile'
Index: ./Makefile
--- ./Makefile	Thu Feb  5 13:44:15 2004
+++ ./Makefile	Sat Apr 17 03:31:20 2004
@@ -2,63 +2,43 @@
 # Date created:			20 January 2002
 # Whom:				John Merryweather Cooper <jmcoopr at webmail.bmi.net>
 #
-# $FreeBSD: ports/comms/gfax/Makefile,v 1.6 2004/02/04 05:18:56 marcus Exp $
+# $FreeBSD$
 #
 
 PORTNAME=	gfax
-PORTVERSION=	0.5
-PORTREVISION=	1
+PORTVERSION=	0.6.0
 CATEGORIES=	comms print
 MASTER_SITES=	http://gfax.cowlug.org/
 
 MAINTAINER=	coop9211 at uidaho.edu
-COMMENT=	A GNOME pop-up fax manager
+COMMENT=	A GNOME 2.x pop-up fax manager
 
-RUN_DEPENDS=	${PYTHON_SITELIBDIR}/gtk-1.2/_gnomemodule.so:${PORTSDIR}/x11-toolkits/py-gnome \
-		${LOCALBASE}/bin/sendfax:${PORTSDIR}/comms/hylafax
+BUILD_DEPENDS=	${LOCALBASE}/bin/gapi.pl:${PORTSDIR}/x11-toolkits/gtk-sharp
+
+RUN_DEPENDS=	${BUILD_DEPENDS} \
+		${LOCALBASE}/bin/sendfax:${PORTSDIR}/comms/hylafax \
+		${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash2
 
-USE_PYTHON=	yes
 USE_X_PREFIX=	yes
 USE_REINPLACE=	yes
-NO_BUILD=	yes
+PKGDEINSTALL=	${PKGINSTALL}
 
-BASEFILES=	controller.py en.h fax-g3.profile fax.py file_handler.py \
-		gfax.desktop gfax.glade gfax.png gfax.py gfax.spec \
-		hfaxlib.py install.sh mgettydruid.glade prefs.py \
-		prefs_ui.py setup.glade ui.py uninstall.sh
-
-PIXFILES=	gfax.png gnome-logo-icon-transparent.png
-DOCFILES=	AUTHORS COPYING Changelog HACKING INSTALL TODO
-
-post-extract:
-	@${REINPLACE_CMD} -e 's|/usr/lib/gfax|${PREFIX}/lib/gfax|g' \
-		${WRKSRC}/gfax.py
-	@${REINPLACE_CMD} -e 's|/usr/share/gfax|${PREFIX}/share/gfax|g ; \
-		s|/usr/lib/gfax|${PREFIX}/lib/gfax|g' \
-		${WRKSRC}/prefs.py
-
-do-install:
-	@${MKDIR} ${PREFIX}/lib/gfax
-	@${MKDIR} ${PREFIX}/lib/gfax/pixmaps
-	@${MKDIR} ${PREFIX}/share/gnome/apps/Applications
-	@${MKDIR} ${PREFIX}/share/gnome/ximian
-	@${MKDIR} ${PREFIX}/share/gnome/ximian/Programs
-	@${MKDIR} ${PREFIX}/share/gnome/ximian/Programs/Utilities
-.for base in ${BASEFILES}
-	@${INSTALL_DATA} ${WRKSRC}/${base} ${PREFIX}/lib/gfax
-.endfor
-	@${INSTALL_SCRIPT} ${WRKSRC}/gfax.py ${PREFIX}/bin/gfax
-	@${INSTALL_DATA} ${WRKSRC}/gfax.desktop ${PREFIX}/share/gnome/apps/Applications
-	@${INSTALL_DATA} ${WRKSRC}/gfax.desktop ${PREFIX}/share/gnome/ximian/Programs/Utilities
-	@${INSTALL_DATA} ${WRKSRC}/gfax.png ${PREFIX}/share/gnome/pixmaps
-.for pixmaps in ${PIXFILES}
-	@${INSTALL_DATA} ${WRKSRC}/pixmaps/${pixmaps} ${PREFIX}/lib/gfax/pixmaps
-.endfor
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${DOCSDIR}
-.for doc in ${DOCFILES}
-	@${INSTALL_DATA} ${WRKSRC}/${doc} ${DOCSDIR}
-.endfor
-.endif
+post-patch:
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+		-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+		${WRKSRC}/gfaxlpr
+
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+		-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+		${WRKSRC}/gfax
+
+	${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
+		-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+		-e 's|%%X11BASE%%|${X11BASE}|g' \
+		${WRKSRC}/scripts/printer-setup.sh
+
+post-install:
+	${SETENV} PKG_PREFIX=${PREFIX} ${SH} \
+		${PKGINSTALL} ${PKGNAME} POST-INSTALL
 
 .include <bsd.port.mk>
diff -u 'gfax/distinfo' 'gfax-0.6.0/distinfo'
Index: ./distinfo
--- ./distinfo	Wed Mar 17 20:11:49 2004
+++ ./distinfo	Fri Apr 16 11:14:12 2004
@@ -1,2 +1,2 @@
-MD5 (gfax-0.5.tar.gz) = 58c04251cca3f8ff8ad154fff7d4ebb6
-SIZE (gfax-0.5.tar.gz) = 60083
+MD5 (gfax-0.6.0.tar.gz) = 0dcf5bea3075ab761eab6e0fe112f7eb
+SIZE (gfax-0.6.0.tar.gz) = 145991
diff -u /dev/null 'gfax-0.6.0/files/patch-Makefile'
Index: ./files/patch-Makefile
--- ./files/patch-Makefile	Wed Dec 31 16:00:00 1969
+++ ./files/patch-Makefile	Sat Apr 17 03:48:36 2004
@@ -0,0 +1,83 @@
+--- Makefile.orig	Thu Mar 18 10:34:04 2004
++++ Makefile	Sat Apr 17 03:48:16 2004
+@@ -1,6 +1,12 @@
+-MCS = mcs /define:DEBUG
+-#MCS = mcs /define:DEBUGHYLAFAX
++MCS = $(LOCALBASE)/bin/mcs /define:DEBUG
++#MCS = $(LOCALBASE)/bin/mcs /define:DEBUGHYLAFAX
+ INSTALL = /usr/bin/install
++GCONFTOOL = $(X11BASE)/bin/gconftool-2
++SCHEMAGEN = $(LOCALBASE)/bin/gconfsharp-schemagen
++ENV = /usr/bin/env
++MKDIR = /bin/mkdir
++CHMOD = /bin/chmod
++RM = /bin/rm
+ 
+ SCHEMA = ./data/gfax.schema
+ RESOURCES = /resource:./glade/gfax.glade,gfax.glade \
+@@ -28,37 +34,40 @@
+ 	$(MCS) $(RESOURCES) -o $@ $(SOURCES) $(REFERENCES)
+ 
+ schema:
+-	env GCONF_CONFIG_SOURCE="" gconftool-2 --makefile-install-rule $(SCHEMA)
+-	gconfsharp-schemagen gfax $(SCHEMA) > ./src/Settings.cs
++	$(ENV) GCONF_CONFIG_SOURCE="" $(GCONFTOOL) --makefile-install-rule $(SCHEMA)
++	$(SCHEMAGEN) gfax $(SCHEMA) > ./src/Settings.cs
+ 
+ tar:
+ 	cd ..; tar cvzf mg.$(DATE).tar.gz mono-gfax
+ 	
+ install: mono-gfax.exe
+-	mkdir -p $(prefix)/bin
+-	mkdir -p /usr/share/gfax
+-	mkdir -p /var/spool/gfax
+-	chmod 777 /var/spool/gfax
+-	$(INSTALL) -m 755 mono-gfax.exe /usr/bin/mono-gfax.exe
+-	$(INSTALL) -m 755 gfax /usr/bin/gfax
+-	$(INSTALL) -m 755 gfaxlpr /usr/bin/gfaxlpr
+-	$(INSTALL) -m 755 pixmaps/gfax.png /usr/share/pixmaps/
+-	$(INSTALL) -m 755 data/gfax.desktop /usr/share/applications/
+-	$(INSTALL) -m 755 data/fax-g3.profile /usr/share/gfax/
+-	$(INSTALL) -m 755 data/GFAX.xml /usr/share/gfax/
+-	$(INSTALL) -m 755 data/GNOME-GFAX-PS.xml /usr/share/gfax/
+-	$(INSTALL) -m 755 scripts/printer-setup.sh /usr/share/gfax/
+-	env GCONF_CONFIG_SOURCE="" gconftool-2 --makefile-install-rule $(SCHEMA)
+-	./scripts/printer-setup.sh --install
++	$(MKDIR) -p $(PREFIX)/bin
++	$(MKDIR) -p $(PREFIX)/share/gfax
++	$(MKDIR) -p $(PREFIX)/share/gnome/pixmaps
++	$(MKDIR) -p $(PREFIX)/share/gnome/apps/Applications
++	$(MKDIR) -p $(PREFIX)/share/gnome/libgnomeprint
++	$(MKDIR) -p /var/spool/gfax
++	$(CHMOD) 777 /var/spool/gfax
++	$(INSTALL) -m 755 mono-gfax.exe $(PREFIX)/bin/mono-gfax.exe
++	$(INSTALL) -m 755 gfax $(PREFIX)/bin/gfax
++	$(INSTALL) -m 755 gfaxlpr $(PREFIX)/bin/gfaxlpr
++	$(INSTALL) -m 755 pixmaps/gfax.png $(PREFIX)/share/gnome/pixmaps/
++	$(INSTALL) -m 755 data/gfax.desktop $(PREFIX)/share/gnome/apps/Applications/
++	$(INSTALL) -m 755 data/fax-g3.profile $(PREFIX)/share/gfax/
++	$(INSTALL) -m 755 data/GFAX.xml $(PREFIX)/share/gfax/
++	$(INSTALL) -m 755 data/GNOME-GFAX-PS.xml $(PREFIX)/share/gfax/
++	$(INSTALL) -m 755 scripts/printer-setup.sh $(PREFIX)/share/gfax/
++	$(ENV) GCONF_CONFIG_SOURCE="" $(GCONFTOOL) --makefile-install-rule $(SCHEMA)
++#	./scripts/printer-setup.sh --install
+ 
+ uninstall:
+-	rm -f /usr/bin/mono-gfax.exe
+-	rm -f /usr/bin/gfax
+-	rm -f /usr/bin/gfaxlpr
+-	rm -f /usr/share/pixmaps/gfax.png
+-	rm -f /usr/share/applications/gfax.desktop
+-	/usr/share/gfax/printer-setup.sh --remove
+-	rm -rf /usr/share/gfax
++	$(RM) -f $(PREFIX)/bin/mono-gfax.exe
++	$(RM) -f $(PREFIX)/bin/gfax
++	$(RM) -f $(PREFIX)/bin/gfaxlpr
++	$(RM) -f $(PREFIX)/share/gnome/pixmaps/gfax.png
++	$(RM) -f $(PREFIX)/share/gnome/apps/Applications/gfax.desktop
++#	$(PREFIX)/share/gfax/printer-setup.sh --remove
++	$(RM) -rf $(PREFIX)/share/gfax
+ 	
+ clean:
+-	-rm *.exe
++	-$(RM) *.exe
diff -u /dev/null 'gfax-0.6.0/files/patch-gfax'
Index: ./files/patch-gfax
--- ./files/patch-gfax	Wed Dec 31 16:00:00 1969
+++ ./files/patch-gfax	Sat Apr 17 03:29:37 2004
@@ -0,0 +1,17 @@
+--- gfax.old	Sat Apr 17 03:27:20 2004
++++ gfax	Sat Apr 17 03:29:17 2004
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!%%LOCALBASE%%/bin/bash
+ #  Copyright (c) 2003 George A. Farris 
+ #
+ #  NO WARRANTY:
+@@ -14,7 +14,7 @@
+ RNAME=G$$
+ # don't change this spool directory, gfax uses it.
+ SPOOL_DIR=/var/spool/gfax
+-MYPATH=/usr/bin
++MYPATH=%%PREFIX%%/bin
+ STD=no
+ 
+ if [ -s /dev/stdin ]; then
diff -u /dev/null 'gfax-0.6.0/files/patch-gfaxlpr'
Index: ./files/patch-gfaxlpr
--- ./files/patch-gfaxlpr	Wed Dec 31 16:00:00 1969
+++ ./files/patch-gfaxlpr	Fri Apr 16 20:46:52 2004
@@ -0,0 +1,17 @@
+--- gfaxlpr.old	Fri Apr 16 20:44:49 2004
++++ gfaxlpr	Fri Apr 16 20:46:26 2004
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!%%LOCALBASE%%/bin/bash
+ #  Copyright (c) 2003 George A. Farris 
+ #
+ #  NO WARRANTY:
+@@ -14,7 +14,7 @@
+ RNAME=G$$
+ # don't change this spool directory, gfax uses it.
+ SPOOL_DIR=/var/spool/gfax
+-MYPATH=/usr/bin
++MYPATH=%%PREFIX%%/bin
+ 
+ cat > $SPOOL_DIR/D.$RNAME
+ mono $MYPATH/mono-gfax.exe -f $SPOOL_DIR/D.$RNAME
diff -u /dev/null 'gfax-0.6.0/files/patch-scripts::printer-setup.sh'
Index: ./files/patch-scripts::printer-setup.sh
--- ./files/patch-scripts::printer-setup.sh	Wed Dec 31 16:00:00 1969
+++ ./files/patch-scripts::printer-setup.sh	Sat Apr 17 02:37:44 2004
@@ -0,0 +1,45 @@
+--- scripts/printer-setup.sh.old	Fri Apr 16 21:53:53 2004
++++ scripts/printer-setup.sh	Fri Apr 16 21:57:46 2004
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!%%LOCALBASE%%/bin/bash
+ 
+ if [ -z $1 ]; then
+ 	exit
+@@ -7,15 +7,15 @@
+ # Install all the printer profiles
+ if [ $1 == "--install" ]; then
+ 	# Install GNOME-1.x printer files.
+-	if [ -d /usr/share/gnome-print ]; then
+-		cp -f /usr/share/gfax/fax-g3.profile /usr/share/gnome-print/profiles
++	if [ -d %%X11BASE%%/share/gnome/gnome-print ]; then
++		cp -f %%PREFIX%%/share/gfax/fax-g3.profile %%X11BASE%%/share/gnome/gnome-print/profiles
+ 	fi
+ 
+ 	# Install GNOME-2.x printer files.
+-	for i in /usr/share/libgnomeprint/*
++	for i in %%X11BASE%%/share/gnome/libgnomeprint/*
+ 	do
+-		cp -f /usr/share/gfax/GFAX.xml $i/printers
+-		cp -f /usr/share/gfax/GNOME-GFAX-PS.xml $i/models
++		cp -f %%PREFIX%%/share/gfax/GFAX.xml $i/printers
++		cp -f %%PREFIX%%/share/gfax/GNOME-GFAX-PS.xml $i/models
+ 	done
+ fi
+ 
+@@ -23,12 +23,12 @@
+ # Remove all the printer profiles
+ if [ $1 == "--remove" ]; then
+ 	# Remove GNOME-1.x printer files.
+-	if [ -d /usr/share/gnome-print ]; then
+-		rm -f /usr/share/gnome-print/profiles/fax-g3.profile
++	if [ -d %%X11BASE%%/share/gnome/gnome-print ]; then
++		rm -f %%X11BASE%%/share/gnome/gnome-print/profiles/fax-g3.profile
+ 	fi
+ 
+ 	# Remove GNOME-2.x printer files.
+-	for i in /usr/share/libgnomeprint/*
++	for i in %%X11BASE%%/share/gnome/libgnomeprint/*
+ 	do
+ 		rm -f $i/printers/GFAX.xml
+ 		rm -f $i/models/GNOME-GFAX-PS.xml
diff -u /dev/null 'gfax-0.6.0/pkg-install'
Index: ./pkg-install
--- ./pkg-install	Wed Dec 31 16:00:00 1969
+++ ./pkg-install	Sat Apr 17 01:49:24 2004
@@ -0,0 +1,26 @@
+#!/bin/sh
+# $FreeBSD$
+
+[ $# != 2 ] && exit 1
+PKGNAME=$1
+ACTION=$2
+
+case "$ACTION" in
+
+POST-INSTALL)
+		${PKG_PREFIX}/share/gfax/printer-setup.sh --install
+	;;
+
+DEINSTALL)
+		${PKG_PREFIX}/share/gfax/printer-setup.sh --remove
+	;;
+
+PRE-INSTALL|POST-DEINSTALL)
+	;;
+
+*)
+	exit 1
+	;;
+esac
+
+exit
diff -u 'gfax/pkg-plist' 'gfax-0.6.0/pkg-plist'
Index: ./pkg-plist
--- ./pkg-plist	Wed Oct 22 02:35:43 2003
+++ ./pkg-plist	Sat Apr 17 03:49:33 2004
@@ -1,38 +1,10 @@
 bin/gfax
-lib/gfax/controller.py
-lib/gfax/en.h
-lib/gfax/fax-g3.profile
-lib/gfax/fax.py
-lib/gfax/file_handler.py
-lib/gfax/gfax.desktop
-lib/gfax/gfax.glade
-lib/gfax/gfax.png
-lib/gfax/gfax.py
-lib/gfax/gfax.spec
-lib/gfax/hfaxlib.py
-lib/gfax/install.sh
-lib/gfax/mgettydruid.glade
-lib/gfax/pixmaps/gfax.png
-lib/gfax/pixmaps/gnome-logo-icon-transparent.png
-lib/gfax/prefs.py
-lib/gfax/prefs_ui.py
-lib/gfax/setup.glade
-lib/gfax/ui.py
-lib/gfax/uninstall.sh
-%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
-%%PORTDOCS%%%%DOCSDIR%%/COPYING
-%%PORTDOCS%%%%DOCSDIR%%/Changelog
-%%PORTDOCS%%%%DOCSDIR%%/HACKING
-%%PORTDOCS%%%%DOCSDIR%%/INSTALL
-%%PORTDOCS%%%%DOCSDIR%%/TODO
+bin/gfaxlpr
+bin/mono-gfax.exe
 share/gnome/apps/Applications/gfax.desktop
-share/gnome/ximian/Programs/Utilities/gfax.desktop
- at dirrm share/gnome/ximian/Programs/Utilities
- at dirrm share/gnome/ximian/Programs
- at dirrm share/gnome/ximian
- at dirrm share/gnome/apps/Applications
- at dirrm share/gnome/apps
- at dirrm share/gnome
-%%PORTDOCS%%%%DOCSDIR%%
- at dirrm lib/gfax/pixmaps
- at dirrm lib/gfax
+share/gfax/GFAX.xml
+share/gfax/GNOME-GFAX-PS.xml
+share/gfax/fax-g3.profile
+share/gfax/printer-setup.sh
+share/gnome/pixmaps/gfax.png
+ at dirrm share/gfax
#### End of Patch data ####

#### ApplyPatch data follows ####
# Data version        : 1.0
# Date generated      : Sat Apr 17 04:05:41 2004
# Generated by        : makepatch 2.00
# Recurse directories : Yes
# p 'Makefile' 2106 1082197880 0100644
# p 'distinfo' 88 1082139252 0100644
# c 'files/patch-Makefile' 0 1082198916 0100644
# c 'files/patch-gfax' 0 1082197777 0100644
# c 'files/patch-gfaxlpr' 0 1082173612 0100644
# c 'files/patch-scripts::printer-setup.sh' 0 1082194664 0100644
# c 'pkg-install' 0 1082191764 0100644
# p 'pkg-plist' 981 1082198973 0100644
# C 'files' 0 1082197777 040755
#### End of ApplyPatch data ####

#### End of Patch kit [created: Sat Apr 17 04:05:41 2004] ####
#### Checksum: 426 13864 19552 ####


More information about the freebsd-gnome mailing list