Opened 3 years ago

Closed 3 years ago

#5359 closed enhancement (complete)

Need to update the packaging for premium hooks

Reported by: tomek Owned by: tmark
Priority: medium Milestone: Kea1.3 beta
Component: build system Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Premium Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 1
Total Hours: 9 Internal?: no

Description

As discussed on our call, we need to update makefiles in our premium repo, to have two types of tarballs:

  • tier 1 (covers selected hooks, currently legal-log, flex-id, host-cmds)
  • tier 2 (covers everything, we have that now)

Tier 1 is strict subset of tier 2. User is never expected to build both of them. Depending on what package the user has, he should build one or the other.

Subtickets

Change History (6)

comment:1 Changed 3 years ago by tomek

The details, including rationale, were discussed on 2017-09-07 call. See the minutes for additional details.

comment:2 Changed 3 years ago by vicky

  • Milestone changed from Kea1.3 to Kea1.3 beta

Milestone renamed

comment:3 Changed 3 years ago by tmark

  • Add Hours to Ticket changed from 0 to 7
  • Owner set to Unassigned
  • Status changed from new to reviewing

I was unable to devise a means to alter the list of packages included through adding new targets. We rely on recursive builds which driven by lists of subdirectories in SUBDIRS and DISTSUBDIRS variables. The contents of those variables apparently must be determined during the configure process, rather than during the make process.

So I have opted for adding configure flags to premium/configure instead:

premium/configure.ac

Added support for two new flags:

--with-tier1 - defaults to yes, adds flex_id, host_cmds, legal_logs
--with-tier2 - defaults to no adds subnet_cmds

These flags control the content of INCLUDED_PACKAGES which
is used in src/hooks/dhcp/Makefile.am to define SUBDIRS.

Altered config report to display packages

src/hooks/dhcp/Makefile.am

Use $INCLUDED_PACKAGES to define SUBDIRS

This allows you to specify --with(out)-tier1=yes|no and --with(out)-tier2=yes|no. These
work when running configure directly in premium directory or through the Kea main repo.
Kea's main repo configure simply passes the values thru to the premium configure. This is
handy as running "make dist" in Kea main repo currently includes premimum if it's there.

ChangeLog?

1x. [build]      tmark
    Added configure flags --with-tier1 and --with-tier2 to allow controlling
    which hook libraries are included in the build and distribution.
    (Trac #5359, git TBD)

PS If there's a better way to do this, I'm all ears.

Ticket is ready for review.

comment:4 Changed 3 years ago by fdupont

  • Owner changed from Unassigned to fdupont

comment:5 Changed 3 years ago by fdupont

  • Add Hours to Ticket changed from 7 to 8
  • Owner changed from fdupont to tmark

Seems good. Three comments:

  • I did a few cosmetic changes, please pull and review them
  • if the argument is yes or no then enable-tierX is more suitable than with-tierX
  • this change is compatible with my idea to move premium config stuff into a m4macros directory directly used by the Kea configure (I still have to find some free time to try this).

So pull, review, decide whether to move to enable and merge. It should be fine to have a working Jenkins with premium support to check the 4 cases... If there is one you prefer I can launch a 'make distcheck' on it on my dev box.

comment:6 Changed 3 years ago by tmark

  • Add Hours to Ticket changed from 8 to 1
  • Resolution set to complete
  • Status changed from reviewing to closed
  • Total Hours changed from 0 to 9

Changes merged with git c0e2a6d08ff08ac0e8c379176259c317490ef5c2
Added ChangeLog? entry #13.

Ticket is complete.

Note: See TracTickets for help on using tickets.