Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

salt package improvements #490

Closed
sjorge opened this issue Apr 25, 2017 · 4 comments
Closed

salt package improvements #490

sjorge opened this issue Apr 25, 2017 · 4 comments
Assignees

Comments

@sjorge
Copy link

sjorge commented Apr 25, 2017

diff --git a/sysutils/salt/Makefile b/sysutils/salt/Makefile
index 6a4d2d5e249..e1d8c9217de 100644
--- a/sysutils/salt/Makefile
+++ b/sysutils/salt/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.48 2017/03/03 09:29:48 sborrill Exp $
+# $NetBSD: Makefile,v 1.41 2016/07/21 17:05:39 jperkin Exp $

-DISTNAME=      salt-2016.11.3
+DISTNAME=      salt-2016.11.4
 CATEGORIES=    sysutils
 MASTER_SITES=  ${MASTER_SITE_PYPI:=s/salt/}

@@ -24,12 +24,13 @@ BUILD_DEFS+=        VARBASE

 PYTHON_VERSIONS_INCOMPATIBLE=  34 35 36 # py-m2crypto

+PYSETUPARGS+=  --salt-root-dir=${PREFIX}
 PYSETUPARGS+=  --salt-config-dir=${PKG_SYSCONFDIR}
 PYSETUPARGS+=  --salt-cache-dir=${VARBASE}/cache/salt
 PYSETUPARGS+=  --salt-sock-dir=${VARBASE}/run/salt
-PYSETUPARGS+=  --salt-base-file-roots-dir=${VARBASE}/salt/file-roots
-PYSETUPARGS+=  --salt-base-pillar-roots-dir=${VARBASE}/salt/pillar-roots
-PYSETUPARGS+=  --salt-base-master-roots-dir=${VARBASE}/salt/master-roots
+PYSETUPARGS+=  --salt-base-file-roots-dir=${PKG_SYSCONFDIR}/states
+PYSETUPARGS+=  --salt-base-pillar-roots-dir=${PKG_SYSCONFDIR}/pillar
+PYSETUPARGS+=  --salt-base-master-roots-dir=${PKG_SYSCONFDIR}/salt-master
 PYSETUPARGS+=  --salt-logs-dir=${VARBASE}/log/salt
 PYSETUPARGS+=  --salt-pidfile-dir=${VARBASE}/run

