git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Small script to patch .spec for Suse

From
JWJosef Weidendorfer <josef.weidendorfer@gmx.de>
Date
Nov 15, 2005, 11:30 UTC
Message-ID
<200511151230.30030.Josef.Weidendorfer@gmx.de>

Everytime I update and want to generate RPM packages for my Suse distribution, I have to patch the git-core.spec.in Here is the current script for patching. It is only about package names, so a seperate .spec file would be overkill and a maintenance problem for me.

Usage: Run contrib/patch-spec-for-suse before "make rpm"
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
---
This is handy for Suse users which want to install Git by creating
there own RPM from source. It works for me (on Suse 10.0).
I hope it works for other versions, too.
Perhaps somebody has a better idea how to come up with
corrected .spec files for different distros.
 contrib/patch-spec-for-suse |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100755 contrib/patch-spec-for-suse

applies-to: 4b6dbe856a3e63699b299c76f4f1fc5cb34cbe26 3e0d98b8065c7a23c6b9a16811bb7b066b13bffc

diff --git a/contrib/patch-spec-for-suse b/contrib/patch-spec-for-suse
new file mode 100755
index 0000000..5b9795c
--- /dev/null
+++ b/contrib/patch-spec-for-suse
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# The git-core.spec for RPM creation in the git source works
+# fine for fedora core, but not other distributions.
+# This script patches some distribution dependent package names
+# to make it work for Suse (at least 10.0)
+#
+# Run it from gits main directory like
+#  contrib/patch-for-suse
+# Note! This changes git-core.spec.in. So if you do git development
+# yourself, do *not* commit the changed file, or revert before with
+#  mv git-core.spec.in.orig git-core.spec.in
+#
+
+[ ! -f git-core.spec.in ] && echo "git-core.spec.in not found!" && exit 1
+cp git-core.spec.in git-core.spec.in.orig
+
+# Updates for Suse:
+#  - no seperate "openssh-clients"
+#  - "expat" contains devel files
+
+cat git-core.spec.in \
+ | sed -e 's/openssh-clients/openssh/' \
+ | sed -e 's/expat-devel/expat/' \
+ > git-core.spec.temp
+
+mv git-core.spec.temp git-core.spec.in
+echo "git-core.spec.in sucessfully patched."
+
---
0.99.9.GIT
Next: Junio C Hamano
Message 1 of 11 in “Small script to patch .spec for Suse”
  1. Small script to patch .spec for SuseJosef Weidendorfer, Nov 15, 2005
  2. Junio C HamanoNov 15, 2005
  3. H. Peter AnvinNov 15, 2005
  4. Junio C HamanoNov 15, 2005
  5. Andreas EricssonNov 15, 2005
  6. Petr BaudisNov 15, 2005
  7. H. Peter AnvinNov 15, 2005
  8. Josef WeidendorferNov 16, 2005
  9. H. Peter AnvinNov 18, 2005
  10. A Large Angry SCMNov 18, 2005
  11. H. Peter AnvinNov 18, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.