Re: python dev

2024-04-26 Thread Bodie
On 26.4.2024 20:36, Gustavo Rios wrote: Hi folks! May some here tell me if openbsd supports python dev package in the ports collection ? Reading this https://stackoverflow.com/questions/35866369/how-to-manually-install-python-dev-from-source and after that checking https

Re: python dev

2024-04-26 Thread Bodie
On 26.4.2024 20:43, Stuart Henderson wrote: On 2024-04-26, Gustavo Rios wrote: --78bcdd0617042ecf Content-Type: text/plain; charset="UTF-8" Hi folks! May some here tell me if openbsd supports python dev package in the ports collection ? What is "python dev&q

Re: python dev

2024-04-26 Thread Stuart Henderson
On 2024-04-26, Gustavo Rios wrote: > --78bcdd0617042ecf > Content-Type: text/plain; charset="UTF-8" > > Hi folks! > > May some here tell me if openbsd supports python dev package in the ports > collection ? What is "python dev"? -- Please keep replies on the mailing list.

python dev

2024-04-26 Thread Gustavo Rios
Hi folks! May some here tell me if openbsd supports python dev package in the ports collection ? Thanks a lot. -- The lion and the tiger may be more powerful, but the wolves do not perform in the circus

Re: Python 3.10 required by py3-bsddb3 but not supported

2023-06-01 Thread Robert Nagy
On 01/06/23 11:02 +0100, Stuart Henderson wrote: > [moved to ports@; reply-to set] > > On 2023-05-31, Roger Marsh wrote: > > Script started on Wed May 31 10:43:00 2023 > > This pkg_info report shows Python 3.10 required by py3-bsddb3 after upgrade > > from OpenBSD 7.2

Re: Python 3.10 required by py3-bsddb3 but not supported

2023-06-01 Thread Stuart Henderson
[moved to ports@; reply-to set] On 2023-05-31, Roger Marsh wrote: > Script started on Wed May 31 10:43:00 2023 > This pkg_info report shows Python 3.10 required by py3-bsddb3 after upgrade > from OpenBSD 7.2 to 7.3 and package upgrade. > > As bsddb3 does not support Python 3.

Python 3.10 required by py3-bsddb3 but not supported

2023-06-01 Thread Roger Marsh
Script started on Wed May 31 10:43:00 2023 This pkg_info report shows Python 3.10 required by py3-bsddb3 after upgrade from OpenBSD 7.2 to 7.3 and package upgrade. As bsddb3 does not support Python 3.10 or later but does support Python 3.9 and earlier, surely the requirement should be on Python

Re: Pkg_add Python version and LibreSSL seem to be incompatible in OpenBSD 7.3

2023-05-15 Thread Stuart Henderson
On 2023-05-14, Judah Kocher wrote: > Some web searching has not turned up any details around this. I also do > not see python 3.9 as an installable option via pkg_add, just 3.10 and > 3.11. 3.9 is still there. > Does this mean that installing python via pkg_add installs

Re: Pkg_add Python version and LibreSSL seem to be incompatible in OpenBSD 7.3

2023-05-14 Thread Judah Kocher
python scripts that update various public DNS records when my public IP changes started failing with generic segfaults. I did see the note in the OpenBSD Upgrade Guide about 3.10 being the new default so I ran pkg_add -u which updated python to 3.10 and now the same scripts fail but with this error

Re: Pkg_add Python version and LibreSSL seem to be incompatible in OpenBSD 7.3

2023-05-14 Thread Otto Moerbeek
On Sun, May 14, 2023 at 12:25:28PM -0400, Judah Kocher wrote: > After updating one of my routers to OpenBSD 7.3, my python scripts that > update various public DNS records when my public IP changes started failing > with generic segfaults. I did see the note in the OpenBSD Upgrade Guid

Pkg_add Python version and LibreSSL seem to be incompatible in OpenBSD 7.3

2023-05-14 Thread Judah Kocher
After updating one of my routers to OpenBSD 7.3, my python scripts that update various public DNS records when my public IP changes started failing with generic segfaults. I did see the note in the OpenBSD Upgrade Guide about 3.10 being the new default so I ran pkg_add -u which updated python

Re: Guide for Configuring python(1) with httpd(8)

2022-12-24 Thread Crystal Kolipe
.. > The above is just a simple example that has one input field ('name'). > In order to grab the 'name' inputted by the user, > I need to use the 'cgi' module. Firstly, you don't actually _need_ to use the Python cgi module to write a cgi program that h

