SF.net SVN: gar:[25941] csw/mgar/gar/v2

cgrzemba at users.sourceforge.net cgrzemba at users.sourceforge.net
Wed Sep 14 15:39:33 CEST 2016


Revision: 25941
          http://sourceforge.net/p/gar/code/25941
Author:   cgrzemba
Date:     2016-09-14 13:39:33 +0000 (Wed, 14 Sep 2016)
Log Message:
-----------
update IPS package transforms and pkglint

Added Paths:
-----------
    csw/mgar/gar/v2/pkglint/
    csw/mgar/gar/v2/pkglint/__init__.py
    csw/mgar/gar/v2/pkglint/opencsw.py
    csw/mgar/gar/v2/transforms/
    csw/mgar/gar/v2/transforms/README
    csw/mgar/gar/v2/transforms/defaults
    csw/mgar/gar/v2/transforms/remove-os-version
    csw/mgar/gar/v2/transforms/remove-os-version.notactive
    csw/mgar/gar/v2/transforms/unneeded-deps

Removed Paths:
-------------
    csw/mgar/gar/v2/pkglint/
    csw/mgar/gar/v2/transforms/

Property Changed:
----------------
    csw/mgar/gar/v2/

Index: csw/mgar/gar/v2
===================================================================
--- csw/mgar/gar/v2	2016-09-14 12:16:13 UTC (rev 25940)
+++ csw/mgar/gar/v2	2016-09-14 13:39:33 UTC (rev 25941)

Property changes on: csw/mgar/gar/v2
___________________________________________________________________
Modified: svn:mergeinfo
## -8,6 +8,7 ##
 /csw/mgar/gar/v2-dirpackage:8125-8180
 /csw/mgar/gar/v2-fortran:10883-12516
 /csw/mgar/gar/v2-git/v2-relocate:7617
+/csw/mgar/gar/v2-hg:25913-25940
 /csw/mgar/gar/v2-migrateconf:7082-7211
 /csw/mgar/gar/v2-noexternals:11592-11745
 /csw/mgar/gar/v2-raised-buildlevel:15906-15949
\ No newline at end of property
Added: csw/mgar/gar/v2/pkglint/__init__.py
===================================================================
--- csw/mgar/gar/v2/pkglint/__init__.py	                        (rev 0)
+++ csw/mgar/gar/v2/pkglint/__init__.py	2016-09-14 13:39:33 UTC (rev 25941)
@@ -0,0 +1,22 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+#

