Deb package

Discussion in 'Development General' started by Fantu, Dec 23, 2012.

  1. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    disable it. Anyway I use a modified version with improvements. (qtwebsocket)
     
  2. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    disabling relaystation and webserver plugin build successfull now I start to create server packages, server need also -data package?
     
  3. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Yes, data and libraries
     
  4. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    I not found where change QDir::setcurrent in server, can you tell me where I can put it on server code?

    There are also some spelling error on code, no problem with package but probably is good solve it:

    Server application name on src/Server/main.cpp on line 56:
    QCoreApplication::setApplicationName("Server for Pokeymon-Online");

    And others found by lintian:
    I: libpo-battlemanager1: spelling-error-in-binary usr/lib/libpo-battlemanager.so.1.0.0 Extracter Extractor
    I: pokemon-online-server: spelling-error-in-binary usr/games/Pokemon-Online-Server seperated separated
    I: pokemon-online-server: spelling-error-in-binary usr/games/Pokemon-Online-Server functionnality functionality
     
    Last edited: Jan 13, 2013
  5. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    after void Server::start() in server.cpp (around line 80)
     
  6. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Actually, I added static QString dbRepo = "./db" in server.cpp. You can change it to the correct one.

    I did that because there are other files, like config, tiers.xml and scripts.js which are file the server generates. I don't know if it should be in the same dir as the data files, but anyway you can change the current dir to what's appropriate at the beginning of main (around line 46) in main.cpp.

    That way you can have the database and the server-generated files at two different places.
     
    Last edited: Jan 13, 2013
  7. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    Changed currentdir on main.cpp, applied your patch about db but gave segmentation error on start, after modified the patch with full path and start but gave segmentation error on close.
    Probably there are other path to change

    edit:
    probably found the problem, is for the files that create on dir where is launched binary, now I'll try to set it to home subdirectory

    edit2:
    tried with:
    QDir::setCurrent( QDir::homePath() + "/.po-server/" );
    seem not work and create logs, config and db into current directory
     
    Last edited: Jan 13, 2013
  8. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Try :

    Code (text):
    1. QDir d(QDir::homePath());
    2. d.mkdir(".po-server");
    3. QDir::setCurrent( QDir::homePath() + "/.po-server/" );
    [secret]coyotte508@coyotte508-VirtualBox:~/code/pkg-pokemononline$ debuild -i -b -us -uc
    dpkg-buildpackage -rfakeroot -D -us -uc -i -b
    dpkg-buildpackage: source package pokemon-online
    dpkg-buildpackage: source version 2.0.1-1
    dpkg-buildpackage: source changed by Fabio Fantoni <fantonifabio@tiscali.it>
    dpkg-source -i --before-build pkg-pokemononline
    dpkg-buildpackage: host architecture amd64
    dpkg-source: info: applying fix_data_dir.diff
    dpkg-source: info: applying fix_smogon_plugin.diff
    dpkg-source: error: LC_ALL=C patch -t -F 0 -N -p1 -u -V never -g0 -E -b -B .pc/fix_smogon_plugin.diff/ --reject-file=- < pkg-pokemononline/debian/patches/fix_smogon_plugin.diff gave error exit status 1
    patching file src/SmogonPlugin/teambuildersmogonplugin.cpp
    Reversed (or previously applied) patch detected! Skipping patch.
    2 out of 2 hunks ignored
    dpkg-source: info: fuzz is not allowed when applying patches
    dpkg-source: info: if patch 'fix_smogon_plugin.diff' is correctly applied by quilt, use 'quilt refresh' to update it
    dpkg-buildpackage: error: dpkg-source -i --before-build pkg-pokemononline gave error exit status 2
    debuild: fatal error at line 1357:
    dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
    [/secret]
     
    Last edited: Jan 14, 2013
  9. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    This evening I'll try, package is based on 2.0.1, the error is probably because you use source of git after the version
    The patches for have server working is not complete and I haven't upload it, only client and its plugins is working and ready for test now.
    About homepath I have create path before test.
    Can be problem of this command not correct?
    QDir::setCurrent( QDir::homePath() + "/.po-server/" );
    Tried also to insert also on src/Server/main.cpp on start of main function
     
  10. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    The problem i think is because the repository doesn't already exist (that's why i use mkdir in the code of my previous post)

    Edit:
    Code (text):
    1. coyotte508@coyotte508-VirtualBox:~/code/pkg-pokemononline$ debuild -i -b -us -uc
    2.  dpkg-buildpackage -rfakeroot -D -us -uc -i -b
    3. dpkg-buildpackage: source package pokemon-online
    4. dpkg-buildpackage: source version 2.0.1-1
    5. dpkg-buildpackage: source changed by Fabio Fantoni <fantonifabio@tiscali.it>
    6.  dpkg-source -i --before-build pkg-pokemononline
    7. dpkg-buildpackage: host architecture amd64
    8.  fakeroot debian/rules clean
    9. test -x debian/rules
    10. dh_testroot
    11. rm -f debian/stamp-makefile-build debian/stamp-makefile-install
    12. /usr/bin/make  -C .  -k distclean
    13. make[1]: Entering directory `/home/coyotte508/code/pkg-pokemononline'
    14. make[1]: *** No rule to make target `distclean'.
    15. make[1]: Leaving directory `/home/coyotte508/code/pkg-pokemononline'
    16. make: [makefile-clean] Error 2 (ignored)
    17. dh_clean
    18. /usr/bin/make -f debian/rules reverse-config
    19. make[1]: Entering directory `/home/coyotte508/code/pkg-pokemononline'
    20. make[1]: Nothing to be done for `reverse-config'.
    21. make[1]: Leaving directory `/home/coyotte508/code/pkg-pokemononline'
    22. if [ -d "." ]; then \
    23.       cd . && QUILT_PATCHES=/home/coyotte508/code/pkg-pokemononline/debian/patches quilt --quiltrc /dev/null pop -a -R || test $? = 2 ; \
    24.     fi
    25. Removing patch disable_qtwebsocket.diff
    26. Restoring PokemonOnline.pro
    27.  
    28. Removing patch fix_smogon_plugin.diff
    29. Restoring src/SmogonPlugin/teambuildersmogonplugin.cpp
    30.  
    31. Patch fix_data_dir.diff does not remove cleanly (refresh it or enforce with -f)
    32. make: *** [reverse-patches] Error 1
    33. dpkg-buildpackage: error: fakeroot debian/rules clean gave error exit status 2
    34. debuild: fatal error at line 1357:
    35.  
     
  11. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    follow the instruction of first post, I copy here:
    Now client is working and ready for test
    Basing on the dipendencies the test build is possible on Debian >= 7 (Wheezy now on testing but near to stable) and Ubuntu >= 12.04 LTS and all derivates with repository based on these.
    Procedure for test deb build is:
    - download 2.0.1 source https://github.com/po-devs/pokemon-online/archive/2.0.01.tar.gz
    - extract it and open terminal into extracted directory
    - take debian folder from https://github.com/Fantu/pkg-pokemononline and put into extracted directory
    - install all build dependencies:
    sudo apt-get install cdbs dpkg-dev debhelper quilt qt4-qmake libqt4-dev libzip-dev libphonon-dev libqt4-opengl-dev g++ libqrencode-dev
    - launch packages creation with:
    debuild -i -b -us -uc

    edit:
    retried change of path following you post but not work, I have done commit of actual patches
    if you need modify/add patches fast and easy on deb package follow this:
    http://wiki.debian.org/UsingQuilt
     
    Last edited: Jan 14, 2013
  12. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    I still got this:

    Code (text):
    1. Patch fix_data_dir.diff does not remove cleanly (refresh it or enforce with -f
    Sorry! (I did follow all steps)

    Can you upload the amd64 packages? (client & client plugins & data & libs). Is there a way to make it so users have to download only one package to install all those four packages? I'll look into the server problem.
     
  13. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
  14. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    Thanks, this evening I'll try, instruction for build need to be improved?
     
  15. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    I have applied your patches and done commit.
    PO_HOME_DIR not work, server on start create directory "~" on current directory (where launch binary)
     
  16. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    I added also server plugins packages, now remain PO_HOME_DIR not working before have server full ready for test
     
  17. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    No one knows how to get this working PO_HOME_DIR?
    Recently I'm busy in other open source software but if I see answers here, new releases or important fixes in git, I'll resume the development of these packages.
     
  18. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Well, i don't know, and i don't have a linux computer to do stuff at the moment.

    Is it really necessary to have the server package for now?
     
  19. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    I do not know this software in particular but many others having the server on linux makes big difference.
    For example in 2005 when I went with the first webserver from windows to linux on same hardware the difference was significant, with some big script was also several times more efficient.
    Here the big problem is only the configuration files to store on user home not working, probably fast thing to solve for how know the code and language.
    I unfortunately do not have sufficient knowledge and the time available at the moment I'm using it on urgent things for other open source projects.
    I will continue with packages with news and/or new version.
     
    Last edited: Mar 8, 2013
  20. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    https://github.com/po-devs/pokemon-online/commit/e2a6ff9e

    Fixed the problem! The problem was that Qt doesn't recognize ~ as home folder... Now it writes configuration files at the right place.

    Anyway, next version is coming soon. (Do I need to do anything else for you to be able to test this?)

    Also, QR Code plugin is back in (at least for other versions), since android app is making a comeback.
     
    Last edited: Apr 25, 2013
  21. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    I have updated with new version and updated the instruction to the testing build on first post.
    Client and server seem working but I only started them.
    Can someone test them more carefully and report please?
     
  22. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Thanks!

    Can you upload a debian package so I can give it to users to test?
     
  23. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    The best is build them on the systems when you want test, there are many versions, derivates (with differents prerequisite libraries versions) and architectures.
    I think that the packages need to be tested, improved and after uploaded on official debian repository.
     
  24. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    Updated to 2.0.22, nobody had tested the packages?
     
  25. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    i'm going to test it today
     
  26. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    dh_makeshlibs -plibpo-pokemoninfo1
    dpkg-gensymbols: avertissement: certains nouveaux symboles sont apparus dans le fichier des symboles*:*Veuillez consulter le fichier de différences ci-dessous
    dpkg-gensymbols: avertissement: certains symboles ou motifs ont disparu du fichier des symboles*:*Veuillez consulter le fichier de différences ci-dessous
    dpkg-gensymbols: avertissement: debian/libpo-pokemoninfo1/DEBIAN/symbols ne correspond pas complètement à debian/libpo-pokemoninfo1.symbols
    Code (diff):
    1. --- debian/libpo-pokemoninfo1.symbols (libpo-pokemoninfo1_2.0.22-1_i386)
    2. +++ dpkg-gensymbolsNS6EIa   2013-05-04 22:32:26.674524126 +0200
    3. @@ -810,7 +810,7 @@
    4.   _ZNK5QHashIi7QStringE6valuesEv@Base 2.0.22
    5.   _ZNK5QListI7QStringE7indexOfERKS0_i@Base 2.0.22
    6.   _ZNK5QListIiE7indexOfERKii@Base 2.0.22
    7. - _ZNK5QListIiE8containsERKi@Base 2.0.22
    8. +#MISSING: 2.0.22-1# _ZNK5QListIiE8containsERKi@Base 2.0.22
    9.   _ZNK7Pokemon8uniqueId6toLineERK7QString@Base 2.0.22
    10.   _ZNK7Pokemon8uniqueId8toStringEv@Base 2.0.22
    11.   _ZNK7Pokemon8uniqueId9toPokeRefEv@Base 2.0.22
    12. @@ -844,8 +844,10 @@
    13.   _ZTV17ShallowBattlePoke@Base 2.0.22
    14.   _ZTV8PokeTeam@Base 2.0.22
    15.   _ZTV9TeamSaver@Base 2.0.22
    16. - _ZTv0_n24_N8PokeTeamD0Ev@Base 2.0.22
    17. - _ZTv0_n24_N8PokeTeamD1Ev@Base 2.0.22
    18. + _ZTv0_n12_N8PokeTeamD0Ev@Base 2.0.22-1
    19. + _ZTv0_n12_N8PokeTeamD1Ev@Base 2.0.22-1
    20. +#MISSING: 2.0.22-1# _ZTv0_n24_N8PokeTeamD0Ev@Base 2.0.22
    21. +#MISSING: 2.0.22-1# _ZTv0_n24_N8PokeTeamD1Ev@Base 2.0.22
    22.   _ZlsR10DataStreamRK10BattleMove@Base 2.0.22
    23.   _ZlsR10DataStreamRK10PlayerInfo@Base 2.0.22
    24.   _ZlsR10DataStreamRK10PokeBattle@Base 2.0.22
    dh_makeshlibs: dpkg-gensymbols -plibpo-pokemoninfo1 -Idebian/libpo-pokemoninfo1.symbols -Pdebian/libpo-pokemoninfo1 -edebian/libpo-pokemoninfo1/usr/lib/libpo-pokemoninfo.so.1.0.0
    returned exit code 1
    make: *** [binary-fixup/libpo-pokemoninfo1] Erreur 1
    dpkg-buildpackage: erreur: fakeroot debian/rules binary a produit une erreur de sortie de type 2
    debuild: fatal error at line 1350:
    dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed

    Apparently the generated symbols and the symbols in DEBIAN/pokemoninfo don't match. (everything is fresh, done as said in the OP)
     
  27. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
  28. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    No I followed the OP exactly:

    - I downloaded the archive and extracted it
    - I cloned the pkg-pokemononline into a new repo
    - moved the debian folder in the source extracted folder
    - ran the debian command

    I in no way used any preexisting source.

    Maybe we have different compiler settings and that's why. I'll try again later but I expect the same result.
     
  29. Fantu

    Fantu Member

    Joined:
    Dec 23, 2012
    Messages:
    36
    Likes Received:
    0
    I had rebuild now the 2.0.22 clean on ubuntu 12.04 and works, based on your log you have used previous version because some symbols are missed.
     
  30. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    But I did do as in the OP (downloading source from scratch), and even then PokemonInfo hasn't changed since last version...

    Anyway I'll try again.
     
  31. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Maybe it would be better to put everything in one package. I don't see any other program needing po's libraries, and the install is simpler that way. And the problems we have at the moment would be no more.