Thread: Debian packaging

Debian packaging

From
Tomasz Rybak
Date:
I fixed Debian packaging files.
pgagent wasn't included in created package, and
locales were put into wrong directory.

Wrong locales path was caused by misspelled directory name :-).
There was ui instead of i18n.

One question. Should I play with changing pkg/debian/rules file
to new Debian PostgreSQL packaging (which I described in my
mail from Sat, 20 Aug 2005 21:35:02 +0200?

Here's patch:
Index: rules
===================================================================
--- rules       (wersja 4412)
+++ rules       (kopia robocza)
@@ -98,7 +98,7 @@
        # move pgadmin3.mo files to locales directory
        # this part was written by Andreas Tille <tille@debian.org>
        for loc in `find debian/tmp -name $(pkg).mo` ; do \
-          LOC=`echo $${loc} | sed "s?.*pgadmin3/ui/\(.*
\)/$(pkg).mo?\1?"` ; \
+          LOC=`echo $${loc} | sed "s?.*pgadmin3/i18n/\(.*
\)/$(pkg).mo?\1?"` ; \           mkdir -p
debian/$(pkg)/usr/share/locale/$${LOC}/LC_MESSAGES ; \
           mv $${loc}
debian/$(pkg)/usr/share/locale/$${LOC}/LC_MESSAGES/. ; \
        done
Index: pgadmin3.install
===================================================================
--- pgadmin3.install    (wersja 4412)
+++ pgadmin3.install    (kopia robocza)
@@ -1,3 +1,5 @@
 debian/tmp/usr/bin/pgadmin3        usr/bin
+debian/tmp/usr/bin/pgagent        usr/bin
 debian/tmp/usr/share/pgadmin3/ui        usr/share/pgadmin3
+debian/tmp/usr/share/pgadmin3/i18n        usr/share/pgadmin3
 debian/pgadmin3.xpm usr/share/pixmaps


--
Tomasz Rybak <bogomips@post.pl>


Re: Debian packaging

From
"Dave Page"
Date:
The translations used to be in the ui dir, but have recently moved. Raphael (the Debian maintainer) was working on
updatingthe Debian packing iirc. Certainly he often has newer code in test than is in svn... 

Raph? You around atm?

Regards, Dave

-----Original Message-----
From: "Tomasz Rybak"<bogomips@post.pl>
Sent: 22/08/05 22:16:31
To: "pgAdmin Hackers"<pgadmin-hackers@postgresql.org>
Subject: [pgadmin-hackers] Debian packaging

I fixed Debian packaging files.
pgagent wasn't included in created package, and
locales were put into wrong directory.

Wrong locales path was caused by misspelled directory name :-).
There was ui instead of i18n.

One question. Should I play with changing pkg/debian/rules file
to new Debian PostgreSQL packaging (which I described in my
mail from Sat, 20 Aug 2005 21:35:02 +0200?

Here's patch:
Index: rules
===================================================================
--- rules       (wersja 4412)
+++ rules       (kopia robocza)
@@ -98,7 +98,7 @@
        # move pgadmin3.mo files to locales directory
        # this part was written by Andreas Tille <tille@debian.org>
        for loc in `find debian/tmp -name $(pkg).mo` ; do \
-          LOC=`echo $${loc} | sed "s?.*pgadmin3/ui/\(.*
\)/$(pkg).mo?\1?"` ; \
+          LOC=`echo $${loc} | sed "s?.*pgadmin3/i18n/\(.*
\)/$(pkg).mo?\1?"` ; \           mkdir -p
debian/$(pkg)/usr/share/locale/$${LOC}/LC_MESSAGES ; \
           mv $${loc}
debian/$(pkg)/usr/share/locale/$${LOC}/LC_MESSAGES/. ; \
        done
Index: pgadmin3.install
===================================================================
--- pgadmin3.install    (wersja 4412)
+++ pgadmin3.install    (kopia robocza)
@@ -1,3 +1,5 @@
 debian/tmp/usr/bin/pgadmin3        usr/bin
+debian/tmp/usr/bin/pgagent        usr/bin
 debian/tmp/usr/share/pgadmin3/ui        usr/share/pgadmin3
+debian/tmp/usr/share/pgadmin3/i18n        usr/share/pgadmin3
 debian/pgadmin3.xpm usr/share/pixmaps


--
Tomasz Rybak <bogomips@post.pl>


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster



-----Unmodified Original Message-----
I fixed Debian packaging files.
pgagent wasn't included in created package, and
locales were put into wrong directory.

Wrong locales path was caused by misspelled directory name :-).
There was ui instead of i18n.

