[SOLVED] rpm spec file to overwrite my service script
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have written a spec file for packaging my application in an rpm, but it reports a conflict when I am trying to update my service script in /etc/init.d/. This is a file that I do need to update/replace so how might I force the rpm to do that?
Thanks.
Code:
Summary: A program that increases WAN performance.
Name: packetsqueezer
Version: 0.3.05
Release: 1
License: GPL
Group: Productivity/Networking/Routing
Source: packetsqueezer.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
URL: http://packetsqueezer.sourceforge.net
ExcludeArch: s390 s390x
BuildRequires: gettext
BuildRequires: automake
BuildRequires: autoconf
BuildRequires: libtool
Requires: libnetfilter_queue
Requires: libnfnetlink
Requires: gcc
Requires: kernel-headers
Requires: make
Requires: binutils
%description
PacketSqueezer is an open source Linux based network accelerator. Its designed to optimize network traffic over point-to-point, partial-meshed, or full-meshed Wide Area Networks.
%prep
%setup -q -n packetsqueezer
%build
make
%install
rm -rf %{buildroot}
cp %{_sourcedir}/packetsqueezer-module.tar.gz %{_builddir}/packetsqueezer
install -d %{buildroot}/usr/bin/
install -v packetsqueezer %{buildroot}/usr/bin/packetsqueezer
install -d %{buildroot}/etc/init.d
install -v scripts/packetsqueezer %{buildroot}/etc/init.d/packetsqueezer
install -d %{buildroot}/usr/src/
install -v packetsqueezer-module.tar.gz %{buildroot}/usr/src/packetsqueezer-module.tar.gz
%clean
rm -rf %{buildroot}
%files
/usr/bin/packetsqueezer
/etc/init.d/packetsqueezer
/usr/src/packetsqueezer-module.tar.gz
%changelog
* Tue May 04 2010 Justin Yaple <yaplej at, gmail.com> 0.3.05-1
- First build of packetsqueezer.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513
Rep:
When packages have the same name, and the new package
(new version no. , major or minor )
is installed with # rpm -Uvh <package>
.. the files are updated.
'rpm -ivh' is not to be used, will not update.
When different packages contains coincident file names :
# rpm -Uvh --force <package>
' --force ' means : replace files. Please see 'man rpm'
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.