Trying to learn how to package a software - Debian

This is a discussion on Trying to learn how to package a software - Debian ; Hi, all. I'm trying to learn how to package a software. I'm using Pivot ( http://www.pivotlog.net/ ) as a case study. It is written in PHP (maybe a bad choice for me because i'm not a PHP programmer) and it ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Trying to learn how to package a software

  1. Trying to learn how to package a software

    Hi, all.
    I'm trying to learn how to package a software.
    I'm using Pivot (http://www.pivotlog.net/) as a case study.
    It is written in PHP (maybe a bad choice for me because
    i'm not a PHP programmer) and it has a subdirectory named db
    where it stores some data. The relevant part is:

    |-- pivot
    | |-- db
    | | |-- refkeys
    | | |-- rsscache
    | | |-- search
    | | |-- standard-00000
    | | |-- tagdata
    | | |-- tbkeys
    | | `-- users

    I tried to put db in /var/cache/pivot-weblog/db/ and the
    rest of the directories in /usr/share/pivot-weblog/. However,
    there are some scripts in the pivot directory that manage the
    information stored in db and refer to files inside it using
    relative paths. For exaple, from pv_core.php:
    if (file_exists("db/ser_lasttrack.php"))
    I'd like knowing if there is a way to make pv_core.php
    access the directory /var/cache/pivot-weblog/db/ without
    writing the full path in the source code. Any suggestion?
    Thanks in advance.


    Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento!
    http://br.mail.yahoo.com/


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  2. Re: Trying to learn how to package a software

    On Tue, Nov 13, 2007 at 09:18:08PM -0300, Jean Silva wrote:
    > I tried to put db in /var/cache/pivot-weblog/db/ and the
    > rest of the directories in /usr/share/pivot-weblog/. However,
    > there are some scripts in the pivot directory that manage the
    > information stored in db and refer to files inside it using
    > relative paths. For exaple, from pv_core.php:
    > if (file_exists("db/ser_lasttrack.php"))
    > I'd like knowing if there is a way to make pv_core.php
    > access the directory /var/cache/pivot-weblog/db/ without
    > writing the full path in the source code. Any suggestion?
    > Thanks in advance.
    >

    One way is a symlink: /usr/share/pivot-weblog/db ->
    /var/cache/pivot-weblog/db/

    Regards,

    -Roberto

    --
    Roberto C. Sánchez
    http://people.connexer.com/~roberto
    http://www.connexer.com

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQFHOj+E5SXWIKfIlGQRAuwwAJ9r3RW07ETbqLb4xwg9Wl qn2wFc3ACgkLRp
    WxLjgttXb5NdFvuISHdEgH0=
    =pVNI
    -----END PGP SIGNATURE-----


  3. Re: Trying to learn how to package a software


    --- Roberto C. Sánchez escreveu:

    > On Tue, Nov 13, 2007 at 09:18:08PM -0300, Jean Silva wrote:
    > > I tried to put db in /var/cache/pivot-weblog/db/ and the
    > > rest of the directories in /usr/share/pivot-weblog/. However,
    > > there are some scripts in the pivot directory that manage the
    > > information stored in db and refer to files inside it using
    > > relative paths. For exaple, from pv_core.php:
    > > if (file_exists("db/ser_lasttrack.php"))
    > > I'd like knowing if there is a way to make pv_core.php
    > > access the directory /var/cache/pivot-weblog/db/ without
    > > writing the full path in the source code. Any suggestion?
    > > Thanks in advance.
    > >

    > One way is a symlink: /usr/share/pivot-weblog/db ->
    > /var/cache/pivot-weblog/db/


    Thanks, Roberto. I'll try it.
    Regards,
    Jean.



    Abra sua conta no Yahoo! Mail, o único sem limite de espaço para armazenamento!
    http://br.mail.yahoo.com/


    --
    To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

  4. Re: Trying to learn how to package a software

    Hi,

    Le mardi 13 novembre 2007 à 21:18 -0300, Jean Silva a écrit :
    > It is written in PHP (maybe a bad choice for me because
    > i'm not a PHP programmer)


    Well this is a bad choice regardless of that.

    > and it has a subdirectory named db
    > where it stores some data.


    > I tried to put db in /var/cache/pivot-weblog/db/ and the
    > rest of the directories in /usr/share/pivot-weblog/.


    Beware that the data /var/cache is, as the name says, *cache* data. If
    it is missing, the software must be able to regenerate it. If it isn't,
    you must use /var/lib/$software.

    Cheers,
    --
    .''`.
    : :' : We are debian.org. Lower your prices, surrender your code.
    `. `' We will add your hardware and software distinctiveness to
    `- our own. Resistance is futile.

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.6 (GNU/Linux)

    iD8DBQBHOrhvrSla4ddfhTMRAmYOAKC0PiWPz2vmwJhqvK4hL4 eAhgWkFwCg8OwF
    Z73IN58PxpedTx/bnbiCMGQ=
    =CnnX
    -----END PGP SIGNATURE-----


+ Reply to Thread