libutempter-vl.spec 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289
  1. %define utempter_compat_ver 0.5.5
  2. Name: libutempter
  3. Summary: A privileged helper for utmp/wtmp updates
  4. Version: 1.1.5
  5. Release: 4%{?_dist_release}
  6. Group: System Environment/Libraries
  7. License: LGPLv2
  8. URL: ftp://ftp.altlinux.org/pub/people/ldv/utempter
  9. Source0: ftp://ftp.altlinux.org/pub/people/ldv/utempter/%{name}-%{version}.tar.bz2
  10. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  11. Requires(pre): shadow-utils
  12. Requires(post): /sbin/ldconfig
  13. Requires(postun): /sbin/ldconfig
  14. Provides: utempter = %{utempter_compat_ver}
  15. Obsoletes: utempter
  16. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  17. %description
  18. This library provides interface for terminal emulators such as
  19. screen and xterm to record user sessions to utmp and wtmp files.
  20. %package devel
  21. Summary: Development environment for utempter
  22. Group: Development/Libraries
  23. Requires: %{name} = %{version}-%{release}
  24. %description devel
  25. This package contains development files required to build
  26. utempter-based software.
  27. %package -n compat32-%{name}
  28. Summary: A privileged helper for utmp/wtmp updates.
  29. Group: System Environment/Libraries
  30. Requires: %{name} = %{version}-%{release}
  31. %description -n compat32-%{name}
  32. Utempter is a utility which allows some non-privileged programs to
  33. have required root access without compromising system
  34. security. Utempter accomplishes this feat by acting as a buffer
  35. between root and the programs.
  36. %package -n compat32-%{name}-devel
  37. Summary: Development environment for utempter
  38. Group: Development/Libraries
  39. Requires: compat32-%{name} = %{version}
  40. Requires: %{name}-devel = %{version}
  41. %description -n compat32-%{name}-devel
  42. This package contains development files required to build
  43. utempter-based software.
  44. %prep
  45. %setup -q
  46. %build
  47. make CFLAGS="$RPM_OPT_FLAGS" libdir="%{_libdir}" libexecdir="%{_libexecdir}"
  48. %install
  49. rm -rf $RPM_BUILD_ROOT
  50. make install DESTDIR="$RPM_BUILD_ROOT" libdir="%{_libdir}" libexecdir="%{_libexecdir}"
  51. # FIXME: We might need to enable this part for backward compat with the
  52. # Red Hat / Fedora 'utempter' package:
  53. #
  54. # mkdir -p %{_sbindir}
  55. # ln -sf %{helperdir}/utempter %{_sbindir}/utempter
  56. # NOTE: Static lib intentionally disabled.
  57. rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
  58. %clean
  59. rm -rf $RPM_BUILD_ROOT
  60. %pre
  61. {
  62. %{_sbindir}/groupadd -g 22 -r -f utmp || :
  63. %{_sbindir}/groupadd -g 35 -r -f utempter || :
  64. }
  65. %post
  66. {
  67. /sbin/ldconfig
  68. for file in /var/log/wtmp /var/run/utmp ; do
  69. if [ -f $file ]; then
  70. chown root:utmp $file
  71. chmod 664 $file
  72. fi
  73. done
  74. }
  75. %postun -p /sbin/ldconfig
  76. %if %{build_compat32}
  77. %post -n compat32-%{name} -p /sbin/ldconfig
  78. %postun -n compat32-%{name} -p /sbin/ldconfig
  79. %endif
  80. %files
  81. %defattr(-,root,root,-)
  82. %doc COPYING README
  83. %{_libdir}/libutempter.so.*
  84. %dir %attr(755,root,utempter) %{_libexecdir}/utempter
  85. %attr(2711,root,utmp) %{_libexecdir}/utempter/utempter
  86. # FIXME: If a symlink is needed for compat here, uncomment the code in the
  87. # install section and this as well:
  88. #%{_sbindir}/utempter
  89. %files devel
  90. %defattr(-,root,root,-)
  91. %{_includedir}/utempter.h
  92. %{_libdir}/libutempter.so
  93. %if %{build_compat32}
  94. %files -n compat32-%{name}
  95. %defattr(-,root,root)
  96. %{_libdir}/libutempter.so.*
  97. %files -n compat32-%{name}-devel
  98. %defattr(-,root,root)
  99. %{_libdir}/libutempter.so
  100. %endif
  101. %changelog
  102. * Sun Mar 27 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.5-4
  103. - rebuilt with new toolchain
  104. * Sun Jul 27 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.5-3
  105. - initial build for Vine Linux
  106. - replaced utempter
  107. * Fri Oct 28 2005 NAKAMURA Kenta <kenta@c.csce.kyushu-u.ac.jp> 0.5.5-6vl2
  108. - added compat32- packages for x86_64 architecture support
  109. * Mon Jun 13 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.5.5-6vl1
  110. - based on Fedora 0.5.5-6
  111. * Mon Apr 19 2004 Mike A. Harris <mharris@redhat.com> 0.5.5-1
  112. - [SECURITY] Fix CAN-2004-0233 utempter directory traversal symlink attack
  113. issue for immediate erratum release.
  114. - Build all-arch test package 0.5.5-1 in dist-fc2-scratch
  115. * Mon Feb 23 2004 Mike A. Harris <mharris@redhat.com> 0.5.4-1
  116. - Rewrote post install script to be a bit cleaner and rebuilt in rawhide to
  117. pick up twaugh's chown change
  118. - Added 'srpm-x' target to Makefile for package maintainer SRPM building
  119. * Mon Feb 23 2004 Tim Waugh <twaugh@redhat.com>
  120. - Use ':' instead of '.' as separator for chown.
  121. * Sat Oct 4 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.5.3-2vl1
  122. - based on Redhat Rawhide 0.5.3-2
  123. * Fri May 30 2003 Mike A. Harris <mharris@redhat.com> 0.5.3-1
  124. - Bump version and release and rebuild to strip debug info into .debuginfo
  125. package, as the Red Hat Linux 9 package shipped unstripped (#91664)
  126. - Updated license field to reflect dual license MIT style + LGPL
  127. - Changed spec file Copyright tag to proper License tag
  128. - Removed stupid crackrock "version" macro define
  129. * Thu Jun 20 2002 Elliot Lee <sopwith@redhat.com> 0.5.2-9
  130. - Don't strip binary
  131. - Thu Feb 24 2000 Erik Troan <ewt@redhat.com>
  132. - added LGPL notice
  133. * Wed Feb 20 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.2-4vl2
  134. - rebuild to remove rpmlib dependancy
  135. * Tue May 29 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
  136. - 0.5.2-4vl1
  137. - rebuilt for Vine Linux
  138. * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1.5-2
  139. - Autorebuild for GCC 4.3
  140. * Wed Nov 07 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  141. - 1.1.5-1
  142. - version upgrade
  143. - fix #246063
  144. * Tue Aug 21 2007 Adam Jackson <ajax@redhat.com> - 1.1.4-4
  145. - Rebuild for build id
  146. * Thu Jul 27 2006 Mike A. Harris <mharris@redhat.com> 1.1.4-3.fc6
  147. - Create 'utempter' group with official allocated GID==35 (from setup package).
  148. * Tue Jul 25 2006 Mike A. Harris <mharris@redhat.com> 1.1.4-2.fc6
  149. - Removed usage of rpm macros inside the spec changelog (#200051)
  150. - Removed non-UTF-8 chars from changelog.
  151. * Mon Jul 24 2006 Mike A. Harris <mharris@redhat.com> 1.1.4-1.fc6
  152. - Initial build of Dimitry's libutempter replacement for Fedora Core.
  153. - Reworked the upstream spec file for Fedora packaging compliance.
  154. - Removed static lib subpackage as we dont ship those.
  155. * Fri Dec 09 2005 Dmitry V. Levin <ldv@altlinux.org> 1.1.4-alt1
  156. - Enabled almost all diagnostics supported by gcc and fixed all
  157. issues found by gcc-3.4.4-alt3.
  158. - Added FreeBSD support, based on patches from Gentoo/FreeBSD.
  159. - Makefile:
  160. + Fixed few portability issues reported by Gentoo developers.
  161. - libutempter: Linked with -Wl,-z,defs.
  162. - utempter:
  163. + Fixed struct utmp initialization on 64-bit architectures
  164. with 32-bit backwards compatibility enabled (like x86_64).
  165. + Linked with -Wl,-z,now, i.e., marked it to tell the dynamic
  166. linker to resolve all symbols when the program is started.
  167. Suggested by Gentoo developers.
  168. * Thu Aug 18 2005 Dmitry V. Levin <ldv@altlinux.org> 1.1.3-alt1
  169. - Restricted list of global symbols exported by the library.
  170. - Updated FSF postal address.
  171. * Sun Sep 05 2004 Dmitry V. Levin <ldv@altlinux.org> 1.1.2-alt1
  172. - Added multilib support.
  173. * Fri Feb 14 2003 Dmitry V. Levin <ldv@altlinux.org> 1.1.1-alt1
  174. - iface.c: don't block SIGCHLD; redefine signal handler instead.
  175. * Mon Dec 23 2002 Dmitry V. Levin <ldv@altlinux.org> 1.1.0-alt1
  176. - Changed soname back to libutempter.so.0, introduced versioning.
  177. * Tue Sep 24 2002 Dmitry V. Levin <ldv@altlinux.org> 1.0.7-alt1
  178. - If helper execution fails, try saved group ID.
  179. * Tue May 21 2002 Dmitry V. Levin <ldv@altlinux.org> 1.0.6-alt1
  180. - New function: utempter_set_helper.
  181. * Mon Dec 10 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.5-alt1
  182. - iface.c: block SIGCHLD instead of redefine signal handler.
  183. * Wed Nov 21 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.4-alt1
  184. - utempter.h: do not use "__attribute ((unused))".
  185. * Tue Nov 13 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.3-alt1
  186. - Added compatibility declarations to ease upgrade of old applications.
  187. - Added small README file.
  188. - Corrected provides.
  189. * Thu Nov 08 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.2-alt1
  190. - Added compatibility library to ease upgrade of old applications.
  191. * Mon Nov 05 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.1-alt1
  192. - Indented code a bit (Solar request).
  193. * Mon Oct 15 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.0-alt1
  194. - Rewritten the code completely.
  195. - Renamed to libutempter.
  196. - Corrected the package description.
  197. - FHSificated (yes, there are no more {_sbindir}/utempter).
  198. - Libificated.
  199. * Fri Oct 12 2001 Dmitry V. Levin <ldv@altlinux.ru> 0.5.2-alt4
  200. - {_libdir}/utempter sounds better so use it as helper directory.
  201. * Thu Oct 11 2001 Dmitry V. Levin <ldv@altlinux.ru> 0.5.2-alt3
  202. - Specfile cleanup.
  203. - Owl-compatible changes:
  204. + added utempter group;
  205. + utempter binary moved to {_libdir}/utempter.d,
  206. owned by group utempter with 710 permissions.
  207. * Thu Jun 28 2001 Sergie Pugachev <fd_rag@altlinux.ru> 0.5.2-alt1
  208. - new version
  209. * Tue Dec 05 2000 AEN <aen@logic.ru>
  210. - build for RE
  211. * Tue Jul 25 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.5.1-4mdk
  212. - BM
  213. * Fri May 19 2000 Pixel <pixel@mandrakesoft.com> 0.5.1-3mdk
  214. - add -devel
  215. - add soname
  216. - spec helper cleanup
  217. * Sat Apr 08 2000 Christopher Molnar <molnarc@mandrakesoft.com> 0.5.1-2mdk
  218. - changed group
  219. * Tue Oct 26 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
  220. - 0.5.1
  221. - fix utmp as group 22.
  222. - strip utempter.
  223. - defattr to root.
  224. * Thu Jun 10 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.com>
  225. - Mandrake adaptions
  226. * Fri Jun 4 1999 Jeff Johnson <jbj@redhat.com>
  227. - ignore SIGCHLD while processing utmp.