firtst release
Revision | 6f4b79877bb4ce41a25b8cf6eb436c246105558f (tree) |
---|---|
Time | 2018-11-13 16:01:35 |
Author | Kyotaro Horiguchi <horiguchi.kyotaro@lab....> |
Commiter | Kyotaro Horiguchi |
Change target version to PG11 and fix the SPEC file
Change targetr version to PG11. SPEC file was changed so that genearte
a subpackage llvmjit, which installs a bitcode file needed for JIT
compilation.
@@ -22,8 +22,8 @@ PG_CONFIG = pg_config | ||
22 | 22 | PGXS := $(shell $(PG_CONFIG) --pgxs) |
23 | 23 | include $(PGXS) |
24 | 24 | |
25 | -STARBALL10 = pg_hint_plan10-$(HINTPLANVER).tar.gz | |
26 | -STARBALLS = $(STARBALL10) | |
25 | +STARBALL11 = pg_hint_plan11-$(HINTPLANVER).tar.gz | |
26 | +STARBALLS = $(STARBALL11) | |
27 | 27 | |
28 | 28 | TARSOURCES = Makefile *.c *.h COPYRIGHT* \ |
29 | 29 | pg_hint_plan--*.sql \ |
@@ -35,7 +35,7 @@ LDFLAGS+=-Wl,--build-id | ||
35 | 35 | |
36 | 36 | installcheck: $(REGRESSION_EXPECTED) |
37 | 37 | |
38 | -rpms: rpm10 | |
38 | +rpms: rpm11 | |
39 | 39 | |
40 | 40 | # pg_hint_plan.c includes core.c and make_join_rel.c |
41 | 41 | pg_hint_plan.o: core.c make_join_rel.c # pg_stat_statements.c |
@@ -50,7 +50,7 @@ $(STARBALLS): $(TARSOURCES) | ||
50 | 50 | tar -chzf $@ $(addprefix $(subst .tar.gz,,$@)/, $^) |
51 | 51 | rm $(subst .tar.gz,,$@) |
52 | 52 | |
53 | -rpm10: $(STARBALL10) | |
54 | - MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan10.spec | |
53 | +rpm11: $(STARBALL11) | |
54 | + MAKE_ROOT=`pwd` rpmbuild -bb SPECS/pg_hint_plan11.spec | |
55 | 55 | |
56 | 56 |
@@ -1,10 +1,11 @@ | ||
1 | 1 | # SPEC file for pg_store_plans |
2 | 2 | # Copyright(C) 2018 NIPPON TELEGRAPH AND TELEPHONE CORPORATION |
3 | 3 | |
4 | -%define _pgdir /usr/pgsql-10 | |
4 | +%define _pgdir /usr/pgsql-11 | |
5 | 5 | %define _bindir %{_pgdir}/bin |
6 | 6 | %define _libdir %{_pgdir}/lib |
7 | 7 | %define _datadir %{_pgdir}/share |
8 | +%define _bcdir %{_libdir}/bitcode/pg_hint_plan | |
8 | 9 | |
9 | 10 | %if "%(echo ${MAKE_ROOT})" != "" |
10 | 11 | %define _rpmdir %(echo ${MAKE_ROOT})/RPMS |
@@ -12,8 +13,8 @@ | ||
12 | 13 | %endif |
13 | 14 | |
14 | 15 | ## Set general information for pg_store_plans. |
15 | -Summary: Optimizer hint on PostgreSQL 10 | |
16 | -Name: pg_hint_plan10 | |
16 | +Summary: Optimizer hint on PostgreSQL 11 | |
17 | +Name: pg_hint_plan11 | |
17 | 18 | Version: 1.3.2 |
18 | 19 | Release: 1%{?dist} |
19 | 20 | License: BSD |
@@ -24,8 +25,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n) | ||
24 | 25 | Vendor: NIPPON TELEGRAPH AND TELEPHONE CORPORATION |
25 | 26 | |
26 | 27 | ## We use postgresql-devel package |
27 | -BuildRequires: postgresql10-devel | |
28 | -Requires: postgresql10-libs | |
28 | +BuildRequires: postgresql11-devel | |
29 | +Requires: postgresql11-server | |
29 | 30 | |
30 | 31 | ## Description for "pg_hint_plan" |
31 | 32 | %description |
@@ -33,11 +34,19 @@ Requires: postgresql10-libs | ||
33 | 34 | pg_hint_plan provides capability to tweak execution plans to be |
34 | 35 | executed on PostgreSQL. |
35 | 36 | |
36 | -Note that this package is available for only PostgreSQL 10. | |
37 | +Note that this package is available for only PostgreSQL 11. | |
38 | + | |
39 | +%package llvmjit | |
40 | +Requires: postgresql11-server, postgresql11-llvmjit | |
41 | +Requires: pg_hint_plan11 = 1.3.1 | |
42 | +Summary: Just-in-time compilation support for pg_hint_plan11 | |
43 | + | |
44 | +%description llvmjit | |
45 | +Just-in-time compilation support for pg_hint_plan11 | |
37 | 46 | |
38 | 47 | ## pre work for build pg_hint_plan |
39 | 48 | %prep |
40 | -PATH=/usr/pgsql-10/bin:$PATH | |
49 | +PATH=/usr/pgsql-11/bin:$PATH | |
41 | 50 | if [ "${MAKE_ROOT}" != "" ]; then |
42 | 51 | pushd ${MAKE_ROOT} |
43 | 52 | make clean %{name}-%{version}.tar.gz |
@@ -48,7 +57,7 @@ if [ ! -d %{_rpmdir} ]; then mkdir -p %{_rpmdir}; fi | ||
48 | 57 | |
49 | 58 | ## Set variables for build environment |
50 | 59 | %build |
51 | -PATH=/usr/pgsql-10/bin:$PATH | |
60 | +PATH=/usr/pgsql-11/bin:$PATH | |
52 | 61 | make USE_PGXS=1 %{?_smp_mflags} |
53 | 62 | |
54 | 63 | ## Set variables for install |
@@ -59,6 +68,8 @@ install pg_hint_plan.so %{buildroot}%{_libdir}/pg_hint_plan.so | ||
59 | 68 | install -d %{buildroot}%{_datadir}/extension |
60 | 69 | install -m 644 pg_hint_plan--1.3.2.sql %{buildroot}%{_datadir}/extension/pg_hint_plan--1.3.2.sql |
61 | 70 | install -m 644 pg_hint_plan.control %{buildroot}%{_datadir}/extension/pg_hint_plan.control |
71 | +install -d %{buildroot}%{_bcdir} | |
72 | +install -m 644 pg_hint_plan.bc %{buildroot}%{_bcdir}/pg_hint_plan.bc | |
62 | 73 | |
63 | 74 | %clean |
64 | 75 | rm -rf %{buildroot} |
@@ -70,10 +81,16 @@ rm -rf %{buildroot} | ||
70 | 81 | %{_datadir}/extension/pg_hint_plan--1.3.2.sql |
71 | 82 | %{_datadir}/extension/pg_hint_plan.control |
72 | 83 | |
84 | +%files llvmjit | |
85 | +%defattr(0755,root,root) | |
86 | +%{_bcdir} | |
87 | +%defattr(0644,root,root) | |
88 | +%{_bcdir}/pg_hint_plan.bc | |
89 | + | |
73 | 90 | # History of pg_hint_plan. |
74 | 91 | %changelog |
75 | 92 | * Tue Nov 13 2018 Kyotaro Horiguchi |
76 | -- Support PostgreSQL 11. Version 1.3.1. | |
93 | +- Support PostgreSQL 11. Version 1.3.2. | |
77 | 94 | * Tue Jun 08 2018 Kyotaro Horiguchi |
78 | 95 | - Fixed a crash bug. Version 1.3.1. |
79 | 96 | * Tue Oct 10 2017 Kyotaro Horiguchi |