44a778
Name:           acpica-tools
44a778
Version:        20160527
44a778
Release:        3%{?dist}
44a778
Summary:        ACPICA tools for the development and debug of ACPI tables
44a778
44a778
Group:          Development/Languages
44a778
License:        GPLv2
44a778
URL:            https://www.acpica.org/
44a778
44a778
Source0:        https://acpica.org/sites/acpica/files/acpica-unix2-%{version}.tar.gz
44a778
Source1:        https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz
44a778
Source2:        README
44a778
Source3:        iasl.1
44a778
Source4:        acpibin.1
44a778
Source5:        acpidump.1
44a778
Source6:        acpiexec.1
44a778
Source7:        acpihelp.1
44a778
Source8:        acpinames.1
44a778
Source9:        acpisrc.1
44a778
Source10:       acpixtract.1
44a778
Source11:       badcode.asl.result
44a778
Source12:       grammar.asl.result
44a778
Source13:       run-misc-tests.sh
44a778
Source14:       COPYING
44a778
44a778
Patch0:         debian-big_endian.patch
44a778
Patch1:         debian-unaligned.patch
44a778
Patch2:         name-miscompare.patch
44a778
Patch3:         asllookup-miscompare.patch
44a778
Patch4:         re-enable-big-endian.patch
44a778
Patch5:         DSDT-too-long.patch
44a778
Patch6:		add-nfit-subtable7.patch
44a778
44a778
BuildRequires:  bison patchutils flex
44a778
44a778
# The previous iasl package contained only a very small subset of these tools
44a778
# and it produced only the iasl package listed below; further, the pmtools
44a778
# package -- which provides acpidump -- also provides a /usr/sbin/acpixtract
44a778
# that we don't really want to collide with
44a778
Provides:       acpixtract >= 20120913-7
44a778
Provides:       iasl = %{version}-%{release}
44a778
Obsoletes:      iasl < 20120913-7
44a778
44a778
# The pmtools package provides an obsolete and deprecated version of the
44a778
# acpidump command from lesswatts.org which has now been taken off-line.
44a778
# ACPICA, however, is providing a new version and we again do not want to
44a778
# conflict with the command name.
44a778
Provides:       acpidump >= 20100513-5
44a778
Provides:       pmtools = %{version}-%{release}
44a778
Obsoletes:      pmtools < 20100513-5
44a778
44a778
%description
44a778
The ACPI Component Architecture (ACPICA) project provides an OS-independent
44a778
reference implementation of the Advanced Configuration and Power Interface
44a778
Specification (ACPI).  ACPICA code contains those portions of ACPI meant to
44a778
be directly integrated into the host OS as a kernel-resident subsystem, and
44a778
a small set of tools to assist in developing and debugging ACPI tables.
44a778
44a778
This package contains only the user-space tools needed for ACPI table
44a778
development, not the kernel implementation of ACPI.  The following commands
44a778
are installed:
44a778
   -- iasl: compiles ASL (ACPI Source Language) into AML (ACPI Machine
44a778
      Language), suitable for inclusion as a DSDT in system firmware.
44a778
      It also can disassemble AML, for debugging purposes.
44a778
   -- acpibin: performs basic operations on binary AML files (e.g.,
44a778
      comparison, data extraction)
44a778
   -- acpidump: write out the current contents of ACPI tables
44a778
   -- acpiexec: simulate AML execution in order to debug method definitions
44a778
   -- acpihelp: display help messages describing ASL keywords and op-codes
44a778
   -- acpinames: display complete ACPI name space from input AML
44a778
   -- acpisrc: manipulate the ACPICA source tree and format source files
44a778
      for specific environments
44a778
   -- acpixtract: extract binary ACPI tables from acpidump output (see
44a778
      also the pmtools package)