One question. Should I play with changing pkg/debian/rules file
to new Debian PostgreSQL packaging (which I described in my
mail from Sat, 20 Aug 2005 21:35:02 +0200?

Here's patch:
Index: rules
===================================================================
--- rules       (wersja 4412)
+++ rules       (kopia robocza)
@@ -98,7 +98,7 @@
        # move pgadmin3.mo files to locales directory
        # this part was written by Andreas Tille <tille@debian.org>
        for loc in `find debian/tmp -name $(pkg).mo` ; do \
-          LOC=`echo $${loc} | sed "s?.*pgadmin3/ui/\(.*
\)/$(pkg).mo?\1?"` ; \
+          LOC=`echo $${loc} | sed "s?.*pgadmin3/i18n/\(.*
\)/$(pkg).mo?\1?"` ; \           mkdir -p
debian/$(pkg)/usr/share/locale/$${LOC}/LC_MESSAGES ; \
           mv $${loc}
debian/$(pkg)/usr/share/locale/$${LOC}/LC_MESSAGES/. ; \
        done
Index: pgadmin3.install
===================================================================
--- pgadmin3.install    (wersja 4412)
+++ pgadmin3.install    (kopia robocza)
@@ -1,3 +1,5 @@
 debian/tmp/usr/bin/pgadmin3        usr/bin
+debian/tmp/usr/bin/pgagent        usr/bin
 debian/tmp/usr/share/pgadmin3/ui        usr/share/pgadmin3
+debian/tmp/usr/share/pgadmin3/i18n        usr/share/pgadmin3
 debian/pgadmin3.xpm usr/share/pixmaps


--
Tomasz Rybak <bogomips@post.pl>


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Re: Debian packaging

From
blacknoz@club-internet.fr
Date:
Hi Dave, Thomas and others,

I'm currently near Paris and can't upload anything... The changes proposed by Thomas are included in a more general
patchI plan to post when back at home (a week or so). 

Regards,
Raphaël


----Message d'origine----
>De: "Dave Page" <dpage@vale-housing.co.uk>
>A: <bogomips@post.pl>, <pgadmin-hackers@postgresql.org>,
>Sujet: Re: [pgadmin-hackers] Debian packaging
>Date: Mon, 22 Aug 2005 22:38:28 +0100
>
>
>The translations used to be in the ui dir, but have recently moved. Raphael (the Debian maintainer) was working on
updatingthe Debian packing iirc. Certainly he often has newer code in test than is in svn... 
>
>Raph? You around atm?
>
>Regards, Dave
>
>-----Original Message-----
>From: "Tomasz Rybak"<bogomips@post.pl>
>Sent: 22/08/05 22:16:31
>To: "pgAdmin Hackers"<pgadmin-hackers@postgresql.org>
>Subject: [pgadmin-hackers] Debian packaging
>
>I fixed Debian packaging files.
>pgagent wasn't included in created package, and
>locales were put into wrong directory.
>
>Wrong locales path was caused by misspelled directory name :-).
>There was ui instead of i18n.
>
>One question. Should I play with changing pkg/debian/rules file
>to new Debian PostgreSQL packaging (which I described in my
>mail from Sat, 20 Aug 2005 21:35:02 +0200?
>
>Here's patch:
>Index: rules
>===================================================================
>--- rules       (wersja 4412)
>+++ rules       (kopia robocza)
>@@ -98,7 +98,7 @@
>        # move pgadmin3.mo files to locales directory
>        # this part was written by Andreas Tille <tille@debian.org>
>        for loc in `find debian/tmp -name $(pkg).mo` ; do \
>-          LOC=`echo $${loc} | sed "s?.*pgadmin3/ui/\(.*
>\)/$(pkg).mo?\1?"` ; \
>+          LOC=`echo $${loc} | sed "s?.*pgadmin3/i18n/\(.*
>\)/$(pkg).mo?\1?"` ; \           mkdir -p
>debian/$(pkg)/usr/share/locale/$${LOC}/LC_MESSAGES ; \
>           mv $${loc}
>debian/$(pkg)/usr/share/locale/$${LOC}/LC_MESSAGES/. ; \
>        done
>Index: pgadmin3.install
>===================================================================
>--- pgadmin3.install    (wersja 4412)
>+++ pgadmin3.install    (kopia robocza)
>@@ -1,3 +1,5 @@
> debian/tmp/usr/bin/pgadmin3        usr/bin
>+debian/tmp/usr/bin/pgagent        usr/bin
> debian/tmp/usr/share/pgadmin3/ui        usr/share/pgadmin3
>+debian/tmp/usr/share/pgadmin3/i18n        usr/share/pgadmin3
> debian/pgadmin3.xpm usr/share/pixmaps
>
>
>--
>Tomasz Rybak <bogomips@post.pl>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: Don't 'kill -9' the postmaster
>
>
>
>-----Unmodified Original Message-----
>I fixed Debian packaging files.
>pgagent wasn't included in created package, and
>locales were put into wrong directory.
>
>Wrong locales path was caused by misspelled directory name :-).
>There was ui instead of i18n.
>
>One question. Should I play with changing pkg/debian/rules file
>to new Debian PostgreSQL packaging (which I described in my
>mail from Sat, 20 Aug 2005 21:35:02 +0200?
>
>Here's patch:
>Index: rules
>===================================================================
>--- rules       (wersja 4412)
>+++ rules       (kopia robocza)
>@@ -98,7 +98,7 @@
>        # move pgadmin3.mo files to locales directory
>        # this part was written by Andreas Tille <tille@debian.org>
>        for loc in `find debian/tmp -name $(pkg).mo` ; do \
>-          LOC=`echo $${loc} | sed "s?.*pgadmin3/ui/\(.*
>\)/$(pkg).mo?\1?"` ; \
>+          LOC=`echo $${loc} | sed "s?.*pgadmin3/i18n/\(.*
>\)/$(pkg).mo?\1?"` ; \           mkdir -p
>debian/$(pkg)/usr/share/locale/$${LOC}/LC_MESSAGES ; \
>           mv $${loc}
>debian/$(pkg)/usr/share/locale/$${LOC}/LC_MESSAGES/. ; \
>        done
>Index: pgadmin3.install
>===================================================================
>--- pgadmin3.install    (wersja 4412)
>+++ pgadmin3.install    (kopia robocza)
>@@ -1,3 +1,5 @@
> debian/tmp/usr/bin/pgadmin3        usr/bin
>+debian/tmp/usr/bin/pgagent        usr/bin
> debian/tmp/usr/share/pgadmin3/ui        usr/share/pgadmin3
>+debian/tmp/usr/share/pgadmin3/i18n        usr/share/pgadmin3
> debian/pgadmin3.xpm usr/share/pixmaps
>
>
>--
>Tomasz Rybak <bogomips@post.pl>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: Don't 'kill -9' the postmaster
>
>---------------------------(end of broadcast)---------------------------
>TIP 9: In versions below 8.0, the planner will ignore your desire to
>       choose an index scan if your joining column's datatypes do not
>       match
>


Re: Debian packaging

From
Tomasz Rybak
Date:
If we're talking about packaging...
I noticed, that Makefile from pgadmin calls Makefile from xtra,
which calls Makefile from pgagent. This Makefile installs
only /usr/bin/pgagent.

pgagent is mentioned in documentation:
Once created, connect to the new database, and open the SQL tool. Select
the File -> Open option from the menu and find the 'pgagent.sql' script
installed with pgAdmin. The installation location for this file varies
from operating system to operating system, however it will normally be
found under 'C:\Program files\pgAdmin III' on Windows systems (or 'C:
\Program files\PostgreSQL\8.x\pgAdmin III' if installed with the
PostgreSQL server installer), or '/usr/local/pgadmin3/share/pgadmin3' or
'/usr/share/pgadmin3' on *nix systems. Once the file is loaded, click
the 'Run' button to execute the script.

But pgagent.sql isn't installed by Makefile!
It's mentioned in only one place, in variable EXTRA_DIST.
I think, if pgagent is installed, pgagent.sql should be installed too,
and be placed in /usr/share/pgadmin3/ (or maybe
in /usr/share/pgadmin3/xtra), like documentation say.


One more thing.
When I opened documentation (Help->Help...), message window appeart:
"
Wystąpił błąd:

nie można otworzyć pliku
'/usr/share/pgadmin3//docs/en_US/pgadmin3.hhp.cached' (błąd 13: Brak
dost)
"

Which means: "Error. Cannot open file ... Access denied).
I think pgAdmin tries to open cache file, but ordinary user
cannot write in this directory.

Best regards.

--
Tomasz Rybak <bogomips@post.pl>


Doc packaging (was Debian packaging)

From
Andreas Pflug
Date:
Tomasz Rybak wrote:

>nie można otworzyć pliku
>'/usr/share/pgadmin3//docs/en_US/pgadmin3.hhp.cached' (błąd 13: Brak
>dost)
>"
>
>Which means: "Error. Cannot open file ... Access denied).
>I think pgAdmin tries to open cache file, but ordinary user
>cannot write in this directory.
>
>

Reminder/explanation to all doc committers/packagers:
pgadmin3.hhp.cached is created from pgadmin3.hhp at first access, unless
the cache file is newer. Usually, svn should contain a proper .cache
version.

Regards,
Andreas


Re: Debian packaging

From
"Dave Page"
Date:

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> Tomasz Rybak
> Sent: 23 August 2005 15:33
> To: pgadmin-hackers@postgresql.org
> Subject: Re: [pgadmin-hackers] Debian packaging
>
> If we're talking about packaging...
> I noticed, that Makefile from pgadmin calls Makefile from xtra,
> which calls Makefile from pgagent. This Makefile installs
> only /usr/bin/pgagent.

Thanks - fix committed. I'm no make expert though, so if you know a more
appropriate way to do it, please let me know!!

Regards, Dave.

Re: Debian packaging

From
Tomasz Rybak
Date:
Dnia 23-08-2005, wto o godzinie 22:25 +0100, Dave Page napisał(a):
>
> > -----Original Message-----
> > From: pgadmin-hackers-owner@postgresql.org
> > [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> > Tomasz Rybak
> > Sent: 23 August 2005 15:33
> > To: pgadmin-hackers@postgresql.org
> > Subject: Re: [pgadmin-hackers] Debian packaging
> >
> > If we're talking about packaging...
> > I noticed, that Makefile from pgadmin calls Makefile from xtra,
> > which calls Makefile from pgagent. This Makefile installs
> > only /usr/bin/pgagent.
>
> Thanks - fix committed. I'm no make expert though, so if you know a more
> appropriate way to do it, please let me know!!

Thanks for fixing.

I attach patch, without which creating package as not-root
(with fakeroot) is impossible, as make install tries to install
pgagent.sql into /usr/share/pgadmin, not into PREFIX/usr/share/pgadmin

Warning - this patch (fix) is hack; I looked what ./configure created
for other installed files and added DESTDIR. I'm not sure if it's quite
right (I don't know autoconf well), but it works for me.

Index: xtra/pgagent/Makefile.am
===================================================================
--- xtra/pgagent/Makefile.am    (wersja 4415)
+++ xtra/pgagent/Makefile.am    (kopia robocza)
@@ -57,4 +57,4 @@
 endif

 install-data-local:
-       $(install_sh) -c -m 644 pgagent.sql $(pkgdatadir)/pgagent.sql
+       $(install_sh) -c -m 644 pgagent.sql
$(DESTDIR)$(pkgdatadir)/pgagent.sql


--
Tomasz Rybak <bogomips@post.pl>


Re: Debian packaging

From
"Dave Page"
Date:
Thanks - patch applied (with a / between the vars just in case).

/D

> -----Original Message-----
> From: Tomasz Rybak [mailto:bogomips@post.pl]
> Sent: 25 August 2005 00:36
> To: Dave Page
> Cc: pgadmin-hackers@postgresql.org
> Subject: RE: [pgadmin-hackers] Debian packaging
>
> Dnia 23-08-2005, wto o godzinie 22:25 +0100, Dave Page napisał(a):
> >
> > > -----Original Message-----
> > > From: pgadmin-hackers-owner@postgresql.org
> > > [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of
> > > Tomasz Rybak
> > > Sent: 23 August 2005 15:33
> > > To: pgadmin-hackers@postgresql.org
> > > Subject: Re: [pgadmin-hackers] Debian packaging
> > >
> > > If we're talking about packaging...
> > > I noticed, that Makefile from pgadmin calls Makefile from xtra,
> > > which calls Makefile from pgagent. This Makefile installs
> > > only /usr/bin/pgagent.
> >
> > Thanks - fix committed. I'm no make expert though, so if
> you know a more
> > appropriate way to do it, please let me know!!
>
> Thanks for fixing.
>
> I attach patch, without which creating package as not-root
> (with fakeroot) is impossible, as make install tries to install
> pgagent.sql into /usr/share/pgadmin, not into PREFIX/usr/share/pgadmin
>
> Warning - this patch (fix) is hack; I looked what ./configure created
> for other installed files and added DESTDIR. I'm not sure if
> it's quite
> right (I don't know autoconf well), but it works for me.
>
> Index: xtra/pgagent/Makefile.am
> ===================================================================
> --- xtra/pgagent/Makefile.am    (wersja 4415)
> +++ xtra/pgagent/Makefile.am    (kopia robocza)
> @@ -57,4 +57,4 @@
>  endif
>
>  install-data-local:
> -       $(install_sh) -c -m 644 pgagent.sql $(pkgdatadir)/pgagent.sql
> +       $(install_sh) -c -m 644 pgagent.sql
> $(DESTDIR)$(pkgdatadir)/pgagent.sql
>
>
> --
> Tomasz Rybak <bogomips@post.pl>
>
>