Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 636262 - app-backup/amanda: Add USE flag to disable NDMP support.
Summary: app-backup/amanda: Add USE flag to disable NDMP support.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-02 15:37 UTC by Austin S. Hemmelgarn
Modified: 2017-11-07 06:16 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Austin S. Hemmelgarn 2017-11-02 15:37:16 UTC
Currently, NDMP support is unconditionally included when building app-backup/amanda.  I propose the addition of a USE flag (default enabled) to control the inclusion of NDMP support by controlling the presence of the '--without-ndmp' configure option.

NDMP is a very purpose specific protocol only likely to see usage in corporate networks that handle very large volumes of data, and as such is likely to be unused on many installations.  Disabling NDMP support removes 20 files from the built package, reducing the overall size by almost 2MB on my configuration, and additionally works around bug #376127.
Comment 1 Stefan G. Weichinger 2017-11-06 10:08:07 UTC
suggested patch: https://github.com/gentoo/gentoo/pull/6137

NDMP flag is off per default, though ...
Austin, could you test that?
Comment 2 Stefan G. Weichinger 2017-11-06 10:43:49 UTC
https://github.com/gentoo/gentoo/pull/6138
Comment 3 Austin S. Hemmelgarn 2017-11-06 15:12:43 UTC
The most recent commit builds, but doesn't exclude NDMP support when the flag isn't set.

To disable NDMP, configure needs to be passed --without-ndmp, to enable it, it doesn't need anything (though --with-ndmp should work).  The current ebuild in the PR passes in --disable-ndmp when the flag isn't set, which configure ignores.  I think that use_with is the function you want here, but I'm not well versed in writing ebuilds, so I'm not 100% certain.

FWIW, I think the QA issue being reported is due to a lack of documentation of the flag in metadata.xml, not anything in the ebuild.

As far as the default value for the USE flag, I'm somewhat indifferent.  Upstream seems to think it should default to enabled, and that's less likely to break existing setups, but it also won't give new users the saner default of not having NDMP.
Comment 4 Stefan G. Weichinger 2017-11-06 15:30:54 UTC
(In reply to Austin S. Hemmelgarn from comment #3)
> The most recent commit builds, but doesn't exclude NDMP support when the
> flag isn't set.
> 
> To disable NDMP, configure needs to be passed --without-ndmp, to enable it,
> it doesn't need anything (though --with-ndmp should work).  The current
> ebuild in the PR passes in --disable-ndmp when the flag isn't set, which
> configure ignores.  I think that use_with is the function you want here, but
> I'm not well versed in writing ebuilds, so I'm not 100% certain.

same here, unfortunately ;-)

What about this one:

https://github.com/gentoo/gentoo/pull/6138/commits/de0c30abf7e9300f48aded26b47af9bbdf5eb09d

(can't test in detail right now ...)
Comment 5 Austin S. Hemmelgarn 2017-11-06 15:45:25 UTC
That one appears to work, both with and without the flag enabled.  Unfortunately, I don't have any systems which support NDMP to test whether it properly stops working with the flag disabled, but the build logs and package size match up with what I get when injecting --without-ndmp via EXTRA_ECONF and package.env.

Regarding the description, I think just putting 'Support for backing up with the Network Data Management Protocol' in as the USE flag description is probably sufficient, as that will be enough for people who need NDMP support to figure out what to enable.  It might make sense to print something post-merge about the addition of the USE flag if it's going to default to being disabled, but I don't really feel strongly either way about that.
Comment 6 Stefan G. Weichinger 2017-11-06 22:42:49 UTC
thanks for the first quick test.
maybe I have to start over with that pull request, the robots don't like it.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2017-11-06 22:56:15 UTC
@sgw:
Switch to your existing branchm, squash it down to a single commit in the PR, with a change added in metadata.xml, and a well-formatted commit message:

===
app-backup/amanda: make NDMP optional

NDMP is an uncommon feature, and fails to build with newer glibc at this time; make it optional for now.

Closes: https://bugs.gentoo.org/376127
Closes: https://bugs.gentoo.org/636262
Closes: https://github.com/gentoo/gentoo/pull/6137
Closes: https://github.com/gentoo/gentoo/pull/6138
===
Comment 8 Stefan G. Weichinger 2017-11-06 22:59:00 UTC
(In reply to Stefan G. Weichinger from comment #6)
> thanks for the first quick test.
> maybe I have to start over with that pull request, the robots don't like it.

https://github.com/gentoo/gentoo/pull/6142

*phew*
Comment 9 Stefan G. Weichinger 2017-11-06 23:01:18 UTC
(In reply to Robin Johnson from comment #7)
> @sgw:
> Switch to your existing branchm, squash it down to a single commit in the
> PR, with a change added in metadata.xml, and a well-formatted commit message:
> 
> ===
> app-backup/amanda: make NDMP optional
> 
> NDMP is an uncommon feature, and fails to build with newer glibc at this
> time; make it optional for now.
> 
> Closes: https://bugs.gentoo.org/376127
> Closes: https://bugs.gentoo.org/636262
> Closes: https://github.com/gentoo/gentoo/pull/6137
> Closes: https://github.com/gentoo/gentoo/pull/6138
> ===

mid-air collision here, your msg came in at the same time as I wrote comment #8
Comment 10 Larry the Git Cow gentoo-dev 2017-11-07 06:16:06 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0016f461cb30308ba627329b0e760a2f8dfc6d8a

commit 0016f461cb30308ba627329b0e760a2f8dfc6d8a
Author:     Stefan G. Weichinger <office@oops.co.at>
AuthorDate: 2017-11-06 10:04:34 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2017-11-07 06:15:51 +0000

    app-backup/amanda: make NDMP optional
    
    NDMP is an uncommon feature, and fails to build with newer glibc at this time; make it optional for now.
    
    Closes: https://bugs.gentoo.org/376127
    Closes: https://bugs.gentoo.org/636262
    Closes: https://github.com/gentoo/gentoo/pull/6137
    Closes: https://github.com/gentoo/gentoo/pull/6138
    Closes: https://github.com/gentoo/gentoo/pull/6142
    (cherry picked from commit 337a72935369e963b74b8293e3a9ecbce1383bd0)
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 app-backup/amanda/amanda-3.5.ebuild | 5 ++++-
 app-backup/amanda/metadata.xml      | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)