#1024367 In 4.9.1, the example uses not recommended install -s

#1024367#5
Date:
2022-11-18 13:14:32 UTC
From:
To:
Hello, and thank you for maintaining the Policy!

Policy paragraph 4.9.1 has an example debian/rules which contains these
lines:

   INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755

   ifeq (,$(filter nostrip,$(DEB_BUILD_OPTIONS)))
       INSTALL_PROGRAM += -s
   endif

However, paragraph 10.1 recommends against it:

   It is not recommended to strip binaries by passing the "-s" flag to
   "install", because this fails to remove .comment and .note sections,
   and also prevents the automatic creation of dbgsym binary packages by
   tools like "dh_strip".

I would personally prefer if the example built on debhelper. If the
intention is to show what are the expectations at a lower level then
I wish the example had a comment saying "This snippet serves to explain
what are the expectations as a lower level. You usually want to use
debhelper instead"

Enrico

#1024367#10
Date:
2022-11-18 14:41:53 UTC
From:
To:
I know it is not what you are after, but maybe it is time to fix install -s ?

dh_strip only work if the upstream 'make install' did not already
strip the binaries by using install -s itself. So packagers need to work
around it each time.

Cheers,

#1024367#15
Date:
2023-09-09 22:16:10 UTC
From:
To:
Enrico Zini <enrico@debian.org> writes:

I looked at this snippet and I think it has worse problems than the use of
install -s.  For example, it predates the existence of dpkg-buildflags,
which would also handle noopt.  I'm also dubious that it serves any useful
purpose given that nearly every package should just use debhelper.  The
typical current Debian packager seems more likely to be confused by this
fragment than aided by it.

I'm therefore going to propose fixing this bug with the following patch,
which is more aggressive than you propose.

I think this is informative rather than normative and therefore
technically doesn't require seconds, but I'll give this some time for
other people to take a look and talk me out of deleting this section if
they wish.

#1024367#22
Date:
2023-09-09 22:48:13 UTC
From:
To:
Looks good to me.

Cheers,
gregor

#1024367#27
Date:
2023-09-11 01:10:04 UTC
From:
To:
Please remove the following email address:  e.little598@gmail.com
#1024367#32
Date:
2023-09-24 13:10:17 UTC
From:
To:
-- 
Sean Whitton

#1024367#37
Date:
2023-09-24 13:10:30 UTC
From:
To:
Hello,

LGTM.