Is there a '.spec' file available for phpMyFAQ?

In this board you can talk about general questions about phpMyFAQ

Moderator: Thorsten

christofurriebum
Posts: 1
Joined: Wed Jul 05, 2006 3:22 pm

Is there a '.spec' file available for phpMyFAQ?

Post by christofurriebum »

Hi All,

I would like to run phpMyFAQ on my CentOS server.

I can not find a CentOS or RHEL .rpm so I was going to install from source.

However, I'd really like to make a package, so that I can re-install in the minimum amount of time, should the CentOS server need replacing.

One of our developers has asked me if there is a '.spec' file.

I have no idea, have you?

Cheers,
--

ChrisP
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: Is there a '.spec' file available for phpMyFAQ?

Post by matteo »

christofurriebum wrote:One of our developers has asked me if there is a '.spec' file.
I have no idea, have you?
A .spec file is needed in order to build an RPM package, http://www.rpm.org/RPM-HOWTO/build.html: an RPM package is usually the natural way for mantaining RedHat (or free rebuilds like CentOS) distros.
For a pure web app like PMF (and many others) having an RPM is not a real benefit 'cause you need to perform some more operations interactively through a web browser: it only saves you from the manual unpackaging procedure.
I kindly suggest you to give your developers this documentation for investigating the way of installing and upgrading phpMyFAQ. I think they'll agree with me :wink:.
Do not hesitate to post here your developers feedback.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
steveh
Posts: 1
Joined: Wed Jul 05, 2006 4:27 pm

Re: Is there a '.spec' file available for phpMyFAQ?

Post by steveh »

Howdy,
I am that developer. I take your answer as "no" then?

RPM is used for many large organisations to deploy software consistently through the use of yum or apt. The other benefit is the ability to track versions & prerequisites.

Is there any intention of writing a spec file?
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: Is there a '.spec' file available for phpMyFAQ?

Post by matteo »

Hi,
steveh wrote:Howdy,
I am that developer. I take your answer as "no" then?
Yes, we have no .spec file at the moment.
steveh wrote:RPM is used for many large organisations to deploy software consistently through the use of yum or apt. The other benefit is the ability to track versions & prerequisites.
I daily use yum and up2date for several servers, too. To tell the truth, we never evaluated, before now, the need of an RPM for deploying phpMyFAQ. You're the first requesting for this feature.
steveh wrote:Is there any intention of writing a spec file?
In these days we're working on the alpha release of PMF 2.0.0. Give me some days and I'll return back with a feedback about an ETA for a working .spec file.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

RPM Spec file skeleton ready

Post by matteo »

Hi,
here is an update: I've coded a simple* spec file for phpMyFAQ. I'll commit it into CVS after some testing and improvements.
Expect it within the next week.

Ciao,
Matteo

--
*Here is the first coded steps:
  • install PMF into /var/www/html/phpmyfaq-<version>
  • link the current install to '/var/www/html/phpmyfaq': the use of a symbolic link will give the user an easy way of recovering the old install and/or preserve old versions (this is my preferred schema for every web app)
  • return telling the user the URL for the installer or the update stage according to the RPM info (first install, 2nd install+ -> update)
The first release will also include:
  • preserve the template folder (rename it into 'template.YYYYMMDDHHmmss') when updating
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Post by matteo »

Hi,
from now the spec file is commited into CVS, branch PMF_1_6 (and later into the HEAD) :D.
It has been suceesfully tested on:
  • RedHat 7.3
  • CentOS 4.3
You can easily take it from the next nightly built snapshot.: it is self commented.
For any questions, feel free of post it here.

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

SuSE

Post by jazcyk »

@matteo

any idea if it will work on SuSE?

I have a SuSE 10 running, and I can test or you can have access.
But I will need some guidance as I never built RPM's myself before!
Thorsten
Posts: 15769
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: SuSE

Post by Thorsten »

Hi,
jazcyk wrote:I have a SuSE 10 running, and I can test or you can have access.
But I will need some guidance as I never built RPM's myself before!
the procedure is described in the .spec file. It should work with SuSE 10.0, too.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

OK

Post by jazcyk »

I'll give it a try one of the days!
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

but where

Post by jazcyk »

I just downloaded both version and do not seem to find any .spec file.
Will I have to wait till tomorrow, or is there something that I do not understand?
chrisp
Posts: 5
Joined: Fri Apr 28, 2006 5:16 pm
Location: Bristol, England
Contact:

jazcyk: it's in CVS

Post by chrisp »

Go to: http://phpmyfaq.de/download.php

Then grab a copy by following the instructions in the 'Anonymous CVS Access' section.
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

but ...

Post by jazcyk »

I do not have a clew about this.

What is the client software that I am supporsed to use here?!
Thorsten
Posts: 15769
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Post by Thorsten »

Hi,

or you can download it today because the new snapshot was built tonight.

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
matteo
Posts: 572
Joined: Sun Nov 20, 2005 6:53 pm
Location: Italy

Re: SuSE

Post by matteo »

Hi,
jazcyk wrote:@matteo

any idea if it will work on SuSE?

I have a SuSE 10 running, and I can test or you can have access.
But I will need some guidance as I never built RPM's myself before!
Short answer: see Thorsten's one :)
Long answer: a spec file takes generally care of:
  1. defining the correct requirements for the package: since some years this info is also used by some worderful commands (up2date, yum, apt, ...) for searching in predeclared repos for solving the dependencies chain automagically
  2. building the binaries according to the architecture (i386, i486, ..., i686, ..., noarch <- neutral)
  3. deploying them
Let's see how this check list fits into the phpMyFAQ spec file:
  1. Basically the requirements are:
    • Apache
    • PHP
    • A Database among those listed in the PMF docs
    I made an hypothesis: a LAMP server so the RPM will require MySQL
  2. phpMyFAQ is a PHP web app: no build from source required. We could pre-build them for using a particular accelerator but this is a strong requirement not useful for a general purpose RPM.
  3. I've choosen my favorite schema for deploying and mantaining web apps
Said this, I expect that the whole of the RedHat distro in production (RH7.3, RH8.0, RH9.0, FC1-5, RHEL 2.1, RHEL 3.x, RHEL 4.x) will work. For the other RPM based distro find below a list of possible issues:
  1. Missing of some package requirements or different naming convention for the same package: this is not big issue but just a tuning of the SPEC file. Besides, it is not a blocking issue because you can use the flag --nodeps E.g.: if you're using PHP packages other than the RH ones for RH 7.3 you'll find that they correctly packaged PHP with the RH7.3 package convention, different from the current convention of splitting GD bundled support (4.3.0+) into a small package, php-gd.
    According to the posted issue I'll try to fix them into the spec files avoiding the use of --nodeps
    Note: if you want ot use a DB server different from MySQL you are obliged to use the --nodeps flag
  2. No issue at all
  3. No issue regarding the different distro 'cause the current deployment schema do not setup a DB and make changes to your httpd.conf: just only files movements
Building an phpMyFAQ RPM is quite easy IF you change the naming of the tar.gz and the naming of the main folder. So you need to repackage your PMF compressed source file from:

Code: Select all

phpmyfaq.<version>.full.tar.gz
to:

Code: Select all

phpmyfaq-<version>.full.tar.gz
and the root folder from:

Code: Select all

phpmyfaq.<version>
to:

Code: Select all

phpmyfaq-<version>
This naming convention will be used starting from PMF 1.6.3.
That's all :wink:

Ciao,
Matteo
phpMyFAQ QA / Developer
Amazon.co.uk Wishlist
jazcyk
Posts: 385
Joined: Wed Sep 07, 2005 1:32 pm

but ...

Post by jazcyk »

I do not think you realize how ignorant I am on this!
But thanks for the extensive answer anyway.

"Building an phpMyFAQ RPM is quite easy ..."
Playing music in 13/16 is easy too. Once you know how to do it it easy. If you do not know it is impossible!

Now once I get repacked the archive I will need some program to build the RPM. Now as a SuSE user I use YaST2 to handle RPM installs (just a single mouseclick from KDE!) so any shell-type operation with that sort of files is completely more far away the moon (almost as far away as Italy!) to me :shock:

I think KDE has a graphical RPM-builder. Will it work?

And I still did not find the .spec file (whatever it is!)
Post Reply