Added: csw/mgar/gar/v2/pkglint/opencsw.py
===================================================================
--- csw/mgar/gar/v2/pkglint/opencsw.py	                        (rev 0)
+++ csw/mgar/gar/v2/pkglint/opencsw.py	2016-09-14 13:39:33 UTC (rev 25941)
@@ -0,0 +1,85 @@
+#!/usr/bin/python
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) Carsten Grzemba
+#
+
+import pkg.lint.base as base
+import subprocess as sp
+import os
+import re
+
+class OpenCSWActionChecker(base.ActionChecker):
+    """An OpenCSW-specific class to check actions."""
+
+    name = "opencsw.action"
+
+    def __init__(self, config):
+            self.description = _(
+                "checks OpenCSW packages for common action errors")
+            super(OpenCSWActionChecker, self).__init__(config)
+
+    def split_packages(self, manifest, engine, pkglint_id="001"):
+       """Warn if there shared libries in standard path
+       """
+    split_packages.pkglint_desc = _("Package should split out subpackages for shared libraries")
+        
+class OpenCSWManifestChecker(base.ManifestChecker):
+    """An opencsw.org-specific class to check manifests."""
+
+    name = "opencsw.manifest"
+
+    def __init__(self, config):
+        self.description = _(
+            "checks OpenCSW packages for common errors")
+        super(OpenCSWManifestChecker, self).__init__(config)
+
+    def recipe_uncommited(self, manifest, engine, pkglint_id="001"):
+        """Warn when a build recipe is not commited
+        """
+        p = sp.Popen("cd ../../.. && svn st --ignore-externals", shell=True, stdout=sp.PIPE,stderr=sp.PIPE)
+        p.wait()
+        err = p.stderr.read()
+        if len(err) > 0:
+            engine.error(
+                _("SVN error for {pkg} recipe on path {path}\n{msg}").format(pkg=manifest.fmri, path=os.path.abspath(''), msg=err),
+                msgid="{0}{1}.1".format(self.name, pkglint_id))
+        else:
+            if p.stdout.read():
+                engine.warning(
+                    _("Build recipe should commited for publish {pkg}").format(pkg=manifest.fmri),
+                    msgid="{0}{1}.1".format(self.name, pkglint_id))
+    recipe_uncommited.pkglint_desc = _("Build recipe should commited to sourceforge")
+    
+
+    def packageprefixname_notset(self, manifest, engine, pkglint_id="002"):
+        """ set name=pkg.fmri value=diagnotic/nrpe at 2.15
+
+        """
+       
+        fmri_name = manifest.fmri.get_name() 
+        if fmri_name.find('/',1) < 0 or re.match("opencsw/.*", fmri_name):
+            engine.error(_("IPS_PACKAGE_PREFIX must set in build recipe and must end with a '/', missing prefix in {fmri}").format(fmri=manifest.fmri),
+						msgid="%s%s.2" % (self.name, pkglint_id))
+
+    packageprefixname_notset.pkglint_desc = _( "build recipe must set package name prefix for package FMRI" )

Added: csw/mgar/gar/v2/transforms/README
===================================================================
--- csw/mgar/gar/v2/transforms/README	                        (rev 0)
+++ csw/mgar/gar/v2/transforms/README	2016-09-14 13:39:33 UTC (rev 25941)
@@ -0,0 +1 @@
+see also at /usr/share/pkg/transform

Added: csw/mgar/gar/v2/transforms/defaults
===================================================================
--- csw/mgar/gar/v2/transforms/defaults	                        (rev 0)
+++ csw/mgar/gar/v2/transforms/defaults	2016-09-14 13:39:33 UTC (rev 25941)
@@ -0,0 +1,26 @@
+<transform dir file link hardlink path=opt/.+/man(/.+)? -> default facet.doc.man true>
+<transform dir file link hardlink path=opt/.+/doc(/.+)? -> default facet.doc true>
+<transform file path=opt/.+/man(/.+)? -> add restart_fmri svc:/application/man-index:default>
+<transform dir path=etc(/opt(/csw(/init.d)?)?)?$ -> drop>
+<transform dir path=var(/opt(/csw(/(log|run|lib))?)?)?$ -> drop>
+<transform dir path=var/svc(/manifest)?$ -> drop>
+<transform dir path=opt(/csw)?$ -> drop>
+<transform dir path=opt/csw(/(bin|sbin|lib|libexec|share|include))?$ -> drop>
+<transform dir path=opt/csw/share/(doc|man(/man[0-9a-z]([a-z])?)?)$ -> drop>
+<transform dir path=opt/csw/lib(/.*)/pkgconfig$ -> drop>
+<transform dir path=opt/csw/lib/python([0-9.]+)?$ -> drop>
+<transform dir path=opt/csw/lib/python([0-9.]+)?/site-packages$ -> drop>
+<transform file path=opt/csw/lib/python.* -> add restart_fmri \
+    svc:/application/pycompile>
+<transform file path=opt/csw/lib/python.* -> emit depend fmri=pkg:/opencsw/cswpycomile type=require>
+<transform file path=var/svc/manifest/.*\.xml$ -> default restart_fmri svc:/system/manifest-import:default>
+<transform file path=.*lib/.+\.a$ -> default facet.devel all>
+<transform file path=.*lib/.+\.la$ -> default facet.devel all>
+<transform link path=.*lib/.+\.so$ -> default facet.devel all>
+<transform file path=.*lib(/(amd64|sparv9))?/pkgconfig(/.*)? -> default facet.devel all>
+<transform file path=.*include/.* -> default facet.devel all>
+<transform file path=.*aclocal/.* -> default facet.devel all>
+<transform file path=.*man3/.+ -> default facet.devel all>
+<transform file path=.*man1/.+-config$ -> default facet.devel all>
+<transform file path=.*bin/.+-config$ -> default facet.devel all>
+

Added: csw/mgar/gar/v2/transforms/remove-os-version
===================================================================
Copied: csw/mgar/gar/v2/transforms/remove-os-version.notactive (from rev 25940, csw/mgar/gar/v2/transforms/remove-os-version.notactive)
===================================================================
--- csw/mgar/gar/v2/transforms/remove-os-version.notactive	                        (rev 0)
+++ csw/mgar/gar/v2/transforms/remove-os-version.notactive	2016-09-14 13:39:33 UTC (rev 25941)
@@ -0,0 +1 @@
+<transform depend -> edit fmri "(.*@[0-9\.]*)-.*" "\1">


Property changes on: csw/mgar/gar/v2/transforms/remove-os-version.notactive
___________________________________________________________________
Added: svn:mergeinfo
## -0,0 +1,18 ##
+/csw/mgar/gar/v2/transforms/remove-os-version.notactive:4936-6678
+/csw/mgar/gar/v2-bwalton/transforms/remove-os-version.notactive:9784-10011
+/csw/mgar/gar/v2-checkpkg/transforms/remove-os-version.notactive:7722-7855
+/csw/mgar/gar/v2-checkpkg-override-relocation/transforms/remove-os-version.notactive:10585-10737
+/csw/mgar/gar/v2-checkpkg-stats/transforms/remove-os-version.notactive:8454-8649
+/csw/mgar/gar/v2-collapsed-modulations/transforms/remove-os-version.notactive:6895
+/csw/mgar/gar/v2-defaultchange/transforms/remove-os-version.notactive:13903-14022
+/csw/mgar/gar/v2-dirpackage/transforms/remove-os-version.notactive:8125-8180
+/csw/mgar/gar/v2-fortran/transforms/remove-os-version.notactive:10883-12516
+/csw/mgar/gar/v2-git/v2-relocate/transforms/remove-os-version.notactive:7617
+/csw/mgar/gar/v2-migrateconf/transforms/remove-os-version.notactive:7082-7211
+/csw/mgar/gar/v2-noexternals/transforms/remove-os-version.notactive:11592-11745
+/csw/mgar/gar/v2-raised-buildlevel/transforms/remove-os-version.notactive:15906-15949
+/csw/mgar/gar/v2-relocate/transforms/remove-os-version.notactive:5028-11738
+/csw/mgar/gar/v2-skayser/transforms/remove-os-version.notactive:6087-6132
+/csw/mgar/gar/v2-solaris11/transforms/remove-os-version.notactive:18134-18236
+/csw/mgar/gar/v2-sqlite/transforms/remove-os-version.notactive:10434-10449
+/csw/mgar/gar/v2-uwatch2/transforms/remove-os-version.notactive:12141-13270
\ No newline at end of property
Added: csw/mgar/gar/v2/transforms/unneeded-deps
===================================================================
--- csw/mgar/gar/v2/transforms/unneeded-deps	                        (rev 0)
+++ csw/mgar/gar/v2/transforms/unneeded-deps	2016-09-14 13:39:33 UTC (rev 25941)
@@ -0,0 +1,4 @@
+<transform depend fmri=.*shell/ksh93.* -> drop >
+<transform depend pkg.debug.depend.file=sh -> drop >
+<transform depend fmri=system/library -> edit fmri "@[^ \t\n\r\f\v]*" "" >
+

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list