Re: need spec file example to replace files from various packages

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

 



Paul Johnson wrote:
After installing Fedora, I want to replace various configuration files
on lab computers. If I can learn how to do this in the post section of
an RPM spec file, I will be happy.  For example, I want/need to
replace things like

/etc/gdm/PreSession/Default
/etc/gdm/PostSession/Default
/etc/pam.d/system-auth
/etc/hosts.allow
/etc/hosts.deny

One brute force option is to install with rpm --replacefiles, but yum
does not like that.
So can  you point me at a spec file or two that will give example
syntax on how I can create a backup of those files and replace them
with the ones I want.

Please?


Just bump the revision number by 1, so it will update from yours. You will have to watch for regular updates and repeat after any of you modified packages get updated.

For instance:

1. install the source rpm from updates for gdm (rpm -ihv gdm...src.rpm)
2. cd ~/rpmbuild/SPEC
3. vi gdm.spec
4. bump the revision (not version)
5. cd ../BUILD
6. untar the gdm*.tar.gz
7. cd gdm<version><revision>
8. modify as desired
cd back to the BUILD directory
9. tar up the sources into a file name that matches your new version.revision from the spec file you edited
cd ../SPEC
10 rpmbuild -ba gdm.spec (specify arch if ya need to)
11. rpm -Uhv <new_rpm>

All set!

Hope there is a clue there somewhere for ya.


--
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