acpica-tools-vl.spec 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404
  1. Name: acpica-tools
  2. Version: 20190509
  3. Release: 1%{?_dist_release}
  4. Summary: ACPICA tools for the development and debug of ACPI tables
  5. Group: Development/Languages
  6. License: GPLv2
  7. URL: https://www.acpica.org/
  8. Source0: https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar.gz
  9. Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz
  10. Source2: README.Fedora
  11. Source3: iasl.1
  12. Source4: acpibin.1
  13. Source5: acpidump.1
  14. Source6: acpiexec.1
  15. Source7: acpihelp.1
  16. Source8: acpinames.1
  17. Source9: acpisrc.1
  18. Source10: acpixtract.1
  19. Source11: acpiexamples.1
  20. Source12: badcode.asl.result
  21. Source13: grammar.asl.result
  22. Source14: converterSample.asl.result
  23. Source15: run-misc-tests.sh
  24. Source16: COPYING
  25. Patch0: big-endian.patch
  26. Patch1: unaligned.patch
  27. Patch2: OPT_LDFLAGS.patch
  28. Patch3: int-format.patch
  29. Patch4: f23-harden.patch
  30. Patch5: template.patch
  31. Patch6: ppc64le.patch
  32. Patch7: arm7hl.patch
  33. Patch8: big-endian-v2.patch
  34. Patch9: simple-64bit.patch
  35. Patch10: mips-be-fix.patch
  36. Patch11: cve-2017-13693.patch
  37. Patch12: cve-2017-13694.patch
  38. Patch13: cve-2017-13695.patch
  39. Patch14: str-trunc-warn.patch
  40. Patch15: ptr-cast.patch
  41. Patch16: aslcodegen.patch
  42. Patch17: facp.patch
  43. BuildRequires: bison patchutils flex
  44. # The previous iasl package contained only a very small subset of these tools
  45. # and it produced only the iasl package listed below; further, the pmtools
  46. # package -- which provides acpidump -- also provides a /usr/sbin/acpixtract
  47. # that we don't really want to collide with
  48. Provides: acpixtract >= 20120913-7
  49. Provides: iasl = %{version}-%{release}
  50. Obsoletes: iasl < 20120913-8
  51. # The pmtools package provides an obsolete and deprecated version of the
  52. # acpidump command from lesswatts.org which has now been taken off-line.
  53. # ACPICA, however, is providing a new version and we again do not want to
  54. # conflict with the command name.
  55. Provides: acpidump >= 20100513-5
  56. Provides: pmtools = %{version}-%{release}
  57. Obsoletes: pmtools < 20100513-6
  58. %description
  59. The ACPI Component Architecture (ACPICA) project provides an OS-independent
  60. reference implementation of the Advanced Configuration and Power Interface
  61. Specification (ACPI). ACPICA code contains those portions of ACPI meant to
  62. be directly integrated into the host OS as a kernel-resident subsystem, and
  63. a small set of tools to assist in developing and debugging ACPI tables.
  64. This package contains only the user-space tools needed for ACPI table
  65. development, not the kernel implementation of ACPI. The following commands
  66. are installed:
  67. -- iasl: compiles ASL (ACPI Source Language) into AML (ACPI Machine
  68. Language), suitable for inclusion as a DSDT in system firmware.
  69. It also can disassemble AML, for debugging purposes.
  70. -- acpibin: performs basic operations on binary AML files (e.g.,
  71. comparison, data extraction)
  72. -- acpidump: write out the current contents of ACPI tables
  73. -- acpiexec: simulate AML execution in order to debug method definitions
  74. -- acpihelp: display help messages describing ASL keywords and op-codes
  75. -- acpinames: display complete ACPI name space from input AML
  76. -- acpisrc: manipulate the ACPICA source tree and format source files
  77. for specific environments
  78. -- acpixtract: extract binary ACPI tables from acpidump output (see
  79. also the pmtools package)
  80. This version of the tools is being released under GPLv2 license.
  81. %prep
  82. %setup -q -n acpica-unix2-%{version}
  83. gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f -
  84. %patch0 -p1 -b .big-endian
  85. %patch1 -p1 -b .unaligned
  86. %patch2 -p1 -b .OPT_LDFLAGS
  87. %patch3 -p1 -b .int-format
  88. %patch4 -p1 -b .f23-harden
  89. # do not preserve a backup for this patch; it alters the results
  90. # of the template test case and forces it to fail
  91. %patch5 -p1
  92. %patch6 -p1 -b .ppc64le
  93. %patch7 -p1 -b .arm7hl
  94. %patch8 -p1 -b .big-endian-v2
  95. %patch9 -p1 -b .simple-64bit
  96. %patch10 -p1 -b .mips-be-fix
  97. %patch11 -p1 -b .cve-2017-13693
  98. %patch12 -p1 -b .cve-2017-13694
  99. %patch13 -p1 -b .cve-2017-13695
  100. %patch14 -p1 -b .str-trunc-warn
  101. %patch15 -p1 -b .ptr-cast
  102. %patch16 -p1 -b .aslcodegen
  103. %patch17 -p1 -b .facp
  104. cp -p %{SOURCE2} README.Fedora
  105. cp -p %{SOURCE3} iasl.1
  106. cp -p %{SOURCE4} acpibin.1
  107. cp -p %{SOURCE5} acpidump.1
  108. cp -p %{SOURCE6} acpiexec.1
  109. cp -p %{SOURCE7} acpihelp.1
  110. cp -p %{SOURCE8} acpinames.1
  111. cp -p %{SOURCE9} acpisrc.1
  112. cp -p %{SOURCE10} acpixtract.1
  113. cp -p %{SOURCE11} acpiexamples.1
  114. cp -p %{SOURCE12} badcode.asl.result
  115. cp -p %{SOURCE13} grammar.asl.result
  116. cp -p %{SOURCE14} converterSample.asl.result
  117. cp -p %{SOURCE15} tests/run-misc-tests.sh
  118. chmod a+x tests/run-misc-tests.sh
  119. cp -p %{SOURCE16} COPYING
  120. # spurious executable permissions on text files in upstream
  121. chmod a-x changes.txt
  122. chmod a-x source/compiler/new_table.txt
  123. %build
  124. CWARNINGFLAGS="\
  125. -std=c99\
  126. -Wall\
  127. -Wbad-function-cast\
  128. -Wdeclaration-after-statement\
  129. -Werror\
  130. -Wformat=2\
  131. -Wmissing-declarations\
  132. -Wmissing-prototypes\
  133. -Wstrict-aliasing=0\
  134. -Wstrict-prototypes\
  135. -Wswitch-default\
  136. -Wpointer-arith\
  137. -Wundef\
  138. -Waddress\
  139. -Waggregate-return\
  140. -Winit-self\
  141. -Winline\
  142. -Wmissing-declarations\
  143. -Wmissing-field-initializers\
  144. -Wnested-externs\
  145. -Wold-style-definition\
  146. -Wno-format-nonliteral\
  147. -Wredundant-decls\
  148. -Wempty-body\
  149. -Woverride-init\
  150. -Wlogical-op\
  151. -Wmissing-parameter-type\
  152. -Wold-style-declaration\
  153. -Wtype-limits"
  154. export OPT_CFLAGS="%{optflags} $CWARNINGFLAGS"
  155. make %{_smp_mflags}
  156. %install
  157. # Install the binaries
  158. mkdir -p %{buildroot}%{_bindir}
  159. install -pD generate/unix/bin*/* %{buildroot}%{_bindir}/
  160. # Install the man pages
  161. mkdir -p %{buildroot}%{_mandir}/man1
  162. install -pDm 0644 *.1 %{buildroot}%{_mandir}/man1/
  163. %check
  164. cd tests
  165. # ASL tests
  166. ./aslts.sh # relies on non-zero exit
  167. [ $? -eq 0 ] || exit 1
  168. # misc tests
  169. ./run-misc-tests.sh %{buildroot}%{_bindir} %{version}
  170. # Template tests
  171. cd templates
  172. make
  173. if [ -f diff.log ]
  174. then
  175. if [ -s diff.log ]
  176. then
  177. exit 1 # implies errors occurred
  178. fi
  179. fi
  180. cd ..
  181. %pre
  182. if [ -e %{_bindir}/acpixtract-acpica ]
  183. then
  184. alternatives --remove acpixtract %{_bindir}/acpixtract-acpica
  185. fi
  186. if [ -e %{_bindir}/acpidump-acpica ]
  187. then
  188. alternatives --remove acpidump %{_bindir}/acpidump-acpica
  189. fi
  190. %postun
  191. if [ -e %{_bindir}/acpixtract-acpica ]
  192. then
  193. alternatives --remove acpixtract %{_bindir}/acpixtract-acpica
  194. fi
  195. if [ -e %{_bindir}/acpidump-acpica ]
  196. then
  197. alternatives --remove acpidump %{_bindir}/acpidump-acpica
  198. fi
  199. %files
  200. %license COPYING
  201. %doc changes.txt source/compiler/new_table.txt
  202. %doc README.Fedora
  203. %{_bindir}/*
  204. %{_mandir}/*/*
  205. %changelog
  206. * Sun Apr 12 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20190509-1
  207. - new upstream release.
  208. * Tue Feb 20 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 20180105-1
  209. - new upstream release.
  210. - dropped Patch0-6.
  211. - imported Patch0-12 from rawhide.
  212. * Sun Jul 13 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 20140424-1
  213. - initial build for Vine Linux
  214. * Fri Jun 6 2014 Dan Horák <dan[at]danny.cz> - 20140424-3
  215. - refresh the big endian patch so it applies correctly, fixes build on big endians
  216. * Thu May 22 2014 Al Stone <ahs3@redhat.com> - 20140424-2
  217. - Add ppc64le as a 64-bit arch in run-misc-tests.sh. Closes BZ#1098614.
  218. - Re-enable big-endian support in iasl.
  219. * Wed May 7 2014 Al Stone <ahs3@redhat.com> - 20140424-1
  220. - Update to latest upstream. Closes BZ#1091189.
  221. * Fri Apr 4 2014 Al Stone <ahs3@redhat.com> - 20140325-1
  222. - Update to latest upstream. Closes BZ#1080791.
  223. - Incorporated patch to fix broken symlinks. Closes BZ#1074256.
  224. - Add patch to fix missing .o files in aapits tests.
  225. * Wed Feb 26 2014 Al Stone <ahs3@redhat.com> - 20140214-1
  226. - Update to latest upstream. Closes BZ#1053396.
  227. - Remove temporary patch so that AAPITS will build and run.
  228. - Add patch to print asllookup.c warning properly on big endian;
  229. Closes BZ#1069178.
  230. * Tue Jan 21 2014 Al Stone <ahs3@redhat.com> - 20140114-1
  231. - Update to latest upstream. Closes BZ#1053396.
  232. - Remove temporary patch to add Makefile missing from upstream tarball.
  233. - Add temporary patch so that AAPITS will build and run.
  234. * Tue Jan 7 2014 Al Stone <ahs3@redhat.com> - 20131218-1
  235. - Update to latest upstream. Closes BZ#1044951.
  236. - Add temporary patch to add Makefile missing from upstream tarball.
  237. * Mon Nov 25 2013 Al Stone <ahs3@redhat.com> - 20131115-1
  238. - Update to latest upstream. Closes BZ#1031255.
  239. - Add a little code to workaround build problems that can occur (the tests
  240. will fail) when a build starts before midnight, but ends after midnight
  241. - Remove patch to include Makefile.config that was missing from tarball.
  242. * Wed Oct 09 2013 Al Stone <ahs3@redhat.com> - 20130927-1
  243. - Update to latest upstream. Closes BZ#1013090.
  244. - Add temporary patch to include Makefile.config being missing from tarball.
  245. * Fri Sep 13 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 20130823-5
  246. - correct iasl obs_ver
  247. * Tue Sep 10 2013 Dean Nelson <dnelson@redhat.com> - 20130823-4
  248. - Fix run-misc-tests.sh script to properly set the number of BITS to 64
  249. when run on a s390x system.
  250. * Tue Sep 10 2013 Michael Schwendt <mschwendt@fedoraproject.org> - 20130823-3
  251. - correct pmtools obs_ver
  252. * Tue Aug 27 2013 Al Stone <ahs3@redhat.com> - 20130823-2
  253. - Add in a copy of the GPLv2 text in order to comply with the requirement
  254. to always redistribute the terms of the license.
  255. * Mon Aug 26 2013 Al Stone <ahs3@redhat.com> - 20130823-1
  256. - Update to latest upstream source.
  257. * Tue Aug 20 2013 Al Stone <ahs3@redhat.com> - 20130725-2
  258. - Fix several rpmlint items (listed below)
  259. - Add versions to explicit provides for acpixtract, acpidump
  260. - Not all setup steps used -q
  261. - Setup executable test script (run-misc-tests.sh) differently
  262. - Removed unneeded commented out line with macros in it
  263. - Removed mixed use of spaces and tabs (all spaces now)
  264. - Corrected source URLs (upstream moved)
  265. * Sun Aug 18 2013 Al Stone <ahs3@redhat.com> - 20130725-1
  266. - Update to latest upstream source.
  267. * Wed Jul 24 2013 Al Stone <ahs3@redhat.com> - 20130626-1
  268. - Update to latest upstream source.
  269. - Move acpidump to acpidump-acpica so it be an alternative properly
  270. - Add basic man page for acpidump
  271. - Enable use of AAPITS tests during the check step
  272. * Sun Jun 02 2013 Al Stone <ahs3@redhat.com> - 20130517-2
  273. - Correct an oversight: we provide an acpidump in conflict with the
  274. version in pmtools (which appears to be dead upstream) but had not
  275. made it an alternative before
  276. * Tue May 28 2013 Al Stone <ahs3@redhat.com> - 20130517-1
  277. - Update to latest upstream source.
  278. - Remove acpica-tools-config.patch -- now in upstream
  279. - Remove iasl-signed-char.patch -- now in upstream
  280. - Updated debian-big_endian.patch
  281. - Updated debian-unaligned.patch
  282. * Mon May 13 2013 Al Stone <ahs3@redhat.com> - 20130328-1
  283. - Update to latest upstream source.
  284. * Wed Mar 20 2013 Al Stone <ahs3@redhat.com> - 20130214-2
  285. - Incorporate use of optflags macro in the build.
  286. - Remove extraneous rm -rf of buildroot.
  287. - Remove extraneous use of defattr in the files section.
  288. - Incorporate use of parallel make.
  289. - Remove extraneous use of the clean section.
  290. - Use simpler globbing in the files section.
  291. - Use simpler globbing in the install section.
  292. - Remove obsolete git notes from README.Fedora.
  293. - Remove ExcludeArch restrictions.
  294. * Mon Feb 18 2013 Al Stone <ahs3@redhat.com> - 20130214-1
  295. - New upstream.
  296. - Remove most of the config file patch; still need to remove -m{32,64}.
  297. - Clarify the licensing; this source is dual-licensed and is being released
  298. under the GPLv2 as allowed by the original Intel license.
  299. - Redo the misc tests so they compare results properly.
  300. * Wed Feb 06 2013 Al Stone <ahs3@redhat.com> - 20130117-6
  301. - Added a zero-fill to a date used in comparing testing results so that the
  302. comparison would be correct on days numbered < 10.
  303. * Thu Jan 31 2013 Al Stone <ahs3@redhat.com> - 20130117-5
  304. - Simplify versioning scheme and revert to the original scheme in use by
  305. iasl, which is use the latest official tarball date (2013017) as the
  306. version and 1%{?dist} as the release, to be incremented for packaging
  307. and bug fixes as needed.
  308. * Wed Jan 30 2013 Al Stone <ahs3@redhat.com> - 20130117-4
  309. - Do a little reset: go back to using just the original upstream tarball
  310. instead of the latest git; the snapshot approach was more complicated
  311. than needed.
  312. - Upstream tarballs split commands from test suites, so had to add the
  313. test suite back in as another Source: file.
  314. - Change versioning scheme to include the APCI specification level (5.0),
  315. the latest official tarball date (2013017) and a revision level (the
  316. .1 at the end) for packaging and bug fixes as needed.
  317. - Changed the License field to reflect the source tarball change; the release
  318. tarball is dual-licensed, Intel ACPI or GPLv2.
  319. - Updated patches to apply cleanly as needed.
  320. - Corrected Obsoletes and Provides version numbers.
  321. * Mon Jan 28 2013 Al Stone <ahs3@redhat.com> - 20130117-3
  322. - Reconcile Fedora and Debian patches to be as alike as possible
  323. * Mon Jan 28 2013 Al Stone <ahs3@redhat.com> - 20130117-2
  324. - Verify ExcludeArch restrictions -- the architectures excluded can have
  325. no use for these tools. Hardware support for ACPI is simply not
  326. implemented for them.
  327. - Corrected versioning to note this source came from a git pull.
  328. - Add License file as upstream has not yet provided one (and has not for
  329. many years).
  330. - Insert properly versioned Provides and Obsoletes for iasl.
  331. - Corrected files to use man.1* (vs man.1.gz) to allow flexibility in the
  332. compression being used.
  333. * Wed Jan 23 2013 Al Stone <ahs3@redhat.com> - 20130117-1
  334. - Clone from the current iasl package, with the intent of replacing it
  335. - Update source to latest upstream
  336. - NB: ACPICA documentation would normally be included in a source tarball.
  337. But, since it is not clearly redistributable, it is not included in the
  338. source RPM for this package.
  339. - Build all ACPICA tools, not just iasl (and hence the package replacement)
  340. - Add in brief man pages
  341. - Set up acpixtract from this package as an alternative to the same command
  342. in the pmtools package
  343. - Run the check step once built