FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 11-29-2010, 07:12 AM
giggzounet
 
Default yum/RPM behaviour: does yum/RPM overwrite a file modified by a user during an update ?

Hi,

On our cluster with CentOS 5.5, I have a little problem with a script
for infiniband (this problem:
http://web.archiveorange.com/archive/v/NUQmuN84gd3D31Fdl8PU). So the fix
a very easy. But what will yum/RPM do during the next update ? Will it
overwrite the file ? Will it write on display that the file was modified
by an user (as under debian) ?

Thx a lot,
Best regards,
Guillaume

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 10:44 AM
Gabriel Tabares
 
Default yum/RPM behaviour: does yum/RPM overwrite a file modified by a user during an update ?

> a very easy. But what will yum/RPM do during the next update ? Will it
> overwrite the file ? Will it write on display that the file was modified
> by an user (as under debian) ?
>

As far as I can tell, if the file is marked as a configuration file in
the RPM, it will be left alone and the new configuration file will be
renamed to file.rpmnew. If the file is not marked as a configuration
file, it will be overwritten.

Regards,

Gabriel

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 11:38 AM
giggzounet
 
Default yum/RPM behaviour: does yum/RPM overwrite a file modified by a user during an update ?

Le 29/11/2010 12:44, Gabriel Tabares a écrit :
>> a very easy. But what will yum/RPM do during the next update ? Will it
>> overwrite the file ? Will it write on display that the file was modified
>> by an user (as under debian) ?
>>
>
> As far as I can tell, if the file is marked as a configuration file in
> the RPM, it will be left alone and the new configuration file will be
> renamed to file.rpmnew. If the file is not marked as a configuration
> file, it will be overwritten.
>
> Regards,
>
> Gabriel

ok ths for your answer!

where in the rpm package can I find if the file is a configuration file
or not ?

Regards,
Guillaume

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 11:41 AM
Nico Kadel-Garcia
 
Default yum/RPM behaviour: does yum/RPM overwrite a file modified by a user during an update ?

On Mon, Nov 29, 2010 at 7:38 AM, giggzounet <giggzounet@gmail.com> wrote:
> Le 29/11/2010 12:44, Gabriel Tabares a écrit :
>>> a very easy. But what will yum/RPM do during the next update ? Will it
>>> overwrite the file ? Will it write on display that the file was modified
>>> by an user (as under debian) ?
>>>
>>
>> As far as I can tell, if the file is marked as a configuration file in
>> the RPM, it will be left alone and the new configuration file will be
>> renamed to file.rpmnew. If the file is not marked as a configuration
>> file, it will be overwritten.
>>
>> Regards,
>>
>> Gabriel
>
> ok ths for your answer!
>
> where in the rpm package can I find if the file is a configuration file
> or not ?

You need the .spec file from the SRPM, or you could install it and test it.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 11:44 AM
giggzounet
 
Default yum/RPM behaviour: does yum/RPM overwrite a file modified by a user during an update ?

Le 29/11/2010 13:41, Nico Kadel-Garcia a écrit :
> On Mon, Nov 29, 2010 at 7:38 AM, giggzounet <giggzounet@gmail.com> wrote:
>> Le 29/11/2010 12:44, Gabriel Tabares a écrit :
>>>> a very easy. But what will yum/RPM do during the next update ? Will it
>>>> overwrite the file ? Will it write on display that the file was modified
>>>> by an user (as under debian) ?
>>>>
>>>
>>> As far as I can tell, if the file is marked as a configuration file in
>>> the RPM, it will be left alone and the new configuration file will be
>>> renamed to file.rpmnew. If the file is not marked as a configuration
>>> file, it will be overwritten.
>>>
>>> Regards,
>>>
>>> Gabriel
>>
>> ok ths for your answer!
>>
>> where in the rpm package can I find if the file is a configuration file
>> or not ?
>
> You need the .spec file from the SRPM, or you could install it and test it.

ok I will take a look in the SRPM.

thx

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 11:52 AM
giggzounet
 
Default yum/RPM behaviour: does yum/RPM overwrite a file modified by a user during an update ?

Le 29/11/2010 13:44, giggzounet a écrit :
> Le 29/11/2010 13:41, Nico Kadel-Garcia a écrit :
>> On Mon, Nov 29, 2010 at 7:38 AM, giggzounet <giggzounet@gmail.com> wrote:
>>> Le 29/11/2010 12:44, Gabriel Tabares a écrit :
>>>>> a very easy. But what will yum/RPM do during the next update ? Will it
>>>>> overwrite the file ? Will it write on display that the file was modified
>>>>> by an user (as under debian) ?
>>>>>
>>>>
>>>> As far as I can tell, if the file is marked as a configuration file in
>>>> the RPM, it will be left alone and the new configuration file will be
>>>> renamed to file.rpmnew. If the file is not marked as a configuration
>>>> file, it will be overwritten.
>>>>
>>>> Regards,
>>>>
>>>> Gabriel
>>>
>>> ok ths for your answer!
>>>
>>> where in the rpm package can I find if the file is a configuration file
>>> or not ?
>>
>> You need the .spec file from the SRPM, or you could install it and test it.
>
> ok I will take a look in the SRPM.
>
> thx

mhhhhhhhh I don't know well the rpm system...so here is the .spec:
# $Id: openib.spec 6922 2006-05-04 12:49:48Z vlad $

Summary: OpenIB Infiniband Driver Stack
Name: openib
Version: 1.4.1
Release: 5%{?dist}
License: GPL/BSD
Url: http://www.openfabrics.org/
Group: System Environment/Base
Source1: openib-1.3.2-ifup-ib
Source2: openib-1.0-openib.conf
Source3: openib-1.0-openibd.init
Source4: openib-fixup-mtrr.awk
Source8: openib-90-ib.rules
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#ExclusiveArch: i386 x86_64 ia64 ppc ppc64
BuildArch: noarch
Obsoletes: kernel-ib <= 1.0-1
Requires(post): chkconfig
%description
User space initialization scripts for the kernel InfiniBand drivers

%prep

%build

%install
rm -rf ${RPM_BUILD_ROOT}
install -d ${RPM_BUILD_ROOT}%{_initrddir}
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/ofed
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/network-scripts
install -d ${RPM_BUILD_ROOT}%{_sysconfdir}/udev/rules.d

install -m 0755 %{SOURCE1}
${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/network-scripts/ifup-ib
install -m 0644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_sysconfdir}/ofed/openib.conf
install -m 0755 %{SOURCE3} ${RPM_BUILD_ROOT}%{_initrddir}/openibd
install -m 0644 %{SOURCE4}
${RPM_BUILD_ROOT}%{_sysconfdir}/ofed/fixup-mtrr.awk
install -m 0644 %{SOURCE8} ${RPM_BUILD_ROOT}/etc/udev/rules.d/90-ib.rules

%clean
rm -rf ${RPM_BUILD_ROOT}

%post -n openib
if [ $1 = 1 ]; then
/sbin/chkconfig --add openibd
fi

%preun -n openib
if [ $1 = 0 ]; then
/sbin/chkconfig --del openibd
fi

%files
%defattr(-,root,root,-)
%dir %{_sysconfdir}/ofed
%config(noreplace) %{_sysconfdir}/ofed/openib.conf
%{_sysconfdir}/ofed/fixup-mtrr.awk
%{_initrddir}/openibd
/etc/udev/rules.d/90-ib.rules
%{_sysconfdir}/sysconfig/network-scripts/ifup-ib



############# END ##############

I'm interested in the /etc/sysconfig/network-scripts/ifup-ib file. Is
there a configuration file or not ?

Thx a lot.
Guillaume




_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 12:08 PM
Jim Perrin
 
Default yum/RPM behaviour: does yum/RPM overwrite a file modified by a user during an update ?

On Mon, Nov 29, 2010 at 7:52 AM, giggzounet <giggzounet@gmail.com> wrote:

> %config(noreplace) %{_sysconfdir}/ofed/openib.conf

This is what a config file looks like in a spec file. See how it has
%config at the beginning of the line, with the option of noreplace.
This file is a config and will not be replaced as far as rpm is concerned.

> %{_sysconfdir}/sysconfig/network-scripts/ifup-ib

This file has no such markings, and is not considered a config file by
rpm. it will be replaced on update.



--
During times of universal deceit, telling the truth becomes a revolutionary act.
George Orwell
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 12:30 PM
giggzounet
 
Default yum/RPM behaviour: does yum/RPM overwrite a file modified by a user during an update ?

Le 29/11/2010 14:08, Jim Perrin a écrit :
> On Mon, Nov 29, 2010 at 7:52 AM, giggzounet <giggzounet@gmail.com> wrote:
>
>> %config(noreplace) %{_sysconfdir}/ofed/openib.conf
>
> This is what a config file looks like in a spec file. See how it has
> %config at the beginning of the line, with the option of noreplace.
> This file is a config and will not be replaced as far as rpm is concerned.
>
>> %{_sysconfdir}/sysconfig/network-scripts/ifup-ib
>
> This file has no such markings, and is not considered a config file by
> rpm. it will be replaced on update.
>
>
>

great! thx for the help.

Bye bye

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 04:39 PM
ken
 
Default yum/RPM behaviour: does yum/RPM overwrite a file modified by a user during an update ?

On 11/29/2010 07:38 AM giggzounet wrote:
> Le 29/11/2010 12:44, Gabriel Tabares a écrit :
>>> ...
>
> where in the rpm package can I find if the file is a configuration file
> or not ?

This will list configuration files for an installed $package:

rpm -Vv $package 2>&1|grep -e ^........" c"

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 11-29-2010, 08:29 PM
Jim Perrin
 
Default yum/RPM behaviour: does yum/RPM overwrite a file modified by a user during an update ?

On Mon, Nov 29, 2010 at 12:39 PM, ken <gebser@mousecar.com> wrote:

> rpm -Vv $package 2>&1|grep -e ^........" *c"

Or the slightly easier (and per the rpm documentation)

rpm -qc packagename

HTH

--
During times of universal deceit, telling the truth becomes a revolutionary act.
George Orwell
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 01:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org