No modifying %{SOURCE*} during rpmbuild.
Stuff included in %{SOURCE*} must not be modified during rpmbuild because the resulting .src.rpm will contain the modified version, not original. You should instead make a copy, then modify that copy.
Example from gaim.spec: # If not using gnome-open, then default to htmlview +cp %{SOURCE1} prefs.xml if [ "%{gnome_open_integration}" == "0" ]; then - sed -i "s/gnome-open/custom/g" %{SOURCE1} - sed -i "s/pref name='command' type='string' value=''/pref name='command' type='string' value='htmlview'/" %{SOURCE1} + sed -i "s/gnome-open/custom/g" prefs.xml + sed -i "s/pref name='command' type='string' value=''/pref name='command' type='string' value='htmlview'/" prefs.xml fi
Warren Togami wtogami@redhat.com
On Mon, 7 Mar 2005, Warren Togami wrote:
No modifying %{SOURCE*} during rpmbuild.
Well, DUH!
Stuff included in %{SOURCE*} must not be modified during rpmbuild because the resulting .src.rpm will contain the modified version, not original. You should instead make a copy, then modify that copy.
Example from gaim.spec: # If not using gnome-open, then default to htmlview +cp %{SOURCE1} prefs.xml if [ "%{gnome_open_integration}" == "0" ]; then
sed -i "s/gnome-open/custom/g" %{SOURCE1}
sed -i "s/pref name='command' type='string' value=''/pref
name='command' type='string' value='htmlview'/" %{SOURCE1}
sed -i "s/gnome-open/custom/g" prefs.xml
sed -i "s/pref name='command' type='string' value=''/pref
name='command' type='string' value='htmlview'/" prefs.xml fi
Warren Togami wtogami@redhat.com
-- Fedora-packaging mailing list Fedora-packaging@redhat.com https://www.redhat.com/mailman/listinfo/fedora-packaging
Cristian
Warren Togami wrote :
No modifying %{SOURCE*} during rpmbuild.
Same as gafton ;-)
if [ "%{gnome_open_integration}" == "0" ]; then
And the test command should be used properly : - String comparison should use the equal sign and others - Integer comparison should use -eq and others - AFAIK "==" isn't documented for the test command, it's definitely a "programmer-ism" :-D
Strange, though, I just noticed that on my FC3 system, [ is no longer a symlink to test as it used to be, and both files have the same timestamp but different sized.
Yet another minor detail anyway ;-)
Matthias
packaging@lists.fedoraproject.org