44a778
44a778
This version of the tools is being released under GPLv2 license.
44a778
44a778
%prep
44a778
%setup -q -n acpica-unix2-%{version}
44a778
gzip -dc %{SOURCE1} | tar -x --strip-components=1 -f -
44a778
44a778
%patch0 -p1 -b .debian-big_endian
44a778
%patch1 -p1 -b .debian-unaligned
44a778
%patch2 -p1 -b .name-miscompare
44a778
%patch3 -p1 -b .asllookup-miscompare
44a778
%patch4 -p1 -b .re-enable-big-endian
44a778
%patch5 -p1 -b .DSDT-too-long
44a778
%patch6 -p1 -b .add-nfit-subtable7
44a778
44a778
cp -p %{SOURCE2} README
44a778
cp -p %{SOURCE3} iasl.1
44a778
cp -p %{SOURCE4} acpibin.1
44a778
cp -p %{SOURCE5} acpidump.1
44a778
cp -p %{SOURCE6} acpiexec.1
44a778
cp -p %{SOURCE7} acpihelp.1
44a778
cp -p %{SOURCE8} acpinames.1
44a778
cp -p %{SOURCE9} acpisrc.1
44a778
cp -p %{SOURCE10} acpixtract.1
44a778
cp -p %{SOURCE11} badcode.asl.result
44a778
cp -p %{SOURCE12} grammar.asl.result
44a778
cp -p %{SOURCE13} tests/run-misc-tests.sh
44a778
chmod a+x tests/run-misc-tests.sh
44a778
cp -p %{SOURCE14} COPYING
44a778
44a778
# remove spurious group write permissions from all files in tests directory
44a778
chmod -R g-w tests/
44a778
44a778
44a778
%build
44a778
make OPT_CFLAGS="%{optflags} -fno-strict-aliasing"
44a778
44a778
44a778
%install
44a778
# Install the binaries
44a778
mkdir -p %{buildroot}%{_bindir}
44a778
install -pD generate/unix/bin*/* %{buildroot}%{_bindir}/
44a778
mv %{buildroot}%{_bindir}/acpidump %{buildroot}%{_bindir}/acpidump-acpica
44a778
mv %{buildroot}%{_bindir}/acpixtract %{buildroot}%{_bindir}/acpixtract-acpica
44a778
44a778
# Install the man pages
44a778
mkdir -p %{buildroot}%{_mandir}/man1
44a778
install -pDm 0644 -p -D *.1 %{buildroot}%{_mandir}/man1/
44a778
mv %{buildroot}%{_mandir}/man1/acpixtract.1 \
44a778
   %{buildroot}%{_mandir}/man1/acpixtract-acpica.1
44a778
mv %{buildroot}%{_mandir}/man1/acpidump.1 \
44a778
   %{buildroot}%{_mandir}/man1/acpidump-acpica.1
44a778
44a778
%check
44a778
cd tests
44a778
44a778
# ASL tests
44a778
./aslts.sh                         # relies on non-zero exit
44a778
[ $? -eq 0 ] || exit 1
44a778
44a778
# misc tests
44a778
./run-misc-tests.sh %{buildroot}%{_bindir} %{version}
44a778
44a778
# Template tests
44a778
cd templates
44a778
make
44a778
if [ -f diff.log ]
44a778
then
44a778
    if [ -s diff.log ]
44a778
    then
44a778
        exit 1                  # implies errors occurred
44a778
    fi
44a778
fi
44a778
cd ..
44a778
44a778
44a778
%post
44a778
alternatives --install %{_bindir}/acpixtract acpixtract \
44a778
                       %{_bindir}/acpixtract-acpica 120 \
44a778
               --slave %{_mandir}/man1/acpixtract.1.gz acpixtract.1.gz \
44a778
                       %{_mandir}/man1/acpixtract-acpica.1.gz
44a778
44a778
alternatives --install %{_bindir}/acpidump acpidump \
44a778
                       %{_bindir}/acpidump-acpica 120 \
44a778
               --slave %{_mandir}/man1/acpidump.1.gz acpidump.1.gz \
44a778
                       %{_mandir}/man1/acpidump-acpica.1.gz
44a778
44a778
44a778
%postun
44a778
if [ ! -e %{_bindir}/acpixtract-acpica ]
44a778
then
44a778
    alternatives --remove acpixtract %{_bindir}/acpixtract-acpica
44a778
fi
44a778
if [ ! -e %{_bindir}/acpidump-acpica ]
44a778
then
44a778
    alternatives --remove acpidump %{_bindir}/acpidump-acpica
44a778
fi
44a778
44a778
44a778
%files
44a778
%doc changes.txt source/compiler/new_table.txt
44a778
%doc README COPYING
44a778
%{_bindir}/*
44a778
%{_mandir}/*/*
44a778
44a778
44a778
%changelog
44a778
* Tue Jul 24 2018 Al Stone <ahs3@redhat.com> - 20160527-3
44a778
- Added in support for NFIT subtable type 7 with an additional patch.
44a778
  Resolves: #1600053.
44a778
44a778
* Thu Jul 12 2018 Al Stone <ahs3@redhat.com> - 20160527-2
44a778
- Corrected the use of percent signs in the change log and made sure
44a778
  they are all properly escaped.  Resolves: #1425899.
