diff -Nur httpfs.old/args.c httpfs/args.c --- httpfs.old/args.c 2002-04-15 21:25:41.000000000 +0200 +++ httpfs/args.c 2003-01-20 01:09:39.000000000 +0100 @@ -25,9 +25,10 @@ #include #include "httpfs.h" +#include "version.h" /* Argument Parsing --Variables */ -const char *argp_program_version="Http Translator Version 0.1"; +const char *argp_program_version="NAME Version VERSION"; static const char args_doc[] = "URL"; const char *argp_program_bug_address="address@hidden or address@hidden"; diff -Nur httpfs.old/debian/changelog httpfs/debian/changelog --- httpfs.old/debian/changelog 1970-01-01 01:00:00.000000000 +0100 +++ httpfs/debian/changelog 2003-01-20 01:10:25.000000000 +0100 @@ -0,0 +1,8 @@ +httpfs (0.1+20021124) unstable; urgency=low + + * Misc build fixes. + * Building debian package. + * Adds User-Agent field to HTTP requests. + + -- Robert Millan Sat, 23 Nov 2002 20:06:10 +0100 + diff -Nur httpfs.old/debian/control httpfs/debian/control --- httpfs.old/debian/control 1970-01-01 01:00:00.000000000 +0100 +++ httpfs/debian/control 2003-01-20 01:09:39.000000000 +0100 @@ -0,0 +1,12 @@ +Source: httpfs +Section: net +Priority: optional +Maintainer: James A. Morrison +Build-Depends: debhelper (>> 3.0.0), hurd-dev, libxml2-dev +Standards-Version: 3.5.2 + +Package: httpfs +Architecture: hurd-i386 +Depends: ${shlibs:Depends} +Description: httpfs translator for GNU/Hurd + This is an Httpfs translator for the GNU system. diff -Nur httpfs.old/debian/copyright httpfs/debian/copyright --- httpfs.old/debian/copyright 1970-01-01 01:00:00.000000000 +0100 +++ httpfs/debian/copyright 2003-01-20 01:09:39.000000000 +0100 @@ -0,0 +1,14 @@ +This package was debianized by Robert Millan on +Sat, 23 Nov 2002 20:06:10 +0100. + +It was downloaded from http://savannah.nongnu.org/projects/hurdextras + +Upstream Authors: Arun V. + Gopika U. K. + +Copyright: + +You are free to distribute this software under the terms of +the GNU General Public License. +On Debian systems, the complete text of the GNU General +Public License can be found in /usr/share/common-licenses/GPL file. diff -Nur httpfs.old/debian/docs httpfs/debian/docs --- httpfs.old/debian/docs 1970-01-01 01:00:00.000000000 +0100 +++ httpfs/debian/docs 2003-01-20 01:09:39.000000000 +0100 @@ -0,0 +1,2 @@ +NEWS +README diff -Nur httpfs.old/debian/rules httpfs/debian/rules --- httpfs.old/debian/rules 1970-01-01 01:00:00.000000000 +0100 +++ httpfs/debian/rules 2003-01-20 01:09:39.000000000 +0100 @@ -0,0 +1,105 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=3 + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +config.status: configure + dh_testdir + # Add here commands to configure the package. + ./configure \ + --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/ \ + --mandir=\$${prefix}/share/man \ + --infodir=\$${prefix}/share/info + +build: build-stamp + +build-stamp: config.status + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + # Add here commands to clean up after the build process. + -$(MAKE) distclean + -test -r /usr/share/misc/config.sub && \ + cp -f /usr/share/misc/config.sub config.sub + -test -r /usr/share/misc/config.guess && \ + cp -f /usr/share/misc/config.guess config.guess + + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/httpfs. + $(MAKE) install prefix=$(CURDIR)/debian/httpfs + mv $(CURDIR)/debian/httpfs/bin $(CURDIR)/debian/httpfs/hurd + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installdebconf + dh_installdocs +# dh_installexamples +# dh_installmenu +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installman +# dh_installinfo +# dh_undocumented + dh_installchangelogs ChangeLog + dh_link + dh_strip + dh_compress + dh_fixperms +# dh_makeshlibs + dh_installdeb +# dh_perl + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install diff -Nur httpfs.old/http.c httpfs/http.c --- httpfs.old/http.c 2002-04-15 21:25:42.000000000 +0200 +++ httpfs/http.c 2003-01-20 01:09:39.000000000 +0100 @@ -30,6 +30,7 @@ #include #include "httpfs.h" +#include "version.h" #include #include @@ -110,7 +111,7 @@ } /* Send a HEAD request find header length */ - sprintf(buffer,"HEAD %s HTTP/1.0 \n\n",node->conn_req); + sprintf(buffer,"HEAD %s HTTP/1.0 \nUser-Agent: Mozilla/5.0 (U; %s %s; rv:%s) %s\n\n",node->conn_req, OSNAME, ARCH, VERSION, NAME); towrite = strlen (buffer); written = TEMP_FAILURE_RETRY (write (*fd, buffer, towrite)); if ( written == -1 || written < towrite ) diff -Nur httpfs.old/Makefile.am httpfs/Makefile.am --- httpfs.old/Makefile.am 2002-04-16 01:49:48.000000000 +0200 +++ httpfs/Makefile.am 2003-01-20 01:09:39.000000000 +0100 @@ -3,6 +3,7 @@ bin_PROGRAMS=httpfs httpfs_LDADD=-lhurdbugaddr -lnetfs -lfshelp -lthreads -lports -liohelp -lxml2 -lshouldbeinlibc +httpfs_LDFLAGS=`xml2-config --libs` httpfs_SOURCES=httpfs.c \ netfs.c \ args.c \ @@ -11,4 +12,4 @@ extract.c \ node.c \ httpfs.h -INCLUDES = address@hidden@ +INCLUDES = address@hidden@ `xml2-config --cflags` -DOSNAME=\"$(shell if ! OSNAME=`uname -o` ; then OSNAME=`uname -s` ; fi ; echo $$OSNAME)\" -DARCH=\"$(shell uname -m)\" diff -Nur httpfs.old/netfs.c httpfs/netfs.c --- httpfs.old/netfs.c 2002-04-15 21:25:42.000000000 +0200 +++ httpfs/netfs.c 2003-01-20 01:09:39.000000000 +0100 @@ -35,6 +35,15 @@ #include #include + +/* The user must define this variable. Set this to the name of the + filesystem server. */ +char *netfs_server_name = "NAME"; + +/* The user must define this variables. Set this to be the server + version number. */ +char *netfs_server_version = "VERSION"; + /* Attempt to create a file named NAME in DIR for USER with MODE. Set *NODE to the new node upon return. On any error, clear *NODE. *NODE should be locked on success; no matter what, unlock DIR before returning. */ @@ -412,7 +421,7 @@ /* This should attempt to set the size of the file NODE (for user CRED) to SIZE bytes long. */ error_t netfs_attempt_set_size (struct iouser *cred, struct node *node, - off_t size) + loff_t size) { return EROFS; } @@ -420,7 +429,7 @@ /* This should attempt to fetch filesystem status information for the remote filesystem, for the user CRED. */ error_t netfs_attempt_statfs (struct iouser *cred, struct node *node, - struct statfs *st) + fsys_statfsbuf_t *st) { return EOPNOTSUPP; } @@ -464,7 +473,7 @@ up to *LEN bytes. Put the data at DATA. Set *LEN to the amount successfully read upon return. */ error_t netfs_attempt_read (struct iouser *cred, struct node *node, - off_t offset, size_t *len, void *data) + loff_t offset, size_t *len, void *data) { error_t err; static int remote_fd; @@ -504,7 +513,7 @@ to *LEN bytes from DATA. Set *LEN to the amount seccessfully written upon return. */ error_t netfs_attempt_write (struct iouser *cred, struct node *node, - off_t offset, size_t *len, void *data) + loff_t offset, size_t *len, void *data) { return EROFS; } diff -Nur httpfs.old/parsehtml.c httpfs/parsehtml.c --- httpfs.old/parsehtml.c 2002-04-15 21:25:43.000000000 +0200 +++ httpfs/parsehtml.c 2003-01-20 01:09:39.000000000 +0100 @@ -24,9 +24,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include "httpfs.h" diff -Nur httpfs.old/version.h httpfs/version.h --- httpfs.old/version.h 1970-01-01 01:00:00.000000000 +0100 +++ httpfs/version.h 2003-01-20 01:09:39.000000000 +0100 @@ -0,0 +1,3 @@ + +#define NAME "Http Translator" +#define VERSION "0.1"