Porter's advice needed - strange distfile problem with otherwise finished port reddit / freebsd ---------------------------------------------------------------------- kraileth · 2020-10-10 10:20 Hi all, I've created a port for `castor`, a GTK+-based graphical browser for plain-text internet protocols (Gemini, Gopher and Finger currently supported) that's written in Rust. The port allows me to create a working package including things like a pkg-message. `Portlint` is happy and so is the `stage-qa` target. The problem is... well, to build the package, I have to cheat. After `make extract`, I need to manually untar the distfile into the work directory of the port. Why? I have no clue unfortunately... When I started the port, I defined `MASTER_SITES` and while the fact that the distfile is on [sr.ht](https://sr.ht) meant a bit of trouble first, I found some examples in the ports tree how others got distfiles from there. Doing `make makesum` worked fine, the distfile was fetched, checksummed and the distinfo file created. **And here's the strange thing**: After I defined `CARGO_CRATES`, too, for whatever reason the original distfile is *discarded* when running `make makesum`! Comment out all the crates and it will work again... I've uploaded the port on GH [here](https://github.com/kraileth/castor-port). Any advice on what to do or suggestions on what might be going on there would be most welcome! ---------------------------------------------------------------------- antiduh · 2020-10-10 15:01 I'm a little out of my element here, but this may be a bug or otherwise unhandled case in the ports system. As a workaround, why not concat the two versions of the distinfo file that get generated? ---------------------------------------------------------------------- kraileth · 2020-10-10 16:08 Thanks for your suggestion! Tried to "fake" distinfo by doing that. However the distfile would still not be extracted. I'm waiting a couple of days if anybody here has any explanation of what's wrong with my port. Hopefully I haven't hit a problem with the ports infrastructure... ---------------------------------------------------------------------- kevans91 · 2020-10-10 16:38 This seems to be what you want: diff --git a/Makefile b/Makefile index e575778..6b2b165 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,7 @@ PORTNAME= castor DISTVERSION= 0.8.16 CATEGORIES= www MASTER_SITES= https://git.sr.ht/~julienxx/${PORTNAME}/archive/${ DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/ +DISTFILES= ${DISTNAME}${EXTRACT_SUFX} MAINTAINER= kraileth@elderlinux.org COMMENT= GTK+based browser for plain-text protocols like Gemini and Gopher As far as I can tell, USES= cargo is processed too early so the default DISTFILES doesn't get populated, so you have to do something like the above to make sure your primary distfile is accounted for. portlint isn't too fond of it, but I can't see a way around it. ---------------------------------------------------------------------- kraileth · 2020-10-10 17:00 So this is what is going on here... Thanks for the explanation and the solution to the problem! I'm going to do a little final polishing and will then hand in the port via Bugzilla as described in the Porter's handbook. Maybe I can even contribute a couple of other ports, too. ---------------------------------------------------------------------- kevans91 · 2020-10-10 17:08 Sure thing; feel free to CC me on this one once you've created the bug, ["kevans@FreeBSD.org](mailto:"kevans@FreeBSD.org)" -- I can't promise any timelines of course, but I could pick it up in my free time. ---------------------------------------------------------------------- kraileth · 2020-10-11 09:12 Done. Oh, and no worries about any timely action - I'm not in a hurry with this and in fact very happy that you offered help. My first two attempts to contribute to ports some years ago were ultimately met with silence until *overcome by events*. So I went on to do porting work outside of the FPC, but I'm still interested in FreeBSD's ports, too. ---------------------------------------------------------------------- nahnah2017 · 2020-10-11 14:01 Of all the places you can and should ask this question, you came to reddit?!! ---------------------------------------------------------------------- kevans91 · 2020-10-11 14:19 I'm sorry to hear that you've had a really suboptimal experience, but I'm glad that this hasn't stopped you from trying again. :-) The reality here is really unfortunate and a lot of times you end up having to fire a broadcast to -ports@ or hopping onto IRC. Some of the friction here is improving; for instance, swills has setup this really cool automated builder that will look at ports PRs and build attached patches, noting in the PR whether the build succeeds/fails. He's also gone on to make it publish the resulting packages to ipfs, even, so one can install the packages this system is building and give it a whirl. Hopefully tooling improvements (along with other general project changes in the pipeline to facilitate some tooling changes, e.g. switching to git) will help with alleviating the problem as we can lower the barriers a little bit more and generally improve the process. ---------------------------------------------------------------------- kraileth · 2020-10-11 15:54 To be completely honest: I don't know if that one experience would have sufficed to make me abandon FreeBSD if I had encountered it at an exceptionally bad time (e.g. when just getting started with it). Chances are that it might have, but fortunately when it happened I was already using FreeBSD on all of my machines, both server and desktop and was enjoying it too much to be scared away so easily. Also - especially thanks to BSDnow! - I had the feeling that the FreeBSD community is *really* interested in making things easier and more appealing to newcomers. So problems are there to overcome and not to give up on first sight, right? I went with likely "contributing more" if the project made the transition to git in the Community Survey. FreeBSD chose to modernize and here I am, giving a small contribution another try. ---------------------------------------------------------------------- kraileth · 2020-10-11 16:06 Looks like I did indeed. And to answer the implicit question "why?!!": I made three attempts at getting into porting IIRC. First time I posted a patch to the mailing list. I'll admit openly that I'm not fond of those. The other two attempts were via the bug tracker as suggested in the Porter's Handbook. My proposed new port rotted in there for about a year then it was closed as "overcome by events". Both the other ports that I wanted to get involved with (one that I wanted to improve and one that was broken and I wanted to help fix) were eventually deleted and are no longer available in ports. Now judging from the less than ideal outcome so far you decide if it makes some sense to try something wildly different. And no, the irony of asking for help on Reddit regarding the port of a browser for people who consider the Web to be too bloated in many regards, does not escape me at all. I deliberately chose this channel because I had good experiences with it so far. And showing some activity on a platform where newcomers and longtime project members alike come to seemed not *that* ridiculous. And guess what? It even seems to have worked out! ---------------------------------------------------------------------- nahnah2017 · 2020-10-12 10:34 >It even seems to have worked out! Well, no it didn't. The advice you got here is the same. Use the proper channels and sometimes you have to be aggressive if you get no response quick enough. Sometimes FreeBSD devs do come here. Always FreeBSD devs are in the proper channels. ---------------------------------------------------------------------- kraileth · 2020-10-14 15:09 Well, looks like we have a different perception of that topic. I'd say that my question was answered here and that I have a solution so that I can build my port without any manual trickery now. So in my opinion it worked out pretty well. If the port will get committed - we'll see. Also it has been discussed quite a few times within the project (e.g. on the FreeBSD Office hours) that it could be one sensible move to "go where potential newcomers are". I was curious if I could get an answer about such a question on Reddit - and I did. Otherwise I would have eventually written to ports@. ---------------------------------------------------------------------- nahnah2017 · 2020-10-14 17:06 Again, you went backwards. You went to the worst place to ask this question and avoided the best. But I don't want to go on belaboring the point.