Linux Cookbook [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux Cookbook [Electronic resources] - نسخه متنی

Carla Schroder

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
تنظیمات قلم


اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
لیست موضوعات
افزودن یادداشت جدید

Recipe 2.12. Customizing Build Options in a Source RPM

2.12.1 Problem

Your site has some unique requirements
requiring special non-default features to be built into some
applications. Therefore, you want to control the compile-time options
in a source RPM and make sure the features you need are built into
the application.

2.12.2 Solution

First, download and install the source RPM:

# rpm -ivh samba-3.0.0-15.src.rpm

Then change to the

SPECS directory, and open the
spec file:

# cd /usr/src/redhat/SPECS

# vim samba.spec

Look for the section containing the %configure

%configure --with-acl-support --with-automount --with-fhs ...

Add or remove your desired configuration options, save and close the
spec file, then build your RPM just like in
Recipe Recipe 2.11:

# cd /usr/src/redhat/SPECS

# rpmbuild -bb tuxpaint.spec

2.12.3 Discussion

Where do you find a list of options? Change to the
SOURCES directory, and unpack the source

# cd /usr/src/redhat/SOURCES

# tar xzvf samba-3.0.0.tar.bz2

As mentioned in Recipe 2.11, the source
directory on your distribution may be different.

Poke around the unpacked tarball to find the
configure script, and run its built-in
help command:

# cd /usr/src/redhat/SOURCES/samba-3.0.0/source

# ./configure help
'configure' configure this package to adapt to many kinds of systems
Optional Packages:
with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
without-PACKAGE do not use PACKAGE
with-fhs Use FHS-compliant paths
with-privated=DIR Where to put smbpasswd

You'll also find the usual jumble of READMEs and
howtos. When the %configure directive is
customized to your satisfaction, save and close it.

Package maintainers cannot possibly meet the needs of every user.
Customizing your source RPMs is a simple way to make sure you get
what you want.

The most common reason to customize the build of a source RPM, in
these modern times, is to add to or customize your authentication
support. There are many different kinds of
authentication backends (LDAP, MySQL,
BerkeleyDB, PostgreSQL) and many different authentication protocols.
It's a good security practice to enable only the
options you need.

2.12.4 See Also

/ 435