# # spec file for package acpica # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define src_dir acpica-unix-%{version} %define kver 3.16.57 ####%(rpm -q --qf '%%{VERSION}' kernel-source) %define dmp_ver %{kver} Name: acpica Version: 20180629 Release: 1.1 Summary: This is a set of tools to display and debug your BIOS ACPI tables License: GPL-2.0-only Group: Development/Tools/Debuggers Url: http://acpica.org Source: https://acpica.org/sites/acpica/files/%{src_dir}.tar.gz Source1: ec_access.c Source2: acpi_genl.tar.bz2 Source3: acpi_validate Source4: wmidump.tar.bz2 Patch1: acpica-no-compiletime.patch Patch2: wmidump_add_she_bang.patch Patch3: do_not_use_build_date_and_time.patch BuildRequires: bison BuildRequires: flex BuildRequires: glibc-devel BuildRequires: kernel-source >= 2.6.31 BuildRequires: patch Provides: iasl ExclusiveArch: %ix86 ia64 x86_64 aarch64 %arm %description The included tools share the same code as it is used in the ACPI implementation of the kernel. The code of the acpica project is exactly the same as the ACPI parser and interpreter code of the kernel and the code gets synced regularly from the acpica project into the kernel. E.g. if you identify bugs in the kernel's ACPI implementation it might be easier to debug them in userspace if possible. If the bug is part of the acpica code, it has to be submitted to the acpica project to get merged into the mainline kernel sources. iasl compiles ASL (ACPI Source Language) into AML (ACPI Machine Language). This AML is suitable for inclusion as a DSDT in system firmware. It also can disassemble AML, for debugging purposes. %prep %setup -q -n %{src_dir} -a 2 -a 4 %patch1 -p1 %patch2 -p1 %patch3 -p1 mkdir acpidump-%{dmp_ver} cd acpidump-%{dmp_ver} # acpitools (acpidump) from kernel sources: # copy necessary files from kernel-source since we need to modify them (cd %{_prefix}/src/linux ; tar -cf - COPYING CREDITS README tools include scripts Kbuild Makefile drivers/acpi lib) | tar -xf - %build cc %{SOURCE1} %{optflags} -o ec_access make -C acpi_genl CFLAGS="%{optflags}" make -C wmidump CFLAGS="%{optflags}" make %{?_smp_mflags} OPT_CFLAGS="%{optflags}" HOST="_LINUX" cd acpidump-%{dmp_ver}/tools/power/acpi if [ -f tools/acpidump/Makefile ]; then # 4.3+ cd tools/acpidump/ fi make %{?_smp_mflags} EXTRA_CFLAGS="%{optflags} -fno-strict-aliasing" prefix=%{_prefix} all %install install -Dm 755 %{SOURCE3} %{buildroot}%{_bindir}/acpi_validate install -Dm 755 ec_access %{buildroot}%{_sbindir}/ec_access install -Dm 755 wmidump/wmidump %{buildroot}%{_bindir}/wmidump install -Dm 755 wmidump/wmixtract.py %{buildroot}%{_bindir}/wmixtract install -Dm 644 wmidump/README %{buildroot}/%{_docdir}/%{name}/README_wmidump install -Dm 755 acpi_genl/acpi_genl %{buildroot}%{_sbindir}/acpi_genl install -Dm 644 acpi_genl/README %{buildroot}/%{_docdir}/%{name}/README_acpi_genl make install DESTDIR=%{buildroot} # Latest acpidump is coming from kernel and not from acpica sources now. rm -rf %{buildroot}%{_bindir}/acpidump cd acpidump-%{dmp_ver}/tools/power/acpi if [ -f tools/acpidump/Makefile ]; then # 4.3+ cd tools/acpidump/ fi export WERROR=0 make V=1 EXTRA_CFLAGS="%{optflags}" mandir=%{_mandir} prefix=%{_prefix} DESTDIR=%{buildroot} install install-man %files %defattr(-,root,root) %doc changes.txt %doc %{_docdir}/%{name} %{_bindir}/iasl %{_bindir}/acpiexec %{_bindir}/acpixtract %{_bindir}/acpisrc %{_bindir}/wmidump %{_bindir}/wmixtract %{_bindir}/acpibin %{_bindir}/acpihelp %{_bindir}/acpinames %{_bindir}/acpi_validate %{_bindir}/acpiexamples %{_sbindir}/acpidump %{_sbindir}/acpi_genl %{_sbindir}/ec_access %{_mandir}/man8/acpidump.8* %changelog * Mon Jul 2 2018 trenn@suse.de - Update to 20180629 Added changelog from mainline, installed into documentation path * Sat May 26 2018 aloisio@gmx.com - Update to version 20180508 ACPICA kernel-resident subsystem: * Completed the new (recently deployed) package resolution mechanism for the Load and LoadTable ASL/AML operators. This fixes a regression that was introduced in version 20180209 that could result in an AE_AML_INTERNAL exception during the loading of a dynamic ACPI/AML table (SSDT) that contains package objects. iASL Compiler/Disassembler and Tools: * AcpiDump and AcpiXtract: Implemented support for ACPI tables larger than 1 MB. This change allows for table offsets within the acpidump file to be up to 8 characters. These changes are backwards compatible with existing acpidump files. version 20180427 ACPICA kernel-resident subsystem: * Debugger: Added support for Package objects in the "Test Objects" command. This command walks the entire namespace and evaluates all named data objects (Integers, Strings, Buffers, and now Packages). * Improved error messages for the namespace root node. Originally, the root was referred to by the confusing string "\___". This has been replaced by "Namespace Root" for clarification. * Fixed a potential infinite loop in the AcpiRsDumpByteList function. Colin Ian King . iASL Compiler/Disassembler and Tools: * iASL: Implemented support to detect and flag illegal forward references. For compatibility with other ACPI implementations, these references are now illegal at the root level of the DSDT or SSDTs. Forward references have always been illegal within control methods. This change should not affect existing ASL/AML code because of the fact that these references have always been illegal in the other ACPI implementation. * iASL: Added error messages for the case where a table OEM ID and OEM TABLE ID strings are longer than the ACPI-defined length. Previously, these strings were simply silently truncated. * iASL: Enhanced the -tc option (which creates an AML hex file in C, suitable for import into a firmware project): 1) Create a unique name for the table, to simplify use of multiple SSDTs. 2) Add a protection #ifdef in the file, similar to a .h header file. With assistance from Sami Mujawar, sami.mujawar@arm.com and Evan Lloyd, evan.lloyd@arm.com * AcpiExec: Added a new option, -df, to disable the local fault handler. This is useful during debugging, where it may be desired to drop into a debugger on a fault. * Wed Apr 18 2018 josef.moellers@suse.com - Upgrade to latest version 20180313 - Update patches: * acpica-no-compiletime.patch * do_not_use_build_date_and_time.patch * Fri Jan 12 2018 trenn@suse.de - Update to latest version 20180105 D revert_62ca7996_build_date_and_time.patch D revert_cdd3c612d4230bbb_build_date_and_time.patch A do_not_use_build_date_and_time.patch - pass --jobs from build service to make for much faster building * Fri Jan 12 2018 josef.moellers@suse.com - Changed shebang path in wmidump_add_she_bang.patch to /usr/bin/python3 [bsc#1075687,wmidump_add_she_bang.patch] * Thu Dec 7 2017 dimstar@opensuse.org - Escape the usage of %%{VERSION} when calling out to rpm. * Tue Jun 13 2017 trenn@suse.de - Update to version 20170531. * Wed Jan 25 2017 trenn@suse.de - Update to version 20170119 (fate#322313). * Thu Jan 5 2017 trenn@suse.de - Update to version 20161117 (fate#322313). - __DATE__ __TIME__ macros added again mainline, revert them to avoid constant build service rebuilding * Add revert_62ca7996_build_date_and_time.patch * Add revert_cdd3c612d4230bbb_build_date_and_time.patch * Fri Sep 16 2016 dmueller@suse.com - enable build for ARM (needed for ovmf nowadays) * Mon Apr 25 2016 trenn@suse.de - Update to version 20160422 * Sun Dec 6 2015 p.drouand@gmail.com - Update to version 20151124 * Fixed a possible regression for a previous update to FADT handling. The FADT no longer has a fixed table ID, causing some issues with code that was hardwired to a specific ID. Lv Zheng. * Fixed a problem where the method auto-serialization could interfere with the current SyncLevel. This change makes the auto-serialization support transparent to the SyncLevel support and management. * Removed support for the _SUB predefined name in AcpiGetObjectInfo. This interface is intended for early access to the namespace during the initial namespace device discovery walk. The _SUB method has been seen to access operation regions in some cases, causing errors because the operation regions are not fully initialized. * AML Debugger: Fixed some issues with the terminate/quit/exit commands that can cause faults. * AML Debugger: Add thread ID support so that single-step mode only applies * to the AML Debugger thread. This prevents runtime errors within some kernels. * Eliminated extraneous warnings from AcpiGetSleepTypeData. Since the _Sx methods that are invoked by this interface are optional, removed warnings emitted for the case where one or more of these methods do not exist. ACPICA BZ 1208. * Made a major pass through the entire ACPICA source code base to standardize formatting that has diverged a bit over time. There are no functional changes, but this will of course cause quite a few code differences from the previous ACPICA release. * Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. * iASL/acpiexec/acpixtract/disassembler: Added support to allow multiple definition blocks within a single ASL file and the resulting AML file. Support for this type of file was also added to the various tools that use binary AML files: acpiexec, acpixtract, and the AML disassembler. The example code below shows two definition blocks within the same file: DefinitionBlock ("dsdt.aml", "DSDT", 2, "Intel", "Template", 0x12345678) { } DefinitionBlock ("", "SSDT", 2, "Intel", "Template", 0xABCDEF01) { } * iASL: Enhanced typechecking for the Name() operator. All expressions for the value of the named object must be reduced/folded to a single constant at compile time, as per the ACPI specification (the AML definition of Name()). * iASL: Fixed some code indentation issues for the -ic and -ia options (C and assembly headers). Now all emitted code correctly begins in column 1. * iASL: Added an error message for an attempt to open a Scope() on an object defined in an SSDT. The DSDT is always loaded into the namespace first, so any attempt to open a Scope on an SSDT object will fail at runtime. - Remove acpica_remove_date_macro.patch; fixed on upstream release * Wed Nov 4 2015 jslaby@suse.com - add support for kernel 4.3+ (boo#953599) * Sun Aug 16 2015 p.drouand@gmail.com - Update to version 20150717 - Use download Url as source - Remove depreciated AUTHORS section * Tue Jun 30 2015 dimstar@opensuse.org - Fix the logic to ignore errors when applying acpica_remove_date_macro.patch: Kernel 4.1 has the patch, but we do want to keep it around for projects building against older kernels. * Fri Apr 24 2015 trenn@suse.de - Update to acpica version 20150410 - Do not generate acpitools tarball from external kernel repo, but use kernel-source package inside the build service. * Added acpica_remove_date_macro.patch - > This patch got mainline in kernel version 4.0 and can be removed again at some point of time. * Mon Feb 2 2015 schwab@suse.de - Enable on aarch64 * Wed Jul 30 2014 trenn@suse.de - Update to version 20140724 * Fri Mar 28 2014 lchiquitto@suse.de - Include generate_acpi-tools_tarball.sh in the package's source. * Wed Mar 12 2014 trenn@suse.de - Add acpi-tools tarball from kernel sources: tools/power/acpi Use latest acpidump from there instead of acpica included one. This fixes acpidump on latest kernels. - Add script for easier retrieving of acpi-tools tarball from kernel sources. * Tue Mar 11 2014 trenn@suse.de - Update to version 20140214 - Replace $RPM_OPT_FLAGS with %%{optflags} as suggested by tcech@suse.cz * Fri Mar 7 2014 ro@suse.de - set HOST for make to not blindly set the hostname as compiler definition * Wed Jan 15 2014 trenn@suse.de - Update to version 20140114 Drop acpica-add_missing_examples_makefile.patch - > already included mainlaine. * Thu Dec 19 2013 trenn@suse.de - Update to version 20131218 Add acpica-add_missing_examples_makefile.patch: They forgot to add a file to the tarball. This patch adds it from git repo. Drop acpica-fix_dots_in_path_for_p_option.patch: This patch is included in the newly provided version tarball already. * Fri Dec 13 2013 trenn@suse.de - Update to version 20131115 - Explicitly add commit 04d10e3c1f41a776cbed96dce2326ee649b9a0f0 to fix bnc#855050: acpica-fix_dots_in_path_for_p_option.patch * Fri Aug 23 2013 trenn@suse.de - Update to version 20130823 - remove already integrated patch: dmar-buf10.patch * Tue Jul 9 2013 trenn@suse.de - Fix Source3 vs Source4 typo (acpi_validate was broken) * Fri May 24 2013 trenn@suse.de - Update to version 20130517 - remove acpidump tarball, it is now included in acpica main project * Fri May 17 2013 trenn@suse.de - Update to version 20130418 - remove already integreated patches: acpica_make_CFLAGS_overridable bob_noop.patch - Add fix for DMAR table parsing issue: https://bugs.acpica.org/show_bug.cgi?id=999 * Mon Jan 28 2013 trenn@suse.de - Add wmidump/wmixtract tools for easy WMI (or other) GUID parsing * Wed Jan 23 2013 trenn@suse.de - Fix tiny bug in acpi_validate which wrongly adds the file which is to be compiled additionally to the external reference tables list * Wed Jan 23 2013 trenn@suse.de - Make use of -in (Ignore NoOp opcodes/operators) to avoid false positive errors during compliation/disassembling * Tue Jan 15 2013 trenn@suse.de - Update to version 20121018 - > remove some patches that got integrated - > Add one patch (bob_noop.patch) which will get integrated mainline: Stop and bail out when max error (200) count is reached. Introduce -in compile/disassemble option. * Wed Jan 9 2013 trenn@suse.de - Add acpi_validate script for easy disassembling and re-compilation of local ACPI tables or of an already existing acpidump file * Wed Nov 7 2012 trenn@suse.de - Update to latest version 20121018. - > one patch got accepted mainline -> removed. * Wed Sep 19 2012 trenn@suse.de - Update to latest version 20120913 - Add acpi_genl from http://www.lesswatts.org/projects/acpi/utilities.php Can be used to check for ACPI events via netlink (since /proc/acpi/events is is deprecated) - Adjust to new Makefile layout * Sun May 20 2012 trenn@suse.de - Update to latest version 20120518 * Tue Jan 3 2012 cfarrell@suse.com - license update: GPL-2.0 You added ec_access.c with a GPL-2.0 (only) license. Now the spec file has to be updated to reflect this * Wed Dec 21 2011 aj@suse.de - Clarify license, it's GPL-2.0+ (bnc#711299). * Thu Nov 24 2011 trenn@suse.de - ACPICA version 20111123 released with full ACPI 5.0 support Detailed changelog can be found here: http://acpica.org/download/changes.txt * Wed Jun 29 2011 trenn@suse.de - Fix build for 32 bit * Mon Jun 27 2011 trenn@suse.de - Update to version 20110623 - Fixed some "set but not used" errors and a link order issue and sent patches upstream. - Set "-Wno-unused-result" for some compilations -> too many offenders to fix that all up. * Mon Jun 20 2011 idonmez@novell.com - Add acpica-unix-const.patch: fix const correctness issue in AslCompilererror, http://www.acpica.org/bugzilla/show_bug.cgi?id=923 * Wed Apr 27 2011 idoenmez@novell.com - Add acpica-unix-20110316-gcc46.patch: fix compilation with gcc 4.6 * Sun Apr 17 2011 crrodriguez@opensuse.org - Disable both build dates in this package and in the files it generates as it both trigger either unneeded republish of itself or other bigger packages like virtualbox - Provides: iasl too. * Wed Mar 30 2011 trenn@suse.de - Exchange selfmade patch with mainline one to fix build * Wed Mar 30 2011 trenn@suse.de - Updated to acpica version 20110316 Changes are listed in /usr/share/doc/packages/acpica/changes.txt - Fixed dynamic acpi table extract via acpidump/acpixtract by reverting acpica commit baab09e6857a427944068c5e599ea2ffb84f765b - Fixed compile issue and submitted it mainline * Thu Feb 24 2011 trenn@novell.com - Add possibility to see changes via new -s param: -r [ -s sleep ] * Fri Jan 14 2011 trenn@novell.com - Remove stale acpidump patches * Fri Jan 14 2011 trenn@novell.com - Get latest acpidump tool from Len's acpi pmtools: * Also dump dynamically loaded SSDTs - Build against its own headers instead of acpica headers - > unfortunately acpidump is still not part of acpica and adjusting things ourselves is too much overhead. * Thu Jan 13 2011 trenn@novell.com - Update to version 20110112 Changes are listed in /usr/share/doc/packages/acpica/changes.txt * Tue Oct 26 2010 trenn@novell.com - Update to version 20100806 - Added ec_access executable to be able to debug the Embedded Controller together with CONFIG_ACPI_EC_DEBUGFS kernel .config option * Sat Aug 7 2010 trenn@novell.com - Update to version 20100806 For details, see the changes.txt file in the package changes.txt can now be found in /usr/share/doc/packages/acpica/changes.txt * Sun Jul 4 2010 trenn@novell.com - Update to version 20100702 For details, see acpica-unix-20100702/changes.txt * Thu Apr 29 2010 trenn@novell.com - Update to version 20100428 * Mon Mar 8 2010 trenn@novell.com - Avoid (when compiling AML): DSDT.dsl 10307: Name (_ADR, Zero) Error 4080 - ^ Invalid object type for reserved name, must be (Integer) * Fri Mar 5 2010 trenn@novell.com - Updated to version 20100304 Some ACPI 4.0 enhancements and a lot bug fixes and other enhancements. See changes.txt in the sources for details * Wed Oct 14 2009 trenn@suse.de - Updated to version 20091013 Includes a bug fix to correctly disassmeble Unisys ES7000 tables * Wed Aug 26 2009 meissner@suse.de - as-needed fix no longer necessary * Fri Jul 31 2009 trenn@suse.de - Update to acpica version 20090730 The ACPI 4.0 implementation for ACPICA is complete with this release. * Fri Jun 19 2009 coolo@novell.com - disable as-needed for this package as it fails to build with it * Wed Apr 8 2009 trenn@suse.de - Initial check-in: Version 20090320