1 |
Summary: e-smith specific postgresql configuration and templates. |
2 |
%define name smeserver-postgresql |
3 |
Name: %{name} |
4 |
%define version 0.0.1 |
5 |
%define release 24 |
6 |
Version: %{version} |
7 |
Release: %{release}%{?dist} |
8 |
License: GPL |
9 |
Group: Networking/Daemons |
10 |
Source: %{name}-%{version}.tar.gz |
11 |
Patch0: smeserver-postgresql-0.0.1.chpst.patch |
12 |
Patch1: smeserver-postgresql-0.0.1.config_templates.patch |
13 |
Patch2: smeserver-postgresql-0.0.1.chpst.patch2 |
14 |
Patch3: smeserver-postgresql-0.0.1.config_templates.patch2 |
15 |
Patch4: smeserver-postgresql-0.0.1.restore.patch |
16 |
Patch5: smeserver-postgresql-0.0.1.restore.patch2 |
17 |
Patch6: smeserver-postgresql-0.0.1.tcpip_socket.patch |
18 |
Patch7: smeserver-postgresql-0.0.1.permissions.patch |
19 |
Patch8: smeserver-postgresql-0.0.1.chpst.patch3 |
20 |
Patch9: smeserver-postgresql-0.0.1.permissions.patch2 |
21 |
Patch10: smeserver-postgresql-0.0.1.tcpip_socket.patch2 |
22 |
Patch11: smeserver-postgresql-0.0.1.startup.patch |
23 |
Patch12: smeserver-postgresql-0.0.1.sigterm.patch |
24 |
Patch13: smeserver-postgresql-0.0.1.disabled_pre_backup.patch |
25 |
Patch14: smeserver-postgresql-0.0.1.restore.patch3 |
26 |
Patch15: smeserver-postgresql-0.0.1.restore.patch4 |
27 |
Patch16: smeserver-postgresql-0.0.1.restore.patch5 |
28 |
Patch17: smeserver-postgresql-0.0.1.restore.patch6 |
29 |
Patch18: smeserver-postgresql-0.0.1.tcpip_socket.patch3 |
30 |
Patch19: smeserver-postgresql-0.0.1.tcpip_socket.patch4 |
31 |
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
32 |
BuildArch: noarch |
33 |
Requires: e-smith-base |
34 |
Requires: postgresql |
35 |
Requires: postgresql-server |
36 |
Requires: e-smith-lib >= 1.15.1-19 |
37 |
BuildRequires: e-smith-devtools >= 1.13.1-03 |
38 |
AutoReqProv: no |
39 |
|
40 |
%changelog |
41 |
* Tue Sep 11 2007 Charlie Brady <charlieb@e-smith.com> 0.0.1-24 |
42 |
- Add support for localhost/private/public access settings to |
43 |
determine which network interfaces to bind to. |
44 |
|
45 |
* Thu May 24 2007 Charlie Brady <charlieb@e-smith.com> 0.0.1-23 |
46 |
- Determine correct format for network access specs in postgresql.conf |
47 |
at template expansion time (postgresql 7 and 8 need different |
48 |
directives). |
49 |
|
50 |
* Sun Apr 29 2007 Shad L. Lords <slords@mail.com> |
51 |
- Clean up spec so package can be built by koji/plague |
52 |
|
53 |
* Tue Feb 06 2007 Charlie Brady <charlieb@e-smith.com> 0.0.1-22 |
54 |
- Escape braces in full restore template. |
55 |
|
56 |
* Thu Dec 07 2006 Shad L. Lords <slords@mail.com> |
57 |
- Update to new release naming. No functional changes. |
58 |
- Make Packager generic |
59 |
|
60 |
* Fri Dec 01 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-21 |
61 |
- Tighten permissions of dump file so that it is never world |
62 |
readable. |
63 |
- Fix restore scriptlet so that it exits silently if there is no |
64 |
dump to restore from. |
65 |
- Fix taint problem with restore script. |
66 |
- Fix services2adjust symlink names so that postgresl is stopped |
67 |
prior to restore, and restarted during timezone change. |
68 |
|
69 |
* Wed Oct 18 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-20 |
70 |
- Expand template for 00_restore_backup pgsql.init script during |
71 |
pre-restore event, so that the dump is restored following next |
72 |
reboot. |
73 |
|
74 |
* Tue Oct 17 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-19 |
75 |
- Fix permissions problem with restore from backup. |
76 |
|
77 |
* Mon Sep 25 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-18 |
78 |
- Ensure that pre-backup event does not fail if postgresql is disabled. |
79 |
- Apply sigterm patch - included in -17 source, but not applied in build. |
80 |
|
81 |
* Thu Sep 21 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-17 |
82 |
- Add control/t script so that SIGINT is used to terminate postgresql |
83 |
(so that existing connections cannot keep the server up indefinitely). |
84 |
|
85 |
* Thu Sep 14 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-16 |
86 |
- Fix run script so that conf templates are not run until after |
87 |
initdb. |
88 |
|
89 |
* Thu Sep 7 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-15 |
90 |
- Fix permissions of run files (typo). |
91 |
|
92 |
* Tue Aug 29 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-14 |
93 |
- Fix comparison operator in tcpip template fragment. |
94 |
|
95 |
* Tue Aug 29 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-13 |
96 |
- Fix ownership of config files (typo). |
97 |
|
98 |
* Tue Aug 29 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-12 |
99 |
- Run all pgsql.init scripts is user 'postgres'. |
100 |
|
101 |
* Thu Aug 24 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-11 |
102 |
- Require passwords for local socket and loopback socket connections |
103 |
except for 'postgres' user connecting via Unix domain socket. |
104 |
|
105 |
* Mon Aug 21 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-10 |
106 |
- Add option to accept connections on tcpip socket. |
107 |
|
108 |
* Fri Aug 04 2006 Charlie Brady <charlie_brady@mitel.com> 0.0.1-09 |
109 |
- Fix permissions on log/run file, and fix name of pgsql/init |
110 |
directory. |
111 |
|
112 |
* Wed Jun 28 2006 Charlie Brady <charlieb@e-smith.com> |
113 |
- [0.0.1-08] |
114 |
- Deal more correctly with pgsql.init startup race condition. |
115 |
|
116 |
* Wed Jun 28 2006 Charlie Brady <charlieb@e-smith.com> |
117 |
- [0.0.1-07] |
118 |
- Add full database restore feature. |
119 |
|
120 |
* Wed Jun 28 2006 Charlie Brady <charlieb@e-smith.com> |
121 |
- [0.0.1-06] |
122 |
- Move config templates to the correct place. |
123 |
- Fix delete-db action to remove empty subdirectories of |
124 |
/var/lib/pgsql/data. |
125 |
|
126 |
* Wed Jun 28 2006 Charlie Brady <charlieb@e-smith.com> |
127 |
- [0.0.1-05] |
128 |
- Use chpst rather than setuidgid in run script. |
129 |
|
130 |
* Wed Jun 28 2006 Charlie Brady <charlieb@e-smith.com> |
131 |
- [0.0.1-04] |
132 |
- Add minimal templated configuration files. |
133 |
|
134 |
* Wed Jun 28 2006 Charlie Brady <charlieb@e-smith.com> |
135 |
- [0.0.1-03] |
136 |
- Fix broken pqsql.init. |
137 |
|
138 |
* Wed Jun 28 2006 Charlie Brady <charlieb@e-smith.com> |
139 |
- [0.0.1-02] |
140 |
- Add missing /etc/e-smith/pgsql/init directory |
141 |
|
142 |
* Wed May 24 2006 Charlie Brady <charlieb@e-smith.com> |
143 |
- [0.0.1-01] |
144 |
- initial release |
145 |
|
146 |
%description |
147 |
This package adds necessary startup and configuration items for |
148 |
postgresql. |
149 |
|
150 |
%prep |
151 |
%setup |
152 |
%patch0 -p1 |
153 |
%patch1 -p1 |
154 |
%patch2 -p1 |
155 |
%patch3 -p1 |
156 |
%patch4 -p1 |
157 |
%patch5 -p1 |
158 |
%patch6 -p1 |
159 |
%patch7 -p1 |
160 |
%patch8 -p1 |
161 |
%patch9 -p1 |
162 |
%patch10 -p1 |
163 |
%patch11 -p1 |
164 |
%patch12 -p1 |
165 |
%patch13 -p1 |
166 |
%patch14 -p1 |
167 |
%patch15 -p1 |
168 |
%patch16 -p1 |
169 |
%patch17 -p1 |
170 |
%patch18 -p1 |
171 |
%patch19 -p1 |
172 |
|
173 |
%build |
174 |
mkdir -p root/etc/e-smith/pgsql/init |
175 |
perl createlinks |
176 |
|
177 |
mkdir -p root/etc/rc.d/init.d/supervise |
178 |
ln -s ../daemontools root/etc/rc.d/init.d/supervise/postgresql |
179 |
|
180 |
mkdir -p root/etc/rc.d/rc7.d |
181 |
ln -s /etc/rc.d/init.d/e-smith-service root/etc/rc.d/rc7.d/S50postgresql |
182 |
ln -s /etc/rc.d/init.d/e-smith-service root/etc/rc.d/rc7.d/S99pgsql.init |
183 |
|
184 |
mkdir -p root/service |
185 |
ln -s /var/service/postgresql root/service |
186 |
touch root/var/service/postgresql/down |
187 |
|
188 |
mkdir -p root/var/log/postgresql |
189 |
mkdir -p root/home/e-smith/db/pgsql |
190 |
mkdir -p root/etc/e-smith/pgsql/init |
191 |
|
192 |
|
193 |
%install |
194 |
rm -rf $RPM_BUILD_ROOT |
195 |
(cd root ; find . -depth -print | cpio -dump $RPM_BUILD_ROOT) |
196 |
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ |
197 |
--file /var/service/postgresql/run 'attr(0750,root,root)' \ |
198 |
--file /var/service/postgresql/log/run 'attr(0750,root,root)' \ |
199 |
--file /var/service/postgresql/control/t 'attr(0750,root,root)' \ |
200 |
--dir '/var/log/postgresql' 'attr(2750,smelog,smelog)' \ |
201 |
--dir '/home/e-smith/db' 'attr(0750,root,root)' \ |
202 |
--dir '/home/e-smith/db/pgsql' 'attr(0750,root,root)' \ |
203 |
> %{name}-%{version}-filelist |
204 |
echo "%doc COPYING" >> %{name}-%{version}-filelist |
205 |
|
206 |
%clean |
207 |
rm -rf $RPM_BUILD_ROOT |
208 |
|
209 |
%files -f %{name}-%{version}-filelist |
210 |
%defattr(-,root,root) |