Skip to content

Commit

Permalink
- rel 9; setenv (..., NULL, ...) is undefined behaviour and such beha…
Browse files Browse the repository at this point in the history
…viour is to segfault in glibc >= 2.22
  • Loading branch information
arekm committed Sep 14, 2015
1 parent 67e6053 commit 15f4d0b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions poldek-setenv-null.patch
@@ -0,0 +1,12 @@
--- poldek-0.30.1/pkgdir/pkgdir.c~ 2014-03-25 23:32:25.000000000 +0100
+++ poldek-0.30.1/pkgdir/pkgdir.c 2015-09-14 14:16:12.282109741 +0200
@@ -274,7 +274,8 @@ const struct pkgdir_module *find_module(
static void env_source(const struct source *src, const char *idxpath)
{
setenv("POLDEK_SOURCE_PATH", idxpath, 1);
- setenv("POLDEK_SOURCE_PREFIX", src->pkg_prefix, 1);
+ if (src->pkg_prefix)
+ setenv("POLDEK_SOURCE_PREFIX", src->pkg_prefix, 1);
setenv("POLDEK_SOURCE_TYPE", src->type, 1);
if (src->name)
setenv("POLDEK_SOURCE_NAME", src->name, 1);
4 changes: 3 additions & 1 deletion poldek.spec
Expand Up @@ -30,7 +30,7 @@
%define ver_rpm 5.4.10
%endif

%define rel 8
%define rel 9
Summary: RPM packages management helper tool
Summary(hu.UTF-8): RPM csomagkezelést segítő eszköz
Summary(pl.UTF-8): Pomocnicze narzędzie do zarządzania pakietami RPM
Expand Down Expand Up @@ -58,6 +58,7 @@ Patch0: %{name}-size-type.patch
Patch1: %{name}-config.patch
Patch2: %{name}-missing-include.patch
Patch3: pm-hooks.patch
Patch4: poldek-setenv-null.patch
URL: http://poldek.pld-linux.org/
BuildRequires: %{db_pkg}-devel >= %{ver_db}-%{ver_db_rel}
BuildRequires: autoconf
Expand Down Expand Up @@ -223,6 +224,7 @@ Moduły języka Python dla poldka.
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1

%{__rm} m4/libtool.m4 m4/lt*.m4

Expand Down

0 comments on commit 15f4d0b

Please sign in to comment.