On Monday, June 03, 2013 17:37:44, Joe Healy wrote: > On Tue, Jun 4, 2013 at 2:28 AM, Pol Hallen <debiandeve...@fuckaround.org> wrote: > > apt-get source postfix and I see: > > > > f 215552 Jun 3 13:35 postfix_2.7.1-1+squeeze1.diff.gz > > f 1754 Jun 3 13:35 postfix_2.7.1-1+squeeze1.dsc > > d 4096 Jun 3 13:35 postfix-2.7.1 > > f 3418747 Jun 3 13:35 postfix_2.7.1.orig.tar.gz > > > > I go to postfix-2.7.1 dir and I patch: > > > > patch -p1 < patch.x.y.z > > > > everything ok > > You should also update the debian/changelog file. the tool dch will > assist with this. > Add a new entry to describe the changes you are making and give it a > new version number. > probably something like 2.7.1-1+squeeze1~local-1. Though I do not > completely understand the nature of your changes and this may affect > how you change the version number. > > > to rebuild I do: > > > > dpkg-buildpackage -rfakeroot -uc -us
fakeroot is the default, so (hopefully) it shouldn't need to be specified via the -r option. Another way to do the build is via 'debuild -us -uc' -- the difference is that debuid runs lintian after the build. lintian is a package checker which finds packaging errors, so I like to build this way by default. > > and I've a new postfix package > > > > A question: the dir of postfix (created by system after apt-get source > > postfix), is already patched with debian patches? or I need compile > > debian patches to that dir? > > As far as I am aware, the unpacked version will be clean (without > patches) the patches are applied as part of the build process. Usually (but not always) source packages are patched after downloading and are thus in the patched state to start with. However (supposedly) the build should leave the debianized source in the last patched/unpatched state it was in -- so for instance if you unpatched the source, the build should unpatch at the end and thus leave the source in the unpatched state after the build. (Or at least that's my understanding having seen a discussion about this on [debian-devel].) Specifically concerning the Postfix package, getting the source via 'apt-get source' or via dget to download a snapshot (this is what I did to get the particular source version Pol is using), the source gets patched: dget http://snapshot.debian.org/archive/debian- security/20110510T175755Z/pool/updates/main/p/postfix/postfix_2.7.1-1%2Bsqueeze1.dsc dget: retrieving http://snapshot.debian.org/archive/debian- security/20110510T175755Z/pool/updates/main/p/postfix/postfix_2.7.1-1%2Bsqueeze1.dsc % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1754 100 1754 0 0 6921 0 --:--:-- --:--:-- --:--:-- 6932 dget: retrieving http://snapshot.debian.org/archive/debian- security/20110510T175755Z/pool/updates/main/p/postfix/postfix_2.7.1.orig.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 3338k 100 3338k 0 0 1120k 0 0:00:02 0:00:02 --:--:-- 1121k dget: retrieving http://snapshot.debian.org/archive/debian- security/20110510T175755Z/pool/updates/main/p/postfix/postfix_2.7.1-1+squeeze1.diff.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 210k 100 210k 0 0 204k 0 0:00:01 0:00:01 --:--:-- 204k postfix_2.7.1-1%2Bsqueeze1.dsc: Good signature found validating postfix_2.7.1.orig.tar.gz validating postfix_2.7.1-1+squeeze1.diff.gz All files validated successfully. dpkg-source: info: extracting postfix in postfix-2.7.1 dpkg-source: info: unpacking postfix_2.7.1.orig.tar.gz dpkg-source: info: applying postfix_2.7.1-1+squeeze1.diff.gz dpkg-source: info: upstream files that have been modified: postfix-2.7.1/Makefile.in postfix-2.7.1/README_FILES/CYRUS_README postfix-2.7.1/conf/main.cf postfix-2.7.1/conf/main.cf.tls postfix-2.7.1/conf/master.cf ... [many more likes of files patched] > I hope that helps (and is correct - I too am still learning). I am too. Debian packaging is quite complicated. -- Chris -- Chris Knadle chris.kna...@coredump.us GPG Key: 4096R/0x1E759A726A9FDD74
signature.asc
Description: This is a digitally signed message part.