@@ -37,7 +38,7 @@ REPLACE_PYTHON=               *.py */*.py */*/*.py
 REPLACE_SH=            salt/templates/git/ssh-id-wrapper

 RCD_SCRIPTS+=          salt_master salt_minion salt_syndic
-SMF_INSTANCES=         master minion
+SMF_INSTANCES=         master minion api
 FILES_SUBST+=          PYTHON=${PYTHONBIN:Q}

 PKG_SYSCONFSUBDIR=     salt
@@ -47,9 +48,8 @@ INSTALLATION_DIRS+=   ${EGDIR}
 CONF_FILES+=           ${EGDIR}/master ${PKG_SYSCONFDIR}/master
 CONF_FILES+=           ${EGDIR}/minion ${PKG_SYSCONFDIR}/minion

-OWN_DIRS+=             ${VARBASE}/salt/file-roots
-OWN_DIRS+=             ${VARBASE}/salt/pillar-roots
-OWN_DIRS+=             ${VARBASE}/salt/master-roots
+OWN_DIRS+=             ${PKG_SYSCONFDIR}/states ${PKG_SYSCONFDIR}/pillar
+OWN_DIRS+=             ${PKG_SYSCONFDIR}/salt-master
 OWN_DIRS+=             ${VARBASE}/cache/salt ${VARBASE}/run/salt
 OWN_DIRS+=             ${VARBASE}/log/salt

@@ -60,8 +60,8 @@ SUBST_FILES.fix-paths=        conf/*
 SUBST_FILES.fix-paths+=        doc/man/* salt/modules/munin.py setup.py
 SUBST_FILES.fix-paths+=        salt/utils/rsax931.py salt/grains/core.py
 SUBST_SED.fix-paths=   -e 's,/etc/salt,${PKG_SYSCONFDIR},g'
-SUBST_SED.fix-paths+=  -e 's,/srv/salt,${VARBASE}/salt/file-roots,g'
-SUBST_SED.fix-paths+=  -e 's,/srv/pillar,${VARBASE}/salt/pillar-roots,g'
+SUBST_SED.fix-paths+=  -e 's,/srv/salt,${PKG_SYSCONFDIR}/states,g'
+SUBST_SED.fix-paths+=  -e 's,/srv/pillar,${PKG_SYSCONFDIR}/pillar,g'
 SUBST_SED.fix-paths+=  -e 's,/etc/munin,${PKG_SYSCONFBASEDIR}/munin,g'
 SUBST_SED.fix-paths+=  -e 's,share/man,${PKGMANDIR},g'
 SUBST_SED.fix-paths+=  -e 's,/opt/local/lib,${PREFIX}/lib,g'
diff --git a/sysutils/salt/PLIST b/sysutils/salt/PLIST
index ccc5ff78e93..9db690740ca 100644
--- a/sysutils/salt/PLIST
+++ b/sysutils/salt/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.18 2017/02/03 13:39:00 sborrill Exp $
+@comment $NetBSD$
 bin/salt
 bin/salt-api
 bin/salt-call
@@ -635,6 +635,9 @@ ${PYSITELIB}/salt/modules/__init__.pyo
 ${PYSITELIB}/salt/modules/acme.py
 ${PYSITELIB}/salt/modules/acme.pyc
 ${PYSITELIB}/salt/modules/acme.pyo
+${PYSITELIB}/salt/modules/aix_group.py
+${PYSITELIB}/salt/modules/aix_group.pyc
+${PYSITELIB}/salt/modules/aix_group.pyo
 ${PYSITELIB}/salt/modules/aliases.py
 ${PYSITELIB}/salt/modules/aliases.pyc
 ${PYSITELIB}/salt/modules/aliases.pyo
@@ -1355,6 +1358,9 @@ ${PYSITELIB}/salt/modules/openbsdrcctl.pyo
 ${PYSITELIB}/salt/modules/openbsdservice.py
 ${PYSITELIB}/salt/modules/openbsdservice.pyc
 ${PYSITELIB}/salt/modules/openbsdservice.pyo
+${PYSITELIB}/salt/modules/openscap.py
+${PYSITELIB}/salt/modules/openscap.pyc
+${PYSITELIB}/salt/modules/openscap.pyo
 ${PYSITELIB}/salt/modules/openstack_config.py
 ${PYSITELIB}/salt/modules/openstack_config.pyc
 ${PYSITELIB}/salt/modules/openstack_config.pyo
@@ -3627,6 +3633,9 @@ ${PYSITELIB}/salt/utils/parsers.pyo
 ${PYSITELIB}/salt/utils/pkg/__init__.py
 ${PYSITELIB}/salt/utils/pkg/__init__.pyc
 ${PYSITELIB}/salt/utils/pkg/__init__.pyo
+${PYSITELIB}/salt/utils/pkg/deb.py
+${PYSITELIB}/salt/utils/pkg/deb.pyc
+${PYSITELIB}/salt/utils/pkg/deb.pyo
 ${PYSITELIB}/salt/utils/pkg/rpm.py
 ${PYSITELIB}/salt/utils/pkg/rpm.pyc
 ${PYSITELIB}/salt/utils/pkg/rpm.pyo
@@ -3699,6 +3708,9 @@ ${PYSITELIB}/salt/utils/smtp.pyo
 ${PYSITELIB}/salt/utils/stormpath.py
 ${PYSITELIB}/salt/utils/stormpath.pyc
 ${PYSITELIB}/salt/utils/stormpath.pyo
+${PYSITELIB}/salt/utils/stringio.py
+${PYSITELIB}/salt/utils/stringio.pyc
+${PYSITELIB}/salt/utils/stringio.pyo
 ${PYSITELIB}/salt/utils/systemd.py
 ${PYSITELIB}/salt/utils/systemd.pyc
 ${PYSITELIB}/salt/utils/systemd.pyo
diff --git a/sysutils/salt/distinfo b/sysutils/salt/distinfo
index e07a64b1a8a..849a5aafeda 100644
--- a/sysutils/salt/distinfo
+++ b/sysutils/salt/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.25 2017/03/03 09:29:48 sborrill Exp $
+$NetBSD: distinfo,v 1.21 2016/07/21 17:05:39 jperkin Exp $

-SHA1 (salt-2016.11.3.tar.gz) = c9735d68ad2574b9b8ba1bea720c06e22c4b0277
-RMD160 (salt-2016.11.3.tar.gz) = 9d58a8d549f724c6b920914b711c414c4b7f3d03
-SHA512 (salt-2016.11.3.tar.gz) = 24bc75c50b4d6bd38a6f2dedc0a8c12142cc1b9d551455e49ea0ede405c78eb6a939f741dd8c0cbb8f206937ee69582bebe2fc127a24a4c2cf06cf3c3c16e507
-Size (salt-2016.11.3.tar.gz) = 9163351 bytes
+SHA1 (salt-2016.11.4.tar.gz) = 3bc69ef7ef81d6e654a3de81e5b20957cd7757fa
+RMD160 (salt-2016.11.4.tar.gz) = d5f5ddd7f7741e4dc163319fdc287e685a042962
+SHA512 (salt-2016.11.4.tar.gz) = ba928b61766d34774ce2e623fa79a46f6d373295c55b336e1b451e6a4afb0d547d78ceb9e466b64d8ba8bdbf2e750cbb77d008bc76308602729ae08241b8d346
+Size (salt-2016.11.4.tar.gz) = 9360198 bytes
diff --git a/sysutils/salt/files/smf/manifest.xml b/sysutils/salt/files/smf/manifest.xml
index 6d68597451c..e15f4c8fdf4 100644
--- a/sysutils/salt/files/smf/manifest.xml
+++ b/sysutils/salt/files/smf/manifest.xml
@@ -55,5 +55,25 @@
         </documentation>
       </template>
     </instance>
+    <instance name='api' enabled='false'>
+      <exec_method type="method" name="start" exec="@PREFIX@/bin/salt-api -d" timeout_seconds="60" />
+      <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" />
+      <exec_method type="method" name="refresh" exec=":kill -HUP" timeout_seconds="60" />
+      <property_group name="startd" type="framework">
+        <propval name="duration" type="astring" value="contract" />
+        <propval name="ignore_error" type="astring" value="core,signal" />
+      </property_group>
+      <property_group name="application" type="application">
+        <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/salt/master" />
+      </property_group>
+      <template>
+        <common_name>
+          <loctext xml:lang='C'>Salt NetAPI daemon</loctext>
+        </common_name>
+        <documentation>
+          <manpage title='salt-api' section='1' manpath='@PREFIX@/@PKGMANDIR@'/>
+        </documentation>
+      </template>
+    </instance>
   </service>
 </service_bundle>

I just made a diff between this version and the one I had. Looks like I didn't diverge to much.

  • salt 2016.11.4 vs .3
  • update PLIST for new modules
  • update smf manifest to add the api instance, also updated SMF_INSTANCES var.

So it should be easy enough to cherry pick the smf bits.

@sjorge
Copy link
Author

sjorge commented Apr 25, 2017

@jperkin as mentioned on the mailing list, seems I diverged less than I though

@jperkin jperkin self-assigned this Apr 28, 2017
@sjorge
Copy link
Author

sjorge commented Apr 30, 2017

jperkin: not sure, that was not one of my changes
I always found it odd that the default pillar/states dirs were in /opt/local/etc/salt and not /var/salt

It is probably from when I forked it still, I only bump the version number to get the newer packages. And I added the salt:api manifest, I made no further changes as far as my notes go.

In case you miss it on IRC, I am still without internet because I messed up my gateway and I am slowly rebuilding it.

@sjorge
Copy link
Author

sjorge commented May 5, 2017

So to summerize, probably cherry picking only the api manifest stuff should be fine.

@jperkin
Copy link
Collaborator

jperkin commented May 5, 2017

Someone got to the update before me, so I've just merged the api manifest bit. BTW, if you could submit patches as pull requests or attach them it'll be easier, as I couldn't figure out a way to get GitHub to extract the patch in raw form from this issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants