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

Re: [MoM] Packaging fis-get



On Wed, Jan 25, 2012 at 3:15 AM, Andreas Tille <andreas@an3as.eu> wrote:
> I would expect to find the content of the generated tar.gz files in
> the debian/<packagename> directory, not the tar.gz file itself.

> >
This is because Thorsten decided to move the complete tarball straight
into the *.deb package which is a very untypical decision and I was
reasoning about this several times in this thread.  So after a

   debuild

it is correct to find a tarball in debian/<packagename> because this
is also in the *.deb.  If you do a

   make -f debian/rules clean

this should vanish and the debian/ dir should be as clean as before.



Yes, I managed to confirm this.

Now that I understand better the directory locations
where commands must be typed, and the places
where files are intended to go, I can reproduce
the following recipe from scratch:

cd debian-med/trunk/packages/fis-gtm/fis-gtm-initial/trunk
make -f debian/rules get-orig-source

Get the following output:

. ./debian/get-orig-source
check version of software

-- Downloading updated package gtm_V54002B_linux_i686_pro.tar.gz
Filename i386: gtm_V54002B_linux_i686_pro.tar.gz
PKG: fis-gtm-initial
PKGVERSION: 54002B
architecture: i386
-- Downloading updated package gtm_V54002B_linux_x8664_pro.tar.gz
Filename i386: gtm_V54002B_linux_x8664_pro.tar.gz
PKG: fis-gtm-initial
PKGVERSION: 54002B
architecture: amd64


This brought the file:

               fis-gtm-initial_54002B.orig.tar.gz

to the parent directory:

   debian-med/trunk/packages/fis-gtm/fis-gtm-initial

which is verified by typing "ls .."

that returns:

      fis-gtm-initial_54002B.orig.tar.gz  trunk

then I go to the parent directory:

   cd ..

where "pwd" returns:

  debian-med/trunk/packages/fis-gtm/fis-gtm-initial

(BTW, in all "pwd"s results in this email,
 I'm removing the base text  "/home/ibanez/src"
 since it is probably not relevant for the recipe).


and expand the .orig.tar.gz file:

            tar -xzf *.orig.tar.gz

this creates a "fis-gtm-initial" directory.

I copy the "debian" directory into the new
"fis-gtm-initial" directory:

      cp -a trunk/debian/ fis-gtm-initial

and I cd into it:

             cd fis-gtm-initial/

at that point "ls" returns:

debian  gtm_V54002B_linux_i686_pro-i386.tar.gz  gtm_V54002B_linux_x8664_pro-amd64.tar.gz

and "ls .."  returns:

fis-gtm-initial  fis-gtm-initial_54002B.orig.tar.gz  trunk


Then I called "debuild".

(so my rule of thumb is that "debuild" must be called
from a directory that has the 'package name', in this
case "fis-gtm-initial" and that it expects the orig.tar.gz
file to be in the parent directory.)

the output of "debuild" is:


 dpkg-buildpackage -rfakeroot -D -us -uc
dpkg-buildpackage: export CFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export CPPFLAGS from dpkg-buildflags (origin: vendor):
dpkg-buildpackage: export CXXFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export FFLAGS from dpkg-buildflags (origin: vendor): -g -O2
dpkg-buildpackage: export LDFLAGS from dpkg-buildflags (origin: vendor):
dpkg-buildpackage: source package fis-gtm-initial
dpkg-buildpackage: source version 54002B-1
dpkg-buildpackage: source changed by Andreas Tille <tille@debian.org>
 dpkg-source --before-build fis-gtm-initial
dpkg-buildpackage: host architecture i386
 fakeroot debian/rules clean
dh clean
   dh_testdir
   debian/rules override_dh_auto_clean
make[1]: Entering directory `/home/ibanez/src/debian-med/trunk/packages/fis-gtm/fis-gtm-initial/fis-gtm-initial'
dh_auto_clean
rm -f debian/defaults.template
make[1]: Leaving directory `/home/ibanez/src/debian-med/trunk/packages/fis-gtm/fis-gtm-initial/fis-gtm-initial'
   dh_clean
 dpkg-source -b fis-gtm-initial
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building fis-gtm-initial using existing ./fis-gtm-initial_54002B.orig.tar.gz
dpkg-source: info: building fis-gtm-initial in fis-gtm-initial_54002B-1.debian.tar.gz
dpkg-source: info: building fis-gtm-initial in fis-gtm-initial_54002B-1.dsc
 debian/rules build
dh build
   dh_testdir
   debian/rules override_dh_auto_configure
make[1]: Entering directory `/home/ibanez/src/debian-med/trunk/packages/fis-gtm/fis-gtm-initial/fis-gtm-initial'
echo "do not configure anything in this step"
do not configure anything in this step
make[1]: Leaving directory `/home/ibanez/src/debian-med/trunk/packages/fis-gtm/fis-gtm-initial/fis-gtm-initial'
   dh_auto_build
   dh_auto_test
 fakeroot debian/rules binary
