Solved

Slackware10 package rebuild

Posted on 2006-06-21
4
259 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

911 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

25 Experts available now in Live!

Get 1:1 Help Now