Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'jb45224' into 'master'
Add debuginfo handling. Supersedes https://git.merproject.org/mer-core/glibc/merge_requests/22

See merge request mer-core/glibc!23
  • Loading branch information
Matti Kosola committed Mar 27, 2019
2 parents 462a74e + 4e11813 commit 4c941e2
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 34 deletions.
3 changes: 3 additions & 0 deletions glibc.changes
@@ -1,3 +1,6 @@
* Wed Mar 27 2019 Marko Kenttälä <marko.kenttala@jolla.com> - 2.25+git5
- Added debuginfo handling, fixes jb#45224

* Fri Mar 15 2019 Marko Saukko <marko.saukko@jolla.com> - 2.25+git4
- Apply 2.25.6 patch set from ubuntu. Contributes to JB#45152
- Fixes CVE-2017-15670, CVE-2017-15671, CVE-2017-15804,
Expand Down
56 changes: 22 additions & 34 deletions glibc.spec
@@ -1,7 +1,9 @@
%define glibcsrcdir glibc-2.25

Name: glibc

Summary: GNU C library shared libraries
Version: 2.25+git4
Version: 2.25+git5
Release: 0
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Group: System/Libraries
Expand Down Expand Up @@ -167,16 +169,6 @@ which can be helpful during program debugging.

If unsure if you need this, don't install this package.

%package debug
Summary: Debug libraries from GNU C library
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description debug
The glibc-debug package contains debug libraries.

If unsure if you need this, don't install this package.

%package doc
Summary: Documentation for %{name}
Group: Documentation
Expand All @@ -186,10 +178,10 @@ Requires: %{name} = %{version}-%{release}
%{summary}.

%prep
rm -rf glibc-2.25
%setup -q -n %{glibcsrcdir}
xz -dc %SOURCE0 | tar -x

cd glibc-2.25
cd %{glibcsrcdir}
%patch1 -p2
%ifarch %{arm}
%patch2 -p1
Expand Down Expand Up @@ -241,7 +233,7 @@ build_CFLAGS="$BuildFlags -O3"

export MAKEINFO=:

../glibc-2.25/configure CC="$GCC" CXX="$GXX" CFLAGS="$build_CFLAGS" \
../%{glibcsrcdir}/configure CC="$GCC" CXX="$GXX" CFLAGS="$build_CFLAGS" \
--prefix=%{_prefix} \
"--enable-add-ons=libidn" --without-cvs $EnableKernel \
--enable-bind-now --with-tls \
Expand All @@ -261,19 +253,19 @@ $GCC -Os -static -o build-locale-archive %SOURCE11 \
./build-%{name}-%{version}/locale/locarchive.o \
./build-%{name}-%{version}/locale/md5.o \
-DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \
-L./build-%{name}-%{version} -Iglibc-2.25
-L./build-%{name}-%{version} -I%{glibcsrcdir}

%install
rm -rf ${RPM_BUILD_ROOT}
cd build-%{name}-%{version}
make -j1 install_root=${RPM_BUILD_ROOT} install

install -p -m 644 ../glibc-2.25/nss/nsswitch.conf $RPM_BUILD_ROOT/etc/nsswitch.conf
install -p -m 644 ../%{glibcsrcdir}/nss/nsswitch.conf $RPM_BUILD_ROOT/etc/nsswitch.conf

mkdir -p $RPM_BUILD_ROOT/etc/default
install -p -m 644 ../glibc-2.25/nis/nss $RPM_BUILD_ROOT/etc/default/nss
install -p -m 644 ../%{glibcsrcdir}/nis/nss $RPM_BUILD_ROOT/etc/default/nss

install -m 644 ../glibc-2.25/nscd/nscd.conf $RPM_BUILD_ROOT/etc
install -m 644 ../%{glibcsrcdir}/nscd/nscd.conf $RPM_BUILD_ROOT/etc

# Include ld.so.conf
echo 'include /etc/ld.so.conf.d/*.conf' > $RPM_BUILD_ROOT/etc/ld.so.conf
Expand Down Expand Up @@ -416,21 +408,21 @@ rm -rf $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo
# the last bit: more documentation
rm -rf ../documentation
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
bzip2 -9 ../glibc-2.25/ChangeLog*
bzip2 -9 ../%{glibcsrcdir}/ChangeLog*
install -m0644 -t $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} \
../glibc-2.25/crypt/README.ufc-crypt \
../glibc-2.25/ChangeLog{,.16,.17}.bz2 \
../glibc-2.25/posix/gai.conf \
../glibc-2.25/README \
../glibc-2.25/NEWS \
../glibc-2.25/INSTALL \
../glibc-2.25/BUGS \
../glibc-2.25/CONFORMANCE \
../glibc-2.25/hesiod/README.hesiod
install -m0644 ../glibc-2.25/timezone/README \
../%{glibcsrcdir}/crypt/README.ufc-crypt \
../%{glibcsrcdir}/ChangeLog{,.16,.17}.bz2 \
../%{glibcsrcdir}/posix/gai.conf \
../%{glibcsrcdir}/README \
../%{glibcsrcdir}/NEWS \
../%{glibcsrcdir}/INSTALL \
../%{glibcsrcdir}/BUGS \
../%{glibcsrcdir}/CONFORMANCE \
../%{glibcsrcdir}/hesiod/README.hesiod
install -m0644 ../%{glibcsrcdir}/timezone/README \
$RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/README.timezone

cp ../glibc-2.25/{COPYING,COPYING.LIB,LICENSES} ..
cp ../%{glibcsrcdir}/{COPYING,COPYING.LIB,LICENSES} ..

%if 0%{run_glibc_tests}

Expand Down Expand Up @@ -569,10 +561,6 @@ fi
%ghost %config(missingok,noreplace) /etc/sysconfig/nscd
%endif

%files debug
%defattr(-,root,root)
%{_prefix}/%{_lib}/debug/usr/lib/*

%files doc
%defattr(-,root,root)
%{_docdir}/%{name}-%{version}

0 comments on commit 4c941e2

Please sign in to comment.