Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 98455 - punjab ebuild missing (Jabber HTTP-Polling)
Summary: punjab ebuild missing (Jabber HTTP-Polling)
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Default Assignee for New Packages
URL:
Whiteboard:
Keywords:
Depends on: 98452
Blocks:
  Show dependency tree
 
Reported: 2005-07-09 05:15 UTC by David Danier
Modified: 2018-06-07 18:25 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
punjab-0.6.ebuild (punjab-0.6.ebuild,1.01 KB, text/plain)
2005-07-09 05:19 UTC, David Danier
Details
files/punjab.conf (punjab.conf,189 bytes, text/plain)
2005-07-09 05:20 UTC, David Danier
Details
files/punjab.initd (punjab.initd,729 bytes, text/plain)
2005-07-09 05:20 UTC, David Danier
Details
punjab-0.6.ebuild (punjab-0.6.ebuild,1.23 KB, text/plain)
2005-09-03 04:58 UTC, David Danier
Details
punjab-0.6.ebuild (punjab-0.6.ebuild,1.22 KB, text/plain)
2005-09-03 14:17 UTC, Gustavo Felisberto (RETIRED)
Details
files/punjab.conf (punjab.conf,193 bytes, text/plain)
2005-09-03 14:18 UTC, Gustavo Felisberto (RETIRED)
Details
punjab-0.6.ebuild.diff (punjab-0.6.ebuild.diff,505 bytes, patch)
2005-09-03 14:31 UTC, Gustavo Felisberto (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Danier 2005-07-09 05:15:36 UTC
Since I missed an ebuild for punjab I've written one of myself.
(First ebuild I created)

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 David Danier 2005-07-09 05:19:34 UTC
Created attachment 62989 [details]
punjab-0.6.ebuild
Comment 2 David Danier 2005-07-09 05:20:06 UTC
Created attachment 62990 [details]
files/punjab.conf
Comment 3 David Danier 2005-07-09 05:20:32 UTC
Created attachment 62991 [details]
files/punjab.initd
Comment 4 David Danier 2005-07-09 05:28:13 UTC
Forget one info:
As I have only jabberd installed and there is no general way to create paths for
jabber-enhancements I use the jabberd-paths in the ebuild (/etc/jabberd and so
on). Of course this will not work with ejabberd for example.

So this bug depends on bug #98452....
Comment 5 Slobodan D. Sredojevic 2005-09-02 08:36:45 UTC
Hi David

Thank you for the work you did. Some thoughts:
- SRC_URI line should be: SRC_URI="mirror://sourceforge/punjab/${P}.tar.gz"
- twisted-xish, twisted-words, twisted-web and twisted-conch already depends on
  DEPEND=">=dev-python/twisted-2.0.0" and twisted-2.0.0.ebuild include line
  DEPEND=">=dev-lang/python-2.2", so I would shorten dependancy list for first
  two lines.
- Licence should be GPL-2
- You are using functions 'enewgroup' and 'enewuser' that are defined in 
  eutils eclass. I believe you missed an 'inherit eutils' at the begining of 
  the ebuild but also I think this is not quite usefull as this (defining 
  'jabber' user and 'jabber' is already done in net-im/jabberd ebuilds. Do 
  you have any reason to include these two lines?
- Your work brings an ebuild, conf and initd file so it is good to tell 
  that to users. For example:

  pkg_postinst(){
    echo
    einfo "To be able to run punjab proxy server you need"
    einfo "to add it to the default runlevel using"
    einfo "rc-update add punjab default"
    einfo "and start it with /etc/init.d/punjab start"
    einfo "Don't forget to edit /etc/conf.d/punjab conf file as appropriate"
    echo
  }
  or similar...  
- You do "dodir /var/jabberd/db/punjab/html" but put nothing in there? 
  This is to be put in src_install():
  cp -r html/ ${D}/path/to/punjab/dir
  Path as suggested here: http://punjab.sourceforge.net/jwchat.html may be:
  /var/www/punjab
- Punjab is a kind of proxy server. You suggest running directory to be 
  inside /var/jabberd/db/punjab .  Maybe to wait first this one to be sorted 
  out and resolved: #98452

Ssl
Comment 6 David Danier 2005-09-03 04:57:55 UTC
> SRC_URI line should be: SRC_URI="mirror://sourceforge/punjab/${P}.tar.gz"

Changed, dindn't know how to use this mirrorstuff and didn't find any ebuild
using it.

> twisted-xish, twisted-words, twisted-web and twisted-conch already depends on
> DEPEND=">=dev-python/twisted-2.0.0" and twisted-2.0.0.ebuild include line
> DEPEND=">=dev-lang/python-2.2", so I would shorten dependancy list for first
> two lines.

That was copied from another ebuild, chandes done.

> Licence should be GPL-2

Changed

> You are using functions 'enewgroup' and 'enewuser' that are defined in 
> eutils eclass. I believe you missed an 'inherit eutils' at the begining of 
> the ebuild but also I think this is not quite usefull as this (defining 
> 'jabber' user and 'jabber' is already done in net-im/jabberd ebuilds. Do 
> you have any reason to include these two lines?

The ebuild need the user and group. Afaik 'enewgroup' and 'enewuser' only
creates new users when then do not already exist. Because I'm not sure if the
jabber-dep is needed or if punjab can be run standalone. If no jabber-ebuild is
installed before this one the user/group would be missing.

> Your work brings an ebuild, conf and initd file so it is good to tell 
> that to users. For example:
> [...]
> or similar...  

Added, thx

> You do "dodir /var/jabberd/db/punjab/html" but put nothing in there? 
> This is to be put in src_install():
> cp -r html/ ${D}/path/to/punjab/dir

Sorry, I'm not familiar with all the ebuild-stuff.

My guess to do this:
cp -r html/ ${D}/var/jabberd/db/punjab/html

> Path as suggested here: http://punjab.sourceforge.net/jwchat.html may be:
> /var/www/punjab

Hmmm....
Not /var/www/localhost/htdocs/punjab in Gentoo? Or perhaps we should use
webapp-config?

> Punjab is a kind of proxy server. You suggest running directory to be 
> inside /var/jabberd/db/punjab .  Maybe to wait first this one to be sorted 
> out and resolved: #98452

I think waiting is a good idea.
Comment 7 David Danier 2005-09-03 04:58:51 UTC
Created attachment 67548 [details]
punjab-0.6.ebuild
Comment 8 Gustavo Felisberto (RETIRED) gentoo-dev 2005-09-03 05:19:21 UTC
Please see the info on bug 98452 for location of files and creation of users
(probably a good idea to do a less
/usr/portage/net-im/jabber-base/jabber-base-0.00.ebuild to see that the user
already is created.

Also the python ./setup.py install --root ${D} i think there is a much cleaner
way to do this, would have to give /usr/portage/eclass/python.eclass a closer look.
Comment 9 Gustavo Felisberto (RETIRED) gentoo-dev 2005-09-03 14:17:06 UTC
Created attachment 67588 [details]
punjab-0.6.ebuild
Comment 10 Gustavo Felisberto (RETIRED) gentoo-dev 2005-09-03 14:18:21 UTC
Created attachment 67589 [details]
files/punjab.conf

Well i did some changes to better install the python packages and proper
jabber-base compliance. But i have no idea on how to test this :)
Comment 11 Gustavo Felisberto (RETIRED) gentoo-dev 2005-09-03 14:31:55 UTC
Created attachment 67591 [details, diff]
punjab-0.6.ebuild.diff

Better dependencies.
Comment 12 Slobodan D. Sredojevic 2005-09-03 15:26:20 UTC
David:

> The ebuild need the user and group. Afaik 'enewgroup' and 'enewuser' only
> creates new users when then do not already exist. Because I'm not sure if the
> jabber-dep is needed or if punjab can be run standalone. If no jabber-ebuild
> is installed before this one the user/group would be missing.

Yes you are right! enewuser/enewgroup do no harm in that case, but new
net-im/jabber-base takes care of creating 'jabber' user and 'jabber' group. So
it is redundant to do it again. Your point is good -- we need that user as we
have '--uid=jabber --gid=jabber' in /etc/init.d/punjab;
Yes, we need xmpp/jabber server, therefore line:
RDEPEND="virtual/jabber-server"

Gustavo:

- This is from Christopher Zorn, author of punjab:
  > There are no other opensource projects (other than jwchat) that I am 
  > awareof that use punjab.
  I wrote an ebuild for it. It is here:
  http://bugs.gentoo.org/show_bug.cgi?id=71179
  So, to test this all, locally: emerge jabberd punjab jwchat;
  /etc/init.d/punjab start
  Then point your browser to: http://localhost:5280
  I put this all (jabberd2,punjab and jwchat) into production use at 
  http://im.akrep.be

- You made typos in your latest work:
  HTMLDIR="//var/spool/jabber/punjab/html" 
  +DEPEND="net-in/jabber-base

Ssl
Comment 13 David Danier 2005-09-03 17:56:22 UTC
Gustavo:
> Please see the info on bug 98452 for location of files and creation of users 
> (probably a good idea to do a less
> /usr/portage/net-im/jabber-base/jabber-base-0.00.ebuild to see that the user
> already is created.

Sorry I did not realize that the jabber-base-ebuild is ready, thought that is
some work-in-progress.

Slobodan: (hope thats your first name)
> Yes you are right! enewuser/enewgroup do no harm in that case, but new
> net-im/jabber-base takes care of creating 'jabber' user and 'jabber' group. So
> it is redundant to do it again. Your point is good -- we need that user as we
> have '--uid=jabber --gid=jabber' in /etc/init.d/punjab;

As noticed above: I dindn't realize that the jabber-base ebuild is ready. Sorry
for that.

> Yes, we need xmpp/jabber server, therefore line:
> RDEPEND="virtual/jabber-server"

I'm not sure about this. Afaik we need a jabber-server, BUT there is no need for
it to run on the same machine. We can set up one machine beeing the
jabber-server and another beeing the transport (or whatever).
So all jabber-server-deps would be nonsens for such setups.

Some note (to clear things about some transports depending on a jabber-server):
I know that some jabber-transports need an local server. But thats because they
are written as an plugin (or something like that) using the server-engine.
Anyway that doesn't change the way the transport is linked to the main-server:
It is a standalone-server that connects to the main-server using a special
protocol. So if the transport is not written this way it can be connected to any
server you want (if you know the secret etc.). I think all the pyXXX-t stuff is
a good example for this.

Correct me if I'm wrong.

Example:
punjab is an implementation for the HTTP Polling and Binding JEP. It gets the
serveradress from the client connecting to it (as always: afaik). So it could be
used to connect to jabber.org without running on jabber.org -> I don't need to
have a local jabber-server running.

But as we have splitted the user-creating-part and the server-part into to
different ebuilds thats no problem:
punjab only needs the jabber-base as a dep, not the server.

If you aggree with that I will change the ebuild to reflect this.

> I wrote an ebuild for it. It is here:
> http://bugs.gentoo.org/show_bug.cgi?id=71179

Nice to see somebody is using this ebuild here ;-)
Comment 14 Slobodan D. Sredojevic 2005-09-04 03:52:27 UTC
Gustavo: 
I have filled one [META] bug for changes that jabber-base introduces. It is
here: http://bugs.gentoo.org/show_bug.cgi?id=104779
Second is for documentation:
http://bugs.gentoo.org/show_bug.cgi?id=104780

I hope that is ok.
Ssl
Comment 15 Mark 2005-10-29 07:14:40 UTC
thanks for this ebuild :) Been looking for one for a while. All we need now is
an ebuild for JWChat
Comment 16 Slobodan D. Sredojevic 2005-10-29 07:25:03 UTC
Mark: this ebuild for punjab worked for me but keep in mind it is not finished
yet! The same situation is for jwchat ebuild I have posted, please look at
#71179 - you don't read bugzilla carefuly? ;)

David made interesting remark at comment #13, I asked author of punjub to
comment on that and he failed to respond -- it was 2 months ago. Sad. In other
news, punjab 0.8 is out.
Comment 17 Mark 2005-10-29 10:01:10 UTC
the diff patch has a small error in the dependes  

it should be net-im/jabber-base not net-in/jabber-base

thanks for the ebuild
Comment 18 Chris Carlin 2006-01-18 22:25:58 UTC
Is it just me or does this ebuild fail to copy stuff that it's supposed to copy? From the punjab website I get the impression that the html directory from the distribution should be copied to the installed html directory, but the html directory contains only a .keep file.
Comment 19 Mark 2006-01-27 00:16:30 UTC
any new ebuilds for 0.9?
Comment 20 David Danier 2006-01-27 07:55:34 UTC
The ebuild for 0.6 works with 0.9, too ;-)