44a778
44a778
* Tue Jun 14 2016 Dean Nelson <dnelson@redhat.com> - 20160527-1
44a778
- Update to the latest upstream version of acpica as requested by RHBZ 1278038.
44a778
- Refresh existing patches and add/delete ones to enable a clean build.
44a778
44a778
* Wed Jul 15 2015 Dean Nelson <dnelson@redhat.com> - 20150619-3
44a778
- Remove acpitests-unix-%%{version} directory from the build because it was a
44a778
  mistake that it was present and it complicated the fixing of the file
44a778
  permissions done related to RHBZ 1211328's requested rebase.
44a778
44a778
* Wed Jul 01 2015 Dean Nelson <dnelson@redhat.com> - 20150619-2
44a778
- Fix the file permissions issue reported by rpmdiff related to RHBZ 1211328's
44a778
  requested rebase.
44a778
44a778
* Mon Jun 22 2015 Dean Nelson <dnelson@redhat.com> - 20150619-1
44a778
- Update to the latest upstream version of acpica as requested by RHBZ 1211328.
44a778
- Refresh existing patches and add/delete ones to enable a clean build.
44a778
- Add missing return status checks after a few calls to AcpiDmDumpTable() and
44a778
  one to fopen().
44a778
44a778
* Mon Sep 29 2014 Dean Nelson <dnelson@redhat.com> - 20140926-1
44a778
- Update to the latest upstream version of acpica as requested by RHBZ 967963.
44a778
- Refresh existing patches and add new ones to enable a clean build.
44a778
- Fix build failures that start before and finish after midnight.
44a778
44a778
* Wed Aug 06 2014 Dean Nelson <dnelson@redhat.com> - 20130823-8
44a778
- Fix run-misc-tests.sh script to properly set the number of BITS to 64 when run
44a778
  on a ppc64le system as requested by RHBZ 1125471.
44a778
44a778
* Wed Aug 06 2014 Dean Nelson <dnelson@redhat.com> - 20130823-7
44a778
- Fix the dangling symlink issue for acpidump(1) and acpixtract(1) man pages
44a778
  that was reported in RHBZ 1074681.
44a778
44a778
* Tue Jan 28 2014 Daniel Mach <dmach@redhat.com> - 20130823-6
44a778
- Mass rebuild 2014-01-24
44a778
44a778
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 20130823-5
44a778
- Mass rebuild 2013-12-27
44a778
44a778
* Mon Oct 21 2013 Dean Nelson <dnelson@redhat.com> - 20130823-4
44a778
- Fix the four issues identified by RPMdiff that were reported in RHBZ 1017311.
44a778
44a778
* Wed Sep 04 2013 Dean Nelson <dnelson@redhat.com> - 20130823-3
44a778
- Fix run-misc-tests.sh script to properly set the number of BITS to 64 when run
44a778
  on a s390x system.
44a778
44a778
* Tue Aug 27 2013 Al Stone <ahs3@redhat.com> - 20130823-2
44a778
- Add in a copy of the GPLv2 text in order to comply with the requirement
44a778
  to always redistribute the terms of the license.
44a778
44a778
* Mon Aug 26 2013 Al Stone <ahs3@redhat.com> - 20130823-1
44a778
- Update to latest upstream source.
44a778
44a778
* Tue Aug 20 2013 Al Stone <ahs3@redhat.com> - 20130725-2
44a778
- Fix several rpmlint items (listed below)
44a778
- Add versions to explicit provides for acpixtract, acpidump
44a778
- Not all setup steps used -q
44a778
- Setup executable test script (run-misc-tests.sh) differently
44a778
- Removed unneeded commented out line with macros in it
44a778
- Removed mixed use of spaces and tabs (all spaces now)
44a778
- Corrected source URLs (upstream moved)
44a778
44a778
* Sun Aug 18 2013 Al Stone <ahs3@redhat.com> - 20130725-1
44a778
- Update to latest upstream source.
44a778
44a778
* Wed Jul 24 2013 Al Stone <ahs3@redhat.com> - 20130626-1
44a778
- Update to latest upstream source.
44a778
- Move acpidump to acpidump-acpica so it be an alternative properly
44a778
- Add basic man page for acpidump
44a778
- Enable use of AAPITS tests during the check step
44a778
44a778
* Sun Jun 02 2013 Al Stone <ahs3@redhat.com> - 20130517-2
44a778
- Correct an oversight: we provide an acpidump in conflict with the
44a778
  version in pmtools (which appears to be dead upstream) but had not
