瀏覽代碼

apply a cruel hack to make sure pg_config(1) outputs really the logical <prefix> and not the resolved one (which in turn makes trouble for packages like 'uuid' who prefix this with a DESTDIR)

Ralf S. Engelschall 20 年之前
父節點
當前提交
4ca9ae3ed8
共有 1 個文件被更改,包括 10 次插入1 次删除
  1. 10 1
      postgresql/postgresql.spec

+ 10 - 1
postgresql/postgresql.spec

@@ -43,7 +43,7 @@ Class:        BASE
 Group:        Database
 License:      GPL
 Version:      %{V_postgresql}
-Release:      20060111
+Release:      20060115
 
 #   package options
 %option       with_server       yes
@@ -368,6 +368,15 @@ AutoReqProv:  no
     ) || exit $?
 %endif
 
+    #   rebuild pg_config with hard-coded path to avoid that it provides
+    #   dynamically resolved paths which circumvent symlinks, etc.
+    ( cd src/bin/pg_config
+      %{l_shtool} subst \
+          -e 's:find_my_exec(argv.0., mypath):0; strcpy(mypath, "%{l_prefix}/bin/pg_config"):' \
+          pg_config.c
+      %{l_make} %{l_mflags}
+    ) || exit $?
+
 %install
     rm -rf $RPM_BUILD_ROOT