[Fedora-packaging] No modifying %{SOURCE} during rpmbuild

Cristian Gafton gafton at redhat.com
Tue Mar 8 05:49:08 UTC 2005


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 at redhat.com
>
> --
> Fedora-packaging mailing list
> Fedora-packaging at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-packaging
>

Cristian
-- 
----------------------------------------------------------------------
Cristian Gafton     --     gafton at redhat.com      --     Red Hat, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Linux is a leprosy; and is having a deleterious effect on the U.S. IT
industry because it is steadily depreciating the value of the software
industry sector."
     -- Kenneth Brown, President, Alexis de Tocqueville Institution




More information about the Fedora-packaging mailing list