LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-05-2010, 03:54 PM   #1
yaplej
Member
 
Registered: Apr 2009
Distribution: CentOS, Ubuntu, openSuSE
Posts: 165
Blog Entries: 1

Rep: Reputation: 22
rpm spec file to overwrite my service script


Hello,

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.
 
Old 05-05-2010, 08:33 PM   #2
vikas027
Senior Member
 
Registered: May 2007
Location: Sydney
Distribution: RHEL, CentOS, Ubuntu, Debian, OS X
Posts: 1,305

Rep: Reputation: 107Reputation: 107
What is the "conflict" you are getting ?
 
Old 05-06-2010, 02:41 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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'

..
 
Old 05-06-2010, 11:52 AM   #4
yaplej
Member
 
Registered: Apr 2009
Distribution: CentOS, Ubuntu, openSuSE
Posts: 165

Original Poster
Blog Entries: 1

Rep: Reputation: 22
Thanks,

I got it to work correctly by using rpm -U <package>. There was nothing wrong in my spec file apparently.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RPM SPEC file install script run anti43 Linux - Software 2 05-05-2009 07:17 AM
rpm spec file help AutoC Fedora 3 01-30-2008 08:25 AM
rpm spec file alrawab Linux - General 2 03-28-2007 06:39 AM
RPM Spec file adddy Linux - Software 8 11-07-2006 05:02 AM
RPM Spec file creation: %file section question davidas Linux - Newbie 0 03-16-2004 10:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration