This patch moves to the dbs build system provided by the dbs package in Debian.
There are some preliminary steps as the upstream archive needs to be moved and the pristine source archive needs to be regenerated as a result. Move the tarball for upstream X to the base of the packaging dir (whatever/xfree86-4.3.0/). Make a tar.gz in the directory above the package dir called xfree86_4.3.0.orig.tar.gz. Unarchive the 20030726 nightly drop into the top package dir. I imagine that it may work with closeby nightly drops as well, such as tonight's nightly. To apply patch inside debian dir: $patch -p1 < patchfile.diff Debuild and your off to the races. Cool things: no checksource in the rules file The clean works better, I think. New dbs tools for managing patches withing and between versions The patch is relatively small. TODO: copy the dbs doc stuff into debian/README or maybe just refer to it Warren Turkal diff -uNr debian.20030726/control debian/control --- debian.20030726/control 2003-07-26 00:03:15.000000000 -0500 +++ debian/control 2003-07-26 22:44:09.000000000 -0500 @@ -4,7 +4,7 @@ Maintainer: Debian X Strike Force <[EMAIL PROTECTED]> Uploaders: Branden Robinson <[EMAIL PROTECTED]> Standards-Version: 3.5.10 -Build-Depends: dpkg (>= 1.7.0), cpp-3.2, flex, bison, bsdmainutils, m4, groff, zlib1g-dev | libz-dev, libncurses5-dev | libncurses-dev, libpam0g-dev | libpam-dev, libfreetype6-dev, libpaperg, tetex-bin, po-debconf, debhelper (>= 4.1.16), html2text, libglide2-dev (>> 2001.01.26) [i386], libglide3-dev (>> 2001.01.26) [i386], libglide3-alpha-dev [alpha], kernel-headers-2.4 [alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sh sparc], libpng12-0-dev | libpng-dev (>= 1.2.1), libexpat1-dev, libfontconfig1-dev, fontconfig, bzip2, libxft2-dev, libxrender-dev, libxcursor-dev, libstdc++5-dev | libstdc++-dev +Build-Depends: dpkg (>= 1.7.0), dbs, cpp-3.2, flex, bison, bsdmainutils, m4, groff, zlib1g-dev | libz-dev, libncurses5-dev | libncurses-dev, libpam0g-dev | libpam-dev, libfreetype6-dev, libpaperg, tetex-bin, po-debconf, debhelper (>= 4.1.16), html2text, libglide2-dev (>> 2001.01.26) [i386], libglide3-dev (>> 2001.01.26) [i386], libglide3-alpha-dev [alpha], kernel-headers-2.4 [alpha arm hppa i386 ia64 m68k mips mipsel powerpc s390 sh sparc], libpng12-0-dev | libpng-dev (>= 1.2.1), libexpat1-dev, libfontconfig1-dev, fontconfig, bzip2, libxft2-dev, libxrender-dev, libxcursor-dev, libstdc++5-dev | libstdc++-dev Package: lbxproxy Architecture: any diff -uNr debian.20030726/doogie-build-system debian/doogie-build-system --- debian.20030726/doogie-build-system 2003-07-26 00:01:10.000000000 -0500 +++ debian/doogie-build-system 1969-12-31 18:00:00.000000000 -0600 @@ -1,65 +0,0 @@ -#!/usr/bin/make -f -# Debian rules file for XFree86 -# Originally by Stephen Early <[EMAIL PROTECTED]> -# Modified by Mark W. Eichin <[EMAIL PROTECTED]> -# Modified by Branden Robinson <[EMAIL PROTECTED]> -# Complete overhaul by Adam Heath <[EMAIL PROTECTED]> - -patchapply: debian/stampdir/patchapply -debian/stampdir/patchapply: debian/stampdir/source.build - debian/scripts/patch.apply - touch $@ - rm -f debian/stampdir/patchunapply - -patchunapply: debian/stampdir/patchunapply -debian/stampdir/patchunapply: debian/stampdir/source.build - debian/scripts/patch.unapply - touch $@ - rm -f debian/stampdir/patchapply - -.export: SOURCE_TREE - -# -# The rules that really do the work all start with debian/stampdir/ -# This little trick allows us to use stamp files to keep us from -# having to rerun long targets over and over. It also puts -# all stamp files in one place, for easy cleaning. -# -# If a stampdir rule depends on something else, be sure it is -# another stampdir rule. Depending on base rule won't work. -# - -source.build: debian/stampdir/source.build -debian/stampdir/source.build: debian/stampdir/source.unpack debian/stampdir/source.patch - touch $@ - -source.clean: unfix.source.patch - rm -rf $(SOURCE_DIR) debian/stampdir/upstream debian/stampdir/patches - rm -f $(patsubst %,debian/stampdir/%,source.build source.make source.unpack fix.source.patch) - -source.make: debian/stampdir/source.make -debian/stampdir/source.make: debian/stampdir/source.build debian/stampdir/patchapply - touch $@ - -source.unpack: debian/stampdir/source.unpack -debian/stampdir/source.unpack: - debian/scripts/source.unpack - touch $@ - -source.patch: debian/stampdir/source.patch -debian/stampdir/source.patch: debian/stampdir/source.unpack debian/stampdir/fix.source.patch - debian/scripts/source.patch - touch $@ - -fix.source.patch: debian/stampdir/fix.source.patch -debian/stampdir/fix.source.patch: - debian/scripts/fix.source.patch - touch $@ - -unfix.source.patch: debian/stampdir/unfix.source.patch -debian/stampdir/unfix.source.patch: - debian/scripts/unfix.source.patch - touch $@ - -DIR_TARGETS+=debian/stampdir -# STAMPDIR_TARGETS+=source.make source.unpack source.patch fix.source.patch unfix.source.patch patchunapply patchunapply diff -uNr debian.20030726/rules debian/rules --- debian.20030726/rules 2003-07-26 00:01:29.000000000 -0500 +++ debian/rules 2003-07-26 22:39:37.000000000 -0500 @@ -12,17 +12,20 @@ # default rule to keep things from going nuts by accident default: environment -checksource: source.make - $(checksource_command) - -define checksource_command - # make sure all the patches applied cleanly - @if grep -v '^patch' debian/stampdir/patches/*.log; then echo "Some patches did not apply cleanly. Please investigate." >&2; exit 1; fi - # yes, they did -endef +# debhelper +export DH_OPTIONS # Include Adam Heath's source archive/patch handling system. -include debian/doogie-build-system +#include debian/doogie-build-system +SCRIPT_DIR = /usr/share/dbs + +TAR_DIR = xc +include $(SCRIPT_DIR)/dbs-build.mk + +# dpkg-arch rules +ifeq (,$(DEB_BUILD_GNU_TYPE)) + include $(SCRIPT_DIR)/dpkg-arch.mk +endif # oh my God, this is a gross hack ELSE:=else @@ -32,9 +35,6 @@ DUMMY:=$(shell if [ ! -x debian/setperms ]; then chmod 755 debian/setperms; fi) DUMMY:=$(shell debian/setperms) -# debhelper -export DH_OPTIONS - # workaround for an aggressive overfeature of groff export GROFF_NO_SGR=1 @@ -145,10 +145,10 @@ debconf2po-update rm -f $(STAMP_DIR)/genscripts -clean: source.clean cleanscripts +clean: cleanscripts dh_testdir - dh_testroot - rm -rf $(STAMP_DIR) $(DEBTREEDIR) + rm -rf $(STAMP_DIR) $(SOURCE_DIR) + perl $(SCRIPT_DIR)/dbs_split clean rm -rf debian/local/exports debian/local/xlibmesa-drm-src/modules dh_clean debian/local/xserver-wrapper debian/local/xterm.faq.text.gz debian/MANIFEST.$(ARCH).new @@ -196,11 +196,14 @@ debconf2po-update touch $@ +configure: $(STAMP_DIR)/stamp-configure +$(STAMP_DIR)/stamp-configure: $(patched) + dh_testdir + # DO NOT CHANGE THIS RULE WITHOUT CHECKING FOR SYNCHRONICITY WITH THE build-server RULE BELOW -build: $(STAMP_DIR)/build -$(STAMP_DIR)/build: $(STAMP_DIR)/source.make $(STAMP_DIR)/genscripts +build: $(STAMP_DIR)/stamp-build +$(STAMP_DIR)/stamp-build: $(patched) $(STAMP_DIR)/genscripts dh_testdir - $(checksource_command) # copy Xft stuff into exports/{lib,include} so we don't have to pull # in -L/usr/include and other, similarly ugly, stuff (including, but @@ -244,7 +247,7 @@ # DO NOT CHANGE THIS RULE WITHOUT CHECKING FOR SYNCHRONICITY WITH THE install-server RULE BELOW install: $(STAMP_DIR)/install -$(STAMP_DIR)/install: $(STAMP_DIR)/build +$(STAMP_DIR)/install: $(STAMP_DIR)/stamp-build dh_testdir dh_testroot ifndef test_rules @@ -356,7 +359,7 @@ binary-indep: $(STAMP_DIR)/binary-indep $(STAMP_DIR)/binary-indep: DH_OPTIONS=-i -$(STAMP_DIR)/binary-indep: $(STAMP_DIR)/build $(STAMP_DIR)/install +$(STAMP_DIR)/binary-indep: $(STAMP_DIR)/stamp-build $(STAMP_DIR)/install dh_testdir dh_testroot dh_install --sourcedir=debian/tmp @@ -388,7 +391,7 @@ # DO NOT CHANGE THIS RULE WITHOUT CHECKING FOR SYNCHRONICITY WITH THE binary-server RULE BELOW binary-arch: $(STAMP_DIR)/binary-arch $(STAMP_DIR)/binary-arch: DH_OPTIONS=-s -$(STAMP_DIR)/binary-arch: $(STAMP_DIR)/build $(STAMP_DIR)/install +$(STAMP_DIR)/binary-arch: $(STAMP_DIR)/stamp-build $(STAMP_DIR)/install dh_testdir dh_testroot dh_install --sourcedir=debian/tmp @@ -468,9 +471,8 @@ # DO NOT CHANGE THIS RULE WITHOUT CHECKING FOR SYNCHRONICITY WITH THE build RULE ABOVE build-server: $(STAMP_DIR)/build-server -$(STAMP_DIR)/build-server: $(STAMP_DIR)/source.make $(STAMP_DIR)/genscripts +$(STAMP_DIR)/build-server: $(patched) $(STAMP_DIR)/genscripts dh_testdir - $(checksource_command) # create source tree for static, debuggable XFree86 server mkdir $(SOURCE_TREE)-xserver-xfree86-dbg # we don't copy the doc, fonts or nls directories to save space; see @@ -550,7 +552,7 @@ touch $@ .PHONY: build build-arch build-install install clean binary-arch binary-indep binary -.PHONY: default environment checksource +.PHONY: default environment .PHONY: build-server install-server binary-server .PHONY: cleanscripts diff -uNr debian.20030726/scripts/fix.source.patch debian/scripts/fix.source.patch --- debian.20030726/scripts/fix.source.patch 2003-07-26 00:01:01.000000000 -0500 +++ debian/scripts/fix.source.patch 1969-12-31 18:00:00.000000000 -0600 @@ -1,31 +0,0 @@ -#!/bin/sh - -. debian/scripts/vars - -if [ ! -e debian/fixpatch ]; then - exit 0 -fi - -mkdir -p $STAMP_DIR/upstream/fixpatch upstream - -for f in $(find debian/fixpatch -type f | sort); do - stampfile=$STAMP_DIR/upstream/fixpatch/$(basename $f) - if [ ! -e $stampfile ]; then - echo -n "Fixing upstream patch $f..." - case "$f" in - *.gz) cmd=zcat ;; - *.bz) cmd=bzcat ;; - *.bz2) cmd=bz2cat ;; - *) cmd=cat ;; - esac - if $cmd $f | (cd upstream; patch -p1 ) > $stampfile.log; then - echo "done." - touch $stampfile - else - echo "failed!" - exit 1 - fi - else - echo "upstream patch fix $f already applied." - fi -done diff -uNr debian.20030726/scripts/patch.apply debian/scripts/patch.apply --- debian.20030726/scripts/patch.apply 2003-07-26 00:01:00.000000000 -0500 +++ debian/scripts/patch.apply 1969-12-31 18:00:00.000000000 -0600 @@ -1,36 +0,0 @@ -#!/bin/sh - -LC_COLLATE=C - -. debian/scripts/vars - -[ ! -d debian/patches ] && exit - -mkdir -p $STAMP_DIR/patches $SOURCE_TREE - -for f in $(find debian/patches \( -type f -or -type l \) -not -name "*~" | sort); do - stampfile=$STAMP_DIR/patches/$(basename $f) - if [ ! -e $stampfile ]; then - echo -n "Applying patch $f..." - case "$f" in - *.gz) cmd=zcat ;; - *.bz) cmd=bzcat ;; - *.bz2) cmd=bz2cat ;; - *) cmd=cat ;; - esac - if ! $cmd $f | (cd $SOURCE_TREE; patch --dry-run -p1) > $stampfile.log; then - echo "dry run failed." - cat $stampfile.log - exit 1 - fi - if $cmd $f | (cd $SOURCE_TREE; patch -p1) > $stampfile.log; then - echo "done." - touch $stampfile - else - echo "failed!" - exit 1 - fi - else - echo "Patch $f already applied." - fi -done diff -uNr debian.20030726/scripts/patch.unapply debian/scripts/patch.unapply --- debian.20030726/scripts/patch.unapply 2003-07-26 00:01:01.000000000 -0500 +++ debian/scripts/patch.unapply 1969-12-31 18:00:00.000000000 -0600 @@ -1,29 +0,0 @@ -#!/bin/sh - -LC_COLLATE=C - -. debian/scripts/vars - -mkdir -p $STAMP_DIR/patches/ - -for f in $(find debian/patches -type f -not -name "*~" | sort -r); do - stampfile=$STAMP_DIR/patches/`basename $f` - if [ -e $stampfile ]; then - echo -n "Reversing patch $f" - case "$f" in - *.gz) cmd=zcat ;; - *.bz) cmd=bzcat ;; - *.bz2) cmd=bz2cat ;; - *) cmd=cat ;; - esac - if $cmd $f | (cd $PATCH_TREE; patch -R -p1) > $stampfile.log; then - echo " successful." - rm $stampfile - else - echo " failed!" - exit 1 - fi - else - echo "Patch $f not applied." - fi -done diff -uNr debian.20030726/scripts/source.patch debian/scripts/source.patch --- debian.20030726/scripts/source.patch 2003-07-26 00:01:02.000000000 -0500 +++ debian/scripts/source.patch 1969-12-31 18:00:00.000000000 -0600 @@ -1,29 +0,0 @@ -#!/bin/sh - -. debian/scripts/vars - -[ ! -d upstream/patches ] && exit - -mkdir -p $STAMP_DIR/upstream/patches/ $SOURCE_TREE - -for f in `find upstream/patches -type f | sort`; do - stampfile=$STAMP_DIR/upstream/patches/`basename $f` - if [ ! -e $stampfile ]; then - echo -n "Applying upstream patch $f..." - case "$f" in - *.gz) cmd=zcat;; - *.bz) cmd=bzcat;; - *.bz2) cmd=bz2cat;; - *) cmd=cat;; - esac - if $cmd $f | (cd $SOURCE_TREE; patch -p1) > $stampfile.log; then - echo "done." - touch $stampfile - else - echo "failed!" - exit 1 - fi - else - echo "upstream patch $f already applied." - fi -done diff -uNr debian.20030726/scripts/source.unpack debian/scripts/source.unpack --- debian.20030726/scripts/source.unpack 2003-07-26 00:01:00.000000000 -0500 +++ debian/scripts/source.unpack 1969-12-31 18:00:00.000000000 -0600 @@ -1,27 +0,0 @@ -#!/bin/sh - -. debian/scripts/vars - -mkdir -p $STAMP_DIR/upstream/archives/ $SOURCE_DIR - -for f in $(find upstream/archives -type f | sort); do - stampfile=$STAMP_DIR/upstream/archives/$(basename $f) - if [ ! -e $stampfile ]; then - case $f in - *.gz|*.tgz) cmd=zcat;; - *.bz) cmd=bzcat;; - *.bz2) cmd=bzcat;; - *) cmd=cat;; - esac - echo -n "Extracting upstream archive $f..." - if $cmd $f | (cd $SOURCE_DIR; tar xvf -) > $stampfile.log; then - echo "done." - touch $stampfile - else - echo "failed!" - exit 1 - fi - else - echo "upstream archive $f already extracted." - fi -done diff -uNr debian.20030726/scripts/unfix.source.patch debian/scripts/unfix.source.patch --- debian.20030726/scripts/unfix.source.patch 2003-07-26 00:01:02.000000000 -0500 +++ debian/scripts/unfix.source.patch 1969-12-31 18:00:00.000000000 -0600 @@ -1,29 +0,0 @@ -#!/bin/sh - -. debian/scripts/vars - -mkdir -p $STAMP_DIR/upstream/fixpatch upstream - -[ ! -e debian/fixpatch ] && exit - -for f in $(find debian/fixpatch -type f | sort); do - stampfile=$STAMP_DIR/upstream/fixpatch/$(basename $f) - if [ -e $stampfile ]; then - echo -n "Unfixing upstream patch $f..." - case "$f" in - *.gz) cmd=zcat;; - *.bz) cmd=bzcat;; - *.bz2) cmd=bz2cat;; - *) cmd=cat;; - esac - if $cmd $f | (cd upstream; patch -p1 -R ) > $stampfile.log; then - echo "done." - rm $stampfile - else - echo "failed!" - exit 1 - fi - else - echo "upstream patch fix $f already reversed." - fi -done diff -uNr debian.20030726/scripts/vars debian/scripts/vars --- debian.20030726/scripts/vars 2003-07-26 00:01:04.000000000 -0500 +++ debian/scripts/vars 2003-07-26 22:42:12.000000000 -0500 @@ -12,4 +12,4 @@ # debian/rules to know when certain targets are done. SOURCE_TREE=build-tree/xc SOURCE_DIR=build-tree -STAMP_DIR=debian/stampdir +#STAMP_DIR=debian/stampdir diff -uNr debian.20030726/setperms debian/setperms --- debian.20030726/setperms 2003-07-26 00:01:10.000000000 -0500 +++ debian/setperms 2003-07-26 22:59:31.000000000 -0500 @@ -2,17 +2,7 @@ set -e -for FILE in doogie-build-system; do - chmod 755 debian/$FILE -done - -for FILE in fix.source.patch \ - getglibcversion \ - patch.apply \ - patch.unapply \ - source.patch \ - source.unpack \ - unfix.source.patch \ +for FILE in getglibcversion \ vars*; do chmod 755 debian/scripts/$FILE done -- Treasurer, GOLUM, Inc. http://www.golum.org -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]