Bug 217274 - sysutils/py-salt: added other variants to install individual programs
Summary: sysutils/py-salt: added other variants to install individual programs
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Christer Edwards
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-21 13:29 UTC by laza_bsd
Modified: 2019-05-27 07:54 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (christer.edwards)


Attachments
svn diff (5.75 KB, patch)
2017-02-21 13:29 UTC, laza_bsd
no flags Details | Diff
svn diff (6.32 KB, patch)
2017-02-22 15:35 UTC, laza_bsd
no flags Details | Diff
svn diff (6.28 KB, patch)
2017-02-22 15:42 UTC, laza_bsd
no flags Details | Diff
svn diff (8.63 KB, patch)
2017-02-23 17:20 UTC, laza_bsd
no flags Details | Diff
svn diff (7.05 KB, patch)
2017-02-24 15:14 UTC, laza_bsd
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description laza_bsd 2017-02-21 13:29:42 UTC
Created attachment 180188 [details]
svn diff

I created 3 different ports (depending on the master sysutils/py-salt) to install only the necessary services.(minion, master and proxy)
proxy and the master can not coexist in the same installation, instead you can install minion with master or proxy.
Comment 1 Christer Edwards 2017-02-21 23:54:00 UTC
I'm going to do some testing before I approve, but I like the effort and the idea.

Can you tell me a bit more about the config options?

API - Does this refer to the Salt Master API?
MINION - Required for py-salt-minion?
RAET - Enable RAET transport
SYNDIC - Required for py-salt-?
ZEROMQ - Enable ZeroMQ transport
MASTER - Required for py-salt-master?
PROXY - Required for py-salt-proxy?

What settings do you suggest for sane defaults?

Why can the proxy and master not coexist?

Thanks
Comment 2 laza_bsd 2017-02-22 15:35:03 UTC
Created attachment 180221 [details]
svn diff
Comment 3 laza_bsd 2017-02-22 15:36:35 UTC
for splitting the ports I've used the USE_RC_SUBR=
so it's not a complete separation of the programs.

> API - Does this refer to the Salt Master API?
yes
> MINION - Required for py-salt-minion?
yes
> RAET - Enable RAET transport
> SYNDIC - Required for py-salt-?
in the patch attached I've also added this subports py-salt-syndic

> ZEROMQ - Enable ZeroMQ transport
> MASTER - Required for py-salt-master?
yes
> PROXY - Required for py-salt-proxy?
yes.
> What settings do you suggest for sane defaults?

for all ZEROMQ
for the base port MASTER and MINION

Also I've discovered that there is no problem of conflicts between the various modules.
Comment 4 laza_bsd 2017-02-22 15:42:45 UTC
Created attachment 180222 [details]
svn diff

the api are usable only in case of MASTER, PROXY or SYNDIC
Comment 5 Jason Wolfe 2017-02-22 20:35:18 UTC
It might also be worth noting that syndic requires master and proxy requires minion
Comment 6 Jason Wolfe 2017-02-22 20:41:17 UTC
Actually you could run a proxy without a minion if you configured it by hand, but in the spirit of Salt usually a local minion would configure the local proxy. One other note is that the API doesn't interface with a proxy directly, so coupling those 2 seems a bit odd. The master communicates with the proxy, so not sure what the API on the proxy would do.
Comment 7 Christer Edwards 2017-02-22 21:15:24 UTC
Good feedback.

Syndic does require master, and I'd suggest proxy require minion as well.

I've also discovered a few plist errors in poudriere testport with this patch. Can one of you take a look at those?

-----

===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: @dir %%ETCDIR%%
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: @comment
Error: Missing: @comment
Error: Missing: @comment
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/py-salt
====>> Error: check-plist failures detected

-----
Comment 8 laza_bsd 2017-02-23 17:20:57 UTC
Created attachment 180245 [details]
svn diff

I've fixed the pkg-plist problems making different files for each type of server.

syndic implies master and api
proxy implies minion
master implies api

on the master ports if you choose nothing nothing will be installed.. :-)


I've tested with a clean poudriere and it compiles and create pkgs without errors.
Comment 9 Christer Edwards 2017-02-23 20:01:45 UTC
In doing some testing with this latest patch I find that I'm unable to install both py27-salt-master and py27-salt-minion, or py27-salt-master and py27-salt-syndic. These packages are all using default options.


emma ~ # pkg info | grep py27-salt
py27-salt-master-2016.11.2     Distributed remote execution and configuration management system
emma ~ # pkg install py27-salt-minion
Updating emma repository catalogue...
emma repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (1 conflicting)
  - py27-salt-minion-2016.11.2 conflicts with py27-salt-master-2016.11.2 on /usr/local/lib/python2.7/site-packages/salt/_syspaths.py
Comment 10 laza_bsd 2017-02-24 15:14:02 UTC
Created attachment 180260 [details]
svn diff

> In doing some testing with this latest patch I find that I'm unable to install
> both py27-salt-master and py27-salt-minion, 
> or py27-salt-master and py27-salt-syndic.
> These packages are all using default options.

It's not a bug it's a feature.. :-)
I've not separated the PLIST in the different modules, I don't know how to do it
or it's not possible due to some common libraries or files
for example  salt/modules/tls.py it's common to all the modules.

I've changed the defaults for the master package
now it configures all the modules (API MINION MASTER PROXY SYNDIC) as it was before.

I've inserted CONFLICTS_INSTALL to manage the conflict

I've fixed the PLIST for each modules

I don't know how to fix(or if it's possible) to fix the pkg-messages for each module.
Comment 11 w.schwarzenfeld freebsd_triage 2018-03-06 19:04:43 UTC
ping!
Comment 12 Steve Wills freebsd_committer 2019-04-30 13:21:55 UTC
Any status update here? Should we close this?
Comment 13 Christer Edwards 2019-05-25 14:21:29 UTC
+1 to close.
Comment 14 laza_bsd 2019-05-27 07:54:27 UTC
+1 for close also from me.
I don't use anymore salt