[Fedora-packaging] Basic Questions

Christopher Meng cickumqt at gmail.com
Thu Apr 12 02:07:45 UTC 2012


What is your really confusion?I can't understand what you asked.

On Thursday, April 12, 2012, Kamal Ahmed wrote:

> Hi List,
> I just started working on RPM Packaging and had few questions.
>
> 1. Where can i find good "WORKING" Examples of packages.spec
> 2. Is mach, or mock, really the better version of rpmbiuld ?
> OK, so you want to build a binary RPM package for deployment on your
> servers. You have a .spec file or .src.rpm that you got from one of the
> many repositories such as freshrpms.net or dag.wieers.com<http://dag.wieers.com/rpm/>,
> or that you wrote yourself.
> Why not just build it using rpmbuild?
> There are several problems you may come across.
>
>    1. Given a spec file, rpmbuild won't download the source tarball
>    and/or patches. You have to fetch those yourself into the SOURCES directory.
>    2. rpmbuild will abort if any build-time dependencies are missing,
>    forcing you to stop what you're doing, and go and build and install *
>    those* packages too.
>    3. When your package configures itself, it may auto-detect libraries
>    which are available on your build system, but which are not going to be
>    available on the target system. For example, if openldap-devel is present
>    then openldap may be linked into your binaries, but if the RPM doesn't
>    declare openldap as a dependency, then it will fail to run on the target
>    system. This is an insiduous problem, which I call "the curse of autoconf".
>    4. You can only build packages for the same type of system as your
>    build machine (e.g. CentOS 4 binaries on a CentOS 4 build system)
>
> If you want an example of how bad the problem is, try building the package
> perl-SOAP-Lite from its spec file<http://svn.rpmforge.net/svn/trunk/rpms/perl-SOAP-Lite/>.
> You will quickly find yourself in dependency hell, with 16 other packages
> needing to be installed or built, all in the correct order.
> The solution: mach <http://thomas.apestaart.org/download/mach/>
>
> 3. Can i install "use sudo yum install <package name> , inside a SPEC file
> ?
> 4. How can do a CHROOT inside a SPEC File
> 5. How do i introduce versions, r=for RPMs, when there is NO version in
> the SCM ( we are using Mercurial )
> 6. Is there a working automation framework for rpmbuild ?
> 7. I tried using autospec , but it includes all the source files as well.
> I used it as:
> tar tzf myapp-0.1.tar.gz | autospec -bd -c GPL -g Utilities/System -n
> myapp-0.1 -l '' > myapp.spec
>
>
> Thanks,
> -Kamal.
>


-- 
Sent from Gmail Mobile
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/packaging/attachments/20120412/e9d1e4e5/attachment-0001.html>


More information about the packaging mailing list