Re: about postfix.spec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nevruz Mesut Sahin wrote:
> postfix was already installed but there is no such a file
> postfix.spec  in /usr/src/redhat/SPECS/

(Please don't top post.  It is much more difficult to follow.)

What Blake was telling you to install is the postfix source rpm (srpm
for short).  This is not the same as the binary package that you have
installed.  The srpm is the source package for postfix.  It includes
the postfix tarball and the instructions (the postfix.spec file)
needed to create the binary postfix rpm.

You need to recompile postfix because mysql support is not built into
the FC6 binary package and postfix does not support any sort of plugin
architecture.  (In rawhide -- what will become F9, mysql support is
now included).

You don't mention what documents you are trying to follow, so I can't
tell you what things you may need to do at specific points in that
documentation.  I will try to briefly outline the steps you'll need to
take to rebuild postfix with mysql support for FC6.

First, I would strongly urge you not to follow any documentation of
guides that tell you to install and build packages as root.  That is
simply wrong and anyone giving such advice is not doing you any
favors.

To get yourself setup to build the postfix packages, you will want to
install a few packages first.  Install the rpmdevtools and yum-utils
packages (yum install rpmdevtools yum-utils).  The rpmdevtools package
contains a script named rpmdev-setuptree.  Run that as a normal user
and it will create ~/rpmbuild and setup the needed directories and
configuration to enable you to build packages without needing to be
root.

Then download the postfix srpm.  You should be able to use
yumdownloader from the yum-utils package to do this.  The command
should be yumdownloader --source --noplugins postfix.  (I don't
have any FC-6 boxes at hand anymore, so I can't verify this there.  If
you have problems, download the postfix srpm directly from any mirror.
http://download.fedora.redhat.com/pub/fedora/linux/core/updates/6/SRPMS/postfix-2.4.5-2.fc6.src.rpm
seems to be the latest available.)  Verify the download with rpm -K
postfix*.rpm.

Next, install the build dependencies for postfix.  There is a handy
tool in yum-utils to do this.  As root, run the following command:
yum-builddep postfix*.src.rpm.  This should install the packages
needed to rebuild the postfix srpm.  Since you will be adding mysql
support, you will also need to install the mysql and mysql-devel
packages.

As a normal user, run rpm -ivh postfix*.src.rpm.  This will install the
source rpm within the ~/rpmbuild directory.  The spec file you want
should be in ~/rpmbuild/SPECS.  Edit that file and at the very top,
there is a line that reads %define MYSQL 0.  Change the 0 to a 1 to
enable mysql.  You should also change the Release line (line 42).
change the 2 to 3, to increment the release field.  This will let yum
and rpm know that the package you rebuild is newer than the one you
already have installed.

Now, rebuild the package with the command:
rpmbuild -ba ~/rpmbuild/SPECS/postfix.spec

This should produce both the binary and source packages.  The binary
packages will be saved in ~/rpmbuild/RPMS/$(arch).  So, for i386, the
packages will be in ~/rpmbuild/RPMS/i386.

That's the short answer. :)

For more details, you may find the draft available at
http://fedoraproject.org/wiki/Docs/Drafts/BuildingPackagesGuide
useful.

There is an even more comprehensive guide to rpm at
http://docs.fedoraproject.org/drafts/rpm-guide-en/

Hopefully you'll be able to google and figure out any problems you
have along the way.

Good luck.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
First, God created idiots. That was just for practice. Then He created
school boards.
    -- Mark Twain

Attachment: pgpM9eNMysvyq.pgp
Description: PGP signature

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux