ad-oliviero / uwufetch

A meme system info tool for Linux, based on nyan/uwu trend on r/linuxmasterrace.
GNU General Public License v3.0
731 stars 47 forks source link

[BUG] Installing uwufetch on FreeBSD breaks system package manager #252

Open illegalcoding opened 4 months ago

illegalcoding commented 4 months ago

Describe the bug If you build and install uwufetch on FreeBSD, it overwrites the system libfetch (which is for a program called fetch, it's used for grabbing files over HTTP and FTP) with uwufetch's libfetch. This breaks the system package manager (pkg) and fetch.

To Reproduce Make and make install uwufetch on FreeBSD

Expected behavior For the system package manager to not break, and uwufetch to install stuff in /usr/local.

Desktop (please complete the following information): OS: FreeBSD Version: 14.0-RELEASE-p5

Additional context I compared the strings on the broken system libfetch with the one uwufetch built and they matched, so I'm pretty sure it's what's happening. I also ran it through ghidra and it has functions like get_ram, get_sys, get_model and such.

Are you already working on this bug? No

illegalcoding commented 4 months ago

It also seems to break freebsd-update too.

illegalcoding commented 4 months ago

I'd suggest changing the Makefile to install binaries in /usr/local/bin, libraries in /usr/local/lib, and config files to /usr/local/etc. All the /usr versions of these directories are for the base system, and not third party applications.

ad-oliviero commented 4 months ago

it overwrites the system libfetch (which is for a program called fetch, it's used for grabbing files over HTTP and FTP) with uwufetch's libfetch. This breaks the system package manager (pkg) and fetch.

Well, fuck (I'm sorry if I broke your system)

I compared the strings on the broken system libfetch with the one uwufetch built and they matched, so I'm pretty sure it's what's happening. I also ran it through ghidra and it has functions like get_ram, get_sys, get_model and such.

Yes, that's for sure what's happening

I'd suggest changing the Makefile to install binaries in /usr/local/bin, libraries in /usr/local/lib, and config files to /usr/local/etc. All the /usr versions of these directories are for the base system, and not third party applications.

Sounds like a good solution, I will implement it as soon as I can, and it will be available in the next release (or in the developer branch). Do you recommend using this directories for other systems too? Is there something like a standard for installing non-system libraries?

Also, sorry for my late response, I'm preparing a couple exams

illegalcoding commented 4 months ago

(I'm sorry if I broke your system)

It's all good, I managed to recover it without needing to reinstall. Plus it was kinda fun to diagnose what the issue was.

Is there something like a standard for installing non-system libraries?

Usually third party applications install stuff in the /usr/local prefix, I'd suggest reading the hier(7) manpage for the platforms you support building on.

evelinwillow commented 4 months ago

the most wholesome bug report ever filed on github

ad-oliviero commented 4 months ago

It's all good, I managed to recover it without needing to reinstall. Plus it was kinda fun to diagnose what the issue was.

I'm glad to know

Usually third party applications install stuff in the /usr/local prefix, I'd suggest reading the hier(7) manpage for the platforms you support building on.

That's exactly what I was hoping for, I'll look into it

illegalcoding commented 4 months ago

Just discovered another file that got replaced, /usr/include/fetch.h got replaced by UwUFetch's own fetch.h too. Are there any other files uwufetch installs in /usr? I don't really want to run make uninstall cause it might just delete system files.

ad-oliviero commented 4 months ago

Are there any other files uwufetch installs in /usr?

Yes: