Solved

Slackware10 package rebuild

Posted on 2006-06-21
4
257 Views
Last Modified: 2013-12-16
I'm running Slackware10 on 4 servers, and up until now the standard pkg releases have been fine. But I'm needing to enable curl in php and needless to say I'm having a difficult time finding out what I'm doing wrong in rebuilding the php module.

I've downloaded the *patched* source file(s) to php and pine (a requirement evedentully) into a unique directory. (tar'd)

modified php.Slackbuild to enable curl (--with-curl=/usr \)
and ran sh php.Slackbuild

Files and folders are created in /tmp but when compared to the standard php pkg they're light (missing allot of files)

I'm sure I'm messing up somewhere, but can't figure out what's wrong.

I'm looking to see if anybody has a "easy to follow" tuturial on doing this including steps and required files.

Many thanks in advance
0
Comment
Question by:kenfcamp
  • 2
4 Comments
 
LVL 13

Author Comment

by:kenfcamp
ID: 16957392
I got it

0
 
LVL 3

Expert Comment

by:bryanlloydharris
ID: 16957865
Can you tell what the solution was?
0
 
LVL 13

Accepted Solution

by:
kenfcamp earned 0 total points
ID: 16960535
I was working on that ;)

Rebuilding Slackware10 Packages
For what ever reason this subject has no useful how-to's so I figured I'd share one.

These steps are for rebuilding the Slackware10 php package to include curl, however the methods will (should) work with any package.


Step1: Create a directory to store your build files
This directory can be anywhere and named anything. For this howto the directory will be /tmp/builds
"mkdir /tmp/builds"

Step2: Create your package directory
"mkdir /tmp/builds/php"

Step3: go to http://www.slackware.com/getslack/ and select your country and download location

Step4: Select Slackware10.0/patches/source/php
"Using the patch sources will ensure you utilized sources containing current security fixes"

Download all the files into "/tmp/builds/php". If there are additional directories you will need to create those directories and download the contents into the appropriate locations. At the time of writing this, there was a pear directory so you would run "mkdir /tmp/builds/php/pear/" and download the contents of the pear directory into that location.

The PHP package also requires the Pine package to compile
Create a pine directory outside of the php directory "mkdir /tmp/builds/pine"
Select "Slackware10/patches/source/pine" and download the contents into your newly created pine directory.

Step5: build the dependency packages (pine)
as root (su) enter /tmp/builds/pine and run sh pine.SlackBuild.
You will see file listing scroll past. You will or should also see compile statements scroll pass this is a good thing. When done you are ready for the next step.

However if you get an error run "sh pine.SlackBuild 2>&1 | tee build.out". This will dump the output of the build process into a file. Review the file for errors. These errors should give you a hint as to what the problem is and how to fix them.

Step6: build the php package.
As root enter /tmp/builds/php
open php.SlackBuild in your text editor of choice.
locate the following lines (13 - 14)

VERSION=4.3.11
PINE=4.64

***IMPORTANT***
It is very important that the "VERSION" number is the same as the php source file "php-4.3.11.tar.bz2"
It is very important that the "PINE" version is the same as the source pine file "ls ../pine" "pine4.64.tar.bz2"
"IF" they are not, change "VERSION" and or "PINE" to reflect the proper version numbers.

Scroll down a little further and you will see ;

  --with-zlib=/usr
  # --with-mod_charset    # only for Russian patched Apache
  # --with-readline=/usr  # this is only for the CGI version
  # --with-ttf            # this links with the shlib, need X for that
  # --with-java           # no thanks
  # --with-dom            # requires libxml >= 2.2.7
  # --with-curl           # no requests for this, so we'll avoid the dependancy

Make the following changes to the above:

  --with-zlib=/usr \
  # --with-mod_charset    # only for Russian patched Apache
  # --with-readline=/usr  # this is only for the CGI version
  # --with-ttf            # this links with the shlib, need X for that
  # --with-java           # no thanks
  # --with-dom            # requires libxml >= 2.2.7
  --with-curl=/usr

It is important that "--with-zlib" gets the trailing slash and --with-curl does not

Once the changes have been made, save your changes.

Step7 Build the revised php package
run "sh php.SlackBuild". You will see file listings and large amounts of compile statements scroll past.
when finished you are ready for the last step

If you don't see compile reports/statements something went wrong..
run sh php.SlackBuild 2>&1 | tee build.out and review the resulting file "build.out" to locate any errors.

Step8 Upgradepkg

go into /tmp and you will find "php-4.3.11-i486-3.tgz" *the file version may be different over time
I suggest before upgrading you rename the file like "mv php-4.3.11-i486-3.tgz php-4.3.11-i486-3b.tgz"
and download the provided file incase you need to revert back to it

Follow the download instructions but instead of going to the sources directory go to the packages directory
and download the current package "php-4.3.11-i486-3.tgz" *the file version may be different over time

Once done as root
run "upgradepkg php-4.3.11-i486-3b.tgz"
when the upgrade is complete run "apachectl restart"

if this for whatever reason fails, or you want to go back to the original php configuration upgrade to the original file you downloaded a few moments ago "upgradepkg php-4.3.11-i486-3.tgz
apachectl restart"


Congratulations, you're Done :)

0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now