]>
Commit | Line | Data |
---|---|---|
123b1586 | 1 | Summary: Privileged helper for utmp updates |
c1511034 | 2 | Summary(es.UTF-8): Programa para actualización del utmp/wtmp |
123b1586 | 3 | Summary(pl.UTF-8): Program pozwalający na zapisywanie w utmp |
c1511034 ER |
4 | Summary(pt_BR.UTF-8): Programa para atualização do utmp/wtmp |
5 | Summary(ru.UTF-8): Привилегированная программа для изменений в utmp/wtmp | |
6 | Summary(uk.UTF-8): Привілейована програма для внесення змін до utmp/wtmp | |
7bea4643 AM |
7 | %define utempter_compat_ver 0.5.5 |
8 | Name: libutempter | |
1a82f354 | 9 | Version: 1.1.6 |
c5f94ed1 | 10 | Release: 6 |
1a82f354 | 11 | License: LGPL v2.1+ |
b1fb8c81 | 12 | Group: Base |
7bea4643 | 13 | Source0: ftp://ftp.altlinux.org/pub/people/ldv/utempter/%{name}-%{version}.tar.bz2 |
1a82f354 | 14 | # Source0-md5: b43827806923903aba2bc7cd3a2d45b7 |
beb1601b | 15 | Patch0: %{name}-lastlog.patch |
fe868437 | 16 | Patch1: %{name}-utmp-cleanup.patch |
45267342 JB |
17 | BuildRequires: rpmbuild(macros) >= 1.202 |
18 | Requires(pre): /usr/bin/getgid | |
19 | Requires(pre): /usr/sbin/groupadd | |
bb0ea121 | 20 | Requires(post,postun): /sbin/ldconfig |
45267342 | 21 | Requires(postun): /usr/sbin/groupdel |
bb0ea121 | 22 | Provides: group(utmp) |
7bea4643 | 23 | Provides: utempter = %{utempter_compat_ver} |
dbd06992 | 24 | Obsoletes: libutempter0 |
7bea4643 | 25 | Obsoletes: utempter |
abd64dd2 | 26 | Conflicts: rc-scripts < 0.4.9-1 |
ad225706 | 27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
dd80edbc | 28 | |
29 | %description | |
30 | Utempter is a utility which allows programs to log information to a | |
123b1586 | 31 | privileged file (/var/run/utmp), without compromising system |
8ddb16e4 | 32 | security. It accomplishes this task by acting as a buffer between root |
33 | and the programs. | |
b1fb8c81 | 34 | |
35ebba1a JR |
35 | %description -l es.UTF-8 |
36 | Programa para actualización del utmp/wtmp. | |
2b4363d2 | 37 | |
35ebba1a JR |
38 | %description -l pl.UTF-8 |
39 | Utempter jest programem pozwalającym użytkownikom na zapisywanie do | |
123b1586 | 40 | pliku /var/run/utmp bez naruszania bezpieczeństwa systemu. |
d6a73568 | 41 | |
35ebba1a JR |
42 | %description -l pt_BR.UTF-8 |
43 | O Utempter é um utilitários que permite a programas guardar informação | |
44 | à arquivos privilegiados (/var/run/utmp), sem comprometer a segurança | |
2b4363d2 | 45 | do sistema. Ele faz esta tarefa atuando como um "buffer" entre o |
35ebba1a | 46 | usuário root e os programas. |
2b4363d2 | 47 | |
35ebba1a JR |
48 | %description -l ru.UTF-8 |
49 | Utempter - это утилита, которая позволяет программам записывать | |
50 | информацию в привилегированный файл (/var/run/utmp) без нарушения | |
51 | системной безопасности. Она исполняет эту задачу, выступая буфером | |
52 | между root'ом и пользовательскими программами. | |
2b4363d2 | 53 | |
35ebba1a JR |
54 | %description -l uk.UTF-8 |
55 | Utempter - це утиліта, що дозволяє програмам записувати інформацію в | |
56 | привілейований файл (/var/run/utmp) без порушення системної безпеки. | |
57 | Вона виконує цю задачу, виступаючи буфером між root'ом та програмами | |
58 | користувача. | |
2b4363d2 | 59 | |
8b99e6d8 | 60 | %package devel |
2a305f7e | 61 | Summary: Header file for utempter library |
c1511034 | 62 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki utemptera |
c74ab439 | 63 | Group: Development/Libraries |
2a305f7e | 64 | Requires: %{name} = %{version}-%{release} |
86ab9089 | 65 | Provides: utempter-devel = %{utempter_compat_ver} |
dbd06992 | 66 | Obsoletes: libutempter0-devel |
7bea4643 | 67 | Obsoletes: utempter-devel |
b1fb8c81 | 68 | |
69 | %description devel | |
2a305f7e | 70 | Header file for utempter library. |
dd80edbc | 71 | |
35ebba1a JR |
72 | %description devel -l pl.UTF-8 |
73 | Plik nagłówkowy biblioteki utemptera. | |
d6a73568 | 74 | |
c19035bb AM |
75 | %package static |
76 | Summary: Static utempter library | |
77 | Summary(pl.UTF-8): Statyczna biblioteka utemptera | |
78 | Group: Development/Libraries | |
79 | Requires: %{name}-devel = %{version}-%{release} | |
86ab9089 | 80 | Provides: utempter-static = %{utempter_compat_ver} |
c19035bb AM |
81 | |
82 | %description static | |
83 | Static utempter library. | |
84 | ||
85 | %description static -l pl.UTF-8 | |
86 | Statyczna biblioteka utemptera | |
87 | ||
dd80edbc | 88 | %prep |
b1fb8c81 | 89 | %setup -q |
fe868437 | 90 | %patch0 -p1 |
91 | %patch1 -p1 | |
dd80edbc | 92 | |
93 | %build | |
f10e7645 AM |
94 | %{__make} \ |
95 | CC="%{__cc}" \ | |
7bea4643 AM |
96 | RPM_OPT_FLAGS="%{rpmcppflags} %{rpmcflags}" \ |
97 | libdir="%{_libdir}" \ | |
98 | libexecdir="%{_libexecdir}" | |
dd80edbc | 99 | |
100 | %install | |
101 | rm -rf $RPM_BUILD_ROOT | |
29d05494 | 102 | |
f10e7645 | 103 | %{__make} install \ |
7bea4643 AM |
104 | libdir="%{_libdir}" \ |
105 | libexecdir="%{_libexecdir}" \ | |
106 | DESTDIR=$RPM_BUILD_ROOT | |
dd80edbc | 107 | |
c19035bb | 108 | install -d $RPM_BUILD_ROOT%{_sbindir} |
da121337 JP |
109 | ln -s %{_libexecdir}/utempter/utempter $RPM_BUILD_ROOT%{_sbindir} |
110 | ln -s %{_libexecdir}/utempter/utmp-cleanup $RPM_BUILD_ROOT%{_sbindir} | |
c19035bb | 111 | |
d6a73568 | 112 | install -d $RPM_BUILD_ROOT/var/run |
123b1586 | 113 | :> $RPM_BUILD_ROOT/var/run/utmp |
c1464daf | 114 | |
dd80edbc | 115 | %clean |
116 | rm -rf $RPM_BUILD_ROOT | |
117 | ||
7617aa5d JR |
118 | # not in trigger because utmpx is %%ghost, and %%ghost-ed files |
119 | # are removed when they'are uninstalled | |
c5f94ed1 AM |
120 | %pretrans -p <lua> |
121 | utmpx = io.open("/var/run/utmpx", "rb") | |
122 | if utmpx then | |
123 | utmpx:close() | |
124 | utmp_size = 0 | |
125 | utmp = io.open("/var/run/utmp", "rb") | |
126 | if utmp then | |
127 | utmp_size = utmp:seek("end") | |
128 | utmp:close() | |
129 | end | |
130 | if utmp_size > 0 then | |
131 | os.remove("/var/run/utmpx") | |
684e8d3e | 132 | else |
c5f94ed1 AM |
133 | os.remove("/var/run/utmp") |
134 | os.rename("/var/run/utmpx", "/var/run/utmp") | |
135 | end | |
136 | end | |
684e8d3e | 137 | |
bb0ea121 ER |
138 | %pre |
139 | %groupadd -g 22 utmp | |
140 | ||
2ce2fdff ER |
141 | %post |
142 | /sbin/ldconfig | |
123b1586 | 143 | if [ ! -f /var/run/utmp ]; then |
ad225706 | 144 | umask 002 |
123b1586 JR |
145 | touch /var/run/utmp |
146 | chown root:utmp /var/run/utmp | |
147 | chmod 0664 /var/run/utmp | |
2ce2fdff ER |
148 | fi |
149 | ||
bb0ea121 ER |
150 | %postun |
151 | /sbin/ldconfig | |
152 | if [ "$1" = "0" ]; then | |
153 | %groupremove utmp | |
154 | fi | |
8696ce2b | 155 | |
dd80edbc | 156 | %files |
b1fb8c81 | 157 | %defattr(644,root,root,755) |
1a82f354 | 158 | %doc README |
7ce824e4 JB |
159 | %attr(755,root,root) %{_sbindir}/utempter |
160 | %attr(755,root,root) %{_sbindir}/utmp-cleanup | |
dc720e3e JP |
161 | %dir %{_libexecdir}/utempter |
162 | %attr(2755,root,utmp) %{_libexecdir}/utempter/utempter | |
163 | %attr(755,root,root) %{_libexecdir}/utempter/utmp-cleanup | |
7ce824e4 JB |
164 | %attr(755,root,root) %{_libdir}/libutempter.so.*.*.* |
165 | %attr(755,root,root) %ghost %{_libdir}/libutempter.so.0 | |
123b1586 | 166 | %attr(664,root,utmp) %ghost /var/run/utmp |
b1fb8c81 | 167 | |
168 | %files devel | |
169 | %defattr(644,root,root,755) | |
7ce824e4 | 170 | %attr(755,root,root) %{_libdir}/libutempter.so |
8edf1616 | 171 | %{_includedir}/utempter.h |
1a82f354 JB |
172 | %{_mandir}/man3/libutempter.3* |
173 | %{_mandir}/man3/utempter*.3* | |
c19035bb AM |
174 | |
175 | %files static | |
176 | %defattr(644,root,root,755) | |
7ce824e4 | 177 | %{_libdir}/libutempter.a |