attr-vl.spec 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. Summary: Utilities for managing filesystem extended attributes
  3. Name: attr
  4. Version: 2.4.44
  5. Release: 1%{?_dist_release}
  6. License: GPLv2+
  7. URL: http://oss.sgi.com/projects/xfs/
  8. Group: System Environment/Base
  9. Source: http://download.savannah.gnu.org/releases-noredirect/attr/attr-%{version}.src.tar.gz
  10. # a file available in the upstream git repo, but not in the release
  11. Source2: sort-getfattr-output
  12. # make it ready for rpmbuild
  13. Patch1: attr-2.4.32-build.patch
  14. # bz #485473
  15. Patch2: attr-2.4.43-leak.patch
  16. # prepare the test-suite for SELinux
  17. Patch3: attr-2.4.44-tests.patch
  18. # silence compile-time warnings
  19. Patch4: attr-2.4.44-warnings.patch
  20. # setfattr.1: document supported encodings of values (#587516)
  21. Patch5: attr-2.4.44-bz587516.patch
  22. # getfattr: encode NULs properly with --encoding=text (#650539)
  23. Patch6: attr-2.4.44-bz650539.patch
  24. # getfattr: return non-zero exit code on failure (#660619)
  25. Patch7: attr-2.4.44-bz660619.patch
  26. # walk_tree: do not follow symlink to directory with -h (#660613)
  27. Patch8: attr-2.4.44-bz660613.patch
  28. # fix typos in attr(1) man page (#669095)
  29. Patch9: attr-2.4.44-bz669095.patch
  30. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  31. BuildRequires: gettext
  32. BuildRequires: libtool
  33. Requires: libattr = %{version}-%{release}
  34. Conflicts: xfsdump < 2.0.0
  35. %description
  36. A set of tools for manipulating extended attributes on filesystem
  37. objects, in particular getfattr(1) and setfattr(1).
  38. An attr(1) command is also provided which is largely compatible
  39. with the SGI IRIX tool of the same name.
  40. %package -n libattr
  41. Summary: Dynamic library for extended attribute support
  42. Group: System Environment/Libraries
  43. License: LGPLv2+
  44. %description -n libattr
  45. This package contains the libattr.so dynamic library which contains
  46. the extended attribute system calls and library functions.
  47. %package -n libattr-devel
  48. Summary: Extended attribute static libraries and headers
  49. Group: Development/Libraries
  50. License: LGPLv2+
  51. Requires: libattr = %{version}-%{release}
  52. %description -n libattr-devel
  53. This package contains the libraries and header files needed to
  54. develop programs which make use of extended attributes.
  55. For Linux programs, the documented system call API is the
  56. recommended interface, but an SGI IRIX compatibility interface
  57. is also provided.
  58. Currently only ext2, ext3 and XFS support extended attributes.
  59. The SGI IRIX compatibility API built above the Linux system calls is
  60. used by programs such as xfsdump(8), xfsrestore(8) and xfs_fsr(8).
  61. You should install libattr-devel if you want to develop programs
  62. which make use of extended attributes. If you install libattr-devel,
  63. you'll also want to install attr.
  64. # compat32
  65. %package -n compat32-libattr
  66. Summary: Dynamic library for extended attribute support
  67. Group: System Environment/Libraries
  68. License: LGPLv2+
  69. %description -n compat32-libattr
  70. This package contains the libattr.so dynamic library which contains
  71. the extended attribute system calls and library functions.
  72. %package -n compat32-libattr-devel
  73. Summary: Extended attribute static libraries and headers
  74. Group: Development/Libraries
  75. License: LGPLv2+
  76. Requires: libattr-devel = %{version}-%{release}
  77. Requires: compat32-libattr = %{version}-%{release}
  78. %description -n compat32-libattr-devel
  79. This package contains the libraries and header files needed to
  80. develop programs which make use of extended attributes.
  81. For Linux programs, the documented system call API is the
  82. recommended interface, but an SGI IRIX compatibility interface
  83. is also provided.
  84. Currently only ext2, ext3 and XFS support extended attributes.
  85. The SGI IRIX compatibility API built above the Linux system calls is
  86. used by programs such as xfsdump(8), xfsrestore(8) and xfs_fsr(8).
  87. You should install libattr-devel if you want to develop programs
  88. which make use of extended attributes. If you install libattr-devel,
  89. you'll also want to install attr.
  90. %prep
  91. %setup -q
  92. %setup -q
  93. %patch1 -p1
  94. %patch2 -p1
  95. %patch3 -p1
  96. %patch4 -p1
  97. %patch5 -p1
  98. %patch6 -p1
  99. %patch7 -p1
  100. %patch8 -p1
  101. %patch9 -p1
  102. # test-suite helper script
  103. install -m0755 %{SOURCE2} test/
  104. %build
  105. # attr abuses libexecdir
  106. %configure --libdir=/%{_lib} --libexecdir=%{_libdir}
  107. make %{?_smp_mflags} LIBTOOL="libtool --tag=CC"
  108. %install
  109. rm -rf $RPM_BUILD_ROOT
  110. make install DESTDIR=$RPM_BUILD_ROOT
  111. make install-dev DESTDIR=$RPM_BUILD_ROOT
  112. make install-lib DESTDIR=$RPM_BUILD_ROOT
  113. # get rid of libattr.a and libattr.la
  114. rm -f $RPM_BUILD_ROOT/%{_lib}/libattr.a
  115. rm -f $RPM_BUILD_ROOT/%{_lib}/libattr.la
  116. rm -f $RPM_BUILD_ROOT%{_libdir}/libattr.a
  117. rm -f $RPM_BUILD_ROOT%{_libdir}/libattr.la
  118. # fix links to shared libs and permissions
  119. rm -f $RPM_BUILD_ROOT/%{_libdir}/libattr.so
  120. ln -sf ../../%{_lib}/libattr.so $RPM_BUILD_ROOT/%{_libdir}/libattr.so
  121. chmod 0755 $RPM_BUILD_ROOT/%{_lib}/libattr.so.*.*.*
  122. %find_lang %{name}
  123. %check
  124. if ./setfattr/setfattr -n user.name -v value .; then
  125. make tests || exit $?
  126. # FIXME: root-tests are not ready for the SELinux
  127. #if test 0 = `id -u`; then
  128. # make root-tests || exit $?
  129. #fi
  130. else
  131. echo '*** xattrs are probably not supported by the file system,' \
  132. 'the test-suite will NOT run ***'
  133. fi
  134. %clean
  135. rm -rf $RPM_BUILD_ROOT
  136. %post -n libattr -p /sbin/ldconfig
  137. %postun -n libattr -p /sbin/ldconfig
  138. %post -n compat32-libattr -p /sbin/ldconfig
  139. %postun -n compat32-libattr -p /sbin/ldconfig
  140. %files -f %{name}.lang
  141. %defattr(-,root,root)
  142. %doc doc
  143. %{_bindir}/attr
  144. %{_bindir}/getfattr
  145. %{_bindir}/setfattr
  146. %{_mandir}/man1/attr.1*
  147. %{_mandir}/man1/getfattr.1*
  148. %{_mandir}/man1/setfattr.1*
  149. %{_mandir}/man5/attr.5*
  150. %files -n libattr-devel
  151. %defattr(-,root,root)
  152. /%{_lib}/libattr.so
  153. %{_includedir}/attr
  154. %{_libdir}/libattr.*
  155. %{_mandir}/man2/*attr.2*
  156. %{_mandir}/man3/attr_*.3.*
  157. %files -n libattr
  158. /%{_lib}/libattr.so.*
  159. # compat32
  160. %if %{build_compat32}
  161. %files -n compat32-libattr-devel
  162. %defattr(-,root,root)
  163. /%{_lib}/libattr.so
  164. %{_libdir}/libattr.*
  165. %files -n compat32-libattr
  166. /%{_lib}/libattr.so.*
  167. %endif
  168. %changelog
  169. * Sat Apr 9 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.44-1
  170. - new upstream release
  171. - remove static library from devel package
  172. - added Patch2-9
  173. * Tue Mar 29 2011 Kamil Dudka <kdudka@redhat.com> 2.2.44-8
  174. - fix typos in attr(1) man page (#669095)
  175. * Wed Dec 22 2010 Kamil Dudka <kdudka@redhat.com> 2.2.44-6
  176. - setfattr.1: document supported encodings of values (#587516)
  177. - getfattr: encode NULs properly with --encoding=text (#650539)
  178. - getfattr: return non-zero exit code on failure (#660619)
  179. - walk_tree: do not follow symlink to directory with -h (#660613)
  180. * Tue May 25 2010 Kamil Dudka <kdudka@redhat.com> 2.2.44-5
  181. - let attr depend on the same version of libattr (#595689)
  182. - silence compile-time warnings
  183. * Wed Feb 18 2009 Zdenek Prikryl <zprikryl@redhat.com> 2.4.43-2
  184. - Fixed memory leaks (#485473)
  185. * Wed Jul 15 2009 NAKAMURA Kenta <kenta@vinelinux.org> 2.4.43-2
  186. - added compat32 package for x86_64 arch support
  187. * Wed Jul 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.43-1
  188. - new upstream release
  189. * Mon Jun 30 2008 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 2.4.41-2
  190. - initial build for Vine Linux
  191. * Tue Feb 13 2008 Zdenek Prikryl <zprikryl@redhat.com> 2.4.41-1
  192. - New version 2.4.41
  193. - Removed useless attr-2.0.8-docperms.patch
  194. * Wed Oct 31 2007 Zdenek Prikryl <zprikryl@redhat.com> 2.4.39-1
  195. - New version 2.4.39
  196. - Resolves #284121
  197. * Tue Oct 30 2007 Zdenek Prikryl <zprikryl@redhat.com> 2.4.38-2
  198. - Removed explicit Requires(post + postun)
  199. - Resolves #225290
  200. * Tue Jul 31 2007 Zdenek Prikryl <zprikryl@redhat.com> 2.4.38-1
  201. - New version 2.4.38
  202. - Resolves #245415
  203. * Fri Feb 23 2007 Karsten Hopp <karsten@redhat.com> 2.4.32-2
  204. - add disttag
  205. - remove trailing dot from summary
  206. - fix buildroot
  207. - -devel package requires same libattr version
  208. - change prereq to Requires(post)
  209. - escape macro in changelog
  210. - replace absolute link with relative link (libattr.so)
  211. - use %%doc macro
  212. * Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.4.32-1.1
  213. - rebuild
  214. * Wed Jul 5 2006 Thomas Woerner <twoerne@redhat.com> 2.4.32-1
  215. - new version 2.4.32
  216. - fixes segmentation fault in attr, which affects #189106
  217. * Wed Jun 7 2006 Jeremy Katz <katzj@redhat.com> - 2.4.28-2
  218. - rebuild for -devel deps
  219. * Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.4.28-1.2
  220. - bump again for double-long bug on ppc(64)
  221. * Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.4.28-1.1
  222. - rebuilt for new gcc4.1 snapshot and glibc changes
  223. * Fri Feb 3 2006 Thomas Woerner <twoerner@redhat.com> 2.4.28-1
  224. - new version 2.4.28
  225. * Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
  226. - rebuilt
  227. * Tue Dec 6 2005 Thomas Woerner <twoerner@redhat.com> 2.4.24-2
  228. - spec file cleanup
  229. - mark po files as lang specific
  230. * Sun Nov 06 2005 Florian La Roche <laroche@redhat.com>
  231. - 2.4.24
  232. * Wed Sep 28 2005 Than Ngo <than@redhat.com> 2.4.23-1
  233. - update to 2.4.23
  234. * Wed Sep 28 2005 Than Ngo <than@redhat.com> 2.4.16-6
  235. - get rid of *.la files
  236. - remove duplicate doc files
  237. * Wed Feb 9 2005 Stephen C. Tweedie <sct@redhat.com> 2.4.16-4
  238. - Rebuild
  239. * Fri Sep 10 2004 Stephen C. Tweedie <sct@redhat.com> 2.4.16-3
  240. - Build requires libtool >= 1.5
  241. * Thu Aug 19 2004 Phil Knirsch <pknirsch@redhat.com> 2.4.16-2
  242. - Make libattr.so.* executable.
  243. * Thu Aug 19 2004 Phil Knirsch <pknirsch@redhat.com> 2.4.16-1
  244. - Update to latest upstream version.
  245. * Sun Aug 8 2004 Alan Cox <alan@redhat.com> 2.4.1-6
  246. - Fix bug #125304 (Steve Grubb: build requires gettext)
  247. * Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
  248. - rebuilt
  249. * Wed Mar 31 2004 Stephen C. Tweedie <sct@redhat.com> 2.4.1-4
  250. - Add missing %%defattr
  251. * Tue Mar 30 2004 Stephen C. Tweedie <sct@redhat.com> 2.4.1-3
  252. - Add /usr/include/attr to files manifest
  253. - Fix location of doc files, add main doc dir to files manifest
  254. * Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
  255. - rebuilt
  256. * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
  257. - rebuilt
  258. * Tue Aug 5 2003 Elliot Lee <sopwith@redhat.com> 2.4.1-2
  259. - Fix libtool
  260. * Tue Jun 3 2003 Stephen C. Tweedie <sct@redhat.com> 2.4.1-1
  261. - update to attr-2.4.1
  262. * Tue Jan 28 2003 Michael K. Johnson <johnsonm@redhat.com> 2.2.0-1
  263. - update/rebuild
  264. * Sat Jan 4 2003 Jeff Johnson <jbj@redhat.com> 2.0.8-6
  265. - set execute bits on library so that requires are generated.
  266. * Thu Nov 21 2002 Elliot Lee <sopwith@redhat.com> 2.0.8-5
  267. - Redo multilib patch to work everywhere
  268. * Wed Sep 11 2002 Than Ngo <than@redhat.com> 2.0.8-4
  269. - Added fix to install libs in correct directory on 64bit machine
  270. * Thu Aug 08 2002 Michael K. Johnson <johnsonm@redhat.com> 2.0.8-3
  271. - Made the package only own the one directory that is unique to it:
  272. /usr/include/attr
  273. * Wed Jun 26 2002 Michael K. Johnson <johnsonm@redhat.com> 2.0.8-2
  274. - get perl out of base with attr-2.0.8-docperms.patch
  275. * Mon Jun 24 2002 Michael K. Johnson <johnsonm@redhat.com> 2.0.8-1
  276. - Initial Red Hat package
  277. Made as few changes as possible relative to upstream packaging to
  278. make it easier to maintain long-term. This means that some of
  279. the techniques used here are definitely not standard Red Hat
  280. techniques. If you are looking for an example package to fit
  281. into Red Hat Linux transparently, this would not be the one to
  282. pick.
  283. - attr-devel -> libattr-devel