Architecture specific change in rpms/nodejs-debug-log.git
by githook-noreply@fedoraproject.org
The package rpms/nodejs-debug-log.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/nodejs-debug-log.git/commit/?id=8....
Change:
+ExclusiveArch: %{nodejs_arches} noarch
Thanks.
Full change:
============
commit 87db8fc156f28ad96c4ad59d6209f19b4f44d431
Author: Jared Smith <jsmith(a)fedoraproject.org>
Date: Tue May 1 21:01:26 2018 -0400
Initial packaging
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..615aa5e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/debug-log-1.0.1.tgz
diff --git a/README.md b/README.md
deleted file mode 100644
index e73b70b..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# nodejs-debug-log
-
-'Node.js 0.12 util.debuglog() ponyfill'
\ No newline at end of file
diff --git a/nodejs-debug-log.spec b/nodejs-debug-log.spec
new file mode 100644
index 0000000..19381dd
--- /dev/null
+++ b/nodejs-debug-log.spec
@@ -0,0 +1,61 @@
+%{?nodejs_find_provides_and_requires}
+
+%global packagename debug-log
+%global enable_tests 1
+
+Name: nodejs-debug-log
+Version: 1.0.1
+Release: 1%{?dist}
+Summary: Node.js 0.12 util.debuglog() ponyfill
+
+License: MIT
+URL: https://github.com/sindresorhus/debug-log.git
+Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
+# The test files are not included in the npm tarball.
+Source1: https://raw.githubusercontent.com/sindresorhus/debug-log/v1.0.1/test.js
+
+BuildArch: noarch
+ExclusiveArch: %{nodejs_arches} noarch
+
+BuildRequires: nodejs-packaging
+
+%if 0%{?enable_tests}
+#BuildRequires:
+%endif
+
+%description
+Node.js 0.12 util.debuglog() ponyfill
+
+
+%prep
+%autosetup -n package
+# setup the tests
+cp -p %{SOURCE1} .
+
+%build
+# nothing to do
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
+cp -pr package.json index.js \
+ %{buildroot}%{nodejs_sitelib}/%{packagename}
+
+%nodejs_symlink_deps
+
+%check
+%nodejs_symlink_deps --check
+%{__nodejs} -e 'require("./")'
+%if 0%{?enable_tests}
+NODE_ENV=test %{__nodejs} test.js
+%else
+%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
+%endif
+
+%files
+%doc *.md
+%license license
+%{nodejs_sitelib}/%{packagename}
+
+%changelog
+* Thu Apr 26 2018 Jared K. Smith <jsmith(a)fedoraproject.org> - 1.0.1-1
+- Initial packaging
diff --git a/sources b/sources
new file mode 100644
index 0000000..8faabbd
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (debug-log-1.0.1.tgz) = 815fe97b560868a3602d89ddd60f55356f34b5c6fba15e6abcd5311bb34cf2b6c3a6797a446ba7ce502d94649bd3012cde77acbb6bc73625fd4d2b19f98f918c
diff --git a/test.js b/test.js
new file mode 100644
index 0000000..4aa3935
--- /dev/null
+++ b/test.js
@@ -0,0 +1,86 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+var assert = require('assert');
+var util = require('util');
+
+if (process.argv[2] === 'child')
+ child();
+else
+ parent();
+
+function parent() {
+ test('foo,tud,bar', true);
+ test('foo,tud', true);
+ test('tud,bar', true);
+ test('tud', true);
+ test('foo,bar', false);
+ test('', false);
+}
+
+function test(environ, shouldWrite) {
+ var expectErr = '';
+ if (shouldWrite) {
+ expectErr = 'TUD %PID%: this { is: \'a\' } /debugging/\n' +
+ 'TUD %PID%: number=1234 string=asdf obj={"foo":"bar"}\n';
+ }
+ var expectOut = 'ok\n';
+ var didTest = false;
+
+ var spawn = require('child_process').spawn;
+ var child = spawn(process.execPath, [__filename, 'child'], {
+ env: util._extend(process.env, { NODE_DEBUG: environ })
+ });
+
+ expectErr = expectErr.split('%PID%').join(child.pid);
+
+ var err = '';
+ child.stderr.setEncoding('utf8');
+ child.stderr.on('data', function(c) {
+ err += c;
+ });
+
+ var out = '';
+ child.stdout.setEncoding('utf8');
+ child.stdout.on('data', function(c) {
+ out += c;
+ });
+
+ child.on('close', function(c) {
+ assert(!c);
+ assert.equal(err, expectErr);
+ assert.equal(out, expectOut);
+ didTest = true;
+ console.log('ok %j %j', environ, shouldWrite);
+ });
+
+ process.on('exit', function() {
+ assert(didTest);
+ });
+}
+
+
+function child() {
+ var debug = require('./')('tud');
+ debug('this', { is: 'a' }, /debugging/);
+ debug('number=%d string=%s obj=%j', 1234, 'asdf', { foo: 'bar' });
+ console.log('ok');
+}
5 years, 12 months
Architecture specific change in rpms/nodejs-intercept-require.git
by githook-noreply@fedoraproject.org
The package rpms/nodejs-intercept-require.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/nodejs-intercept-require.git/comm....
Change:
+ExclusiveArch: %{nodejs_arches} noarch
Thanks.
Full change:
============
commit a0afcf308b5223fa3d57ae27474da8db93b9c3ba
Author: Jared Smith <jsmith(a)fedoraproject.org>
Date: Tue May 1 20:45:31 2018 -0400
Initial packaging
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a3c309e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/intercept-require-1.1.0.tgz
diff --git a/README.md b/README.md
deleted file mode 100644
index 1087917..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# nodejs-intercept-require
-
-'Intercept calls to require()'
\ No newline at end of file
diff --git a/nodejs-intercept-require.spec b/nodejs-intercept-require.spec
new file mode 100644
index 0000000..24830ed
--- /dev/null
+++ b/nodejs-intercept-require.spec
@@ -0,0 +1,66 @@
+%{?nodejs_find_provides_and_requires}
+
+%global packagename intercept-require
+
+# tests disabled because the tests assume they're being run in a directory
+# named 'intercept-require', even though the tarball creates a directory called
+# 'package'
+%global enable_tests 0
+
+Name: nodejs-intercept-require
+Version: 1.1.0
+Release: 1%{?dist}
+Summary: Intercept calls to require()
+
+License: MIT
+URL: https://github.com/nickb1080/intercept-require.git
+Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
+
+
+BuildArch: noarch
+ExclusiveArch: %{nodejs_arches} noarch
+
+BuildRequires: nodejs-packaging
+BuildRequires: npm(callsite)
+BuildRequires: npm(object-assign)
+
+%if 0%{?enable_tests}
+BuildRequires: mocha
+BuildRequires: npm(expect)
+%endif
+
+%description
+Intercept calls to require()
+
+
+%prep
+%setup -q -n package
+
+%nodejs_fixdep object-assign
+
+%build
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
+cp -pr package.json *.js lib/ \
+ %{buildroot}%{nodejs_sitelib}/%{packagename}
+
+%nodejs_symlink_deps
+
+%check
+%nodejs_symlink_deps --check
+%{__nodejs} -e 'require("./")'
+%if 0%{?enable_tests}
+NODE_ENV=test %{_bindir}/mocha -R spec test/test.js
+%else
+%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
+%endif
+
+%files
+%doc *.md
+%license LICENSE
+%{nodejs_sitelib}/%{packagename}
+
+%changelog
+* Tue Apr 24 2018 Jared K. Smith <jsmith(a)fedoraproject.org> - 1.1.0-1
+- Initial packaging
diff --git a/sources b/sources
new file mode 100644
index 0000000..35c7767
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (intercept-require-1.1.0.tgz) = c7f9260cd880ab779858416465c063fe38fb0de3d1a2d834360aaff206ae0fd0e27ae400aa909e58d033529de9d20ce198f4e1edbdb22ad502549c65d245dba0
5 years, 12 months
Architecture specific change in rpms/nodejs-opal-runtime.git
by githook-noreply@fedoraproject.org
The package rpms/nodejs-opal-runtime.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/nodejs-opal-runtime.git/commit/?i....
Change:
+ExclusiveArch: %{nodejs_arches} noarch
Thanks.
Full change:
============
commit 822a4cf40655073e5b120b16fc70a42f9d7dbf36
Author: Jared Smith <jsmith(a)fedoraproject.org>
Date: Tue May 1 20:30:10 2018 -0400
Initial packaging
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ba34995
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/opal-runtime-1.0.3.tgz
diff --git a/README.md b/README.md
deleted file mode 100644
index 224a996..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# nodejs-opal-runtime
-
-'Opal Runtime'
\ No newline at end of file
diff --git a/nodejs-opal-runtime.spec b/nodejs-opal-runtime.spec
new file mode 100644
index 0000000..ded2b17
--- /dev/null
+++ b/nodejs-opal-runtime.spec
@@ -0,0 +1,61 @@
+%{?nodejs_find_provides_and_requires}
+
+%global packagename opal-runtime
+%global enable_tests 1
+
+Name: nodejs-opal-runtime
+Version: 1.0.3
+Release: 1%{?dist}
+Summary: Opal Runtime
+
+License: MIT
+URL: https://github.com/mogztter/opal-node-runtime.git
+Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
+
+
+BuildArch: noarch
+ExclusiveArch: %{nodejs_arches} noarch
+
+BuildRequires: nodejs-packaging
+BuildRequires: npm(glob)
+BuildRequires: npm(xmlhttprequest)
+
+%if 0%{?enable_tests}
+BuildRequires: jasmine-node
+%endif
+
+%description
+Opal Runtime
+
+
+%prep
+%autosetup -n package
+
+
+%build
+# nothing to do
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
+cp -pr package.json *.js src/ \
+ %{buildroot}%{nodejs_sitelib}/%{packagename}
+
+%nodejs_symlink_deps
+
+%check
+%nodejs_symlink_deps --check
+%{__nodejs} -e 'require("./")'
+%if 0%{?enable_tests}
+%{_bindir}/jasmine-node --verbose spec/
+%else
+%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
+%endif
+
+%files
+%doc *.md
+%license LICENSE
+%{nodejs_sitelib}/%{packagename}
+
+%changelog
+* Tue Apr 24 2018 Jared K. Smith <jsmith(a)fedoraproject.org> - 1.0.3-1
+- Initial packaging
diff --git a/sources b/sources
new file mode 100644
index 0000000..59fb2dd
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (opal-runtime-1.0.3.tgz) = 6d471a5237a9daa6751a772d82f43c02c810f94d3fbaee2f6830cb224923e879384717e0296faa68713429de963d305c232fec8e3cbcce00d8b1132460c222e2
5 years, 12 months
Architecture specific change in rpms/nodejs-istanbul-lib-coverage.git
by githook-noreply@fedoraproject.org
The package rpms/nodejs-istanbul-lib-coverage.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/nodejs-istanbul-lib-coverage.git/....
Change:
+ExclusiveArch: %{nodejs_arches} noarch
Thanks.
Full change:
============
commit a043ed75ea73428311bcec43c62de9529a4e96ac
Author: Jared Smith <jsmith(a)fedoraproject.org>
Date: Tue May 1 20:14:47 2018 -0400
Initial packaging
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d007ed3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/istanbul-lib-coverage-1.2.0.tgz
+/istanbul-lib-coverage-tests-1.2.0.tar.bz2
diff --git a/README.md b/README.md
deleted file mode 100644
index b357f5c..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# nodejs-istanbul-lib-coverage
-
-'Data library for istanbul coverage objects'
\ No newline at end of file
diff --git a/dl-istanbul-tests.sh b/dl-istanbul-tests.sh
new file mode 100755
index 0000000..67a4df1
--- /dev/null
+++ b/dl-istanbul-tests.sh
@@ -0,0 +1,133 @@
+#!/bin/bash
+
+tag=$(rpmspec -q --qf="%{version}\n" --srpm ./*.spec)
+url=$(rpmspec -q --qf="%{url}\n" --srpm ./*.spec)
+pkgdir=$(rpmspec -q --qf="%{name}" --srpm ./*.spec | sed -e 's/^nodejs-//')
+
+echo "tag: $tag"
+echo "URL: $url"
+echo "pkgdir: $pkgdir"
+
+set -e
+
+tmp=$(mktemp -d)
+
+trap cleanup EXIT
+cleanup() {
+ echo Cleaning up...
+ set +e
+ [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
+}
+
+unset CDPATH
+pwd=$(pwd)
+
+pushd "$tmp"
+git clone https://github.com/istanbuljs/istanbuljs
+newdir=packages/$pkgdir
+cd istanbuljs
+echo Finding git tag
+gittag=$(git show-ref --tags | cut -d' ' -f2 | grep "${pkgdir}@${tag}$" | head -n1 || git show-ref --tags | cut -d' ' -f2 | sort -Vr | head -n1)
+if [ -z $gittag ]; then
+ gittag=tags/$tag
+ echo "Could not find tag $tag, using $gittag instead"
+fi
+echo "Git Tag: $gittag"
+if [ -d "$newdir/test" ]; then
+ git archive --prefix='test/' --format=tar ${gittag}:$newdir/test/ \
+ | bzip2 > "$pwd"/$pkgdir-tests-${tag}.tar.bz2
+elif [ -d "$newdir/tests" ]; then
+ git archive --prefix='tests/' --format=tar ${gittag}:$newdir/tests/ \
+ | bzip2 > "$pwd"/$pkgdir-tests-${tag}.tar.bz2
+elif [ -d "$newdir/spec" ]; then
+ git archive --prefix='spec/' --format=tar ${gittag}:$newdir/spec/ \
+ | bzip2 > "$pwd"/$pkgdir-tests-${tag}.tar.bz2
+else
+ echo "No test directory found for tag ${gittag}"
+fi
+if [ -d "$newdir/support" ]; then
+ git archive --prefix='support/' --format=tar ${gittag}:$newdir/support/ \
+ | bzip2 > "$pwd"/$pkgdir-support-${tag}.tar.bz2
+fi
+if [ -d "$newdir/fixture" ]; then
+ git archive --prefix='fixture/' --format=tar ${gittag}:$newdir/fixture/ \
+ | bzip2 > "$pwd"/$pkgdir-fixture-${tag}.tar.bz2
+fi
+if [ -d "$newdir/examples" ]; then
+ git archive --prefix='examples/' --format=tar ${gittag}:$newdir/examples/ \
+ | bzip2 > "$pwd"/$pkgdir-examples-${tag}.tar.bz2
+elif [ -d "$newdir/example" ]; then
+ git archive --prefix='example/' --format=tar ${gittag}:$newdir/example/ \
+ | bzip2 > "$pwd"/$pkgdir-examples-${tag}.tar.bz2
+fi
+if [ -d "$newdir/tasks" ]; then
+ git archive --prefix='tasks/' --format=tar ${gittag}:$newdir/tasks/ \
+ | bzip2 > "$pwd"/$pkgdir-tasks-${tag}.tar.bz2
+fi
+if [ -d "$newdir/docs" ]; then
+ git archive --prefix='docs/' --format=tar ${gittag}:$newdir/docs/ \
+ | bzip2 > "$pwd"/$pkgdir-docs-${tag}.tar.bz2
+elif [ -d "$newdir/doc" ]; then
+ git archive --prefix='doc/' --format=tar ${gittag}:$newdir/doc/ \
+ | bzip2 > "$pwd"/$pkgdir-docs-${tag}.tar.bz2
+fi
+if [ -d "$newdir/src" ]; then
+ git archive --prefix='src/' --format=tar ${gittag}:$newdir/src/ \
+ | bzip2 > "$pwd"/$pkgdir-src-${tag}.tar.bz2
+elif [ -d "$newdir/source" ]; then
+ git archive --prefix='source/' --format=tar ${gittag}:$newdir/source/ \
+ | bzip2 > "$pwd"/$pkgdir-source-${tag}.tar.bz2
+fi
+if [ -d "$newdir/tools" ]; then
+ git archive --prefix='tools/' --format=tar ${gittag}:$newdir/tools/ \
+ | bzip2 > "$pwd"/$pkgdir-tools-${tag}.tar.bz2
+fi
+if [ -d "$newdir/scripts" ]; then
+ git archive --prefix='scripts/' --format=tar ${gittag}:$newdir/scripts/ \
+ | bzip2 > "$pwd"/$pkgdir-scripts-${tag}.tar.bz2
+fi
+if [ -d "$newdir/modules" ]; then
+ git archive --prefix='modules/' --format=tar ${gittag}:$newdir/modules/ \
+ | bzip2 > "$pwd"/$pkgdir-modules-${tag}.tar.bz2
+fi
+if [ -d "$newdir/ts" ]; then
+ git archive --prefix='ts/' --format=tar ${gittag}:$newdir/ts/ \
+ | bzip2 > "$pwd"/$pkgdir-ts-${tag}.tar.bz2
+fi
+if [ -d "$newdir/build" ]; then
+ git archive --prefix='build/' --format=tar ${gittag}:$newdir/build/ \
+ | bzip2 > "$pwd"/$pkgdir-build-${tag}.tar.bz2
+fi
+if [ -d "$newdir/fixtures" ]; then
+ git archive --prefix='fixtures/' --format=tar ${gittag}:$newdir/fixtures/ \
+ | bzip2 > "$pwd"/$pkgdir-fixtures-${tag}.tar.bz2
+fi
+if [ -d "$newdir/mocks" ]; then
+ git archive --prefix='mocks/' --format=tar ${gittag}:$newdir/mocks/ \
+ | bzip2 > "$pwd"/$pkgdir-mocks-${tag}.tar.bz2
+fi
+if [ -d "$newdir/typings" ]; then
+ git archive --prefix='typings/' --format=tar ${gittag}:$newdir/typings/ \
+ | bzip2 > "$pwd"/$pkgdir-typings-${tag}.tar.bz2
+fi
+if [ -d "$newdir/templates" ]; then
+ git archive --prefix='templates/' --format=tar ${gittag}:$newdir/templates/ \
+ | bzip2 > "$pwd"/$pkgdir-templates-${tag}.tar.bz2
+fi
+if [ -d "$newdir/benchmark" ]; then
+ git archive --prefix='benchmark/' --format=tar ${gittag}:$newdir/benchmark/ \
+ | bzip2 > "$pwd"/$pkgdir-benchmark-${tag}.tar.bz2
+fi
+if [ -d "$newdir/vendor" ]; then
+ git archive --prefix='vendor/' --format=tar ${gittag}:$newdir/vendor/ \
+ | bzip2 > "$pwd"/$pkgdir-vendor-${tag}.tar.bz2
+fi
+if [ -d "$newdir/packages" ]; then
+ git archive --prefix='packages/' --format=tar ${gittag}:$newdir/packages/ \
+ | bzip2 > "$pwd"/$pkgdir-packages-${tag}.tar.bz2
+fi
+if [ -d "$newdir/rollup" ]; then
+ git archive --prefix='rollup/' --format=tar ${gittag}:$newdir/rollup/ \
+ | bzip2 > "$pwd"/$pkgdir-rollup-${tag}.tar.bz2
+fi
+popd
diff --git a/nodejs-istanbul-lib-coverage.spec b/nodejs-istanbul-lib-coverage.spec
new file mode 100644
index 0000000..3122c27
--- /dev/null
+++ b/nodejs-istanbul-lib-coverage.spec
@@ -0,0 +1,67 @@
+%{?nodejs_find_provides_and_requires}
+
+%global packagename istanbul-lib-coverage
+%global enable_tests 1
+
+Name: nodejs-istanbul-lib-coverage
+Version: 1.2.0
+Release: 1%{?dist}
+Summary: Data library for istanbul coverage objects
+
+License: BSD
+URL: https://github.com/istanbuljs/istanbuljs/tree/master/packages/istanbul-li...
+Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
+# The test files are not included in the npm tarball.
+# Source{1-9} are generated by running Source10, which pulls from the upstream
+# version control repository.
+Source1: %{packagename}-tests-%{version}.tar.bz2
+Source10: dl-istanbul-tests.sh
+
+
+BuildArch: noarch
+ExclusiveArch: %{nodejs_arches} noarch
+
+BuildRequires: nodejs-packaging
+
+%if 0%{?enable_tests}
+BuildRequires: mocha
+BuildRequires: npm(chai)
+%endif
+
+%description
+Data library for istanbul coverage objects
+
+
+%prep
+%autosetup -n package
+# setup the tests
+%autosetup -T -D -a 1 -n package
+
+
+%build
+# nothing to do
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
+cp -pr package.json *.js lib/ \
+ %{buildroot}%{nodejs_sitelib}/%{packagename}
+
+%nodejs_symlink_deps
+
+%check
+%nodejs_symlink_deps --check
+%{__nodejs} -e 'require("./")'
+%if 0%{?enable_tests}
+NODE_ENV=test %{_bindir}/mocha -R spec
+%else
+%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
+%endif
+
+%files
+%doc *.md
+%license LICENSE
+%{nodejs_sitelib}/%{packagename}
+
+%changelog
+* Thu Apr 26 2018 Jared K. Smith <jsmith(a)fedoraproject.org> - 1.2.0-1
+- Initial packaging
diff --git a/sources b/sources
new file mode 100644
index 0000000..2afdeab
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+SHA512 (istanbul-lib-coverage-1.2.0.tgz) = 1af80cfee5d1c26fa02e5be45874e30c0bf0ca76642fd9ecd7971a953ae6846828c25c0905b58c63359b2aa1360d3e890cfd4015729af998b4124a8d094a98d0
+SHA512 (istanbul-lib-coverage-tests-1.2.0.tar.bz2) = 53939e4b1f2cca4e2afde5b12aab606dacf46c432ada32ec7af276a17ad23810ce9d7206c451126fd8cca60f2ff2028d6c184f55763630c3ad60b2cc1c6542b1
5 years, 12 months
Architecture specific change in rpms/nodejs-istanbul-lib-source-maps.git
by githook-noreply@fedoraproject.org
The package rpms/nodejs-istanbul-lib-source-maps.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/nodejs-istanbul-lib-source-maps.g....
Change:
+ExclusiveArch: %{nodejs_arches} noarch
Thanks.
Full change:
============
commit 49965094a635fc045031f8ea63ea5b289893f268
Author: Jared Smith <jsmith(a)fedoraproject.org>
Date: Tue May 1 20:05:07 2018 -0400
Initial packaging
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..beb5f19
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/istanbul-lib-source-maps-1.2.3.tgz
+/istanbul-lib-source-maps-tests-1.2.3.tar.bz2
diff --git a/README.md b/README.md
deleted file mode 100644
index 2add116..0000000
--- a/README.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# nodejs-istanbul-lib-source-maps
-
-'Source maps support for istanbul'
\ No newline at end of file
diff --git a/dl-istanbul-tests.sh b/dl-istanbul-tests.sh
new file mode 100755
index 0000000..67a4df1
--- /dev/null
+++ b/dl-istanbul-tests.sh
@@ -0,0 +1,133 @@
+#!/bin/bash
+
+tag=$(rpmspec -q --qf="%{version}\n" --srpm ./*.spec)
+url=$(rpmspec -q --qf="%{url}\n" --srpm ./*.spec)
+pkgdir=$(rpmspec -q --qf="%{name}" --srpm ./*.spec | sed -e 's/^nodejs-//')
+
+echo "tag: $tag"
+echo "URL: $url"
+echo "pkgdir: $pkgdir"
+
+set -e
+
+tmp=$(mktemp -d)
+
+trap cleanup EXIT
+cleanup() {
+ echo Cleaning up...
+ set +e
+ [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
+}
+
+unset CDPATH
+pwd=$(pwd)
+
+pushd "$tmp"
+git clone https://github.com/istanbuljs/istanbuljs
+newdir=packages/$pkgdir
+cd istanbuljs
+echo Finding git tag
+gittag=$(git show-ref --tags | cut -d' ' -f2 | grep "${pkgdir}@${tag}$" | head -n1 || git show-ref --tags | cut -d' ' -f2 | sort -Vr | head -n1)
+if [ -z $gittag ]; then
+ gittag=tags/$tag
+ echo "Could not find tag $tag, using $gittag instead"
+fi
+echo "Git Tag: $gittag"
+if [ -d "$newdir/test" ]; then
+ git archive --prefix='test/' --format=tar ${gittag}:$newdir/test/ \
+ | bzip2 > "$pwd"/$pkgdir-tests-${tag}.tar.bz2
+elif [ -d "$newdir/tests" ]; then
+ git archive --prefix='tests/' --format=tar ${gittag}:$newdir/tests/ \
+ | bzip2 > "$pwd"/$pkgdir-tests-${tag}.tar.bz2
+elif [ -d "$newdir/spec" ]; then
+ git archive --prefix='spec/' --format=tar ${gittag}:$newdir/spec/ \
+ | bzip2 > "$pwd"/$pkgdir-tests-${tag}.tar.bz2
+else
+ echo "No test directory found for tag ${gittag}"
+fi
+if [ -d "$newdir/support" ]; then
+ git archive --prefix='support/' --format=tar ${gittag}:$newdir/support/ \
+ | bzip2 > "$pwd"/$pkgdir-support-${tag}.tar.bz2
+fi
+if [ -d "$newdir/fixture" ]; then
+ git archive --prefix='fixture/' --format=tar ${gittag}:$newdir/fixture/ \
+ | bzip2 > "$pwd"/$pkgdir-fixture-${tag}.tar.bz2
+fi
+if [ -d "$newdir/examples" ]; then
+ git archive --prefix='examples/' --format=tar ${gittag}:$newdir/examples/ \
+ | bzip2 > "$pwd"/$pkgdir-examples-${tag}.tar.bz2
+elif [ -d "$newdir/example" ]; then
+ git archive --prefix='example/' --format=tar ${gittag}:$newdir/example/ \
+ | bzip2 > "$pwd"/$pkgdir-examples-${tag}.tar.bz2
+fi
+if [ -d "$newdir/tasks" ]; then
+ git archive --prefix='tasks/' --format=tar ${gittag}:$newdir/tasks/ \
+ | bzip2 > "$pwd"/$pkgdir-tasks-${tag}.tar.bz2
+fi
+if [ -d "$newdir/docs" ]; then
+ git archive --prefix='docs/' --format=tar ${gittag}:$newdir/docs/ \
+ | bzip2 > "$pwd"/$pkgdir-docs-${tag}.tar.bz2
+elif [ -d "$newdir/doc" ]; then
+ git archive --prefix='doc/' --format=tar ${gittag}:$newdir/doc/ \
+ | bzip2 > "$pwd"/$pkgdir-docs-${tag}.tar.bz2
+fi
+if [ -d "$newdir/src" ]; then
+ git archive --prefix='src/' --format=tar ${gittag}:$newdir/src/ \
+ | bzip2 > "$pwd"/$pkgdir-src-${tag}.tar.bz2
+elif [ -d "$newdir/source" ]; then
+ git archive --prefix='source/' --format=tar ${gittag}:$newdir/source/ \
+ | bzip2 > "$pwd"/$pkgdir-source-${tag}.tar.bz2
+fi
+if [ -d "$newdir/tools" ]; then
+ git archive --prefix='tools/' --format=tar ${gittag}:$newdir/tools/ \
+ | bzip2 > "$pwd"/$pkgdir-tools-${tag}.tar.bz2
+fi
+if [ -d "$newdir/scripts" ]; then
+ git archive --prefix='scripts/' --format=tar ${gittag}:$newdir/scripts/ \
+ | bzip2 > "$pwd"/$pkgdir-scripts-${tag}.tar.bz2
+fi
+if [ -d "$newdir/modules" ]; then
+ git archive --prefix='modules/' --format=tar ${gittag}:$newdir/modules/ \
+ | bzip2 > "$pwd"/$pkgdir-modules-${tag}.tar.bz2
+fi
+if [ -d "$newdir/ts" ]; then
+ git archive --prefix='ts/' --format=tar ${gittag}:$newdir/ts/ \
+ | bzip2 > "$pwd"/$pkgdir-ts-${tag}.tar.bz2
+fi
+if [ -d "$newdir/build" ]; then
+ git archive --prefix='build/' --format=tar ${gittag}:$newdir/build/ \
+ | bzip2 > "$pwd"/$pkgdir-build-${tag}.tar.bz2
+fi
+if [ -d "$newdir/fixtures" ]; then
+ git archive --prefix='fixtures/' --format=tar ${gittag}:$newdir/fixtures/ \
+ | bzip2 > "$pwd"/$pkgdir-fixtures-${tag}.tar.bz2
+fi
+if [ -d "$newdir/mocks" ]; then
+ git archive --prefix='mocks/' --format=tar ${gittag}:$newdir/mocks/ \
+ | bzip2 > "$pwd"/$pkgdir-mocks-${tag}.tar.bz2
+fi
+if [ -d "$newdir/typings" ]; then
+ git archive --prefix='typings/' --format=tar ${gittag}:$newdir/typings/ \
+ | bzip2 > "$pwd"/$pkgdir-typings-${tag}.tar.bz2
+fi
+if [ -d "$newdir/templates" ]; then
+ git archive --prefix='templates/' --format=tar ${gittag}:$newdir/templates/ \
+ | bzip2 > "$pwd"/$pkgdir-templates-${tag}.tar.bz2
+fi
+if [ -d "$newdir/benchmark" ]; then
+ git archive --prefix='benchmark/' --format=tar ${gittag}:$newdir/benchmark/ \
+ | bzip2 > "$pwd"/$pkgdir-benchmark-${tag}.tar.bz2
+fi
+if [ -d "$newdir/vendor" ]; then
+ git archive --prefix='vendor/' --format=tar ${gittag}:$newdir/vendor/ \
+ | bzip2 > "$pwd"/$pkgdir-vendor-${tag}.tar.bz2
+fi
+if [ -d "$newdir/packages" ]; then
+ git archive --prefix='packages/' --format=tar ${gittag}:$newdir/packages/ \
+ | bzip2 > "$pwd"/$pkgdir-packages-${tag}.tar.bz2
+fi
+if [ -d "$newdir/rollup" ]; then
+ git archive --prefix='rollup/' --format=tar ${gittag}:$newdir/rollup/ \
+ | bzip2 > "$pwd"/$pkgdir-rollup-${tag}.tar.bz2
+fi
+popd
diff --git a/nodejs-istanbul-lib-source-maps.spec b/nodejs-istanbul-lib-source-maps.spec
new file mode 100644
index 0000000..e2c8a4a
--- /dev/null
+++ b/nodejs-istanbul-lib-source-maps.spec
@@ -0,0 +1,74 @@
+%{?nodejs_find_provides_and_requires}
+
+%global packagename istanbul-lib-source-maps
+%global enable_tests 1
+
+Name: nodejs-istanbul-lib-source-maps
+Version: 1.2.3
+Release: 1%{?dist}
+Summary: Source maps support for istanbul
+
+License: BSD
+URL: https://github.com/istanbuljs/istanbuljs.git
+Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
+# The test files are not included in the npm tarball.
+# Source{1-9} are generated by running Source10, which pulls from the upstream
+# version control repository.
+Source1: %{packagename}-tests-%{version}.tar.bz2
+Source10: dl-istanbul-tests.sh
+
+
+BuildArch: noarch
+ExclusiveArch: %{nodejs_arches} noarch
+
+BuildRequires: nodejs-packaging
+BuildRequires: npm(debug)
+BuildRequires: npm(istanbul-lib-coverage)
+BuildRequires: npm(mkdirp)
+BuildRequires: npm(rimraf)
+BuildRequires: npm(source-map)
+
+%if 0%{?enable_tests}
+BuildRequires: mocha
+BuildRequires: npm(chai)
+BuildRequires: npm(is-windows)
+%endif
+
+%description
+Source maps support for istanbul
+
+
+%prep
+%autosetup -n package
+# setup the tests
+%autosetup -T -D -a 1 -n package
+
+%nodejs_fixdep debug '^2.6.9'
+
+%build
+# nothing to do
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
+cp -pr package.json *.js lib/ \
+ %{buildroot}%{nodejs_sitelib}/%{packagename}
+
+%nodejs_symlink_deps
+
+%check
+%nodejs_symlink_deps --check
+%{__nodejs} -e 'require("./")'
+%if 0%{?enable_tests}
+NODE_ENV=test %{_bindir}/mocha -R spec
+%else
+%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
+%endif
+
+%files
+%doc *.md
+%license LICENSE
+%{nodejs_sitelib}/%{packagename}
+
+%changelog
+* Thu Apr 26 2018 Jared K. Smith <jsmith(a)fedoraproject.org> - 1.2.3-1
+- Initial packaging
diff --git a/sources b/sources
new file mode 100644
index 0000000..ad24176
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+SHA512 (istanbul-lib-source-maps-1.2.3.tgz) = 7c36b487053fe6c0d7c009255e002808908eb05b01a65550e96065773e54c1aa8ece60e150ae277ee47bfc6fff1b69444656e550d241f0fe9ef1c5eaddaecc94
+SHA512 (istanbul-lib-source-maps-tests-1.2.3.tar.bz2) = 04880878419a1cf3922aa96a38cf03061642591d531d2c1ce67cbeadb99f91edbf55aace0ee4e5bad53152ac43c34346a1271c9d27072b66ede002c8e8aefa5c
5 years, 12 months
Architecture specific change in rpms/mariadb.git
by githook-noreply@fedoraproject.org
The package rpms/mariadb.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/mariadb.git/commit/?id=cae458ac36....
Change:
-%ifarch x86_64
Thanks.
Full change:
============
commit cae458ac36a69e15ea69ef242d6c6d4ec323b18c
Author: Michal Schorm <mschorm(a)redhat.com>
Date: Tue May 1 22:45:29 2018 +0200
Update some if clauses
diff --git a/mariadb.spec b/mariadb.spec
index 16eaa31..f0d2c4a 100644
--- a/mariadb.spec
+++ b/mariadb.spec
@@ -26,7 +26,7 @@
# RocksDB engine
# https://mariadb.com/kb/en/library/myrocks-supported-platforms/
# RocksB engine is available only for x86_64
-%ifarch x86_64
+%if %_arch == x86_64 && 0%{?fedora}
%bcond_without tokudb
%bcond_without mroonga
%bcond_without rocksdb
@@ -43,10 +43,12 @@
# Other plugins
# Allow to override the values outside of spec
# https://github.com/rpm-software-management/rpm/blob/34c2ba3c/macros.in#L1...
+%if 0%{?fedora}
%{!?_with_cracklib: %{!?_without_cracklib: %bcond_without cracklib}}
-%{!?_with_gssapi: %{!?_without_gssapi: %bcond_without gssapi}}
%{!?_with_connect: %{!?_without_sphinx: %bcond_without connect}}
%{!?_with_sphinx: %{!?_without_sphinx: %bcond_without sphinx}}
+%endif
+%{!?_with_gssapi: %{!?_without_gssapi: %bcond_without gssapi}}
# For some use cases we do not need some parts of the package. Set to "...with" to exclude
%if 0%{?fedora} >= 28 || 0%{?rhel} > 7
@@ -117,8 +119,13 @@
%global obsoleted_mariadb_galera_server_evr 1:10.0.17-6
# Provide mysql names for compatibility
+%if 0%{?fedora}
%bcond_without mysql_names
%bcond_without conflicts
+%else
+%bcond_with mysql_names
+%bcond_with conflicts
+%endif
# Make long macros shorter
%global sameevr %{epoch}:%{version}-%{release}
@@ -386,10 +393,10 @@ Requires: %{name}-common%{?_isa} = %{sameevr}
Requires: %{name}-errmsg%{?_isa} = %{sameevr}
Recommends: %{name}-server-utils%{?_isa} = %{sameevr}
Recommends: %{name}-backup%{?_isa} = %{sameevr}
-Recommends: %{name}-craclkib-password-check%{?_isa} = %{sameevr}
-Recommends: %{name}-gssapi-server%{?_isa} = %{sameevr}
-Recommends: %{name}-rocksdb-engine%{?_isa} = %{sameevr}
-Recommends: %{name}-tokudb-engine%{?_isa} = %{sameevr}
+%{?with_cracklib: Recommends: %{name}-craclkib-password-check%{?_isa} = %{sameevr}}
+%{?with_gssapi: Recommends: %{name}-gssapi-server%{?_isa} = %{sameevr}}
+%{?with_rocksdb: Recommends: %{name}-rocksdb-engine%{?_isa} = %{sameevr}}
+%{?with_tokudb: Recommends: %{name}-tokudb-engine%{?_isa} = %{sameevr}}
Suggests: mytop
@@ -835,7 +842,6 @@ cmake -L
make %{?_smp_mflags} VERBOSE=1
-
# build selinux policy
%if %{with galera}
pushd selinux
5 years, 12 months
Architecture specific change in rpms/edk2.git
by githook-noreply@fedoraproject.org
The package rpms/edk2.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/edk2.git/commit/?id=07922022858a2....
Change:
+%ifarch x86_64
Thanks.
Full change:
============
commit b7103cb49ab20d5ff1eaab303a2ab085975da1cf
Author: Cole Robinson <crobinso(a)redhat.com>
Date: Tue May 1 13:58:41 2018 -0400
Bump release for new build
diff --git a/edk2.spec b/edk2.spec
index 0139c63..c5da2a1 100644
--- a/edk2.spec
+++ b/edk2.spec
@@ -35,7 +35,7 @@
Name: edk2
Version: %{edk2_date}git%{edk2_githash}
-Release: 6%{dist}
+Release: 7%{dist}
Summary: EFI Development Kit II
Group: Applications/Emulators
@@ -516,6 +516,9 @@ install qemu-ovmf-secureboot-%{qosb_version}/ovmf-vars-generator %{buildroot}%{_
%changelog
+* Tue May 01 2018 Cole Robinson <crobinso(a)redhat.com> - 20171011git92d07e4-7
+- Bump release for new build
+
* Fri Mar 30 2018 Patrick Uiterwijk <puiterwijk(a)redhat.com> - 20171011git92d07e4-6
- Add qemu-ovmf-secureboot (qosb)
- Generate pre-enrolled Secure Boot OVMF VARS files
commit 48f745a9ce8f55ca544321b404cab5b065aa054a
Author: Cole Robinson <crobinso(a)redhat.com>
Date: Mon Apr 30 11:43:54 2018 -0400
Add qemu-ovmf-secureboot sources, tweak qemu dep
diff --git a/.gitignore b/.gitignore
index 67b5ada..66866b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
/edk2-20170209-296153c5.tar.xz
/edk2-20171011-92d07e4.tar.xz
/openssl-1.1.0e-hobbled.tar.xz
+/qemu-ovmf-secureboot-1.1.2.tar.gz
diff --git a/edk2.spec b/edk2.spec
index e753e65..0139c63 100644
--- a/edk2.spec
+++ b/edk2.spec
@@ -119,7 +119,7 @@ BuildRequires: genisoimage
# These are for QOSB
BuildRequires: python3-requests
-BuildRequires: qemu
+BuildRequires: qemu-system-x86
%if %{?qosb_testing}
# This is used for testing the enrollment: builds are run in a chroot, lacking
# a kernel. The testing is only performed on x86_64 for now, but we can't make
diff --git a/sources b/sources
index 71f06bb..0bf4ee0 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,3 @@
SHA512 (edk2-20171011-92d07e4.tar.xz) = b7afcefd21470df730648c32455d19e0e31caf15d6a9aedc36a1c390fccddd18719d2710cdd01cf6156bb7551c67fce2a3073bf640b756c32184d889a8d40d46
SHA512 (openssl-1.1.0e-hobbled.tar.xz) = 25e7d5bddd28501de3f1488c91f4effb0e271986c836302680ea3754d73dceb1d34dd7460096bc28d3c0bced7dd5736dda15ccf5936d9313f4587f68a256efbc
+SHA512 (qemu-ovmf-secureboot-1.1.2.tar.gz) = 4dd7e06663bde90cea99849d47d4c94c48d573ac0454e56eab9174ade999b4dcef73fea63a9bc64d2bccecf8f69c9df2945b237a2f95a08c83d42d744e76d687
commit 07922022858a2979f54961f2b82526227752eead
Author: Patrick Uiterwijk <puiterwijk(a)redhat.com>
Date: Mon Apr 30 11:57:51 2018 +0000
Add qosb to generate pre-enrolled Secure Boot VARS files
Signed-off-by: Patrick Uiterwijk <puiterwijk(a)redhat.com>
Reviewed-by: Laszlo Ersek <lersek(a)redhat.com>
diff --git a/edk2.spec b/edk2.spec
index ecf952d..e753e65 100644
--- a/edk2.spec
+++ b/edk2.spec
@@ -1,7 +1,13 @@
%global edk2_date 20171011
%global edk2_githash 92d07e4
%global openssl_version 1.1.0e
+%global qosb_version 1.1.2
+%define qosb_testing 0
+
+%ifarch x86_64
+%define qosb_testing 1
+%endif
%if 0%{?fedora:1}
%define cross 1
%endif
@@ -29,7 +35,7 @@
Name: edk2
Version: %{edk2_date}git%{edk2_githash}
-Release: 5%{dist}
+Release: 6%{dist}
Summary: EFI Development Kit II
Group: Applications/Emulators
@@ -38,6 +44,7 @@ URL: http://www.tianocore.org/edk2/
Source0: edk2-%{edk2_date}-%{edk2_githash}.tar.xz
Source1: openssl-%{openssl_version}-hobbled.tar.xz
Source2: ovmf-whitepaper-c770f8c.txt
+Source3: https://github.com/puiterwijk/qemu-ovmf-secureboot/archive/v%{qosb_versio...
Source10: hobble-openssl
Source11: build-iso.sh
Source12: update-tarball.sh
@@ -110,6 +117,19 @@ BuildRequires: nasm
BuildRequires: qemu-img
BuildRequires: genisoimage
+# These are for QOSB
+BuildRequires: python3-requests
+BuildRequires: qemu
+%if %{?qosb_testing}
+# This is used for testing the enrollment: builds are run in a chroot, lacking
+# a kernel. The testing is only performed on x86_64 for now, but we can't make
+# the BuildRequires only on a specific arch, as that'd come through in the SRPM
+# NOTE: The actual enrollment needs to happen in all builds for all architectures,
+# because OVMF is built as noarch, which means that koji enforces that the build
+# results don't actually differ per arch, and then it picks a random arches' build
+# for the actual RPM.
+BuildRequires: kernel-core
+%endif
%description
EDK II is a development code base for creating UEFI drivers, applications
@@ -141,6 +161,15 @@ BuildArch: noarch
This package documents the tools that are needed to
build EFI executables and ROMs using the GNU tools.
+%package qosb
+Summary: Tool to enroll secureboot
+Group: Development/Tools
+Buildarch: noarch
+%description qosb
+This package contains QOSB (QEMU OVMF Secure Boot), which can enroll OVMF
+variable files to enforce Secure Boot.
+
+
%if 0%{?build_ovmf_x64:1}
%package ovmf
Summary: Open Virtual Machine Firmware
@@ -200,6 +229,11 @@ cp -a -- %{SOURCE2} .
(cd .. && tar -xvf %{SOURCE1})
cp CryptoPkg/Library/OpensslLib/openssl/LICENSE LICENSE.openssl
+# Extract QOSB
+tar -xvf %{SOURCE3}
+mv qemu-ovmf-secureboot-%{qosb_version}/README.md README.qosb
+mv qemu-ovmf-secureboot-%{qosb_version}/LICENSE LICENSE.qosb
+
%autopatch -p1
base64 --decode < MdeModulePkg/Logo/Logo-OpenSSL.bmp.b64 > MdeModulePkg/Logo/Logo-OpenSSL.bmp
@@ -264,6 +298,15 @@ cp Build/Ovmf3264/*/FV/OVMF_CODE.fd ovmf/OVMF_CODE.secboot.fd
cp Build/Ovmf3264/*/X64/Shell.efi ovmf/
cp Build/Ovmf3264/*/X64/EnrollDefaultKeys.efi ovmf
sh %{_sourcedir}/build-iso.sh ovmf/
+
+# Build enrolled VARS file
+python3 qemu-ovmf-secureboot-%{qosb_version}/ovmf-vars-generator \
+ --qemu-binary /usr/bin/qemu-system-x86_64 \
+ --skip-testing \
+ --ovmf-binary ovmf/OVMF_CODE.secboot.fd \
+ --ovmf-template-vars ovmf/OVMF_VARS.fd \
+ --uefi-shell-iso ovmf/UefiShell.iso \
+ ovmf/OVMF_VARS.secboot.fd
%endif
@@ -306,6 +349,23 @@ dd of="arm/QEMU_EFI-pflash.raw" if="arm/QEMU_EFI.fd" conv=notrunc
dd of="arm/vars-template-pflash.raw" if="/dev/zero" bs=1M count=64
%endif
+%check
+%if 0%{?build_ovmf_x64:1}
+%if 0%{?qosb_testing}
+# Verify enrolled VARS file
+python3 qemu-ovmf-secureboot-%{qosb_version}/ovmf-vars-generator \
+ --qemu-binary /usr/bin/qemu-system-x86_64 \
+ --skip-enrollment \
+ --print-output \
+ --ovmf-binary ovmf/OVMF_CODE.secboot.fd \
+ --ovmf-template-vars ovmf/OVMF_VARS.fd \
+ --uefi-shell-iso ovmf/UefiShell.iso \
+ --no-download \
+ --kernel-path `rpm -ql kernel-core | grep "\/vmlinuz$" -m 1` \
+ ovmf/OVMF_VARS.secboot.fd
+%endif
+%endif
+
%install
mkdir -p %{buildroot}%{_bindir} \
%{buildroot}%{_datadir}/%{name}/Conf \
@@ -337,6 +397,7 @@ mkdir %{buildroot}/usr/share/OVMF
ln -sf ../%{name}/ovmf/OVMF_CODE.fd %{buildroot}/usr/share/OVMF
ln -sf ../%{name}/ovmf/OVMF_CODE.secboot.fd %{buildroot}/usr/share/OVMF
ln -sf ../%{name}/ovmf/OVMF_VARS.fd %{buildroot}/usr/share/OVMF
+ln -sf ../%{name}/ovmf/OVMF_VARS.secboot.fd %{buildroot}/usr/share/OVMF
ln -sf ../%{name}/ovmf/UefiShell.iso %{buildroot}/usr/share/OVMF
%endif
%if 0%{?build_ovmf_ia32:1}
@@ -354,6 +415,8 @@ cp -a arm %{buildroot}/usr/share/%{name}
ln -sf ../%{name}/arm/QEMU_EFI-pflash.raw %{buildroot}/usr/share/AAVMF/AAVMF32_CODE.fd
%endif
+install qemu-ovmf-secureboot-%{qosb_version}/ovmf-vars-generator %{buildroot}%{_bindir}
+
%files tools
%license License.txt
@@ -397,6 +460,11 @@ ln -sf ../%{name}/arm/QEMU_EFI-pflash.raw %{buildroot}/usr/share/AAVMF/
%files tools-doc
%doc BaseTools/UserManuals/*.rtf
+%files qosb
+%license LICENSE.qosb
+%doc README.qosb
+%{_bindir}/ovmf-vars-generator
+
%if 0%{?build_ovmf_x64:1}
%files ovmf
%license OvmfPkg/License.txt
@@ -448,6 +516,10 @@ ln -sf ../%{name}/arm/QEMU_EFI-pflash.raw %{buildroot}/usr/share/AAVMF/
%changelog
+* Fri Mar 30 2018 Patrick Uiterwijk <puiterwijk(a)redhat.com> - 20171011git92d07e4-6
+- Add qemu-ovmf-secureboot (qosb)
+- Generate pre-enrolled Secure Boot OVMF VARS files
+
* Wed Mar 07 2018 Paolo Bonzini <pbonzini(a)redhat.com> - 20171011git92d07e4-5
- Fix GCC 8 compilation
- Replace dosfstools and mtools with qemu-img vvfat
commit d173a3b48a1d6c072eb7f05598d387da902e3f48
Author: Peter Robinson <pbrobinson(a)gmail.com>
Date: Fri Mar 30 14:04:15 2018 +0100
add gcc/gcc-c++ build deps
diff --git a/edk2.spec b/edk2.spec
index 828dd69..ecf952d 100644
--- a/edk2.spec
+++ b/edk2.spec
@@ -97,6 +97,7 @@ ExclusiveArch: %{ix86} x86_64 %{arm} aarch64
ExclusiveArch: x86_64 aarch64
%endif
+BuildRequires: gcc gcc-c++
BuildRequires: python
BuildRequires: libuuid-devel
%if 0%{?cross:1}
5 years, 12 months
Architecture specific change in rpms/gnu-efi.git
by githook-noreply@fedoraproject.org
The package rpms/gnu-efi.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/gnu-efi.git/commit/?id=8e03d4aabe....
Change:
-%ifarch x86_64
Thanks.
Full change:
============
commit 8e03d4aabe7ff47b452e080fa5b38bf95236b6c1
Author: Peter Jones <pjones(a)redhat.com>
Date: Tue May 1 13:29:09 2018 -0400
Use efi-rpm-macros instead of defining all the stuff ourselves
Also change to using the canonical EFI arch names for everything where
the compiler doesn't have fixed names for things. This will break
compatibility for some filenames, but it makes it easier to drive from
macros sanely.
Signed-off-by: Peter Jones <pjones(a)redhat.com>
diff --git a/0026-Use-EFI-canonical-names-everywhere-the-compiler-does.patch b/0026-Use-EFI-canonical-names-everywhere-the-compiler-does.patch
new file mode 100644
index 0000000..b1a8732
--- /dev/null
+++ b/0026-Use-EFI-canonical-names-everywhere-the-compiler-does.patch
@@ -0,0 +1,481 @@
+From a92a9ed2db67c415c7bad5a9b041aca4efc33cf2 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones(a)redhat.com>
+Date: Tue, 1 May 2018 14:12:01 -0400
+Subject: [PATCH] Use EFI canonical names everywhere the compiler doesn't care.
+
+Always use x64/X64 and aa64/AA64 unless the toolchain cares about
+"x86_64" or whatnot.
+
+Signed-off-by: Peter Jones <pjones(a)redhat.com>
+---
+ gnuefi/{reloc_aarch64.c => reloc_aa64.c} | 2 +-
+ gnuefi/{reloc_x86_64.c => reloc_x64.c} | 2 +-
+ lib/{aarch64 => aa64}/initplat.c | 0
+ lib/{aarch64 => aa64}/math.c | 0
+ lib/{x86_64 => x64}/callwrap.c | 0
+ lib/{x86_64 => x64}/initplat.c | 0
+ lib/{x86_64 => x64}/math.c | 0
+ inc/{aarch64 => aa64}/efibind.h | 4 ++-
+ inc/{aarch64 => aa64}/efilibplat.h | 0
+ inc/{aarch64 => aa64}/efisetjmp_arch.h | 6 ++--
+ inc/efiapi.h | 5 ++-
+ inc/efidebug.h | 2 +-
+ inc/{x86_64 => x64}/efibind.h | 4 +--
+ inc/{x86_64 => x64}/efilibplat.h | 0
+ inc/{x86_64 => x64}/efisetjmp_arch.h | 6 ++--
+ inc/{x86_64 => x64}/pe.h | 0
+ gnuefi/{crt0-efi-aarch64.S => crt0-efi-aa64.S} | 2 +-
+ gnuefi/{crt0-efi-x86_64.S => crt0-efi-x64.S} | 2 +-
+ lib/{aarch64 => aa64}/efi_stub.S | 0
+ lib/{aarch64 => aa64}/setjmp.S | 0
+ lib/{x86_64 => x64}/efi_stub.S | 0
+ lib/{x86_64 => x64}/setjmp.S | 0
+ Make.defaults | 39 +++++++++++++++-------
+ README.gnuefi | 6 ++--
+ apps/Makefile | 2 +-
+ gnuefi/Makefile | 6 ++--
+ gnuefi/{elf_aarch64_efi.lds => elf_aa64_efi.lds} | 0
+ gnuefi/{elf_x86_64_efi.lds => elf_x64_efi.lds} | 2 +-
+ ...lf_x86_64_fbsd_efi.lds => elf_x64_fbsd_efi.lds} | 2 +-
+ lib/Makefile | 4 +--
+ 30 files changed, 58 insertions(+), 38 deletions(-)
+ rename gnuefi/{reloc_aarch64.c => reloc_aa64.c} (97%)
+ rename gnuefi/{reloc_x86_64.c => reloc_x64.c} (97%)
+ rename lib/{aarch64 => aa64}/initplat.c (100%)
+ rename lib/{aarch64 => aa64}/math.c (100%)
+ rename lib/{x86_64 => x64}/callwrap.c (100%)
+ rename lib/{x86_64 => x64}/initplat.c (100%)
+ rename lib/{x86_64 => x64}/math.c (100%)
+ rename inc/{aarch64 => aa64}/efibind.h (98%)
+ rename inc/{aarch64 => aa64}/efilibplat.h (100%)
+ rename inc/{aarch64 => aa64}/efisetjmp_arch.h (78%)
+ rename inc/{x86_64 => x64}/efibind.h (99%)
+ rename inc/{x86_64 => x64}/efilibplat.h (100%)
+ rename inc/{x86_64 => x64}/efisetjmp_arch.h (71%)
+ rename inc/{x86_64 => x64}/pe.h (100%)
+ rename gnuefi/{crt0-efi-aarch64.S => crt0-efi-aa64.S} (98%)
+ rename gnuefi/{crt0-efi-x86_64.S => crt0-efi-x64.S} (97%)
+ rename lib/{aarch64 => aa64}/efi_stub.S (100%)
+ rename lib/{aarch64 => aa64}/setjmp.S (100%)
+ rename lib/{x86_64 => x64}/efi_stub.S (100%)
+ rename lib/{x86_64 => x64}/setjmp.S (100%)
+ rename gnuefi/{elf_aarch64_efi.lds => elf_aa64_efi.lds} (100%)
+ rename gnuefi/{elf_x86_64_efi.lds => elf_x64_efi.lds} (93%)
+ rename gnuefi/{elf_x86_64_fbsd_efi.lds => elf_x64_fbsd_efi.lds} (93%)
+
+diff --git a/gnuefi/reloc_aarch64.c b/gnuefi/reloc_aa64.c
+similarity index 97%
+rename from gnuefi/reloc_aarch64.c
+rename to gnuefi/reloc_aa64.c
+index 086727961c2..f2ac52b1269 100644
+--- a/gnuefi/reloc_aarch64.c
++++ b/gnuefi/reloc_aa64.c
+@@ -1,4 +1,4 @@
+-/* reloc_aarch64.c - position independent x86 ELF shared object relocator
++/* reloc_aa64.c - position independent ARM Aarch64 ELF shared object relocator
+ Copyright (C) 2014 Linaro Ltd. <ard.biesheuvel(a)linaro.org>
+ Copyright (C) 1999 Hewlett-Packard Co.
+ Contributed by David Mosberger <davidm(a)hpl.hp.com>.
+diff --git a/gnuefi/reloc_x86_64.c b/gnuefi/reloc_x64.c
+similarity index 97%
+rename from gnuefi/reloc_x86_64.c
+rename to gnuefi/reloc_x64.c
+index 04b75b29fda..09493227a7b 100644
+--- a/gnuefi/reloc_x86_64.c
++++ b/gnuefi/reloc_x64.c
+@@ -1,4 +1,4 @@
+-/* reloc_x86_64.c - position independent x86_64 ELF shared object relocator
++/* reloc_x64.c - position independent x86_64 ELF shared object relocator
+ Copyright (C) 1999 Hewlett-Packard Co.
+ Contributed by David Mosberger <davidm(a)hpl.hp.com>.
+ Copyright (C) 2005 Intel Co.
+diff --git a/lib/aarch64/initplat.c b/lib/aa64/initplat.c
+similarity index 100%
+rename from lib/aarch64/initplat.c
+rename to lib/aa64/initplat.c
+diff --git a/lib/aarch64/math.c b/lib/aa64/math.c
+similarity index 100%
+rename from lib/aarch64/math.c
+rename to lib/aa64/math.c
+diff --git a/lib/x86_64/callwrap.c b/lib/x64/callwrap.c
+similarity index 100%
+rename from lib/x86_64/callwrap.c
+rename to lib/x64/callwrap.c
+diff --git a/lib/x86_64/initplat.c b/lib/x64/initplat.c
+similarity index 100%
+rename from lib/x86_64/initplat.c
+rename to lib/x64/initplat.c
+diff --git a/lib/x86_64/math.c b/lib/x64/math.c
+similarity index 100%
+rename from lib/x86_64/math.c
+rename to lib/x64/math.c
+diff --git a/inc/aarch64/efibind.h b/inc/aa64/efibind.h
+similarity index 98%
+rename from inc/aarch64/efibind.h
+rename to inc/aa64/efibind.h
+index bdaa5238e84..8a35a25e3a7 100644
+--- a/inc/aarch64/efibind.h
++++ b/inc/aa64/efibind.h
+@@ -14,7 +14,8 @@
+ * GNU General Public License as published by the Free Software Foundation;
+ * either version 2 of the License, or (at your option) any later version.
+ */
+-
++#ifndef GNU_EFI_AA64_EFI_BIND_H
++#define GNU_EFI_AA64_EFI_BIND_H
+ #if !defined(_MSC_VER) && (!defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L ))
+
+ // ANSI C 1999/2000 stdint.h integer width declarations
+@@ -154,3 +155,4 @@ typedef uint64_t UINTN;
+
+ #define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__)
+ #define EFI_FUNCTION
++#endif /* GNU_EFI_AA64_EFI_BIND_H */
+diff --git a/inc/aarch64/efilibplat.h b/inc/aa64/efilibplat.h
+similarity index 100%
+rename from inc/aarch64/efilibplat.h
+rename to inc/aa64/efilibplat.h
+diff --git a/inc/aarch64/efisetjmp_arch.h b/inc/aa64/efisetjmp_arch.h
+similarity index 78%
+rename from inc/aarch64/efisetjmp_arch.h
+rename to inc/aa64/efisetjmp_arch.h
+index abd7a0e9ad9..d4c17578dd2 100644
+--- a/inc/aarch64/efisetjmp_arch.h
++++ b/inc/aa64/efisetjmp_arch.h
+@@ -1,5 +1,5 @@
+-#ifndef GNU_EFI_AARCH64_SETJMP_H
+-#define GNU_EFI_AARCH64_SETJMP_H
++#ifndef GNU_EFI_AA64_SETJMP_H
++#define GNU_EFI_AA64_SETJMP_H
+
+ #define JMPBUF_ALIGN 8
+
+@@ -30,4 +30,4 @@ typedef struct {
+ UINT64 D15;
+ } ALIGN(JMPBUF_ALIGN) jmp_buf;
+
+-#endif /* GNU_EFI_AARCH64_SETJMP_H */
++#endif /* GNU_EFI_AA64_SETJMP_H */
+diff --git a/inc/efiapi.h b/inc/efiapi.h
+index e7d2abd79de..6355a2ff899 100644
+--- a/inc/efiapi.h
++++ b/inc/efiapi.h
+@@ -338,8 +338,11 @@ EFI_STATUS
+ #define EFI_IMAGE_MACHINE_ARMTHUMB_MIXED 0x01C2
+ #endif
+
++#if !defined(EFI_IMAGE_MACHINE_AA64)
++#define EFI_IMAGE_MACHINE_AA64 0xAA64
++#endif
+ #if !defined(EFI_IMAGE_MACHINE_AARCH64)
+-#define EFI_IMAGE_MACHINE_AARCH64 0xAA64
++#define EFI_IMAGE_MACHINE_AARCH64 EFI_IMAGE_MACHINE_AA64
+ #endif
+
+ // Image Entry prototype
+diff --git a/inc/efidebug.h b/inc/efidebug.h
+index 8e54dcda842..3649edf26d1 100644
+--- a/inc/efidebug.h
++++ b/inc/efidebug.h
+@@ -533,7 +533,7 @@ typedef enum {
+ IsaIpf = EFI_IMAGE_MACHINE_IA64,
+ IsaEbc = EFI_IMAGE_MACHINE_EBC,
+ IsaArm = EFI_IMAGE_MACHINE_ARMTHUMB_MIXED,
+-// IsaArm64 = EFI_IMAGE_MACHINE_AARCH64
++// IsaArm64 = EFI_IMAGE_MACHINE_AA64
+ } EFI_INSTRUCTION_SET_ARCHITECTURE;
+
+ //
+diff --git a/inc/x86_64/efibind.h b/inc/x64/efibind.h
+similarity index 99%
+rename from inc/x86_64/efibind.h
+rename to inc/x64/efibind.h
+index 4309f9f0e17..75e0dde35b6 100644
+--- a/inc/x86_64/efibind.h
++++ b/inc/x64/efibind.h
+@@ -16,8 +16,8 @@ Abstract:
+ Revision History
+
+ --*/
+-#ifndef X86_64_EFI_BIND
+-#define X86_64_EFI_BIND
++#ifndef X64_EFI_BIND
++#define X64_EFI_BIND
+ #ifndef __GNUC__
+ #pragma pack()
+ #endif
+diff --git a/inc/x86_64/efilibplat.h b/inc/x64/efilibplat.h
+similarity index 100%
+rename from inc/x86_64/efilibplat.h
+rename to inc/x64/efilibplat.h
+diff --git a/inc/x86_64/efisetjmp_arch.h b/inc/x64/efisetjmp_arch.h
+similarity index 71%
+rename from inc/x86_64/efisetjmp_arch.h
+rename to inc/x64/efisetjmp_arch.h
+index a489993c174..6f774f9cb33 100644
+--- a/inc/x86_64/efisetjmp_arch.h
++++ b/inc/x64/efisetjmp_arch.h
+@@ -1,5 +1,5 @@
+-#ifndef GNU_EFI_X86_64_SETJMP_H
+-#define GNU_EFI_X86_64_SETJMP_H
++#ifndef GNU_EFI_X64_SETJMP_H
++#define GNU_EFI_X64_SETJMP_H
+
+ #define JMPBUF_ALIGN 8
+
+@@ -19,4 +19,4 @@ typedef struct {
+ UINT8 XmmBuffer[160]; // XMM6 - XMM15
+ } ALIGN(JMPBUF_ALIGN) jmp_buf;
+
+-#endif /* GNU_EFI_X86_64_SETJMP_H */
++#endif /* GNU_EFI_X64_SETJMP_H */
+diff --git a/inc/x86_64/pe.h b/inc/x64/pe.h
+similarity index 100%
+rename from inc/x86_64/pe.h
+rename to inc/x64/pe.h
+diff --git a/gnuefi/crt0-efi-aarch64.S b/gnuefi/crt0-efi-aa64.S
+similarity index 98%
+rename from gnuefi/crt0-efi-aarch64.S
+rename to gnuefi/crt0-efi-aa64.S
+index c300d89bdfd..d6e610b8c79 100644
+--- a/gnuefi/crt0-efi-aarch64.S
++++ b/gnuefi/crt0-efi-aa64.S
+@@ -1,5 +1,5 @@
+ /*
+- * crt0-efi-aarch64.S - PE/COFF header for AArch64 EFI applications
++ * crt0-efi-aa64.S - PE/COFF header for AArch64 EFI applications
+ *
+ * Copright (C) 2014 Linaro Ltd. <ard.biesheuvel(a)linaro.org>
+ *
+diff --git a/gnuefi/crt0-efi-x86_64.S b/gnuefi/crt0-efi-x64.S
+similarity index 97%
+rename from gnuefi/crt0-efi-x86_64.S
+rename to gnuefi/crt0-efi-x64.S
+index 6839150a72e..6533af7461f 100644
+--- a/gnuefi/crt0-efi-x86_64.S
++++ b/gnuefi/crt0-efi-x64.S
+@@ -1,4 +1,4 @@
+-/* crt0-efi-x86_64.S - x86_64 EFI startup code.
++/* crt0-efi-x64.S - x86_64 EFI startup code.
+ Copyright (C) 1999 Hewlett-Packard Co.
+ Contributed by David Mosberger <davidm(a)hpl.hp.com>.
+ Copyright (C) 2005 Intel Co.
+diff --git a/lib/aarch64/efi_stub.S b/lib/aa64/efi_stub.S
+similarity index 100%
+rename from lib/aarch64/efi_stub.S
+rename to lib/aa64/efi_stub.S
+diff --git a/lib/aarch64/setjmp.S b/lib/aa64/setjmp.S
+similarity index 100%
+rename from lib/aarch64/setjmp.S
+rename to lib/aa64/setjmp.S
+diff --git a/lib/x86_64/efi_stub.S b/lib/x64/efi_stub.S
+similarity index 100%
+rename from lib/x86_64/efi_stub.S
+rename to lib/x64/efi_stub.S
+diff --git a/lib/x86_64/setjmp.S b/lib/x64/setjmp.S
+similarity index 100%
+rename from lib/x86_64/setjmp.S
+rename to lib/x64/setjmp.S
+diff --git a/Make.defaults b/Make.defaults
+index ba743f17893..7a8a95c5704 100755
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -62,17 +62,32 @@ OBJCOPY := $(prefix)$(CROSS_COMPILE)objcopy
+
+ # Host/target identification
+ OS := $(shell uname -s)
+-HOSTARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed -e s,i[3456789]86,ia32, -e 's,armv7.*,arm,' )
+-ARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed -e s,i[3456789]86,ia32, -e 's,armv7.*,arm,' )
++HOSTARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed \
++ -e s,i[3456789]86,ia32, \
++ -e s,amd64,x64, -e s,x86_64,x64, \
++ -e s,aarch64,aa64, \
++ -e 's,armv7.*,arm,' \
++ )
++ARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed \
++ -e s,i[3456789]86,ia32, \
++ -e s,amd64,x64, -e s,x86_64,x64, \
++ -e s,aarch64,aa64, \
++ -e 's,armv7.*,arm,' \
++ )
++BFD_ARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed \
++ -e s,i[3456789]86,ia32, \
++ -e s,amd64,x86_64, \
++ -e 's,armv7.*,arm,' \
++ )
+
+ # Get ARCH from the compiler if cross compiling
+ ifneq ($(CROSS_COMPILE),)
+- override ARCH := $(shell $(CC) -dumpmachine | cut -f1 -d-| sed -e s,i[3456789]86,ia32, -e 's,armv7.*,arm,' )
+-endif
+-
+-# FreeBSD (and possibly others) reports amd64 instead of x86_64
+-ifeq ($(ARCH),amd64)
+- override ARCH := x86_64
++ override ARCH := $(shell $(CC) -dumpmachine | cut -f1 -d- | sed \
++ -e s,i[3456789]86,ia32, \
++ -e s,amd64,x64, -e s,x86_64,x64, \
++ -e s,aarch64,aa64, \
++ -e 's,armv7.*,arm,' \
++ )
+ endif
+
+ #
+@@ -95,12 +110,12 @@ endif
+
+ ifeq ($(ARCH),ia32)
+ CFLAGS += -mno-mmx -mno-sse
+- ifeq ($(HOSTARCH),x86_64)
++ ifeq ($(HOSTARCH),x64)
+ ARCH3264 = -m32
+ endif
+ endif
+
+-ifeq ($(ARCH),x86_64)
++ifeq ($(ARCH),x64)
+ GCCVERSION := $(shell $(CC) -dumpversion | cut -f1 -d.)
+ GCCMINOR := $(shell $(CC) -dumpversion | cut -f2 -d.)
+ USING_CLANG := $(shell $(CC) -v 2>&1 | grep -q 'clang version' && echo clang)
+@@ -122,7 +137,7 @@ ifeq ($(ARCH),x86_64)
+ endif
+ endif
+
+-ifneq (,$(filter $(ARCH),ia32 x86_64))
++ifneq (,$(filter $(ARCH),ia32 x64))
+ # Disable AVX, if the compiler supports that.
+ CC_CAN_DISABLE_AVX=$(shell $(CC) -Werror -c -o /dev/null -xc -mno-avx - </dev/null >/dev/null 2>&1 && echo 1)
+ ifeq ($(CC_CAN_DISABLE_AVX), 1)
+@@ -139,7 +154,7 @@ endif
+ # Set HAVE_EFI_OBJCOPY if objcopy understands --target efi-[app|bsdrv|rtdrv],
+ # otherwise we need to compose the PE/COFF header using the assembler
+ #
+-ifneq ($(ARCH),aarch64)
++ifneq ($(ARCH),aa64)
+ ifneq ($(ARCH),arm)
+ ifneq ($(ARCH),mips64el)
+ export HAVE_EFI_OBJCOPY=y
+diff --git a/README.gnuefi b/README.gnuefi
+index 512698c28b4..ac3f0aa6b04 100644
+--- a/README.gnuefi
++++ b/README.gnuefi
+@@ -100,7 +100,7 @@ the appropriate compiler, assembler, linker, ar, and ranlib binaries,
+ respectively.
+
+ If you're working in a cross-development environment, be sure to set
+-macro ARCH to the desired target architecture ("ia32" for x86, "x86_64" for
++macro ARCH to the desired target architecture ("ia32" for x86, "x64" for
+ x86_64 and "ia64" for IA-64). For convenience, this can also be done from
+ the make command line (e.g., "make ARCH=ia64").
+
+@@ -225,7 +225,7 @@ environment addresses each of these issues.
+ In order to satisfy the COFF constraint of page-sized and page-aligned
+ sections, the GNU EFI build environment uses the special linker script
+ in gnuefi/elf_$(ARCH)_efi.lds where $(ARCH) is the target architecture
+-("ia32" for x86, "x86_64" for x86_64 and "ia64" for IA-64).
++("ia32" for x86, "x64" for x86_64 and "ia64" for IA-64).
+ This script is set up to create only eight COFF section, each page aligned
+ and page sized.These eight sections are used to group together the much
+ greater number of sections that are typically present in ELF object files.
+@@ -319,7 +319,7 @@ environment is to:
+
+ The self-relocator is of course architecture dependent. The x86
+ version can be found in gnuefi/reloc_ia32.c, the x86_64 version
+-can be found in gnuefi/reloc_x86_64.c and the IA-64 version can be
++can be found in gnuefi/reloc_x64.c and the IA-64 version can be
+ found in gnuefi/reloc_ia64.S.
+
+ The self-relocator operates as follows: the startup code invokes it
+diff --git a/apps/Makefile b/apps/Makefile
+index 4e1b69a38c8..51b66a2a78f 100644
+--- a/apps/Makefile
++++ b/apps/Makefile
+@@ -68,7 +68,7 @@ TARGET_RTDRIVERS =
+
+ ifneq ($(HAVE_EFI_OBJCOPY),)
+
+-FORMAT := --target efi-app-$(ARCH)
+-$(TARGET_BSDRIVERS): FORMAT=--target efi-bsdrv-$(ARCH)
+-$(TARGET_RTDRIVERS): FORMAT=--target efi-rtdrv-$(ARCH)
++FORMAT := --target efi-app-$(BFD_ARCH)
++$(TARGET_BSDRIVERS): FORMAT=--target efi-bsdrv-$(BFD_ARCH)
++$(TARGET_RTDRIVERS): FORMAT=--target efi-rtdrv-$(BFD_ARCH)
+
+diff --git a/gnuefi/Makefile b/gnuefi/Makefile
+index 2a61699ac25..2dc98d3ab3f 100644
+--- a/gnuefi/Makefile
++++ b/gnuefi/Makefile
+@@ -47,8 +47,8 @@ FILES = reloc_$(ARCH)
+
+ OBJS = $(FILES:%=%.o)
+
+-# on aarch64, avoid jump tables before all relocations have been processed
+-reloc_aarch64.o: CFLAGS += -fno-jump-tables
++# on aa64, avoid jump tables before all relocations have been processed
++reloc_aa64.o: CFLAGS += -fno-jump-tables
+
+ TARGETS = crt0-efi-$(ARCH).o libgnuefi.a
+
+@@ -63,7 +63,7 @@ install:
+ mkdir -p $(INSTALLROOT)$(LIBDIR)
+ $(INSTALL) -m 644 $(TARGETS) $(INSTALLROOT)$(LIBDIR)
+ ifneq (,$(findstring FreeBSD,$(OS)))
+- ifeq ($(ARCH),x86_64)
++ ifeq ($(ARCH),x64)
+ $(INSTALL) -m 644 $(SRCDIR)/elf_$(ARCH)_fbsd_efi.lds $(INSTALLROOT)$(LIBDIR)
+ else
+ $(INSTALL) -m 644 $(SRCDIR)/elf_$(ARCH)_efi.lds $(INSTALLROOT)$(LIBDIR)
+diff --git a/gnuefi/elf_aarch64_efi.lds b/gnuefi/elf_aa64_efi.lds
+similarity index 100%
+rename from gnuefi/elf_aarch64_efi.lds
+rename to gnuefi/elf_aa64_efi.lds
+diff --git a/gnuefi/elf_x86_64_efi.lds b/gnuefi/elf_x64_efi.lds
+similarity index 93%
+rename from gnuefi/elf_x86_64_efi.lds
+rename to gnuefi/elf_x64_efi.lds
+index 7be59023510..c7a105898c8 100644
+--- a/gnuefi/elf_x86_64_efi.lds
++++ b/gnuefi/elf_x64_efi.lds
+@@ -1,4 +1,4 @@
+-/* Same as elf_x86_64_fbsd_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
++/* Same as elf_x64_fbsd_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
+ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
+ OUTPUT_ARCH(i386:x86-64)
+ ENTRY(_start)
+diff --git a/gnuefi/elf_x86_64_fbsd_efi.lds b/gnuefi/elf_x64_fbsd_efi.lds
+similarity index 93%
+rename from gnuefi/elf_x86_64_fbsd_efi.lds
+rename to gnuefi/elf_x64_fbsd_efi.lds
+index fe1f3342cae..705719bf68b 100644
+--- a/gnuefi/elf_x86_64_fbsd_efi.lds
++++ b/gnuefi/elf_x64_fbsd_efi.lds
+@@ -1,4 +1,4 @@
+-/* Same as elf_x86_64_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
++/* Same as elf_x64_efi.lds, except for OUTPUT_FORMAT below - KEEP IN SYNC */
+ OUTPUT_FORMAT("elf64-x86-64-freebsd", "elf64-x86-64-freebsd", "elf64-x86-64-freebsd")
+ OUTPUT_ARCH(i386:x86-64)
+ ENTRY(_start)
+diff --git a/lib/Makefile b/lib/Makefile
+index 0e6410dac55..8bf94000e33 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -53,7 +53,7 @@ ifeq ($(ARCH),ia64)
+ FILES += $(ARCH)/salpal $(ARCH)/palproc
+ endif
+
+-ifeq ($(ARCH),x86_64)
++ifeq ($(ARCH),x64)
+ FILES += $(ARCH)/callwrap $(ARCH)/efi_stub
+ endif
+
+@@ -64,7 +64,7 @@ endif
+
+ OBJS = $(FILES:%=%.o)
+
+-SUBDIRS = ia32 x86_64 ia64 aarch64 arm mips64el runtime
++SUBDIRS = ia32 x64 ia64 aa64 arm mips64el runtime
+
+ LIBDIRINSTALL = $(INSTALLROOT)$(LIBDIR)
+
+--
+2.14.3
+
diff --git a/gnu-efi.spec b/gnu-efi.spec
index c78aadc..2474b57 100644
--- a/gnu-efi.spec
+++ b/gnu-efi.spec
@@ -2,12 +2,13 @@ Summary: Development Libraries and headers for EFI
Name: gnu-efi
Version: 3.0.8
%global tarball_version 3.0.6
-Release: 2%{?dist}%{?buildid}
+Release: 3%{?dist}%{?buildid}
Epoch: 1
Group: Development/System
License: BSD
URL: ftp://ftp.hpl.hp.com/pub/linux-ia64
-ExclusiveArch: x86_64 aarch64 %{arm} %{ix86}
+ExclusiveArch: %{efi}
+BuildRequires: efi-rpm-macros
BuildRequires: git
%ifarch x86_64
# So... in some build environments, glibc32 provides some headers. In
@@ -46,6 +47,7 @@ Patch0022: 0022-Nerf-Werror-pragma-away.patch
Patch0023: 0023-Call-ar-in-deterministic-mode.patch
Patch0024: 0024-Add-debug-helper-applications.patch
Patch0025: 0025-Bump-revision-from-VERSION-3.0.7-to-VERSION-3.0.8.patch
+Patch0026: 0026-Use-EFI-canonical-names-everywhere-the-compiler-does.patch
%define debug_package %{nil}
@@ -62,23 +64,6 @@ Patch0025: 0025-Bump-revision-from-VERSION-3.0.7-to-VERSION-3.0.8.patch
#
%global __strip "%{__strip} -p"
-# Figure out the right file path to use
-%global efidir %(eval echo $(grep ^ID= /etc/os-release | sed -e 's/^ID=//' -e 's/rhel/redhat/'))
-
-%ifarch x86_64
-%global efiarch x86_64
-%endif
-%ifarch aarch64
-%global efiarch aarch64
-%endif
-%ifarch %{arm}
-%global efiarch arm
-%endif
-
-%ifarch %{ix86}
-%global efiarch ia32
-%endif
-
%description
This package contains development headers and libraries for developing
applications that run under EFI (Extensible Firmware Interface).
@@ -116,28 +101,28 @@ git config --unset user.name
# Package cannot build with %{?_smp_mflags}.
make
make apps
-%ifarch x86_64
-setarch linux32 -B make ARCH=ia32 PREFIX=%{_prefix} LIBDIR=%{_prefix}/%{lib}
-setarch linux32 -B make ARCH=ia32 PREFIX=%{_prefix} LIBDIR=%{_prefix}/%{lib} apps
-%endif
+if [[ -n "%{efi_alt_arch}" ]] ; then
+ setarch linux32 -B make ARCH=%{efi_alt_arch} PREFIX=%{_prefix} LIBDIR=%{_prefix}/%{lib}
+ setarch linux32 -B make ARCH=%{efi_alt_arch} PREFIX=%{_prefix} LIBDIR=%{_prefix}/%{lib} apps
+fi
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_libdir}/gnuefi
-mkdir -p %{buildroot}/boot/efi/EFI/%{efidir}/%{efiarch}
+mkdir -p %{buildroot}/%{efi_esp_dir}/%{efi_arch}
make PREFIX=%{_prefix} LIBDIR=%{_libdir} INSTALLROOT=%{buildroot} install
mv %{buildroot}/%{_libdir}/*.lds %{buildroot}/%{_libdir}/*.o %{buildroot}/%{_libdir}/gnuefi
-mv %{efiarch}/apps/{route80h.efi,modelist.efi} %{buildroot}/boot/efi/EFI/%{efidir}/%{efiarch}/
+mv %{efi_arch}/apps/{route80h.efi,modelist.efi} %{buildroot}%{efi_esp_dir}/%{efi_arch}/
-%ifarch x86_64
-mkdir -p %{buildroot}/%{_prefix}/%{lib}/gnuefi
-mkdir -p %{buildroot}/boot/efi/EFI/%{efidir}/ia32
+if [[ -n "%{efi_alt_arch}" ]] ; then
+ mkdir -p %{buildroot}/%{_prefix}/%{lib}/gnuefi
+ mkdir -p %{buildroot}%{efi_esp_dir}/%{efi_alt_arch}
-setarch linux32 -B make PREFIX=%{_prefix} LIBDIR=%{_prefix}/%{lib} INSTALLROOT=%{buildroot} ARCH=ia32 install
-mv %{buildroot}/%{_prefix}/%{lib}/*.{lds,o} %{buildroot}/%{_prefix}/%{lib}/gnuefi/
-mv ia32/apps/{route80h.efi,modelist.efi} %{buildroot}/boot/efi/EFI/%{efidir}/ia32/
-%endif
+ setarch linux32 -B make PREFIX=%{_prefix} LIBDIR=%{_prefix}/%{lib} INSTALLROOT=%{buildroot} ARCH=%{efi_alt_arch} install
+ mv %{buildroot}/%{_prefix}/%{lib}/*.{lds,o} %{buildroot}/%{_prefix}/%{lib}/gnuefi/
+ mv %{efi_alt_arch}/apps/{route80h.efi,modelist.efi} %{buildroot}%{efi_esp_dir}/%{efi_alt_arch}/
+fi
%files
%{_prefix}/%{lib}*/*
@@ -148,11 +133,15 @@ mv ia32/apps/{route80h.efi,modelist.efi} %{buildroot}/boot/efi/EFI/%{efidir}/ia3
%{_includedir}/efi
%files utils
-%dir %attr(0700,root,root) /boot/efi/EFI/%{efidir}/
-%dir %attr(0700,root,root) /boot/efi/EFI/%{efidir}/*/
-%attr(0700,root,root) /boot/efi/EFI/%{efidir}/*/*.efi
+%dir %attr(0700,root,root) %{efi_esp_dir}/
+%dir %attr(0700,root,root) %{efi_esp_dir}/*/
+%attr(0700,root,root) %{efi_esp_dir}/*/*.efi
%changelog
+* Tue May 01 2018 Peter Jones <pjones(a)redhat.com> - 3.0.8-3
+- Use efi-rpm-macros instead of defining all the efi directory and arch
+ stuff ourselves.
+
* Mon Apr 30 2018 Peter Jones <pjones(a)redhat.com> - 3.0.8-2
- Fix permissions on /boot/efi/...
5 years, 12 months
Architecture specific change in rpms/efi-rpm-macros.git
by githook-noreply@fedoraproject.org
The package rpms/efi-rpm-macros.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/efi-rpm-macros.git/commit/?id=23f....
Change:
+ExclusiveArch: x86_64 aarch64 %{arm} %{ix86}
Thanks.
Full change:
============
commit 23f10ecd26f5ecc554f58d25e0e4ad578216da29
Author: Peter Jones <pjones(a)redhat.com>
Date: Tue May 1 13:03:22 2018 -0400
Initial import (#1573521).
Signed-off-by: Peter Jones <pjones(a)redhat.com>
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..92b0c2d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+*~
+*.rpm
+*.tar.*
+.*.sw?
+.build-*.log
+efi-rpm-macros-*/
+x86_64/
diff --git a/0001-Simplify-efi_arch_upper.patch b/0001-Simplify-efi_arch_upper.patch
new file mode 100644
index 0000000..d599f3d
--- /dev/null
+++ b/0001-Simplify-efi_arch_upper.patch
@@ -0,0 +1,47 @@
+From 8c4a55209bcb054b610c613ac2f1b2ad25253a20 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones(a)redhat.com>
+Date: Tue, 1 May 2018 12:54:05 -0400
+Subject: [PATCH 1/5] Simplify %efi_arch_upper
+
+Signed-off-by: Peter Jones <pjones(a)redhat.com>
+---
+ macros.efi.in | 25 ++-----------------------
+ 1 file changed, 2 insertions(+), 23 deletions(-)
+
+diff --git a/macros.efi.in b/macros.efi.in
+index 953dcfb1200..d935fd23da1 100644
+--- a/macros.efi.in
++++ b/macros.efi.in
+@@ -53,27 +53,6 @@ end
+ }
+
+ %efi_arch_upper %{lua:
+--- test if our arch matches
+-local function ifarch(archmacro)
+- local target = rpm.expand(" %{_target_cpu} ")
+- local arches = rpm.expand(" " .. archmacro .. " ")
+- local match = string.match(arches, target)
+- if not (match == nil) then
+- return true
+- end
+-end
+--- Do the work
+-if ifarch("x86_64") then
+- print("X64")
+-elseif ifarch("%{ix86}") then
+- print("IA32")
+-elseif ifarch("aarch64") then
+- print("AA64")
+-elseif ifarch("%{arm}") then
+- print("ARM")
+-elseif ifarch("ia64") then
+- print("IA64")
+-else
+- print("")
+-end
++ local arch = rpm.expand("%{efi_arch}")
++ print(string.upper(arch))
+ }
+--
+2.14.3
+
diff --git a/0002-Add-a-changelog-entry-to-the-.spec-for-version-2.patch b/0002-Add-a-changelog-entry-to-the-.spec-for-version-2.patch
new file mode 100644
index 0000000..f639ef3
--- /dev/null
+++ b/0002-Add-a-changelog-entry-to-the-.spec-for-version-2.patch
@@ -0,0 +1,26 @@
+From 4f7a7e6084bfbc28f194ab63a76239a622c7baad Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones(a)redhat.com>
+Date: Tue, 1 May 2018 12:55:44 -0400
+Subject: [PATCH 2/5] Add a changelog entry to the .spec for version 2.
+
+Signed-off-by: Peter Jones <pjones(a)redhat.com>
+---
+ efi-rpm-macros.spec.in | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/efi-rpm-macros.spec.in b/efi-rpm-macros.spec.in
+index 882f679aca9..c89fb6caf5e 100644
+--- a/efi-rpm-macros.spec.in
++++ b/efi-rpm-macros.spec.in
+@@ -43,5 +43,8 @@ Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-
+ %{_rpmmacrodir}/*
+
+ %changelog
++* Tue May 01 2018 Peter Jones <pjones(a)redhat.com> - 2-1
++- Lots of rpmlint fixups and the like.
++
+ * Mon Apr 30 2018 Peter Jones <pjones(a)redhat.com> - 1-1
+ - First shot at building it.
+--
+2.14.3
+
diff --git a/0003-efi-rpm-macros.spec.in-use-autosetup.patch b/0003-efi-rpm-macros.spec.in-use-autosetup.patch
new file mode 100644
index 0000000..2387af3
--- /dev/null
+++ b/0003-efi-rpm-macros.spec.in-use-autosetup.patch
@@ -0,0 +1,44 @@
+From 341b613d7b920292129ae689e9f7588073a08431 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones(a)redhat.com>
+Date: Tue, 1 May 2018 13:26:18 -0400
+Subject: [PATCH 3/5] efi-rpm-macros.spec.in: use autosetup
+
+Signed-off-by: Peter Jones <pjones(a)redhat.com>
+---
+ efi-rpm-macros.spec.in | 13 ++-----------
+ 1 file changed, 2 insertions(+), 11 deletions(-)
+
+diff --git a/efi-rpm-macros.spec.in b/efi-rpm-macros.spec.in
+index c89fb6caf5e..fa68b1dd7b1 100644
+--- a/efi-rpm-macros.spec.in
++++ b/efi-rpm-macros.spec.in
+@@ -6,8 +6,7 @@ Group: Development/System
+ License: GPLv3+
+ URL: https://github.com/rhboot/%{name}/
+ ExclusiveArch: @@EFI_ARCHES@@
+-#BuildRequires: git
+-BuildRequires: sed
++BuildRequires: git sed
+ Requires: rpm
+ BuildArch: noarch
+
+@@ -20,15 +19,7 @@ Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-
+ %{name} provides a set of RPM macros for use in EFI-related packages.
+
+ %prep
+-%setup -q
+-#git init
+-#git config user.email "example(a)example.com"
+-#git config user.name "RPM Ninjas"
+-#git add .
+-#git commit -a -q -m "%%{version} baseline."
+-#git am %%{patches} </dev/null
+-#git config --unset user.email
+-#git config --unset user.name
++%autosetup -S git
+
+ %build
+ %make_build EFI_VENDOR=%{_efi_vendor_} clean all
+--
+2.14.3
+
diff --git a/0004-Add-efi_alt_arch-and-efi_alt_arch_upper.patch b/0004-Add-efi_alt_arch-and-efi_alt_arch_upper.patch
new file mode 100644
index 0000000..44b529e
--- /dev/null
+++ b/0004-Add-efi_alt_arch-and-efi_alt_arch_upper.patch
@@ -0,0 +1,71 @@
+From d50b6eb13b00579e89747baa6a6be142930f3f94 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones(a)redhat.com>
+Date: Tue, 1 May 2018 13:39:47 -0400
+Subject: [PATCH 4/5] Add %efi_alt_arch and %efi_alt_arch_upper
+
+Signed-off-by: Peter Jones <pjones(a)redhat.com>
+---
+ README | 18 ++++++++++--------
+ macros.efi.in | 23 +++++++++++++++++++++++
+ 2 files changed, 33 insertions(+), 8 deletions(-)
+
+diff --git a/README b/README
+index 23601c763b0..c3474a1d863 100644
+--- a/README
++++ b/README
+@@ -8,11 +8,13 @@ EFI_VENDOR the vendor name for your EFI System Partition directory
+
+ The following rpm macros are set:
+
+-%efi the arches that EFI packages should be built on, suitable for use with %ifarch
+-%efi_vendor the vendor name for your EFI System Partition directory
+-%efi_esp_root the directory where the EFI system Partition is mounted
+-%efi_esp_efi the full path to \EFI on the EFI System Partition
+-%efi_esp_boot the full path to \EFI\BOOT on the EFI System Partition
+-%efi_esp_dir the full path to your vendor directory on the EFI System Partition
+-%efi_arch the EFI architecture name, e.g. x64
+-%efi_arch_upper the EFI architecture name in upper case, e.g. X64
++%efi the arches that EFI packages should be built on, suitable for use with %ifarch
++%efi_vendor the vendor name for your EFI System Partition directory
++%efi_esp_root the directory where the EFI system Partition is mounted
++%efi_esp_efi the full path to \EFI on the EFI System Partition
++%efi_esp_boot the full path to \EFI\BOOT on the EFI System Partition
++%efi_esp_dir the full path to your vendor directory on the EFI System Partition
++%efi_arch the EFI architecture name, e.g. x64
++%efi_arch_upper the EFI architecture name in upper case, e.g. X64
++%efi_alt_arch the EFI architecture name for other arches that build on this one (i.e. ia32 on x64)
++%efi_alt_arch_upper the upper case version of %efi_alt_arch
+diff --git a/macros.efi.in b/macros.efi.in
+index d935fd23da1..e03b9011e9d 100644
+--- a/macros.efi.in
++++ b/macros.efi.in
+@@ -56,3 +56,26 @@ end
+ local arch = rpm.expand("%{efi_arch}")
+ print(string.upper(arch))
+ }
++
++%efi_alt_arch %{lua:
++-- test if our arch matches
++local function ifarch(archmacro)
++ local target = rpm.expand(" %{_target_cpu} ")
++ local arches = rpm.expand(" " .. archmacro .. " ")
++ local match = string.match(arches, target)
++ if not (match == nil) then
++ return true
++ end
++end
++-- Do the work
++if ifarch("x86_64") then
++ print("ia32")
++else
++ print("")
++end
++}
++
++%efi_alt_arch_upper %{lua:
++ local arch = rpm.expand("%{efi_alt_arch}")
++ print(string.upper(arch))
++}
+--
+2.14.3
+
diff --git a/0005-Return-nil-instead-of-on-unsupported-arches.patch b/0005-Return-nil-instead-of-on-unsupported-arches.patch
new file mode 100644
index 0000000..9000de9
--- /dev/null
+++ b/0005-Return-nil-instead-of-on-unsupported-arches.patch
@@ -0,0 +1,55 @@
+From 1103d2ae35a3702b79b5dc32fc72b7b21711829e Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones(a)redhat.com>
+Date: Tue, 1 May 2018 13:45:29 -0400
+Subject: [PATCH 5/5] Return %{nil} instead of "" on unsupported arches
+
+Signed-off-by: Peter Jones <pjones(a)redhat.com>
+---
+ macros.efi.in | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/macros.efi.in b/macros.efi.in
+index e03b9011e9d..a0bd67d9b69 100644
+--- a/macros.efi.in
++++ b/macros.efi.in
+@@ -48,13 +48,17 @@ elseif ifarch("%{arm}") then
+ elseif ifarch("ia64") then
+ print("ia64")
+ else
+- print("")
++ print("%{nil}")
+ end
+ }
+
+ %efi_arch_upper %{lua:
+ local arch = rpm.expand("%{efi_arch}")
+- print(string.upper(arch))
++ if arch == '%{nil}'
++ print(arch)
++ else
++ print(string.upper(arch))
++ end
+ }
+
+ %efi_alt_arch %{lua:
+@@ -71,11 +75,15 @@ end
+ if ifarch("x86_64") then
+ print("ia32")
+ else
+- print("")
++ print("%{nil}")
+ end
+ }
+
+ %efi_alt_arch_upper %{lua:
+ local arch = rpm.expand("%{efi_alt_arch}")
+- print(string.upper(arch))
++ if arch == '%{nil}'
++ print(arch)
++ else
++ print(string.upper(arch))
++ end
+ }
+--
+2.14.3
+
diff --git a/efi-rpm-macros.spec b/efi-rpm-macros.spec
new file mode 100644
index 0000000..eff1711
--- /dev/null
+++ b/efi-rpm-macros.spec
@@ -0,0 +1,46 @@
+Summary: Common RPM Macros for building EFI-related packages
+Name: efi-rpm-macros
+Version: 2
+Release: 1%{?dist}
+Group: Development/System
+License: GPLv3+
+URL: https://github.com/rhboot/%{name}/
+ExclusiveArch: x86_64 aarch64 %{arm} %{ix86}
+BuildRequires: git sed
+Requires: rpm
+BuildArch: noarch
+
+Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-%{...
+Patch0001: 0001-Simplify-efi_arch_upper.patch
+Patch0002: 0002-Add-a-changelog-entry-to-the-.spec-for-version-2.patch
+Patch0003: 0003-efi-rpm-macros.spec.in-use-autosetup.patch
+Patch0004: 0004-Add-efi_alt_arch-and-efi_alt_arch_upper.patch
+Patch0005: 0005-Return-nil-instead-of-on-unsupported-arches.patch
+
+%global debug_package %{nil}
+%global _efi_vendor_ %(eval sed -n -e 's/rhel/redhat/' -e 's/^ID=//p' /etc/os-release)
+
+%description
+%{name} provides a set of RPM macros for use in EFI-related packages.
+
+%prep
+%autosetup -S git
+
+%build
+%make_build EFI_VENDOR=%{_efi_vendor_} clean all
+
+%install
+%make_install EFI_VENDOR=%{_efi_vendor_}
+
+%files
+%{!?_licensedir:%global license %%doc}
+%license LICENSE
+%doc README
+%{_rpmmacrodir}/*
+
+%changelog
+* Tue May 01 2018 Peter Jones <pjones(a)redhat.com> - 2-1
+- Lots of rpmlint fixups and the like.
+
+* Mon Apr 30 2018 Peter Jones <pjones(a)redhat.com> - 1-1
+- First shot at building it.
diff --git a/sources b/sources
new file mode 100644
index 0000000..7c94cba
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (efi-rpm-macros-2.tar.bz2) = d232aedc3ed9e833d4d60a63360a6f68bb4696947204045c95ef938e135744d64caa0c17bed35b1f8d9d74a86ed198f89eb52b5c7d4ebaa4c4cf66a88d2bc418
5 years, 12 months
Architecture specific change in rpms/edk2.git
by githook-noreply@fedoraproject.org
The package rpms/edk2.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/edk2.git/commit/?id=07922022858a2....
Change:
+%ifarch x86_64
Thanks.
Full change:
============
commit 48f745a9ce8f55ca544321b404cab5b065aa054a
Author: Cole Robinson <crobinso(a)redhat.com>
Date: Mon Apr 30 11:43:54 2018 -0400
Add qemu-ovmf-secureboot sources, tweak qemu dep
diff --git a/.gitignore b/.gitignore
index 67b5ada..66866b8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
/edk2-20170209-296153c5.tar.xz
/edk2-20171011-92d07e4.tar.xz
/openssl-1.1.0e-hobbled.tar.xz
+/qemu-ovmf-secureboot-1.1.2.tar.gz
diff --git a/edk2.spec b/edk2.spec
index e753e65..0139c63 100644
--- a/edk2.spec
+++ b/edk2.spec
@@ -119,7 +119,7 @@ BuildRequires: genisoimage
# These are for QOSB
BuildRequires: python3-requests
-BuildRequires: qemu
+BuildRequires: qemu-system-x86
%if %{?qosb_testing}
# This is used for testing the enrollment: builds are run in a chroot, lacking
# a kernel. The testing is only performed on x86_64 for now, but we can't make
diff --git a/sources b/sources
index 71f06bb..0bf4ee0 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,3 @@
SHA512 (edk2-20171011-92d07e4.tar.xz) = b7afcefd21470df730648c32455d19e0e31caf15d6a9aedc36a1c390fccddd18719d2710cdd01cf6156bb7551c67fce2a3073bf640b756c32184d889a8d40d46
SHA512 (openssl-1.1.0e-hobbled.tar.xz) = 25e7d5bddd28501de3f1488c91f4effb0e271986c836302680ea3754d73dceb1d34dd7460096bc28d3c0bced7dd5736dda15ccf5936d9313f4587f68a256efbc
+SHA512 (qemu-ovmf-secureboot-1.1.2.tar.gz) = 4dd7e06663bde90cea99849d47d4c94c48d573ac0454e56eab9174ade999b4dcef73fea63a9bc64d2bccecf8f69c9df2945b237a2f95a08c83d42d744e76d687
commit 07922022858a2979f54961f2b82526227752eead
Author: Patrick Uiterwijk <puiterwijk(a)redhat.com>
Date: Mon Apr 30 11:57:51 2018 +0000
Add qosb to generate pre-enrolled Secure Boot VARS files
Signed-off-by: Patrick Uiterwijk <puiterwijk(a)redhat.com>
Reviewed-by: Laszlo Ersek <lersek(a)redhat.com>
diff --git a/edk2.spec b/edk2.spec
index ecf952d..e753e65 100644
--- a/edk2.spec
+++ b/edk2.spec
@@ -1,7 +1,13 @@
%global edk2_date 20171011
%global edk2_githash 92d07e4
%global openssl_version 1.1.0e
+%global qosb_version 1.1.2
+%define qosb_testing 0
+
+%ifarch x86_64
+%define qosb_testing 1
+%endif
%if 0%{?fedora:1}
%define cross 1
%endif
@@ -29,7 +35,7 @@
Name: edk2
Version: %{edk2_date}git%{edk2_githash}
-Release: 5%{dist}
+Release: 6%{dist}
Summary: EFI Development Kit II
Group: Applications/Emulators
@@ -38,6 +44,7 @@ URL: http://www.tianocore.org/edk2/
Source0: edk2-%{edk2_date}-%{edk2_githash}.tar.xz
Source1: openssl-%{openssl_version}-hobbled.tar.xz
Source2: ovmf-whitepaper-c770f8c.txt
+Source3: https://github.com/puiterwijk/qemu-ovmf-secureboot/archive/v%{qosb_versio...
Source10: hobble-openssl
Source11: build-iso.sh
Source12: update-tarball.sh
@@ -110,6 +117,19 @@ BuildRequires: nasm
BuildRequires: qemu-img
BuildRequires: genisoimage
+# These are for QOSB
+BuildRequires: python3-requests
+BuildRequires: qemu
+%if %{?qosb_testing}
+# This is used for testing the enrollment: builds are run in a chroot, lacking
+# a kernel. The testing is only performed on x86_64 for now, but we can't make
+# the BuildRequires only on a specific arch, as that'd come through in the SRPM
+# NOTE: The actual enrollment needs to happen in all builds for all architectures,
+# because OVMF is built as noarch, which means that koji enforces that the build
+# results don't actually differ per arch, and then it picks a random arches' build
+# for the actual RPM.
+BuildRequires: kernel-core
+%endif
%description
EDK II is a development code base for creating UEFI drivers, applications
@@ -141,6 +161,15 @@ BuildArch: noarch
This package documents the tools that are needed to
build EFI executables and ROMs using the GNU tools.
+%package qosb
+Summary: Tool to enroll secureboot
+Group: Development/Tools
+Buildarch: noarch
+%description qosb
+This package contains QOSB (QEMU OVMF Secure Boot), which can enroll OVMF
+variable files to enforce Secure Boot.
+
+
%if 0%{?build_ovmf_x64:1}
%package ovmf
Summary: Open Virtual Machine Firmware
@@ -200,6 +229,11 @@ cp -a -- %{SOURCE2} .
(cd .. && tar -xvf %{SOURCE1})
cp CryptoPkg/Library/OpensslLib/openssl/LICENSE LICENSE.openssl
+# Extract QOSB
+tar -xvf %{SOURCE3}
+mv qemu-ovmf-secureboot-%{qosb_version}/README.md README.qosb
+mv qemu-ovmf-secureboot-%{qosb_version}/LICENSE LICENSE.qosb
+
%autopatch -p1
base64 --decode < MdeModulePkg/Logo/Logo-OpenSSL.bmp.b64 > MdeModulePkg/Logo/Logo-OpenSSL.bmp
@@ -264,6 +298,15 @@ cp Build/Ovmf3264/*/FV/OVMF_CODE.fd ovmf/OVMF_CODE.secboot.fd
cp Build/Ovmf3264/*/X64/Shell.efi ovmf/
cp Build/Ovmf3264/*/X64/EnrollDefaultKeys.efi ovmf
sh %{_sourcedir}/build-iso.sh ovmf/
+
+# Build enrolled VARS file
+python3 qemu-ovmf-secureboot-%{qosb_version}/ovmf-vars-generator \
+ --qemu-binary /usr/bin/qemu-system-x86_64 \
+ --skip-testing \
+ --ovmf-binary ovmf/OVMF_CODE.secboot.fd \
+ --ovmf-template-vars ovmf/OVMF_VARS.fd \
+ --uefi-shell-iso ovmf/UefiShell.iso \
+ ovmf/OVMF_VARS.secboot.fd
%endif
@@ -306,6 +349,23 @@ dd of="arm/QEMU_EFI-pflash.raw" if="arm/QEMU_EFI.fd" conv=notrunc
dd of="arm/vars-template-pflash.raw" if="/dev/zero" bs=1M count=64
%endif
+%check
+%if 0%{?build_ovmf_x64:1}
+%if 0%{?qosb_testing}
+# Verify enrolled VARS file
+python3 qemu-ovmf-secureboot-%{qosb_version}/ovmf-vars-generator \
+ --qemu-binary /usr/bin/qemu-system-x86_64 \
+ --skip-enrollment \
+ --print-output \
+ --ovmf-binary ovmf/OVMF_CODE.secboot.fd \
+ --ovmf-template-vars ovmf/OVMF_VARS.fd \
+ --uefi-shell-iso ovmf/UefiShell.iso \
+ --no-download \
+ --kernel-path `rpm -ql kernel-core | grep "\/vmlinuz$" -m 1` \
+ ovmf/OVMF_VARS.secboot.fd
+%endif
+%endif
+
%install
mkdir -p %{buildroot}%{_bindir} \
%{buildroot}%{_datadir}/%{name}/Conf \
@@ -337,6 +397,7 @@ mkdir %{buildroot}/usr/share/OVMF
ln -sf ../%{name}/ovmf/OVMF_CODE.fd %{buildroot}/usr/share/OVMF
ln -sf ../%{name}/ovmf/OVMF_CODE.secboot.fd %{buildroot}/usr/share/OVMF
ln -sf ../%{name}/ovmf/OVMF_VARS.fd %{buildroot}/usr/share/OVMF
+ln -sf ../%{name}/ovmf/OVMF_VARS.secboot.fd %{buildroot}/usr/share/OVMF
ln -sf ../%{name}/ovmf/UefiShell.iso %{buildroot}/usr/share/OVMF
%endif
%if 0%{?build_ovmf_ia32:1}
@@ -354,6 +415,8 @@ cp -a arm %{buildroot}/usr/share/%{name}
ln -sf ../%{name}/arm/QEMU_EFI-pflash.raw %{buildroot}/usr/share/AAVMF/AAVMF32_CODE.fd
%endif
+install qemu-ovmf-secureboot-%{qosb_version}/ovmf-vars-generator %{buildroot}%{_bindir}
+
%files tools
%license License.txt
@@ -397,6 +460,11 @@ ln -sf ../%{name}/arm/QEMU_EFI-pflash.raw %{buildroot}/usr/share/AAVMF/
%files tools-doc
%doc BaseTools/UserManuals/*.rtf
+%files qosb
+%license LICENSE.qosb
+%doc README.qosb
+%{_bindir}/ovmf-vars-generator
+
%if 0%{?build_ovmf_x64:1}
%files ovmf
%license OvmfPkg/License.txt
@@ -448,6 +516,10 @@ ln -sf ../%{name}/arm/QEMU_EFI-pflash.raw %{buildroot}/usr/share/AAVMF/
%changelog
+* Fri Mar 30 2018 Patrick Uiterwijk <puiterwijk(a)redhat.com> - 20171011git92d07e4-6
+- Add qemu-ovmf-secureboot (qosb)
+- Generate pre-enrolled Secure Boot OVMF VARS files
+
* Wed Mar 07 2018 Paolo Bonzini <pbonzini(a)redhat.com> - 20171011git92d07e4-5
- Fix GCC 8 compilation
- Replace dosfstools and mtools with qemu-img vvfat
5 years, 12 months