app-admin/mmc-agent: Bump bulkimport patch

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/mds@1920 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2010-02-02 06:14:20 +00:00
parent 2689c8b65c
commit c2f1b9003a
4 changed files with 206 additions and 3 deletions

View File

@ -2,6 +2,10 @@
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
02 Feb 2010; Mario Fetka <mario.fetka@gmail.com>
+files/mmc-agent-2.3.2-bulkimport-2.patch:
Bump bulkimport patch
29 Jan 2010; Mario Fetka <mario.fetka@gmail.com>
mmc-agent-2.3.2_p798.ebuild, +files/mmc-agent-2.3.2-bulkimport-1.patch,
+files/mmc-agent-2.3.2-userquota-1.patch:

View File

@ -1,5 +1,6 @@
AUX mmc-agent-2.3.1-kerberos-1.patch 16835 RMD160 c7bc79766967ed988a6b9d85be73a5f4cdf90f2b SHA1 fa43b2173e716b207cc6fbc10e739efef188e048 SHA256 69d7c88f5b3a35910c8650f69fdd9f9ee877248a41c03e7e99fa0a1a3b109c1c
AUX mmc-agent-2.3.2-bulkimport-1.patch 6855 RMD160 13c16e3322a072ae41663696e8a53f299861b718 SHA1 ebea9f8d6f8f3b20b5ab19e328228dd17db2dd2b SHA256 fd76b1e7fde2547c1b505960d43dc363a3432937ea09f4b3d0619277edec5cac
AUX mmc-agent-2.3.2-bulkimport-2.patch 6849 RMD160 a75bdd558062db3f4cf1e9b30f5e973609559ff9 SHA1 28e8064139e337dd93b86980433a8bcacb9cdb6b SHA256 3dec3be08103960a9235a37dc75ba480bf424445ceef9b5dc4af87bfe0aca6ae
AUX mmc-agent-2.3.2-powerdns-1.patch 37711 RMD160 dfade7296129ea3a302fad701845d057e9050bd4 SHA1 711c0dd404ce59470e3b1418a9f83726a10e0aac SHA256 6c0f6df0dccca0b42d0860c289333e3d670fa1ef416885bdf561124aec45d258
AUX mmc-agent-2.3.2-powerdns-2.patch 38803 RMD160 ecde3d096a278446fbe0f866d6165f5940d53fb2 SHA1 d4518fc05dd57aadb4f05689e9675aa6b96d451b SHA256 33f4d1bd8e6509833bae5eec194c67371cb471c2c25d6978979057af2d67464a
AUX mmc-agent-2.3.2-printing-1.patch 33371 RMD160 f7064ec4dfc2e923c522f01190ca5d4f7d493d43 SHA1 ca9219b982e210bd92c85db8f982e1a3c6b9d48b SHA256 97dc50bb286361286e5451d2e85ea9b9d8609a2f92c3f3ca3836e9bcbcd1c931
@ -11,6 +12,6 @@ EBUILD mmc-agent-2.3.2-r1.ebuild 1635 RMD160 774f66ecfc207a8c86dadc010f8d9d04b50
EBUILD mmc-agent-2.3.2-r2.ebuild 1557 RMD160 fd12dd7afc50f7d37dd4d9e0291ec2509cc057ba SHA1 cfa7d9721d4b45a52499c481c99e1449844eeb3b SHA256 1ed12652595fc95f9f98be38721899ae6d811746fd7854687911243dd1d59d6d
EBUILD mmc-agent-2.3.2-r3.ebuild 1557 RMD160 2a6e73ba6a2981f4e010fbb05af6439d39e096ad SHA1 35a64b2ec82aef8c5907c11861e7c53cefa0bf76 SHA256 d62618c640f6cf9c531c2a12780046fe1a53ea59712cd8964225a1c436ef4e25
EBUILD mmc-agent-2.3.2-r4.ebuild 1616 RMD160 d8b85301b0c72e1be4f1655ec7fe16b2e338203f SHA1 7d2623589b14a75042f3c6f06dd766b16dc3af42 SHA256 8461d4fc8aba2670dce89d65932d18afa6e85e00aee72c1a134fa14f7496d2c4
EBUILD mmc-agent-2.3.2_p798.ebuild 1894 RMD160 c58ccbfe5b069e4e16158209c24f9eea553fe207 SHA1 780477a3510b6bbbfa9856d8274d51ae0d15a99d SHA256 3ec466d94ddf957382108b0a2e168ecae34d2010ddbd359fa2b5740e895e25a5
MISC ChangeLog 2146 RMD160 bdc55ed294fa6675f39beb4575871c170cde9747 SHA1 c2450e1fbaf17046aa5a21705b4b71761a895e7a SHA256 632563b375f8733b478b6120c2c1cfc5f94cc318e00210de5a8f37dbff278606
EBUILD mmc-agent-2.3.2_p798.ebuild 1894 RMD160 95d5ea87f389dafff627f9d1e1bcf5dab75a54bb SHA1 a7c8dbdfeb402d02b2f3a9b30deb54dfc933f9d9 SHA256 b6bb3e3660a7ab116f078a5d21bfcb4a322389933484326e4cf5316a10521ca4
MISC ChangeLog 2267 RMD160 184d398e1948322f06c5a7768ad80b6f869b77f6 SHA1 ebcda0f6faa897aa0dbdbaeee02b2cea13649cbb SHA256 5e0dbc56104c5c7d3341c8fb36e3d1fcf316cc8b2eb99eff0cc3223e96092c79
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42

View File

@ -0,0 +1,198 @@
Submitted By: Mario Fetka (geos_one) (mario dot fetka at gmail dot com)
Date: 2010-02-02
Initial Package Version: 2.3.2
Origin: https://ml.mandriva.net/wws/arc/mds-devel/2010-02/msg00000.html
Upstream Status: unknown
Description: add the bulkimport plugin
diff -Naur mmc-agent-2.3.2.orig/conf/plugins/bulkimport.ini mmc-agent-2.3.2/conf/plugins/bulkimport.ini
--- mmc-agent-2.3.2.orig/conf/plugins/bulkimport.ini 1970-01-01 00:00:00.000000000 +0000
+++ mmc-agent-2.3.2/conf/plugins/bulkimport.ini 2010-02-01 21:06:38.000000000 +0000
@@ -0,0 +1,2 @@
+[main]
+disable = 0
diff -Naur mmc-agent-2.3.2.orig/contrib/bulkimport/README mmc-agent-2.3.2/contrib/bulkimport/README
--- mmc-agent-2.3.2.orig/contrib/bulkimport/README 1970-01-01 00:00:00.000000000 +0000
+++ mmc-agent-2.3.2/contrib/bulkimport/README 2010-02-02 06:06:10.529049665 +0000
@@ -0,0 +1,120 @@
+Description:
+
+The bulk user management tool has been designed as a plugin for MDS. It reads a CSV file and then imports, deletes
+and modifies user attributes for each user in the CSV file. It does this using a two step process and performs all the
+changes while the user waits for the page to refresh.
+
+For each record, it calls the appropriate methods in the user base module of mmc (python back end).
+
+Installation:
+The following changes are needed to mmc:
+
+1. Bug fix in PageGenerator, this has already been fixed up stream, but if not, apply the patch.
+2. Add in a require to page generator and add menu item to sidebar of user plugin.
+
+
+Apply patches from: bulkuserimport.patch
+Apply patch, with
+
+cd /usr/share/mmc
+patch -p1 < /tmp/bulkuserimport.patch
+
+Patched versions of the following files are included, but not needed if you apply the patch above:
+./mmc-web/main.php
+./mmc-web/modules/base/users/localSidebar.php
+./mmc-web/includes/PageGenerator.php
+
+
+The following files need to be installed:
+cp -r ./mmc-web/modules/csvimport /usr/share/mmc/modules
+cp ./etc/mmc/plugins/csvimport.ini /etc/mmc/plugins/
+cp -r ./mmc-python/plugins/csvimport /usr/lib64/python2.6/site-packages/mmc/plugins/
+
+Restart mmc-agent after copying files.
+
+Usage:
+
+CSV Formatting:
+
+Delimiator: ,
+Wrapper: "
+Escape characture: \
+
+CSV Header requirements:
+
+Required attribute: "login"
+Require for import: "password","firstname","surname"
+Additional headers can be set and must match the attribute name in ldap, for example:
+"login","password","firstname","surname","primarygroup","mail"
+
+Special attributes
+
+The following can be set to: yes or no.
+createhomedir (yes by default)
+files (default set to yes for delete operation, users home directory will be removed.)
+
+Defaults
+
+homdir (homedir/username by default)
+primaryGroup (default primary group as per base.ini plugin config)
+
+Currently supported attributes are:
+
+ * audio
+ * carLicense
+ * departmentNumber
+ * description
+ * files
+ * firstname
+ * gecos
+ * localityName
+ * login
+ * loginShell
+ * mail
+ * manager
+ * mobile
+ * organizationName
+ * pager
+ * password
+ * physicalDeliveryOfficeName
+ * postalAddress
+ * postalCode
+ * preferredLanguage
+ * primarygroup
+ * roomNumber
+ * surname
+ * telephoneNumber
+ * title
+
+Examples CSV file contents. Create some users:
+
+"firstname","surname","mail","login","password","telephoneNumber","localityName"
+"User1","Last1","user1@example.com","user1","test1",,"Auckland"
+"User2","Last2","user2@example.com","user2","test2",,"Auckland"
+"User3","Last3","user3@example.com","user3","test3",,"Auckland"
+
+Modify the mail and loginShell attributes:
+
+"mail","login","loginShell"
+"user1@oss.co.nz","user1","/bin/bash"
+"user2@oss.co.nz","user2","/bin/zsh"
+"user3@oss.co.nz","user3","/bin/zsh"
+
+Delete some users:
+
+"login"
+"user1"
+"user2"
+
+Generating user login names, email addresses, etc.
+
+This tool does not generate data for you. To generate data from a list of names, use functions in OpenOffice Calc, for example, to generate the
+email address, use the function:
+
+=CONCATENATE(a1,"@example.com")
+
+and for user names:
+
+=LOWER(CONCATENATE(LEFT(B1),MID(C1,1,5)))
+where B1 is first name, C1 is Last name.
+
diff -Naur mmc-agent-2.3.2.orig/mmc/plugins/bulkimport/__init__.py mmc-agent-2.3.2/mmc/plugins/bulkimport/__init__.py
--- mmc-agent-2.3.2.orig/mmc/plugins/bulkimport/__init__.py 1970-01-01 00:00:00.000000000 +0000
+++ mmc-agent-2.3.2/mmc/plugins/bulkimport/__init__.py 2010-02-02 03:31:41.000000000 +0000
@@ -0,0 +1,47 @@
+# -*- coding: utf-8; -*-
+#
+# (c) 2009 Open Systems Specilists - Glen Ogilvie
+#
+# $Id: __init__.py 743 2008-12-15 14:20:35Z cdelfosse $
+#
+# This file is part of Mandriva Management Console (MMC).
+#
+# MMC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# MMC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with MMC; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+import socket
+import ldap
+import logging
+import os
+import os.path
+import grp
+
+from mmc.plugins.base import ldapUserGroupControl
+from mmc.support.config import *
+from mmc.support import mmctools
+import mmc
+
+INI = "/etc/mmc/plugins/bulkimport.ini"
+
+VERSION = "0.0.2"
+APIVERSION = "1:0:0"
+REVISION = int("$Rev: 1 $".split(':')[1].strip(' $'))
+
+def getVersion(): return VERSION
+def getApiVersion(): return APIVERSION
+def getRevision(): return REVISION
+
+
+def activate():
+ return True
diff -Naur mmc-agent-2.3.2.orig/setup.py mmc-agent-2.3.2/setup.py
--- mmc-agent-2.3.2.orig/setup.py 2010-02-02 06:05:59.608049317 +0000
+++ mmc-agent-2.3.2/setup.py 2010-02-02 06:06:10.529049665 +0000
@@ -8,5 +8,5 @@
author_email = "cdelfosse@mandriva.com",
maintainer = "Cedric Delfosse",
maintainer_email = "cdelfosse@mandriva.com",
- packages = ["mmc", "mmc.support", "mmc.plugins", "mmc.plugins.base", "mmc.plugins.samba", "mmc.plugins.proxy", "mmc.plugins.mail", "mmc.plugins.network", "mmc.plugins.kerberos", "mmc.plugins.printstats", "mmc.plugins.printing", "mmc.plugins.userquota"],
+ packages = ["mmc", "mmc.support", "mmc.plugins", "mmc.plugins.base", "mmc.plugins.samba", "mmc.plugins.proxy", "mmc.plugins.mail", "mmc.plugins.network", "mmc.plugins.kerberos", "mmc.plugins.printstats", "mmc.plugins.printing", "mmc.plugins.userquota", "mmc.plugins.bulkimport"],
)

View File

@ -35,7 +35,7 @@ src_prepare() {
epatch "${FILESDIR}"/${PN}-2.3.2-printing-1.patch
epatch "${FILESDIR}"/${PN}-2.3.2-powerdns-2.patch
epatch "${FILESDIR}"/${PN}-2.3.2-userquota-1.patch
epatch "${FILESDIR}"/${PN}-2.3.2-bulkimport-1.patch
epatch "${FILESDIR}"/${PN}-2.3.2-bulkimport-2.patch
}
# from marienz's setuptools.eclass: