Re: [campsite-dev] Xinha integration: perl dependencies on Aspell and Mason
  • Hi Paul

    Yes that's right. It's quite clever actually. RPM can find perl, python
    and tcl dependencies automatically.

    The file /usr/lib/rpm/perl.req does the scanning for dependencies.

    If Xinha can function satisfactorily without Aspell, for example if the
    file in question is only used if a configuration option is set, etc,
    then this include should be option in the way I mentioned, like this:

    eval { use Text::Aspell } or die $@;

    If the 'use' statement is entered in this way then RPM is clever enough
    to realise that this is not a REQUIREMENT for the software being
    packaged, but some kind of OPTIONAL thing, so it doesn't make it a
    requirement for the RPM.

    BTW unfortunately RPM can't track PHP dependencies. It would be nice if
    RPMs for PEAR, ADODB, Smarty, etc, were available. I don't think such a
    thing is inconceivable, so maybe someone will do it before long. Are
    there DEB packages for these?

    Part of building an RPM is the process of patching the original source
    distribution. Usually this would just require a few tweaks in the 'make
    install' process but in the case of Campsite there are a lot of files
    containing configuration options, and a lot of scripts which are
    dynamically generated, so it's not just a case of copying files from the
    'build' tree into the root filesystem. I have to work out the minimal
    amount of patching that allows a stable Campsite RPM to be built -- too
    much patching at the RPM 'spec' will be unmaintainable as new Campsite
    versions emerge.

    I'm pretty close now though to a working RPM. Stay tuned!

    JP

    Paul Baranowski wrote:

    >Hi John-
    >"Text::Aspell" is still in Xinha. Can you explain this RPM process a
    >bit more? Does it autmatically scan your files looking for
    >dependencies? Thats what it sounds like...
    >- Paul
    >
    >
    >John Pye wrote:
    >
    >
    >>Hi Paul and everyone
    >>
    >>I've been working on an RPM installation of Campsite 2.2.2 just now and
    >>one of the issues I has was that there are dependencies in HTMLAREA on
    >>Text::Aspell and HTML::Mason. Can I suggest that you check whether Xinha
    >>has this same dependencies, and if so, edit the Xinha files such that
    >>instead of
    >>
    >>"use Text::Aspell;" you use something like "eval { use Text::Aspell } or
    >>die $@;"
    >>
    >>See /usr/lib/rpm/perl.req on your RPM machine for info on this. This
    >>will instead cause an error message (you can make the error handling
    >>more elaborate of course) when the perl module is required. It has the
    >>benefit of making RPM think that this is an *optional* requirement in
    >>the campsite code. A resulting RPM can then be built which doesn't
    >>require these Perl components to be installed.
    >>
    >>I wouldn't be bothered by this except for the fact that when I tried
    >>"cpan install Text::Aspell" I got a whole stack of errors... for some
    >>reason it's not installing on my machine. (An issue which I'll take up
    >>elsewhere). So clearly anyone who tries to /fulfil /this requirement is
    >>also going to have problems.-
    >>
    >>The HTMLAREA dependency on Mason seems to be completely pointless. It's
    >>used by a file in the HTMLAREA distro which is used to package the
    >>source code for redistribution. So I suggest you remove the script which
    >>has that requirement.
    >>
    >>Hopefully having sorted out the issues with an RPM install for Campsite
    >>2.2.2 it should be a simple enough job to go for 2.3 when that is ready
    >>to go.
    >>
    >>JP
    >>
    >>
    >>
    >>
    >
    >
    >
    >

    ------------------------------------------
    Posted to Phorum via PhorumMail
  • 2 Comments sorted by
  • --- John Pye wrote:
    > BTW unfortunately RPM can't track PHP dependencies. It would be nice if
    > RPMs for PEAR, ADODB, Smarty, etc, were available. I don't think such a
    > thing is inconceivable, so maybe someone will do it before long. Are
    > there DEB packages for these?
    In Ubuntu there is only the PEAR deb package; I guess all needed sub-packages
    have to be installed manually.

    > Part of building an RPM is the process of patching the original source
    > distribution. Usually this would just require a few tweaks in the 'make
    > install' process but in the case of Campsite there are a lot of files
    > containing configuration options, and a lot of scripts which are
    > dynamically generated,
    Actually not so many, there are 3 files you care about that are dynamically
    generated:
    .install_conf/campsite_config
    .install_conf/campsite_version.php
    .install_conf/configure.h

    The forth one: make.env you don't care about and it's used for compilation, it
    is not copied to the install directories.

    As for install_conf.php you have to set the values to your defaults, run
    ./configure and compile campsite.

    Mugur

    > so it's not just a case of copying files from the
    > 'build' tree into the root filesystem. I have to work out the minimal
    > amount of patching that allows a stable Campsite RPM to be built -- too
    > much patching at the RPM 'spec' will be unmaintainable as new Campsite
    > versions emerge.
    >
    > I'm pretty close now though to a working RPM. Stay tuned!
    >
    > JP
    >
    > Paul Baranowski wrote:
    >
    > >Hi John-
    > >"Text::Aspell" is still in Xinha. Can you explain this RPM process a
    > >bit more? Does it autmatically scan your files looking for
    > >dependencies? Thats what it sounds like...
    > >- Paul
    > >
    > >
    > >John Pye wrote:
    > >
    > >
    > >>Hi Paul and everyone
    > >>
    > >>I've been working on an RPM installation of Campsite 2.2.2 just now and
    > >>one of the issues I has was that there are dependencies in HTMLAREA on
    > >>Text::Aspell and HTML::Mason. Can I suggest that you check whether Xinha
    > >>has this same dependencies, and if so, edit the Xinha files such that
    > >>instead of
    > >>
    > >>"use Text::Aspell;" you use something like "eval { use Text::Aspell } or
    > >>die $@;"
    > >>
    > >>See /usr/lib/rpm/perl.req on your RPM machine for info on this. This
    > >>will instead cause an error message (you can make the error handling
    > >>more elaborate of course) when the perl module is required. It has the
    > >>benefit of making RPM think that this is an *optional* requirement in
    > >>the campsite code. A resulting RPM can then be built which doesn't
    > >>require these Perl components to be installed.
    > >>
    > >>I wouldn't be bothered by this except for the fact that when I tried
    > >>"cpan install Text::Aspell" I got a whole stack of errors... for some
    > >>reason it's not installing on my machine. (An issue which I'll take up
    > >>elsewhere). So clearly anyone who tries to /fulfil /this requirement is
    > >>also going to have problems.-
    > >>
    > >>The HTMLAREA dependency on Mason seems to be completely pointless. It's
    > >>used by a file in the HTMLAREA distro which is used to package the
    > >>source code for redistribution. So I suggest you remove the script which
    > >>has that requirement.
    > >>
    > >>Hopefully having sorted out the issues with an RPM install for Campsite
    > >>2.2.2 it should be a simple enough job to go for 2.3 when that is ready
    > >>to go.
    > >>
    > >>JP
    > >>
    > >>
    > >>
    > >>
    > >
    > >
    > >
    > >
    >


    __________________________________________________
    Do You Yahoo!?
    Tired of spam? Yahoo! Mail has the best spam protection around
    http://mail.yahoo.com

    ------------------------------------------
    Posted to Phorum via PhorumMail
  • Hi all,

    The difficult this is that ./configure is not able to distinguish
    between the directory '/' and the build root, $RPM_BUILD_ROOT.
    RPM needs all installed files to be put in $RPM_BUILD_ROOT (eg
    /var/tmp/campsite-root) while the build is occurring.
    But obviously any configuration files that are being installed under
    that directory need to refer to the /final installed file locations/.

    This distinction required me to make a lot of changes to the 'install'
    sections of all the makefiles, eg $(BINDIR) becomes $(ROOT)$(BINDIR),
    plus some of the shell scripts.

    There might be a better way, but that's what I came up with so far. My
    patches shouldn't break installation in the non-RPM case, so perhaps
    they can be integrated later on.

    JP

    Mugur Rus wrote:

    >--- John Pye wrote:
    >
    >
    >>BTW unfortunately RPM can't track PHP dependencies. It would be nice if
    >>RPMs for PEAR, ADODB, Smarty, etc, were available. I don't think such a
    >>thing is inconceivable, so maybe someone will do it before long. Are
    >>there DEB packages for these?
    >>
    >>
    >In Ubuntu there is only the PEAR deb package; I guess all needed sub-packages
    >have to be installed manually.
    >
    >
    >
    >>Part of building an RPM is the process of patching the original source
    >>distribution. Usually this would just require a few tweaks in the 'make
    >>install' process but in the case of Campsite there are a lot of files
    >>containing configuration options, and a lot of scripts which are
    >>dynamically generated,
    >>
    >>
    >Actually not so many, there are 3 files you care about that are dynamically
    >generated:
    >.install_conf/campsite_config
    >.install_conf/campsite_version.php
    >.install_conf/configure.h
    >
    >The forth one: make.env you don't care about and it's used for compilation, it
    >is not copied to the install directories.
    >
    >As for install_conf.php you have to set the values to your defaults, run
    >./configure and compile campsite.
    >
    >Mugur
    >
    >
    >
    >
    >

    ------------------------------------------
    Posted to Phorum via PhorumMail