Re: Guide for Configuring python(1) with httpd(8)

2022-12-23 Thread indivC
isplaying content. I can display HTML from within a python file and run python code to alter what's displayed in HTML. All good stuff. However, the 'cgi' module is giving me trouble that I can't resolve. It simply won't import without errors. Why am I trying to import the

Re: Guide for Configuring python(1) with httpd(8)

2022-12-20 Thread Crystal Kolipe
On Tue, Dec 20, 2022 at 02:01:03PM +, indivC wrote: > Crystal, > > I really appreciate the detailed explanations > and step by step instructions. > I was able to follow everything without a problem > and was able to finally access the python file from a web browser.

Re: Guide for Configuring python(1) with httpd(8)

2022-12-20 Thread indivC
Crystal, I really appreciate the detailed explanations and step by step instructions. I was able to follow everything without a problem and was able to finally access the python file from a web browser. On Monday, December 19th, 2022 at 11:07 AM, Crystal Kolipe wrote: > # mkdir /var/www/

Re: Python access to Berkeley DB

2022-12-19 Thread Stuart Cassoff
-- Original Message -- From: stu.li...@spacehopper.org To: po...@openbsd.org Cc: misc@openbsd.org Sent: Monday, December 19, 2022 7:53 AM Subject: Re: Python access to Berkeley DB [ moving to ports@, hopefully reply-to will be set correctly if I got the gmane/nntp

Re: Python access to Berkeley DB

2022-12-19 Thread Stuart Henderson
ave not done which would make this work? > > I tried this because the bsddb3 (Python) package is not supported at Python > 10, and it's replacement, berkeleydb, does not support the Berkeley DB > versions provided as OpenBSD packages. You might possibly be able to kludge around it

Re: Guide for Configuring python(1) with httpd(8)

2022-12-19 Thread Crystal Kolipe
On Mon, Dec 19, 2022 at 05:43:28AM +, indivC wrote: > What I'm trying to do is display a python file > that has imbedded HTML within a web browser. ... > Within a browser, I want to be able to access this file > and see 'Hello World' displayed. OK, so you ba

Re: Guide for Configuring python(1) with httpd(8)

2022-12-18 Thread indivC
o messages further down. What I'm trying to do is display a python file that has imbedded HTML within a web browser. The file is 'hello_world.py' and below are its contents: #!/usr/local/bin/python3 print('Content-type:text/html\n') print('') print('

Re: Guide for Configuring python(1) with httpd(8)

2022-12-18 Thread Bodie
On 18.12.2022 08:07, indivC wrote: Can anyone provide a guide for this or rough instructions? I'm running httpd(8) and trying to utilize a python(1) script with an html file. I've got this working using perl(1). However, it doesn't work with python(1) when following the same s

Re: Guide for Configuring python(1) with httpd(8)

2022-12-18 Thread Stuart Henderson
is or rough instructions?", > which is in reference to the subject > "Guide for Configuring python(1) with httpd(8)". Surely the goal is to run some particular software and make it available via an httpd(8) frontend and not just run python(1) i.e. the Python interpreter? >

Re: Guide for Configuring python(1) with httpd(8)

2022-12-18 Thread Crystal Kolipe
On Sun, Dec 18, 2022 at 12:18:32PM +0100, Omar Polo wrote: > On pypi there is a 'fastcgi' library. it's not packaged on OpenBSD > and I can't asses how good it is Alternatively, just write a fastcgi handler from scratch - the protocol is fairly simple and fully documented. Httpd only implements

Re: Guide for Configuring python(1) with httpd(8)

2022-12-18 Thread Omar Polo
On 2022/12/18 10:23:39 +, indivC wrote: > On Sunday, December 18th, 2022 at 9:04 AM, Omar Polo > wrote: > > Since httpd speaks fastcgi, why not write some python code that > > accepts the requests over fastcgi? (assuming this is what you're > > trying to do,

Re: Guide for Configuring python(1) with httpd(8)

2022-12-18 Thread indivC
On Sunday, December 18th, 2022 at 8:38 AM, Mark Willson > This is the script I use to set up python for httpd: I looked over the script and it seems to do pretty much what I've already done. It copies some additional files that I didn't copy. My first attempt was just to

Re: Guide for Configuring python(1) with httpd(8)

2022-12-18 Thread indivC
bject "Guide for Configuring python(1) with httpd(8)". Did i precede to explain how I was trying to attempt to accomplish Y with X? Yes, but I don't see why that would be a problem. I feel like it's better for users to actually attempt to try and solve their problems then not to tr

Re: Guide for Configuring python(1) with httpd(8)

2022-12-18 Thread Omar Polo
instead of asking how to do X so that you can do Y, ask directly how to do Y. Why do you need python at all in the chroot? Installing all the needed files (and keeping them up-to-date!) manually in a chroot is a pain. Since httpd speaks fastcgi, why not write some python code that accepts the

Re: Guide for Configuring python(1) with httpd(8)

2022-12-18 Thread Mark Willson
> -Original Message- > From: owner-m...@openbsd.org On Behalf Of indivC > Sent: 18 December 2022 07:07 > To: misc@openbsd.org > Subject: Guide for Configuring python(1) with httpd(8) > > Can anyone provide a guide for this or rough instructions? > I'm r

Guide for Configuring python(1) with httpd(8)

2022-12-17 Thread indivC
Can anyone provide a guide for this or rough instructions? I'm running httpd(8) and trying to utilize a python(1) script with an html file. I've got this working using perl(1). However, it doesn't work with python(1) when following the same steps. My python(1) version is 3.

Python access to Berkeley DB

2022-12-17 Thread Roger Marsh
The attempt to get at Berkeley DB, installed from packages, via tkinter fails with some undefined symbol messages. Is there something I have not done which would make this work? I tried this because the bsddb3 (Python) package is not supported at Python 10, and it's replacement, berke

Re: Libreoffice crashing on Thinkcentre m92p 7.1 FVWM - seems to be a python problem

2022-09-26 Thread Cal Ledsham
nal email describing the problem is appended below for interested ports@ readers. ___ From: owner-m...@openbsd.org on behalf of Stuart Henderson Sent: Monday, 26 September 2022 11:27 PM To: misc@openbsd.org Subject: Re: Libreoffice crashing on Thinkcentre m92p 7.1 FVWM - seems to be

Re: Libreoffice crashing on Thinkcentre m92p 7.1 FVWM - seems to be a python problem

2022-09-26 Thread Stuart Henderson
On 2022-09-25, Luke A. Call wrote: > Details in case it helps: > https://marc.info/?l=openbsd-misc&m=161280915705719&w=2 > https://marc.info/?l=openbsd-bugs&m=164814366002554&w=2 I think I tried to read that bugs@ report before but got totally bogged down in all the detail about how you use a spe

Re: Libreoffice crashing on Thinkcentre m92p 7.1 FVWM - seems to be a python problem

2022-09-25 Thread Cal Ledsham
on Thinkcentre m92p 7.1 FVWM - seems to be a python problem Details in case it helps: https://marc.info/?l=openbsd-misc&m=161280915705719&w=2 https://marc.info/?l=openbsd-bugs&m=164814366002554&w=2 On 2022-09-25 08:24:44-0600, Luke A. Call wrote: > I had a similar problem

Re: Libreoffice crashing on Thinkcentre m92p 7.1 FVWM - seems to be a python problem

2022-09-25 Thread Luke A. Call
the command line when launching LO, but File / Open would crash when > choosing the file and hitting OK. But I don't think mine was > python-related. It seemed that my cleaning up by removing evidently unused > packages > removed something that was required for LO but not explicitly lis

Re: Libreoffice crashing on Thinkcentre m92p 7.1 FVWM - seems to be a python problem

2022-09-25 Thread Luke A. Call
I had a similar problem where I could open files with LO if I typed them on the command line when launching LO, but File / Open would crash when choosing the file and hitting OK. But I don't think mine was python-related. It seemed that my cleaning up by removing evidently unused pac

Libreoffice crashing on Thinkcentre m92p 7.1 FVWM - seems to be a python problem

2022-09-24 Thread Cal Ledsham
rning: failed to launch javaldx - java may not function correctly Could not find platform independent libraries Consider setting $PYTHONHOME to [:] Python path configuration: PYTHONHOME = (not set) PYTHONPATH = '/usr/local/lib/libreoffice/program/../program' program name = 'py

Re: unable to install texlive_texmf-full due to python reaching 2.7 end-of-life

2022-09-04 Thread Sandeep Gupta
HI Stuart, I was redoing the install to reproduce the error messages. But this time it went fine. I guess the difference was previously I ran the command as root and this time as sudo/doas user. Might be something to do with PATH environment for root vs. non-root user. Sorry for the noise. Thank

Re: unable to install texlive_texmf-full due to python reaching 2.7 end-of-life

2022-09-01 Thread Stuart Henderson
On 2022/09/01 19:41, Ali Farzanrad wrote: > Hi Stuart, > > I think that I know the problem. > pkg_add will search python in stable directory before searching for it > in release directory and it find python. However it will only find > version 3, because there is no python 2 i

Re: unable to install texlive_texmf-full due to python reaching 2.7 end-of-life

2022-09-01 Thread Ali Farzanrad
Hi Stuart, I think that I know the problem. pkg_add will search python in stable directory before searching for it in release directory and it find python. However it will only find version 3, because there is no python 2 in stable directory. So it will stop searching (because it found python

Re: unable to install texlive_texmf-full due to python reaching 2.7 end-of-life

2022-09-01 Thread Stuart Henderson
On 2022-09-01, Sandeep Gupta wrote: > Is there a workaround for installing texlive_full on openbsd 7.1? > Installing via package manager currently fails because > it has Python2.7 as dependency which has reached end-of-life. Can I force > the installation? Python 2.7 packages are sti

unable to install texlive_texmf-full due to python reaching 2.7 end-of-life

2022-09-01 Thread Sandeep Gupta
Is there a workaround for installing texlive_full on openbsd 7.1? Installing via package manager currently fails because it has Python2.7 as dependency which has reached end-of-life. Can I force the installation? Thanks Sandeep

Re: pkg_add python errors ...

2021-11-30 Thread Stuart Henderson
On 2021-11-29, Why 42? The lists account. wrote: > > Well, errors related to the python package ... > > After updating to the latest snapshot and rebooting I ran "pkg_add -vu" > to update all my packages, which I think is the right thing to do. > > I noticed some s

pkg_add python errors ...

2021-11-29 Thread Why 42? The lists account.
Well, errors related to the python package ... After updating to the latest snapshot and rebooting I ran "pkg_add -vu" to update all my packages, which I think is the right thing to do. I noticed some strange errors related to python scroll past i.e. > ... > Update candidate

Re: Python 3.8 os.listdir EINVAL on large directories

2020-07-26 Thread Alceu Rodrigues de Freitas Junior
and usually readdir is the preferred method, but might be too slow for your usage case (in my case it was, it took hours to read the directory while with getdents took minutes). It doesn't seems a problem with OpenBSD, but with Python code. Looks like some additional logic will be required t

Re: Python 3.8 os.listdir EINVAL on large directories

2020-07-26 Thread Aaron Miller
took hours to read the directory while with getdents took >minutes). > >It doesn't seems a problem with OpenBSD, but with Python code. Looks >like some additional logic will be required to address the differences >betweens the UNIX-like OSs and their implementation of getdent

Python 3.8 os.listdir EINVAL on large directories

2020-07-25 Thread Aaron Miller
'/mnt/thinkpad_void_obsd_borg/thinkpad.borg/data/12' This is same error is reproducible with a test Python 3.8 program: #!/usr/bin/env python import os os.listdir('/mnt/thinkpad_void_obsd_borg/thinkpad.borg/data/12/') Running ktrace & kdump reveals the error is from

Re: Unable to kill a python process

2020-02-13 Thread 陈贤文
Dear Ingo, On 2/13/20, Ingo Schwarze wrote: > (Unless you pierce its heart with a woodden stick. Sorry, now i was >$ kill -CONT 39747 Thank you for showing me the wooden stick! It worked! Yours sincerely, Xianwen

Re: Unable to kill a python process

2020-02-13 Thread Ingo Schwarze
Hi, Xianwen Chen wrote on Thu, Feb 13, 2020 at 09:31:45PM +: > Maurice wrote: >> you could try kill -1 8926 > Thank you. I just tried it. It did not kill the process. Small wonder, you already already dropped a nuke on it (-9 = -KILL) and even that didn't make the zombie go away. You certa

Re: Unable to kill a python process

2020-02-13 Thread 陈贤文
Dear Maurice, > you could try kill -1 8926 Thank you. I just tried it. It did not kill the process. Yours sincerely, Xianwen

Re: Unable to kill a python process

2020-02-13 Thread Ingo Schwarze
Hi, Xianwen Chen wrote on Thu, Feb 13, 2020 at 08:10:17PM +: > I am not able to kill a python process. > $ pgrep python > showed a PID of 8926 > However, I am not able to kill the process. > $ kill -9 8926 > # kill -9 8926 > Running as root did not help. Sounds like

Re: Unable to kill a python process

2020-02-13 Thread Maurice McCarthy
you could try kill -1 8926

Unable to kill a python process

2020-02-13 Thread 陈贤文
Dear OpenBSD users, I am not able to kill a python process. $ pgrep python showed a PID of 8926 However, I am not able to kill the process. $ kill -9 8926 # kill -9 8926 Running as root did not help. How can I kill this process? Yours sincerely, Xianwen

Re: Building Unbound with Python module support

2019-08-07 Thread Andy Lemin
Hi Claudio, I did actually try putting my python plugin and unboundmodule.py into the chroot, but I completely forgot that I would also need to install the rest of python into the chroot! Haha Serves me right for working on it until 1am when I should should have been asleep and trying with

Re: Building Unbound with Python module support

2019-08-07 Thread Claudio Jeker
values for PYTHONHOME and I have also tried > > --with-pythonmodule=/usr/local/lib/python2.7/site-packages > > > Searching around shows others have found the exact same issue; > https://nlnetlabs.nl/pipermail/unbound-users/2011-July/007371.html > > What do you think about this

Re: Building Unbound with Python module support

2019-08-07 Thread Andy Lemin
And I found “/usr/src/usr.src/unbound/Makefile.bsd-wrapper” so I think I have > found the correct build options to match with the base builds > CONFIGURE_OPTS_UNBOUND > > I will try again with these options tomorrow, and see if I have the same > errors. > > “The default ins

Re: Building Unbound with Python module support

2019-08-06 Thread Andy Lemin
CONFIGURE_OPTS_UNBOUND I will try again with these options tomorrow, and see if I have the same errors. “The default install can't include Python support, because the default install of Unbound is in the base OS, and Python isn't.” Facepalm.. Of course! Is there a C plugin library? I would like to

Re: Building Unbound with Python module support

2019-08-06 Thread Stuart Henderson
On 2019-08-06, Andy Lemin wrote: > Hi guys, > > I’m just after some general advice as I feel like I’m doing something wrong, > and having to hack around too much for what I believe should be simple. > > I am developing a simple Python plugin for Unbound, and the default Unb

Building Unbound with Python module support

2019-08-06 Thread Andy Lemin
Hi guys, I’m just after some general advice as I feel like I’m doing something wrong, and having to hack around too much for what I believe should be simple. I am developing a simple Python plugin for Unbound, and the default Unbound install on OpenBSD sadly wasn’t built with “—with

Re: productivity/khard (or python) seem slow

2019-05-24 Thread David Mimms
On 2019.05.18 11:39, David Mimms wrote: On 2019.05.17 11:41, Paco Esteban wrote: On Thu, 16 May 2019, Joel Carnat wrote: On Thu 16/05 08:55, Paco Esteban wrote: Can't say about your VM. On my desktop: $ time (khard list | wc -l) 104 ( khard list | wc -l; ) 0.51s user 0.25s system

Re: productivity/khard (or python) seem slow

2019-05-18 Thread Joel Carnat
On Sat 18/05 19:15, Strahil wrote: > I run vanilla openBSD 6.5 on oVirt (KVM) with gluster as storage and it seems > OK for my needs but I never used khard. > What kind of slowness do you experience? > Maybe I can run some tests and see if the situation is the same on KVM. > Well, it takes sever

Re: productivity/khard (or python) seem slow

2019-05-18 Thread Joel Carnat
On Sat 18/05 11:39, David Mimms wrote: > On 2019.05.17 11:41, Paco Esteban wrote: > > On Thu, 16 May 2019, Joel Carnat wrote: > > > > > On Thu 16/05 08:55, Paco Esteban wrote: > > > > Can't say about your VM. On my desktop: > > > > > > > > $ time (khard list | wc -l) > > > >104 > > > >

Re: productivity/khard (or python) seem slow

2019-05-18 Thread Strahil
I run vanilla openBSD 6.5 on oVirt (KVM) with gluster as storage and it seems OK for my needs but I never used khard. What kind of slowness do you experience? Maybe I can run some tests and see if the situation is the same on KVM. Best Regards, Strahil NikolovOn May 18, 2019 18:39, David Mimms w

Re: productivity/khard (or python) seem slow

2019-05-18 Thread David Mimms
On 2019.05.17 11:41, Paco Esteban wrote: On Thu, 16 May 2019, Joel Carnat wrote: On Thu 16/05 08:55, Paco Esteban wrote: > Can't say about your VM. On my desktop: > > $ time (khard list | wc -l) >104 > ( khard list | wc -l; ) 0.51s user 0.25s system 97% cpu 0.779 total > Is this o

Re: productivity/khard (or python) seem slow

2019-05-17 Thread Paco Esteban
On Thu, 16 May 2019, Joel Carnat wrote: > On Thu 16/05 08:55, Paco Esteban wrote: > > Can't say about your VM. On my desktop: > > > > $ time (khard list | wc -l) > >104 > > ( khard list | wc -l; ) 0.51s user 0.25s system 97% cpu 0.779 total > > > > Is this on OpenBSD ? The time out

Re: productivity/khard (or python) seem slow

2019-05-16 Thread Joel Carnat
gt; > noticed that ranger felt a bit slow to start but thought it was the > > software ; so I switched to nnn. > > > > # time (khard list | wc -l) > > 112 > > 0m07.10s real 0m04.08s user 0m02.99s system > > > > Is this an issue with

Re: productivity/khard (or python) seem slow

2019-05-15 Thread Paco Esteban
ware ; so I switched to nnn. > > # time (khard list | wc -l) > 112 > 0m07.10s real 0m04.08s user 0m02.99s system > > Is this an issue with my VM (2 vCPU / 4GB RAM / 20GB SSD) or are Python > software just slow? Can't say about your VM. On my desktop:

productivity/khard (or python) seem slow

2019-05-15 Thread Joel Carnat
real 0m04.08s user 0m02.99s system Is this an issue with my VM (2 vCPU / 4GB RAM / 20GB SSD) or are Python software just slow? Thanks.

Re: Problems trying to format currency with python

2019-01-24 Thread Luca Franchini
Il giorno Dom 20 Gen 2019 16:00 Ingo Schwarze ha scritto: [...] > > OpenBSD intentionally does not implement any LC_MONETARY or strfmon(3) > functionality because we believe that such functionality does not > belong in the C library but should instead be implemented in > specialized support libr

Re: Problems trying to format currency with python

2019-01-20 Thread Ingo Schwarze
Hi Luca, Luca Franchini wrote on Sun, Jan 20, 2019 at 03:41:46PM +0100: > I got an error while running this: > > amidatacyber730:~$ python3.6 > Python 3.6.6 (default, Oct 11 2018, 12:39:19) > [GCC 4.2.1 Compatible OpenBSD Clang 6.0.0 (tags/RELEASE_600/final)] on o > Type

Problems trying to format currency with python

2019-01-20 Thread Luca Franchini
Hi all, I got an error while running this: amidatacyber730:~$ python3.6 Python 3.6.6 (default, Oct 11 2018, 12:39:19) [GCC 4.2.1 Compatible OpenBSD Clang 6.0.0 (tags/RELEASE_600/final)] on o Type "help", "copyright", "credits" or "license"

Re: migrate python script from sudo to doas

2018-11-03 Thread Markus Rosjat
see 2 possible cause : - your python script, - or maybe the userid for which your python script runs is not the one defined in doas.conf. i switch back to spawnl function and it worked with doas so I will stick with that since it's working. Maybe later I will revisit the problem and give it an

Re: migrate python script from sudo to doas

2018-11-02 Thread vincent delft
Hello Markus, I cannot reproduce your problem. As you can see here under I can create a user "test1" on the command line, and, with the same userid, I can create it with python2 and python3 too. (I'm running 6.4) I see 2 possible cause : - your python script, - or maybe the u

Re: migrate python script from sudo to doas

2018-10-31 Thread Markus Rosjat
Hi Vincent Am 30.10.2018 um 16:03 schrieb Vincent Legoll: Maybe you should try like the following: cmd = ['doas', 'useradd', '-u', user_id, '-g', '=uid', '-s', '/sbin/nologin', '-d', mb_parent_dir, user_name] exit = subprocess.check_call(cmd) this doesn't solve the problem, i

Re: migrate python script from sudo to doas

2018-10-30 Thread Vincent Legoll
Hello, On Tue, Oct 30, 2018 at 12:33 PM Markus Rosjat wrote: > exit = subprocess.check_call(['doas', 'useradd', '-u %s' % user_id, > '-g =uid', > '-s /sbin/nologin', > '-d %s' % mb_parent_dir, > user_name]) Maybe you should try like the following: cmd = ['doas', 'useradd', '-u', user_id,

Re: migrate python script from sudo to doas

2018-10-30 Thread Markus Rosjat
Hi, as I stated before on a cmd is no problem, Im using 6.4 release Am 30.10.2018 um 12:56 schrieb Solene Rapenne: Markus Rosjat wrote: hi all, I have some old python scripts that using os.spawnl to execute stuff like useradd  combined with sudo. This worked just fine on systems with sudo

Re: migrate python script from sudo to doas

2018-10-30 Thread Solene Rapenne
Markus Rosjat wrote: > hi all, > > I have some old python scripts that using os.spawnl to execute stuff > like useradd  combined with sudo. This worked just fine on systems with > sudo installed  but these days we have doas and its totally enough for > things I use to do s

migrate python script from sudo to doas

2018-10-30 Thread Markus Rosjat
hi all, I have some old python scripts that using os.spawnl to execute stuff like useradd  combined with sudo. This worked just fine on systems with sudo installed  but these days we have doas and its totally enough for things I use to do so I said to myself "lets update these old sc

Re: Python script using /proc

2018-08-16 Thread butresin
On 0816 1541, Ingo Schwarze wrote: > Hi, > > butresin wrote on Thu, Aug 16, 2018 at 03:28:57PM +0200: > > > There is a python script, what is using the /proc/ directory. > [...] > > Should i worry? > > Yes, you should: /proc is a mostly broken concept. &g

Re: Python flask socket with httpd problems

2018-08-13 Thread flipchan
ser www read and write to >it? >On Aug 12, 2018 11:40 AM, Tony Boston wrote: >> >> On 12.08.18 03:25, flipchan wrote: >> > Hello all, >> > >> > im trying to run a python flask application with httpd >> > as a reverse proxy and im not getti

Re: Python flask socket with httpd problems

2018-08-12 Thread edgar
What are the permissions on the socket? Can user www read and write to it? On Aug 12, 2018 11:40 AM, Tony Boston wrote: > > On 12.08.18 03:25, flipchan wrote: > > Hello all, > > > > im trying to run a python flask application with httpd > > as a reverse proxy

Re: Python flask socket with httpd problems

2018-08-12 Thread Tony Boston
On 12.08.18 03:25, flipchan wrote: > Hello all, > > im trying to run a python flask application with httpd > as a reverse proxy and im not getting it to work. > > According to the python flask's online documentation, > i should be able to just create a fast-cgi socke

Python flask socket with httpd problems

2018-08-12 Thread flipchan
Hello all, im trying to run a python flask application with httpd as a reverse proxy and im not getting it to work. According to the python flask's online documentation, i should be able to just create a fast-cgi socket that should work with httpd, however i am only getting 500 errors w

Re: Best Practices python virtualenv

2018-05-03 Thread Stuart Henderson
On 2018-05-01, IL Ka wrote: >> while there are Python modules which rely on W|X. > Yes, but I do not use them. > > I only run Python and Django. > I am aware of the fact that my python is not compatible with some modules, > and I am ok with it since I do not need them. >

Re: Best Practices python virtualenv

2018-05-01 Thread Ken MacKenzie
Not exactly. For starters right now I am getting to know OpenBSD as a platform so at this point is more about evaluating if and how to alter my workflows to better fit with the platform. Next off though is in general with python code I do consider it important to think about what the deployment

Re: Best Practices python virtualenv

2018-05-01 Thread Ve Telko
Hi, Ken. Did you noticed that you are spending much more time with setting up your env every time you want to run your python apps than with programming itself? No offense but I think this is not normal. Ve.

Re: Best Practices python virtualenv

2018-05-01 Thread Raphael
On Mon, Apr 30, 2018 at 04:46:49PM +, Ken MacKenzie wrote: > Is there a recommended best practice when setting up an environment with > python > virtualenv with regards to wxallowed. > > My typical workflow is under my home directory I have a > dev/language/project/.venv

Re: Best Practices python virtualenv

2018-05-01 Thread Leonid Bobrov
On Tue, May 01, 2018 at 04:22:50PM +, Ken MacKenzie wrote: > I power my flying car with flying monkeys... > No need to, I am free as a bird, I can power my flying car with my flying wings. Oh, wait, I don't have wings... Anyway, nice joke, but I feel myself embarrasing.

Re: Best Practices python virtualenv

2018-05-01 Thread Ken MacKenzie
I power my flying car with flying monkeys... I think the best answer from all this comes back to, at least for python 3, switching over to the built in venv in python3. Other than that the symlink to a location in /usr/local for venv is another option for python 2 or packages that need to

Re: Best Practices python virtualenv

2018-05-01 Thread Theo de Raadt
Leonid Bobrov wrote: > I have a plan how to completely get rid of wxallowed mount option, > but I am not yet skilled to fix W|X ports, especially the ones > written in C++ (I've started learning C++ recently). Is that like "I have a plan to build a flying car, but I don't yet have any meta

Re: Best Practices python virtualenv

2018-05-01 Thread IL Ka
> while there are Python modules which rely on W|X. Yes, but I do not use them. I only run Python and Django. I am aware of the fact that my python is not compatible with some modules, and I am ok with it since I do not need them. > use ports instead of pkg_add to get Python binary witho

Re: Best Practices python virtualenv

2018-05-01 Thread Leonid Bobrov
On Tue, May 01, 2018 at 06:09:59PM +0300, IL Ka wrote: > > > > So you're now on a custom built python and are unable to use standard > > pkg_add upgrades to new versions. I'd say that on balance, this is more > > likely to *reduce* your security. > > >

Re: Best Practices python virtualenv

2018-05-01 Thread IL Ka
> > So you're now on a custom built python and are unable to use standard pkg_add upgrades to new versions. I'd say that on balance, this is more > likely to *reduce* your security. I built it from ports, so I can update it using standard port update procedure. Since pack

Re: Best Practices python virtualenv

2018-05-01 Thread Marco Bonetti
- On Apr 30, 2018, at 5:46 PM, Ken MacKenzie k...@mack-z.com wrote: > Is there a recommended best practice when setting up an environment with > python > virtualenv with regards to wxallowed. I use a specific directory in /usr/local which is very close to your option 2: # mkdi

Re: Best Practices python virtualenv

2018-05-01 Thread Etienne
On 05/01/18 01:54, IL Ka wrote: Since /usr/local/ has wxallowed by default (see your /etc/fstab) it works. Does it affect security? In theory -- yes, because python can now create WX pages. True. But I use this solution because:  - root controls what goes in /usr/local  - I mount /home

Re: Best Practices python virtualenv

2018-05-01 Thread Stuart Henderson
On 2018-05-01, IL Ka wrote: > It is up to you, but I still belive that best solution is to rebuild python > without of wxneeded. > 1) It improves security So you're now on a custom built python and are unable to use standard pkg_add upgrades to new versions. I'd say that on ba

Re: Best Practices python virtualenv

2018-04-30 Thread IL Ka
The only difference is venv creates link to python, it does not copy binary itself. You now have python3 -> /usr/local/bin/python3 in your venv. Since /usr/local/ has wxallowed by default (see your /etc/fstab) it works. Does it affect security? In theory -- yes, because python can now create

Re: Best Practices python virtualenv

2018-04-30 Thread Ken M
from a serving python web app perspective, security wise? Just trying to understand what I seem to be missing. Ken On Tue, May 01, 2018 at 03:18:00AM +0300, IL Ka wrote: > It is up to you, but I still belive that best solution is to rebuild python > without of wxneeded. > 1) It improves

Re: Best Practices python virtualenv

2018-04-30 Thread IL Ka
It is up to you, but I still belive that best solution is to rebuild python without of wxneeded. 1) It improves security 2) It fixes your virtualenv issue. If you do not use packages that need WX, why do you need wxneed?

Re: Best Practices python virtualenv

2018-04-30 Thread Ken M
I happen to like python and will be the first I reach for for many simple or even some bigger tasks. Nothing against those other languages. I actually have a special place in my heart for perl, but with the perl 5 vs 6 thing I wonder on the longer term future of the language. Honestly I need to

Re: Best Practices python virtualenv

2018-04-30 Thread Ken M
Thanks for all the responses but it seems an alternate solution presented by another user in a direct reply is to use python3 - m venv. Basically using the venv built in to python3 as opposed to the legacy method of py-virtualenv that I typically only have to use for older python 2 code bases

Re: Best Practices python virtualenv

2018-04-30 Thread Dave Voutila
Ken MacKenzie writes: > Is there a recommended best practice when setting up an environment with > python > virtualenv with regards to wxallowed. AFAIK nothing official. > > My typical workflow is under my home directory I have a > dev/language/project/.venv type structure.

  1   2   3   >