Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3616616
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:31:14+00:00 2026-05-18T22:31:14+00:00

I finally got my program packaged in a RPM on Fedora 14 yesterday, and

  • 0

I finally got my program packaged in a RPM on Fedora 14 yesterday, and I thought that it would be easy to build it the same way on a CentOS 4.8 box. It turns out that the older version of rpm and distutils are severally limited, and I’m not having any luck working around it.

The basic problem is that distutils with Python 2.7 supports an option called “–post-install” where I can specify a script. The script is included and is run when I install with yum or rpm. Everything is great.
However, with Python 2.3, there is no –post-install option (it’s actually not available in RPM). Whatever, I can just add it to the “%install” section in my .spec file.
So I start the RPM building process with

python setup.py bdist_rpm --spec-only

which creates my .spec. I edit it and paste my script into the .spec. Then, I go to build the source with

python setup.py bdist_rpm --source-only

This is where problems seem to start occurring.
distutils creates the following sub-directories ./build/bdist.linux-i686/rpm/. Inside that there is a folder called SPECS/netinfo.spec (my program is called netinfo). However, that doesn’t use the custom .spec that I just created.
That’s weird since it should use the generated .spec. If I try to build with the default .spec, then predictably my script isn’t included in the RPM. If I overwrite that with my custom .spec, it still doesn’t work. It’s like it recreates the .spec for every command.

There are various commands that bdist_rpm has, and they can be listed with

python setup.py bdist_rpm --help

I expected to find an otpion where you can specify the .spec file to use. Yet, on Python 2.3 and 2.7, no option exists.

There has to be some simple way to get distutils to use my custom .spec file. Does anyone know how to specify this?

Thanks,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:31:15+00:00Added an answer on May 18, 2026 at 10:31 pm

    There isn’t. Build the SRPM with rpmbuild -bs and then use Mock to build a package for EL4.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I finally got Bootstrap tabs to work. I was wondering if there's a way
Well, now that I've finally got my stupid ODBC stuff configured, I took a
It seems that I've finally got to implement some sort of threading into my
I have been working on this program for a while and I finally got
I am struggling with bug in my program. and finally i got the point.
I have been building a program for the past few months. I finally got
I've got a program that under Windows and .NET Framework 4 works perfectly well
I've been breaking my head over this bug in my program that would rarely
I finally got apache2 with mod_wsgi working on Linux (havent much luck with windows
I finally got my permalinks working for Custom Post Types and Taxonomies using `

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.