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
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
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
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.
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
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
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.
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
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"
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
On 11/29/2010 04:29 PM Jim Perrin wrote:
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
"rpm -qvc $package" gives more info-- the files' permissions and owners.
But the ridiculously long one (at top) tells-- among other things-- which files have changed from their initially installed versions-- key info for what the OP was wanting to know. (I wrapped it in a bash script so it's easier to type.)
hth++