[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: new source package format in dpkg-dev



Hi again,

Le Sun, Mar 30, 2008 at 10:08:19AM +0200, Raphael Hertzog a écrit :
> On Sun, 30 Mar 2008, Charles Plessy wrote:
> 
> Clearly the format 2.0 has been implemented as an academic exercise

Then please do not ask for feedback on it. I am happy to spend time for
you but not if it is to be wasted.


> Well, the man page is clear: you have to call dpkg-source -b on a
> directory with all the patches _applied_.

I had a second look at glam2, and it uses CDBS. I have modified
/usr/share/cdbs/1/rules/patchsys-quilt.mk to patch at clean time:

sorbet【tmp】$ diff /usr/share/cdbs/1/rules/patchsys-quilt.mk patchsys-quilt.mk
89c89
< clean:: reverse-patches
---
> clean:: apply-patches


sorbet【glam2-1058】$ LC_ALL=C fakeroot dpkg-buildpackage -S -us -uc
[...]
Le patch Makefiles est maintenant au sommet
touch debian/stamp-patched
/usr/bin/make -f debian/rules update-config
make[1]: Entering directory `/tmp/glam2-1058'
make[1]: Nothing to be done for `update-config'.
make[1]: Leaving directory `/tmp/glam2-1058'
# update-config must be last
dh_clean
/usr/bin/make  -C . CFLAGS="-g -Wall -O2" CXXFLAGS="-g -Wall -O2" CPPFLAGS="" LDFLAGS="-Wl,-Bsymbolic-functions"  -k clean
make[1]: Entering directory `/tmp/glam2-1058'
rm -f  purge/*.o purge/purge purge/glam2-purge src/*.o src/{glam2,glam2mask,glam2format,glam2scan,glam2fft}
make[1]: Leaving directory `/tmp/glam2-1058'
rm -f debian/stamp-makefile-build
 dpkg-source -b glam2-1058
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building glam2 using existing ./glam2_1058.orig.tar.gz
dpkg-source: error: cannot represent change to glam2-1058/patches:
dpkg-source: error:   new version is nonexistent
dpkg-source: error:   old version is symlink to /tmp/glam2-1058/debian/patches
dpkg-source: error: unrepresentable changes to source
dpkg-buildpackage: failure: dpkg-source -b glam2-1058 gave error exit status 2

I then tried to add an arbitrary change, and ran dpkg-buildpackage again:

sorbet【glam2-1058】$ vi README

sorbet【glam2-1058】$ LC_ALL=C dpkg-buildpackage -S -us -uc -rfakeroot
dpkg-buildpackage: set CFLAGS to default value: -g -O2
dpkg-buildpackage: set CPPFLAGS to default value:
dpkg-buildpackage: set LDFLAGS to default value: -Wl,-Bsymbolic-functions
dpkg-buildpackage: set FFLAGS to default value: -g -O2
dpkg-buildpackage: set CXXFLAGS to default value: -g -O2
dpkg-buildpackage: source package glam2
dpkg-buildpackage: source version 1058-1
dpkg-buildpackage: source changed by Charles Plessy <charles-debian-nospam@plessy.org>
 fakeroot debian/rules clean
test -x debian/rules
test "`id -u`" = 0
mkdir -p "."
dh_clean
/usr/bin/make  -C . CFLAGS="-g -Wall -O2" CXXFLAGS="-g -Wall -O2" CPPFLAGS="" LDFLAGS="-Wl,-Bsymbolic-functions"  -k clean
make[1]: Entering directory `/tmp/glam2-1058'
rm -f  purge/*.o purge/purge purge/glam2-purge src/*.o src/{glam2,glam2mask,glam2format,glam2scan,glam2fft}
make[1]: Leaving directory `/tmp/glam2-1058'
rm -f debian/stamp-makefile-build
 dpkg-source -b glam2-1058
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building glam2 using existing ./glam2_1058.orig.tar.gz
dpkg-source: info: building glam2 in glam2_1058-1.debian.tar.gz
dpkg-source: info: building glam2 in glam2_1058-1.dsc
 dpkg-genchanges -S >../glam2_1058-1_source.changes
dpkg-genchanges: warning: unknown information field 'Format' in input data in general section of control info file
dpkg-genchanges: including full source code in upload
dpkg-buildpackage: full upload; Debian-native package (full source is included)

sorbet【glam2-1058】$ cat debian/patches/debian-changes-1058-1.diff
--- glam2-1058.orig/README
+++ glam2-1058/README
@@ -1 +1,2 @@
+Hop
 For installation and usage instructions, view doc/index.html in a web browser.


In conclusion, I think that the key information from this mail is that if you
want to promote the use of format 3.0 (quilt), then it is probably a good idea
to see with the quilt maintainers (who distrubute
/usr/share/cdbs/1/rules/patchsys-quilt.mk) how a global solution can be
provided.

Have a nice day,

-- 
Charles Plessy
http://charles.plessy.org
Wakō, Saitama, Japan


Reply to: