libutempter-vl.spec 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. %define utempter_compat_ver 0.5.5
  2. Name: libutempter
  3. Summary: A privileged helper for utmp/wtmp updates
  4. Version: 1.1.6
  5. Release: 1%{?_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 Aug 24 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.6-1
  103. - update to 1.1.6
  104. * Sun Mar 27 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.5-4
  105. - rebuilt with new toolchain
  106. * Sun Jul 27 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.5-3
  107. - initial build for Vine Linux
  108. - replaced utempter
  109. * Fri Oct 28 2005 NAKAMURA Kenta <kenta@c.csce.kyushu-u.ac.jp> 0.5.5-6vl2
  110. - added compat32- packages for x86_64 architecture support
  111. * Mon Jun 13 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.5.5-6vl1
  112. - based on Fedora 0.5.5-6
  113. * Mon Apr 19 2004 Mike A. Harris <mharris@redhat.com> 0.5.5-1
  114. - [SECURITY] Fix CAN-2004-0233 utempter directory traversal symlink attack
  115. issue for immediate erratum release.
  116. - Build all-arch test package 0.5.5-1 in dist-fc2-scratch
  117. * Mon Feb 23 2004 Mike A. Harris <mharris@redhat.com> 0.5.4-1
  118. - Rewrote post install script to be a bit cleaner and rebuilt in rawhide to
  119. pick up twaugh's chown change
  120. - Added 'srpm-x' target to Makefile for package maintainer SRPM building
  121. * Mon Feb 23 2004 Tim Waugh <twaugh@redhat.com>
  122. - Use ':' instead of '.' as separator for chown.
  123. * Sat Oct 4 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.5.3-2vl1
  124. - based on Redhat Rawhide 0.5.3-2
  125. * Fri May 30 2003 Mike A. Harris <mharris@redhat.com> 0.5.3-1
  126. - Bump version and release and rebuild to strip debug info into .debuginfo
  127. package, as the Red Hat Linux 9 package shipped unstripped (#91664)
  128. - Updated license field to reflect dual license MIT style + LGPL
  129. - Changed spec file Copyright tag to proper License tag
  130. - Removed stupid crackrock "version" macro define
  131. * Thu Jun 20 2002 Elliot Lee <sopwith@redhat.com> 0.5.2-9
  132. - Don't strip binary
  133. - Thu Feb 24 2000 Erik Troan <ewt@redhat.com>
  134. - added LGPL notice
  135. * Wed Feb 20 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 0.5.2-4vl2
  136. - rebuild to remove rpmlib dependancy
  137. * Tue May 29 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org>
  138. - 0.5.2-4vl1
  139. - rebuilt for Vine Linux
  140. * Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.1.5-2
  141. - Autorebuild for GCC 4.3
  142. * Wed Nov 07 2007 Andreas Bierfert <andreas.bierfert[AT]lowlatency.de>
  143. - 1.1.5-1
  144. - version upgrade
  145. - fix #246063
  146. * Tue Aug 21 2007 Adam Jackson <ajax@redhat.com> - 1.1.4-4
  147. - Rebuild for build id
  148. * Thu Jul 27 2006 Mike A. Harris <mharris@redhat.com> 1.1.4-3.fc6
  149. - Create 'utempter' group with official allocated GID==35 (from setup package).
  150. * Tue Jul 25 2006 Mike A. Harris <mharris@redhat.com> 1.1.4-2.fc6
  151. - Removed usage of rpm macros inside the spec changelog (#200051)
  152. - Removed non-UTF-8 chars from changelog.
  153. * Mon Jul 24 2006 Mike A. Harris <mharris@redhat.com> 1.1.4-1.fc6
  154. - Initial build of Dimitry's libutempter replacement for Fedora Core.
  155. - Reworked the upstream spec file for Fedora packaging compliance.
  156. - Removed static lib subpackage as we dont ship those.
  157. * Fri Dec 09 2005 Dmitry V. Levin <ldv@altlinux.org> 1.1.4-alt1
  158. - Enabled almost all diagnostics supported by gcc and fixed all
  159. issues found by gcc-3.4.4-alt3.
  160. - Added FreeBSD support, based on patches from Gentoo/FreeBSD.
  161. - Makefile:
  162. + Fixed few portability issues reported by Gentoo developers.
  163. - libutempter: Linked with -Wl,-z,defs.
  164. - utempter:
  165. + Fixed struct utmp initialization on 64-bit architectures
  166. with 32-bit backwards compatibility enabled (like x86_64).
  167. + Linked with -Wl,-z,now, i.e., marked it to tell the dynamic
  168. linker to resolve all symbols when the program is started.
  169. Suggested by Gentoo developers.
  170. * Thu Aug 18 2005 Dmitry V. Levin <ldv@altlinux.org> 1.1.3-alt1
  171. - Restricted list of global symbols exported by the library.
  172. - Updated FSF postal address.
  173. * Sun Sep 05 2004 Dmitry V. Levin <ldv@altlinux.org> 1.1.2-alt1
  174. - Added multilib support.
  175. * Fri Feb 14 2003 Dmitry V. Levin <ldv@altlinux.org> 1.1.1-alt1
  176. - iface.c: don't block SIGCHLD; redefine signal handler instead.
  177. * Mon Dec 23 2002 Dmitry V. Levin <ldv@altlinux.org> 1.1.0-alt1
  178. - Changed soname back to libutempter.so.0, introduced versioning.
  179. * Tue Sep 24 2002 Dmitry V. Levin <ldv@altlinux.org> 1.0.7-alt1
  180. - If helper execution fails, try saved group ID.
  181. * Tue May 21 2002 Dmitry V. Levin <ldv@altlinux.org> 1.0.6-alt1
  182. - New function: utempter_set_helper.
  183. * Mon Dec 10 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.5-alt1
  184. - iface.c: block SIGCHLD instead of redefine signal handler.
  185. * Wed Nov 21 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.4-alt1
  186. - utempter.h: do not use "__attribute ((unused))".
  187. * Tue Nov 13 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.3-alt1
  188. - Added compatibility declarations to ease upgrade of old applications.
  189. - Added small README file.
  190. - Corrected provides.
  191. * Thu Nov 08 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.2-alt1
  192. - Added compatibility library to ease upgrade of old applications.
  193. * Mon Nov 05 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.1-alt1
  194. - Indented code a bit (Solar request).
  195. * Mon Oct 15 2001 Dmitry V. Levin <ldv@alt-linux.org> 1.0.0-alt1
  196. - Rewritten the code completely.
  197. - Renamed to libutempter.
  198. - Corrected the package description.
  199. - FHSificated (yes, there are no more {_sbindir}/utempter).
  200. - Libificated.
  201. * Fri Oct 12 2001 Dmitry V. Levin <ldv@altlinux.ru> 0.5.2-alt4
  202. - {_libdir}/utempter sounds better so use it as helper directory.
  203. * Thu Oct 11 2001 Dmitry V. Levin <ldv@altlinux.ru> 0.5.2-alt3
  204. - Specfile cleanup.
  205. - Owl-compatible changes:
  206. + added utempter group;
  207. + utempter binary moved to {_libdir}/utempter.d,
  208. owned by group utempter with 710 permissions.
  209. * Thu Jun 28 2001 Sergie Pugachev <fd_rag@altlinux.ru> 0.5.2-alt1
  210. - new version
  211. * Tue Dec 05 2000 AEN <aen@logic.ru>
  212. - build for RE
  213. * Tue Jul 25 2000 Thierry Vignaud <tvignaud@mandrakesoft.com> 0.5.1-4mdk
  214. - BM
  215. * Fri May 19 2000 Pixel <pixel@mandrakesoft.com> 0.5.1-3mdk
  216. - add -devel
  217. - add soname
  218. - spec helper cleanup
  219. * Sat Apr 08 2000 Christopher Molnar <molnarc@mandrakesoft.com> 0.5.1-2mdk
  220. - changed group
  221. * Tue Oct 26 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
  222. - 0.5.1
  223. - fix utmp as group 22.
  224. - strip utempter.
  225. - defattr to root.
  226. * Thu Jun 10 1999 Bernhard Rosenkraenzer <bero@mandrakesoft.com>
  227. - Mandrake adaptions
  228. * Fri Jun 4 1999 Jeff Johnson <jbj@redhat.com>
  229. - ignore SIGCHLD while processing utmp.