Artix Linux Forum

Artix Linux => System => Topic started by: chase on 27 March 2025, 18:10:31

Title: pydns deleted /usr/bin/
Post by: chase on 27 March 2025, 18:10:31
hello everybody, recently i was needed to install PyDNS python library
and idk, it was late evening, so i clone this repo - https://github.com/PyDNS/PyDNS
install depency, and run 'sudo python setup.py install'

i didnt particularly read the output(as i said, late evening, i was a little sleepy), just saw 'linking ../lib/pydns -> /usr/bin/pydns' and thought it build correctly, so i did 'ls'
and saw:
ls: not found (or something like that)

...

for the first, i thought that it was some $PATH issues, but somehow i check /usr/bin/ , and it was empty, except of pydns executable  :D
and then i check output of building, where was something like:
removing /usr/bin/
creating /usr/bin/
linking ../lib/pydns -> /usr/bin/pydns

should i say anything else? lol

i boot from artix usb, and copy /usr/bin/* to my artix partition(cause without that basestrap wasnt working fine), and then basestrap openrc, linux, elogind and etc...
then artix-chroot and reinstall some other packages
so, its okay now

but, is it actually okay that installing pyDNS broke my system? or i shouldnt build it from those repo, and choose, say, AUR except of this?
and maybe by making this topic i save someones artix from this
Title: Re: pydns deleted /usr/bin/
Post by: phoenix_king_rus on 28 March 2025, 07:03:32
That's what package managers exist for: they workaround shit like this, put files into temporary archives and then make it possible to install it (usually) without problems. So yes, you should either use pacman-based solution (AUR included) or pip.
Also, never install custom programs to /usr, only to /usr/lib. Do not mixed managed files with unmanaged ones.
Title: Re: pydns deleted /usr/bin/
Post by: ####### on 28 March 2025, 14:22:33
Quote
Also, never install custom programs to /usr, only to /usr/lib. Do not mixed managed files with unmanaged ones.
You meant /usr/local not /usr/lib I guess?  ;D

I git cloned the source for pydns you used, and the phrase "bin" doesn't appear anywhere in there when I searched it, and from a quick look at some of the build files I couldn't see anything obvious which would delete /usr/bin.  So I don't know where that came from, perhaps it's something to do with some python config on your system elsewhere which became relevant when you ran setup.py, but I don't know much about this python build process either. It might not be pydns that caused the issue though, but some other unconfigured or poorly configured python related package.
Title: Re: pydns deleted /usr/bin/
Post by: phoenix_king_rus on 28 March 2025, 14:49:19
You meant /usr/local not /usr/lib I guess?  ;D
Yup, mistyped
Title: Re: pydns deleted /usr/bin/
Post by: chase on 28 March 2025, 21:37:44
Quote
Also, never install custom programs to /usr, only to /usr/lib. Do not mixed managed files with unmanaged ones.
You meant /usr/local not /usr/lib I guess?  ;D

I git cloned the source for pydns you used, and the phrase "bin" doesn't appear anywhere in there when I searched it, and from a quick look at some of the build files I couldn't see anything obvious which would delete /usr/bin.  So I don't know where that came from, perhaps it's something to do with some python config on your system elsewhere which became relevant when you ran setup.py, but I don't know much about this python build process either. It might not be pydns that caused the issue though, but some other unconfigured or poorly configured python related package.

i didnt have any specific python config, but, maybe you right. i think im gonna test this pydns on fresh artix install on VM, so i let you know little later
Title: Re: pydns deleted /usr/bin/
Post by: chase on 28 March 2025, 21:44:58
That's what package managers exist for: they workaround shit like this, put files into temporary archives and then make it possible to install it (usually) without problems. So yes, you should either use pacman-based solution (AUR included) or pip.
Also, never install custom programs to /usr, only to /usr/lib. Do not mixed managed files with unmanaged ones.
thats sounds right, thanks for advice
but, as i know, you cant use pip now, cause except of this python-xyz where xyz name of library
and python-pydns or something like that wasnt in repos

but its on aur, so yeah, i should use aur, thats for sure
Title: Re: pydns deleted /usr/bin/
Post by: chase on 30 March 2025, 22:33:30
hello again, i installed pydns on artix vm and...pydns deleted /usr/bin/ again...
i can upload a video later

p.s its clean, fresh install with openrc
Title: Re: pydns deleted /usr/bin/
Post by: gripped on 30 March 2025, 23:05:18
Is this the exact command you used again
Code: [Select]
sudo python setup.py install
?
Edit: And are you using the Arch package  python-cx-freeze 7.3.0.pre-1 ? Or cx-freeze from elsewhere ?