44a778
  made it an alternative before
44a778
44a778
* Tue May 28 2013 Al Stone <ahs3@redhat.com> - 20130517-1
44a778
- Update to latest upstream source.
44a778
- Remove acpica-tools-config.patch -- now in upstream
44a778
- Remove iasl-signed-char.patch -- now in upstream
44a778
- Updated debian-big_endian.patch
44a778
- Updated debian-unaligned.patch
44a778
44a778
* Mon May 13 2013 Al Stone <ahs3@redhat.com> - 20130328-1
44a778
- Update to latest upstream source.
44a778
44a778
* Wed Mar 20 2013 Al Stone <ahs3@redhat.com> - 20130214-2
44a778
- Incorporate use of optflags macro in the build.
44a778
- Remove extraneous rm -rf of buildroot.
44a778
- Remove extraneous use of defattr in the files section.
44a778
- Incorporate use of parallel make.
44a778
- Remove extraneous use of the clean section.
44a778
- Use simpler globbing in the files section.
44a778
- Use simpler globbing in the install section.
44a778
- Remove obsolete git notes from README.Fedora.
44a778
- Remove ExcludeArch restrictions.
44a778
44a778
* Mon Feb 18 2013 Al Stone <ahs3@redhat.com> - 20130214-1
44a778
- New upstream.
44a778
- Remove most of the config file patch; still need to remove -m{32,64}.
44a778
- Clarify the licensing; this source is dual-licensed and is being released
44a778
  under the GPLv2 as allowed by the original Intel license.
44a778
- Redo the misc tests so they compare results properly.
44a778
44a778
* Wed Feb 06 2013 Al Stone <ahs3@redhat.com> - 20130117-6
44a778
- Added a zero-fill to a date used in comparing testing results so that the
44a778
  comparison would be correct on days numbered < 10.
44a778
44a778
* Thu Jan 31 2013 Al Stone <ahs3@redhat.com> - 20130117-5
44a778
- Simplify versioning scheme and revert to the original scheme in use by
44a778
  iasl, which is use the latest official tarball date (2013017) as the
44a778
  version and 1%%{?dist} as the release, to be incremented for packaging
44a778
  and bug fixes as needed.
44a778
44a778
* Wed Jan 30 2013 Al Stone <ahs3@redhat.com> - 20130117-4
44a778
- Do a little reset: go back to using just the original upstream tarball
44a778
  instead of the latest git; the snapshot approach was more complicated
44a778
  than needed.
44a778
- Upstream tarballs split commands from test suites, so had to add the
44a778
  test suite back in as another Source: file.
44a778
- Change versioning scheme to include the APCI specification level (5.0),
44a778
  the latest official tarball date (2013017) and a revision level  (the
44a778
  .1 at the end) for packaging and bug fixes as needed.
44a778
- Changed the License field to reflect the source tarball change; the release
44a778
  tarball is dual-licensed, Intel ACPI or GPLv2.
44a778
- Updated patches to apply cleanly as needed.
44a778
- Corrected Obsoletes and Provides version numbers.
44a778
44a778
* Mon Jan 28 2013 Al Stone <ahs3@redhat.com> - 20130117-3
44a778
- Reconcile Fedora and Debian patches to be as alike as possible
44a778
44a778
* Mon Jan 28 2013 Al Stone <ahs3@redhat.com> - 20130117-2
44a778
- Verify ExcludeArch restrictions -- the architectures excluded can have
44a778
  no use for these tools.  Hardware support for ACPI is simply not
44a778
  implemented for them.
44a778
- Corrected versioning to note this source came from a git pull.
44a778
- Add License file as upstream has not yet provided one (and has not for
44a778
  many years).
44a778
- Insert properly versioned Provides and Obsoletes for iasl.
44a778
- Corrected files to use man.1* (vs man.1.gz) to allow flexibility in the
44a778
  compression being used.
44a778
44a778
* Wed Jan 23 2013 Al Stone <ahs3@redhat.com> - 20130117-1
44a778
- Clone from the current iasl package, with the intent of replacing it
44a778
- Update source to latest upstream
44a778
- NB: ACPICA documentation would normally be included in a source tarball.
44a778
  But, since it is not clearly redistributable, it is not included in the
44a778
  source RPM for this package.
44a778
- Build all ACPICA tools, not just iasl (and hence the package replacement)
44a778
- Add in brief man pages
44a778
- Set up acpixtract from this package as an alternative to the same command
44a778
  in the pmtools package
44a778
- Run the check step once built
44a778