pouriyajamshidi / tcping

Ping TCP ports using tcping. Inspired by Linux's ping utility. Written in Go
MIT License
552 stars 58 forks source link

Weirdness in Makefile causes difficulty when packaging for non-Debian distros #242

Open cyqsimon opened 4 days ago

cyqsimon commented 4 days ago

First of all, thanks for the excellent software. In my personal opinion, this is the best implementation of this functionality I've seen so far.

I have packaged this tool on COPR a while back. In the recently released v2.6.0, I saw that Makefile now includes split targets, so I thought it'd be a good idea to use them. In particular, build_linux_static seems like the most useful one for me.

However to my surprise, this target calls make build_debian_package, which uses dpkg-deb. Obviously this is not useful on non-Debian-based distros, and is usually not installed by default (or even available) on them. Fedora and RHEL (which I'm targeting on COPR) are premier examples.

It seems to me that the dependency relation is inverted here: build_linux_static could be useful in lots of circumstances, and there's no reason why it has to build a .deb in the process. Can you please consider reorganising this a bit? Thanks.

pouriyajamshidi commented 4 days ago

Hi @cyqsimon

Thanks for the kind words and the info!

Yea, sounds reasonable. Would you be willing to open a PR for this?

Otherwise, I will get to it some time next week. Life is very busy at the moment.

cyqsimon commented 4 days ago

Would you be willing to open a PR for this?

Yeah will give it a go. I was a bit concerned about breaking existing workflows but on second thought, it's probably not that serious.