Merge remote-tracking branch 'up/master' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
commit
85fe40f24b
55
common.lua
55
common.lua
|
@ -120,7 +120,7 @@ end
|
||||||
-- @@FOO@@ with the rpm evaluation of %{foo} and
|
-- @@FOO@@ with the rpm evaluation of %{foo} and
|
||||||
-- @@BAR@@ with the rpm evaluation of %{bar}
|
-- @@BAR@@ with the rpm evaluation of %{bar}
|
||||||
-- in myfile
|
-- in myfile
|
||||||
local function writevars(macrofile,rpmvars)
|
local function writevars(macrofile, rpmvars)
|
||||||
for _, rpmvar in ipairs(rpmvars) do
|
for _, rpmvar in ipairs(rpmvars) do
|
||||||
print("sed -i 's\029" .. string.upper("@@" .. rpmvar .. "@@") ..
|
print("sed -i 's\029" .. string.upper("@@" .. rpmvar .. "@@") ..
|
||||||
"\029" .. rpm.expand( "%{" .. rpmvar .. "}" ) ..
|
"\029" .. rpm.expand( "%{" .. rpmvar .. "}" ) ..
|
||||||
|
@ -128,6 +128,58 @@ local function writevars(macrofile,rpmvars)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- https://github.com/rpm-software-management/rpm/issues/566
|
||||||
|
-- Reformat a text intended to be used used in a package description, removing
|
||||||
|
-- rpm macro generation artefacts.
|
||||||
|
-- – remove leading and ending empty lines
|
||||||
|
-- – trim intermediary empty lines to a single line
|
||||||
|
-- – fold on spaces
|
||||||
|
-- Should really be a %%{wordwrap:…} verb
|
||||||
|
local function wordwrap(text)
|
||||||
|
text = rpm.expand(text .. "\n")
|
||||||
|
text = string.gsub(text, "\t", " ")
|
||||||
|
text = string.gsub(text, " +\n", "\n")
|
||||||
|
text = string.gsub(text, "\n+\n", "\n\n")
|
||||||
|
text = string.gsub(text, "^\n", "")
|
||||||
|
text = string.gsub(text, "\n( *)[-*—][ ]+", "\n%1– ")
|
||||||
|
output = ""
|
||||||
|
for line in string.gmatch(text, "[^\n]*\n") do
|
||||||
|
local pos = 0
|
||||||
|
local advance = ""
|
||||||
|
for word in string.gmatch(line, "%s*[^%s]*\n?") do
|
||||||
|
local wl, bad = utf8.len(word)
|
||||||
|
if not wl then
|
||||||
|
print("%{warn: Invalid UTF-8 sequence detected in:\n" ..
|
||||||
|
word .. "\nIt may produce unexpected results.\n}")
|
||||||
|
wl = bad
|
||||||
|
end
|
||||||
|
if (pos == 0) then
|
||||||
|
advance, n = string.gsub(word, "^(%s*– ).*", "%1")
|
||||||
|
if (n == 0) then
|
||||||
|
advance = string.gsub(word, "^(%s*).*", "%1")
|
||||||
|
end
|
||||||
|
advance = string.gsub(advance, "– ", " ")
|
||||||
|
pos = pos + wl
|
||||||
|
elseif (pos + wl < 81) then
|
||||||
|
pos = pos + wl
|
||||||
|
else
|
||||||
|
word = advance .. string.gsub(word, "^%s*", "")
|
||||||
|
output = output .. "\n"
|
||||||
|
pos = utf8.len(word)
|
||||||
|
end
|
||||||
|
output = output .. word
|
||||||
|
if pos > 80 then
|
||||||
|
pos = 0
|
||||||
|
if not string.match(word, "\n$") then
|
||||||
|
output = output .. "\n"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
output = string.gsub(output, "\n*$", "\n")
|
||||||
|
return output
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
explicitset = explicitset,
|
explicitset = explicitset,
|
||||||
explicitunset = explicitunset,
|
explicitunset = explicitunset,
|
||||||
|
@ -139,4 +191,5 @@ return {
|
||||||
getsuffixes = getsuffixes,
|
getsuffixes = getsuffixes,
|
||||||
getbestsuffix = getbestsuffix,
|
getbestsuffix = getbestsuffix,
|
||||||
writevars = writevars,
|
writevars = writevars,
|
||||||
|
wordwrap = wordwrap,
|
||||||
}
|
}
|
||||||
|
|
56
forge.lua
56
forge.lua
|
@ -19,6 +19,18 @@ local function checkforgeurl(url, id, silent)
|
||||||
gitlab = {
|
gitlab = {
|
||||||
pattern = 'https://[^/]+/[^/]+/[^/#?]+',
|
pattern = 'https://[^/]+/[^/]+/[^/#?]+',
|
||||||
description = 'https://(…[-.])gitlab[-.]…/owner/repo'},
|
description = 'https://(…[-.])gitlab[-.]…/owner/repo'},
|
||||||
|
pagure = {
|
||||||
|
pattern = 'https://[^/]+/[^/#?]+',
|
||||||
|
description = 'https://pagure.io/repo'},
|
||||||
|
pagure_ns = {
|
||||||
|
pattern = 'https://[^/]+/[^/]+/[^/#?]+',
|
||||||
|
description = 'https://pagure.io/namespace/repo'},
|
||||||
|
pagure_fork = {
|
||||||
|
pattern = 'https://[^/]+/fork/[^/]+/[^/#?]+',
|
||||||
|
description = 'https://pagure.io/fork/owner/repo'},
|
||||||
|
pagure_ns_fork = {
|
||||||
|
pattern = 'https://[^/]+/fork/[^/]+/[^/]+/[^/#?]+',
|
||||||
|
description = 'https://pagure.io/fork/owner/namespace/repo'},
|
||||||
github = {
|
github = {
|
||||||
pattern = 'https://[^/]+/[^/]+/[^/#?]+',
|
pattern = 'https://[^/]+/[^/]+/[^/#?]+',
|
||||||
description = 'https://(…[-.])github[-.]…/owner/repo'},
|
description = 'https://(…[-.])github[-.]…/owner/repo'},
|
||||||
|
@ -52,7 +64,17 @@ local function idforge(url, silent)
|
||||||
rpm.expand("%{error:URLs must include a protocol such as https:// and a path starting with / !}")
|
rpm.expand("%{error:URLs must include a protocol such as https:// and a path starting with / !}")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if (string.match(forge, "^gitlab[%.-]") or string.match(forge, "[%.-]gitlab[%.]")) then
|
if (forge == "pagure.io") then
|
||||||
|
if string.match(url, "[^:]+://pagure.io/fork/[^/]+/[^/]+/[^/]+") then
|
||||||
|
forge = "pagure_ns_fork"
|
||||||
|
elseif string.match(url, "[^:]+://pagure.io/fork/[^/]+/[^/]+") then
|
||||||
|
forge = "pagure_fork"
|
||||||
|
elseif string.match(url, "[^:]+://pagure.io/[^/]+/[^/]+") then
|
||||||
|
forge = "pagure_ns"
|
||||||
|
elseif string.match(url, "[^:]+://pagure.io/[^/]+") then
|
||||||
|
forge = "pagure"
|
||||||
|
end
|
||||||
|
elseif (string.match(forge, "^gitlab[%.-]") or string.match(forge, "[%.-]gitlab[%.]")) then
|
||||||
forge = "gitlab"
|
forge = "gitlab"
|
||||||
elseif (string.match(forge, "^github[%.-]") or string.match(forge, "[%.-]github[%.]")) then
|
elseif (string.match(forge, "^github[%.-]") or string.match(forge, "[%.-]github[%.]")) then
|
||||||
forge = "github"
|
forge = "github"
|
||||||
|
@ -72,7 +94,7 @@ local function meta(suffix, verbose, informative, silent)
|
||||||
if ismain then
|
if ismain then
|
||||||
fedora.zalias({"forgeurl", "forgesource", "forgesetupargs",
|
fedora.zalias({"forgeurl", "forgesource", "forgesetupargs",
|
||||||
"archivename", "archiveext", "archiveurl",
|
"archivename", "archiveext", "archiveurl",
|
||||||
"topdir", "extractdir", "repo", "owner",
|
"topdir", "extractdir", "repo", "owner", "namespace",
|
||||||
"scm", "tag", "commit", "shortcommit", "branch", "version",
|
"scm", "tag", "commit", "shortcommit", "branch", "version",
|
||||||
"date", "distprefix"}, verbose)
|
"date", "distprefix"}, verbose)
|
||||||
end
|
end
|
||||||
|
@ -80,11 +102,33 @@ local function meta(suffix, verbose, informative, silent)
|
||||||
default = {
|
default = {
|
||||||
scm = "git",
|
scm = "git",
|
||||||
archiveext = "tar.bz2",
|
archiveext = "tar.bz2",
|
||||||
repo = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "^[^:]+://[^/]+/[^/]+/([^/]+)"))}',
|
repo = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "^[^:]+://[^/]+/[^/]+/([^/?#]+)"))}',
|
||||||
archivename = "%{repo" .. suffix .. "}-%{ref" .. suffix .. "}",
|
archivename = "%{repo" .. suffix .. "}-%{ref" .. suffix .. "}",
|
||||||
topdir = "%{archivename" .. suffix .. "}" },
|
topdir = "%{archivename" .. suffix .. "}" },
|
||||||
gitlab = {
|
gitlab = {
|
||||||
archiveurl = "%{forgeurl" .. suffix .. "}/-/archive/%{ref" .. suffix .. "}/%{archivename" .. suffix .. "}.%{archiveext" .. suffix .. "}" },
|
archiveurl = "%{forgeurl" .. suffix .. "}/-/archive/%{ref" .. suffix .. "}/%{archivename" .. suffix .. "}.%{archiveext" .. suffix .. "}" },
|
||||||
|
pagure = {
|
||||||
|
archiveext = "tar.gz",
|
||||||
|
repo = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "^[^:]+://[^/]+/([^/?#]+)"))}',
|
||||||
|
archiveurl = "%{forgeurl" .. suffix .. "}/archive/%{ref" .. suffix .. "}/%{archivename" .. suffix .. "}.%{archiveext" .. suffix .. "}" },
|
||||||
|
pagure_ns = {
|
||||||
|
archiveext = "tar.gz",
|
||||||
|
namespace = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "^[^:]+://[^/]+/([^/]+)/[^/?#]+"))}',
|
||||||
|
repo = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "^[^:]+://[^/]+/[^/]+/([^/?#]+)"))}',
|
||||||
|
archivename = "%{namespace" .. suffix .. "}-%{repo" .. suffix .. "}-%{ref" .. suffix .. "}",
|
||||||
|
archiveurl = "%{forgeurl" .. suffix .. "}/archive/%{ref" .. suffix .. "}/%{archivename" .. suffix .. "}.%{archiveext" .. suffix .. "}" },
|
||||||
|
pagure_fork = {
|
||||||
|
archiveext = "tar.gz",
|
||||||
|
owner = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "https://[^/]+/fork/([^/]+)/[^/?#]+"))}',
|
||||||
|
repo = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "https://[^/]+/fork/[^/]+/([^/?#]+)"))}',
|
||||||
|
archivename = "%{owner" .. suffix .. "}-%{repo" .. suffix .. "}-%{ref" .. suffix .. "}",
|
||||||
|
archiveurl = "%{forgeurl" .. suffix .. "}/archive/%{ref" .. suffix .. "}/%{archivename" .. suffix .. "}.%{archiveext" .. suffix .. "}" },
|
||||||
|
pagure_ns_fork = {
|
||||||
|
owner = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "https://[^/]+/fork/([^/]+)/[^/]+/[^/?#]+"))}',
|
||||||
|
namespace = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "https://[^/]+/fork/[^/]+/([^/]+)/[^/?#]+")}',
|
||||||
|
repo = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "https://[^/]+/fork/[^/]+/[^/]+/([^/?#]+)")}',
|
||||||
|
archivename = "%{owner" .. suffix .. "}-%{namespace" .. suffix .. "}-%{repo" .. suffix .. "}-%{ref" .. suffix .. "}",
|
||||||
|
archiveurl = "%{forgeurl" .. suffix .. "}/archive/%{ref" .. suffix .. "}/%{archivename" .. suffix .. "}.%{archiveext" .. suffix .. "}" },
|
||||||
github = {
|
github = {
|
||||||
archiveext = "tar.gz",
|
archiveext = "tar.gz",
|
||||||
archivename = "%{repo" .. suffix .. "}-%{fileref" .. suffix .. "}",
|
archivename = "%{repo" .. suffix .. "}-%{fileref" .. suffix .. "}",
|
||||||
|
@ -96,7 +140,7 @@ local function meta(suffix, verbose, informative, silent)
|
||||||
topdir = "" },
|
topdir = "" },
|
||||||
["bitbucket.org"] = {
|
["bitbucket.org"] = {
|
||||||
shortcommit = '%{lua:print(string.sub(rpm.expand("%{commit' .. suffix .. '}"), 1, 12))}',
|
shortcommit = '%{lua:print(string.sub(rpm.expand("%{commit' .. suffix .. '}"), 1, 12))}',
|
||||||
owner = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "^[^:]+://[^/]+/([^/]+)"))}',
|
owner = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "^[^:]+://[^/]+/([^/?#]+)"))}',
|
||||||
archivename = "%{owner" .. suffix .. "}-%{repo" .. suffix .. "}-%{shortcommit" .. suffix .. "}",
|
archivename = "%{owner" .. suffix .. "}-%{repo" .. suffix .. "}-%{shortcommit" .. suffix .. "}",
|
||||||
archiveurl = "%{forgeurl" .. suffix .. "}/get/%{ref" .. suffix .. "}.%{archiveext" .. suffix .. "}" } }
|
archiveurl = "%{forgeurl" .. suffix .. "}/get/%{ref" .. suffix .. "}.%{archiveext" .. suffix .. "}" } }
|
||||||
-- Packaging a moving branch is quite a bad idea, but since at least Gitlab
|
-- Packaging a moving branch is quite a bad idea, but since at least Gitlab
|
||||||
|
@ -233,7 +277,7 @@ local function meta(suffix, verbose, informative, silent)
|
||||||
if ismain then
|
if ismain then
|
||||||
fedora.zalias({"forgeurl", "forgesource", "forgesetupargs",
|
fedora.zalias({"forgeurl", "forgesource", "forgesetupargs",
|
||||||
"archivename", "archiveext", "archiveurl",
|
"archivename", "archiveext", "archiveurl",
|
||||||
"topdir", "extractdir", "repo", "owner",
|
"topdir", "extractdir", "repo", "owner", "namespace",
|
||||||
"scm", "shortcommit", "distprefix"}, verbose)
|
"scm", "shortcommit", "distprefix"}, verbose)
|
||||||
end
|
end
|
||||||
-- Final spec variable summary if the macro was called with -i
|
-- Final spec variable summary if the macro was called with -i
|
||||||
|
@ -241,7 +285,7 @@ local function meta(suffix, verbose, informative, silent)
|
||||||
rpm.expand("%{echo:Packaging variables read or set by %%forgemeta}")
|
rpm.expand("%{echo:Packaging variables read or set by %%forgemeta}")
|
||||||
fedora.echovars({"forgeurl", "forgesource", "forgesetupargs",
|
fedora.echovars({"forgeurl", "forgesource", "forgesetupargs",
|
||||||
"archivename", "archiveext", "archiveurl",
|
"archivename", "archiveext", "archiveurl",
|
||||||
"topdir", "extractdir", "repo", "owner",
|
"topdir", "extractdir", "repo", "owner", "namespace",
|
||||||
"scm", "tag", "commit", "shortcommit", "branch", "version",
|
"scm", "tag", "commit", "shortcommit", "branch", "version",
|
||||||
"date", "distprefix"}, suffix)
|
"date", "distprefix"}, suffix)
|
||||||
fedora.echovars({"dist"},"")
|
fedora.echovars({"dist"},"")
|
||||||
|
|
|
@ -0,0 +1,111 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Copyright 2018 B. Persson, Bjorn@Rombobeorn.se
|
||||||
|
#
|
||||||
|
# This material is provided as is, with absolutely no warranty expressed
|
||||||
|
# or implied. Any use is at your own risk.
|
||||||
|
#
|
||||||
|
# Permission is hereby granted to use or copy this shellscript
|
||||||
|
# for any purpose, provided the above notices are retained on all copies.
|
||||||
|
# Permission to modify the code and to distribute modified code is granted,
|
||||||
|
# provided the above notices are retained, and a notice that the code was
|
||||||
|
# modified is included with the above copyright notice.
|
||||||
|
|
||||||
|
|
||||||
|
function print_help {
|
||||||
|
cat <<'EOF'
|
||||||
|
Usage: gpgverify --keyring=<pathname> --signature=<pathname> --data=<pathname>
|
||||||
|
|
||||||
|
gpgverify is a wrapper around gpgv designed for easy and safe scripting. It
|
||||||
|
verifies a file against a detached OpenPGP signature and a keyring. The keyring
|
||||||
|
shall contain all the keys that are trusted to certify the authenticity of the
|
||||||
|
file, and must not contain any untrusted keys.
|
||||||
|
|
||||||
|
The differences, compared to invoking gpgv directly, are that gpgverify accepts
|
||||||
|
the keyring in either ASCII-armored or unarmored form, and that it will not
|
||||||
|
accidentally use a default keyring in addition to the specified one.
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
--keyring=<pathname> keyring with all the trusted keys and no others
|
||||||
|
--signature=<pathname> detached signature to verify
|
||||||
|
--data=<pathname> file to verify against the signature
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fatal_error() {
|
||||||
|
message="$1" # an error message
|
||||||
|
status=$2 # a number to use as the exit code
|
||||||
|
echo "gpgverify: $message" >&2
|
||||||
|
exit $status
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
require_parameter() {
|
||||||
|
term="$1" # a term for a required parameter
|
||||||
|
value="$2" # Complain and terminate if this value is empty.
|
||||||
|
if test -z "${value}" ; then
|
||||||
|
fatal_error "No ${term} was provided." 2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
check_status() {
|
||||||
|
action="$1" # a string that describes the action that was attempted
|
||||||
|
status=$2 # the exit code of the command
|
||||||
|
if test $status -ne 0 ; then
|
||||||
|
fatal_error "$action failed." $status
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Parse the command line.
|
||||||
|
keyring=
|
||||||
|
signature=
|
||||||
|
data=
|
||||||
|
for parameter in "$@" ; do
|
||||||
|
case "${parameter}" in
|
||||||
|
(--help)
|
||||||
|
print_help
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
(--keyring=*)
|
||||||
|
keyring="${parameter#*=}"
|
||||||
|
;;
|
||||||
|
(--signature=*)
|
||||||
|
signature="${parameter#*=}"
|
||||||
|
;;
|
||||||
|
(--data=*)
|
||||||
|
data="${parameter#*=}"
|
||||||
|
;;
|
||||||
|
(*)
|
||||||
|
fatal_error "Unknown parameter: \"${parameter}\"" 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
require_parameter 'keyring' "${keyring}"
|
||||||
|
require_parameter 'signature' "${signature}"
|
||||||
|
require_parameter 'data file' "${data}"
|
||||||
|
|
||||||
|
# Make a temporary working directory.
|
||||||
|
workdir="$(mktemp --directory)"
|
||||||
|
check_status 'Making a temporary directory' $?
|
||||||
|
workring="${workdir}/keyring.gpg"
|
||||||
|
|
||||||
|
# Decode any ASCII armor on the keyring. This is harmless if the keyring isn't
|
||||||
|
# ASCII-armored.
|
||||||
|
gpg2 --homedir="${workdir}" --yes --output="${workring}" --dearmor "${keyring}"
|
||||||
|
check_status 'Decoding the keyring' $?
|
||||||
|
|
||||||
|
# Verify the signature using the decoded keyring.
|
||||||
|
gpgv2 --homedir="${workdir}" --keyring="${workring}" "${signature}" "${data}"
|
||||||
|
check_status 'Signature verification' $?
|
||||||
|
|
||||||
|
# (--homedir isn't actually necessary. --dearmor processes only the input file,
|
||||||
|
# and if --keyring is used and contains a slash, then gpgv2 uses only that
|
||||||
|
# keyring. Thus neither command will look for a default keyring, but --homedir
|
||||||
|
# makes extra double sure that no default keyring will be touched in case
|
||||||
|
# another version of GPG works differently.)
|
||||||
|
|
||||||
|
# Clean up. (This is not done in case of an error that may need inspection.)
|
||||||
|
rm --recursive --force ${workdir}
|
9
macros
9
macros
|
@ -18,6 +18,8 @@
|
||||||
|
|
||||||
%_fmoddir %{_libdir}/gfortran/modules
|
%_fmoddir %{_libdir}/gfortran/modules
|
||||||
|
|
||||||
|
%source_date_epoch_from_changelog 1
|
||||||
|
|
||||||
%_enable_debug_packages 1
|
%_enable_debug_packages 1
|
||||||
%_include_minidebuginfo 1
|
%_include_minidebuginfo 1
|
||||||
%_include_gdb_index 1
|
%_include_gdb_index 1
|
||||||
|
@ -193,8 +195,8 @@ print(result)
|
||||||
%_source_filedigest_algorithm 8
|
%_source_filedigest_algorithm 8
|
||||||
%_binary_filedigest_algorithm 8
|
%_binary_filedigest_algorithm 8
|
||||||
|
|
||||||
# Use XZ compression for binary payloads
|
# Use Zstandard compression for binary payloads
|
||||||
%_binary_payload w2.xzdio
|
%_binary_payload w19.zstdio
|
||||||
|
|
||||||
%_hardening_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
|
%_hardening_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
|
||||||
# we don't escape symbols '~', '"', etc. so be careful when changing this
|
# we don't escape symbols '~', '"', etc. so be careful when changing this
|
||||||
|
@ -264,6 +266,9 @@ print(result)
|
||||||
%global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
|
%global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Temporary shelter for rpm 4.15 refugees
|
||||||
|
%requires_eq() %(LC_ALL="C" echo '%*' | xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
|
||||||
|
|
||||||
# override %check sections and disable them (exit 0) while we are
|
# override %check sections and disable them (exit 0) while we are
|
||||||
# bootstrapping Fedora RISC-V
|
# bootstrapping Fedora RISC-V
|
||||||
%__spec_check_pre exit 0
|
%__spec_check_pre exit 0
|
||||||
|
|
|
@ -1,15 +1,28 @@
|
||||||
# Some miscellaneous Fedora-related macros
|
# Some miscellaneous Fedora-related macros
|
||||||
|
|
||||||
# List files matching inclusion globs, excluding files matching exclusion blogs
|
# List files matching inclusion globs, excluding files matching exclusion blogs
|
||||||
# Parameters:
|
# Optional parameters:
|
||||||
# -i "<globs>" include shell globs (also takes all other macro arguments)
|
# – -i "<globs>" inclusion globs
|
||||||
# -x "<globs>" exclude shell globs
|
# – -x "<globs>" exclusion globs
|
||||||
|
# Globs are space-separated lists of shell globs. Such lists require %{quote:}
|
||||||
|
# use for safe rpm argument passing.
|
||||||
|
# Alternatively, set the following rpm variables before calling the macro:
|
||||||
|
# – “listfiles_include” inclusion globs
|
||||||
|
# — “listfiles_exclude” exclusion globs
|
||||||
|
# Arguments passed to the macro without flags will be interpreted as inclusion
|
||||||
|
# globs.
|
||||||
%listfiles(i:x:) %{expand:
|
%listfiles(i:x:) %{expand:
|
||||||
while IFS= read -r -d $'\\n' finc ; do
|
%if %{lua: print(string.len(rpm.expand("%{?-i*}%{?listfiles_include}%*")))}
|
||||||
printf "%s\\n" %{?-x*} \\
|
listfiles_include=$(realpath -e --relative-base=. %{?-i*} %{?listfiles_include} %* | sort -u)
|
||||||
| xargs -i realpath --relative-base=. '{}' \\
|
%if %{lua: print(string.len(rpm.expand("%{?-x*}%{?listfiles_exclude}")))}
|
||||||
| grep "${finc}" >/dev/null || echo "${finc}"
|
while IFS= read -r finc ; do
|
||||||
done <<< $(printf "%s\\n" %{?-i*} %* | xargs -i realpath --relative-base=. '{}' | sort -u)
|
realpath -qe --relative-base=. %{?-x*} %{?listfiles_exclude} \\
|
||||||
|
| sort -u | grep -q "${finc}" || echo "${finc}"
|
||||||
|
done <<< "${listfiles_include}"
|
||||||
|
%else
|
||||||
|
echo "${listfiles_include}"
|
||||||
|
%endif
|
||||||
|
%endif
|
||||||
}
|
}
|
||||||
|
|
||||||
# https://github.com/rpm-software-management/rpm/issues/581
|
# https://github.com/rpm-software-management/rpm/issues/581
|
||||||
|
@ -28,3 +41,6 @@ for i = 1, rpm.expand("%#") do
|
||||||
end
|
end
|
||||||
fedora.writevars(macrofile,rpmvars)
|
fedora.writevars(macrofile,rpmvars)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# gpgverify verifies signed sources. There is documentation in the script.
|
||||||
|
%gpgverify %{_rpmconfigdir}/redhat/gpgverify
|
||||||
|
|
|
@ -9,3 +9,14 @@
|
||||||
|
|
||||||
# A directory for SWID tag files describing the installation
|
# A directory for SWID tag files describing the installation
|
||||||
%_swidtagdir %{_prefix}/lib/swidtag/fedoraproject.org
|
%_swidtagdir %{_prefix}/lib/swidtag/fedoraproject.org
|
||||||
|
|
||||||
|
# A helper to apply the fedora.wordwrap filter to the content of an rpm
|
||||||
|
# variable, and print the result. Optional parameter:
|
||||||
|
# – -v <variable_name> (default value: _description)
|
||||||
|
# Putting multiple lines of UTF-8 text inside a variable is usually
|
||||||
|
# accomplished with a %%{expand: some_text}.
|
||||||
|
%wordwrap(v:) %{lua:
|
||||||
|
local fedora = require "fedora.common"
|
||||||
|
local variable = "%{" .. rpm.expand("%{-v*}%{!-v:_description}") .. "}"
|
||||||
|
print(fedora.wordwrap(variable))
|
||||||
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
Summary: Red Hat specific rpm configuration files
|
Summary: Red Hat specific rpm configuration files
|
||||||
Name: redhat-rpm-config
|
Name: redhat-rpm-config
|
||||||
Version: 128
|
Version: 137
|
||||||
Release: 1.0.riscv64%{?dist}
|
Release: 1.0.riscv64%{?dist}
|
||||||
# No version specified.
|
# No version specified.
|
||||||
License: GPL+
|
License: GPL+
|
||||||
|
@ -61,6 +61,7 @@ Source400: dist.sh
|
||||||
Source401: rpmsort
|
Source401: rpmsort
|
||||||
Source402: symset-table
|
Source402: symset-table
|
||||||
Source403: kmodtool
|
Source403: kmodtool
|
||||||
|
Source404: gpgverify
|
||||||
|
|
||||||
# 2016-10-02 snapshots from http://git.savannah.gnu.org/gitweb/?p=config.git
|
# 2016-10-02 snapshots from http://git.savannah.gnu.org/gitweb/?p=config.git
|
||||||
Source500: config.guess
|
Source500: config.guess
|
||||||
|
@ -140,6 +141,7 @@ install -p -m 444 -t %{buildroot}%{rrcdir} redhat-hardened-*
|
||||||
install -p -m 444 -t %{buildroot}%{rrcdir} redhat-annobin-*
|
install -p -m 444 -t %{buildroot}%{rrcdir} redhat-annobin-*
|
||||||
install -p -m 755 -t %{buildroot}%{rrcdir} config.*
|
install -p -m 755 -t %{buildroot}%{rrcdir} config.*
|
||||||
install -p -m 755 -t %{buildroot}%{rrcdir} dist.sh rpmsort symset-table kmodtool
|
install -p -m 755 -t %{buildroot}%{rrcdir} dist.sh rpmsort symset-table kmodtool
|
||||||
|
install -p -m 755 -t %{buildroot}%{rrcdir} gpgverify
|
||||||
install -p -m 755 -t %{buildroot}%{rrcdir} brp-*
|
install -p -m 755 -t %{buildroot}%{rrcdir} brp-*
|
||||||
|
|
||||||
install -p -m 755 -t %{buildroot}%{rrcdir} find-*
|
install -p -m 755 -t %{buildroot}%{rrcdir} find-*
|
||||||
|
@ -165,6 +167,7 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
|
||||||
%{rrcdir}/rpmrc
|
%{rrcdir}/rpmrc
|
||||||
%{rrcdir}/brp-*
|
%{rrcdir}/brp-*
|
||||||
%{rrcdir}/dist.sh
|
%{rrcdir}/dist.sh
|
||||||
|
%{rrcdir}/gpgverify
|
||||||
%{rrcdir}/redhat-hardened-*
|
%{rrcdir}/redhat-hardened-*
|
||||||
%{rrcdir}/redhat-annobin-*
|
%{rrcdir}/redhat-annobin-*
|
||||||
%{rrcdir}/config.*
|
%{rrcdir}/config.*
|
||||||
|
@ -199,12 +202,45 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
|
||||||
%{_rpmconfigdir}/macros.d/macros.kmp
|
%{_rpmconfigdir}/macros.d/macros.kmp
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Mar 14 2019 David Abdurachmanov <david.abdurachmanov@gmail.com> - 128-1.0.riscv64
|
* Wed Jul 10 2019 David Abdurachmanov <david.abdurachmanov@sifive.com> - 137-1.0.riscv64
|
||||||
- Disable perl_default_subpackage_tests (test suite subpackage for perl packages)
|
- Disable perl_default_subpackage_tests (test suite subpackage for perl packages)
|
||||||
- Disable %check for riscv64
|
- Disable %check for riscv64
|
||||||
- Add -fasynchronous-unwind-tables -fstack-clash-protection to riscv64 (other
|
- Add -fasynchronous-unwind-tables -fstack-clash-protection to riscv64 (other
|
||||||
arches seem to have them now)
|
arches seem to have them now)
|
||||||
|
|
||||||
|
* Mon Jul 08 2019 Nicolas Mailhot <nim@fedoraproject.org> - 137-1
|
||||||
|
- listfiles: make it robust against all kinds of “interesting” inputs
|
||||||
|
- wordwrap: make list indenting smarter, to produce something with enough
|
||||||
|
structure that it can be converted into AppStream metadata
|
||||||
|
|
||||||
|
* Mon Jul 08 2019 Robert-André Mauchin <zebob.m@gmail.com> - 136-1
|
||||||
|
- Revert "Fix expansion in listfiles_exclude/listfiles_include"
|
||||||
|
|
||||||
|
* Mon Jul 08 2019 Nicolas Mailhot <nim@fedoraproject.org> - 135-1
|
||||||
|
- Fix expansion in listfiles_exclude/listfiles_include
|
||||||
|
|
||||||
|
* Mon Jul 01 2019 Florian Festi <ffesti@redhat.com> - 134-1
|
||||||
|
- Switch binary payload compression to Zstandard level 19
|
||||||
|
|
||||||
|
* Thu Jun 27 2019 Vít Ondruch <vondruch@redhat.com> - 133-2
|
||||||
|
- Enable RPM to set SOURCE_DATE_EPOCH environment variable.
|
||||||
|
|
||||||
|
* Tue Jun 25 08:13:50 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 133-1
|
||||||
|
- Expand listfiles_exclude/listfiles_include
|
||||||
|
|
||||||
|
* Tue Jun 11 2019 Jitka Plesnikova <jplesnik@redhat.com> - 132-1
|
||||||
|
- Remove perl macro refugees
|
||||||
|
|
||||||
|
* Mon Jun 10 2019 Panu Matilainen <pmatilai@redhat.com> - 131-1
|
||||||
|
- Provide temporary shelter for rpm 4.15 perl macro refugees
|
||||||
|
|
||||||
|
* Tue Jun 04 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 130-1
|
||||||
|
- New macro for wrapping text — %%wordwrap
|
||||||
|
- Smal fix for %%listfiles with no arguments
|
||||||
|
|
||||||
|
* Thu May 30 2019 Björn Persson <Bjorn@Rombobjörn.se> - 129-1
|
||||||
|
- Added gpgverify.
|
||||||
|
|
||||||
* Tue Jan 15 2019 Panu Matilainen <pmatilai@redhat.com> - 128-1
|
* Tue Jan 15 2019 Panu Matilainen <pmatilai@redhat.com> - 128-1
|
||||||
- Drop redundant _smp_mflag re-definition, use the one from rpm instead
|
- Drop redundant _smp_mflag re-definition, use the one from rpm instead
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue