libutempter-vl.spec 9.7 KB

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