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