194 lines
8.9 KiB
Diff
194 lines
8.9 KiB
Diff
diff -urN a/buildflags.md b/buildflags.md
|
|
--- a/buildflags.md 2019-08-08 06:06:41.000000000 +0000
|
|
+++ b/buildflags.md 2019-08-09 06:55:22.060000000 +0000
|
|
@@ -208,7 +208,7 @@
|
|
|
|
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
|
|
+`-specs=/usr/lib/rpm/generic_os/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),
|
|
@@ -231,7 +231,7 @@
|
|
|
|
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
|
|
+annobin, the `-specs=/usr/lib/rpm/generic_os/redhat-annobin-cc1` flag is
|
|
added by default. This can be switched off by undefining the
|
|
`%_annotated_build` RPM macro (see above).
|
|
|
|
@@ -314,7 +314,7 @@
|
|
(optional, see above).
|
|
|
|
For hardened builds, the
|
|
-`-specs=/usr/lib/rpm/redhat/redhat-hardened-ld` flag is added to the
|
|
+`-specs=/usr/lib/rpm/generic_os/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:
|
|
diff -urN a/dist.sh b/dist.sh
|
|
--- a/dist.sh 2019-08-08 06:06:41.000000000 +0000
|
|
+++ b/dist.sh 2019-08-09 06:55:22.060000000 +0000
|
|
@@ -11,7 +11,7 @@
|
|
# If we successfully detect the version number, we output the
|
|
# dist tag. Otherwise, we exit with no output.
|
|
|
|
-RELEASEFILE=/etc/redhat-release
|
|
+RELEASEFILE=/etc/generic_os-release
|
|
|
|
function check_num {
|
|
MAINVER=`cut -d "(" -f 1 < $RELEASEFILE | \
|
|
diff -urN a/find-provides b/find-provides
|
|
--- a/find-provides 2019-08-08 06:06:41.000000000 +0000
|
|
+++ b/find-provides 2019-08-09 06:55:22.060000000 +0000
|
|
@@ -15,7 +15,7 @@
|
|
|
|
#
|
|
# --- any other extra find-provides scripts
|
|
-for i in /usr/lib/rpm/redhat/find-provides.d/*.prov
|
|
+for i in /usr/lib/rpm/generic_os/find-provides.d/*.prov
|
|
do
|
|
[ -x $i ] &&
|
|
(echo $filelist | tr '[:blank:]' \\n | $i | sort -u)
|
|
@@ -44,7 +44,7 @@
|
|
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
|
|
+[ -x /usr/lib/rpm/generic_os/find-provides.ksyms ] && [ "$is_kmod" ] &&
|
|
+ printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/generic_os/find-provides.ksyms
|
|
|
|
exit 0
|
|
diff -urN a/find-requires b/find-requires
|
|
--- a/find-requires 2019-08-08 06:06:41.000000000 +0000
|
|
+++ b/find-requires 2019-08-09 06:55:22.060000000 +0000
|
|
@@ -33,7 +33,7 @@
|
|
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
|
|
+#[ -x /usr/lib/rpm/generic_os/find-requires.ksyms ] && [ "$is_kmod" ] &&
|
|
+# printf "%s\n" "${filelist[@]}" | /usr/lib/rpm/generic_os/find-requires.ksyms
|
|
|
|
exit 0
|
|
diff -urN a/macros b/macros
|
|
--- a/macros 2019-08-08 06:06:41.000000000 +0000
|
|
+++ b/macros 2019-08-09 06:57:55.040000000 +0000
|
|
@@ -3,7 +3,7 @@
|
|
#==============================================================================
|
|
# ---- per-platform macros.
|
|
#
|
|
-%_vendor redhat
|
|
+%_vendor generic_os
|
|
%_os linux
|
|
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
|
|
|
|
@@ -77,7 +77,7 @@
|
|
%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 ; \
|
|
+ [ -f /usr/lib/rpm/generic_os/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/generic_os/$(basename $i) $i ; \
|
|
done ; \
|
|
[ "%_configure_libtool_hardening_hack" = 1 ] && [ x != "x%{_hardened_ldflags}" ] && \
|
|
for i in $(find . -name ltmain.sh) ; do \
|
|
@@ -136,7 +136,7 @@
|
|
|
|
# Build root policy macros. Standard naming:
|
|
# convert all '-' in basename to '_', add two leading underscores.
|
|
-%__brp_ldconfig /usr/lib/rpm/redhat/brp-ldconfig
|
|
+%__brp_ldconfig /usr/lib/rpm/generic_os/brp-ldconfig
|
|
%__brp_compress /usr/lib/rpm/brp-compress
|
|
%__brp_strip /usr/lib/rpm/brp-strip %{__strip}
|
|
%__brp_strip_comment_note /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump}
|
|
@@ -147,7 +147,7 @@
|
|
# __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}"}
|
|
+%__brp_mangle_shebangs /usr/lib/rpm/generic_os/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} \
|
|
@@ -193,9 +193,9 @@
|
|
# Use XZ compression for binary payloads
|
|
%_binary_payload w2.xzdio
|
|
|
|
-%_hardening_cflags -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
|
|
+%_hardening_cflags -specs=/usr/lib/rpm/generic_os/generic_os-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
|
|
+%_hardening_ldflags -Wl,-z,now -specs=/usr/lib/rpm/generic_os/generic_os-hardened-ld
|
|
|
|
# Harden packages by default for Fedora 23:
|
|
# https://fedorahosted.org/fesco/ticket/1384 (accepted on 2014-02-11)
|
|
@@ -204,12 +204,14 @@
|
|
%_hardened_cflags %{?_hardened_build:%{_hardening_cflags}}
|
|
%_hardened_ldflags %{?_hardened_build:%{_hardening_ldflags}}
|
|
|
|
-%_annobin_cflags -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
|
|
+#%_annobin_cflags -specs=/usr/lib/rpm/generic_os/generic_os-annobin-cc1
|
|
+%_annobin_cflags %{nil}
|
|
|
|
# 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_build 1
|
|
+%undefine _annotated_build
|
|
%_annotated_cflags %{?_annotated_build:%{_annobin_cflags}}
|
|
|
|
# Fail linking if there are undefined symbols. Required for proper
|
|
diff -urN a/macros.kmp b/macros.kmp
|
|
--- a/macros.kmp 2019-08-08 06:06:41.000000000 +0000
|
|
+++ b/macros.kmp 2019-08-09 06:55:22.060000000 +0000
|
|
@@ -2,8 +2,8 @@
|
|
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
|
|
+%__find_provides /usr/lib/rpm/generic_os/find-provides
|
|
+%__find_requires /usr/lib/rpm/generic_os/find-requires
|
|
|
|
#kernel_module_package [ -n name ] [ -v version ] [ -r release ] [ -s script ]
|
|
# [ -f filelist] [ -x ] [ -p preamble ] flavor flavor ...
|
|
@@ -12,10 +12,10 @@
|
|
kernel-devel
|
|
|
|
%kernel_module_package(n:v:r:s:f:xp:) %{expand:%( \
|
|
- %define kmodtool %{-s*}%{!-s:/usr/lib/rpm/redhat/kmodtool} \
|
|
+ %define kmodtool %{-s*}%{!-s:/usr/lib/rpm/generic_os/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) \
|
|
+ %define latest_kernel %(rpm -q --qf '%{VERSION}-%{RELEASE}\\\\n' `rpm -q kernel-devel | /usr/lib/rpm/generic_os/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" \
|
|
diff -urN a/redhat-rpm-config.spec b/redhat-rpm-config.spec
|
|
--- a/redhat-rpm-config.spec 2019-08-08 06:06:41.000000000 +0000
|
|
+++ b/redhat-rpm-config.spec 2019-08-09 06:55:22.060000000 +0000
|
|
@@ -110,7 +110,7 @@
|
|
|
|
Provides: system-rpm-config = %{version}-%{release}
|
|
|
|
-%global rrcdir /usr/lib/rpm/redhat
|
|
+%global rrcdir /usr/lib/rpm/generic_os
|
|
|
|
%description
|
|
Red Hat specific rpm configuration files.
|
|
@@ -952,7 +952,7 @@
|
|
|
|
* Mon Jul 7 2003 Jens Petersen <petersen@redhat.com> - 8.0.25-1
|
|
- update config.{guess,sub} to 2003-06-17
|
|
-- define VENDOR to be redhat only when /etc/redhat-release present
|
|
+- define VENDOR to be redhat only when /etc/generic_os-release present
|
|
[suggested by jbj]
|
|
- put VENDOR in vendor field in our config.guess file for
|
|
ia64, ppc, ppc64, s390, s390x, x86_64 and elf32-i386 Linux
|