|
@@ -1,14 +1,14 @@
|
|
|
%bcond_with gcc5
|
|
|
%bcond_with systemd
|
|
|
|
|
|
-%define glibcversion 2.33
|
|
|
+%define glibcversion 2.34
|
|
|
%define glibcsrcdir glibc-%{glibcversion}
|
|
|
|
|
|
Summary: The GNU libc libraries
|
|
|
Summary(ja): GNU libc ライブラリ
|
|
|
Name: glibc
|
|
|
Version: %{glibcversion}
|
|
|
-Release: 4%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
+Release: 1%{?_dist_release}%{?with_systemd:.systemd}
|
|
|
Group: system
|
|
|
Vendor: Project Vine
|
|
|
Distribution: Vine Linux
|
|
@@ -31,27 +31,42 @@ Source10: glibc-bench-compare
|
|
|
# SUPPORTED file is used below to generate the list of locale
|
|
|
# packages, using a Lua snippet.
|
|
|
Source11: SUPPORTED
|
|
|
+Source12: wrap-find-debuginfo.sh
|
|
|
|
|
|
Source1000: rpm-old-changelog.txt
|
|
|
|
|
|
-# patched form upstream
|
|
|
-Patch0: glibc-2.33-20210601.patch
|
|
|
+######################################################################
|
|
|
+# Activate the wrapper script for debuginfo generation, by rewriting
|
|
|
+# the definition of __debug_install_post.
|
|
|
+%{lua:
|
|
|
+local wrapper = rpm.expand("%{SOURCE12}")
|
|
|
+local sysroot = rpm.expand("%{glibc_sysroot}")
|
|
|
+local original = rpm.expand("%{macrobody:__debug_install_post}")
|
|
|
+-- Strip leading newline. It confuses the macro redefinition.
|
|
|
+-- Avoid embedded newlines that confuse the macro definition.
|
|
|
+original = original:match("^%s*(.-)%s*$"):gsub("\\\n", "")
|
|
|
+rpm.define("__debug_install_post bash " .. wrapper
|
|
|
+ .. " " .. sysroot .. " " .. original)
|
|
|
+}
|
|
|
+
|
|
|
+# The wrapper script relies on the fact that debugedit does not change
|
|
|
+# build IDs.
|
|
|
+%define _no_recompute_build_ids 1
|
|
|
+%undefine _unique_build_ids
|
|
|
+
|
|
|
+# patch form upstream
|
|
|
+#Patch0: glibc-2.33-20210601.patch
|
|
|
|
|
|
# patches from Fedora
|
|
|
#Patch1: glibc-post_upgrade.patch
|
|
|
Patch2: glibc-fedora-nscd.patch
|
|
|
-Patch3: glibc-rh697421.patch
|
|
|
Patch4: glibc-fedora-linux-tcsetattr.patch
|
|
|
-#Patch5: glibc-rh741105.patch
|
|
|
Patch6: glibc-fedora-localedef.patch
|
|
|
-#Patch7: glibc-fedora-nis-rh188246.patch
|
|
|
Patch8: glibc-fedora-manual-dircategory.patch
|
|
|
Patch9: glibc-rh827510.patch
|
|
|
# needed by build-locale-archive.c
|
|
|
Patch10: glibc-fedora-locarchive.patch
|
|
|
-Patch12: glibc-rh819430.patch
|
|
|
Patch13: glibc-fedora-localedata-rh61908.patch
|
|
|
-#Patch14: glibc-fedora-__libc_multiple_libcs.patch
|
|
|
Patch15: glibc-rh1070416.patch
|
|
|
Patch16: glibc-nscd-sysconfig.patch
|
|
|
Patch17: glibc-cs-path.patch
|
|
@@ -63,8 +78,6 @@ Patch29: glibc-fedora-nsswitch.patch
|
|
|
#Patch10001: glibc-2.18-vine-build-env.patch
|
|
|
|
|
|
# security
|
|
|
-Patch20000: CVE-2021-33574_1.patch
|
|
|
-Patch20001: CVE-2021-33574_2.patch
|
|
|
|
|
|
%define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
|
|
|
|
|
@@ -122,6 +135,7 @@ BuildRequires: /bin/ps, /bin/kill, /bin/awk
|
|
|
# This is to ensure that __frame_state_for is exported by glibc
|
|
|
# will be compatible with egcs 1.x.y
|
|
|
BuildRequires: gcc >= 3.2
|
|
|
+BuildRequires: dwz
|
|
|
%define enablekernel 3.2
|
|
|
Conflicts: kernel < %{enablekernel}
|
|
|
%ifarch i386
|
|
@@ -158,10 +172,6 @@ BuildRequires: gcc >= 3.2.1-5
|
|
|
%ifarch ppc s390 s390x
|
|
|
BuildRequires: gcc >= 4.1.0-0.17
|
|
|
%endif
|
|
|
-%if 0%{?_enable_debug_packages}
|
|
|
-BuildRequires: elfutils >= 0.72
|
|
|
-BuildRequires: rpm >= 4.2-0.56
|
|
|
-%endif
|
|
|
|
|
|
# The testsuite builds static C++ binaries that require a static
|
|
|
# C++ runtime from libstdc++-static.
|
|
@@ -454,54 +464,8 @@ xtrace (関数呼出しトレーサ)。
|
|
|
これらが必要かどうか分からない場合は、インストールする必要はありません。
|
|
|
|
|
|
|
|
|
-%if 0%{?_enable_debug_packages}
|
|
|
-%define debug_package %{nil}
|
|
|
-%define __debug_install_post %{nil}
|
|
|
-%global __debug_package 1
|
|
|
-# Disable thew new features that glibc packages don't use.
|
|
|
-%undefine _debugsource_packages
|
|
|
-%undefine _debuginfo_subpackages
|
|
|
-%undefine _unique_debug_names
|
|
|
-%undefine _unique_debug_srcs
|
|
|
-
|
|
|
-%package debuginfo
|
|
|
-Summary: Debug information for package %{name}
|
|
|
-Group: Development/Debug
|
|
|
-AutoReqProv: no
|
|
|
-%ifarch %{debuginfocommonarches}
|
|
|
-Requires: glibc-debuginfo-common = %{version}-%{release}
|
|
|
-%else
|
|
|
-%ifarch %{ix86}
|
|
|
-Obsoletes: glibc-debuginfo-common
|
|
|
-%endif
|
|
|
-%endif
|
|
|
-
|
|
|
-%description debuginfo
|
|
|
-This package provides debug information for package %{name}.
|
|
|
-Debug information is useful when developing applications that use this
|
|
|
-package or when debugging this package.
|
|
|
+%debug_package
|
|
|
|
|
|
-This package also contains static standard C libraries with
|
|
|
-debugging information. You need this only if you want to step into
|
|
|
-C library routines during debugging programs statically linked against
|
|
|
-one or more of the standard C libraries.
|
|
|
-To use this debugging information, you need to link binaries
|
|
|
-with -static -L%{_prefix}/lib/debug%{_prefix}/%{_lib} compiler options.
|
|
|
-
|
|
|
-%ifarch %{debuginfocommonarches}
|
|
|
-
|
|
|
-%package debuginfo-common
|
|
|
-Summary: Debug information for package %{name}
|
|
|
-Group: Development/Debug
|
|
|
-AutoReqProv: no
|
|
|
-
|
|
|
-%description debuginfo-common
|
|
|
-This package provides debug information for package %{name}.
|
|
|
-Debug information is useful when developing applications that use this
|
|
|
-package or when debugging this package.
|
|
|
-
|
|
|
-%endif
|
|
|
-%endif
|
|
|
|
|
|
%prep
|
|
|
%autosetup -n %{glibcsrcdir} -p1
|
|
@@ -891,21 +855,6 @@ truncate -s 0 %{glibc_sysroot}/etc/gai.conf
|
|
|
truncate -s 0 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache
|
|
|
chmod 644 %{glibc_sysroot}%{_libdir}/gconv/gconv-modules.cache
|
|
|
|
|
|
-##############################################################################
|
|
|
-# Install debug copies of unstripped static libraries
|
|
|
-# - This step must be last in order to capture any additional static
|
|
|
-# archives we might have added.
|
|
|
-##############################################################################
|
|
|
-
|
|
|
-# If we are building a debug package then copy all of the static archives
|
|
|
-# into the debug directory to keep them as unstripped copies.
|
|
|
-%if 0%{?_enable_debug_packages}
|
|
|
-mkdir -p %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}
|
|
|
-cp -a %{glibc_sysroot}%{_libdir}/*.a \
|
|
|
- %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}/
|
|
|
-rm -f %{glibc_sysroot}%{_prefix}/lib/debug%{_libdir}/*_p.a
|
|
|
-%endif
|
|
|
-
|
|
|
# Remove any zoneinfo files; they are maintained by tzdata.
|
|
|
rm -rf %{glibc_sysroot}%{_prefix}/share/zoneinfo
|
|
|
|
|
@@ -961,7 +910,6 @@ cp benchtests/scripts/import_bench.py %{glibc_sysroot}%{_prefix}/libexec/glibc-b
|
|
|
cp benchtests/scripts/validate_benchout.py %{glibc_sysroot}%{_prefix}/libexec/glibc-benchtests/
|
|
|
%endif
|
|
|
|
|
|
-%if 0%{?_enable_debug_packages}
|
|
|
# The #line directives gperf generates do not give the proper
|
|
|
# file name relative to the build directory.
|
|
|
pushd locale
|
|
@@ -970,7 +918,6 @@ popd
|
|
|
pushd iconv
|
|
|
ln -sf ../locale/programs/charmap-kw.gperf .
|
|
|
popd
|
|
|
-%endif # %{?_enable_debug_packages}
|
|
|
|
|
|
%if %{with docs}
|
|
|
# Remove the `dir' info-heirarchy file which will be maintained
|
|
@@ -995,22 +942,6 @@ mv -f %{glibc_sysroot}/%{_lib}/lib{pcprofile,memusage}.so \
|
|
|
# Strip all of the installed object files.
|
|
|
strip -g %{glibc_sysroot}%{_libdir}/*.o
|
|
|
|
|
|
-###############################################################################
|
|
|
-# Rebuild libpthread.a using --whole-archive to ensure all of libpthread
|
|
|
-# is included in a static link. This prevents any problems when linking
|
|
|
-# statically, using parts of libpthread, and other necessary parts not
|
|
|
-# being included. Upstream has decided that this is the wrong approach to
|
|
|
-# this problem and that the full set of dependencies should be resolved
|
|
|
-# such that static linking works and produces the most minimally sized
|
|
|
-# static application possible.
|
|
|
-###############################################################################
|
|
|
-pushd %{glibc_sysroot}%{_prefix}/%{_lib}/
|
|
|
-$GCC -r -nostdlib -o libpthread.o -Wl,--whole-archive ./libpthread.a
|
|
|
-rm libpthread.a
|
|
|
-ar rcs libpthread.a libpthread.o
|
|
|
-rm libpthread.o
|
|
|
-popd
|
|
|
-
|
|
|
# The xtrace and memusage scripts have hard-coded paths that need to be
|
|
|
# translated to a correct set of paths using the $LIB token which is
|
|
|
# dynamically translated by ld.so as the default lib directory.
|
|
@@ -1069,10 +1000,6 @@ ar cr %{glibc_sysroot}%{_prefix}/%{_lib}/libpthread_nonshared.a
|
|
|
# - File list with the .so symbolic links for NSS packages.
|
|
|
# * compat-libpthread-nonshared.filelist.
|
|
|
# - File list for compat-libpthread-nonshared subpackage.
|
|
|
-# * debuginfo.filelist
|
|
|
-# - Files for the glibc debuginfo package.
|
|
|
-# * debuginfocommon.filelist
|
|
|
-# - Files for the glibc common debuginfo package.
|
|
|
#
|
|
|
|
|
|
# Create the main file lists. This way we can append to any one of them later
|
|
@@ -1091,8 +1018,6 @@ touch nss_db.filelist
|
|
|
touch nss_hesiod.filelist
|
|
|
touch nss-devel.filelist
|
|
|
touch compat-libpthread-nonshared.filelist
|
|
|
-touch debuginfo.filelist
|
|
|
-touch debuginfocommon.filelist
|
|
|
|
|
|
###############################################################################
|
|
|
# Master file list, excluding a few things.
|
|
@@ -1206,7 +1131,7 @@ grep '%{_infodir}' master.filelist | grep -v '%{_infodir}/dir' > devel.filelist
|
|
|
|
|
|
# Put some static files into the devel package.
|
|
|
grep '%{_libdir}/lib.*\.a' master.filelist \
|
|
|
- | grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
|
|
|
+ | grep '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\|pthread\|dl\|rt\|util\|anl\)\.a$' \
|
|
|
>> devel.filelist
|
|
|
|
|
|
# Put all of the object files and *.so (not the versioned ones) into the
|
|
@@ -1243,7 +1168,7 @@ grep '%{_prefix}/include' < master.filelist \
|
|
|
|
|
|
# Put the rest of the static files into the static package.
|
|
|
grep '%{_libdir}/lib.*\.a' < master.filelist \
|
|
|
- | grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\)\.a$' \
|
|
|
+ | grep -v '/lib\(\(c\|pthread\|nldbl\|mvec\)_nonshared\|g\|ieee\|mcheck\|pthread\|dl\|rt\|util\|anl\)\.a$' \
|
|
|
> static.filelist
|
|
|
|
|
|
###############################################################################
|
|
@@ -1320,9 +1245,8 @@ grep '/libnss_[a-z]*\.so$' master.filelist >> devel.filelist
|
|
|
###############################################################################
|
|
|
|
|
|
# Prepare the libnsl-related file lists.
|
|
|
-grep '/libnsl-[0-9.]*.so$' master.filelist > libnsl.filelist
|
|
|
+grep -E '/libnsl\.so\.[0-9]+$' master.filelist > libnsl.filelist
|
|
|
test $(wc -l < libnsl.filelist) -eq 1
|
|
|
-grep '/libnsl-[0-9.]*.so$' master.filelist >> devel.filelist
|
|
|
|
|
|
###############################################################################
|
|
|
# glibc-benchtests
|
|
@@ -1349,114 +1273,6 @@ echo "%{_prefix}/libexec/glibc-benchtests/validate_benchout.py*" >> benchtests.f
|
|
|
###############################################################################
|
|
|
echo "%{_libdir}/libpthread_nonshared.a" >> compat-libpthread-nonshared.filelist
|
|
|
|
|
|
-###############################################################################
|
|
|
-# glibc-debuginfocommon, and glibc-debuginfo
|
|
|
-###############################################################################
|
|
|
-%if 0%{?_enable_debug_packages}
|
|
|
-
|
|
|
-find_debuginfo_args='--strict-build-id -g'
|
|
|
-%ifarch %{debuginfocommonarches}
|
|
|
-find_debuginfo_args="$find_debuginfo_args \
|
|
|
- -l common.filelist \
|
|
|
- -l utils.filelist \
|
|
|
- -l nscd.filelist \
|
|
|
- -p '.*/(sbin|libexec)/.*' \
|
|
|
- -o debuginfocommon.filelist \
|
|
|
- -l nss_db.filelist -l nss_hesiod.filelist \
|
|
|
- -l libnsl.filelist -l glibc.filelist \
|
|
|
-%if %{with benchtests}
|
|
|
- -l benchtests.filelist
|
|
|
-%endif
|
|
|
- "
|
|
|
-%endif
|
|
|
-
|
|
|
-/usr/lib/rpm/find-debuginfo.sh $find_debuginfo_args -o debuginfo.filelist
|
|
|
-
|
|
|
-# List all of the *.a archives in the debug directory.
|
|
|
-list_debug_archives()
|
|
|
-{
|
|
|
- local dir=%{_prefix}/lib/debug%{_libdir}
|
|
|
- find %{glibc_sysroot}$dir -name "*.a" -printf "$dir/%%P\n"
|
|
|
-}
|
|
|
-
|
|
|
-%ifarch %{debuginfocommonarches}
|
|
|
-
|
|
|
-# Remove the source files from the common package debuginfo.
|
|
|
-sed -i '\#^%{glibc_sysroot}%{_prefix}/src/debug/#d' debuginfocommon.filelist
|
|
|
-
|
|
|
-# Create a list of all of the source files we copied to the debug directory.
|
|
|
-find %{glibc_sysroot}%{_prefix}/src/debug \
|
|
|
- \( -type d -printf '%%%%dir ' \) , \
|
|
|
- -printf '%{_prefix}/src/debug/%%P\n' > debuginfocommon.sources
|
|
|
-
|
|
|
-%ifarch %{biarcharches}
|
|
|
-
|
|
|
-# Add the source files to the core debuginfo package.
|
|
|
-cat debuginfocommon.sources >> debuginfo.filelist
|
|
|
-
|
|
|
-%else
|
|
|
-
|
|
|
-%ifarch %{ix86}
|
|
|
-%define basearch i686
|
|
|
-%endif
|
|
|
-%ifarch sparc sparcv9
|
|
|
-%define basearch sparc
|
|
|
-%endif
|
|
|
-
|
|
|
-# The auxarches get only these few source files.
|
|
|
-auxarches_debugsources=\
|
|
|
-'/(generic|linux|%{basearch}|nptl(_db)?)/|/%{glibcsrcdir}/build|/dl-osinfo\.h'
|
|
|
-
|
|
|
-# Place the source files into the core debuginfo pakcage.
|
|
|
-egrep "$auxarches_debugsources" debuginfocommon.sources >> debuginfo.filelist
|
|
|
-
|
|
|
-# Remove the source files from the common debuginfo package.
|
|
|
-egrep -v "$auxarches_debugsources" \
|
|
|
- debuginfocommon.sources >> debuginfocommon.filelist
|
|
|
-
|
|
|
-%endif # %{biarcharches}
|
|
|
-
|
|
|
-# Add the list of *.a archives in the debug directory to
|
|
|
-# the common debuginfo package.
|
|
|
-list_debug_archives >> debuginfocommon.filelist
|
|
|
-
|
|
|
-%endif # %{debuginfocommonarches}
|
|
|
-
|
|
|
-# Remove some common directories from the common package debuginfo so that we
|
|
|
-# don't end up owning them.
|
|
|
-exclude_common_dirs()
|
|
|
-{
|
|
|
- exclude_dirs="%{_prefix}/src/debug"
|
|
|
- exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug{,/%{_lib},/bin,/sbin})"
|
|
|
- exclude_dirs="$exclude_dirs $(echo %{_prefix}/lib/debug%{_prefix}{,/%{_lib},/libexec,/bin,/sbin})"
|
|
|
-
|
|
|
- for d in $(echo $exclude_dirs | sed 's/ /\n/g'); do
|
|
|
- sed -i "\|^%%dir $d/\?$|d" $1
|
|
|
- done
|
|
|
-}
|
|
|
-
|
|
|
-%ifarch %{debuginfocommonarches}
|
|
|
-exclude_common_dirs debuginfocommon.filelist
|
|
|
-%endif
|
|
|
-exclude_common_dirs debuginfo.filelist
|
|
|
-
|
|
|
-##############################################################################
|
|
|
-# Delete files that we do not intended to ship with the auxarch.
|
|
|
-# This is the only place where we touch the installed files after generating
|
|
|
-# the file lists.
|
|
|
-##############################################################################
|
|
|
-%ifarch %{auxarches}
|
|
|
-echo Cutting down the list of unpackaged files
|
|
|
-sed -e '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //;s#^/*##' \
|
|
|
- common.filelist devel.filelist static.filelist headers.filelist \
|
|
|
- utils.filelist nscd.filelist \
|
|
|
-%ifarch %{debuginfocommonarches}
|
|
|
- debuginfocommon.filelist \
|
|
|
-%endif
|
|
|
- | (cd %{glibc_sysroot}; xargs --no-run-if-empty rm -f 2> /dev/null || :)
|
|
|
-%endif # %{auxarches}
|
|
|
-
|
|
|
-%endif # %{?_enable_debug_packages}
|
|
|
|
|
|
%check
|
|
|
%if %{with testsuite}
|
|
@@ -1600,8 +1416,12 @@ install_libs = { "anl", "BrokenLocale", "c", "dl", "m", "mvec",
|
|
|
-- match "libc-2.0.so" and so on up to "libc-9.9*".
|
|
|
remove_regexps = {}
|
|
|
for i = 1, #install_libs do
|
|
|
- remove_regexps[i] = ("lib" .. install_libs[i]
|
|
|
- .. "%%-[2-9]%%.[0-9]+%%.so$")
|
|
|
+ -- Versioned install name.
|
|
|
+ remove_regexps[#remove_regexps + 1] = ("lib" .. install_libs[i]
|
|
|
+ .. "%%-[2-9]%%.[0-9]+%%.so$")
|
|
|
+ -- Unversioned install name.
|
|
|
+ remove_regexps[#remove_regexps + 1] = ("lib" .. install_libs[i]
|
|
|
+ .. "%%.so%%.[0-9]+$")
|
|
|
end
|
|
|
|
|
|
-- Two exceptions:
|
|
@@ -1613,7 +1433,23 @@ local remove_dirs = { "%{_libdir}/i686",
|
|
|
"%{_libdir}/i686/nosegneg",
|
|
|
"%{_libdir}/power6",
|
|
|
"%{_libdir}/power7",
|
|
|
- "%{_libdir}/power8" }
|
|
|
+ "%{_libdir}/power8",
|
|
|
+ "%{_libdir}/power9" }
|
|
|
+
|
|
|
+-- Add all the subdirectories of the glibc-hwcaps subdirectory.
|
|
|
+repeat
|
|
|
+ local iter = posix.files("%{_libdir}/glibc-hwcaps")
|
|
|
+ if iter ~= nil then
|
|
|
+ for entry in iter do
|
|
|
+ if entry ~= "." and entry ~= ".." then
|
|
|
+ local path = "%{_libdir}/glibc-hwcaps/" .. entry
|
|
|
+ if posix.access(path .. "/.", "x") then
|
|
|
+ remove_dirs[#remove_dirs + 1] = path
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
+until true
|
|
|
|
|
|
-- Walk all the directories with files we need to remove...
|
|
|
for _, rdir in ipairs (remove_dirs) do
|
|
@@ -1957,18 +1793,13 @@ rm -f *.filelist*
|
|
|
%ghost %config(missingok,noreplace) /etc/sysconfig/nscd
|
|
|
%endif
|
|
|
|
|
|
-%if 0%{?_enable_debug_packages}
|
|
|
-%files debuginfo -f debuginfo.filelist
|
|
|
-%defattr(-,root,root)
|
|
|
-%ifarch %{debuginfocommonarches}
|
|
|
-%ifnarch %{auxarches}
|
|
|
-%files debuginfo-common -f debuginfocommon.filelist
|
|
|
-%defattr(-,root,root)
|
|
|
-%endif
|
|
|
-%endif
|
|
|
-%endif
|
|
|
|
|
|
%changelog
|
|
|
+* Wed Aug 04 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.34-1
|
|
|
+- updated to 2.34.
|
|
|
+- dropped Patch0, 3 and 12.
|
|
|
+- dropped Patch20000 and 20001: fixed in upstream.
|
|
|
+
|
|
|
* Thu Jun 03 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.33-4
|
|
|
- updated Patch0.
|
|
|
- imported Patch20000 and 20001 from upstream to fix CVE-2021-33574.
|