Accepting request 594081 from Virtualization:containers

- Fix build to correctly build a static binary (which will allow it to work in
  all containers). This was caused by forgetting to include
  'glibc-devel-static'. I've added a check to ensure it doesn't happen by
  accident again.
- Add catatonit-rpmlintrc to include filters for "static binary" warnings,
  since this is intentional.

OBS-URL: https://build.opensuse.org/request/show/594081
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/catatonit?expand=0&rev=3
This commit is contained in:
Yuchen Lin 2018-04-10 07:52:50 +00:00 committed by Git OBS Bridge
commit b233edf884
3 changed files with 20 additions and 0 deletions

3
catatonit-rpmlintrc Normal file
View File

@ -0,0 +1,3 @@
# We need catatonit to be statically linked.
addFilter ("^catatonit.*: W: statically-linked-binary /usr/bin/catatonit")
addFilter ("^catatonit.*: W: position-independent-executable-suggested /usr/bin/catatonit")

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Fri Apr 6 18:31:08 UTC 2018 - asarai@suse.com
- Fix build to correctly build a static binary (which will allow it to work in
all containers). This was caused by forgetting to include
'glibc-devel-static'. I've added a check to ensure it doesn't happen by
accident again.
- Add catatonit-rpmlintrc to include filters for "static binary" warnings,
since this is intentional.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Apr 3 23:27:27 UTC 2018 - jengelh@inai.de Tue Apr 3 23:27:27 UTC 2018 - jengelh@inai.de

View File

@ -26,9 +26,12 @@ Url: https://github.com/openSUSE/catatonit
Source0: %{name}-%{version}.tar.xz Source0: %{name}-%{version}.tar.xz
Source1: %{name}-%{version}.tar.xz.asc Source1: %{name}-%{version}.tar.xz.asc
Source2: %{name}.keyring Source2: %{name}.keyring
Source3: %{name}-rpmlintrc
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: file
BuildRequires: gcc BuildRequires: gcc
BuildRequires: glibc-devel-static
BuildRequires: libtool BuildRequires: libtool
%description %description
@ -49,6 +52,10 @@ autoreconf -fi
%configure %configure
make %{?_smp_mflags} make %{?_smp_mflags}
# Make sure we *always* build a static binary. Otherwise we'll break containers
# that don't have the necessary shared libs.
file ./%{name} | grep 'statically linked'
%install %install
%make_install %make_install
ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/docker-init ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/docker-init