Blame SPECS/acpica-tools.spec

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