Compare commits
472 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1b85ce0ce8 | ||
|
3a4ec69bee | ||
|
9dd5528cf9 | ||
|
edd94328ae | ||
|
b92766d4d9 | ||
|
776d974885 | ||
|
20749d9857 | ||
|
9ce99265fd | ||
|
312bfbac26 | ||
|
3e759e70ac | ||
|
fff3459086 | ||
|
c18924507d | ||
|
40a9e696d6 | ||
|
817f533126 | ||
|
2721f1c528 | ||
|
e345575f97 | ||
|
f5f6818d6e | ||
|
ddce306578 | ||
|
140ee1de89 | ||
|
618362d6fb | ||
|
63d7e4dc11 | ||
|
6335a7ff4a | ||
|
4d93255fb3 | ||
|
2c88f0ec58 | ||
|
3490049617 | ||
|
0b30be56e5 | ||
0676a754f0 | |||
|
4a1d1dd78f | ||
|
5437dfca81 | ||
|
53617406d9 | ||
|
faef29eb93 | ||
|
b8797dcd02 | ||
|
1f7310110e | ||
|
1e9cb0e970 | ||
|
9deb0680eb | ||
|
6b139317d5 | ||
|
38d0d92d5c | ||
|
86aae600e6 | ||
|
6708d7876e | ||
|
29b504fa55 | ||
|
c68c6bd353 | ||
|
bab65715b2 | ||
|
5878df46c0 | ||
|
02f4a20583 | ||
|
8394d3cf12 | ||
|
3da0ad5da8 | ||
|
c6773c14ed | ||
|
61ec2ef5ba | ||
|
68a8a3b402 | ||
|
f29acc639b | ||
|
20a0e63249 | ||
|
e80fa1344a | ||
|
98ffd5040d | ||
|
5335ee546b | ||
|
353f8b9faf | ||
|
7b6ec4668c | ||
|
d6f71146ac | ||
|
a212174975 | ||
|
b725d1e38a | ||
|
455084c511 | ||
|
65fc49d917 | ||
|
8ba2a65b5c | ||
|
39fa88418c | ||
|
c70110c677 | ||
|
e3e0ba6ab7 | ||
|
f4ecbd3f4c | ||
|
e46fe6f663 | ||
|
7e278eadca | ||
|
b852a706ad | ||
|
2c2e13ee0e | ||
|
ec13f91007 | ||
|
31fa384924 | ||
|
9278251531 | ||
|
357550f7ba | ||
|
4d49f071dd | ||
|
973e5c7052 | ||
|
521c1a9dd5 | ||
|
ce50624ff0 | ||
|
85e473f982 | ||
|
68e4ff270c | ||
|
9a15f27f34 | ||
|
a62764b8e8 | ||
|
4d324adc62 | ||
|
aa24434396 | ||
|
a5c98437e2 | ||
|
30ef72bedf | ||
|
4e17da5386 | ||
|
c7d6417a3b | ||
|
22833277e6 | ||
|
74b8dd05bb | ||
|
f7e8f73ead | ||
|
f25f1b7627 | ||
|
6b620c91fb | ||
|
60cf200c3c | ||
|
fdbb98bd99 | ||
|
e1493f294d | ||
|
8c5d5de24a | ||
|
f843bf828a | ||
|
b771d1efaf | ||
|
bea8f67f2c | ||
|
1073ba2a5a | ||
|
8deb29e50a | ||
|
d5133f9acc | ||
|
71d7440127 | ||
|
0448c23b73 | ||
|
a4ec7ec768 | ||
|
509d4afbe4 | ||
|
910c8585f3 | ||
|
cd7779aeac | ||
|
8f59b756ca | ||
|
987e94f6ea | ||
|
17746cb929 | ||
|
40990bb864 | ||
|
fb05a239d2 | ||
|
6bc9480501 | ||
|
f0c0098d58 | ||
|
c314c8a285 | ||
|
c6cdde1b01 | ||
|
51f1c66748 | ||
|
8444cee8f3 | ||
|
35f7182912 | ||
|
d2cc76421f | ||
|
ddb845537c | ||
|
fa08f0e5a1 | ||
|
222670e2e7 | ||
|
07dea7d44f | ||
|
9ac5353554 | ||
|
00b0603754 | ||
|
257a3a95c7 | ||
|
1591a6fbf8 | ||
|
7a29d55964 | ||
|
12ace9bdb9 | ||
|
8d6c6d0761 | ||
|
1b296f01fc | ||
|
6e5a75d61e | ||
|
a013956e4f | ||
|
c873752b33 | ||
|
078af19261 | ||
|
75a53b7ea3 | ||
|
72b1044620 | ||
|
e43ce312b7 | ||
|
5b96b31cac | ||
|
faa1ad44f7 | ||
|
0d162176e9 | ||
|
3bf139f646 | ||
|
a747e7fb51 | ||
|
c4646d791d | ||
|
42f29f31df | ||
|
6c35c254c2 | ||
|
7ab7ab048c | ||
|
7c4cd33085 | ||
|
ebb7ec32a4 | ||
|
bbf2e891aa | ||
|
ea5600c887 | ||
|
b9d5eecd65 | ||
|
b5ea4b290b | ||
|
fb76fd5200 | ||
|
1e879960b4 | ||
|
6d23bc8dc0 | ||
|
00e8557ba2 | ||
|
f6596a4ca5 | ||
|
bc1c35fe61 | ||
|
2cb318efe9 | ||
|
38d4bf84e7 | ||
|
4914809dca | ||
|
905b8bae64 | ||
|
6dc72405b3 | ||
|
4edc01803a | ||
|
beb08c6bba | ||
|
3081c4e7d5 | ||
|
8fe5b07871 | ||
|
5815b8dba9 | ||
|
c6dadedc03 | ||
|
af1538f1bd | ||
|
d95e9bc7b6 | ||
|
cf7406787b | ||
|
b1a45b244e | ||
|
3234495f75 | ||
|
08a5bbb161 | ||
|
4fdceaa4c5 | ||
|
e9cc9d94a3 | ||
|
9a4753b3e4 | ||
|
c602b415e0 | ||
|
b159548b73 | ||
|
47427a213e | ||
|
c0b2fd19e0 | ||
|
7359cf0b80 | ||
|
d3c4ff3299 | ||
|
a0145ecd2f | ||
|
4824deaead | ||
|
a5fc6e4b82 | ||
|
704d7c0546 | ||
|
8e03aee432 | ||
|
e5530da0dc | ||
|
818514ea62 | ||
|
77e91e6469 | ||
|
be53b9b3c2 | ||
|
e29e82243c | ||
|
945c0e15a3 | ||
|
1e513b70c5 | ||
|
fc07b2aa54 | ||
|
3b1087c6c7 | ||
|
cba4f80fea | ||
|
6ace240a04 | ||
|
ba49b89375 | ||
|
5c2b556b6a | ||
|
b19da6ace4 | ||
|
5fab7c250f | ||
|
b3b65bcefd | ||
|
a91c848b8a | ||
|
db967d3586 | ||
|
cdfb917815 | ||
|
5568cb1c38 | ||
|
d9235d2d90 | ||
|
3cc8292af7 | ||
|
226d76f65b | ||
|
ff30293d77 | ||
|
caec3fe92f | ||
|
53fbfd98bd | ||
|
624175e139 | ||
|
8928398b2b | ||
|
01bd917b0e | ||
|
1767166dd5 | ||
|
121c2fa889 | ||
|
f60ba57637 | ||
|
82a41dfa6a | ||
|
20c7e01657 | ||
|
24cd400d7c | ||
|
20a45694f9 | ||
|
c73bd80489 | ||
|
147cb4ced1 | ||
|
eaf6603313 | ||
|
5c5a1d10b9 | ||
|
dd2a70568b | ||
|
2cbbbb322e | ||
|
43629272a8 | ||
|
0f965fc0b3 | ||
|
a1cd32b14d | ||
|
c8cbd244cf | ||
|
fdc99f0414 | ||
|
0e6d36bee9 | ||
|
188c86566f | ||
|
fe3b678a9d | ||
|
d671d47dd1 | ||
|
060a4721d1 | ||
|
c8d1a00f2a | ||
|
4241a31b50 | ||
|
64c2b57c0d | ||
|
c7d4014777 | ||
|
bca39317e9 | ||
|
6e5c1076ec | ||
|
6c38f18be2 | ||
|
33b9cbdc67 | ||
|
e0046a7a16 | ||
|
1046b9e79a | ||
|
e606f56f34 | ||
|
b4b00eca04 | ||
|
76c839e23e | ||
|
d4c5b38371 | ||
|
5f7da21873 | ||
|
31a511cc04 | ||
|
4a42acd940 | ||
|
0466a24ccb | ||
|
48bdcffed2 | ||
|
2a557175eb | ||
|
b9eb0a184b | ||
|
09b575178f | ||
|
d22596b0c1 | ||
|
1891cc0aeb | ||
|
e8199cfec5 | ||
|
f41a8a73aa | ||
|
2f654df096 | ||
|
be607b55f4 | ||
|
f40ecfaa06 | ||
|
98d1974f20 | ||
|
3b282b08f2 | ||
|
1cff11580f | ||
|
0bdcad5349 | ||
|
2e8b7fa04c | ||
|
5b8380d52b | ||
|
28c041a114 | ||
|
36225c3b7c | ||
|
68557142e4 | ||
|
401166077f | ||
|
74c45dc8c2 | ||
|
7b12d83d77 | ||
|
5034f24e6a | ||
|
8174ec3d10 | ||
|
0ae4b38eee | ||
|
51811936c4 | ||
|
4b29a24132 | ||
|
16f86875d9 | ||
|
60aea2849e | ||
|
d8bfddbf7e | ||
|
71ab2d9056 | ||
|
fe1e807f2f | ||
|
dc985dd5fc | ||
|
9ecf19e1bd | ||
|
26a7faf833 | ||
|
e04bd964a3 | ||
|
d1c22eee30 | ||
|
f808f779df | ||
|
8f766c5ee4 | ||
|
499f65fa2a | ||
|
8716aaa134 | ||
|
daac6dfeb6 | ||
|
e6fe460e84 | ||
|
3610794c3e | ||
|
15fbd4c0c2 | ||
|
8153763b1f | ||
|
055d0b77e1 | ||
|
635437c7bf | ||
|
7cf1ad2dbb | ||
|
2e8b67dd78 | ||
|
d53f48cc84 | ||
|
c73da1f920 | ||
|
631ba9b6fe | ||
|
a11368f98a | ||
|
de76474f35 | ||
|
7ec7e86b74 | ||
|
1d1bd8e3cb | ||
|
9d5f7858ba | ||
|
2a452bba1e | ||
|
bda00a1a70 | ||
|
ca3cae8695 | ||
|
c57d60b64e | ||
|
f359c096c2 | ||
|
4c01ac82e6 | ||
|
56ed371d31 | ||
|
850eda59f8 | ||
|
c9d2ffe123 | ||
|
f2e3413ddb | ||
|
b5b2aedbc1 | ||
|
82f9946bc0 | ||
|
e56e816f47 | ||
|
159a65fb61 | ||
|
f9c0aca4ae | ||
|
e2a80f379c | ||
|
5c981d5072 | ||
|
3a2d93f311 | ||
|
ab53232420 | ||
|
afe45959fb | ||
|
9ed9b4e345 | ||
|
fcf5e22a65 | ||
|
83405d773d | ||
|
0c5255b638 | ||
|
75220114eb | ||
|
e284fd4907 | ||
|
9b11fc216b | ||
|
59155fec98 | ||
|
9ffd969654 | ||
|
d82d89ec83 | ||
|
6b022102df | ||
|
e54f487738 | ||
|
85ff3763b6 | ||
|
1b84f70101 | ||
|
a959c1f92d | ||
|
9f4238cef9 | ||
|
1b6281ab55 | ||
|
5b4d287b6b | ||
|
33fb6e3b66 | ||
|
19f1cde13b | ||
|
acfbad4bf7 | ||
|
95521bebac | ||
|
feffba404a | ||
|
48c39c99dc | ||
|
e053cecd41 | ||
|
97a32887d6 | ||
|
c8ec9fb01f | ||
|
12233c1d7b | ||
|
d3e0d601f6 | ||
|
d5e4ed68cb | ||
|
1986646f85 | ||
|
f20fd09542 | ||
|
b8c7c4c827 | ||
|
5fc6cf03a1 | ||
|
1a959d38c8 | ||
|
259bb7270c | ||
|
ded130c1dd | ||
|
6eb38ebaff | ||
|
f41aa8c35f | ||
|
1518ff2d14 | ||
|
89e3065f19 | ||
|
f8bcd4e337 | ||
|
6d1ad8ea36 | ||
|
d10e27e7b7 | ||
|
84b567815c | ||
|
7a4e10bb65 | ||
|
4b07b8dbc6 | ||
|
0f91dc03fc | ||
|
c9593fd884 | ||
|
fbb9bd1577 | ||
|
2c52d52eec | ||
|
3e612b63b9 | ||
|
92708fa515 | ||
|
2eb59b7156 | ||
|
ecdfe2c6d3 | ||
|
421fb7784f | ||
|
ff150bb9f8 | ||
|
4ccbbe76dc | ||
|
a2894a5e9a | ||
|
9d388dbd19 | ||
|
7bf42f4c8d | ||
|
fb0d40d7ad | ||
|
dec5bd1983 | ||
|
0c7a682bd0 | ||
|
b14b80a980 | ||
|
7bd518af03 | ||
|
3f7f45e72a | ||
|
0a7adcf375 | ||
|
1688b12454 | ||
|
2a08d46318 | ||
|
4410abdbbb | ||
|
ae8ce229ab | ||
|
e7eb34f089 | ||
|
47b9f849d4 | ||
|
7d233e283e | ||
|
fd6018eddb | ||
|
3397996dd9 | ||
|
89a0b75d71 | ||
|
5fbe73ed91 | ||
|
1640cd5cac | ||
|
28188548fc | ||
|
4707ac95be | ||
|
ff2bb81934 | ||
|
d4c201f555 | ||
|
d18a947668 | ||
|
cec7d078f8 | ||
|
09f5ffd107 | ||
|
e44c237bfb | ||
|
555b69e7a2 | ||
|
47209decbe | ||
|
c643f846ce | ||
|
3f184f50a8 | ||
|
389ef3b072 | ||
|
dce3663fe6 | ||
|
53cca9f509 | ||
|
1de7d81cf0 | ||
|
3b777d0999 | ||
|
27ac1446b0 | ||
|
f3e01161c3 | ||
|
d4970a5d33 | ||
|
fa316006e8 | ||
|
164e1163e4 | ||
|
0a68ef9360 | ||
|
d5044b55bf | ||
|
7f05ca8c77 | ||
|
be06bd913d | ||
|
8a919b8bb9 | ||
|
61fb9e24cc | ||
|
bfb314aef8 | ||
|
122edab416 | ||
|
3031bc234c | ||
|
f0352fc040 | ||
|
00cbca969b | ||
|
7f634c575d | ||
|
8617b2fe71 | ||
|
38aa583967 | ||
|
3faabb2c8f | ||
|
3827110e0a | ||
|
22b27c88b9 | ||
|
cb63b82a2d | ||
|
f6a0040f2b | ||
|
3687e63a72 | ||
|
d5db7f5ded | ||
|
3ee6bad5b9 | ||
|
8c076a37c8 | ||
|
668485e883 | ||
|
99968383d1 | ||
|
f494dd7f79 | ||
|
72cfc641ce | ||
|
03bb2914ea |
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
redhat-rpm-config-9.1.0.tar.bz2
|
*.noarch.rpm
|
||||||
/config.guess
|
*.src.rpm
|
||||||
/config.sub
|
results_redhat-rpm-config/
|
||||||
|
.build-*.log
|
||||||
|
@ -1,44 +0,0 @@
|
|||||||
From 17d08cd3942405e20889ba7d420191993c93a12f Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
|
||||||
Date: Sun, 25 Sep 2011 11:25:34 +0300
|
|
||||||
Subject: [PATCH] Drop (un)setting LANG and DISPLAY in various build stages.
|
|
||||||
|
|
||||||
rpm >= 4.8.0 takes care of that itself.
|
|
||||||
---
|
|
||||||
macros | 21 ---------------------
|
|
||||||
1 files changed, 0 insertions(+), 21 deletions(-)
|
|
||||||
|
|
||||||
Index: redhat-rpm-config-9.1.0/macros
|
|
||||||
===================================================================
|
|
||||||
--- redhat-rpm-config-9.1.0.orig/macros
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros
|
|
||||||
@@ -131,29 +131,8 @@ package or when debugging this package.\
|
|
||||||
%endif\
|
|
||||||
%{nil}
|
|
||||||
|
|
||||||
-# Bad hack to set $LANG to C during all RPM builds
|
|
||||||
-%prep \
|
|
||||||
-%%prep\
|
|
||||||
-LANG=C\
|
|
||||||
-export LANG\
|
|
||||||
-unset DISPLAY\
|
|
||||||
-%{nil}
|
|
||||||
-
|
|
||||||
-%build %%build\
|
|
||||||
-LANG=C\
|
|
||||||
-export LANG\
|
|
||||||
-unset DISPLAY\
|
|
||||||
-%{nil}
|
|
||||||
-
|
|
||||||
%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
|
|
||||||
%%install\
|
|
||||||
-LANG=C\
|
|
||||||
-export LANG\
|
|
||||||
-unset DISPLAY\
|
|
||||||
-%{nil}
|
|
||||||
-
|
|
||||||
-%check %%check\
|
|
||||||
-unset DISPLAY\
|
|
||||||
%{nil}
|
|
||||||
|
|
||||||
#
|
|
30
STAGE2-redhat-rpm-config
Normal file
30
STAGE2-redhat-rpm-config
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#requires libtool
|
||||||
|
|
||||||
|
cd $SRC/redhat-rpm-config-*
|
||||||
|
|
||||||
|
# makefile has been removed :/
|
||||||
|
# make install
|
||||||
|
|
||||||
|
RCCDIR=/usr/lib/rpm/redhat
|
||||||
|
RPMCFGDIR=/usr/lib/rpm
|
||||||
|
RPMFATTR=/usr/lib/rpm/fileattrs
|
||||||
|
|
||||||
|
mkdir -p /usr/lib/rpm/redhat
|
||||||
|
install -p -m 644 -t $RCCDIR macros rpmrc
|
||||||
|
install -p -m 444 -t $RCCDIR redhat-hardened-*
|
||||||
|
install -p -m 755 -t $RCCDIR config.*
|
||||||
|
install -p -m 755 -t $RCCDIR dist.sh rpmsort symset-table kmodtool
|
||||||
|
install -p -m 755 -t $RCCDIR brp-*
|
||||||
|
|
||||||
|
install -p -m 755 -t $RCCDIR find-*
|
||||||
|
mkdir -p $RCCDIR/find-provides.d
|
||||||
|
install -p -m 644 -t $RCCDIR/find-provides.d firmware.prov modalias.prov
|
||||||
|
|
||||||
|
mkdir -p $RPMCFGDIR/macros.d
|
||||||
|
install -p -m 644 -t $RPMCFGDIR/macros.d macros.*
|
||||||
|
|
||||||
|
mkdir -p $RPMFATTR
|
||||||
|
install -p -m 644 -t $RPMFATTR *.attr
|
||||||
|
install -p -m 755 -t $RPMCFGDIR kmod.prov
|
||||||
|
|
||||||
|
cp -p /usr/share/libtool/config/config.{guess,sub} $RCCDIR/
|
34
brp-implant-ident-static
Executable file
34
brp-implant-ident-static
Executable file
@ -0,0 +1,34 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# If using normal root, avoid changing anything.
|
||||||
|
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
tempdir=`mktemp -d /tmp/implant-ident-XXXXXX`
|
||||||
|
if test -z "$tempdir" ; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
rm -f $tempdir/*
|
||||||
|
rmdir $tempdir
|
||||||
|
}
|
||||||
|
trap cleanup 0 1 2 3 4 5 6 7 8 9 11 13 14 15
|
||||||
|
|
||||||
|
for library in `find $RPM_BUILD_ROOT -type f -exec file \{\} \; | grep 'current ar archive' | sed 's,:.*,,g' ` ; do
|
||||||
|
pushd $tempdir > /dev/null
|
||||||
|
if test -n "$RPM_BUILD_ROOT" ; then
|
||||||
|
cleanedlibrary=`echo "$library" | sed s,"$RPM_BUILD_ROOT",,g`
|
||||||
|
else
|
||||||
|
cleanedlibrary="$library"
|
||||||
|
fi
|
||||||
|
ar x "$library"
|
||||||
|
for object in *.o ; do
|
||||||
|
echo '$RPM: '${RPM_PACKAGE_NAME:-UNKNOWN_NAME}-${RPM_PACKAGE_VERSION:-UNKNOWN_VERSION}-${RPM_PACKAGE_RELEASE:-UNKNOWN_RELEASE}:"$cleanedlibrary":"$object"' $' > __x_rpm_ident_string.txt
|
||||||
|
objcopy --add-section .rodata=__x_rpm_ident_string.txt "$object"
|
||||||
|
ar r "$library" "$object"
|
||||||
|
done
|
||||||
|
rm -f *.o
|
||||||
|
popd > /dev/null
|
||||||
|
done
|
105
brp-java-repack-jars
Executable file
105
brp-java-repack-jars
Executable file
@ -0,0 +1,105 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# If using normal root, avoid changing anything.
|
||||||
|
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If zip is not installed, we can't repack the jars.
|
||||||
|
if [ ! -x /usr/bin/zip ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
if [ ! -x /usr/bin/unzip ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
JARS=`find $RPM_BUILD_ROOT -type f -name \*.jar -not -size 0`
|
||||||
|
if [ ! -z "$JARS" ]; then
|
||||||
|
|
||||||
|
# make $RPM_BUILD_ROOT/tmp if it doesn't exist
|
||||||
|
rmtmp=0
|
||||||
|
if [ ! -x "$RPM_BUILD_ROOT/tmp" ]; then
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/tmp
|
||||||
|
rmtmp=1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# unpack every jar, set the date of the files and directories and
|
||||||
|
# repack the jar
|
||||||
|
OLD_IFS="$IFS"
|
||||||
|
IFS=$(printf '\n\t')
|
||||||
|
for j in $JARS ; do
|
||||||
|
JARNAME=`basename "$j"`
|
||||||
|
JTMPDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp "$JARNAME.tmpdir.XXXXXXXXXX"` || exit 1
|
||||||
|
JARDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp "$JARNAME.jardir.XXXXXXXXXX"` || exit 1
|
||||||
|
TIMEREF=`mktemp -p $RPM_BUILD_ROOT/tmp "$JARNAME.timeref.XXXXXXXXXX"` || exit 1
|
||||||
|
|
||||||
|
pushd "$JTMPDIR" > /dev/null
|
||||||
|
/usr/bin/unzip -qq -o "$j"
|
||||||
|
find -type d -exec chmod a+rx,u+w {} \;
|
||||||
|
find -type f -exec chmod a+r,u+w {} \;
|
||||||
|
rm -f "$j"
|
||||||
|
|
||||||
|
# Create the directories first.
|
||||||
|
find -type d | LC_ALL=C sort | while read d; do
|
||||||
|
mkdir -p "$JARDIR/$d"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Get the modtime from the newest ChangeLog. If the project
|
||||||
|
# doesn't have a ChangeLog, Jan 1, 1970 will be used.
|
||||||
|
DATE="1970-01-01 UTC"
|
||||||
|
|
||||||
|
if [ -z $_PACKAGE_BUILD_DIR ]; then
|
||||||
|
_PACKAGE_BUILD_DIR=$RPM_BUILD_DIR/$RPM_PACKAGE_NAME-$RPM_PACKAGE_VERSION
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d $_PACKAGE_BUILD_DIR ]; then
|
||||||
|
CHANGELOGS=`find $_PACKAGE_BUILD_DIR -type f -name ChangeLog`
|
||||||
|
if [ ! -z "$CHANGELOGS" ]; then
|
||||||
|
for c in $CHANGELOGS; do
|
||||||
|
TMPDATE=`stat -c %y $c | cut -d " " -f 1-2`
|
||||||
|
if [ `date --date="$TMPDATE" +%s` -gt `date --date="$DATE" +%s` ]; then
|
||||||
|
DATE="$TMPDATE"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# move the contents over to the a new directory in order and set
|
||||||
|
# the times.
|
||||||
|
find -type f | LC_ALL=C sort | while read f; do
|
||||||
|
cp "$f" "$JARDIR/$f"
|
||||||
|
touch --date="$DATE" "$JARDIR/$f"
|
||||||
|
done
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
|
# Set the times of the directories.
|
||||||
|
find "$JARDIR" -type d | while read d; do
|
||||||
|
touch --date="$DATE" "$d"
|
||||||
|
done
|
||||||
|
|
||||||
|
# make the jar
|
||||||
|
pushd "$JARDIR" > /dev/null
|
||||||
|
|
||||||
|
if [ -n "`find -not -name '.'`" ]; then
|
||||||
|
if [ -e META-INF/MANIFEST.MF ]; then
|
||||||
|
/usr/bin/zip -q -X -9 "$j" META-INF/MANIFEST.MF
|
||||||
|
fi
|
||||||
|
find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -u -q -X -9 "$j" -@
|
||||||
|
else
|
||||||
|
# Put the empty jar back
|
||||||
|
touch "$j"
|
||||||
|
fi
|
||||||
|
popd > /dev/null
|
||||||
|
|
||||||
|
# Cleanup.
|
||||||
|
rm -rf "$JTMPDIR"
|
||||||
|
rm -rf "$JARDIR"
|
||||||
|
rm -f "$TIMEREF"
|
||||||
|
done
|
||||||
|
IFS="$OLD_IFS"
|
||||||
|
|
||||||
|
# remove $RPM_BUILD_ROOT/tmp if we created it
|
||||||
|
if [ $rmtmp -eq 1 ]; then
|
||||||
|
rm -rf $RPM_BUILD_ROOT/tmp
|
||||||
|
fi
|
||||||
|
fi
|
13
brp-ldconfig
Executable file
13
brp-ldconfig
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh -efu
|
||||||
|
# Force creating of DSO symlinks.
|
||||||
|
|
||||||
|
# If using normal root, avoid changing anything.
|
||||||
|
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Create an empty config file for ldconfig to shut up a warning
|
||||||
|
config=$(mktemp -p "$RPM_BUILD_ROOT")
|
||||||
|
/sbin/ldconfig -f $(basename "$config") -N -r "$RPM_BUILD_ROOT"
|
||||||
|
rm -f "$config"
|
||||||
|
# TODO: warn if it created new symlinks and guide people.
|
158
brp-mangle-shebangs
Executable file
158
brp-mangle-shebangs
Executable file
@ -0,0 +1,158 @@
|
|||||||
|
#!/bin/bash -eu
|
||||||
|
|
||||||
|
# If using normal root, avoid changing anything.
|
||||||
|
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
exclude_files=""
|
||||||
|
exclude_files_from=""
|
||||||
|
exclude_shebangs=""
|
||||||
|
exclude_shebangs_from=""
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
local verbose=$1 && shift
|
||||||
|
local outfile=$1 && shift
|
||||||
|
local status=$1 && shift
|
||||||
|
|
||||||
|
(
|
||||||
|
echo 'usage: brp-mangle-shebangs [--files <regexp>] [--files-from <file>] [--shebangs <regexp>] [--shebangs-from <file>]'
|
||||||
|
if [ "${verbose}" == "yes" ]; then
|
||||||
|
echo ' --files: extended regexp of files to ignore'
|
||||||
|
echo ' --files-from: file containing a list of extended regexps of files to ignore'
|
||||||
|
echo ' --shebangs: extended regexp of shebangs to ignore'
|
||||||
|
echo ' --shebangs-from: file containing a list of extended regexps of shebangs to ignore'
|
||||||
|
fi
|
||||||
|
) >>${outfile}
|
||||||
|
exit ${status}
|
||||||
|
}
|
||||||
|
|
||||||
|
while [ $# -gt 0 ] ; do
|
||||||
|
case "$1" in
|
||||||
|
--files)
|
||||||
|
exclude_files="${2}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--files=*)
|
||||||
|
exclude_files="${1##--files=}"
|
||||||
|
;;
|
||||||
|
--files-from)
|
||||||
|
exclude_files_from="${2}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--files-from=*)
|
||||||
|
exclude_files_from="${1##--files-from=}"
|
||||||
|
;;
|
||||||
|
--shebangs)
|
||||||
|
exclude_shebangs="${2}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--shebangs=*)
|
||||||
|
exclude_shebangs="${1##--shebangs=}"
|
||||||
|
;;
|
||||||
|
--shebangs-from)
|
||||||
|
exclude_shebangs_from="${2}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--shebangs-from=*)
|
||||||
|
exclude_shebangs_from="${1##--shebangs-from=}"
|
||||||
|
;;
|
||||||
|
--help|--usage|"-?"|-h)
|
||||||
|
usage yes /dev/stdout 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown option \"${1}\"" 1>&2
|
||||||
|
usage no /dev/stderr 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
|
cd "$RPM_BUILD_ROOT"
|
||||||
|
|
||||||
|
# Large packages such as kernel can have thousands of executable files.
|
||||||
|
# We take care to not fork/exec thousands of "file"s and "grep"s,
|
||||||
|
# but run just two of them.
|
||||||
|
# (Take care to exclude filenames which would mangle "file" output).
|
||||||
|
find -executable -type f ! -path '*:*' ! -path $'*\n*' \
|
||||||
|
| file -N --mime-type -f - \
|
||||||
|
| grep -P ".+(?=: text/)" \
|
||||||
|
| {
|
||||||
|
fail=0
|
||||||
|
while IFS= read -r line; do
|
||||||
|
f=${line%%:*}
|
||||||
|
|
||||||
|
# Remove the dot
|
||||||
|
path="${f#.}"
|
||||||
|
|
||||||
|
if [ -n "$exclude_files" ]; then
|
||||||
|
echo "$path" | grep -q -E "$exclude_files" && continue
|
||||||
|
fi
|
||||||
|
if [ -n "$exclude_files_from" ]; then
|
||||||
|
echo "$path" | grep -q -E -f "$exclude_files_from" && continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
read shebang_line < "$f"
|
||||||
|
orig_shebang="${shebang_line#\#!}"
|
||||||
|
if [ "$orig_shebang" = "$shebang_line" ]; then
|
||||||
|
echo >&2 "*** WARNING: $f is executable but has no shebang, removing executable bit"
|
||||||
|
ts=$(stat -c %y "$f")
|
||||||
|
chmod -x "$f"
|
||||||
|
touch -d "$ts" "$f"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Trim spaces
|
||||||
|
while shebang="${orig_shebang// / }"; [ "$shebang" != "$orig_shebang" ]; do
|
||||||
|
orig_shebang="$shebang"
|
||||||
|
done
|
||||||
|
# Treat "#! /path/to " as "#!/path/to"
|
||||||
|
orig_shebang="${orig_shebang# }"
|
||||||
|
|
||||||
|
shebang="$orig_shebang"
|
||||||
|
|
||||||
|
if [ -z "$shebang" ]; then
|
||||||
|
echo >&2 "*** WARNING: $f is executable but has empty shebang, removing executable bit"
|
||||||
|
ts=$(stat -c %y "$f")
|
||||||
|
chmod -x "$f"
|
||||||
|
touch -d "$ts" "$f"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
if [ -n "${shebang##/*}" ]; then
|
||||||
|
echo >&2 "*** ERROR: $f has shebang which doesn't start with '/' ($shebang)"
|
||||||
|
fail=1
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! { echo "$shebang" | grep -q -P "^/(?:usr/)?(?:bin|sbin)/"; }; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Replace "special" env shebang:
|
||||||
|
# /whatsoever/env /whatever/foo → /whatever/foo
|
||||||
|
shebang=$(echo "$shebang" | sed -r -e 's@^(.+)/env /(.+)$@/\2@')
|
||||||
|
# /whatsoever/env foo → /whatsoever/foo
|
||||||
|
shebang=$(echo "$shebang" | sed -r -e 's@^(.+/)env (.+)$@\1\2@')
|
||||||
|
|
||||||
|
# If the shebang now starts with /bin, change it to /usr/bin
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1581757
|
||||||
|
shebang=$(echo "$shebang" | sed -r -e 's@^/bin/@/usr/bin/@')
|
||||||
|
|
||||||
|
# Replace ambiguous python with python2
|
||||||
|
py_shebang=$(echo "$shebang" | sed -r -e 's@/usr/bin/python(\s|$)@/usr/bin/python2\1@')
|
||||||
|
|
||||||
|
if [ "$shebang" != "$py_shebang" ]; then
|
||||||
|
echo >&2 "*** ERROR: ambiguous python shebang in $path: #!$orig_shebang. Change it to python3 (or python2) explicitly."
|
||||||
|
fail=1
|
||||||
|
elif [ "#!$shebang" != "#!$orig_shebang" ]; then
|
||||||
|
echo "mangling shebang in $path from $orig_shebang to #!$shebang"
|
||||||
|
ts=$(stat -c %y "$f")
|
||||||
|
sed -i -e "1c #!$shebang" "$f"
|
||||||
|
touch -d "$ts" "$f"
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
exit $fail
|
||||||
|
}
|
144
brp-python-bytecompile
Executable file
144
brp-python-bytecompile
Executable file
@ -0,0 +1,144 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
errors_terminate=$2
|
||||||
|
extra=$3
|
||||||
|
|
||||||
|
# If using normal root, avoid changing anything.
|
||||||
|
if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Figure out how deep we need to descend. We could pick an insanely high
|
||||||
|
# number and hope it's enough, but somewhere, somebody's sure to run into it.
|
||||||
|
depth=`(find "$RPM_BUILD_ROOT" -type f -name "*.py" -print0 ; echo /) | \
|
||||||
|
xargs -0 -n 1 dirname | sed 's,[^/],,g' | sort -u | tail -n 1 | wc -c`
|
||||||
|
if [ -z "$depth" -o "$depth" -le "1" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This function now implements Python byte-compilation in two different ways:
|
||||||
|
# Python >= 3.4 uses a new module compileall2 - https://github.com/fedora-python/compileall2
|
||||||
|
# Python < 3.4 (inc. Python 2) uses compileall module from stdlib with some hacks
|
||||||
|
# When we drop support for Python 2, we'd be able to use all compileall2 features like:
|
||||||
|
# - -s and -p options to manipulate with a path baked into pyc files instead of $real_libdir
|
||||||
|
# - -o 0 -o 1 to produce multiple files in one run - each with a different optimization level - instead of $options
|
||||||
|
# - removed useless $depth - both compileall and compileall2 are limited by sys.getrecursionlimit()
|
||||||
|
# These changes will make this script much simpler
|
||||||
|
function python_bytecompile()
|
||||||
|
{
|
||||||
|
local options=$1
|
||||||
|
local python_binary=$2
|
||||||
|
local exclude=$3
|
||||||
|
local python_libdir=$4
|
||||||
|
local depth=$5 # Not used for Python >= 3.4
|
||||||
|
local real_libdir=$6 # Not used for Python >= 3.4
|
||||||
|
|
||||||
|
python_version=$($python_binary -c "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))")
|
||||||
|
|
||||||
|
#
|
||||||
|
# Python 3.4 and higher
|
||||||
|
#
|
||||||
|
if [ "$python_version" -ge 34 ]; then
|
||||||
|
|
||||||
|
[ ! -z $exclude ] && exclude="-x '$exclude'"
|
||||||
|
# /usr/lib/rpm/redhat/ contains compileall2 Python module
|
||||||
|
# -q disables verbose output
|
||||||
|
# -f forces the process to overwrite existing compiled files
|
||||||
|
# -x excludes paths defined by regex
|
||||||
|
# -e excludes symbolic links pointing outside the build root
|
||||||
|
# -x and -e together implements the same functionality as the Filter class below
|
||||||
|
# -s strips $RPM_BUILD_ROOT from the path
|
||||||
|
# -p prepends the leading slash to the path to make it absolute
|
||||||
|
PYTHONPATH=/usr/lib/rpm/redhat/ $python_binary -B $options -m compileall2 -q -f $exclude -s $RPM_BUILD_ROOT -p / -e $RPM_BUILD_ROOT $python_libdir
|
||||||
|
else
|
||||||
|
#
|
||||||
|
# Python 3.3 and lower (incl. Python 2)
|
||||||
|
#
|
||||||
|
|
||||||
|
cat << EOF | $python_binary $options
|
||||||
|
import compileall, sys, os, re
|
||||||
|
|
||||||
|
python_libdir = "$python_libdir"
|
||||||
|
depth = $depth
|
||||||
|
real_libdir = "$real_libdir"
|
||||||
|
build_root = "$RPM_BUILD_ROOT"
|
||||||
|
exclude = r"$exclude"
|
||||||
|
|
||||||
|
class Filter:
|
||||||
|
def search(self, path):
|
||||||
|
ret = not os.path.realpath(path).startswith(build_root)
|
||||||
|
if exclude:
|
||||||
|
ret = ret or re.search(exclude, path)
|
||||||
|
return ret
|
||||||
|
|
||||||
|
sys.exit(not compileall.compile_dir(python_libdir, depth, real_libdir, force=1, rx=Filter(), quiet=1))
|
||||||
|
EOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# .pyc/.pyo files embed a "magic" value, identifying the ABI version of Python
|
||||||
|
# bytecode that they are for.
|
||||||
|
#
|
||||||
|
# The files below RPM_BUILD_ROOT could be targeting multiple versions of
|
||||||
|
# python (e.g. a single build that emits several subpackages e.g. a
|
||||||
|
# python26-foo subpackage, a python31-foo subpackage etc)
|
||||||
|
#
|
||||||
|
# Support this by assuming that below each /usr/lib/python$VERSION/, all
|
||||||
|
# .pyc/.pyo files are to be compiled for /usr/bin/python$VERSION.
|
||||||
|
#
|
||||||
|
# For example, below /usr/lib/python2.6/, we're targeting /usr/bin/python2.6
|
||||||
|
# and below /usr/lib/python3.1/, we're targeting /usr/bin/python3.1
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/usr/lib(64)?/python[0-9]\.[0-9]+$"`;
|
||||||
|
do
|
||||||
|
python_binary=/usr/bin/$(basename $python_libdir)
|
||||||
|
real_libdir=${python_libdir/$RPM_BUILD_ROOT/}
|
||||||
|
echo "Bytecompiling .py files below $python_libdir using $python_binary"
|
||||||
|
|
||||||
|
# Generate normal (.pyc) byte-compiled files.
|
||||||
|
python_bytecompile "" "$python_binary" "" "$python_libdir" "$depth" "$real_libdir"
|
||||||
|
if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
|
||||||
|
# One or more of the files had a syntax error
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Generate optimized (.pyo) byte-compiled files.
|
||||||
|
python_bytecompile "-O" "$python_binary" "" "$python_libdir" "$depth" "$real_libdir"
|
||||||
|
if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
|
||||||
|
# One or more of the files had a syntax error
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
|
# Handle other locations in the filesystem using the default python implementation
|
||||||
|
# if extra is set to 0, don't do this
|
||||||
|
if [ 0$extra -eq 0 ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If we don't have a default python interpreter, we cannot proceed
|
||||||
|
default_python=${1:-/usr/bin/python}
|
||||||
|
if [ ! -x "$default_python" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Figure out if there are files to be bytecompiled with the default_python at all
|
||||||
|
# this prevents unnecessary default_python invocation
|
||||||
|
find "$RPM_BUILD_ROOT" -type f -name "*.py" | grep -Ev "/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]|/usr/share/doc" || exit 0
|
||||||
|
|
||||||
|
# Generate normal (.pyc) byte-compiled files.
|
||||||
|
python_bytecompile "" $default_python "/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/"
|
||||||
|
if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
|
||||||
|
# One or more of the files had a syntax error
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Generate optimized (.pyo) byte-compiled files.
|
||||||
|
python_bytecompile "-O" $default_python "/bin/|/sbin/|/usr/lib(64)?/python[0-9]\.[0-9]|/usr/share/doc" "$RPM_BUILD_ROOT" "$depth" "/"
|
||||||
|
if [ $? -ne 0 -a 0$errors_terminate -ne 0 ]; then
|
||||||
|
# One or more of the files had a syntax error
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exit 0
|
17
brp-strip-lto
Executable file
17
brp-strip-lto
Executable file
@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/sh
|
||||||
|
# If using normal root, avoid changing anything.
|
||||||
|
if [ -z "$RPM_BUILD_ROOT" ] || [ "$RPM_BUILD_ROOT" = "/" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
STRIP=${1:-strip}
|
||||||
|
NCPUS=${RPM_BUILD_NCPUS:-1}
|
||||||
|
|
||||||
|
case `uname -a` in
|
||||||
|
Darwin*) exit 0 ;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Strip ELF binaries
|
||||||
|
find "$RPM_BUILD_ROOT" -type f -name '*.[ao]' \! -regex "$RPM_BUILD_ROOT/*usr/lib/debug.*" -print0 | \
|
||||||
|
eu-elfclassify --not-program --not-library --not-linux-kernel-module --stdin0 --print0 | xargs -0 -r -P$NCPUS -n32 sh -c "$STRIP -p -R .gnu.lto_* -R .gnu.debuglto_* -N __gnu_lto_v1 \"\$@\"" ARG0
|
390
buildflags.md
Normal file
390
buildflags.md
Normal file
@ -0,0 +1,390 @@
|
|||||||
|
This document contains documentation of the individual compiler flags
|
||||||
|
and how to use them.
|
||||||
|
|
||||||
|
[TOC]
|
||||||
|
|
||||||
|
# Using RPM build flags
|
||||||
|
|
||||||
|
For packages which use autoconf to set up the build environment, use
|
||||||
|
the `%configure` macro to obtain the full complement of flags, like
|
||||||
|
this:
|
||||||
|
|
||||||
|
%configure
|
||||||
|
|
||||||
|
This will invoke the `./configure` with arguments (such as
|
||||||
|
`--prefix=/usr`) to adjust the paths to the packaging defaults.
|
||||||
|
|
||||||
|
As a side effect, this will set the environment variables `CFLAGS`,
|
||||||
|
`CXXFLAGS`, `FFLAGS`, `FCFLAGS`, `LDFLAGS` and `LT_SYS_LIBRARY_PATH`,
|
||||||
|
so they can be used by makefiles and other build tools. (However,
|
||||||
|
existing values for these variables are not overwritten.)
|
||||||
|
|
||||||
|
If your package does not use autoconf, you can still set the same
|
||||||
|
environment variables using
|
||||||
|
|
||||||
|
%set_build_flags
|
||||||
|
|
||||||
|
early in the `%build` section. (Again, existing environment variables
|
||||||
|
are not overwritten.)
|
||||||
|
|
||||||
|
Individual build flags are also available through RPM macros:
|
||||||
|
|
||||||
|
* `%{build_cflags}` for the C compiler flags (also known as the
|
||||||
|
`CFLAGS` variable). Also historically available as `%{optflags}`.
|
||||||
|
Furthermore, at the start of the `%build` section, the environment
|
||||||
|
variable `RPM_OPT_FLAGS` is set to this value.
|
||||||
|
* `%{build_cxxflags}` for the C++ compiler flags (usually assigned to
|
||||||
|
the `CXXFLAGS` shell variable).
|
||||||
|
* `%{build_fflags} for `FFLAGS` (the Fortran compiler flags, also
|
||||||
|
known as the `FCFLAGS` variable).
|
||||||
|
* `%{build_ldflags}` for the link editor (ld) flags, usually known as
|
||||||
|
`LDFLAGS`. Note that the contents quotes linker arguments using
|
||||||
|
`-Wl`, so this variable is intended for use with the `gcc` compiler
|
||||||
|
driver. At the start of the `%build` section, the environment
|
||||||
|
variable `RPM_LD_FLAGS` is set to this value.
|
||||||
|
|
||||||
|
The variable `LT_SYS_LIBRARY_PATH` is defined here to prevent the `libtool`
|
||||||
|
script (v2.4.6+) from hardcoding %_libdir into the binaries' RPATH.
|
||||||
|
|
||||||
|
These RPM macros do not alter shell environment variables.
|
||||||
|
|
||||||
|
For some other build tools separate mechanisms exist:
|
||||||
|
|
||||||
|
* CMake builds use the the `%cmake` macro from the `cmake-rpm-macros`
|
||||||
|
package.
|
||||||
|
|
||||||
|
Care must be taking not to compile the current selection of compiler
|
||||||
|
flags into any RPM package besides `redhat-rpm-config`, so that flag
|
||||||
|
changes are picked up automatically once `redhat-rpm-config` is
|
||||||
|
updated.
|
||||||
|
|
||||||
|
# Flag selection for the build type
|
||||||
|
|
||||||
|
The default flags are suitable for building applications.
|
||||||
|
|
||||||
|
For building shared objects, you must compile with `-fPIC` in
|
||||||
|
(`CFLAGS` or `CXXFLAGS`) and link with `-shared` (in `LDFLAGS`).
|
||||||
|
|
||||||
|
For other considerations involving shared objects, see:
|
||||||
|
|
||||||
|
* [Fedora Packaging Guidelines: Shared Libraries](https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shared_libraries)
|
||||||
|
|
||||||
|
# Customizing compiler flags
|
||||||
|
|
||||||
|
It is possible to set RPM macros to change some aspects of the
|
||||||
|
compiler flags. Changing these flags should be used as a last
|
||||||
|
recourse if other workarounds are not available.
|
||||||
|
|
||||||
|
### Lazy binding
|
||||||
|
|
||||||
|
If your package depends on the semantics of lazy binding (e.g., it has
|
||||||
|
plugins which load additional plugins to complete their dependencies,
|
||||||
|
before which some referenced functions are undefined), you should put
|
||||||
|
`-Wl,-z,lazy` at the end of the `LDFLAGS` setting when linking objects
|
||||||
|
which have such requirements. Under these circumstances, it is
|
||||||
|
unnecessary to disable hardened builds (and thus lose full ASLR for
|
||||||
|
executables), or link everything without `-Wl,z,now` (non-lazy
|
||||||
|
binding).
|
||||||
|
|
||||||
|
### Hardened builds
|
||||||
|
|
||||||
|
By default, the build flags enable fully hardened builds. To change
|
||||||
|
this, include this in the RPM spec file:
|
||||||
|
|
||||||
|
%undefine _hardened_build
|
||||||
|
|
||||||
|
This turns off certain hardening features, as described in detail
|
||||||
|
below. The main difference is that executables will be
|
||||||
|
position-dependent (no full ASLR) and use lazy binding.
|
||||||
|
|
||||||
|
### Annotated builds/watermarking
|
||||||
|
|
||||||
|
By default, the build flags cause a special output section to be
|
||||||
|
included in ELF files which describes certain aspects of the build.
|
||||||
|
To change this for all compiler invocations, include this in the RPM
|
||||||
|
spec file:
|
||||||
|
|
||||||
|
%undefine _annotated_build
|
||||||
|
|
||||||
|
Be warned that this turns off watermarking, making it impossible to do
|
||||||
|
full hardening coverage analysis for any binaries produced.
|
||||||
|
|
||||||
|
It is possible to disable annotations for individual compiler
|
||||||
|
invocations, using the `-fplugin-arg-annobin-disable` flag. However,
|
||||||
|
the annobin plugin must still be loaded for this flag to be
|
||||||
|
recognized, so it has to come after the hardening flags on the command
|
||||||
|
line (it has to be added at the end of `CFLAGS`, or specified after
|
||||||
|
the `CFLAGS` variable contents).
|
||||||
|
|
||||||
|
### Strict symbol checks in the link editor (ld)
|
||||||
|
|
||||||
|
Optionally, the link editor will refuse to link shared objects which
|
||||||
|
contain undefined symbols. Such symbols lack symbol versioning
|
||||||
|
information and can be bound to the wrong (compatibility) symbol
|
||||||
|
version at run time, and not the actual (default) symbol version which
|
||||||
|
would have been used if the symbol definition had been available at
|
||||||
|
static link time. Furthermore, at run time, the dynamic linker will
|
||||||
|
not have complete dependency information (in the form of DT_NEEDED
|
||||||
|
entries), which can lead to errors (crashes) if IFUNC resolvers are
|
||||||
|
executed before the shared object containing them is fully relocated.
|
||||||
|
|
||||||
|
To switch on these checks, define this macro in the RPM spec file:
|
||||||
|
|
||||||
|
%define _strict_symbol_defs_build 1
|
||||||
|
|
||||||
|
If this RPM spec option is active, link failures will occur if the
|
||||||
|
linker command line does not list all shared objects which are needed.
|
||||||
|
In this case, you need to add the missing DSOs (with linker arguments
|
||||||
|
such as `-lm`). As a result, the link editor will also generated the
|
||||||
|
necessary DT_NEEDED entries.
|
||||||
|
|
||||||
|
In some cases (such as when a DSO is loaded as a plugin and is
|
||||||
|
expected to bind to symbols in the main executable), undefined symbols
|
||||||
|
are expected. In this case, you can add
|
||||||
|
|
||||||
|
%undefine _strict_symbol_defs_build
|
||||||
|
|
||||||
|
to the RPM spec file to disable these strict checks. Alternatively,
|
||||||
|
you can pass `-z undefs` to ld (written as `-Wl,-z,undefs` on the gcc
|
||||||
|
command line). The latter needs binutils 2.29.1-12.fc28 or later.
|
||||||
|
|
||||||
|
### Legacy -fcommon
|
||||||
|
|
||||||
|
Since version 10, [gcc defaults to `-fno-common`](https://gcc.gnu.org/gcc-10/porting_to.html#common).
|
||||||
|
Builds may fail with `multiple definition of ...` errors.
|
||||||
|
|
||||||
|
As a short term workaround for such failure,
|
||||||
|
it is possible to add `-fcommon` to the flags by defining `%_legacy_common_support`.
|
||||||
|
|
||||||
|
%define _legacy_common_support 1
|
||||||
|
|
||||||
|
Properly fixing the failure is always preferred!
|
||||||
|
|
||||||
|
# Individual compiler flags
|
||||||
|
|
||||||
|
Compiler flags end up in the environment variables `CFLAGS`,
|
||||||
|
`CXXFLAGS`, `FFLAGS`, and `FCFLAGS`.
|
||||||
|
|
||||||
|
The general (architecture-independent) build flags are:
|
||||||
|
|
||||||
|
* `-O2`: Turn on various GCC optimizations. See the [GCC manual](https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-O2).
|
||||||
|
Optimization improves performance, the accuracy of warnings, and the
|
||||||
|
reach of toolchain-based hardening, but it makes debugging harder.
|
||||||
|
* `-g`: Generate debugging information (DWARF). In Fedora, this data
|
||||||
|
is separated into `-debuginfo` RPM packages whose installation is
|
||||||
|
optional, so debuging information does not increase the size of
|
||||||
|
installed binaries by default.
|
||||||
|
* `-pipe`: Run compiler and assembler in parallel and do not use a
|
||||||
|
temporary file for the assembler input. This can improve
|
||||||
|
compilation performance. (This does not affect code generation.)
|
||||||
|
* `-Wall`: Turn on various GCC warnings.
|
||||||
|
See the [GCC manual](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wall).
|
||||||
|
* `-Werror=format-security`: Turn on format string warnings and treat
|
||||||
|
them as errors.
|
||||||
|
See the [GCC manual](https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wformat-security).
|
||||||
|
This can occasionally result in compilation errors. In this case,
|
||||||
|
the best option is to rewrite the source code so that only constant
|
||||||
|
format strings (string literals) are used.
|
||||||
|
* `-Wp,-D_FORTIFY_SOURCE=2`: Source fortification activates various
|
||||||
|
hardening features in glibc:
|
||||||
|
* String functions such as `memcpy` attempt to detect buffer lengths
|
||||||
|
and terminate the process if a buffer overflow is detected.
|
||||||
|
* `printf` format strings may only contain the `%n` format specifier
|
||||||
|
if the format string resides in read-only memory.
|
||||||
|
* `open` and `openat` flags are checked for consistency with the
|
||||||
|
presence of a *mode* argument.
|
||||||
|
* Plus other minor hardening changes.
|
||||||
|
(These changes can occasionally break valid programs.)
|
||||||
|
* `-fexceptions`: Provide exception unwinding support for C programs.
|
||||||
|
See the [`-fexceptions` option in the GCC
|
||||||
|
manual](https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fexceptions)
|
||||||
|
and the [`cleanup` variable
|
||||||
|
attribute](https://gcc.gnu.org/onlinedocs/gcc/Common-Variable-Attributes.html#index-cleanup-variable-attribute).
|
||||||
|
This also hardens cancellation handling in C programs because
|
||||||
|
it is not required to use an on-stack jump buffer to install
|
||||||
|
a cancellation handler with `pthread_cleanup_push`. It also makes
|
||||||
|
it possible to unwind the stack (using C++ `throw` or Rust panics)
|
||||||
|
from C callback functions if a C library supports non-local exits
|
||||||
|
from them (e.g., via `longjmp`).
|
||||||
|
* `-Wp,-D_GLIBCXX_ASSERTIONS`: Enable lightweight assertions in the
|
||||||
|
C++ standard library, such as bounds checking for the subscription
|
||||||
|
operator on vectors. (This flag is added to both `CFLAGS` and
|
||||||
|
`CXXFLAGS`; C compilations will simply ignore it.)
|
||||||
|
* `-fstack-protector-strong`: Instrument functions to detect
|
||||||
|
stack-based buffer overflows before jumping to the return address on
|
||||||
|
the stack. The *strong* variant only performs the instrumentation
|
||||||
|
for functions whose stack frame contains addressable local
|
||||||
|
variables. (If the address of a variable is never taken, it is not
|
||||||
|
possible that a buffer overflow is caused by incorrect pointer
|
||||||
|
arithmetic involving a pointer to that variable.)
|
||||||
|
* `-grecord-gcc-switches`: Include select GCC command line switches in
|
||||||
|
the DWARF debugging information. This is useful for detecting the
|
||||||
|
presence of certain build flags and general hardening coverage.
|
||||||
|
|
||||||
|
For hardened builds (which are enabled by default, see above for how
|
||||||
|
to disable them), the flag
|
||||||
|
`-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1` is added to the
|
||||||
|
command line. It adds the following flag to the command line:
|
||||||
|
|
||||||
|
* `-fPIE`: Compile for a position-independent executable (PIE),
|
||||||
|
enabling full address space layout randomization (ASLR). This is
|
||||||
|
similar to `-fPIC`, but avoids run-time indirections on certain
|
||||||
|
architectures, resulting in improved performance and slightly
|
||||||
|
smaller executables. However, compared to position-dependent code
|
||||||
|
(the default generated by GCC), there is still a measurable
|
||||||
|
performance impact.
|
||||||
|
|
||||||
|
If the command line also contains `-r` (producing a relocatable
|
||||||
|
object file), `-fpic` or `-fPIC`, this flag is automatically
|
||||||
|
dropped. (`-fPIE` can only be used for code which is linked into
|
||||||
|
the main program.) Code which goes into static libraries should be
|
||||||
|
compiled with `-fPIE`, except when this code is expected to be
|
||||||
|
linked into DSOs, when `-fPIC` must be used.
|
||||||
|
|
||||||
|
To be effective, `-fPIE` must be used with the `-pie` linker flag
|
||||||
|
when producing an executable, see below.
|
||||||
|
|
||||||
|
To support [binary watermarks for ELF
|
||||||
|
objects](https://fedoraproject.org/wiki/Toolchain/Watermark) using
|
||||||
|
annobin, the `-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1` flag is
|
||||||
|
added by default. This can be switched off by undefining the
|
||||||
|
`%_annotated_build` RPM macro (see above).
|
||||||
|
|
||||||
|
### Architecture-specific compiler flags
|
||||||
|
|
||||||
|
These compiler flags are enabled for all builds (hardened/annotated or
|
||||||
|
not), but their selection depends on the architecture:
|
||||||
|
|
||||||
|
* `-fstack-clash-protection`: Turn on instrumentation to avoid
|
||||||
|
skipping the guard page in large stack frames. (Without this flag,
|
||||||
|
vulnerabilities can result where the stack overlaps with the heap,
|
||||||
|
or thread stacks spill into other regions of memory.) This flag is
|
||||||
|
fully ABI-compatible and has adds very little run-time overhead, but
|
||||||
|
is only available on certain architectures (currently aarch64, i386,
|
||||||
|
ppc64, ppc64le, s390x, x86_64).
|
||||||
|
* `-fcf-protection`: Instrument binaries to guard against
|
||||||
|
ROP/JOP attacks. Used on i686 and x86_64.
|
||||||
|
* `-m64` and `-m32`: Some GCC builds support both 32-bit and 64-bit in
|
||||||
|
the same compilation. For such architectures, the RPM build process
|
||||||
|
explicitly selects the architecture variant by passing this compiler
|
||||||
|
flag.
|
||||||
|
* `-fasynchronous-unwind-tables`: Generate full unwind information
|
||||||
|
covering all program points. This is required for support of
|
||||||
|
asynchronous cancellation and proper unwinding from signal
|
||||||
|
handlers. It also makes performance and debugging tools more
|
||||||
|
useful because unwind information is available without having to
|
||||||
|
install (and load) debugging ienformation.
|
||||||
|
Asynchronous unwind tables are enabled for aarch64, i686, ppc64,
|
||||||
|
ppc64le, s390x, and x86_64. They are not needed on armhfp due to
|
||||||
|
architectural differences in stack management. On these
|
||||||
|
architectures, `-fexceptions` (see above) still enables regular
|
||||||
|
unwind tables (or they are enabled by default even without this
|
||||||
|
option).
|
||||||
|
|
||||||
|
In addition, `redhat-rpm-config` re-selects the built-in default
|
||||||
|
tuning in the `gcc` package. These settings are:
|
||||||
|
|
||||||
|
* **armhfp**: `-march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard`
|
||||||
|
selects an Arm subarchitecture based on the ARMv7-A architecture
|
||||||
|
with 16 64-bit floating point registers. `-mtune=cortex-8a` selects
|
||||||
|
tuning for the Cortex-A8 implementation (while preserving compatibility
|
||||||
|
with other ARMv7-A implementations). `-mabi=aapcs-linux` switches to
|
||||||
|
the AAPCS ABI for GNU/Linux.
|
||||||
|
* **i686**: `-march=i686` is used to select a minmum support CPU level
|
||||||
|
of i686 (corresponding to the Pentium Pro). SSE2 support is
|
||||||
|
enabled with `-msse2` (so only CPUs with SSE2 support can run the
|
||||||
|
compiled code; SSE2 was introduced first with the Pentium 4).
|
||||||
|
`-mtune=generic` activates tuning for a current blend of CPUs
|
||||||
|
(under the assumption that most users of i686 packages obtain them
|
||||||
|
through an x86_64 installation on current hardware).
|
||||||
|
`-mfpmath=sse` instructs GCC to use the SSE2 unit for floating
|
||||||
|
point math to avoid excess precision issues. `-mstackrealign`
|
||||||
|
avoids relying on the stack alignment guaranteed by the current
|
||||||
|
version of the i386 ABI.
|
||||||
|
* **ppc64le**: `-mcpu=power8 -mtune=power8` selects a minimum supported
|
||||||
|
CPU level of POWER8 (the first CPU with ppc64le support) and tunes
|
||||||
|
for POWER8.
|
||||||
|
* **s390x**: `-march=zEC12 -mtune=z13` specifies a minimum supported CPU
|
||||||
|
level of zEC12, while optimizing for a subsequent CPU generation
|
||||||
|
(z13).
|
||||||
|
* **x86_64**: `-mtune=generic` selects tuning which is expected to
|
||||||
|
beneficial for a broad range of current CPUs.
|
||||||
|
* **ppc64** and **aarch64** do not have any architecture-specific tuning.
|
||||||
|
|
||||||
|
# Individual linker flags
|
||||||
|
|
||||||
|
Linker flags end up in the environment variable `LDFLAGS`.
|
||||||
|
|
||||||
|
The linker flags listed below are injected. Note that they are
|
||||||
|
prefixed with `-Wl` because it is expected that these flags are passed
|
||||||
|
to the compiler driver `gcc`, and not directly to the link editor
|
||||||
|
`ld`.
|
||||||
|
|
||||||
|
* `-z relro`: Activate the *read-only after relocation* feature.
|
||||||
|
Constant data and relocations are placed on separate pages, and the
|
||||||
|
dynamic linker is instructed to revoke write permissions after
|
||||||
|
dynamic linking. Full protection of relocation data requires the
|
||||||
|
`-z now` flag (see below).
|
||||||
|
* `-z defs`: Refuse to link shared objects (DSOs) with undefined symbols
|
||||||
|
(optional, see above).
|
||||||
|
|
||||||
|
For hardened builds, the
|
||||||
|
`-specs=/usr/lib/rpm/redhat/redhat-hardened-ld` flag is added to the
|
||||||
|
compiler driver command line. (This can be disabled by undefining the
|
||||||
|
`%_hardened_build` macro; see above) This activates the following
|
||||||
|
linker flags:
|
||||||
|
|
||||||
|
* `-pie`: Produce a PIE binary. This is only activated for the main
|
||||||
|
executable, and only if it is dynamically linked. This requires
|
||||||
|
that all objects which are linked in the main executable have been
|
||||||
|
compiled with `-fPIE` or `-fPIC` (or `-fpie` or `-fpic`; see above).
|
||||||
|
By itself, `-pie` has only a slight performance impact because it
|
||||||
|
disables some link editor optimization, however the `-fPIE` compiler
|
||||||
|
flag has some overhead.
|
||||||
|
* `-z now`: Disable lazy binding and turn on the `BIND_NOW` dynamic
|
||||||
|
linker feature. Lazy binding involves an array of function pointers
|
||||||
|
which is writable at run time (which could be overwritten as part of
|
||||||
|
security exploits, redirecting execution). Therefore, it is
|
||||||
|
preferable to turn of lazy binding, although it increases startup
|
||||||
|
time.
|
||||||
|
|
||||||
|
# Support for extension builders
|
||||||
|
|
||||||
|
Some packages include extension builders that allow users to build
|
||||||
|
extension modules (which are usually written in C and C++) under the
|
||||||
|
control of a special-purpose build system. This is a common
|
||||||
|
functionality provided by scripting languages such as Python and Perl.
|
||||||
|
Traditionally, such extension builders captured the Fedora build flags
|
||||||
|
when these extension were built. However, these compiler flags are
|
||||||
|
adjusted for a specific Fedora release and toolchain version and
|
||||||
|
therefore do not work with a custom toolchain (e.g., different C/C++
|
||||||
|
compilers), and users might want to build their own extension modules
|
||||||
|
with such toolchains.
|
||||||
|
|
||||||
|
The macros `%{extension_cflags}`, `%{extension_cxxflags}`,
|
||||||
|
`%{extension_fflags}`, `%{extension_ldflags}` contain a subset of
|
||||||
|
flags that have been adjusted for compatibility with alternative
|
||||||
|
toolchains, while still preserving some of the compile-time security
|
||||||
|
hardening that the standard Fedora build flags provide.
|
||||||
|
|
||||||
|
The current set of differences are:
|
||||||
|
|
||||||
|
* No GCC plugins (such as annobin) are activated.
|
||||||
|
* No GCC spec files (`-specs=` arguments) are used.
|
||||||
|
|
||||||
|
Additional flags may be removed in the future if they prove to be
|
||||||
|
incompatible with alternative toolchains.
|
||||||
|
|
||||||
|
Extension builders should detect whether they are performing a regular
|
||||||
|
RPM build (e.g., by looking for an `RPM_OPT_FLAGS` variable). In this
|
||||||
|
case, they should use the *current* set of Fedora build flags (that
|
||||||
|
is, the output from `rpm --eval '%{build_cflags}'` and related
|
||||||
|
commands). Otherwise, when not performing an RPM build, they can
|
||||||
|
either use hard-coded extension builder flags (thus avoiding a
|
||||||
|
run-time dependency on `redhat-rpm-config`), or use the current
|
||||||
|
extension builder flags (with a run-time dependency on
|
||||||
|
`redhat-rpm-config`).
|
||||||
|
|
||||||
|
As a result, extension modules built for Fedora will use the official
|
||||||
|
Fedora build flags, while users will still be able to build their own
|
||||||
|
extension modules with custom toolchains.
|
197
common.lua
Normal file
197
common.lua
Normal file
@ -0,0 +1,197 @@
|
|||||||
|
-- Convenience Lua functions that can be used within rpm macros
|
||||||
|
|
||||||
|
-- Set a spec variable
|
||||||
|
-- Echo the result if verbose
|
||||||
|
local function explicitset(rpmvar, value, verbose)
|
||||||
|
local value = value
|
||||||
|
if (value == nil) or (value == "") then
|
||||||
|
value = "%{nil}"
|
||||||
|
end
|
||||||
|
rpm.define(rpmvar .. " " .. value)
|
||||||
|
if verbose then
|
||||||
|
rpm.expand("%{echo:Setting %%{" .. rpmvar .. "} = " .. value .. "}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Unset a spec variable if it is defined
|
||||||
|
-- Echo the result if verbose
|
||||||
|
local function explicitunset(rpmvar, verbose)
|
||||||
|
if (rpm.expand("%{" .. rpmvar .. "}") ~= "%{" .. rpmvar .. "}") then
|
||||||
|
rpm.define(rpmvar .. " %{nil}")
|
||||||
|
if verbose then
|
||||||
|
rpm.expand("%{echo:Unsetting %%{" .. rpmvar .. "}}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Set a spec variable, if not already set
|
||||||
|
-- Echo the result if verbose
|
||||||
|
local function safeset(rpmvar, value, verbose)
|
||||||
|
if (rpm.expand("%{" .. rpmvar .. "}") == "%{" .. rpmvar .. "}") then
|
||||||
|
explicitset(rpmvar,value,verbose)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Alias a list of rpm variables to the same variables suffixed with 0 (and vice versa)
|
||||||
|
-- Echo the result if verbose
|
||||||
|
local function zalias(rpmvars, verbose)
|
||||||
|
for _, sfx in ipairs({{"","0"},{"0",""}}) do
|
||||||
|
for _, rpmvar in ipairs(rpmvars) do
|
||||||
|
local toalias = "%{?" .. rpmvar .. sfx[1] .. "}"
|
||||||
|
if (rpm.expand(toalias) ~= "") then
|
||||||
|
safeset(rpmvar .. sfx[2], toalias, verbose)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Takes a list of rpm variable roots and a suffix and alias current<root> to
|
||||||
|
-- <root><suffix> if it resolves to something not empty
|
||||||
|
local function setcurrent(rpmvars, suffix, verbose)
|
||||||
|
for _, rpmvar in ipairs(rpmvars) do
|
||||||
|
if (rpm.expand("%{?" .. rpmvar .. suffix .. "}") ~= "") then
|
||||||
|
explicitset( "current" .. rpmvar, "%{" .. rpmvar .. suffix .. "}", verbose)
|
||||||
|
else
|
||||||
|
explicitunset("current" .. rpmvar, verbose)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Echo the list of rpm variables, with suffix, if set
|
||||||
|
local function echovars(rpmvars, suffix)
|
||||||
|
for _, rpmvar in ipairs(rpmvars) do
|
||||||
|
rpmvar = rpmvar .. suffix
|
||||||
|
local header = string.sub(" " .. rpmvar .. ": ",1,21)
|
||||||
|
rpm.expand("%{?" .. rpmvar .. ":%{echo:" .. header .. "%{?" .. rpmvar .. "}}}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Returns an array, indexed by suffix, containing the non-empy values of
|
||||||
|
-- <rpmvar><suffix>, with suffix an integer string or the empty string
|
||||||
|
local function getsuffixed(rpmvar)
|
||||||
|
local suffixes = {}
|
||||||
|
zalias({rpmvar})
|
||||||
|
for suffix=0,9999 do
|
||||||
|
local value = rpm.expand("%{?" .. rpmvar .. suffix .. "}")
|
||||||
|
if (value ~= "") then
|
||||||
|
suffixes[tostring(suffix)] = value
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- rpm convention is to alias no suffix to zero suffix
|
||||||
|
-- only add no suffix if zero suffix is different
|
||||||
|
local value = rpm.expand("%{?" .. rpmvar .. "}")
|
||||||
|
if (value ~= "") and (value ~= suffixes["0"]) then
|
||||||
|
suffixes[""] = value
|
||||||
|
end
|
||||||
|
return suffixes
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Returns the list of suffixes, including the empty string, for which
|
||||||
|
-- <rpmvar><suffix> is set to a non empty value
|
||||||
|
local function getsuffixes(rpmvar)
|
||||||
|
suffixes = {}
|
||||||
|
for suffix in pairs(getsuffixed(rpmvar)) do
|
||||||
|
table.insert(suffixes,suffix)
|
||||||
|
end
|
||||||
|
table.sort(suffixes,
|
||||||
|
function(a,b) return (tonumber(a) or 0) < (tonumber(b) or 0) end)
|
||||||
|
return suffixes
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Returns the suffix for which <rpmvar><suffix> has a non-empty value that
|
||||||
|
-- matches best the beginning of the value string
|
||||||
|
local function getbestsuffix(rpmvar, value)
|
||||||
|
local best = nil
|
||||||
|
local currentmatch = ""
|
||||||
|
for suffix, setvalue in pairs(getsuffixed(rpmvar)) do
|
||||||
|
if (string.len(setvalue) > string.len(currentmatch)) and
|
||||||
|
(string.find(value, "^" .. setvalue)) then
|
||||||
|
currentmatch = setvalue
|
||||||
|
best = suffix
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return best
|
||||||
|
end
|
||||||
|
|
||||||
|
-- https://github.com/rpm-software-management/rpm/issues/581
|
||||||
|
-- Writes the content of a list of rpm variables to a macro spec file.
|
||||||
|
-- The target file must contain the corresponding anchors.
|
||||||
|
-- For example writevars("myfile", {"foo","bar"}) will replace:
|
||||||
|
-- @@FOO@@ with the rpm evaluation of %{foo} and
|
||||||
|
-- @@BAR@@ with the rpm evaluation of %{bar}
|
||||||
|
-- in myfile
|
||||||
|
local function writevars(macrofile, rpmvars)
|
||||||
|
for _, rpmvar in ipairs(rpmvars) do
|
||||||
|
print("sed -i 's\029" .. string.upper("@@" .. rpmvar .. "@@") ..
|
||||||
|
"\029" .. rpm.expand( "%{" .. rpmvar .. "}" ) ..
|
||||||
|
"\029g' " .. macrofile .. "\n")
|
||||||
|
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, "\r", "\n")
|
||||||
|
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) or
|
||||||
|
((pos + wl == 81) and string.match(word, "\n$")) 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 {
|
||||||
|
explicitset = explicitset,
|
||||||
|
explicitunset = explicitunset,
|
||||||
|
safeset = safeset,
|
||||||
|
zalias = zalias,
|
||||||
|
setcurrent = setcurrent,
|
||||||
|
echovars = echovars,
|
||||||
|
getsuffixed = getsuffixed,
|
||||||
|
getsuffixes = getsuffixes,
|
||||||
|
getbestsuffix = getbestsuffix,
|
||||||
|
writevars = writevars,
|
||||||
|
wordwrap = wordwrap,
|
||||||
|
}
|
1462
config.guess
vendored
Normal file
1462
config.guess
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1823
config.sub
vendored
Normal file
1823
config.sub
vendored
Normal file
File diff suppressed because it is too large
Load Diff
66
dist.sh
Executable file
66
dist.sh
Executable file
@ -0,0 +1,66 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# dist.sh
|
||||||
|
# Author: Tom "spot" Callaway <tcallawa@redhat.com>
|
||||||
|
# License: GPL
|
||||||
|
# This is a script to output the value for the %{dist}
|
||||||
|
# tag. The dist tag takes the following format: .$type$num
|
||||||
|
# Where $type is one of: el, fc, rh
|
||||||
|
# (for RHEL, Fedora Core, and RHL, respectively)
|
||||||
|
# And $num is the version number of the distribution.
|
||||||
|
# NOTE: We can't detect Rawhide or Fedora Test builds properly.
|
||||||
|
# If we successfully detect the version number, we output the
|
||||||
|
# dist tag. Otherwise, we exit with no output.
|
||||||
|
|
||||||
|
RELEASEFILE=/etc/redhat-release
|
||||||
|
|
||||||
|
function check_num {
|
||||||
|
MAINVER=`cut -d "(" -f 1 < $RELEASEFILE | \
|
||||||
|
sed -e "s/[^0-9.]//g" -e "s/$//g" | cut -d "." -f 1`
|
||||||
|
|
||||||
|
echo $MAINVER | grep -q '[0-9]' && echo $MAINVER
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_rhl {
|
||||||
|
grep -q "Red Hat Linux" $RELEASEFILE && ! grep -q "Advanced" $RELEASEFILE && echo $DISTNUM
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_rhel {
|
||||||
|
egrep -q "(Enterprise|Advanced)" $RELEASEFILE && echo $DISTNUM
|
||||||
|
}
|
||||||
|
|
||||||
|
function check_fedora {
|
||||||
|
grep -q Fedora $RELEASEFILE && echo $DISTNUM
|
||||||
|
}
|
||||||
|
|
||||||
|
DISTNUM=`check_num`
|
||||||
|
DISTFC=`check_fedora`
|
||||||
|
DISTRHL=`check_rhl`
|
||||||
|
DISTRHEL=`check_rhel`
|
||||||
|
if [ -n "$DISTNUM" ]; then
|
||||||
|
if [ -n "$DISTFC" ]; then
|
||||||
|
DISTTYPE=fc
|
||||||
|
elif [ -n "$DISTRHEL" ]; then
|
||||||
|
DISTTYPE=el
|
||||||
|
elif [ -n "$DISTRHL" ]; then
|
||||||
|
DISTTYPE=rhl
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
[ -n "$DISTTYPE" -a -n "$DISTNUM" ] && DISTTAG=".${DISTTYPE}${DISTNUM}"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--el) echo -n "$DISTRHEL" ;;
|
||||||
|
--fc) echo -n "$DISTFC" ;;
|
||||||
|
--rhl) echo -n "$DISTRHL" ;;
|
||||||
|
--distnum) echo -n "$DISTNUM" ;;
|
||||||
|
--disttype) echo -n "$DISTTYPE" ;;
|
||||||
|
--help)
|
||||||
|
printf "Usage: $0 [OPTIONS]\n"
|
||||||
|
printf " Default mode is --dist. Possible options:\n"
|
||||||
|
printf " --el\t\tfor RHEL version (if RHEL)\n"
|
||||||
|
printf " --fc\t\tfor Fedora version (if Fedora)\n"
|
||||||
|
printf " --rhl\t\tfor RHL version (if RHL)\n"
|
||||||
|
printf " --dist\t\tfor distribution tag\n"
|
||||||
|
printf " --distnum\tfor distribution number (major)\n"
|
||||||
|
printf " --disttype\tfor distribution type\n" ;;
|
||||||
|
*) echo -n "$DISTTAG" ;;
|
||||||
|
esac
|
50
find-provides
Executable file
50
find-provides
Executable file
@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This script reads filenames from STDIN and outputs any relevant provides
|
||||||
|
# information that needs to be included in the package.
|
||||||
|
|
||||||
|
if [ "$1" ]
|
||||||
|
then
|
||||||
|
package_name="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
|
filelist=`sed "s/['\"]/\\\&/g"`
|
||||||
|
|
||||||
|
[ -x /usr/lib/rpm/rpmdeps -a -n "$filelist" ] &&
|
||||||
|
echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --provides
|
||||||
|
|
||||||
|
#
|
||||||
|
# --- any other extra find-provides scripts
|
||||||
|
for i in /usr/lib/rpm/redhat/find-provides.d/*.prov
|
||||||
|
do
|
||||||
|
[ -x $i ] &&
|
||||||
|
(echo $filelist | tr '[:blank:]' \\n | $i | sort -u)
|
||||||
|
done
|
||||||
|
|
||||||
|
#
|
||||||
|
# --- Kernel module imported symbols
|
||||||
|
#
|
||||||
|
# Since we don't (yet) get passed the name of the package being built, we
|
||||||
|
# cheat a little here by looking first for a kernel, then for a kmod.
|
||||||
|
#
|
||||||
|
|
||||||
|
is_kmod=1
|
||||||
|
for f in $filelist; do
|
||||||
|
if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*).ko$:\2:p') ]
|
||||||
|
then
|
||||||
|
is_kernel=1;
|
||||||
|
fi
|
||||||
|
if [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ]
|
||||||
|
then
|
||||||
|
unset is_kmod;
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ ! "$is_kernel" ] || [ "$package_name" == "kernel" ]
|
||||||
|
then
|
||||||
|
unset is_kmod
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -x /usr/lib/rpm/redhat/find-provides.ksyms ] && [ "$is_kmod" ] &&
|
||||||
|
printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-provides.ksyms
|
||||||
|
|
||||||
|
exit 0
|
24
find-provides.ksyms
Executable file
24
find-provides.ksyms
Executable file
@ -0,0 +1,24 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
for module in $(grep -E '/lib/modules/.+\.ko$'); do
|
||||||
|
if [[ -n $(nm $module | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p') ]]; then
|
||||||
|
nm $module \
|
||||||
|
| sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p' \
|
||||||
|
| awk --non-decimal-data '{printf("ksym(%s) = 0x%08x\n", $2, $1)}' \
|
||||||
|
| LC_ALL=C sort -u
|
||||||
|
else
|
||||||
|
ELFRODATA=$(readelf -R .rodata $module | awk '/0x/{printf $2$3$4$5}')
|
||||||
|
if [[ -n $(readelf -h $module | grep "little endian") ]]; then
|
||||||
|
RODATA=$(echo $ELFRODATA | sed 's/\(..\)\(..\)\(..\)\(..\)/\4\3\2\1/g')
|
||||||
|
else
|
||||||
|
RODATA=$ELFRODATA
|
||||||
|
fi
|
||||||
|
for sym in $(nm $module | sed -r -ne 's:^0*([0-9a-f]+) R __crc_(.+):0x\1 \2:p'); do
|
||||||
|
echo $sym $RODATA
|
||||||
|
done \
|
||||||
|
| awk --non-decimal-data '{printf("ksym(%s) = 0x%08s\n", $2, substr($3,($1*2)+1,8))}' \
|
||||||
|
| LC_ALL=C sort -u
|
||||||
|
fi
|
||||||
|
done
|
39
find-requires
Executable file
39
find-requires
Executable file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#
|
||||||
|
# Auto-generate requirements for executables (both ELF and a.out) and library
|
||||||
|
# sonames, script interpreters, and perl modules.
|
||||||
|
#
|
||||||
|
|
||||||
|
ulimit -c 0
|
||||||
|
|
||||||
|
filelist=`sed "s/[]['\"*?{}]/\\\\\&/g"`
|
||||||
|
|
||||||
|
[ -x /usr/lib/rpm/rpmdeps -a -n "$filelist" ] && \
|
||||||
|
echo $filelist | tr '[:blank:]' \\n | /usr/lib/rpm/rpmdeps --requires
|
||||||
|
|
||||||
|
#
|
||||||
|
# --- Kernel module imported symbols
|
||||||
|
#
|
||||||
|
# Since we don't (yet) get passed the name of the package being built, we
|
||||||
|
# cheat a little here by looking first for a kernel, then for a kmod.
|
||||||
|
#
|
||||||
|
|
||||||
|
unset is_kmod
|
||||||
|
|
||||||
|
for f in $filelist; do
|
||||||
|
if [ $(echo "$f" | sed -r -ne 's:^.*/lib/modules/(.*)/(.*).ko$:\2:p') ]
|
||||||
|
then
|
||||||
|
is_kmod=1;
|
||||||
|
elif [ $(echo "$f" | sed -r -ne 's:^.*/boot/(.*):\1:p') ]
|
||||||
|
then
|
||||||
|
unset is_kmod;
|
||||||
|
break;
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Disabling for now while the Fedora kernel doesn't produce kABI deps.
|
||||||
|
#[ -x /usr/lib/rpm/redhat/find-requires.ksyms ] && [ "$is_kmod" ] &&
|
||||||
|
# printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/redhat/find-requires.ksyms
|
||||||
|
|
||||||
|
exit 0
|
74
find-requires.ksyms
Executable file
74
find-requires.ksyms
Executable file
@ -0,0 +1,74 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
# Extract all of the symbols provided by this module.
|
||||||
|
all_provides() {
|
||||||
|
if [[ -n $(nm "$@" | sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p') ]]; then
|
||||||
|
nm "$@" \
|
||||||
|
| sed -r -ne 's:^0*([0-9a-f]+) A __crc_(.+):0x\1 \2:p' \
|
||||||
|
| awk --non-decimal-data '{printf("0x%08x\t%s\n", $1, $2)}' \
|
||||||
|
| LC_ALL=C sort -k2,2 -u
|
||||||
|
else
|
||||||
|
ELFRODATA=$(readelf -R .rodata "$@" | awk '/0x/{printf $2$3$4$5}')
|
||||||
|
if [[ -n $(readelf -h "$@" | grep "little endian") ]]; then
|
||||||
|
RODATA=$(echo $ELFRODATA | sed 's/\(..\)\(..\)\(..\)\(..\)/\4\3\2\1/g')
|
||||||
|
else
|
||||||
|
RODATA=$ELFRODATA
|
||||||
|
fi
|
||||||
|
for sym in $(nm "$@" | sed -r -ne 's:^0*([0-9a-f]+) R __crc_(.+):0x\1 \2:p'); do
|
||||||
|
echo $sym $RODATA
|
||||||
|
done \
|
||||||
|
| awk --non-decimal-data '{printf("0x%08s\t%s\n", substr($3,($1*2)+1,8), $2)}' \
|
||||||
|
| LC_ALL=C sort -k2,2 -u
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Extract all of the requirements of this module.
|
||||||
|
all_requires() {
|
||||||
|
for module in "$@"; do
|
||||||
|
set -- $(/sbin/modinfo -F vermagic "$module" | sed -e 's: .*::' -e q)
|
||||||
|
/sbin/modprobe --dump-modversions "$module" \
|
||||||
|
| awk --non-decimal-data '
|
||||||
|
BEGIN { FS = "\t" ; OFS = "\t" }
|
||||||
|
{printf("0x%08x\t%s\n", $1, $2)}' \
|
||||||
|
| sed -r -e 's:$:\t'"$1"':'
|
||||||
|
done \
|
||||||
|
| LC_ALL=C sort -k2,2 -u
|
||||||
|
}
|
||||||
|
|
||||||
|
# Filter out requirements fulfilled by the module itself.
|
||||||
|
mod_requires() {
|
||||||
|
LC_ALL=C join -t $'\t' -j 2 -v 1 \
|
||||||
|
<(all_requires "$@") \
|
||||||
|
<(all_provides "$@") \
|
||||||
|
| LC_ALL=C sort -k1,1 -u
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! [ -e /sbin/modinfo -a -e /sbin/modprobe ]; then
|
||||||
|
cat > /dev/null
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
modules=($(grep -E '/lib/modules/.+\.ko$'))
|
||||||
|
if [ ${#modules[@]} -gt 0 ]; then
|
||||||
|
kernel=$(/sbin/modinfo -F vermagic "${modules[0]}" | sed -e 's: .*::' -e q)
|
||||||
|
|
||||||
|
# get all that kernel provides
|
||||||
|
symvers=$(mktemp -t ${0##*/}.XXXXX)
|
||||||
|
|
||||||
|
cat /usr/src/kernels/$kernel/Module.symvers | awk '
|
||||||
|
BEGIN { FS = "\t" ; OFS = "\t" }
|
||||||
|
{ print $2 "\t" $1 }
|
||||||
|
' \
|
||||||
|
| sed -r -e 's:$:\t'"$kernel"':' \
|
||||||
|
| LC_ALL=C sort -k1,1 -u > $symvers
|
||||||
|
|
||||||
|
# Symbols matching with the kernel get a "kernel" dependency
|
||||||
|
LC_ALL=C join -t $'\t' -j 1 $symvers <(mod_requires "${modules[@]}") | LC_ALL=C sort -u \
|
||||||
|
| awk '{ FS = "\t" ; OFS = "\t" } { print "kernel(" $1 ") = " $2 }'
|
||||||
|
|
||||||
|
# Symbols from elsewhere get a "ksym" dependency
|
||||||
|
LC_ALL=C join -t $'\t' -j 1 -v 2 $symvers <(mod_requires "${modules[@]}") | LC_ALL=C sort -u \
|
||||||
|
| awk '{ FS = "\t" ; OFS = "\t" } { print "ksym(" $1 ") = " $2 }'
|
||||||
|
fi
|
14
firmware.prov
Normal file
14
firmware.prov
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# firmware.prov - Automatically extract any and all firmware dependencies from
|
||||||
|
# kernel object (.ko) files and add to RPM deps.
|
||||||
|
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
for module in $(grep -E '/lib/modules/.+\.ko$') $*;
|
||||||
|
do
|
||||||
|
for firmware in `/sbin/modinfo -F firmware $module`;
|
||||||
|
do
|
||||||
|
echo "firmware($firmware)"
|
||||||
|
done
|
||||||
|
done
|
299
forge.lua
Normal file
299
forge.lua
Normal file
@ -0,0 +1,299 @@
|
|||||||
|
-- Lua code used by macros.forge and derivatives
|
||||||
|
|
||||||
|
-- Computes the suffix of a version string, removing vprefix if it matches
|
||||||
|
-- For example with vprefix 1.2.3: 1.2.3.rc2 → .rc2 but 1.2.30 → 1.2.30 not 0
|
||||||
|
local function getversionsuffix(vstring,vprefix)
|
||||||
|
if (string.sub(vstring, 1, #vprefix) == vprefix) and
|
||||||
|
(not string.match(string.sub(vstring, #vprefix + 1), "^%.?%d")) then
|
||||||
|
return string.sub(vstring, #vprefix + 1)
|
||||||
|
else
|
||||||
|
return vstring
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Check if an identified url is sane
|
||||||
|
local function checkforgeurl(url, id, silent)
|
||||||
|
local checkedurl = nil
|
||||||
|
local checkedid = nil
|
||||||
|
local urlpatterns = {
|
||||||
|
gitlab = {
|
||||||
|
pattern = 'https://[^/]+/[^/]+/[^/#?]+',
|
||||||
|
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 = {
|
||||||
|
pattern = 'https://[^/]+/[^/]+/[^/#?]+',
|
||||||
|
description = 'https://(…[-.])github[-.]…/owner/repo'},
|
||||||
|
["code.googlesource.com"] = {
|
||||||
|
pattern = 'https://code.googlesource.com/[^#?]*[^/#?]+',
|
||||||
|
description = 'https://code.googlesource.com/…/repo'},
|
||||||
|
["bitbucket.org"] = {
|
||||||
|
pattern = 'https://[^/]+/[^/]+/[^/#?]+',
|
||||||
|
description = 'https://bitbucket.org/owner/repo'}}
|
||||||
|
if (urlpatterns[id] ~= nil) then
|
||||||
|
checkedurl = string.match(url,urlpatterns[id]["pattern"])
|
||||||
|
if (checkedurl == nil) then
|
||||||
|
if not silent then
|
||||||
|
rpm.expand("%{error:" .. id .. " URLs must match " .. urlpatterns[id]["description"] .. " !}")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
checkedid = id
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return checkedurl, checkedid
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Check if an url matches a known forge
|
||||||
|
local function idforge(url, silent)
|
||||||
|
local forgeurl = nil
|
||||||
|
local forge = nil
|
||||||
|
if (url ~= "") then
|
||||||
|
forge = string.match(url, "^[^:]+://([^/]+)/")
|
||||||
|
if (forge == nil) then
|
||||||
|
if not silent then
|
||||||
|
rpm.expand("%{error:URLs must include a protocol such as https:// and a path starting with / !}")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
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"
|
||||||
|
elseif (string.match(forge, "^github[%.-]") or string.match(forge, "[%.-]github[%.]")) then
|
||||||
|
forge = "github"
|
||||||
|
end
|
||||||
|
forgeurl, forge = checkforgeurl(url, forge, silent)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return forgeurl, forge
|
||||||
|
end
|
||||||
|
|
||||||
|
-- The forgemeta macro main processing function
|
||||||
|
-- See the documentation in the macros.forge file for argument description
|
||||||
|
-- Also called directly by gometa
|
||||||
|
local function meta(suffix, verbose, informative, silent)
|
||||||
|
local fedora = require "fedora.common"
|
||||||
|
local ismain = (suffix == "") or (suffix == "0")
|
||||||
|
if ismain then
|
||||||
|
fedora.zalias({"forgeurl", "forgesource", "forgesetupargs",
|
||||||
|
"archivename", "archiveext", "archiveurl",
|
||||||
|
"topdir", "extractdir", "repo", "owner", "namespace",
|
||||||
|
"scm", "tag", "commit", "shortcommit", "branch", "version",
|
||||||
|
"date", "distprefix"}, verbose)
|
||||||
|
end
|
||||||
|
local variables = {
|
||||||
|
default = {
|
||||||
|
scm = "git",
|
||||||
|
archiveext = "tar.bz2",
|
||||||
|
repo = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "^[^:]+://[^/]+/[^/]+/([^/?#]+)"))}',
|
||||||
|
archivename = "%{repo" .. suffix .. "}-%{ref" .. suffix .. "}",
|
||||||
|
topdir = "%{archivename" .. suffix .. "}" },
|
||||||
|
gitlab = {
|
||||||
|
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 = {
|
||||||
|
archiveext = "tar.gz",
|
||||||
|
archivename = "%{repo" .. suffix .. "}-%{fileref" .. suffix .. "}",
|
||||||
|
archiveurl = "%{forgeurl" .. suffix .. "}/archive/%{ref" .. suffix .. "}/%{archivename" .. suffix .. "}.%{archiveext" .. suffix .. "}" },
|
||||||
|
["code.googlesource.com"] = {
|
||||||
|
archiveext = "tar.gz",
|
||||||
|
repo = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "^[^:]+://.+/([^/?#]+)"))}',
|
||||||
|
archiveurl = "%{forgeurl" .. suffix .. "}/+archive/%{ref" .. suffix .. "}.%{archiveext" .. suffix .. "}",
|
||||||
|
topdir = "" },
|
||||||
|
["bitbucket.org"] = {
|
||||||
|
shortcommit = '%{lua:print(string.sub(rpm.expand("%{commit' .. suffix .. '}"), 1, 12))}',
|
||||||
|
owner = '%{lua:print(string.match(rpm.expand("%{forgeurl' .. suffix .. '}"), "^[^:]+://[^/]+/([^/?#]+)"))}',
|
||||||
|
archivename = "%{owner" .. suffix .. "}-%{repo" .. suffix .. "}-%{shortcommit" .. suffix .. "}",
|
||||||
|
archiveurl = "%{forgeurl" .. suffix .. "}/get/%{ref" .. suffix .. "}.%{archiveext" .. suffix .. "}" } }
|
||||||
|
-- Packaging a moving branch is quite a bad idea, but since at least Gitlab
|
||||||
|
-- will treat branches and tags the same way better support branches explicitly
|
||||||
|
-- than have packagers hijack %{tag} to download branch states
|
||||||
|
local spec = {}
|
||||||
|
for _, v in ipairs({'forgeurl','tag','commit','branch','version'}) do
|
||||||
|
spec[v] = rpm.expand("%{?" .. v .. suffix .. "}")
|
||||||
|
end
|
||||||
|
-- Compute the reference of the object to fetch
|
||||||
|
local isrelease = false
|
||||||
|
if (spec["tag"] ~= "") then ref = "%{?tag" .. suffix .. "}"
|
||||||
|
elseif (spec["commit"] ~= "") then ref = "%{?commit" .. suffix .. "}"
|
||||||
|
elseif (spec["branch"] ~= "") then ref = "%{?branch" .. suffix .. "}"
|
||||||
|
else ref = "%{?version" .. suffix .. "}"
|
||||||
|
isrelease = true
|
||||||
|
end
|
||||||
|
if (rpm.expand(ref) == "") then
|
||||||
|
if (suffix == "") then
|
||||||
|
rpm.expand("%{error:You need to define Version:, %{commit} or %{tag} before the macro invocation !}")
|
||||||
|
else
|
||||||
|
rpm.expand("%{error:You need to define %{version" .. suffix .. "}, %{commit" .. suffix .. "} or %{tag" .. suffix .. "} before the macro invocation !}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local forgeurl = spec["forgeurl"]
|
||||||
|
-- For backwards compatibility only
|
||||||
|
local expliciturl = rpm.expand("%{?-u*}")
|
||||||
|
if (expliciturl ~= "") then
|
||||||
|
rpm.expand("%{warn:-u use in %%forgemeta is deprecated, use -z instead to select a separate set of rpm variables!}")
|
||||||
|
forgeurl = expliciturl
|
||||||
|
end
|
||||||
|
local forge
|
||||||
|
forgeurl, forge = idforge(forgeurl, silent)
|
||||||
|
if (forge ~= nil) then
|
||||||
|
fedora.explicitset("forgeurl" .. suffix, forgeurl, verbose)
|
||||||
|
-- Custom processing of quirky forges that can not be handled with simple variables
|
||||||
|
if (forge == "github") then
|
||||||
|
-- Workaround the way GitHub injects "v"s before some version strings (but not all!)
|
||||||
|
-- To package one of the minority of sane GitHub projects that do not munge their version
|
||||||
|
-- strings set tag to %{version} in your spec
|
||||||
|
local fileref = ref
|
||||||
|
if (ref == "%{?version" .. suffix .. "}") then
|
||||||
|
ref = "v" .. ref
|
||||||
|
elseif (fileref ~= "%{?commit" .. suffix .. "}") and
|
||||||
|
string.match(rpm.expand(fileref), "^v[%d]") then
|
||||||
|
fileref = string.gsub(rpm.expand(fileref), "^v", "")
|
||||||
|
elseif (string.match(rpm.expand(fileref), "/")) then
|
||||||
|
fileref = string.gsub(rpm.expand(fileref), "/", "-")
|
||||||
|
end
|
||||||
|
fedora.safeset("fileref" .. suffix, fileref, verbose)
|
||||||
|
elseif (forge == "code.googlesource.com") then
|
||||||
|
if (ref == "%{?version" .. suffix .. "}") then
|
||||||
|
ref = "v" .. ref
|
||||||
|
end
|
||||||
|
elseif (forge == "bitbucket.org") then
|
||||||
|
if (spec["commit"] == "") then
|
||||||
|
rpm.expand("%{error:All BitBucket URLs require commit value knowledge: you need to define %{commit}!}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
fedora.safeset("ref" .. suffix, ref, verbose)
|
||||||
|
-- Mass setting of the remaining variables
|
||||||
|
for k,v in pairs(variables[forge]) do
|
||||||
|
fedora.safeset(k .. suffix, variables[forge][k], verbose)
|
||||||
|
end
|
||||||
|
for k,v in pairs(variables["default"]) do
|
||||||
|
if (variables[forge][k] == nil) then
|
||||||
|
fedora.safeset(k .. suffix, variables["default"][k], verbose)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Generic rules
|
||||||
|
for _, v in ipairs({'archiveurl','archivename','archiveext','topdir'}) do
|
||||||
|
spec[v] = rpm.expand("%{?" .. v .. suffix .. "}")
|
||||||
|
end
|
||||||
|
-- Source URL processing (computing the forgesource spec variable)
|
||||||
|
local forgesource = "%{archiveurl" .. suffix .. "}"
|
||||||
|
if (string.match(spec["archiveurl"], "/([^/]+)$") ~= spec["archivename"] .. "." .. spec["archiveext"]) then
|
||||||
|
forgesource = "%{?archiveurl" .. suffix .. "}#/%{?archivename" .. suffix .. "}.%{archiveext" .. suffix .. "}"
|
||||||
|
end
|
||||||
|
fedora.safeset("forgesource" .. suffix, forgesource, verbose)
|
||||||
|
-- Setup processing (computing the forgesetup and extractdir variables)
|
||||||
|
local forgesetupargs = "-n %{extractdir" .. suffix .. "}"
|
||||||
|
local extractdir = "%{topdir" .. suffix .. "}"
|
||||||
|
if (spec["topdir"] == "") then
|
||||||
|
forgesetupargs = "-c " .. forgesetupargs
|
||||||
|
extractdir = "%{archivename" .. suffix .. "}"
|
||||||
|
end
|
||||||
|
if not ismain then
|
||||||
|
if (spec["topdir"] ~= "") then
|
||||||
|
forgesetupargs = "-T -D -b " .. suffix .. " " .. forgesetupargs
|
||||||
|
else
|
||||||
|
forgesetupargs = "-T -D -a " .. suffix .. " " .. forgesetupargs
|
||||||
|
end
|
||||||
|
end
|
||||||
|
fedora.safeset("forgesetupargs" .. suffix, forgesetupargs, verbose)
|
||||||
|
fedora.safeset("extractdir" .. suffix, extractdir, verbose)
|
||||||
|
-- dist processing (computing the correct prefix for snapshots)
|
||||||
|
local distprefix = ""
|
||||||
|
if not isrelease then
|
||||||
|
distprefix = string.lower(rpm.expand(ref))
|
||||||
|
if (ref == "%{?commit" .. suffix .. "}") then
|
||||||
|
distprefix = string.sub(distprefix, 1, 7)
|
||||||
|
elseif (ref ~= "%{?branch" .. suffix .. "}") then
|
||||||
|
distprefix = string.gsub(distprefix, "[%p%s]+", ".")
|
||||||
|
distprefix = string.gsub(distprefix, "^" .. string.lower(rpm.expand("%{?repo}")) .. "%.?", "")
|
||||||
|
local v = string.gsub(rpm.expand("%{version}"), "[%p%s]+", ".")
|
||||||
|
for _, p in ipairs({'','v','v.','version','version.','tags.v', 'tags.v.'}) do
|
||||||
|
distprefix = getversionsuffix(distprefix, p .. v)
|
||||||
|
end
|
||||||
|
distprefix = string.gsub(distprefix, "^%.", "")
|
||||||
|
end
|
||||||
|
if (distprefix ~= "") then
|
||||||
|
distprefix = "%{scm" .. suffix .. "}" .. distprefix
|
||||||
|
date = rpm.expand("%{?date" .. suffix .. "}")
|
||||||
|
if (date ~= "") then
|
||||||
|
distprefix = date .. distprefix
|
||||||
|
else
|
||||||
|
distprefix = "%([ -r %{_sourcedir}/%{archivename" .. suffix .. "}.%{archiveext" .. suffix .. "} ] && date +%Y%m%d -u -r %{_sourcedir}/%{archivename" .. suffix .. "}.%{archiveext" .. suffix .. "})" .. distprefix
|
||||||
|
end
|
||||||
|
distprefix = "." .. distprefix
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if (spec["version"] ~= "") and
|
||||||
|
(spec["version"] ~= "0") and
|
||||||
|
(spec["version"] ~= rpm.expand("%{?version}")) then
|
||||||
|
distprefix = ".%{version" .. suffix .. "}" .. distprefix
|
||||||
|
end
|
||||||
|
if (rpm.expand(distprefix) ~= "") then
|
||||||
|
if not ismain then
|
||||||
|
distprefix = string.gsub(distprefix, "^%.", ".s")
|
||||||
|
end
|
||||||
|
fedora.safeset ("distprefix" .. suffix, distprefix, verbose)
|
||||||
|
end
|
||||||
|
if ismain then
|
||||||
|
fedora.zalias({"forgeurl", "forgesource", "forgesetupargs",
|
||||||
|
"archivename", "archiveext", "archiveurl",
|
||||||
|
"topdir", "extractdir", "repo", "owner", "namespace",
|
||||||
|
"scm", "shortcommit", "distprefix"}, verbose)
|
||||||
|
end
|
||||||
|
-- Final spec variable summary if the macro was called with -i
|
||||||
|
if informative then
|
||||||
|
rpm.expand("%{echo:Packaging variables read or set by %%forgemeta}")
|
||||||
|
fedora.echovars({"forgeurl", "forgesource", "forgesetupargs",
|
||||||
|
"archivename", "archiveext", "archiveurl",
|
||||||
|
"topdir", "extractdir", "repo", "owner", "namespace",
|
||||||
|
"scm", "tag", "commit", "shortcommit", "branch", "version",
|
||||||
|
"date", "distprefix"}, suffix)
|
||||||
|
fedora.echovars({"dist"},"")
|
||||||
|
rpm.expand("%{echo: (snapshot date is either manually supplied or computed once %%{_sourcedir}/%%{archivename" .. suffix .. "}.%%{archiveext" .. suffix .. "} is available)}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return {
|
||||||
|
meta = meta,
|
||||||
|
}
|
||||||
|
|
111
gpgverify
Executable file
111
gpgverify
Executable file
@ -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}
|
2
kmod.attr
Normal file
2
kmod.attr
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
%__kmod_provides %{_rpmconfigdir}/kmod.prov
|
||||||
|
%__kmod_path ^/lib/modules/.*$
|
28
kmod.prov
Normal file
28
kmod.prov
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/sh +x
|
||||||
|
# Kernel build can have many thousands of modules.
|
||||||
|
# kmod.prov is run for every one of them.
|
||||||
|
# Try to make this script run as fast as we can.
|
||||||
|
# For example, use shell string ops instead of external programs
|
||||||
|
# where possible.
|
||||||
|
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
read -r fname || exit
|
||||||
|
|
||||||
|
# Only process files from .../lib/modules/... subtree
|
||||||
|
[ "${fname#*/lib/modules/*}" != "$fname" ] || exit 0
|
||||||
|
|
||||||
|
kmod=${fname##*/} # like basename, but faster
|
||||||
|
|
||||||
|
if [ "$kmod" = "modules.builtin" ]; then
|
||||||
|
for j in $(cat -- "$fname"); do
|
||||||
|
echo "kmod(${j##*/})"
|
||||||
|
done
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
kmod=${kmod%.gz}
|
||||||
|
kmod=${kmod%.xz}
|
||||||
|
if [ "${kmod%.ko}" != "$kmod" ]; then
|
||||||
|
echo "kmod($kmod)"
|
||||||
|
fi
|
267
kmodtool
Executable file
267
kmodtool
Executable file
@ -0,0 +1,267 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# kmodtool - Helper script for building kernel module RPMs
|
||||||
|
# Copyright (c) 2003-2006 Ville Skyttä <ville.skytta@iki.fi>,
|
||||||
|
# Thorsten Leemhuis <fedora@leemhuis.info>
|
||||||
|
# Jon Masters <jcm@redhat.com>
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
shopt -s extglob
|
||||||
|
|
||||||
|
myprog="kmodtool"
|
||||||
|
myver="0.10.10_kmp2"
|
||||||
|
knownvariants=@(BOOT|PAE|@(big|huge)mem|debug|enterprise|kdump|?(large)smp|uml|xen[0U]?(-PAE)|xen)
|
||||||
|
kmod_name=
|
||||||
|
kver=
|
||||||
|
verrel=
|
||||||
|
variant=
|
||||||
|
kmp=
|
||||||
|
|
||||||
|
get_verrel ()
|
||||||
|
{
|
||||||
|
verrel=${1:-$(uname -r)}
|
||||||
|
verrel=${verrel%%$knownvariants}
|
||||||
|
}
|
||||||
|
|
||||||
|
print_verrel ()
|
||||||
|
{
|
||||||
|
get_verrel $@
|
||||||
|
echo "${verrel}"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_variant ()
|
||||||
|
{
|
||||||
|
get_verrel $@
|
||||||
|
variant=${1:-$(uname -r)}
|
||||||
|
variant=${variant##$verrel}
|
||||||
|
variant=${variant:-'""'}
|
||||||
|
}
|
||||||
|
|
||||||
|
print_variant ()
|
||||||
|
{
|
||||||
|
get_variant $@
|
||||||
|
echo "${variant}"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_rpmtemplate ()
|
||||||
|
{
|
||||||
|
local variant="${1}"
|
||||||
|
local dashvariant="${variant:+-${variant}}"
|
||||||
|
case "$verrel" in
|
||||||
|
*.el*) kdep="kernel${dashvariant}-%{_target_cpu} = ${verrel}" ;;
|
||||||
|
*.EL*) kdep="kernel${dashvariant}-%{_target_cpu} = ${verrel}" ;;
|
||||||
|
*) kdep="kernel-%{_target_cpu} = ${verrel}${variant}" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
echo "%package -n kmod-${kmod_name}${dashvariant}"
|
||||||
|
|
||||||
|
if [ -z "$kmp_provides_summary" ]; then
|
||||||
|
echo "Summary: ${kmod_name} kernel module(s)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$kmp_provides_group" ]; then
|
||||||
|
echo "Group: System Environment/Kernel"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$kmp_version" ]; then
|
||||||
|
echo "Version: %{kmp_version}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$kmp_release" ]; then
|
||||||
|
echo "Release: %{kmp_release}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -z "$kmp" ]; then
|
||||||
|
echo "%global _use_internal_dependency_generator 0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
Provides: kernel-modules = ${verrel}${variant}
|
||||||
|
Provides: ${kmod_name}-kmod = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ -z "$kmp" ]; then
|
||||||
|
echo "Requires: ${kdep}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# RHEL5 - Remove common package requirement on general kmod packages.
|
||||||
|
# Requires: ${kmod_name}-kmod-common >= %{?epoch:%{epoch}:}%{version}
|
||||||
|
#
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
Requires(post): /sbin/depmod
|
||||||
|
Requires(postun): /sbin/depmod
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ "no" != "$kmp_nobuildreqs" ]
|
||||||
|
then
|
||||||
|
echo "BuildRequires: kernel${dashvariant}-devel-%{_target_cpu} = ${verrel}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "" != "$kmp_override_preamble" ]
|
||||||
|
then
|
||||||
|
cat "$kmp_override_preamble"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
%description -n kmod-${kmod_name}${dashvariant}
|
||||||
|
This package provides the ${kmod_name} kernel modules built for the Linux
|
||||||
|
kernel ${verrel}${variant} for the %{_target_cpu} family of processors.
|
||||||
|
%post -n kmod-${kmod_name}${dashvariant}
|
||||||
|
if [ -e "/boot/System.map-${verrel}${variant}" ]; then
|
||||||
|
/sbin/depmod -aeF "/boot/System.map-${verrel}${variant}" "${verrel}${variant}" > /dev/null || :
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ ! -z "$kmp" ]; then
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
modules=( \$(find /lib/modules/${verrel}${variant}/extra/${kmod_name}) )
|
||||||
|
if [ -x "/sbin/weak-modules" ]; then
|
||||||
|
printf '%s\n' "\${modules[@]}" \
|
||||||
|
| /sbin/weak-modules --add-modules
|
||||||
|
fi
|
||||||
|
%preun -n kmod-${kmod_name}${dashvariant}
|
||||||
|
rpm -ql kmod-${kmod_name}${dashvariant} | grep '\.ko$' \
|
||||||
|
> /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules
|
||||||
|
EOF
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat <<EOF
|
||||||
|
%postun -n kmod-${kmod_name}${dashvariant}
|
||||||
|
/sbin/depmod -aF /boot/System.map-${verrel}${variant} ${verrel}${variant} &> /dev/null || :
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ ! -z "$kmp" ]; then
|
||||||
|
cat <<EOF
|
||||||
|
modules=( \$(cat /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules) )
|
||||||
|
#rm /var/run/rpm-kmod-${kmod_name}${dashvariant}-modules
|
||||||
|
if [ -x "/sbin/weak-modules" ]; then
|
||||||
|
printf '%s\n' "\${modules[@]}" \
|
||||||
|
| /sbin/weak-modules --remove-modules
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "%files -n kmod-${kmod_name}${dashvariant}"
|
||||||
|
|
||||||
|
if [ "" == "$kmp_override_filelist" ];
|
||||||
|
then
|
||||||
|
echo "%defattr(644,root,root,755)"
|
||||||
|
echo "/lib/modules/${verrel}${variant}/"
|
||||||
|
echo "/lib/firmware/"
|
||||||
|
else
|
||||||
|
cat "$kmp_override_filelist"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
print_rpmtemplate ()
|
||||||
|
{
|
||||||
|
kmod_name="${1}"
|
||||||
|
shift
|
||||||
|
kver="${1}"
|
||||||
|
get_verrel "${1}"
|
||||||
|
shift
|
||||||
|
if [ -z "${kmod_name}" ] ; then
|
||||||
|
echo "Please provide the kmodule-name as first parameter." >&2
|
||||||
|
exit 2
|
||||||
|
elif [ -z "${kver}" ] ; then
|
||||||
|
echo "Please provide the kver as second parameter." >&2
|
||||||
|
exit 2
|
||||||
|
elif [ -z "${verrel}" ] ; then
|
||||||
|
echo "Couldn't find out the verrel." >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
for variant in "$@" ; do
|
||||||
|
if [ "default" == "$variant" ];
|
||||||
|
then
|
||||||
|
get_rpmtemplate ""
|
||||||
|
else
|
||||||
|
get_rpmtemplate "${variant}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
usage ()
|
||||||
|
{
|
||||||
|
cat <<EOF
|
||||||
|
You called: ${invocation}
|
||||||
|
|
||||||
|
Usage: ${myprog} <command> <option>+
|
||||||
|
Commands:
|
||||||
|
verrel <uname>
|
||||||
|
- Get "base" version-release.
|
||||||
|
variant <uname>
|
||||||
|
- Get variant from uname.
|
||||||
|
rpmtemplate <mainpgkname> <uname> <variants>
|
||||||
|
- Return a template for use in a source RPM
|
||||||
|
rpmtemplate_kmp <mainpgkname> <uname> <variants>
|
||||||
|
- Return a template for use in a source RPM with KMP dependencies
|
||||||
|
version
|
||||||
|
- Output version number and exit.
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
|
invocation="$(basename ${0}) $@"
|
||||||
|
while [ "${1}" ] ; do
|
||||||
|
case "${1}" in
|
||||||
|
verrel)
|
||||||
|
shift
|
||||||
|
print_verrel $@
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
variant)
|
||||||
|
shift
|
||||||
|
print_variant $@
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
rpmtemplate)
|
||||||
|
shift
|
||||||
|
print_rpmtemplate "$@"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
rpmtemplate_kmp)
|
||||||
|
shift
|
||||||
|
kmp=1
|
||||||
|
print_rpmtemplate "$@"
|
||||||
|
exit $?
|
||||||
|
;;
|
||||||
|
version)
|
||||||
|
echo "${myprog} ${myver}"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Error: Unknown option '${1}'." >&2
|
||||||
|
usage >&2
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# mode: sh
|
||||||
|
# sh-indentation: 2
|
||||||
|
# indent-tabs-mode: nil
|
||||||
|
# End:
|
||||||
|
# ex: ts=2 sw=2 et
|
5
libsymlink.attr
Normal file
5
libsymlink.attr
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Make libfoo.so symlinks require the soname-provide of the target library
|
||||||
|
%__libsymlink_requires %{_rpmconfigdir}/elfdeps --provides --soname-only
|
||||||
|
%__libsymlink_magic ^symbolic link to .*lib.*\.so\..*$
|
||||||
|
%__libsymlink_path ^.*\.so$
|
||||||
|
%__libsymlink_flags magic_and_path
|
274
macros
Normal file
274
macros
Normal file
@ -0,0 +1,274 @@
|
|||||||
|
# Per-platform rpm configuration file.
|
||||||
|
|
||||||
|
#==============================================================================
|
||||||
|
# ---- per-platform macros.
|
||||||
|
#
|
||||||
|
%_vendor redhat
|
||||||
|
%_os linux
|
||||||
|
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
|
||||||
|
|
||||||
|
#==============================================================================
|
||||||
|
# ---- configure macros. note that most of these are inherited
|
||||||
|
# from the defaults.
|
||||||
|
#
|
||||||
|
%_localstatedir /var
|
||||||
|
|
||||||
|
%_pkgdocdir %{_docdir}/%{name}
|
||||||
|
%_docdir_fmt %%{NAME}
|
||||||
|
|
||||||
|
%_fmoddir %{_libdir}/gfortran/modules
|
||||||
|
|
||||||
|
%source_date_epoch_from_changelog 1
|
||||||
|
|
||||||
|
%_enable_debug_packages 1
|
||||||
|
%_include_minidebuginfo 1
|
||||||
|
%_include_gdb_index 1
|
||||||
|
%_debugsource_packages 1
|
||||||
|
%_debuginfo_subpackages 1
|
||||||
|
|
||||||
|
#==============================================================================
|
||||||
|
# ---- compiler flags.
|
||||||
|
|
||||||
|
# C compiler flags. This is traditionally called CFLAGS in makefiles.
|
||||||
|
# Historically also available as %%{optflags}, and %%build sets the
|
||||||
|
# environment variable RPM_OPT_FLAGS to this value.
|
||||||
|
%build_cflags %{optflags}
|
||||||
|
|
||||||
|
# C++ compiler flags. This is traditionally called CXXFLAGS in makefiles.
|
||||||
|
%build_cxxflags %{optflags}
|
||||||
|
|
||||||
|
# Fortran compiler flags. Makefiles use both FFLAGS and FCFLAGS as
|
||||||
|
# the corresponding variable names.
|
||||||
|
%build_fflags %{optflags} -I%{_fmoddir}
|
||||||
|
|
||||||
|
# Link editor flags. This is usually called LDFLAGS in makefiles.
|
||||||
|
# (Some makefiles use LFLAGS instead.) The default value assumes that
|
||||||
|
# the flags, while intended for ld, are still passed through the gcc
|
||||||
|
# compiler driver. At the beginning of %%build, the environment
|
||||||
|
# variable RPM_LD_FLAGS to this value.
|
||||||
|
%build_ldflags -Wl,-z,relro %{_ld_as_needed_flags} %{_ld_symbols_flags} %{_hardened_ldflags}
|
||||||
|
|
||||||
|
# Expands to shell code to seot the compiler/linker environment
|
||||||
|
# variables CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS, LDFLAGS if they have
|
||||||
|
# not been set already. RPM_OPT_FLAGS and RPM_LD_FLAGS have already
|
||||||
|
# been set implicitly at the start of the %%build section.
|
||||||
|
# LT_SYS_LIBRARY_PATH is used by libtool script.
|
||||||
|
%set_build_flags \
|
||||||
|
CFLAGS="${CFLAGS:-%{build_cflags}}" ; export CFLAGS ; \
|
||||||
|
CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" ; export CXXFLAGS ; \
|
||||||
|
FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \
|
||||||
|
FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \
|
||||||
|
LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \
|
||||||
|
LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH
|
||||||
|
|
||||||
|
# Internal-only. Do not use. Expand a variable and strip the flags
|
||||||
|
# not suitable to extension builders.
|
||||||
|
%__extension_strip_flags() %{lua:
|
||||||
|
local name = rpm.expand("%{1}")
|
||||||
|
local value = " " .. rpm.expand("%{build_" .. name .. "}")
|
||||||
|
local result = string.gsub(value, "%s+-specs=[^%s]+", " ")
|
||||||
|
print(result)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Variants of CFLAGS, CXXFLAGS, FFLAGS, LDFLAGS for use within
|
||||||
|
# extension builders.
|
||||||
|
%extension_cflags %{__extension_strip_flags cflags}
|
||||||
|
%extension_cxxflags %{__extension_strip_flags cxxflags}
|
||||||
|
%extension_fflags %{__extension_strip_flags fflags}
|
||||||
|
%extension_ldflags %{__extension_strip_flags ldflags}
|
||||||
|
|
||||||
|
# Deprecated names. For backwards compatibility only.
|
||||||
|
%__global_cflags %{build_cflags}
|
||||||
|
%__global_cxxflags %{build_cxxflags}
|
||||||
|
%__global_fflags %{build_fflags}
|
||||||
|
%__global_fcflags %{build_fflags}
|
||||||
|
%__global_ldflags %{build_ldflags}
|
||||||
|
|
||||||
|
#==============================================================================
|
||||||
|
# ---- configure and makeinstall.
|
||||||
|
#
|
||||||
|
%_configure_gnuconfig_hack 1
|
||||||
|
%_configure_libtool_hardening_hack 1
|
||||||
|
# If defined, _configure_disable_silent_rules will cause --disable-silent-rules
|
||||||
|
# to be added to the list of options passed to the configure script.
|
||||||
|
# Eventually we'll want to turn this on by default, but this gives packagers a
|
||||||
|
# way to turn it back off.
|
||||||
|
# %_configure_disable_silent_rules 1
|
||||||
|
%configure \
|
||||||
|
%{set_build_flags}; \
|
||||||
|
[ "%_configure_gnuconfig_hack" = 1 ] && for i in $(find $(dirname %{_configure}) -name config.guess -o -name config.sub) ; do \
|
||||||
|
[ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \
|
||||||
|
done ; \
|
||||||
|
[ "%_configure_libtool_hardening_hack" = 1 ] && [ x != "x%{_hardened_ldflags}" ] && \
|
||||||
|
for i in $(find . -name ltmain.sh) ; do \
|
||||||
|
%{__sed} -i.backup -e 's~compiler_flags=$~compiler_flags="%{_hardened_ldflags}"~' $i \
|
||||||
|
done ; \
|
||||||
|
%{_configure} --build=%{_build} --host=%{_host} \\\
|
||||||
|
--program-prefix=%{?_program_prefix} \\\
|
||||||
|
--disable-dependency-tracking \\\
|
||||||
|
%{?_configure_disable_silent_rules:--disable-silent-rules} \\\
|
||||||
|
--prefix=%{_prefix} \\\
|
||||||
|
--exec-prefix=%{_exec_prefix} \\\
|
||||||
|
--bindir=%{_bindir} \\\
|
||||||
|
--sbindir=%{_sbindir} \\\
|
||||||
|
--sysconfdir=%{_sysconfdir} \\\
|
||||||
|
--datadir=%{_datadir} \\\
|
||||||
|
--includedir=%{_includedir} \\\
|
||||||
|
--libdir=%{_libdir} \\\
|
||||||
|
--libexecdir=%{_libexecdir} \\\
|
||||||
|
--localstatedir=%{_localstatedir} \\\
|
||||||
|
--sharedstatedir=%{_sharedstatedir} \\\
|
||||||
|
--mandir=%{_mandir} \\\
|
||||||
|
--infodir=%{_infodir}
|
||||||
|
|
||||||
|
#==============================================================================
|
||||||
|
# ---- Build policy macros.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
# Expanded at beginning of %install scriptlet.
|
||||||
|
#
|
||||||
|
|
||||||
|
%__spec_install_pre %{___build_pre}\
|
||||||
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "${RPM_BUILD_ROOT}"\
|
||||||
|
mkdir -p `dirname "$RPM_BUILD_ROOT"`\
|
||||||
|
mkdir "$RPM_BUILD_ROOT"\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
# Expanded at end of %install scriptlet.
|
||||||
|
#
|
||||||
|
|
||||||
|
%__arch_install_post /usr/lib/rpm/check-buildroot
|
||||||
|
|
||||||
|
# Build root policy macros. Standard naming:
|
||||||
|
# convert all '-' in basename to '_', add two leading underscores.
|
||||||
|
%__brp_ldconfig /usr/lib/rpm/redhat/brp-ldconfig
|
||||||
|
%__brp_compress /usr/lib/rpm/brp-compress
|
||||||
|
%__brp_strip /usr/lib/rpm/brp-strip %{__strip}
|
||||||
|
%__brp_strip_lto /usr/lib/rpm/redhat/brp-strip-lto %{__strip}
|
||||||
|
%__brp_strip_comment_note /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump}
|
||||||
|
%__brp_strip_static_archive /usr/lib/rpm/brp-strip-static-archive %{__strip}
|
||||||
|
%__brp_python_bytecompile /usr/lib/rpm/redhat/brp-python-bytecompile "%{__python}" "%{?_python_bytecompile_errors_terminate_build}" "%{?_python_bytecompile_extra}"
|
||||||
|
%__brp_python_hardlink /usr/lib/rpm/brp-python-hardlink
|
||||||
|
# __brp_mangle_shebangs_exclude - shebangs to exclude
|
||||||
|
# __brp_mangle_shebangs_exclude_file - file from which to get shebangs to exclude
|
||||||
|
# __brp_mangle_shebangs_exclude_from - files to ignore
|
||||||
|
# __brp_mangle_shebangs_exclude_from_file - file from which to get files to ignore
|
||||||
|
%__brp_mangle_shebangs /usr/lib/rpm/redhat/brp-mangle-shebangs %{?__brp_mangle_shebangs_exclude:--shebangs "%{?__brp_mangle_shebangs_exclude}"} %{?__brp_mangle_shebangs_exclude_file:--shebangs-from "%{__brp_mangle_shebangs_exclude_file}"} %{?__brp_mangle_shebangs_exclude_from:--files "%{?__brp_mangle_shebangs_exclude_from}"} %{?__brp_mangle_shebangs_exclude_from_file:--files-from "%{__brp_mangle_shebangs_exclude_from_file}"}
|
||||||
|
|
||||||
|
%__os_install_post \
|
||||||
|
%{?__brp_ldconfig} \
|
||||||
|
%{?__brp_compress} \
|
||||||
|
%{!?__debug_package:\
|
||||||
|
%{?__brp_strip} \
|
||||||
|
%{?__brp_strip_comment_note} \
|
||||||
|
} \
|
||||||
|
%{?__brp_strip_lto} \
|
||||||
|
%{?__brp_strip_static_archive} \
|
||||||
|
%{?py_auto_byte_compile:%{?__brp_python_bytecompile}} \
|
||||||
|
%{?__brp_python_hardlink} \
|
||||||
|
%{?__brp_mangle_shebangs} \
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%__spec_install_post\
|
||||||
|
%{?__debug_package:%{__debug_install_post}}\
|
||||||
|
%{__arch_install_post}\
|
||||||
|
%{__os_install_post}\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
%install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
|
||||||
|
%%install\
|
||||||
|
%{nil}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Should missing buildids terminate a build?
|
||||||
|
%_missing_build_ids_terminate_build 1
|
||||||
|
|
||||||
|
#
|
||||||
|
## Automatically compile python files
|
||||||
|
%py_auto_byte_compile 1
|
||||||
|
|
||||||
|
#
|
||||||
|
## Should python bytecompilation errors terminate a build?
|
||||||
|
%_python_bytecompile_errors_terminate_build 1
|
||||||
|
## Should python bytecompilation compile outisde python specific directories?
|
||||||
|
%_python_bytecompile_extra 0
|
||||||
|
|
||||||
|
# Use SHA-256 for FILEDIGESTS instead of default MD5
|
||||||
|
%_source_filedigest_algorithm 8
|
||||||
|
%_binary_filedigest_algorithm 8
|
||||||
|
|
||||||
|
# Use Zstandard compression for binary payloads
|
||||||
|
%_binary_payload w19.zstdio
|
||||||
|
|
||||||
|
%_hardening_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
|
||||||
|
# we don't escape symbols '~', '"', etc. so be careful when changing this
|
||||||
|
%_hardening_ldflags -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
|
||||||
|
|
||||||
|
# Harden packages by default for Fedora 23:
|
||||||
|
# https://fedorahosted.org/fesco/ticket/1384 (accepted on 2014-02-11)
|
||||||
|
# Use "%undefine _hardened_build" to disable.
|
||||||
|
%_hardened_build 1
|
||||||
|
%_hardened_cflags %{?_hardened_build:%{_hardening_cflags}}
|
||||||
|
%_hardened_ldflags %{?_hardened_build:%{_hardening_ldflags}}
|
||||||
|
|
||||||
|
%_annobin_cflags -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
|
||||||
|
|
||||||
|
# Add extra information to binary objects created by gcc for Fedora 28:
|
||||||
|
# https://pagure.io/fesco/issue/1780 (accepted on 2017-10-30)
|
||||||
|
# Use "%undefine _annotated_build" to disable.
|
||||||
|
%_annotated_build 1
|
||||||
|
%_annotated_cflags %{?_annotated_build:%{_annobin_cflags}}
|
||||||
|
|
||||||
|
# Fail linking if there are undefined symbols. Required for proper
|
||||||
|
# ELF symbol versioning support. Disabled by default.
|
||||||
|
# Use "%define _ld_strict_symbol_defs 1" to enable.
|
||||||
|
#%_ld_strict_symbol_defs 1
|
||||||
|
%_ld_symbols_flags %{?_ld_strict_symbol_defs:-Wl,-z,defs}
|
||||||
|
|
||||||
|
# https://fedoraproject.org/wiki/Changes/RemoveExcessiveLinking
|
||||||
|
# use "%undefine _ld_as_needed" to disable.
|
||||||
|
%_ld_as_needed 1
|
||||||
|
%_ld_as_needed_flags %{?_ld_as_needed:-Wl,--as-needed}
|
||||||
|
|
||||||
|
%__global_compiler_flags -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches %{_hardened_cflags} %{_annotated_cflags}%{?_legacy_common_support: -fcommon}
|
||||||
|
|
||||||
|
# Automatically trim changelog entries after 2 years
|
||||||
|
%_changelog_trimtime %{lua:print(os.time() - 2 * 365 * 86400)}
|
||||||
|
|
||||||
|
#==============================================================================
|
||||||
|
# ---- Generic auto req/prov filtering macros
|
||||||
|
#
|
||||||
|
# http://fedoraproject.org/wiki/PackagingDrafts/AutoProvidesAndRequiresFiltering
|
||||||
|
|
||||||
|
# prevent anything matching from being scanned for provides
|
||||||
|
%filter_provides_in(P) %{expand: \
|
||||||
|
%global __filter_prov_cmd %{?__filter_prov_cmd} %{__grep} -v %{-P} '%*' | \
|
||||||
|
}
|
||||||
|
|
||||||
|
# prevent anything matching from being scanned for requires
|
||||||
|
%filter_requires_in(P) %{expand: \
|
||||||
|
%global __filter_req_cmd %{?__filter_req_cmd} %{__grep} -v %{-P} '%*' | \
|
||||||
|
}
|
||||||
|
|
||||||
|
# filter anything matching out of the provides stream
|
||||||
|
%filter_from_provides() %{expand: \
|
||||||
|
%global __filter_from_prov %{?__filter_from_prov} | %{__sed} -e '%*' \
|
||||||
|
}
|
||||||
|
|
||||||
|
# filter anything matching out of the requires stream
|
||||||
|
%filter_from_requires() %{expand: \
|
||||||
|
%global __filter_from_req %{?__filter_from_req} | %{__sed} -e '%*' \
|
||||||
|
}
|
||||||
|
|
||||||
|
# actually set up the filtering bits
|
||||||
|
%filter_setup %{expand: \
|
||||||
|
%global _use_internal_dependency_generator 0 \
|
||||||
|
%global __deploop() while read FILE; do echo "${FILE}" | /usr/lib/rpm/rpmdeps -%{1}; done | /bin/sort -u \
|
||||||
|
%global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
|
||||||
|
%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")
|
39
macros.dwz
Normal file
39
macros.dwz
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Macros for reducing debug info size using dwz(1) utility.
|
||||||
|
|
||||||
|
# The two default values below should result in dwz taking at most
|
||||||
|
# 3GB of RAM or so on 64-bit hosts and 2.5GB on 32-bit hosts
|
||||||
|
# on the largest *.debug files (in mid 2012 those are
|
||||||
|
# libreoffice-debuginfo, debuginfos containing
|
||||||
|
# libxul.so.debug and libwebkitgtk-*.so.*.debug).
|
||||||
|
# This needs to be tuned based on the amount of available RAM
|
||||||
|
# on build boxes for each architecture as well as virtual address
|
||||||
|
# space limitations if dwz is 32-bit program. While it needs less
|
||||||
|
# memory than 64-bit program because pointers are smaller, it can
|
||||||
|
# never have more than 4GB-epsilon of RAM and on some architecture
|
||||||
|
# even less than that (e.g. 2GB).
|
||||||
|
|
||||||
|
# Number of debugging information entries (DIEs) above which
|
||||||
|
# dwz will stop considering file for multifile optimizations
|
||||||
|
# and enter a low memory mode, in which it will optimize
|
||||||
|
# in about half the memory needed otherwise.
|
||||||
|
%_dwz_low_mem_die_limit 10000000
|
||||||
|
# Number of DIEs above which dwz will stop processing
|
||||||
|
# a file altogether.
|
||||||
|
%_dwz_max_die_limit 50000000
|
||||||
|
|
||||||
|
# On x86_64 increase the higher limit to make libwebkit* optimizable.
|
||||||
|
# libwebkit* in mid 2012 contains roughly 87mil DIEs, and 64-bit
|
||||||
|
# dwz is able to optimize it from ~1.1GB to ~410MB using 5.2GB of RAM.
|
||||||
|
%_dwz_max_die_limit_x86_64 110000000
|
||||||
|
|
||||||
|
# On ARM, build boxes often have only 512MB of RAM and are very slow.
|
||||||
|
# Lower both the limits.
|
||||||
|
%_dwz_low_mem_die_limit_armv5tel 4000000
|
||||||
|
%_dwz_low_mem_die_limit_armv7hl 4000000
|
||||||
|
%_dwz_max_die_limit_armv5tel 10000000
|
||||||
|
%_dwz_max_die_limit_armv7hl 10000000
|
||||||
|
|
||||||
|
%_dwz_limit() %{expand:%%{?%{1}_%{_arch}}%%{!?%{1}_%{_arch}:%%%{1}}}
|
||||||
|
%_find_debuginfo_dwz_opts --run-dwz\\\
|
||||||
|
--dwz-low-mem-die-limit %{_dwz_limit _dwz_low_mem_die_limit}\\\
|
||||||
|
--dwz-max-die-limit %{_dwz_limit _dwz_max_die_limit}
|
61
macros.fedora-misc
Normal file
61
macros.fedora-misc
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# Some miscellaneous Fedora-related macros
|
||||||
|
|
||||||
|
# List files matching inclusion globs, excluding files matching exclusion blogs
|
||||||
|
# Optional parameters:
|
||||||
|
# – -i "<globs>" inclusion 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:
|
||||||
|
%if %{lua: print(string.len(rpm.expand("%{?-i*}%{?listfiles_include}%*")))}
|
||||||
|
listfiles_include=$(realpath -e --relative-base=. %{?-i*} %{?listfiles_include} %* | sort -u)
|
||||||
|
%if %{lua: print(string.len(rpm.expand("%{?-x*}%{?listfiles_exclude}")))}
|
||||||
|
while IFS= read -r finc ; do
|
||||||
|
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
|
||||||
|
# Write the contents of a list of rpm variables to a macro file.
|
||||||
|
# The target file must contain the corresponding anchors.
|
||||||
|
# For example %writevars -f myfile foo bar will replace:
|
||||||
|
# @@FOO@@ with the rpm evaluation of %{foo} and
|
||||||
|
# @@BAR@@ with the rpm evaluation of %{bar}
|
||||||
|
# in myfile
|
||||||
|
%writevars(f:) %{lua:
|
||||||
|
local fedora = require "fedora.common"
|
||||||
|
local macrofile = rpm.expand("%{-f*}")
|
||||||
|
local rpmvars = {}
|
||||||
|
for i = 1, rpm.expand("%#") do
|
||||||
|
table.insert(rpmvars, rpm.expand("%" .. i))
|
||||||
|
end
|
||||||
|
fedora.writevars(macrofile,rpmvars)
|
||||||
|
}
|
||||||
|
|
||||||
|
# gpgverify verifies signed sources. There is documentation in the script.
|
||||||
|
%gpgverify(k:s:d:) %{lua:
|
||||||
|
local script = rpm.expand("%{_rpmconfigdir}/redhat/gpgverify ")
|
||||||
|
local keyring = rpm.expand("%{-k*}")
|
||||||
|
local signature = rpm.expand("%{-s*}")
|
||||||
|
local data = rpm.expand("%{-d*}")
|
||||||
|
print(script)
|
||||||
|
if keyring ~= "" then
|
||||||
|
print(rpm.expand("--keyring='%{SOURCE" .. keyring .. "}' "))
|
||||||
|
end
|
||||||
|
if signature ~= "" then
|
||||||
|
print(rpm.expand("--signature='%{SOURCE" .. signature .. "}' "))
|
||||||
|
end
|
||||||
|
if data ~= "" then
|
||||||
|
print(rpm.expand("--data='%{SOURCE" .. data .. "}' "))
|
||||||
|
end
|
||||||
|
}
|
22
macros.fedora-misc-srpm
Normal file
22
macros.fedora-misc-srpm
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Some miscellaneous Fedora-related macros
|
||||||
|
|
||||||
|
# A directory for rpm macros
|
||||||
|
%rpmmacrodir /usr/lib/rpm/macros.d
|
||||||
|
|
||||||
|
# A directory for appdata metainfo. This has changed between releases so a
|
||||||
|
# macro is useful.
|
||||||
|
%_metainfodir %{_datadir}/metainfo
|
||||||
|
|
||||||
|
# A directory for SWID tag files describing the installation
|
||||||
|
%_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))
|
||||||
|
}
|
85
macros.forge
Normal file
85
macros.forge
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
# Map forge information to rpm metadata. This macro will compute default spec
|
||||||
|
# variable values.
|
||||||
|
#
|
||||||
|
# The following spec variables SHOULD be set before calling the macro:
|
||||||
|
#
|
||||||
|
# forgeurl the project url on the forge, strongly recommended;
|
||||||
|
# Version if applicable, set it with Version: <version>
|
||||||
|
# tag if applicable
|
||||||
|
# commit if applicable
|
||||||
|
# date if applicable (to override the mtime of the Source archive)
|
||||||
|
#
|
||||||
|
# Use -z for multiple calls to the macro
|
||||||
|
#
|
||||||
|
# The macro will attempt to compute and set the following variables if they are
|
||||||
|
# not already set by the packager:
|
||||||
|
#
|
||||||
|
# forgesource an URL that can be used as SourceX: value
|
||||||
|
# forgesetupargs the correct arguments to pass to %setup for this source
|
||||||
|
# used by %forgesetup and %forgeautosetup
|
||||||
|
# archivename the source archive filename, without extentions
|
||||||
|
# archiveext the source archive filename extensions, without leading dot
|
||||||
|
# archiveurl the url that can be used to download the source archive,
|
||||||
|
# without renaming
|
||||||
|
# topdir the source archive top directory (can be empty)
|
||||||
|
# extractdir the source directory created inside %{_builddir} after using
|
||||||
|
# %%forgesetup, %forgeautosetup or %{forgesetupargs}
|
||||||
|
# repo the repository name
|
||||||
|
# owner the repository owner (if used by another computed variable)
|
||||||
|
# shortcommit the commit hash clamping used by the forge, if any
|
||||||
|
# scm the scm type, when packaging code snapshots: commits or tags
|
||||||
|
# distprefix the prefix that needs adding to dist to trace non-release packaging
|
||||||
|
#
|
||||||
|
# Most of the computed variables are both overridable and optional.
|
||||||
|
#
|
||||||
|
# Optional parameters:
|
||||||
|
# -a process all sources in one go, instead of using separate -z calls
|
||||||
|
# -z <number> suffix all the read and written variable names with <number>
|
||||||
|
# for example read forgeurl<number>, version<number>…
|
||||||
|
# and generate forgesetupargs<number>, archiveurl<number>…
|
||||||
|
# The macro assumes that null or nil suffix is used for the primary
|
||||||
|
# package source.
|
||||||
|
# -s Silently ignore problems in forgeurl, use it if it can be parsed,
|
||||||
|
# ignore it otherwise.
|
||||||
|
# -v Be verbose and print every spec variable the macro sets.
|
||||||
|
# -i Print some info about the state of spec variables the macro may use or
|
||||||
|
# set at the end of the processing.
|
||||||
|
%forgemeta(az:sviu:) %{lua:
|
||||||
|
local fedora = require "fedora.common"
|
||||||
|
local forge = require "fedora.srpm.forge"
|
||||||
|
local verbose = rpm.expand("%{-v}") ~= ""
|
||||||
|
local informative = rpm.expand("%{-i}") ~= ""
|
||||||
|
local silent = rpm.expand("%{-s}") ~= ""
|
||||||
|
local processall = (rpm.expand("%{-a}") ~= "") and (rpm.expand("%{-z}") == "")
|
||||||
|
if processall then
|
||||||
|
for _,s in pairs(fedora.getsuffixes("forgeurl")) do
|
||||||
|
forge.meta(s,verbose,informative,silent)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
forge.meta(rpm.expand("%{-z*}"),verbose,informative,silent)
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
# Convenience macro to relay computed arguments to %setup
|
||||||
|
# Optional parameters:
|
||||||
|
# -a process all sources in one go, instead of using separate -z calls
|
||||||
|
# -z <number> read %{?forgesetupargs<number>}
|
||||||
|
# -v be verbose
|
||||||
|
%forgesetup(az:v) %{lua:
|
||||||
|
local fedora = require "fedora.common"
|
||||||
|
if (rpm.expand("%{-z}") == "") and (rpm.expand("%{-a}") ~= "") then
|
||||||
|
for _,s in pairs(fedora.getsuffixes("forgesetupargs")) do
|
||||||
|
print(rpm.expand("%setup %{!-v:-q} %{?forgesetupargs" .. s .. "}\\n"))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
print( rpm.expand("%setup %{!-v:-q} %{?forgesetupargs" .. rpm.expand("%{-z*}") .. "}\\n"))
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
# Convenience macro to relay computed arguments to %autosetup
|
||||||
|
# Parameters relayed to %autosetup: -v -N -S -p
|
||||||
|
# Optional parameters:
|
||||||
|
# -z <number> read %{?forgesetupargs<number>}
|
||||||
|
%forgeautosetup(z:vNS:p:q) %{lua:
|
||||||
|
print(rpm.expand("%autosetup %{-v} %{-N} %{?-S} %{?-p} %{?forgesetupargs" .. rpm.expand("%{-z*}") .. "}\\n"))
|
||||||
|
}
|
63
macros.kmp
Normal file
63
macros.kmp
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# Use these macros to differentiate between RH and other KMP implementation(s).
|
||||||
|
redhat_kernel_module_package 1
|
||||||
|
kernel_module_package_release 1
|
||||||
|
|
||||||
|
%__find_provides /usr/lib/rpm/redhat/find-provides
|
||||||
|
%__find_requires /usr/lib/rpm/redhat/find-requires
|
||||||
|
|
||||||
|
#kernel_module_package [ -n name ] [ -v version ] [ -r release ] [ -s script ]
|
||||||
|
# [ -f filelist] [ -x ] [ -p preamble ] flavor flavor ...
|
||||||
|
|
||||||
|
%kernel_module_package_buildreqs %global kmodtool_generate_buildreqs 1 \
|
||||||
|
kernel-devel
|
||||||
|
|
||||||
|
%kernel_module_package(n:v:r:s:f:xp:) %{expand:%( \
|
||||||
|
%define kmodtool %{-s*}%{!-s:/usr/lib/rpm/redhat/kmodtool} \
|
||||||
|
%define kmp_version %{-v*}%{!-v:%{version}} \
|
||||||
|
%define kmp_release %{-r*}%{!-r:%{release}} \
|
||||||
|
%define latest_kernel %(rpm -q --qf '%{VERSION}-%{RELEASE}\\\\n' `rpm -q kernel-devel | /usr/lib/rpm/redhat/rpmsort -r | head -n 1` | head -n 1) \
|
||||||
|
%{!?kernel_version:%{expand:%%global kernel_version %{latest_kernel}}} \
|
||||||
|
%global kverrel %(%{kmodtool} verrel %{?kernel_version} 2>/dev/null) \
|
||||||
|
flavors="default" \
|
||||||
|
if [ "i686" == "%{_target_cpu}" ] || [ "x86_64" == "%{_target_cpu}" ] \
|
||||||
|
then \
|
||||||
|
xenver=$(rpm -q kernel-xen-devel-%{kverrel}|head -n 1)\
|
||||||
|
kdver=$(rpm -q kernel-kdump-devel-%{kverrel}|head -n 1)\
|
||||||
|
if [ "kernel-xen-devel-%{kverrel}" == "$xenver" ] \
|
||||||
|
then \
|
||||||
|
flavors="$flavors xen" \
|
||||||
|
fi \
|
||||||
|
if [ "kernel-kdump-devel-%{kverrel}" == "$kdver" ] \
|
||||||
|
then \
|
||||||
|
flavors="$flavors kdump" \
|
||||||
|
fi \
|
||||||
|
fi \
|
||||||
|
if [ -z "%*" ]; then \
|
||||||
|
flavors_to_build=$flavors \
|
||||||
|
elif [ -z "%{-x}" ]; then \
|
||||||
|
flavors_to_build="%*" \
|
||||||
|
else \
|
||||||
|
flavors_to_build=" $flavors "\
|
||||||
|
echo "[$flavors_to_build]" >/tmp/tmp.txt
|
||||||
|
for i in %* \
|
||||||
|
do \
|
||||||
|
flavors_to_build=${flavors_to_build//$i /}
|
||||||
|
done \
|
||||||
|
fi \
|
||||||
|
echo "%%global flavors_to_build ${flavors_to_build:-%%nil}" \
|
||||||
|
echo "%%global kernel_source() /usr/src/kernels/%kverrel.\\\$([ %%%%{1} = default ] || echo "%%%%{1}.")%_target_cpu" \
|
||||||
|
if [ ! -z "%{-f*}" ] \
|
||||||
|
then \
|
||||||
|
filelist="%{-f*}" \
|
||||||
|
fi \
|
||||||
|
if [ ! -z "%{-p*}" ] \
|
||||||
|
then \
|
||||||
|
preamble="%{-p*}" \
|
||||||
|
fi \
|
||||||
|
nobuildreqs="yes" \
|
||||||
|
if [ "x%{kmodtool_generate_buildreqs}" != "x1" ] \
|
||||||
|
then \
|
||||||
|
nobuildreqs="no" \
|
||||||
|
fi \
|
||||||
|
kmp_override_filelist="$filelist" kmp_override_preamble="$preamble" kmp_nobuildreqs="$nobuildreqs" %{kmodtool} rpmtemplate_kmp %{-n*}%{!-n:%name} %{kverrel} $flavors_to_build 2>/dev/null \
|
||||||
|
)}
|
2
macros.ldc-srpm
Normal file
2
macros.ldc-srpm
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# arches that ldc builds on
|
||||||
|
%ldc_arches %{ix86} x86_64 %{arm} aarch64
|
9
macros.ldconfig
Normal file
9
macros.ldconfig
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#%ldconfig /sbin/ldconfig
|
||||||
|
%ldconfig_post(n:) %{?ldconfig:%post -p %ldconfig %{?*} %{-n:-n %{-n*}}\
|
||||||
|
%end}
|
||||||
|
%ldconfig_postun(n:) %{?ldconfig:%postun -p %ldconfig %{?*} %{-n:-n %{-n*}}\
|
||||||
|
%end}
|
||||||
|
%ldconfig_scriptlets(n:) %{?ldconfig:\
|
||||||
|
%ldconfig_post %{?*} %{-n:-n %{-n*}}\
|
||||||
|
%ldconfig_postun %{?*} %{-n:-n %{-n*}}\
|
||||||
|
}
|
5
macros.mono-srpm
Normal file
5
macros.mono-srpm
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# arches that mono builds on
|
||||||
|
%mono_arches %{ix86} x86_64 sparc sparcv9 ia64 %{arm} aarch64 alpha s390x ppc ppc64 ppc64le
|
||||||
|
|
||||||
|
%_monodir %{_prefix}/lib/mono
|
||||||
|
%_monogacdir %{_monodir}/gac
|
7
macros.nodejs-srpm
Normal file
7
macros.nodejs-srpm
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# nodejs_arches lists what arches Node.js and dependent packages run on.
|
||||||
|
#
|
||||||
|
# Enabling Node.js on other arches requires porting the V8 JavaScript JIT to
|
||||||
|
# those arches. Support for POWER and aarch64 arrived in nodejs v4. Support
|
||||||
|
# for s390x arrived in nodejs v6
|
||||||
|
|
||||||
|
%nodejs_arches %{ix86} x86_64 %{arm} aarch64 %{power64} s390x
|
3
macros.valgrind-srpm
Normal file
3
macros.valgrind-srpm
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# valgrind_arches lists what arches Valgrind works on
|
||||||
|
|
||||||
|
%valgrind_arches %{ix86} x86_64 ppc ppc64 ppc64le s390x armv7hl aarch64
|
7
macros.vpath
Normal file
7
macros.vpath
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# ---- VPATH default settings
|
||||||
|
|
||||||
|
# directory where CMakeLists.txt/meson.build/etc. are placed
|
||||||
|
%_vpath_srcdir .
|
||||||
|
|
||||||
|
# directory (doesn't need to exist) where all generated build files will be placed
|
||||||
|
%_vpath_builddir %_target_platform
|
76
modalias.prov
Normal file
76
modalias.prov
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# heavily based upon find-suggests.ksyms by Andreas Gruenbacher <agruen@suse.de>.
|
||||||
|
# with modifications by Michael Brown <Michael_E_Brown@dell.com>
|
||||||
|
#
|
||||||
|
# -- added module versioning info to modalias() symbols
|
||||||
|
# -- removed code which inspects spec files.
|
||||||
|
|
||||||
|
IFS=$'\n'
|
||||||
|
|
||||||
|
#
|
||||||
|
# Initially, dont generate modalias() lines for kernel package. This needs
|
||||||
|
# additional discussion. Would like to eventually add them for
|
||||||
|
# completeness, so that we can determine when drivers are folded into
|
||||||
|
# mainline kernel.
|
||||||
|
#
|
||||||
|
case "$1" in
|
||||||
|
kernel-module-*) ;; # Fedora kernel module package names start with
|
||||||
|
# kernel-module.
|
||||||
|
kernel*) is_kernel_package=1 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if ! [ -z "$is_kernel_package" ]; then
|
||||||
|
cat > /dev/null
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
print_modaliases() {
|
||||||
|
declare class=$1 variants=$2 pos=$3
|
||||||
|
if [ -n "$variants" ]; then
|
||||||
|
echo "${class:0:pos}[$variants]${class:pos+1}"
|
||||||
|
else
|
||||||
|
[ -z "$class" ] || echo "$class"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
combine_modaliases() {
|
||||||
|
declare tag class variants pos n
|
||||||
|
read class
|
||||||
|
while read tag; do
|
||||||
|
for ((n=0; n<${#class}; n++)); do
|
||||||
|
if [ "*" != "${class:n:1}" -a \
|
||||||
|
"${class:0:n}" = "${tag:0:n}" -a \
|
||||||
|
"${class:n+1}" = "${tag:n+1}" ] &&
|
||||||
|
( [ -z "$pos" ] || [ $n = $pos ] ); then
|
||||||
|
variants="${variants:-${class:n:1}}${tag:n:1}"
|
||||||
|
pos=$n
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ $n -eq ${#class} ]; then
|
||||||
|
print_modaliases "$class" "$variants" "$pos"
|
||||||
|
variants=
|
||||||
|
pos=
|
||||||
|
class=$tag
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
print_modaliases "$class" "$variants" "$pos"
|
||||||
|
}
|
||||||
|
|
||||||
|
for module in $(grep -E '/lib/modules/.+\.ko$') $*; do
|
||||||
|
# | head -n1 because some modules have *two* version tags. *cough*b44*cough*
|
||||||
|
modver=$(/sbin/modinfo -F version "$module"| head -n1)
|
||||||
|
modver=${modver// /_}
|
||||||
|
|
||||||
|
# only add version tag if it has a version
|
||||||
|
if [ -n "$modver" ]; then
|
||||||
|
/sbin/modinfo -F alias "$module" \
|
||||||
|
| sed -nre "s,(.+),modalias(\\1) = $modver,p"
|
||||||
|
else
|
||||||
|
/sbin/modinfo -F alias "$module" \
|
||||||
|
| sed -nre "s,(.+),modalias(\\1),p"
|
||||||
|
fi
|
||||||
|
done \
|
||||||
|
| sort -u \
|
||||||
|
| combine_modaliases
|
2
redhat-annobin-cc1
Normal file
2
redhat-annobin-cc1
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*cc1_options:
|
||||||
|
+ %{!-fno-use-annobin:%{!iplugindir*:%:find-plugindir()} -fplugin=annobin}
|
@ -1,2 +1,2 @@
|
|||||||
*cc1_options:
|
*cc1_options:
|
||||||
+ %{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}
|
+ %{!r:%{!fpie:%{!fPIE:%{!fpic:%{!fPIC:%{!fno-pic:-fPIE}}}}}}
|
||||||
|
@ -1,5 +1,2 @@
|
|||||||
*self_spec:
|
*self_spec:
|
||||||
+ %{!shared:-pie}
|
+ %{!static:%{!shared:%{!r:-pie}}}
|
||||||
|
|
||||||
*link:
|
|
||||||
+ -z now
|
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/rpmrc b/rpmrc
|
|
||||||
index 9127200..fe2f84b 100644
|
|
||||||
--- a/rpmrc
|
|
||||||
+++ b/rpmrc
|
|
||||||
@@ -64,6 +64,8 @@ optflags: hades %{__global_cflags}
|
|
||||||
optflags: s390 %{__global_cflags} -m31 -march=z9-109 -mtune=z10
|
|
||||||
optflags: s390x %{__global_cflags} -m64 -march=z9-109 -mtune=z10
|
|
||||||
|
|
||||||
+optflags: aarch64 %{__global_cflags} -fno-stack-protector
|
|
||||||
+
|
|
||||||
# set build arch to fedora buildarches on hardware capable of running it
|
|
||||||
# saves having to do rpmbuild --target=
|
|
||||||
buildarchtranslate: athlon: i686
|
|
@ -1,51 +0,0 @@
|
|||||||
diff -uNr redhat-rpm-config-9.1.0-orig/macros.ghc-srpm redhat-rpm-config-9.1.0/macros.ghc-srpm
|
|
||||||
--- redhat-rpm-config-9.1.0-orig/macros.ghc-srpm 1969-12-31 18:00:00.000000000 -0600
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros.ghc-srpm 2011-05-27 10:19:29.504287354 -0500
|
|
||||||
@@ -0,0 +1,3 @@
|
|
||||||
+# macro defining the archs that ghc runs on in fedora
|
|
||||||
+%ghc_arches %{ix86} x86_64 ppc ppc64 alpha sparcv9 armv7hl armv5tel s390 s390x
|
|
||||||
+%ghc_arches_with_ghci %{ix86} x86_64 ppc sparcv9 armv7hl armv5tel
|
|
||||||
diff -uNr redhat-rpm-config-9.1.0-orig/macros.mono-srpm redhat-rpm-config-9.1.0/macros.mono-srpm
|
|
||||||
--- redhat-rpm-config-9.1.0-orig/macros.mono-srpm 1969-12-31 18:00:00.000000000 -0600
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros.mono-srpm 2011-05-27 10:59:00.348201750 -0500
|
|
||||||
@@ -0,0 +1,2 @@
|
|
||||||
+# arches that mono builds on
|
|
||||||
+%mono_arches %{ix86} x86_64 sparc sparcv9 ia64 %{arm} alpha s390x ppc ppc64
|
|
||||||
diff -uNr redhat-rpm-config-9.1.0-orig/macros.nodejs-srpm redhat-rpm-config-9.1.0/macros.nodejs-srpm
|
|
||||||
--- redhat-rpm-config-9.1.0-orig/macros.nodejs-srpm 1969-12-31 17:00:00.000000000 -0700
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros.nodejs-srpm 2013-05-20 19:21:20.364367765 -0700
|
|
||||||
@@ -0,0 +1,6 @@
|
|
||||||
+# nodejs_arches lists what arches Node.js and dependent packages run on.
|
|
||||||
+#
|
|
||||||
+# Enabling Node.js on other arches requires porting the V8 JavaScript JIT to
|
|
||||||
+# those arches.
|
|
||||||
+
|
|
||||||
+%nodejs_arches %{ix86} x86_64 %{arm}
|
|
||||||
diff -uNr redhat-rpm-config-9.1.0-orig/macros.ocaml-srpm redhat-rpm-config-9.1.0/macros.ocaml-srpm
|
|
||||||
--- redhat-rpm-config-9.1.0-orig/macros.ocaml-srpm 1969-12-31 18:00:00.000000000 -0600
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros.ocaml-srpm 2011-05-27 10:42:10.638194240 -0500
|
|
||||||
@@ -0,0 +1,2 @@
|
|
||||||
+# arches that ocaml runs on
|
|
||||||
+%ocaml_arches alpha %{arm} %{ix86} ia64 x86_64 ppc sparc sparcv9 ppc64
|
|
||||||
diff -uNr redhat-rpm-config-9.1.0-orig/macros.gnat-srpm redhat-rpm-config-9.1.0/macros.gnat-srpm
|
|
||||||
--- redhat-rpm-config-9.1.0-orig/macros.gnat-srpm 1970-01-01 01:00:00.000000000 +0100
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros.gnat-srpm 2012-01-05 17:04:35.000000000 +0100
|
|
||||||
@@ -0,0 +1,4 @@
|
|
||||||
+# GNAT_arches lists the architectures where GNAT is available in Fedora. Ada
|
|
||||||
+# packages won't build on other architectures until GNAT is bootstrapped for
|
|
||||||
+# them.
|
|
||||||
+%GNAT_arches %{ix86} x86_64 ia64 ppc ppc64 alpha
|
|
||||||
diff -uNr redhat-rpm-config-9.1.0-orig/Makefile redhat-rpm-config-9.1.0/Makefile
|
|
||||||
--- redhat-rpm-config-9.1.0-orig/Makefile 2010-02-02 03:24:04.000000000 -0600
|
|
||||||
+++ redhat-rpm-config-9.1.0/Makefile 2011-05-27 10:43:34.898205307 -0500
|
|
||||||
@@ -11,7 +11,10 @@
|
|
||||||
install:
|
|
||||||
mkdir -p $(DESTDIR)/usr/lib/rpm/redhat
|
|
||||||
cp -pr * $(DESTDIR)/usr/lib/rpm/redhat/
|
|
||||||
+ mkdir -p $(DESTDIR)/etc/rpm
|
|
||||||
+ cp -pr macros.* $(DESTDIR)/etc/rpm/
|
|
||||||
rm -f $(DESTDIR)/usr/lib/rpm/redhat/Makefile
|
|
||||||
+ rm -f $(DESTDIR)/usr/lib/rpm/redhat/macros.*
|
|
||||||
|
|
||||||
tag-archive:
|
|
||||||
@git tag -a $(CVSTAG) -m "$(NAME)-$(VERSION) release"
|
|
@ -1,28 +0,0 @@
|
|||||||
diff -urNp redhat-rpm-config-9.1.0_orig/rpmrc redhat-rpm-config-9.1.0/rpmrc
|
|
||||||
--- redhat-rpm-config-9.1.0_orig/rpmrc 2010-02-02 04:24:04.000000000 -0500
|
|
||||||
+++ redhat-rpm-config-9.1.0/rpmrc 2011-07-02 04:29:11.921575635 -0400
|
|
||||||
@@ -46,10 +46,12 @@ optflags: armv3l %{__global_cflags} -fsi
|
|
||||||
optflags: armv4b %{__global_cflags} -fsigned-char -march=armv4
|
|
||||||
optflags: armv4l %{__global_cflags} -fsigned-char -march=armv4
|
|
||||||
optflags: armv4tl %{__global_cflags} -march=armv4t
|
|
||||||
-optflags: armv5tel %{__global_cflags} -march=armv5te
|
|
||||||
-optflags: armv5tejl %{__global_cflags} -march=armv5te
|
|
||||||
-optflags: armv6l %{__global_cflags} -march=armv6
|
|
||||||
-optflags: armv7l %{__global_cflags} -march=armv7
|
|
||||||
+optflags: armv5tel %{__global_cflags} -march=armv5te -mfloat-abi=soft
|
|
||||||
+optflags: armv5tejl %{__global_cflags} -march=armv5te -mfloat-abi=soft
|
|
||||||
+optflags: armv6l %{__global_cflags} -march=armv6 -mfloat-abi=soft
|
|
||||||
+optflags: armv7l %{__global_cflags} -march=armv7-a -mfloat-abi=soft
|
|
||||||
+optflags: armv7hl %{__global_cflags} -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard
|
|
||||||
+optflags: armv7hnl %{__global_cflags} -march=armv7-a -mfpu=neon -mfloat-abi=hard
|
|
||||||
|
|
||||||
optflags: atarist %{__global_cflags}
|
|
||||||
optflags: atariste %{__global_cflags}
|
|
||||||
@@ -76,5 +78,7 @@ buildarchtranslate: sparcv9v: sparcv9
|
|
||||||
|
|
||||||
buildarchtranslate: armv5tejl: armv5tel
|
|
||||||
buildarchtranslate: armv6l: armv5tel
|
|
||||||
buildarchtranslate: armv7l: armv5tel
|
|
||||||
+buildarchtranslate: armv7hl: armv7hl
|
|
||||||
+buildarchtranslate: armv7hnl: armv7hl
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
|||||||
diff -up redhat-rpm-config-9.1.0/macros.configfoo redhat-rpm-config-9.1.0/macros
|
|
||||||
--- redhat-rpm-config-9.1.0/macros.configfoo 2013-04-22 13:42:25.984613491 +0300
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros 2013-04-22 13:43:27.053420367 +0300
|
|
||||||
@@ -33,6 +33,9 @@
|
|
||||||
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
|
||||||
FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
|
|
||||||
LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS; \
|
|
||||||
+ for i in $(find . -name config.guess -o -name config.sub) ; do \
|
|
||||||
+ [ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \
|
|
||||||
+ done ; \
|
|
||||||
%{_configure} --build=%{_build} --host=%{_host} \\\
|
|
||||||
--program-prefix=%{?_program_prefix} \\\
|
|
||||||
--disable-dependency-tracking \\\
|
|
@ -1,42 +0,0 @@
|
|||||||
--- redhat-rpm-config-9.1.0/macros.dwz.jj 2012-06-25 13:08:44.854489913 +0200
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros.dwz 2012-06-25 13:03:55.520112180 +0200
|
|
||||||
@@ -0,0 +1,39 @@
|
|
||||||
+# Macros for reducing debug info size using dwz(1) utility.
|
|
||||||
+
|
|
||||||
+# The two default values below should result in dwz taking at most
|
|
||||||
+# 3GB of RAM or so on 64-bit hosts and 2.5GB on 32-bit hosts
|
|
||||||
+# on the largest *.debug files (in mid 2012 those are
|
|
||||||
+# libreoffice-debuginfo, debuginfos containing
|
|
||||||
+# libxul.so.debug and libwebkitgtk-*.so.*.debug).
|
|
||||||
+# This needs to be tuned based on the amount of available RAM
|
|
||||||
+# on build boxes for each architecture as well as virtual address
|
|
||||||
+# space limitations if dwz is 32-bit program. While it needs less
|
|
||||||
+# memory than 64-bit program because pointers are smaller, it can
|
|
||||||
+# never have more than 4GB-epsilon of RAM and on some architecture
|
|
||||||
+# even less than that (e.g. 2GB).
|
|
||||||
+
|
|
||||||
+# Number of debugging information entries (DIEs) above which
|
|
||||||
+# dwz will stop considering file for multifile optimizations
|
|
||||||
+# and enter a low memory mode, in which it will optimize
|
|
||||||
+# in about half the memory needed otherwise.
|
|
||||||
+%_dwz_low_mem_die_limit 10000000
|
|
||||||
+# Number of DIEs above which dwz will stop processing
|
|
||||||
+# a file altogether.
|
|
||||||
+%_dwz_max_die_limit 50000000
|
|
||||||
+
|
|
||||||
+# On x86_64 increase the higher limit to make libwebkit* optimizable.
|
|
||||||
+# libwebkit* in mid 2012 contains roughly 87mil DIEs, and 64-bit
|
|
||||||
+# dwz is able to optimize it from ~1.1GB to ~410MB using 5.2GB of RAM.
|
|
||||||
+%_dwz_max_die_limit_x86_64 110000000
|
|
||||||
+
|
|
||||||
+# On ARM, build boxes often have only 512MB of RAM and are very slow.
|
|
||||||
+# Lower both the limits.
|
|
||||||
+%_dwz_low_mem_die_limit_armv5tel 4000000
|
|
||||||
+%_dwz_low_mem_die_limit_armv7hl 4000000
|
|
||||||
+%_dwz_max_die_limit_armv5tel 10000000
|
|
||||||
+%_dwz_max_die_limit_armv7hl 10000000
|
|
||||||
+
|
|
||||||
+%_dwz_limit() %{expand:%%{?%{1}_%{_arch}}%%{!?%{1}_%{_arch}:%%%{1}}}
|
|
||||||
+%_find_debuginfo_dwz_opts --run-dwz\\\
|
|
||||||
+ --dwz-low-mem-die-limit %{_dwz_limit _dwz_low_mem_die_limit}\\\
|
|
||||||
+ --dwz-max-die-limit %{_dwz_limit _dwz_max_die_limit}
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up redhat-rpm-config-9.1.0/macros.fcflags redhat-rpm-config-9.1.0/macros
|
|
||||||
--- redhat-rpm-config-9.1.0/macros.fcflags 2013-04-23 07:26:57.202073011 +0300
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros 2013-04-23 07:29:21.401036883 +0300
|
|
||||||
@@ -32,6 +32,7 @@
|
|
||||||
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
|
|
||||||
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
|
||||||
FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
|
|
||||||
+ FCFLAGS="${FCFLAGS:-%optflags -I%_fmoddir}" ; export FCFLAGS ; \
|
|
||||||
LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS; \
|
|
||||||
for i in $(find . -name config.guess -o -name config.sub) ; do \
|
|
||||||
[ -f /usr/lib/rpm/redhat/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/redhat/$(basename $i) $i ; \
|
|
@ -1,13 +0,0 @@
|
|||||||
Index: redhat-rpm-config-9.1.0/macros
|
|
||||||
===================================================================
|
|
||||||
--- redhat-rpm-config-9.1.0.orig/macros
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros
|
|
||||||
@@ -262,7 +262,7 @@ kernel_module_package_release 1
|
|
||||||
# actually set up the filtering bits
|
|
||||||
%filter_setup %{expand: \
|
|
||||||
%global _use_internal_dependency_generator 0 \
|
|
||||||
-%global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u \
|
|
||||||
+%global __deploop() while read FILE; do echo "${FILE}" | /usr/lib/rpm/rpmdeps -%{1}; done | /bin/sort -u \
|
|
||||||
%global __find_provides /bin/sh -c "%{?__filter_prov_cmd} %{__deploop P} %{?__filter_from_prov}" \
|
|
||||||
%global __find_requires /bin/sh -c "%{?__filter_req_cmd} %{__deploop R} %{?__filter_from_req}" \
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
commit 635437c7bfe6053dcfe112705b809bb78aba1a73
|
|
||||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
|
||||||
Date: Mon Feb 15 13:42:36 2010 +0200
|
|
||||||
|
|
||||||
Unbreak find-requires (#443015, #564527)
|
|
||||||
- regression originating from commit 9ed9b4e3459e3125befd324f579f751a239c26ca
|
|
||||||
which was supposed to fix something for on ARM but broke pretty much
|
|
||||||
all else
|
|
||||||
- this should've been in 9.1.0 but somehow gone missing, ugh...
|
|
||||||
- fix originally from Bill Nottingham
|
|
||||||
|
|
||||||
diff --git a/find-requires b/find-requires
|
|
||||||
index fa5ab95..eb3ee54 100755
|
|
||||||
--- a/find-requires
|
|
||||||
+++ b/find-requires
|
|
||||||
@@ -106,6 +106,7 @@ for f in $liblist $exelist ; do
|
|
||||||
print $2 ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ (START==2) && /^[A-Za-z]/ { START=3; }
|
|
||||||
/^Version References:$/ { START=2; }
|
|
||||||
(START==2) && /required from/ {
|
|
||||||
sub(/:/, "", $3);
|
|
||||||
@@ -114,7 +115,6 @@ for f in $liblist $exelist ; do
|
|
||||||
(START==2) && (LIBNAME!="") && ($4!="") {
|
|
||||||
print LIBNAME "(" $4 ")'$lib64'";
|
|
||||||
}
|
|
||||||
- /^[A-Za-z]/ { START=3; }
|
|
||||||
'
|
|
||||||
done | sort -u
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
diff -up redhat-rpm-config-9.1.0/macros.jx redhat-rpm-config-9.1.0/macros
|
|
||||||
--- redhat-rpm-config-9.1.0/macros.jx 2011-08-03 15:42:20.267064981 -0400
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros 2011-08-03 15:44:46.581058603 -0400
|
|
||||||
@@ -184,8 +184,15 @@ unset DISPLAY\
|
|
||||||
%__find_provides /usr/lib/rpm/redhat/find-provides
|
|
||||||
%__find_requires /usr/lib/rpm/redhat/find-requires
|
|
||||||
|
|
||||||
-%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
|
|
||||||
-%__global_ldflags -Wl,-z,relro
|
|
||||||
+%_hardening_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
|
|
||||||
+%_hardening_ldflags -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
|
|
||||||
+
|
|
||||||
+#_hardened_build 0
|
|
||||||
+%_hardened_cflags %{?_hardened_build:%{_hardening_cflags}}
|
|
||||||
+%_hardened_ldflags %{?_hardened_build:%{_hardening_ldflags}}
|
|
||||||
+
|
|
||||||
+%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 %{_hardened_cflags}
|
|
||||||
+%__global_ldflags -Wl,-z,relro %{_hardened_ldflags}
|
|
||||||
|
|
||||||
# Use these macros to differentiate between RH and other KMP implementation(s).
|
|
||||||
redhat_kernel_module_package 1
|
|
@ -1,16 +0,0 @@
|
|||||||
Index: redhat-rpm-config-9.1.0/brp-java-repack-jars
|
|
||||||
===================================================================
|
|
||||||
--- redhat-rpm-config-9.1.0.orig/brp-java-repack-jars
|
|
||||||
+++ redhat-rpm-config-9.1.0/brp-java-repack-jars
|
|
||||||
@@ -79,7 +79,10 @@ if [ ! -z "$JARS" ]; then
|
|
||||||
pushd $JARDIR > /dev/null
|
|
||||||
|
|
||||||
if [ -n "`find -not -name '.'`" ]; then
|
|
||||||
- find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -q -X -9 $j -@
|
|
||||||
+ if [ -e META-INF/MANIFEST.MF ]; then
|
|
||||||
+ /usr/bin/zip -q -X -9 $j META-INF/MANIFEST.MF
|
|
||||||
+ fi
|
|
||||||
+ find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -u -q -X -9 $j -@
|
|
||||||
else
|
|
||||||
# Put the empty jar back
|
|
||||||
touch $j
|
|
@ -1,64 +0,0 @@
|
|||||||
Index: redhat-rpm-config-9.1.0/brp-java-repack-jars
|
|
||||||
===================================================================
|
|
||||||
--- redhat-rpm-config-9.1.0.orig/brp-java-repack-jars
|
|
||||||
+++ redhat-rpm-config-9.1.0/brp-java-repack-jars
|
|
||||||
@@ -25,17 +25,19 @@ if [ ! -z "$JARS" ]; then
|
|
||||||
|
|
||||||
# unpack every jar, set the date of the files and directories and
|
|
||||||
# repack the jar
|
|
||||||
+ OLD_IFS="$IFS"
|
|
||||||
+ IFS=$(printf '\n\t')
|
|
||||||
for j in $JARS ; do
|
|
||||||
- JARNAME=`basename $j`
|
|
||||||
- JTMPDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp $JARNAME.tmpdir.XXXXXXXXXX` || exit 1
|
|
||||||
- JARDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp $JARNAME.jardir.XXXXXXXXXX` || exit 1
|
|
||||||
- TIMEREF=`mktemp -p $RPM_BUILD_ROOT/tmp $JARNAME.timeref.XXXXXXXXXX` || exit 1
|
|
||||||
+ JARNAME=`basename "$j"`
|
|
||||||
+ JTMPDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp "$JARNAME.tmpdir.XXXXXXXXXX"` || exit 1
|
|
||||||
+ JARDIR=`mktemp -d -p $RPM_BUILD_ROOT/tmp "$JARNAME.jardir.XXXXXXXXXX"` || exit 1
|
|
||||||
+ TIMEREF=`mktemp -p $RPM_BUILD_ROOT/tmp "$JARNAME.timeref.XXXXXXXXXX"` || exit 1
|
|
||||||
|
|
||||||
- pushd $JTMPDIR > /dev/null
|
|
||||||
- /usr/bin/unzip -qq -o $j
|
|
||||||
+ pushd "$JTMPDIR" > /dev/null
|
|
||||||
+ /usr/bin/unzip -qq -o "$j"
|
|
||||||
find -type d -exec chmod a+rx {} \;
|
|
||||||
find -type f -exec chmod a+r {} \;
|
|
||||||
- rm -f $j
|
|
||||||
+ rm -f "$j"
|
|
||||||
|
|
||||||
# Create the directories first.
|
|
||||||
find -type d | LC_ALL=C sort | while read d; do
|
|
||||||
@@ -76,24 +78,25 @@ if [ ! -z "$JARS" ]; then
|
|
||||||
done
|
|
||||||
|
|
||||||
# make the jar
|
|
||||||
- pushd $JARDIR > /dev/null
|
|
||||||
+ pushd "$JARDIR" > /dev/null
|
|
||||||
|
|
||||||
if [ -n "`find -not -name '.'`" ]; then
|
|
||||||
if [ -e META-INF/MANIFEST.MF ]; then
|
|
||||||
- /usr/bin/zip -q -X -9 $j META-INF/MANIFEST.MF
|
|
||||||
+ /usr/bin/zip -q -X -9 "$j" META-INF/MANIFEST.MF
|
|
||||||
fi
|
|
||||||
- find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -u -q -X -9 $j -@
|
|
||||||
+ find * -not -name '.' | LC_ALL=C sort | /usr/bin/zip -u -q -X -9 "$j" -@
|
|
||||||
else
|
|
||||||
# Put the empty jar back
|
|
||||||
- touch $j
|
|
||||||
+ touch "$j"
|
|
||||||
fi
|
|
||||||
popd > /dev/null
|
|
||||||
|
|
||||||
# Cleanup.
|
|
||||||
- rm -rf $JTMPDIR
|
|
||||||
- rm -rf $JARDIR
|
|
||||||
- rm -f $TIMEREF
|
|
||||||
+ rm -rf "$JTMPDIR"
|
|
||||||
+ rm -rf "$JARDIR"
|
|
||||||
+ rm -f "$TIMEREF"
|
|
||||||
done
|
|
||||||
+ IFS="$OLD_IFS"
|
|
||||||
|
|
||||||
# remove $RPM_BUILD_ROOT/tmp if we created it
|
|
||||||
if [ $rmtmp -eq 1 ]; then
|
|
@ -1,13 +0,0 @@
|
|||||||
Index: redhat-rpm-config-9.1.0/macros
|
|
||||||
===================================================================
|
|
||||||
--- redhat-rpm-config-9.1.0.orig/macros
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros
|
|
||||||
@@ -239,7 +239,7 @@ kernel_module_package_release 1
|
|
||||||
done \
|
|
||||||
fi \
|
|
||||||
echo "%%global flavors_to_build ${flavors_to_build:-%%nil}" \
|
|
||||||
- echo "%%global kernel_source() /usr/src/kernels/%kverrel-\\\$([ %%%%{1} = default ] || echo "%%%%{1}-")%_target_cpu" \
|
|
||||||
+ echo "%%global kernel_source() /usr/src/kernels/%kverrel-\\\$([ %%%%{1} = default ] || echo "%%%%{1}.")%_target_cpu" \
|
|
||||||
if [ ! -z "%{-f*}" ] \
|
|
||||||
then \
|
|
||||||
filelist="%{-f*}" \
|
|
@ -1,10 +0,0 @@
|
|||||||
--- redhat-rpm-config-9.1.0/macros 2012-06-11 11:48:58.144578684 +0200
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros.minidebug 2012-06-11 11:49:18.444255286 +0200
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
%_fmoddir %{_libdir}/gfortran/modules
|
|
||||||
|
|
||||||
%_enable_debug_packages 1
|
|
||||||
+%_include_minidebuginfo 1
|
|
||||||
|
|
||||||
#==============================================================================
|
|
||||||
# ---- configure and makeinstall.
|
|
@ -1,19 +0,0 @@
|
|||||||
diff -up redhat-rpm-config-9.1.0/macros.ncpus redhat-rpm-config-9.1.0/macros
|
|
||||||
--- redhat-rpm-config-9.1.0/macros.ncpus 2013-06-27 09:54:38.663039820 +0300
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros 2013-06-27 09:54:50.746135882 +0300
|
|
||||||
@@ -71,10 +71,13 @@
|
|
||||||
infodir=%{?buildroot:%{buildroot}}%{_infodir} \\\
|
|
||||||
install
|
|
||||||
|
|
||||||
+# Maximum number of CPU's to use when building, 0 for unlimited.
|
|
||||||
+%_smp_ncpus_max 16
|
|
||||||
%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
|
|
||||||
&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
|
|
||||||
- if [ "$RPM_BUILD_NCPUS" -gt 16 ]; then echo "-j16"; \\\
|
|
||||||
- elif [ "$RPM_BUILD_NCPUS" -gt 1 ]; then echo "-j$RPM_BUILD_NCPUS"; fi)
|
|
||||||
+ ncpus_max=%{?_smp_ncpus_max}; \\\
|
|
||||||
+ if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \\\
|
|
||||||
+ if [ "$RPM_BUILD_NCPUS" -gt 1 ]; then echo "-j$RPM_BUILD_NCPUS"; fi)
|
|
||||||
|
|
||||||
#==============================================================================
|
|
||||||
# ---- Build policy macros.
|
|
@ -1,27 +0,0 @@
|
|||||||
commit 055d0b77e1e2823daef60a4c2b201531dc0c7248
|
|
||||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
|
||||||
Date: Mon Mar 1 10:58:17 2010 +0200
|
|
||||||
|
|
||||||
Don't run brp-strip-comment-note when find-debuginfo.sh is run (#568924)
|
|
||||||
- brp-strip-comment-note is not only unnecessary here but is also
|
|
||||||
now messing up things by resetting EI_OSABI to zero (#568921)
|
|
||||||
- patch from Roland McGrath
|
|
||||||
|
|
||||||
diff --git a/macros b/macros
|
|
||||||
index 7721fe0..1ac46d7 100644
|
|
||||||
--- a/macros
|
|
||||||
+++ b/macros
|
|
||||||
@@ -92,9 +92,11 @@
|
|
||||||
|
|
||||||
%__os_install_post \
|
|
||||||
/usr/lib/rpm/redhat/brp-compress \
|
|
||||||
- %{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \
|
|
||||||
- /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
|
|
||||||
+ %{!?__debug_package:\
|
|
||||||
+ /usr/lib/rpm/redhat/brp-strip %{__strip} \
|
|
||||||
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
|
|
||||||
+ } \
|
|
||||||
+ /usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
|
|
||||||
/usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} \
|
|
||||||
/usr/lib/rpm/redhat/brp-python-hardlink \
|
|
||||||
%{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars} \
|
|
@ -1,11 +0,0 @@
|
|||||||
--- redhat-rpm-config-9.1.0/find-requires.pkgconfig 2010-05-26 19:38:28.892598734 -0400
|
|
||||||
+++ redhat-rpm-config-9.1.0/find-requires.pkgconfig.new-pkgconfig 2010-05-26 19:39:40.174602325 -0400
|
|
||||||
@@ -4,7 +4,7 @@ test -x $pkgconfig || exit 0
|
|
||||||
while read filename ; do
|
|
||||||
case "${filename}" in
|
|
||||||
*.pc)
|
|
||||||
- $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do
|
|
||||||
+ $pkgconfig --print-requires --print-requires-private "$filename" 2> /dev/null | while read n r v ; do
|
|
||||||
echo "pkgconfig($n)" "$r" "$v"
|
|
||||||
done
|
|
||||||
esac
|
|
@ -1,10 +0,0 @@
|
|||||||
--- redhat-rpm-config-9.1.0/macros~ 2013-08-20 18:45:12.764205916 +0900
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros 2013-08-20 18:46:45.657293197 +0900
|
|
||||||
@@ -18,6 +18,7 @@
|
|
||||||
%_mandir %{_prefix}/share/man
|
|
||||||
|
|
||||||
%_defaultdocdir %{_prefix}/share/doc
|
|
||||||
+%_pkgdocdir %{_docdir}/%{name}-%{version}
|
|
||||||
|
|
||||||
%_fmoddir %{_libdir}/gfortran/modules
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
--- redhat-rpm-config-9.1.0-orig/rpmrc 2012-01-15 12:17:17.320694234 -0600
|
|
||||||
+++ redhat-rpm-config-9.1.0/rpmrc 2012-01-15 12:19:36.883275451 -0600
|
|
||||||
@@ -27,9 +27,9 @@
|
|
||||||
optflags: ppc %{__global_cflags} -m32
|
|
||||||
optflags: ppciseries %{__global_cflags} -m32
|
|
||||||
optflags: ppcpseries %{__global_cflags} -m32
|
|
||||||
-optflags: ppc64 %{__global_cflags} -m64 -mminimal-toc
|
|
||||||
-optflags: ppc64iseries %{__global_cflags} -m64 -mminimal-toc
|
|
||||||
-optflags: ppc64pseries %{__global_cflags} -m64 -mminimal-toc
|
|
||||||
+optflags: ppc64 %{__global_cflags} -m64
|
|
||||||
+optflags: ppc64iseries %{__global_cflags} -m64
|
|
||||||
+optflags: ppc64pseries %{__global_cflags} -m64
|
|
||||||
optflags: ppc8260 %{__global_cflags} -m32
|
|
||||||
optflags: ppc8560 %{__global_cflags} -m32
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
diff --git a/brp-python-hardlink b/brp-python-hardlink
|
|
||||||
index a937529..210d69c 100755
|
|
||||||
--- a/brp-python-hardlink
|
|
||||||
+++ b/brp-python-hardlink
|
|
||||||
@@ -10,8 +10,8 @@ fi
|
|
||||||
find "$RPM_BUILD_ROOT" -type f -name "*.pyc" | while read pyc ; do
|
|
||||||
pyo="$(echo $pyc | sed -e 's/.pyc$/.pyo/')"
|
|
||||||
if [ -f "$pyo" ] ; then
|
|
||||||
- csha="$(sha1sum -b $pyc | cut -d' ' -f 1)" && \
|
|
||||||
- osha="$(sha1sum -b $pyo | cut -d' ' -f 1)" && \
|
|
||||||
+ csha="$(sha1sum -b "$pyc" | cut -d' ' -f 1)" && \
|
|
||||||
+ osha="$(sha1sum -b "$pyo" | cut -d' ' -f 1)" && \
|
|
||||||
if [ "$csha" = "$osha" ] ; then
|
|
||||||
ln -f "$pyc" "$pyo"
|
|
||||||
fi
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up redhat-rpm-config-9.1.0/macros.record-switches redhat-rpm-config-9.1.0/macros
|
|
||||||
--- redhat-rpm-config-9.1.0/macros.record-switches 2013-04-22 13:17:29.319358036 +0300
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros 2013-04-22 13:17:44.665308442 +0300
|
|
||||||
@@ -171,7 +171,7 @@ package or when debugging this package.\
|
|
||||||
%_hardened_cflags %{?_hardened_build:%{_hardening_cflags}}
|
|
||||||
%_hardened_ldflags %{?_hardened_build:%{_hardening_ldflags}}
|
|
||||||
|
|
||||||
-%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 %{_hardened_cflags}
|
|
||||||
+%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches %{_hardened_cflags}
|
|
||||||
%__global_ldflags -Wl,-z,relro %{_hardened_ldflags}
|
|
||||||
|
|
||||||
# Use these macros to differentiate between RH and other KMP implementation(s).
|
|
@ -1,19 +0,0 @@
|
|||||||
diff -up redhat-rpm-config-9.1.0/macros.jx redhat-rpm-config-9.1.0/macros
|
|
||||||
--- redhat-rpm-config-9.1.0/macros.jx 2011-07-07 13:10:18.000000000 -0400
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros 2011-07-07 13:12:00.299594529 -0400
|
|
||||||
@@ -31,6 +31,7 @@
|
|
||||||
CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \
|
|
||||||
CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ; \
|
|
||||||
FFLAGS="${FFLAGS:-%optflags -I%_fmoddir}" ; export FFLAGS ; \
|
|
||||||
+ LDFLAGS="${LDFLAGS:-%__global_ldflags}"; export LDFLAGS; \
|
|
||||||
%{_configure} --build=%{_build} --host=%{_host} \\\
|
|
||||||
--program-prefix=%{?_program_prefix} \\\
|
|
||||||
--disable-dependency-tracking \\\
|
|
||||||
@@ -184,6 +185,7 @@ unset DISPLAY\
|
|
||||||
%__find_requires /usr/lib/rpm/redhat/find-requires
|
|
||||||
|
|
||||||
%__global_cflags -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4
|
|
||||||
+%__global_ldflags -Wl,-z,relro
|
|
||||||
|
|
||||||
# Use these macros to differentiate between RH and other KMP implementation(s).
|
|
||||||
redhat_kernel_module_package 1
|
|
@ -1,36 +0,0 @@
|
|||||||
commit 7cf1ad2dbb5af9b9012ba67b9687ad28c02578d6
|
|
||||||
Author: Panu Matilainen <pmatilai@redhat.com>
|
|
||||||
Date: Wed Feb 3 12:52:30 2010 +0200
|
|
||||||
|
|
||||||
Enable strict python bytecompile mode (if rpm supports it)
|
|
||||||
- with %_python_bytecompile_errors_terminate_build set to non-zero,
|
|
||||||
byte-compilation errors will abort the build, this helps catch out
|
|
||||||
silly "improt foo" syntax errors early on
|
|
||||||
- not all .py files are valid python (they can be templates, inteded for
|
|
||||||
jython consumption etc), and what's valid can depend on the python
|
|
||||||
version (notably 2.x vs 3.x) so allow overriding from spec
|
|
||||||
|
|
||||||
diff --git a/macros b/macros
|
|
||||||
index 77844f0..7721fe0 100644
|
|
||||||
--- a/macros
|
|
||||||
+++ b/macros
|
|
||||||
@@ -95,7 +95,7 @@
|
|
||||||
%{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}} \
|
|
||||||
/usr/lib/rpm/redhat/brp-strip-static-archive %{__strip} \
|
|
||||||
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump} \
|
|
||||||
- /usr/lib/rpm/brp-python-bytecompile %{__python} \
|
|
||||||
+ /usr/lib/rpm/brp-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} \
|
|
||||||
/usr/lib/rpm/redhat/brp-python-hardlink \
|
|
||||||
%{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars} \
|
|
||||||
%{nil}
|
|
||||||
@@ -167,6 +167,10 @@ unset DISPLAY\
|
|
||||||
# Should unpackaged files in a build root terminate a build?
|
|
||||||
%_unpackaged_files_terminate_build 1
|
|
||||||
|
|
||||||
+#
|
|
||||||
+## Should python bytecompilation errors terminate a build?
|
|
||||||
+%_python_bytecompile_errors_terminate_build 1
|
|
||||||
+
|
|
||||||
# Use SHA-256 for FILEDIGESTS instead of default MD5
|
|
||||||
%_source_filedigest_algorithm 8
|
|
||||||
%_binary_filedigest_algorithm 8
|
|
@ -1,18 +0,0 @@
|
|||||||
Index: redhat-rpm-config-9.1.0/macros
|
|
||||||
===================================================================
|
|
||||||
--- redhat-rpm-config-9.1.0.orig/macros
|
|
||||||
+++ redhat-rpm-config-9.1.0/macros
|
|
||||||
@@ -14,10 +14,10 @@
|
|
||||||
%_prefix /usr
|
|
||||||
%_sysconfdir /etc
|
|
||||||
%_localstatedir /var
|
|
||||||
-%_infodir /usr/share/info
|
|
||||||
-%_mandir /usr/share/man
|
|
||||||
+%_infodir %{_prefix}/share/info
|
|
||||||
+%_mandir %{_prefix}/share/man
|
|
||||||
|
|
||||||
-%_defaultdocdir %{_usr}/share/doc
|
|
||||||
+%_defaultdocdir %{_prefix}/share/doc
|
|
||||||
|
|
||||||
%_fmoddir %{_libdir}/gfortran/modules
|
|
||||||
|
|
@ -1,123 +1,736 @@
|
|||||||
|
# TO WHOM IT MAY CONCERN
|
||||||
|
#
|
||||||
|
# 1) Don't add patches, dist-git is the upstream repository for this package.
|
||||||
|
# 2) When making changes, update version by +1, leave release alone.
|
||||||
|
#
|
||||||
|
|
||||||
Summary: Red Hat specific rpm configuration files
|
Summary: Red Hat specific rpm configuration files
|
||||||
Name: redhat-rpm-config
|
Name: redhat-rpm-config
|
||||||
Version: 9.1.0
|
Version: 153
|
||||||
Release: 46.1%{?dist}
|
Release: 1%{?dist}
|
||||||
# No version specified.
|
# No version specified.
|
||||||
License: GPL+
|
License: GPL+
|
||||||
Group: Development/System
|
URL: https://src.fedoraproject.org/rpms/redhat-rpm-config
|
||||||
URL: http://git.fedorahosted.org/git/redhat-rpm-config
|
|
||||||
Source: redhat-rpm-config-%{version}.tar.bz2
|
# Core rpm settings
|
||||||
|
Source0: macros
|
||||||
|
Source1: rpmrc
|
||||||
|
|
||||||
# gcc specs files for hardened builds
|
# gcc specs files for hardened builds
|
||||||
Source1: redhat-hardened-cc1
|
Source50: redhat-hardened-cc1
|
||||||
Source2: redhat-hardened-ld
|
Source51: redhat-hardened-ld
|
||||||
|
|
||||||
# up-to-date copies of config.guess and config.sub (from automake 1.13.1)
|
# gcc specs files for annobin builds
|
||||||
Source10: config.guess
|
Source52: redhat-annobin-cc1
|
||||||
Source11: config.sub
|
|
||||||
|
|
||||||
Patch0: redhat-rpm-config-9.1.0-strict-python-bytecompile.patch
|
# The macros defined by these files are for things that need to be defined
|
||||||
Patch1: redhat-rpm-config-9.1.0-fix-requires.patch
|
# at srpm creation time when it is not feasible to require the base packages
|
||||||
Patch2: redhat-rpm-config-9.1.0-no-strip-note.patch
|
|
||||||
Patch3: redhat-rpm-config-9.1.0-pkgconfig-private.patch
|
|
||||||
# the macros defined by this patch are for things that need to be defined
|
|
||||||
# at srpm creation time when it is not feasable to require the base packages
|
|
||||||
# that would otherwise be providing the macros. other language/arch specific
|
# that would otherwise be providing the macros. other language/arch specific
|
||||||
# macros should not be defined here but instead in the base packages that can
|
# macros should not be defined here but instead in the base packages that can
|
||||||
# be pulled in at rpm build time, this is specific for srpm creation.
|
# be pulled in at rpm build time, this is specific for srpm creation.
|
||||||
Patch4: redhat-rpm-config-9.1.0-arches-macros.patch
|
Source100: macros.fedora-misc-srpm
|
||||||
Patch5: redhat-rpm-config-9.1.0-arm.patch
|
Source102: macros.mono-srpm
|
||||||
Patch6: redhat-rpm-config-9.1.0-relro.patch
|
Source103: macros.nodejs-srpm
|
||||||
Patch7: redhat-rpm-config-9.1.0-hardened.patch
|
Source104: macros.ldc-srpm
|
||||||
Patch8: redhat-rpm-config-9.1.0-ppc-no-minimal-toc.patch
|
Source105: macros.valgrind-srpm
|
||||||
Patch9: redhat-rpm-config-9.1.0-dwz.patch
|
|
||||||
Patch10: redhat-rpm-config-9.1.0-minidebuginfo.patch
|
# Other misc macros
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=783433
|
Source150: macros.dwz
|
||||||
Patch11: redhat-rpm-config-9.1.0-python-hardlink-spaces-in-filenames.patch
|
Source151: macros.kmp
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=853216
|
Source152: macros.vpath
|
||||||
Patch12:redhat-rpm-config-9.1.0-use-prefix-macro.patch
|
Source153: macros.forge
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=648996
|
Source154: macros.ldconfig
|
||||||
Patch13: redhat-rpm-config-9.1.0-kernel-source.patch
|
Source155: macros.fedora-misc
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=465664
|
|
||||||
Patch14: redhat-rpm-config-9.1.0-java-repack-order.patch
|
# Build policy scripts
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=741089
|
# this comes from https://github.com/rpm-software-management/rpm/pull/344
|
||||||
Patch15: 0001-Drop-un-setting-LANG-and-DISPLAY-in-various-build-st.patch
|
# added a python -> python2 conversion for fedora with warning
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=783932
|
# and an echo when the mangling happens
|
||||||
Patch16: redhat-rpm-config-9.1.0-filtering-spaces-in-filename.patch
|
Source201: brp-mangle-shebangs
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=872737
|
|
||||||
Patch17: redhat-rpm-config-9.1.0-java-repack-spaces-in-filenames.patch
|
# this comes from rpm itself
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=951669
|
# however, now we can do Fedora changes within
|
||||||
Patch18: redhat-rpm-config-9.1.0-record-switches.patch
|
Source202: brp-python-bytecompile
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=951442
|
|
||||||
Patch19: redhat-rpm-config-9.1.0-configfoo.patch
|
# Dependency generator scripts (deprecated)
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=909788
|
Source300: find-provides
|
||||||
Patch20: redhat-rpm-config-9.1.0-aarch64.patch
|
Source301: find-provides.ksyms
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=914831
|
Source304: find-requires
|
||||||
Patch21: redhat-rpm-config-9.1.0-fcflags.patch
|
Source305: find-requires.ksyms
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=669638
|
Source308: firmware.prov
|
||||||
Patch22: redhat-rpm-config-9.1.0-ncpus-max.patch
|
Source309: modalias.prov
|
||||||
# backport _pkgdocdir macro from F20
|
|
||||||
Patch23: redhat-rpm-config-9.1.0-pkgdocdir.patch
|
# Misc helper scripts
|
||||||
|
Source400: dist.sh
|
||||||
|
Source401: rpmsort
|
||||||
|
Source402: symset-table
|
||||||
|
Source403: kmodtool
|
||||||
|
Source404: gpgverify
|
||||||
|
|
||||||
|
# 2016-10-02 snapshots from http://git.savannah.gnu.org/gitweb/?p=config.git
|
||||||
|
Source500: config.guess
|
||||||
|
Source501: config.sub
|
||||||
|
|
||||||
|
# Dependency generators & their rules
|
||||||
|
Source600: kmod.attr
|
||||||
|
Source601: kmod.prov
|
||||||
|
Source602: libsymlink.attr
|
||||||
|
|
||||||
|
# BRPs
|
||||||
|
Source700: brp-ldconfig
|
||||||
|
Source701: brp-strip-lto
|
||||||
|
|
||||||
|
# Convenience lua functions
|
||||||
|
Source800: common.lua
|
||||||
|
Source801: forge.lua
|
||||||
|
|
||||||
|
# Documentation
|
||||||
|
Source900: buildflags.md
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
BuildRequires: perl-generators
|
||||||
Requires: coreutils
|
Requires: coreutils
|
||||||
|
|
||||||
|
Requires: efi-srpm-macros
|
||||||
|
Requires: fonts-srpm-macros
|
||||||
|
Requires: fpc-srpm-macros
|
||||||
|
Requires: ghc-srpm-macros
|
||||||
|
Requires: gnat-srpm-macros
|
||||||
|
Requires: go-srpm-macros
|
||||||
|
Requires: nim-srpm-macros
|
||||||
|
Requires: ocaml-srpm-macros
|
||||||
|
Requires: openblas-srpm-macros
|
||||||
Requires: perl-srpm-macros
|
Requires: perl-srpm-macros
|
||||||
Requires: rpm >= 4.8.0
|
# ↓ Provides compileall2 Python module
|
||||||
|
Requires: python-srpm-macros >= 3-46
|
||||||
|
Requires: rust-srpm-macros
|
||||||
|
Requires: qt5-srpm-macros
|
||||||
|
|
||||||
|
Requires: rpm >= 4.11.0
|
||||||
Requires: dwz >= 0.4
|
Requires: dwz >= 0.4
|
||||||
Requires: zip
|
Requires: zip
|
||||||
|
Requires: (annobin if gcc)
|
||||||
|
|
||||||
|
# for brp-mangle-shebangs
|
||||||
|
Requires: %{_bindir}/find
|
||||||
|
Requires: %{_bindir}/file
|
||||||
|
Requires: %{_bindir}/grep
|
||||||
|
Requires: %{_bindir}/sed
|
||||||
|
Requires: %{_bindir}/xargs
|
||||||
|
|
||||||
|
# -fstack-clash-protection and -fcf-protection require GCC 8.
|
||||||
|
Conflicts: gcc < 8.0.1-0.22
|
||||||
|
|
||||||
Provides: system-rpm-config = %{version}-%{release}
|
Provides: system-rpm-config = %{version}-%{release}
|
||||||
|
|
||||||
|
%global rrcdir /usr/lib/rpm/redhat
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Red Hat specific rpm configuration files.
|
Red Hat specific rpm configuration files.
|
||||||
|
|
||||||
%prep
|
%package -n kernel-rpm-macros
|
||||||
%setup -q
|
Summary: Macros and scripts for building kernel module packages
|
||||||
%patch0 -p1
|
Requires: redhat-rpm-config >= 13
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
%patch6 -p1
|
|
||||||
%patch7 -p1
|
|
||||||
%patch8 -p1
|
|
||||||
%patch9 -p1
|
|
||||||
%patch10 -p1
|
|
||||||
%patch11 -p1
|
|
||||||
%patch12 -p1
|
|
||||||
%patch13 -p1
|
|
||||||
%patch14 -p1
|
|
||||||
%patch15 -p1
|
|
||||||
%patch16 -p1
|
|
||||||
%patch17 -p1
|
|
||||||
%patch18 -p1
|
|
||||||
%patch19 -p1
|
|
||||||
%patch20 -p1
|
|
||||||
%patch21 -p1
|
|
||||||
%patch22 -p1
|
|
||||||
%patch23 -p1
|
|
||||||
|
|
||||||
%build
|
%description -n kernel-rpm-macros
|
||||||
|
Macros and scripts for building kernel module packages.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
# Not strictly necessary but allows working on file names instead
|
||||||
|
# of source numbers in install section
|
||||||
|
%setup -c -T
|
||||||
|
cp -p %{sources} .
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make DESTDIR=${RPM_BUILD_ROOT} install
|
mkdir -p %{buildroot}%{rrcdir}
|
||||||
install -m 0444 %{SOURCE1} %{SOURCE2} ${RPM_BUILD_ROOT}/usr/lib/rpm/redhat
|
install -p -m 644 -t %{buildroot}%{rrcdir} macros rpmrc
|
||||||
install -m 0775 %{SOURCE10} %{SOURCE11} ${RPM_BUILD_ROOT}/usr/lib/rpm/redhat
|
install -p -m 444 -t %{buildroot}%{rrcdir} redhat-hardened-*
|
||||||
find ${RPM_BUILD_ROOT} -name \*.orig -delete
|
install -p -m 444 -t %{buildroot}%{rrcdir} redhat-annobin-*
|
||||||
# buggy makefile in 9.1.0 leaves changelog in wrong place
|
install -p -m 755 -t %{buildroot}%{rrcdir} config.*
|
||||||
find ${RPM_BUILD_ROOT} -name ChangeLog -delete
|
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-*
|
||||||
|
|
||||||
%clean
|
install -p -m 755 -t %{buildroot}%{rrcdir} find-*
|
||||||
rm -rf ${RPM_BUILD_ROOT}
|
mkdir -p %{buildroot}%{rrcdir}/find-provides.d
|
||||||
|
install -p -m 644 -t %{buildroot}%{rrcdir}/find-provides.d firmware.prov modalias.prov
|
||||||
|
|
||||||
|
install -p -m 755 -t %{buildroot}%{rrcdir} brp-*
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_rpmconfigdir}/macros.d
|
||||||
|
install -p -m 644 -t %{buildroot}%{_rpmconfigdir}/macros.d macros.*
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_fileattrsdir}
|
||||||
|
install -p -m 644 -t %{buildroot}%{_fileattrsdir} *.attr
|
||||||
|
install -p -m 755 -t %{buildroot}%{_rpmconfigdir} kmod.prov
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}%{_rpmluadir}/fedora/{rpm,srpm}
|
||||||
|
install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora common.lua
|
||||||
|
install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%dir %{rrcdir}
|
||||||
%doc ChangeLog
|
%{rrcdir}/macros
|
||||||
%{_prefix}/lib/rpm/redhat
|
%{rrcdir}/rpmrc
|
||||||
%{_sysconfdir}/rpm/*
|
%{rrcdir}/brp-*
|
||||||
|
%{rrcdir}/dist.sh
|
||||||
|
%{rrcdir}/gpgverify
|
||||||
|
%{rrcdir}/redhat-hardened-*
|
||||||
|
%{rrcdir}/redhat-annobin-*
|
||||||
|
%{rrcdir}/config.*
|
||||||
|
%{rrcdir}/find-provides
|
||||||
|
%{rrcdir}/find-requires
|
||||||
|
%{rrcdir}/brp-ldconfig
|
||||||
|
%{_fileattrsdir}/*.attr
|
||||||
|
%{_rpmconfigdir}/kmod.prov
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.*-srpm
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.dwz
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.forge
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.ldconfig
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.vpath
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.fedora-misc
|
||||||
|
%dir %{_rpmluadir}/fedora
|
||||||
|
%dir %{_rpmluadir}/fedora/srpm
|
||||||
|
%dir %{_rpmluadir}/fedora/rpm
|
||||||
|
%{_rpmluadir}/fedora/*.lua
|
||||||
|
%{_rpmluadir}/fedora/srpm/*lua
|
||||||
|
|
||||||
|
%doc buildflags.md
|
||||||
|
|
||||||
|
%files -n kernel-rpm-macros
|
||||||
|
%dir %{rrcdir}/find-provides.d
|
||||||
|
%{rrcdir}/kmodtool
|
||||||
|
%{rrcdir}/rpmsort
|
||||||
|
%{rrcdir}/symset-table
|
||||||
|
%{rrcdir}/find-provides.ksyms
|
||||||
|
%{rrcdir}/find-requires.ksyms
|
||||||
|
%{rrcdir}/find-provides.d/firmware.prov
|
||||||
|
%{rrcdir}/find-provides.d/modalias.prov
|
||||||
|
%{_rpmconfigdir}/macros.d/macros.kmp
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Aug 20 2013 Jens Petersen <petersen@redhat.com> - 9.1.0-46.1
|
* Thu Feb 20 2020 Jason L Tibbitts III <tibbs@math.uh.edu> - 153-1
|
||||||
- backport new _pkgdocdir macro from F20: in F19 it is versioned
|
- Add dependency on fonts-srpm-macros, as those have now been approved by FPC.
|
||||||
|
|
||||||
|
* Thu Feb 20 2020 Jeff Law <law@redhat.com> - 152-1
|
||||||
|
- Use eu-elfclassify to only run strip on ELF relocatables
|
||||||
|
and archive libraries.
|
||||||
|
|
||||||
|
* Fri Feb 14 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 151-1
|
||||||
|
- Fixup parallel algorithm for brp-strip-lto
|
||||||
|
|
||||||
|
* Fri Feb 14 2020 Jeff Law <law@redhat.com> - 150-1
|
||||||
|
- Strip LTO sections/symbols from installed .o/.a files
|
||||||
|
|
||||||
|
* Thu Jan 23 2020 Jeff Law <law@redhat.com> - 149-1
|
||||||
|
- Allow conditionally adding -fcommon to CFLAGS by defining %%_legacy_common_support
|
||||||
|
|
||||||
|
* Mon Jan 20 2020 Florian Weimer <fweimer@redhat.com> - 148-1
|
||||||
|
- Reenable annobin after GCC 10 integration (#1792892)
|
||||||
|
|
||||||
|
* Mon Jan 20 2020 Florian Weimer <fweimer@redhat.com> - 147-1
|
||||||
|
- Temporarily disable annobin for GCC 10 (#1792892)
|
||||||
|
|
||||||
|
* Thu Dec 05 2019 Denys Vlasenko <dvlasenk@redhat.com> - 146-1
|
||||||
|
- kmod.prov: fix and speed it up
|
||||||
|
|
||||||
|
* Tue Dec 03 15:48:18 CET 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 145-1
|
||||||
|
- %%set_build_flags: define LT_SYS_LIBRARY_PATH
|
||||||
|
|
||||||
|
* Thu Nov 21 2019 Denys Vlasenko <dvlasenk@redhat.com> - 144-1
|
||||||
|
- Speed up brp-mangle-shebangs.
|
||||||
|
|
||||||
|
* Tue Nov 05 2019 Lumír Balhar <lbalhar@redhat.com> - 143-1
|
||||||
|
- Fix brp-python-bytecompile with the new features from compileall2
|
||||||
|
- Resolves: rhbz#1595265
|
||||||
|
|
||||||
|
* Fri Nov 01 2019 Miro Hrončok <mhroncok@redhat.com> - 142-1
|
||||||
|
- Fix the simple API of %%gpgverify.
|
||||||
|
|
||||||
|
* Thu Aug 22 2019 Jason L Tibbitts III <tibbs@math.uh.edu> - 141-2
|
||||||
|
- Simplify the API of %%gpgverify.
|
||||||
|
|
||||||
|
* Thu Jul 25 2019 Richard W.M. Jones <rjones@redhat.com> - 140-2
|
||||||
|
- Bump version and rebuild.
|
||||||
|
|
||||||
|
* Sat Jul 20 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 140-1
|
||||||
|
- Fixup python-srpm-macros version
|
||||||
|
|
||||||
|
* Wed Jul 17 2019 Lumír Balhar <lbalhar@redhat.com> - 139-1
|
||||||
|
- Use compileall2 Python module for byte-compilation in brp-python-bytecompile
|
||||||
|
|
||||||
|
* Tue Jul 09 2019 Miro Hrončok <mhroncok@redhat.com> - 138-1
|
||||||
|
- Move brp-python-bytecompile from rpm, so we can easily adapt it
|
||||||
|
|
||||||
|
* 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
|
||||||
|
- Drop redundant _smp_mflag re-definition, use the one from rpm instead
|
||||||
|
|
||||||
|
* Thu Dec 20 2018 Florian Weimer <fweimer@redhat.com> - 127-1
|
||||||
|
- Build flags: Add support for extension builders (#1543394)
|
||||||
|
|
||||||
|
* Mon Dec 17 2018 Panu Matilainen <pmatilai@redhat.com> - 126-1
|
||||||
|
- Silence the annoying warning from ldconfig brp-script (#1540971)
|
||||||
|
|
||||||
|
* Thu Nov 15 2018 Miro Hrončok <mhroncok@redhat.com> - 125-1
|
||||||
|
- Make automagic Python bytecompilation optional
|
||||||
|
https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2
|
||||||
|
|
||||||
|
* Thu Nov 08 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 124-1
|
||||||
|
- forge: add more distprefix cleaning (bz1646724)
|
||||||
|
|
||||||
|
* Mon Oct 22 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 123-1
|
||||||
|
- Add -q option to %%forgesetup
|
||||||
|
|
||||||
|
* Sat Oct 20 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 122-1
|
||||||
|
- Allow multiple calls to forge macros
|
||||||
|
|
||||||
|
* Thu Oct 11 2018 Jan Pazdziora <jpazdziora@redhat.com> - 121-1
|
||||||
|
- Add %_swidtagdir for directory for SWID tag files describing the
|
||||||
|
installation.
|
||||||
|
|
||||||
|
* Mon Sep 10 2018 Miro Hrončok <mhroncok@redhat.com> - 120-1
|
||||||
|
- Make ambiguous python shebangs error
|
||||||
|
https://fedoraproject.org/wiki/Changes/Make_ambiguous_python_shebangs_error
|
||||||
|
|
||||||
|
* Mon Aug 20 2018 Kalev Lember <klember@redhat.com> - 119-1
|
||||||
|
- Add aarch64 to ldc arches
|
||||||
|
|
||||||
|
* Wed Aug 15 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 118-1
|
||||||
|
- Enable --as-needed by default
|
||||||
|
|
||||||
|
* Mon Jul 16 2018 Miro Hrončok <mhroncok@redhat.com> - 117-1
|
||||||
|
- Mangle /bin shebnags to /usr/bin ones (#1581757)
|
||||||
|
|
||||||
|
* Tue Jul 10 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 116-1
|
||||||
|
- Add option to add -Wl,--as-needed into LDFLAGS
|
||||||
|
|
||||||
|
* Mon Jul 09 2018 Kalev Lember <klember@redhat.com> - 115-1
|
||||||
|
- Disable non-functional ppc64 support for ldc packages
|
||||||
|
|
||||||
|
* Tue Jun 26 2018 Panu Matilainen <pmatilai@redhat.com> - 114-1
|
||||||
|
- Fix kernel ABI related strings (Peter Oros, #26)
|
||||||
|
- Automatically trim changelog to two years (Zbigniew Jędrzejewski-Szmek, #22)
|
||||||
|
- Cosmetics cleanups (Zbigniew Jędrzejewski-Szmek, #22)
|
||||||
|
|
||||||
|
* Mon Jun 18 2018 Florian Weimer <fweimer@redhat.com> - 113-1
|
||||||
|
- Build flags: Require SSE2 on i686 (#1592212)
|
||||||
|
|
||||||
|
* Mon May 28 2018 Miro Hrončok <mhroncok@redhat.com> - 112-1
|
||||||
|
- Add a possibility to opt-out form automagic Python bytecompilation
|
||||||
|
https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation
|
||||||
|
|
||||||
|
* Wed May 02 2018 Peter Jones <pjones@redhat.com> - 111-1
|
||||||
|
- brp-mangle-shebangs: add %%{__brp_mangle_shebangs_exclude_file} and
|
||||||
|
%%{__brp_mangle_shebangs_exclude_from_file} to allow you to specify files
|
||||||
|
containing the shebangs to be ignore and files to be ignored regexps,
|
||||||
|
respectively, so that they can be generated during the package build.
|
||||||
|
|
||||||
|
* Wed May 2 2018 Florian Weimer <fweimer@redhat.com> - 110-1
|
||||||
|
- Reflect -fasynchronous-unwind-tables GCC default on POWER (#1550914)
|
||||||
|
|
||||||
|
* Wed May 2 2018 Florian Weimer <fweimer@redhat.com> - 109-1
|
||||||
|
- Use plain -fcf-protection compiler flag, without -mcet (#1570823)
|
||||||
|
|
||||||
|
* Tue May 01 2018 Peter Jones <pjones@redhat.com> - 108-1
|
||||||
|
- Add Requires: efi-srpm-macros for %%{efi}
|
||||||
|
|
||||||
|
* Fri Apr 20 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 107-1
|
||||||
|
- Add %%_metainfodir macro.
|
||||||
|
- %%forgeautosetup tweak to fix patch application.
|
||||||
|
|
||||||
|
* Mon Mar 05 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 106-1
|
||||||
|
- Update forge macros.
|
||||||
|
|
||||||
|
* Wed Feb 28 2018 Florian Weimer <fweimer@redhat.com> - 105-1
|
||||||
|
- Make -fasynchronous-unwind-tables explicit on aarch64 (#1536431)
|
||||||
|
|
||||||
|
* Wed Feb 28 2018 Florian Weimer <fweimer@redhat.com> - 104-1
|
||||||
|
- Use -funwind-tables on POWER (#1536431, #1548847)
|
||||||
|
|
||||||
|
* Sun Feb 25 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 103-1
|
||||||
|
- Make %%ldconfig_post/%%ldconfig_postun parameterized
|
||||||
|
|
||||||
|
* Sat Feb 24 2018 Florian Weimer <fweimer@redhat.com> - 102-1
|
||||||
|
- Second step of -z now move: removal from GCC specs file (#1548397)
|
||||||
|
|
||||||
|
* Sat Feb 24 2018 Florian Weimer <fweimer@redhat.com> - 101-1
|
||||||
|
- First step of moving -z now to the gcc command line (#1548397)
|
||||||
|
|
||||||
|
* Thu Feb 22 2018 Miro Hrončok <mhroncok@redhat.com> - 100-1
|
||||||
|
- Don't mangle shebangs with whitespace only changes (#1546993)
|
||||||
|
|
||||||
|
* Thu Feb 22 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 99-1
|
||||||
|
- Move %%end to %%ldconfig_scriptlets
|
||||||
|
|
||||||
|
* Sat Feb 17 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 98-1
|
||||||
|
- Explicitly close scriptlets with %%end (ldconfig)
|
||||||
|
|
||||||
|
* Wed Feb 14 2018 Miro Hrončok <mhroncok@redhat.com> - 97-1
|
||||||
|
- Allow to opt-out from shebang mangling for specific paths/shebangs
|
||||||
|
|
||||||
|
* Thu Feb 08 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 96-1
|
||||||
|
- Simplify/Fix check for shebang starting with "/"
|
||||||
|
|
||||||
|
* Wed Feb 07 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 95-1
|
||||||
|
- Fix mangling env shebangs with absolute paths
|
||||||
|
|
||||||
|
* Sun Feb 4 2018 Florian Weimer <fweimer@redhat.com> - 94-1
|
||||||
|
- Add RPM macros for compiler/linker flags
|
||||||
|
|
||||||
|
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 93-1
|
||||||
|
- Use newly available /usr/bin/grep
|
||||||
|
|
||||||
|
* Wed Jan 31 2018 Peter Robinson <pbrobinson@fedoraproject.org> 92-1
|
||||||
|
- Use generic tuning for ARMv7
|
||||||
|
|
||||||
|
* Tue Jan 30 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 91-1
|
||||||
|
- The grep package only provides /bin/grep, not /usr/bin/grep.
|
||||||
|
|
||||||
|
* Mon Jan 29 2018 Miro Hrončok <mhroncok@redhat.com> - 90-1
|
||||||
|
- Add brp-mangle-shebangs
|
||||||
|
|
||||||
|
* Mon Jan 29 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 89-1
|
||||||
|
- Add macros.ldconfig
|
||||||
|
|
||||||
|
* Mon Jan 29 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 88-1
|
||||||
|
- Create DSO symlinks automatically
|
||||||
|
|
||||||
|
* Mon Jan 29 2018 Florian Weimer <fweimer@redhat.com> - 87-1
|
||||||
|
- Build flags: Disable -z defs again (#1535422)
|
||||||
|
|
||||||
|
* Mon Jan 29 2018 Florian Weimer <fweimer@redhat.com> - 86-1
|
||||||
|
- Build flags: Enable CET on i686, x86_64 (#1538725)
|
||||||
|
|
||||||
|
* Thu Jan 25 2018 Florian Weimer <fweimer@redhat.com> - 85-1
|
||||||
|
- Build flags: Switch to generic tuning on i686 (#1538693)
|
||||||
|
|
||||||
|
* Mon Jan 22 2018 Florian Weimer <fweimer@redhat.com> - 84-1
|
||||||
|
- Link with -z defs by default (#1535422)
|
||||||
|
|
||||||
|
* Mon Jan 22 2018 Florian Weimer <fweimer@redhat.com> - 83-1
|
||||||
|
- Make armhfp flags consistent with GCC defaults
|
||||||
|
|
||||||
|
* Mon Jan 22 2018 Florian Weimer <fweimer@redhat.com> - 82-1
|
||||||
|
- Make use of -fasynchronous-unwind-tables more explicit (#1536431)
|
||||||
|
|
||||||
|
* Mon Jan 22 2018 Florian Weimer <fweimer@redhat.com> - 81-1
|
||||||
|
- Remove --param=ssp-buffer-size=4
|
||||||
|
|
||||||
|
* Mon Jan 22 2018 Florian Weimer <fweimer@redhat.com> - 80-1
|
||||||
|
- Document build flags
|
||||||
|
|
||||||
|
* Fri Jan 19 2018 Panu Matilainen <pmatilai@redhat.com> - 79-1
|
||||||
|
- Document how to disable hardened and annotated build (#1211296)
|
||||||
|
|
||||||
|
* Wed Jan 17 2018 Panu Matilainen <pmatilai@redhat.com> - 78-1
|
||||||
|
- Fix the inevitable embarrassing typo in 77, doh
|
||||||
|
|
||||||
|
* Wed Jan 17 2018 Panu Matilainen <pmatilai@redhat.com> - 77-1
|
||||||
|
- Macroize build root policies for consistent disable/override ability
|
||||||
|
|
||||||
|
* Wed Jan 17 2018 Florian Weimer <fweimer@redhat.com> - 76-1
|
||||||
|
- Add -fstack-clash-protection for supported architectures (#1515865)
|
||||||
|
|
||||||
|
* Wed Jan 17 2018 Florian Weimer <fweimer@redhat.com> - 75-1
|
||||||
|
- Add _GLIBCXX_ASSERTIONS to CFLAGS/CXXFLAGS (#1515858)
|
||||||
|
|
||||||
|
* Mon Jan 15 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 74-1
|
||||||
|
- Remove Requires: cmake-rpm-macros
|
||||||
|
|
||||||
|
* Thu Jan 11 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 73-1
|
||||||
|
- Add macros.forge for simplifying packaging of forge-hosted packages. See
|
||||||
|
https://fedoraproject.org/wiki/Forge-hosted_projects_packaging_automation and
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1523779
|
||||||
|
|
||||||
|
* Wed Jan 03 2018 Sergey Avseyev <sergey.avseyev@gmail.com> - 72-1
|
||||||
|
- Add Requires: nim-srpm-macros for %%nim_arches
|
||||||
|
|
||||||
|
* Tue Jan 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 71-1
|
||||||
|
- Require annobin only if gcc is installed
|
||||||
|
|
||||||
|
* Thu Dec 21 2017 Björn Esser <besser82@fedoraproject.org> - 70-2
|
||||||
|
- Add Requires: cmake-rpm-macros for CMake auto-{provides,requires} (#1498894)
|
||||||
|
|
||||||
|
* Fri Dec 08 2017 Panu Matilainen <pmatilai@redhat.com> - 70-1
|
||||||
|
- Update URL to current location at src.fedoraproject.org
|
||||||
|
|
||||||
|
* Wed Nov 22 2017 Nick Clifton <nickc@redhat.com> - 69-1
|
||||||
|
- Enable binary annotations in compiler flags
|
||||||
|
|
||||||
|
* Thu Oct 26 2017 Troy Dawson <tdawson@redhat.com> - 68-1
|
||||||
|
- Remove Requires: fedora-rpm-macros
|
||||||
|
|
||||||
|
* Mon Jul 31 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 67-1
|
||||||
|
- Define _include_gdb_index (RHBZ #1476722)
|
||||||
|
- Move _debuginfo_subpackages and _debugsource_packages from rpm (RHBZ #1476735)
|
||||||
|
|
||||||
|
* Tue Jul 18 2017 Florian Festi <ffesti@redhat.com> - 66-1
|
||||||
|
- Honor %%kmodtool_generate_buildreqs (#1472201)
|
||||||
|
|
||||||
|
* Thu Jul 13 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 65-1
|
||||||
|
- Add Requires: rust-srpm-macros for %%rust_arches
|
||||||
|
|
||||||
|
* Wed Mar 15 2017 Orion Poplawski <orion@cora.nwra.com> - 64-1
|
||||||
|
- Add Requires: openblas-srpm-macros for %%openblas_arches
|
||||||
|
|
||||||
|
* Thu Feb 02 2017 Dan Horák <dan[at]danny.cz> - 63-1
|
||||||
|
- set zEC12 as minimum architecture level for s390(x) (#1404991)
|
||||||
|
|
||||||
|
* Thu Dec 15 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 62-1
|
||||||
|
- Add macros.vpath (https://fedorahosted.org/fpc/attachment/ticket/655)
|
||||||
|
|
||||||
|
* Tue Dec 06 2016 Adam Williamson <awilliam@redhat.com> - 61-1
|
||||||
|
- revert changes from 60, they break far too much stuff (#1401231)
|
||||||
|
|
||||||
|
* Wed Nov 30 2016 Panu Matilainen <pmatilai@redhat.com> - 60-1
|
||||||
|
- Error on implicit function declaration and -return type for C (#1393492)
|
||||||
|
|
||||||
|
* Wed Nov 30 2016 Panu Matilainen <pmatilai@redhat.com> - 59-1
|
||||||
|
- Move global compiler flags to __global_compiler_flags macro
|
||||||
|
- Introduce separate __global_fooflags for C, C++ and Fortran
|
||||||
|
|
||||||
|
* Tue Nov 29 2016 Panu Matilainen <pmatilai@redhat.com> - 58-1
|
||||||
|
- Drop atom optimization on i686 (#1393492)
|
||||||
|
|
||||||
|
* Tue Nov 15 2016 Dan Horák <dan[at]danny.cz> - 57-1
|
||||||
|
- set z10 as minimum architecture level for s390(x)
|
||||||
|
|
||||||
|
* Fri Nov 11 2016 Panu Matilainen <pmatilai@redhat.com> - 56-1
|
||||||
|
- Fix directory name mismatch in kernel_source macro (#648996)
|
||||||
|
|
||||||
|
* Tue Nov 08 2016 Michal Toman <mtoman@fedoraproject.org> - 55-1
|
||||||
|
- Add default compiler flags for various MIPS architectures (#1366735)
|
||||||
|
|
||||||
|
* Tue Nov 08 2016 Panu Matilainen <pmatilai@redhat.com> - 54-1
|
||||||
|
- -pie is incompatible with static linkage (#1343892, #1287743)
|
||||||
|
|
||||||
|
* Mon Nov 07 2016 Panu Matilainen <pmatilai@redhat.com> - 53-1
|
||||||
|
- Drop brp-java-repack-jars by request (#1235770)
|
||||||
|
- Drop brp-implant-ident-static, unused for 13 years and counting
|
||||||
|
|
||||||
|
* Mon Nov 07 2016 Lubomir Rintel <lkundrak@v3.sk> - 52-1
|
||||||
|
- Add valgrind_arches macro for BuildRequires of valgrind
|
||||||
|
|
||||||
|
* Fri Nov 04 2016 Stephen Gallagher <sgallagh@redhat.com> - 51-1
|
||||||
|
- Add s390x build target for Node.js packages
|
||||||
|
|
||||||
|
* Mon Oct 31 2016 Kalev Lember <klember@redhat.com> - 50-1
|
||||||
|
- Add ldc_arches macro
|
||||||
|
|
||||||
|
* Mon Oct 17 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 49-1
|
||||||
|
- Remove hardcoded limit of 16 CPUs for makefile parallelism.
|
||||||
|
- See https://bugzilla.redhat.com/show_bug.cgi?id=1384938
|
||||||
|
|
||||||
|
* Thu Oct 13 2016 Richard W.M. Jones <rjones@redhat.com> 48-1
|
||||||
|
- Add support for riscv64.
|
||||||
|
This also updates config.sub/config.guess to the latest upstream versions.
|
||||||
|
|
||||||
|
* Wed Oct 12 2016 Peter Robinson <pbrobinson@fedoraproject.org> 47-1
|
||||||
|
- Enable aarch64 for mono arches
|
||||||
|
|
||||||
|
* Mon Oct 03 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 46-1
|
||||||
|
- Allow %%configure to optionally pass --disable-silent-rules. Define
|
||||||
|
%%_configure_disable_silent_rules (defaulting to 0) to control this.
|
||||||
|
|
||||||
|
* Wed Sep 14 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 45-1
|
||||||
|
- Add dependency on qt5-srpm-macros.
|
||||||
|
|
||||||
|
* Fri Aug 12 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 44-1
|
||||||
|
- And somehow I managed to make a typo in that dependency.
|
||||||
|
|
||||||
|
* Fri Aug 12 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 43-1
|
||||||
|
- Add dependency on fedora-rpm-macros.
|
||||||
|
|
||||||
|
* Tue Apr 12 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 42-1
|
||||||
|
- Add dependency on fpc-srpm-macros.
|
||||||
|
|
||||||
|
* Mon Apr 11 2016 Jason L Tibbitts III <tibbs@math.uh.edu> - 41-1
|
||||||
|
- Add a file for miscellaneous macros, currently containing just %%rpmmacrodir.
|
||||||
|
|
||||||
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 40-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Feb 02 2016 Dan Horák <dan[at]danny.cz> 40-1
|
||||||
|
- switch to -mcpu=power8 for ppc64le default compiler flags
|
||||||
|
|
||||||
|
* Wed Jan 13 2016 Orion Poplawski <orion@cora.nwra.com> 39-1
|
||||||
|
- Add Requires: python-srpm-macros
|
||||||
|
|
||||||
|
* Fri Jan 8 2016 Peter Robinson <pbrobinson@fedoraproject.org> 38-1
|
||||||
|
- Add missing ARMv6 optflags
|
||||||
|
|
||||||
|
* Wed Dec 2 2015 Peter Robinson <pbrobinson@fedoraproject.org> 37-1
|
||||||
|
- nodejs 4+ now supports aarch64 and power64
|
||||||
|
|
||||||
|
* Fri Jul 17 2015 Florian Festi <ffesti@redhat.com> 36-1
|
||||||
|
- Add Requires: go-srpm-macros (#1243922)
|
||||||
|
|
||||||
|
* Thu Jul 09 2015 Sandro Mani <manisandro@gmail.com> 35-1
|
||||||
|
- Use %%__libsymlink_path instead of %%__libsymlink_exclude_path in libsymlink.attr
|
||||||
|
|
||||||
|
* Wed Jul 08 2015 Adam Jackson <ajax@redhat.com> 34-1
|
||||||
|
- Fix cc1 specs mishandling of incremental linking
|
||||||
|
|
||||||
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 33-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 05 2015 Dan Horák <dan[at]danny.cz> 33-1
|
||||||
|
- Mono 4 adds support for ppc64le
|
||||||
|
|
||||||
|
* Fri May 29 2015 Florian Festi <ffesti@redhat.com> 32-1
|
||||||
|
- Support out of source builds for %%_configure_gnuconfig_hack (#1191788)
|
||||||
|
- Fix typo in %%kernel_module_package (#1159361)
|
||||||
|
|
||||||
|
* Tue May 19 2015 Florian Festi <ffesti@redhat.com> 31-1
|
||||||
|
- Add %%py_auto_byte_compile macro controlling Python bytecompilation
|
||||||
|
(#976651)
|
||||||
|
|
||||||
|
* Wed Apr 29 2015 Florian Festi <ffesti@redhat.com> 30-1
|
||||||
|
- Fix libsymlink.attr for new magic pattern for symlinks (#1207945)
|
||||||
|
|
||||||
|
* Wed Apr 08 2015 Adam Jackson <ajax@redhat.com> 29-1
|
||||||
|
- Fix ld specs mishandling of incremental linking
|
||||||
|
|
||||||
|
* Thu Feb 19 2015 Till Maas <opensource@till.name> - 28-1
|
||||||
|
- Enable harden flags by default (#1192183)
|
||||||
|
|
||||||
|
* Wed Dec 10 2014 Dan Horák <dan[at]danny.cz> - 27-1
|
||||||
|
- Explicitly set -mcpu/-mtune for ppc64p7 and ppc64le to override rpm defaults
|
||||||
|
|
||||||
|
* Mon Sep 22 2014 Panu Matilainen <pmatilai@redhat.com> - 26-1
|
||||||
|
- Gnat macros are now in a package of their own (#1133632)
|
||||||
|
|
||||||
|
* Fri Sep 19 2014 Dan Horák <dan[at]danny.cz> - 25-1
|
||||||
|
- there is still no properly packaged Mono for ppc64le
|
||||||
|
|
||||||
|
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 24-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 5 2014 Peter Robinson <pbrobinson@fedoraproject.org> 24-1
|
||||||
|
- ARMv7 has Ada so add it to GNAT_arches
|
||||||
|
|
||||||
|
* Sat May 24 2014 Brent Baude <baude@us.ibm.com> - 23-2
|
||||||
|
- Changed ppc64 to power64 macro for mono_archs
|
||||||
|
|
||||||
|
* Tue May 13 2014 Peter Robinson <pbrobinson@fedoraproject.org>
|
||||||
|
- aarch64 has Ada so add it to GNAT_arches
|
||||||
|
|
||||||
|
* Mon May 12 2014 Josh Boyer <jwboyer@fedoraproject.org> - 22-1
|
||||||
|
- Fix kmod.prov to deal with compressed modules (#1096349)
|
||||||
|
|
||||||
|
* Wed Apr 30 2014 Jens Petersen <petersen@redhat.com> - 21-1
|
||||||
|
- macros.ghc-srpm moved to ghc-rpm-macros package (#1089102)
|
||||||
|
- add requires ghc-srpm-macros
|
||||||
|
|
||||||
|
* Tue Apr 29 2014 Peter Robinson <pbrobinson@fedoraproject.org> 20-1
|
||||||
|
- With gcc 4.9 aarch64 now supports stack-protector
|
||||||
|
|
||||||
|
* Sun Apr 27 2014 Ville Skyttä <ville.skytta@iki.fi> - 19-1
|
||||||
|
- Drop bunch of duplicated-with-rpm macro definitions and brp-* scripts
|
||||||
|
|
||||||
|
* Tue Apr 15 2014 Panu Matilainen <pmatilai@redhat.com> - 18-1
|
||||||
|
- Temporarily bring back find-requires and -provides scripts to rrc-side
|
||||||
|
|
||||||
|
* Tue Apr 15 2014 Panu Matilainen <pmatilai@redhat.com> - 17-1
|
||||||
|
- Let OCaml handle its own arch macros (#1087794)
|
||||||
|
|
||||||
|
* Tue Apr 15 2014 Panu Matilainen <pmatilai@redhat.com> - 16-1
|
||||||
|
- Move kmod and libsymlink dependency generators here from rpm
|
||||||
|
|
||||||
|
* Thu Apr 10 2014 Panu Matilainen <pmatilai@redhat.com> - 15-1
|
||||||
|
- Drop most of the script-based dependency generation bits
|
||||||
|
|
||||||
|
* Tue Apr 08 2014 Panu Matilainen <pmatilai@redhat.com> - 14-1
|
||||||
|
- Add Mono path macros (#1070936)
|
||||||
|
- Allow opting out of config.{guess,sub} replacement hack (#991613)
|
||||||
|
|
||||||
|
* Tue Apr 08 2014 Panu Matilainen <pmatilai@redhat.com> - 13-1
|
||||||
|
- Move the remaining dependency generator stuff to the kmp macro package
|
||||||
|
- Stop overriding rpm external dependency generator settings by default
|
||||||
|
|
||||||
|
* Mon Apr 07 2014 Panu Matilainen <pmatilai@redhat.com> - 12-1
|
||||||
|
- Be more explicit about the package contents
|
||||||
|
- Split kernel module macros to a separate file
|
||||||
|
- Split kernel module scripts and macros to a separate package
|
||||||
|
|
||||||
|
* Wed Apr 02 2014 Panu Matilainen <pmatilai@redhat.com> - 11-1
|
||||||
|
- Stop pretending this package is relocatable, its not
|
||||||
|
- Require rpm >= 4.11 for /usr/lib/rpm/macros.d support etc
|
||||||
|
- Move our macros out of from /etc, they're not configuration
|
||||||
|
|
||||||
|
* Wed Apr 02 2014 Panu Matilainen <pmatilai@redhat.com> - 10-1
|
||||||
|
- Make fedora dist-git the upstream of this package and its sources
|
||||||
|
- Add maintainer comments to spec wrt versioning and changes
|
||||||
|
|
||||||
|
* Mon Mar 24 2014 Dan Horák <dan[at]danny.cz> - 9.1.0-58
|
||||||
|
- enable ppc64le otherwise default rpm cflags will be used
|
||||||
|
|
||||||
|
* Fri Feb 07 2014 Panu Matilainen <pmatilai@redhat.com> - 9.1.0-57
|
||||||
|
- config.guess/sub don't need to be group-writable (#1061762)
|
||||||
|
|
||||||
|
* Sun Jan 12 2014 Kevin Fenzi <kevin@scrye.com> 9.1.0-56
|
||||||
|
- Update libtool hardening hack and re-enable (#978949)
|
||||||
|
|
||||||
|
* Wed Dec 18 2013 Dhiru Kholia <dhiru@openwall.com> - 9.1.0-55
|
||||||
|
- Enable "-Werror=format-security" by default (#1043495)
|
||||||
|
|
||||||
|
* Wed Sep 04 2013 Karsten Hopp <karsten@redhat.com> 9.1.0-54
|
||||||
|
- update config.sub with ppc64p7 support (from Fedora automake)
|
||||||
|
|
||||||
|
* Fri Aug 16 2013 Panu Matilainen <pmatilai@redhat.com> - 9.1.0-53
|
||||||
|
- updated config.guess/sub from upstream for little-endian ppc archs
|
||||||
|
|
||||||
|
* Mon Jul 29 2013 Petr Pisar <ppisar@redhat.com> - 9.1.0-52
|
||||||
|
- Perl 5.18 rebuild
|
||||||
|
|
||||||
|
* Thu Jul 25 2013 Tomas Mraz <tmraz@redhat.com> 9.1.0-51
|
||||||
|
- Disable the libtool hack as it is breaking builds
|
||||||
|
|
||||||
|
* Wed Jul 24 2013 Kevin Fenzi <kevin@scrye.com> 9.1.0-50
|
||||||
|
- Make docdirs unversioned on Fedora 20+ (#986871)
|
||||||
|
- Hack around libtool issue for hardened build for now (#978949)
|
||||||
|
|
||||||
|
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 9.1.0-49
|
||||||
|
- Perl 5.18 rebuild
|
||||||
|
|
||||||
|
* Fri Jul 05 2013 Panu Matilainen <pmatilai@redhat.com> - 9.1.0-48
|
||||||
|
- fix brp-java-repack-jars failing on strange permissions (#905573)
|
||||||
|
|
||||||
|
* Thu Jul 04 2013 Panu Matilainen <pmatilai@redhat.com> - 9.1.0-47
|
||||||
|
- switch from -fstack-protector to -fstack-protector-strong (#978763)
|
||||||
|
|
||||||
* Thu Jun 27 2013 Panu Matilainen <pmatilai@redhat.com> - - 9.1.0-46
|
* Thu Jun 27 2013 Panu Matilainen <pmatilai@redhat.com> - - 9.1.0-46
|
||||||
- make cpu limit for building configurable through _smp_ncpus_max macro
|
- make cpu limit for building configurable through _smp_ncpus_max macro
|
||||||
@ -213,7 +826,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
|
|
||||||
* Wed Sep 28 2011 Dennis Gilmore <dennis@ausil.us> - 9.1.0-21
|
* Wed Sep 28 2011 Dennis Gilmore <dennis@ausil.us> - 9.1.0-21
|
||||||
- build armv5tel on armv7l since they are the same abi armv7hl is
|
- build armv5tel on armv7l since they are the same abi armv7hl is
|
||||||
- a incompatable ABI
|
an incompatible ABI
|
||||||
|
|
||||||
* Wed Sep 28 2011 Jens Petersen <petersen@redhat.com> - 9.1.0-20
|
* Wed Sep 28 2011 Jens Petersen <petersen@redhat.com> - 9.1.0-20
|
||||||
- add armv7hl to ghc_arches
|
- add armv7hl to ghc_arches
|
||||||
@ -335,8 +948,8 @@ rm -rf ${RPM_BUILD_ROOT}
|
|||||||
|
|
||||||
* Mon Feb 16 2009 Dennis Gilmore <dennis@ausil.us> - 9.0.3-5
|
* Mon Feb 16 2009 Dennis Gilmore <dennis@ausil.us> - 9.0.3-5
|
||||||
- apply fedora 11 default buildflags
|
- apply fedora 11 default buildflags
|
||||||
- set 32 bit intel build arch to i586 on compatiable hardware
|
- set 32 bit intel build arch to i586 on compatible hardware
|
||||||
- set 32 bit sparc build arch to sparcv9 on compatiable hardware
|
- set 32 bit sparc build arch to sparcv9 on compatible hardware
|
||||||
|
|
||||||
* Mon Feb 16 2009 Dennis Gilmore <dennis@ausil.us> - 9.0.3-4
|
* Mon Feb 16 2009 Dennis Gilmore <dennis@ausil.us> - 9.0.3-4
|
||||||
- limit _smp_flags to -j16
|
- limit _smp_flags to -j16
|
||||||
|
1
rpmlint.cf
Normal file
1
rpmlint.cf
Normal file
@ -0,0 +1 @@
|
|||||||
|
addFilter("no-%build-section")
|
97
rpmrc
Normal file
97
rpmrc
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
include: /usr/lib/rpm/rpmrc
|
||||||
|
|
||||||
|
optflags: i386 %{__global_compiler_flags} -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
optflags: i486 %{__global_compiler_flags} -m32 -march=i486 -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
optflags: i586 %{__global_compiler_flags} -m32 -march=i586 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
optflags: i686 %{__global_compiler_flags} -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse -mstackrealign -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
|
||||||
|
optflags: athlon %{__global_compiler_flags} -m32 -march=athlon -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
optflags: ia64 %{__global_compiler_flags}
|
||||||
|
optflags: x86_64 %{__global_compiler_flags} -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
|
||||||
|
|
||||||
|
optflags: alpha %{__global_compiler_flags} -mieee
|
||||||
|
optflags: alphaev5 %{__global_compiler_flags} -mieee -mcpu=ev5
|
||||||
|
optflags: alphaev56 %{__global_compiler_flags} -mieee -mcpu=ev56
|
||||||
|
optflags: alphapca56 %{__global_compiler_flags} -mieee -mcpu=pca56
|
||||||
|
optflags: alphaev6 %{__global_compiler_flags} -mieee -mcpu=ev6
|
||||||
|
optflags: alphaev67 %{__global_compiler_flags} -mieee -mcpu=ev67
|
||||||
|
|
||||||
|
optflags: sparc %{__global_compiler_flags} -m32 -mcpu=v7 -mtune=ultrasparc
|
||||||
|
optflags: sparcv8 %{__global_compiler_flags} -m32 -mcpu=v8
|
||||||
|
optflags: sparcv9 %{__global_compiler_flags} -m32 -mcpu=ultrasparc
|
||||||
|
optflags: sparcv9v %{__global_compiler_flags} -m32 -mcpu=niagara
|
||||||
|
optflags: sparc64 %{__global_compiler_flags} -m64 -mcpu=ultrasparc
|
||||||
|
optflags: sparc64v %{__global_compiler_flags} -m64 -mcpu=niagara
|
||||||
|
|
||||||
|
optflags: m68k %{__global_compiler_flags}
|
||||||
|
|
||||||
|
optflags: ppc %{__global_compiler_flags} -m32 -fasynchronous-unwind-tables
|
||||||
|
optflags: ppciseries %{__global_compiler_flags} -m32
|
||||||
|
optflags: ppcpseries %{__global_compiler_flags} -m32
|
||||||
|
optflags: ppc64 %{__global_compiler_flags} -m64 -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
optflags: ppc64p7 %{__global_compiler_flags} -m64 -O3 -mcpu=power7 -mtune=power7 -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
optflags: ppc64le %{__global_compiler_flags} -m64 -mcpu=power8 -mtune=power8 -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
optflags: ppc64iseries %{__global_compiler_flags} -m64
|
||||||
|
optflags: ppc64pseries %{__global_compiler_flags} -m64
|
||||||
|
optflags: ppc8260 %{__global_compiler_flags} -m32
|
||||||
|
optflags: ppc8560 %{__global_compiler_flags} -m32
|
||||||
|
|
||||||
|
optflags: parisc %{__global_compiler_flags} -mpa-risc-1-0
|
||||||
|
optflags: hppa1.0 %{__global_compiler_flags} -mpa-risc-1-0
|
||||||
|
optflags: hppa1.1 %{__global_compiler_flags} -mpa-risc-1-0
|
||||||
|
optflags: hppa1.2 %{__global_compiler_flags} -mpa-risc-1-0
|
||||||
|
optflags: hppa2.0 %{__global_compiler_flags} -mpa-risc-1-0
|
||||||
|
|
||||||
|
optflags: mips %{__global_compiler_flags} -march=mips32r2 -mfpxx
|
||||||
|
optflags: mipsel %{__global_compiler_flags} -march=mips32r2 -mfpxx
|
||||||
|
optflags: mips64 %{__global_compiler_flags} -march=mips64r2 -mabi=64
|
||||||
|
optflags: mips64el %{__global_compiler_flags} -march=mips64r2 -mabi=64
|
||||||
|
optflags: mipsr6 %{__global_compiler_flags} -march=mips32r6
|
||||||
|
optflags: mipsr6el %{__global_compiler_flags} -march=mips32r6
|
||||||
|
optflags: mips64r6 %{__global_compiler_flags} -march=mips64r6
|
||||||
|
optflags: mips64r6el %{__global_compiler_flags} -march=mips64r6
|
||||||
|
|
||||||
|
optflags: armv3l %{__global_compiler_flags} -fsigned-char -march=armv3
|
||||||
|
optflags: armv4b %{__global_compiler_flags} -fsigned-char -march=armv4
|
||||||
|
optflags: armv4l %{__global_compiler_flags} -fsigned-char -march=armv4
|
||||||
|
optflags: armv4tl %{__global_compiler_flags} -march=armv4t
|
||||||
|
optflags: armv5tel %{__global_compiler_flags} -march=armv5te -mfloat-abi=soft
|
||||||
|
optflags: armv5tejl %{__global_compiler_flags} -march=armv5te -mfloat-abi=soft
|
||||||
|
optflags: armv6l %{__global_compiler_flags} -march=armv6 -mfloat-abi=soft
|
||||||
|
optflags: armv6hl %{__global_compiler_flags} -march=armv6 -mfpu=vfp -mfloat-abi=hard
|
||||||
|
optflags: armv6hnl %{__global_compiler_flags} -march=armv6 -mfpu=neon -mfloat-abi=hard
|
||||||
|
optflags: armv7l %{__global_compiler_flags} -march=armv7-a -mfloat-abi=soft
|
||||||
|
optflags: armv7hl %{__global_compiler_flags} -march=armv7-a -mfpu=vfpv3-d16 -mtune=generic-armv7-a -mabi=aapcs-linux -mfloat-abi=hard
|
||||||
|
optflags: armv7hnl %{__global_compiler_flags} -march=armv7-a -mfpu=neon -mfloat-abi=hard
|
||||||
|
|
||||||
|
optflags: atarist %{__global_compiler_flags}
|
||||||
|
optflags: atariste %{__global_compiler_flags}
|
||||||
|
optflags: ataritt %{__global_compiler_flags}
|
||||||
|
optflags: falcon %{__global_compiler_flags}
|
||||||
|
optflags: atariclone %{__global_compiler_flags}
|
||||||
|
optflags: milan %{__global_compiler_flags}
|
||||||
|
optflags: hades %{__global_compiler_flags}
|
||||||
|
|
||||||
|
optflags: s390 %{__global_compiler_flags} -m31 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables
|
||||||
|
optflags: s390x %{__global_compiler_flags} -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
|
||||||
|
optflags: aarch64 %{__global_compiler_flags} -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
|
||||||
|
optflags: riscv64 %{__global_compiler_flags} -fasynchronous-unwind-tables -fstack-clash-protection
|
||||||
|
|
||||||
|
# set build arch to fedora buildarches on hardware capable of running it
|
||||||
|
# saves having to do rpmbuild --target=
|
||||||
|
buildarchtranslate: athlon: i686
|
||||||
|
buildarchtranslate: geode: i686
|
||||||
|
buildarchtranslate: pentium4: i686
|
||||||
|
buildarchtranslate: pentium3: i686
|
||||||
|
buildarchtranslate: i686: i686
|
||||||
|
buildarchtranslate: i586: i586
|
||||||
|
|
||||||
|
buildarchtranslate: sparcv9: sparcv9
|
||||||
|
buildarchtranslate: sparcv9v: sparcv9
|
||||||
|
|
||||||
|
buildarchtranslate: armv5tejl: armv5tel
|
||||||
|
buildarchtranslate: armv6l: armv5tel
|
||||||
|
buildarchtranslate: armv7l: armv5tel
|
||||||
|
buildarchtranslate: armv7hl: armv7hl
|
||||||
|
buildarchtranslate: armv7hnl: armv7hl
|
76
rpmsort
Executable file
76
rpmsort
Executable file
@ -0,0 +1,76 @@
|
|||||||
|
#! /usr/bin/perl -w
|
||||||
|
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
# USA.
|
||||||
|
|
||||||
|
use Getopt::Long qw(:config gnu_getopt);
|
||||||
|
|
||||||
|
sub rpm_cmp_versions {
|
||||||
|
my ($evr1, $evr2) = @_;
|
||||||
|
|
||||||
|
sub _rpm_cmp {
|
||||||
|
my ($s1, $s2) = @_;
|
||||||
|
|
||||||
|
return defined $s1 <=> defined $s2
|
||||||
|
unless defined $s1 && defined $s2;
|
||||||
|
|
||||||
|
my ($r, $x1, $x2);
|
||||||
|
do {
|
||||||
|
$s1 =~ s/^[^a-zA-Z0-9]+//;
|
||||||
|
$s2 =~ s/^[^a-zA-Z0-9]+//;
|
||||||
|
if ($s1 =~ /^\d/ || $s2 =~ /^\d/) {
|
||||||
|
$s1 =~ s/^0*(\d*)//; $x1 = $1;
|
||||||
|
$s2 =~ s/^0*(\d*)//; $x2 = $1;
|
||||||
|
$r = length $x1 <=> length $x2 || $x1 cmp $x2;
|
||||||
|
} else {
|
||||||
|
$s1 =~ s/^([a-zA-Z]*)//; $x1 = $1;
|
||||||
|
$s2 =~ s/^([a-zA-Z]*)//; $x2 = $1;
|
||||||
|
return 0
|
||||||
|
if $x1 eq '' && $x2 eq '';
|
||||||
|
$r = $x1 cmp $x2;
|
||||||
|
}
|
||||||
|
} until $r;
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
my ($e1, $v1, $r1) = $evr1 =~ /^(?:(\d*):)?(.*?)(?:-([^-]*))?$/;
|
||||||
|
my ($e2, $v2, $r2) = $evr2 =~ /^(?:(\d*):)?(.*?)(?:-([^-]*))?$/;
|
||||||
|
my $r = _rpm_cmp($e1 || 0, $e2 || 0);
|
||||||
|
$r = _rpm_cmp($v1, $v2)
|
||||||
|
unless $r;
|
||||||
|
$r = _rpm_cmp($r1, $r2)
|
||||||
|
unless $r;
|
||||||
|
return $r;
|
||||||
|
}
|
||||||
|
|
||||||
|
my $reorder = sub { return @_ };
|
||||||
|
my $key = 0;
|
||||||
|
|
||||||
|
GetOptions ("r|reverse" => sub { $reorder = sub { return reverse @_ } },
|
||||||
|
"k|key=i" => \$key)
|
||||||
|
or do {
|
||||||
|
print STDERR "Usage\n";
|
||||||
|
exit 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
if ($key == 0) {
|
||||||
|
# Sort by entire lines
|
||||||
|
map { print } &$reorder(sort { rpm_cmp_versions($a, $b) } <>);
|
||||||
|
} else {
|
||||||
|
# Sort by field $key
|
||||||
|
my @data = map { [(split)[$key-1], $_] } <>;
|
||||||
|
map { print } &$reorder(map { $_->[1] }
|
||||||
|
sort { rpm_cmp_versions($a->[0], $b->[0]) } @data);
|
||||||
|
}
|
3
sources
3
sources
@ -1,3 +0,0 @@
|
|||||||
3b71c9d0ccc938989778e3c3892e6b94 redhat-rpm-config-9.1.0.tar.bz2
|
|
||||||
9c01fa8c4554cb2c7b92c95dfa0dbfcf config.guess
|
|
||||||
1803a1d601bcf4debccfe2902c4f0f65 config.sub
|
|
40
symset-table
Executable file
40
symset-table
Executable file
@ -0,0 +1,40 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
# Create a table of all symbol sets defined in all /boot/symsets*.tar.gz
|
||||||
|
# files.
|
||||||
|
#
|
||||||
|
# Format:
|
||||||
|
# kernelrelease/modver/symbol <tab> symset <tab> symset_hash
|
||||||
|
#
|
||||||
|
# This table is needed for computing the appropriate Requires: tags for
|
||||||
|
# kernel module packages.
|
||||||
|
|
||||||
|
tmpdir=$(mktemp -t -d ${0##*/}.XXXXXX)
|
||||||
|
trap "cd / ; rm -rf $tmpdir" EXIT
|
||||||
|
cd $tmpdir
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
for symsets in /boot/symsets-*.tar.gz; do
|
||||||
|
zcat $symsets \
|
||||||
|
| tar xf -
|
||||||
|
done
|
||||||
|
|
||||||
|
for symsets in /usr/src/kernels/*/symsets-*.tar.gz; do
|
||||||
|
zcat $symsets \
|
||||||
|
| tar xf -
|
||||||
|
done
|
||||||
|
|
||||||
|
for symsets in *; do
|
||||||
|
krel=${symsets#symsets-}
|
||||||
|
for symset in $symsets/*; do
|
||||||
|
class=${symset##*/} ; class=${class%.*}
|
||||||
|
hash=${symset##*.}
|
||||||
|
awk '
|
||||||
|
BEGIN { FS = "\t" ; OFS = "\t" }
|
||||||
|
{ sub(/0x0*/, "", $1)
|
||||||
|
print krel "/" $1 "/" $2, class, hash }
|
||||||
|
' krel="$krel" class="$class" hash="$hash" $symset
|
||||||
|
done
|
||||||
|
done
|
||||||
|
|
||||||
|
# vim:shiftwidth=4 softtabstop=4
|
Loading…
Reference in New Issue
Block a user