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.
Created attachment 62989 [details] punjab-0.6.ebuild
Created attachment 62990 [details] files/punjab.conf
Created attachment 62991 [details] files/punjab.initd
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....
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
> 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.
Created attachment 67548 [details] punjab-0.6.ebuild
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.
Created attachment 67588 [details] punjab-0.6.ebuild
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 :)
Created attachment 67591 [details, diff] punjab-0.6.ebuild.diff Better dependencies.
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
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 ;-)
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
thanks for this ebuild :) Been looking for one for a while. All we need now is an ebuild for JWChat
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.
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
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.
any new ebuilds for 0.9?
The ebuild for 0.6 works with 0.9, too ;-)