dh binary
   dh_testroot
   dh_prep
   dh_installdirs
   debian/rules override_dh_auto_install
make[1]: Entering directory `/home/ibanez/src/debian-med/trunk/packages/fis-gtm/fis-gtm-initial/fis-gtm-initial'
# that's a pretty complex way to copy the gtm tarball to a certain dir - let's rather do this directly
# cat debian/install.template > debian/install
# echo "/usr/lib/fis-gtm" >> debian/install
mkdir -p debian/fis-gtm-initial//usr/lib/fis-gtm/distribution
# Considering that there are two distinct tarballs in the original tarball copying both into the
# target binary deb is just wrong - wee need to grep for the right architecture as well
cp -a `ls -1 | grep -v debian | grep i386` debian/fis-gtm-initial//usr/lib/fis-gtm/distribution
cat debian/defaults.template.template |\
     sed "s?RRRRR?/usr/lib/fis-gtm?g" |\
     sed "s/VVVVV/54002B/g" > debian/defaults.template
make[1]: Leaving directory `/home/ibanez/src/debian-med/trunk/packages/fis-gtm/fis-gtm-initial/fis-gtm-initial'
   dh_install
   dh_installdocs
   dh_installchangelogs
   dh_installexamples
   dh_installman
   dh_installcatalogs
   dh_installcron
   dh_installdebconf
   dh_installemacsen
   dh_installifupdown
   dh_installinfo
   dh_pysupport
   dh_installinit
   dh_installmenu
   dh_installmime
   dh_installmodules
   dh_installlogcheck
   dh_installlogrotate
   dh_installpam
   dh_installppp
   dh_installudev
   dh_installwm
   dh_installxfonts
   dh_bugfiles
   dh_lintian
   dh_gconf
   dh_icons
   dh_perl
   dh_usrlocal
   dh_link
   dh_compress
   dh_fixperms
   dh_strip
   dh_makeshlibs
   dh_shlibdeps
   dh_installdeb
   dh_gencontrol
   dh_md5sums
   dh_builddeb
dpkg-deb: building package `fis-gtm-initial' in `../fis-gtm-initial_54002B-1_i386.deb'.
 dpkg-genchanges  >../fis-gtm-initial_54002B-1_i386.changes
dpkg-genchanges: including full source code in upload
 dpkg-source --after-build fis-gtm-initial
dpkg-buildpackage: full upload (original source is included)
Now running lintian...
W: fis-gtm-initial source: newer-standards-version 3.9.2 (current is 3.9.1)
Finished running lintian.
Now signing changes and any dsc files...
 signfile fis-gtm-initial_54002B-1.dsc Andreas Tille <tille@debian.org>
gpg: skipped "Andreas Tille <tille@debian.org>": secret key not available
gpg: /tmp/debsign.UEQdYnHe/fis-gtm-initial_54002B-1.dsc: clearsign failed: secret key not available
debsign: gpg error occurred!  Aborting....
debuild: fatal error at line 1246:
running debsign failed


Which is good news.

I verify that there is a .tar.gz file down
in the debian directory now.

The command:

                find . -name "*.tar.gz"

returns:

./gtm_V54002B_linux_i686_pro-i386.tar.gz
./gtm_V54002B_linux_x8664_pro-amd64.tar.gz
./debian/fis-gtm-initial/usr/lib/fis-gtm/distribution/gtm_V54002B_linux_i686_pro-i386.tar.gz


and I confirm that the command:

     make -f  debian/rules clean

cleans the "debian" directory.

It essentially removes the files:

debian/fis-gtm-initial/usr/lib
debian/fis-gtm-initial/usr/lib/fis-gtm
debian/fis-gtm-initial/usr/lib/fis-gtm/distribution
debian/fis-gtm-initial/usr/lib/fis-gtm/distribution/gtm_V54002B_linux_i686_pro-i386.tar.gz
debian/fis-gtm-initial/usr/share
debian/fis-gtm-initial/usr/share/fis-gtm-initial
debian/fis-gtm-initial/usr/share/fis-gtm-initial/defaults.template
debian/fis-gtm-initial/usr/share/doc
debian/fis-gtm-initial/usr/share/doc/fis-gtm-initial
debian/fis-gtm-initial/usr/share/doc/fis-gtm-initial/copyright
debian/fis-gtm-initial/usr/share/doc/fis-gtm-initial/changelog.Debian.gz


(this was verified by doing "find debian" before
and after doing "make -f debian/rules   clean")


So,
It looks like I manage to replicate the
recipe and get the package to build.


 
> It might help if you build a small package from the repositories and
> compare the output.

For these cases we have the hello package.  So an

 $ apt-get source hello
 $ cd hello-2.7
 $ debuild



This is REALLY helpful !    :-)

In retrospective, I should probably
have started with this one.

 
---

I'm now continuing with the
instructions in your other email:
http://lists.debian.org/debian-med/2012/01/msg00317.html


I'll reply to that one, in order
to keep the continuity of the
thread.


    Thanks


         Luis



Reply to: