linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: ronnie sahlberg <ronniesahlberg@gmail.com>
To: Pavel Shilovsky <piastryyy@gmail.com>
Cc: "Aurélien Aptel" <aaptel@suse.com>,
	"Steve French" <smfrench@gmail.com>,
	"Kenneth Dsouza" <kdsouza@redhat.com>,
	"Ronnie Sahlberg" <lsahlber@redhat.com>,
	linux-cifs <linux-cifs@vger.kernel.org>
Subject: Re: [PATCH] smb2quota.py: Userspace helper to display quota information for the Linux SMB client file system (CIFS)
Date: Fri, 13 Dec 2019 10:34:27 +1000	[thread overview]
Message-ID: <CAN05THT=mH5_iNnJ581w8V2f2+Rxr_KkYfy9gibu0-ZOsDV2RQ@mail.gmail.com> (raw)
In-Reply-To: <CAKywueRD76842q22OpZePdhO9+febBv-CxdhZZiCjCrCjrpAGQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2151 bytes --]

The patch is pretty small.
You might need to massage it a little bit since I recall that we
renamed the smb2quota util
but that is not yet in github

On Fri, Dec 13, 2019 at 10:23 AM Pavel Shilovsky <piastryyy@gmail.com> wrote:
>
> Hi everyone,
>
> Sorry for the delay in responses. I agree with the idea to re-write
> smbinfo in python since it gives more flexibility. And yes, we will
> need installers for python utilities in order to properly ship those.
>
> I am going to cut off the next release at the beginning of next week.
> The "next" branch is updated to have everything that I have got for
> now, except smbinfo re-write in python that I would like to postpone
> for the next release.
>
> https://github.com/piastry/cifs-utils/commits/next
>
> If any patch is missed or If someone has any WIP patches that need to
> be in the next release, please let me know.
>
> --
> Best regards,
> Pavel Shilovsky
>
> чт, 10 окт. 2019 г. в 00:22, Aurélien Aptel <aaptel@suse.com>:
> >
> > "ronnie sahlberg" <ronniesahlberg@gmail.com> writes:
> > > I think it would be good to have these tools as part of the actual install.
> > > They are in python so they are imho much more useful to the target users
> > > (sysadmins) than a utility written in C.
> > > (I kind of regret that smbinfo is in C, it should have been python
> > > too:-( )
> >
> > I completely agree, we could rewrite smbinfo in python.
> >
> > > Maybe we just need to decide on a naming prefix for these utilities
> > > and then there shouldn't be
> > > a problem to add many small useful tools.
> >
> > We can also make the C code call the python script for now (or vice
> > versa, while smbinfo gets rewritten).
> >
> > > The nice thing with small python tools is that it is so easy to tweak
> > > them to specific usecases.
> >
> > +100
> >
> > Cheers,
> > --
> > Aurélien Aptel / SUSE Labs Samba Team
> > GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
> > SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg, DE
> > GF: Felix Imendörffer, Mary Higgins, Sri Rasiah HRB 247165 (AG München)

[-- Attachment #2: 0001-Install-smb2quota-and-its-manpage.patch --]
[-- Type: text/x-patch, Size: 2154 bytes --]

From cb192b3159f404b6a570d856b440aa44832deda1 Mon Sep 17 00:00:00 2001
From: Ronnie Sahlberg <lsahlber@redhat.com>
Date: Fri, 13 Dec 2019 10:30:00 +1000
Subject: [PATCH] Install smb2quota and its manpage

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
---
 Makefile.am               | 6 ++++++
 configure.ac              | 6 ++++++
 smb2quota.py => smb2quota | 0
 3 files changed, 12 insertions(+)
 rename smb2quota.py => smb2quota (100%)

diff --git a/Makefile.am b/Makefile.am
index 8291b99..2adc800 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,6 +25,7 @@ RST2MAN = $(have_rst2man) --syntax-highlight=none $< $@
 
 CLEANFILES =
 bin_PROGRAMS =
+bin_SCRIPTS =
 sbin_PROGRAMS =
 
 if CONFIG_CIFSUPCALL
@@ -85,6 +86,11 @@ smbinfo_SOURCES = smbinfo.c
 rst_man_pages += smbinfo.1
 endif
 
+if CONFIG_PYTHON_TOOLS
+CLEANFILES += smb2quota.rst
+bin_SCRIPTS += smb2quota
+endif
+
 if CONFIG_PLUGIN
 plugindir = $(pkglibdir)
 plugin_PROGRAMS = idmapwb.so
diff --git a/configure.ac b/configure.ac
index cc48563..1b2c9c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,11 @@ AC_ARG_ENABLE(smbinfo,
         enable_smbinfo=$enableval,
         enable_smbinfo="maybe")
 
+AC_ARG_ENABLE(pythontools,
+        [AS_HELP_STRING([--enable-pythontools],[Install python utilities @<:@default=yes@@])],
+        enable_pythontools=$enableval,
+        enable_pythontools="maybe")
+
 AC_ARG_ENABLE(pam,
 	[AS_HELP_STRING([--enable-pam],[Create cifscreds PAM module @<:@default=yes@:>@])],
 	enable_pam=$enableval,
@@ -281,6 +286,7 @@ AM_CONDITIONAL(CONFIG_CIFSCREDS, [test "$enable_cifscreds" != "no"])
 AM_CONDITIONAL(CONFIG_CIFSIDMAP, [test "$enable_cifsidmap" != "no"])
 AM_CONDITIONAL(CONFIG_CIFSACL, [test "$enable_cifsacl" != "no"])
 AM_CONDITIONAL(CONFIG_SMBINFO, [test "$enable_smbinfo" != "no"])
+AM_CONDITIONAL(CONFIG_PYTHON_TOOLS, [test "$enable_pythontools" != "no"])
 AM_CONDITIONAL(CONFIG_PAM, [test "$enable_pam" != "no"])
 AM_CONDITIONAL(CONFIG_PLUGIN, [test "$enable_cifsidmap" != "no" -o "$enable_cifsacl" != "no"])
 
diff --git a/smb2quota.py b/smb2quota
similarity index 100%
rename from smb2quota.py
rename to smb2quota
-- 
2.21.0


  reply	other threads:[~2019-12-13  0:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-24  4:56 [PATCH] smb2quota.py: Userspace helper to display quota information for the Linux SMB client file system (CIFS) Kenneth D'souza
2019-10-04 18:43 ` Pavel Shilovsky
2019-10-09 13:13 ` Aurélien Aptel
2019-10-09 13:57   ` Kenneth Dsouza
     [not found]   ` <CAA_-hQL8MpS9YEcaQpuiQnbsuJwerutnbxWhE-Fyk1X4jpvwcw@mail.gmail.com>
2019-10-09 14:31     ` Aurélien Aptel
2019-10-09 23:29       ` ronnie sahlberg
2019-10-10  0:51         ` Steve French
2019-10-10  7:22         ` Aurélien Aptel
2019-12-13  0:23           ` Pavel Shilovsky
2019-12-13  0:34             ` ronnie sahlberg [this message]
2019-12-13  0:59               ` Pavel Shilovsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAN05THT=mH5_iNnJ581w8V2f2+Rxr_KkYfy9gibu0-ZOsDV2RQ@mail.gmail.com' \
    --to=ronniesahlberg@gmail.com \
    --cc=aaptel@suse.com \
    --cc=kdsouza@redhat.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=lsahlber@redhat.com \
    --cc=piastryyy@gmail.com \
    --cc=smfrench@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).