Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0WrF-0003Og-59 for pgsql-pkg-yum@arkaria.postgresql.org; Mon, 26 Mar 2018 18:28:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f0WrE-0002dI-2r for pgsql-pkg-yum@arkaria.postgresql.org; Mon, 26 Mar 2018 18:28:36 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0WrD-0002d1-Q5 for pgsql-pkg-yum@lists.postgresql.org; Mon, 26 Mar 2018 18:28:35 +0000 Received: from mail-yw0-x22f.google.com ([2607:f8b0:4002:c05::22f]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1f0WrB-0005k6-0i for pgsql-pkg-yum@postgresql.org; Mon, 26 Mar 2018 18:28:34 +0000 Received: by mail-yw0-x22f.google.com with SMTP id z21so6428584ywg.11 for ; Mon, 26 Mar 2018 11:28:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citusdata.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WmEqkwShfjmHkoLSEp80BuucGS7DSs/YWWAnjXCC2E0=; b=aZNgGf0uHvd1HE042v8j2Qpb1Ve+1qzxlpct9Jl4eOt78eQDImOixPUpCtqu6fXzJ0 OMZJ2yVAR5kpGz22WIeNCocG5ICLb3rG/AEFjzfWzq1AKz1JiGEYVPndIA8oNid/YkCk HaP5SmvNrS0pQHDSW6+K55+eMjW7Z8ZzE+h/U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WmEqkwShfjmHkoLSEp80BuucGS7DSs/YWWAnjXCC2E0=; b=USvlIybmSqpvj6UbscbJks4qFIn5TmB3IKDDZItRRTVmHw96/iwckXkiw/ErtwoSBD nZCvmdXCEyrx3+c9IsXTQevGdTLnMWzpI/jmwTt529E3iETilKP8RNptUEsiXNQx9bDY dNyrhOcsELM6zxbtqD9viMVw7MjRuqj2hXh3WMviVOKjfcVgYxu+zalnMWR6CVLQnDeu e2EGFZ+FE0G7kPL0ROnWfyo6g869n4NulVC1aJsT1zb44bfl8+97m432If24G8Y7ROI3 yRwrTtDKo0YQqTCbN9NN/qDmSlLpPsI9ZbzvM7vAk64E48rZkWWS9pvzHOxx9J/fnrEz h4DA== X-Gm-Message-State: AElRT7Gzi9CANSKPVeHF0rCEKe/+kjCVvjLIWdCOvKImohNYFbEBpaxE /k4r5tbVcK2WuAPyG9Z68PMqL05o4fX1kayve8Pfzg== X-Google-Smtp-Source: AG47ELtTFguP3IwUqUsjgBo5D5aE84LZIsvq/DnRXLoXoHV1OPvbndACueDxH0pIjOBshkbxE8+qd1OID/KAHIe7BsM= X-Received: by 10.129.2.133 with SMTP id 127mr23059960ywc.128.1522088911249; Mon, 26 Mar 2018 11:28:31 -0700 (PDT) MIME-Version: 1.0 References: <3121414.gbAxY14dXi@nb.usersys.redhat.com> In-Reply-To: From: Daniel Farina Date: Mon, 26 Mar 2018 18:28:20 +0000 Message-ID: Subject: Re: How are debuginfo packages generated? To: Pavel Raiskup Cc: pgsql-pkg-yum@lists.postgresql.org, Craig Ringer , pgsql-pkg-yum Content-Type: multipart/alternative; boundary="001a1140c56edf3599056854f043" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --001a1140c56edf3599056854f043 Content-Type: text/plain; charset="UTF-8" On Mon, Jan 8, 2018 at 3:50 PM Daniel Farina wrote: > On Fri, Jan 5, 2018 at 10:48 PM Pavel Raiskup wrote: > >> On Saturday, January 6, 2018 6:52:12 AM CET Daniel Farina wrote: >> > On Fri, Jan 5, 2018 at 9:50 PM Craig Ringer >> wrote: >> > >> > > On 6 January 2018 at 06:30, Daniel Farina >> wrote: >> > > >> > >> Hello, >> > >> >> > >> For quite some time, I've been building lightly modified PGDG >> packages, >> > >> but I have never figured how PGDG's yum repo gets debuginfo >> packages. When >> > >> I have built them, unless I hack up the spec file to have >> "%debug_package" >> > >> I do not get such a debuginfo package. Clearly, that is not how the >> spec >> > >> files work as-is in pgrpms. >> > >> >> > > >> > > How do you invoke rpmbuild? >> > > >> > >> > Via make nopreprpm10. >> >> I've never heard about nopreprpm10, but it is more important to say where >> you build the package because debuginfo generator is tightly dependant on >> the _setup_ in packages like 'rpm', 'redhat-rpm-config', etc. >> >> Have a look at `rpm --eval %debug_package` output to see what happens >> there, and to see why it is needed. Then, study your system/user rpm >> macros. >> On my system (Fedora 27 x86_64), there's is (in >> /usr/lib/rpm/redhat/macros): >> > > Seems to me _enable_debug_packages is not "1" on Amazon Linux, nor is that > hook in in /usr/lib/rpm/redhat/macros, though that can be from simple > divergence of sorts. I also have a Fedora 27 to compare to. I wonder how > the PGDG repository did this on the older Amazon Linux it supported? Did it? > > I'll bark up that tree for a while. Thanks. > I did that, and adding this to .rpmmacros does the deed: %install %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\ %%install\ %{nil} I also had to place augment my rpmbuild definitions with an additional '--define "_enable_debug_packages 1"' I'm baffled how Amazon packages go about providing debuginfo, seeing as how these facilities have been changed(?). I haven't investigated it. --001a1140c56edf3599056854f043 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Mon= , Jan 8, 2018 at 3:50 PM Daniel Farina <daniel@citusdata.com> wrote:
On Fr= i, Jan 5, 2018 at 10:48 PM Pavel Raiskup <praiskup@redhat.com> wrote:
On Saturday, January 6, 2018 6:52:12 AM CET Dani= el Farina wrote:
> On Fri, Jan 5, 2018 at 9:50 PM Craig Ringer <craig@2ndquadrant.com> wrote: >
> > On 6 January 2018 at 06:30, Daniel Farina <daniel@citusdata.com> wrote:<= br> > >
> >> Hello,
> >>
> >> For quite some time, I've been building lightly modified = PGDG packages,
> >> but I have never figured how PGDG's yum repo gets debugin= fo packages. When
> >> I have built them, unless I hack up the spec file to have &qu= ot;%debug_package"
> >> I do not get such a debuginfo package. Clearly, that is not h= ow the spec
> >> files work as-is in pgrpms.
> >>
> >
> > How do you invoke rpmbuild?
> >
>
> Via make nopreprpm10.

I've never heard about nopreprpm10, but it is more important to say whe= re
you build the package because debuginfo generator is tightly dependant on the _setup_ in packages like 'rpm', 'redhat-rpm-config', et= c.

Have a look at `rpm --eval %debug_package` output to see what happens
there, and to see why it is needed.=C2=A0 Then, study your system/user rpm = macros.
On my system (Fedora 27 x86_64), there's is (in /usr/lib/rpm/redhat/mac= ros):
=C2=A0
Seems to me _enable_debug_packages is = not "1" on Amazon Linux, nor is that hook in in /usr/lib/rpm/redh= at/macros, though that can be from simple divergence of sorts. I also have = a Fedora 27 to compare to. I wonder how the PGDG repository did this on the= older Amazon Linux it supported? Did it?

I'll bark up that tree for a wh= ile. Thanks.

I did that, = and adding this to .rpmmacros does the deed:

%inst= all %{?_enable_debug_packages:%{?buildsubdir:%{debug_package}}}\
= %%install\
%{nil}
=C2=A0
I also had to place = augment my rpmbuild definitions with an additional '--define "_ena= ble_debug_packages 1"'

I'm baffled ho= w Amazon packages go about providing debuginfo, seeing as how these facilit= ies have been changed(?). I haven't investigated it.

--001a1140c56edf3599056854f043--