Created attachment 251708 [details] git patch of changes I was trying out newsboat and saw that the version in ports is a couple of releases behind. So I updated my ports tree with the attached patch. That version compiles, installs, and runs properly on my machine. Let me know if any changes to the patch are needed. Happy to adjust it.
quick note that I realized one of the tests is failing when I run `make test`: ``` ---- t_configpaths_create_dirs_returns_false_if_dotdir_doeesnt_exist_and_couldnt_be_created stdout ---- thread 't_configpaths_create_dirs_returns_false_if_dotdir_doeesnt_exist_and_couldnt_be_created' panicked at rust/libnewsboat/tests/configpaths_helpers/mod.rs:215:5: assertion failed: !paths.create_dirs() stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: core::panicking::panic 3: core::ops::function::FnOnce::call_once note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. failures: t_configpaths_create_dirs_returns_false_if_dotdir_doeesnt_exist_and_couldnt_be_created test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s ``` However this seems to also fail on the existing 2.33 version of the port for me. If I find some time I'll see if I can fix it and provide a patch for that as well if this isn't just me.
The binary does coredump on 14.1 which seems unrelated to this patch (same happens on port version 2.33) and might also be related to the test failures. There is an issue at https://github.com/newsboat/newsboat/issues/2783 where this is reported to the project.
Thanks for your work! Could you please make some cosmetic changes? See "portfmt -D Makefile" and "portclippy Makefile" (parts of ports-mgmt/portfmt).
About test: you can set TESTING_UNSAFE (https://cgit.freebsd.org/ports/tree/Mk/Features/testing.mk#n7 and an example here: https://cgit.freebsd.org/ports/tree/audio/lilv/Makefile#n27).
oh cool, I didn't know about those tools. I'll make the adjustments. Is there a preference for whether to delete and re-upload the patch or keep all versions of patches around on this bug for reference/history? Either is fine with me of course
(In reply to Daniel Schauenberg from comment #5) If you upload a new (complete) patch you can obsolote patch.
(In reply to Zsolt Udvari from comment #6) "you can obsolote _old_ patch"
Created attachment 251818 [details] git patch of changes with portfmt/portclippy applied and TESTING_UNSAFE added this is the updated patch with portfmt/portclippy ran over the Makefile. portclippy didn't understand the TESTING_UNSAFE= addition so I just put it where I thought it might make sense
(In reply to Daniel Schauenberg from comment #8) There are orphaned and missing files.
(In reply to Zsolt Udvari from comment #9) What does that mean? Where are they missing? Is there a command I can run to check? The files I changed in the patch are all changes that git showed. My tree was otherwise clean (aside from all the build output in `./work`). I can take another look to see if I missed anything. But the port built and installed even after `make clean` for me so I assumed I had included everything.
(In reply to Daniel Schauenberg from comment #10) Sorry, I wasn't clean. When test the port at the install stage there are orphaned files and missing files: ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/colorschemes Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/filters Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/fltr-substack Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/getpocket.com Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/image-pager Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/image-preview Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/linkding Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/miniflux Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/wallabag ===> Checking for items in pkg-plist which are not in STAGEDIR Error: Missing: %%DOCSDIR%%/contrib/README.md Error: Missing: %%DOCSDIR%%/contrib/bookmark-buku.sh Error: Missing: %%DOCSDIR%%/contrib/bookmark-evernote.sh Error: Missing: %%DOCSDIR%%/contrib/bookmark-pinboard.sh Error: Missing: %%DOCSDIR%%/contrib/colorschemes/commander Error: Missing: %%DOCSDIR%%/contrib/colorschemes/cyanism Error: Missing: %%DOCSDIR%%/contrib/colorschemes/greenscreen ... In this case you can't build the port. Check https://docs.freebsd.org/en/books/porters-handbook/book/#porting-testing The most popular tool is poudriere (https://docs.freebsd.org/en/books/porters-handbook/book/#testing-poudriere).
(In reply to Zsolt Udvari from comment #11) oh interesting. I didn't see that when I built and installed the port. I'll take a look and update the patch to fix the missing/orphaned files problems.
Created attachment 251869 [details] git patch for 2.36 update
I found another file that needed the shebang fix when running `make stage-qa` and applied another change from portclippy for the Makefile. All of these changes are in the most recent patch file (old ones are marked obsolete). I haven't been able to reproduce the orphaned/missing files problems on my 14.1 machine. The install task runs clean for me there: ``` # make install ===> Installing for newsboat-2.36 ===> Checking if newsboat is already installed ===> Registering installation for newsboat-2.36 Installing newsboat-2.36... ==> Running trigger: gtk-update-icon-cache.ucl Generating GTK icon cache for /usr/local/share/icons/hicolor ===> SECURITY REPORT: This port has installed the following files which may act as network servers and may therefore pose a remote security risk to the system. /usr/local/bin/podboat /usr/local/bin/newsboat If there are vulnerabilities in these programs there may be a security risk to the system. FreeBSD makes no guarantee about the security of ports included in the Ports Collection. Please type 'make deinstall' to deinstall the port if this is a concern. For more information, and contact details about the security status of this software, see the following webpage: https://newsboat.org/ ``` I haven't gotten around to testing with poudriere yet. This is still all in my regular ports checkout. I'll see if I can make time for poudriere testing but any pointers as to what I'm doing wrong to not see those orphan/missing errors are highly appreciated. I ran through the make steps in https://docs.freebsd.org/en/books/porters-handbook/book/#porting-testing and they ran fine for me.
(In reply to Daniel Schauenberg from comment #14) The 'make package' fails: root@14-default:/usr/ports/www/newsboat # make package ===> Building packages for newsboat-2.36 ===> Building newsboat-2.36 pkg-static: Unable to access file /wrkdirs/usr/ports/www/newsboat/work/stage/usr/local/share/doc/newsboat/contrib/README.md:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/www/newsboat/work/stage/usr/local/share/doc/newsboat/contrib/bookmark-buku.sh:No such file or directory pkg-static: Unable to access file /wrkdirs/usr/ports/www/newsboat/work/stage/usr/local/share/doc/newsboat/contrib/bookmark-evernote.sh:No such file or directory ... They are same as poudriere's missing files.
(In reply to Zsolt Udvari from comment #15) hmm ok that's interesting because that step works for me: ``` root@wasp:/usr/ports/www/newsboat # make package ===> Building packages for newsboat-2.36 ===> Building newsboat-2.36 root@wasp:/usr/ports/www/newsboat # ``` I'll see that I get poudriere builds running on my machine to try and reproduce the problem there and will update the patch then.
(In reply to Daniel Schauenberg from comment #16) Did you it on a clean machine/jail? Try clean (remove) the workdir and run "make package" again.
Created attachment 251914 [details] git patch for 2.36 update added pkg-plist changes to make build pass in poudriere
(In reply to Zsolt Udvari from comment #17) I was at least running `make clean` before the builds. But that didn't seem to be enough. It took me a while to get the poudriere builds running, mostly because building rust kept failing on my 16G RAM machine :D. I installed it on a beefier machine I had and let it run there overnight and I was able to reproduce the orphaned file error. The newest patch now runs clean for me in a poudriere 14R1 jail.
(In reply to Daniel Schauenberg from comment #19) "building rust kept failing on my 16G RAM machine :D" I'm using a VPS with 10G RAM and builds fine (only the disk space wasn't enough :) ). I'll check your patch.
(In reply to Zsolt Udvari from comment #20) ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/colorschemes Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/filters Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/fltr-substack Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/getpocket.com Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/image-pager Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/image-preview Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/linkding Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/miniflux Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/wallabag ===> Checking for items in pkg-plist which are not in STAGEDIR Error: Missing: %%DOCSDIR%%/contrib/README.md Error: Missing: %%DOCSDIR%%/contrib/bookmark-buku.sh Error: Missing: %%DOCSDIR%%/contrib/bookmark-evernote.sh Error: Missing: %%DOCSDIR%%/contrib/bookmark-pinboard.sh Error: Missing: %%DOCSDIR%%/contrib/colorschemes/commander Error: Missing: %%DOCSDIR%%/contrib/colorschemes/cyanism Error: Missing: %%DOCSDIR%%/contrib/colorschemes/greenscreen Error: Missing: %%DOCSDIR%%/contrib/colorschemes/gruvbox Error: Missing: %%DOCSDIR%%/contrib/colorschemes/inkpot Error: Missing: %%DOCSDIR%%/contrib/colorschemes/kinda-maia Error: Missing: %%DOCSDIR%%/contrib/colorschemes/light Error: Missing: %%DOCSDIR%%/contrib/colorschemes/nord Error: Missing: %%DOCSDIR%%/contrib/colorschemes/plain Error: Missing: %%DOCSDIR%%/contrib/colorschemes/psychedelic Error: Missing: %%DOCSDIR%%/contrib/colorschemes/schleichfahrt Error: Missing: %%DOCSDIR%%/contrib/colorschemes/simple Error: Missing: %%DOCSDIR%%/contrib/colorschemes/solarized-dark Error: Missing: %%DOCSDIR%%/contrib/colorschemes/solarized-light Error: Missing: %%DOCSDIR%%/contrib/colorschemes/universal-color Error: Missing: %%DOCSDIR%%/contrib/exportOPMLWithTags.py Error: Missing: %%DOCSDIR%%/contrib/feedgrabber.rb Error: Missing: %%DOCSDIR%%/contrib/filters/twtxt2rss.php Error: Missing: %%DOCSDIR%%/contrib/fltr-substack/README.md Error: Missing: %%DOCSDIR%%/contrib/fltr-substack/fltr-substack.sh Error: Missing: %%DOCSDIR%%/contrib/fltr-substack/make-fltr-substack.sh Error: Missing: %%DOCSDIR%%/contrib/getpocket.com/after_authentication.md Error: Missing: %%DOCSDIR%%/contrib/getpocket.com/create-pocket-user-token.sh Error: Missing: %%DOCSDIR%%/contrib/getpocket.com/readme.md Error: Missing: %%DOCSDIR%%/contrib/getpocket.com/send-to-pocket.sh Error: Missing: %%DOCSDIR%%/contrib/heise.rb Error: Missing: %%DOCSDIR%%/contrib/image-pager/README.md Error: Missing: %%DOCSDIR%%/contrib/image-pager/bootstrap_image_pager.sh Error: Missing: %%DOCSDIR%%/contrib/image-pager/imagePager.scala Error: Missing: %%DOCSDIR%%/contrib/image-preview/README.org Error: Missing: %%DOCSDIR%%/contrib/image-preview/nbparser Error: Missing: %%DOCSDIR%%/contrib/image-preview/nbrun Error: Missing: %%DOCSDIR%%/contrib/image-preview/vifmimg Error: Missing: %%DOCSDIR%%/contrib/kitty-img-pager.sh Error: Missing: %%DOCSDIR%%/contrib/linkding/README.md Error: Missing: %%DOCSDIR%%/contrib/linkding/linkding.rb Error: Missing: %%DOCSDIR%%/contrib/miniflux/docker-compose.yml Error: Missing: %%DOCSDIR%%/contrib/move_url.py Error: Missing: %%DOCSDIR%%/contrib/newsboat_reorganize.py Error: Missing: %%DOCSDIR%%/contrib/pinboard.pl Error: Missing: %%DOCSDIR%%/contrib/slashdot-replace-newlines.xslt Error: Missing: %%DOCSDIR%%/contrib/slashdot.rb Error: Missing: %%DOCSDIR%%/contrib/urls-maintenance.sh Error: Missing: %%DOCSDIR%%/contrib/wallabag/README.md Error: Missing: %%DOCSDIR%%/contrib/wallabag/wallabag.rb
(In reply to Zsolt Udvari from comment #21) hmm is this the output from just `poudriere testport` or something else? When I run this it tells me everything is packaged fine: ``` # poudriere testport -j 14R1_amd64 -p development www/newsboat <-- snip --> ====> Compressing man pages (compress-man) =========================================================================== ====> Running Q/A tests (stage-qa) ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for items in pkg-plist which are not in STAGEDIR ===> No pkg-plist issues found (check-plist) =>> Checking for staging violations... done =======================<phase: package >============================ ===== env: DEVELOPER_MODE=yes PACKAGES=/tmp/pkgs PKGREPOSITORY=/tmp/pkgs PKGLATESTREPOSITORY=/tmp/pkgs/Latest 'PKG_NOTES=build_timestamp ports_top_git_hash ports_top_checkout_unclean port_git_hash port_checkout_unclean built_by' 'PKG_NOTE_build_timestamp=2024-07-13T07:59:28+0000' 'PKG_NOTE_ports_top_git_hash=221d564e87d1' 'PKG_NOTE_ports_top_checkout_unclean=yes' 'PKG_NOTE_port_git_hash=21476ca8a9b5' 'PKG_NOTE_port_checkout_unclean=yes' 'PKG_NOTE_built_by=poudriere-git-3.4.1_1' STRICT_DEPENDS=yes USER=nobody UID=65534 GID=65534 ===> Building packages for newsboat-2.36 ===> Building newsboat-2.36 ```
(In reply to Daniel Schauenberg from comment #22) I don't understand. Could you please attach your pkg-plist?
Created attachment 252078 [details] pkg-plist file from the patched version this is the `pkg-plist` file from my checkout with all the patch changes
(In reply to Zsolt Udvari from comment #23) I added the `pkg-plist` file as an attachment. I also pushed my changes to https://github.com/mrtazz/freebsd-ports/tree/www/newsboat-2.36/www/newsboat in case it helps to see the full set of files.
Could you please "git status" on your ports tree?
(In reply to Zsolt Udvari from comment #26) It's clean except for the patch I generated for attaching here: ``` % git status On branch www/newsboat-2.36 Your branch is up to date with 'mrtazz/www/newsboat-2.36'. Untracked files: (use "git add <file>..." to include in what will be committed) 0001-update-www-newsboat-to-2.36.patch nothing added to commit but untracked files present (use "git add" to track) ``` Does it still not build for you even with the full `pkg-plist` file? That ports tree was created by checking out the regular tree and manually applying the patch. So I don't know how any additional files could've ended up there. But I'll do a full new clean build to see if I missed anything.
(In reply to Daniel Schauenberg from comment #27) "Does it still not build for you even with the full `pkg-plist` file?" The pkg-plist file is same after the patch (as expected). I wrote to the port committers list about this bug. Could you please share poudriere's logfile?
Could you please your ports tree? Is it updated? In other PR has similar problem (my and his result differ) and the reporter realised that his port tree is outdated.
Sorry, I can build it but ports-committers mailing list can somebody. I think it's my error but I don't know what type. Delete created packages, delete ports tree and clone again but error again.
(In reply to Zsolt Udvari from comment #21) The duplicated DOCS in Error: Orphaned: %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/colorschemes looks strange. What does make -V DOCSDIR say for the problematic port?
(In reply to Gleb Popov from comment #31) $ make -VDOCSDIR /usr/local/share/doc/newsboat
(In reply to Zsolt Udvari from comment #32) What if you do `make makeplist` after the build in Poudriere fails?
(In reply to Gleb Popov from comment #33) /you/have/to/check/what/makeplist/gives/you bin/newsboat bin/podboat %%PORTDOCS%%%%DOCSDIR%%/CHANGELOG.md %%PORTDOCS%%%%DOCSDIR%%/examples/config %%PORTDOCS%%%%DOCSDIR%%/examples/example-bookmark-plugin.sh %%PORTDOCS%%%%DOCSDIR%%/examples/example-exec-script.py %%PORTDOCS%%%%DOCSDIR%%/faq.html %%PORTDOCS%%%%DOCSDIR%%/newsboat.html share/icons/hicolor/scalable/apps/newsboat.svg share/locale/ca/LC_MESSAGES/newsboat.mo share/locale/de/LC_MESSAGES/newsboat.mo share/locale/es/LC_MESSAGES/newsboat.mo share/locale/fr/LC_MESSAGES/newsboat.mo share/locale/hu/LC_MESSAGES/newsboat.mo share/locale/it/LC_MESSAGES/newsboat.mo share/locale/ja/LC_MESSAGES/newsboat.mo share/locale/nb/LC_MESSAGES/newsboat.mo share/locale/nl/LC_MESSAGES/newsboat.mo share/locale/pl/LC_MESSAGES/newsboat.mo share/locale/pt_BR/LC_MESSAGES/newsboat.mo share/locale/ru/LC_MESSAGES/newsboat.mo share/locale/sk/LC_MESSAGES/newsboat.mo share/locale/sv/LC_MESSAGES/newsboat.mo share/locale/tr/LC_MESSAGES/newsboat.mo share/locale/uk/LC_MESSAGES/newsboat.mo share/locale/zh/LC_MESSAGES/newsboat.mo share/locale/zh_TW/LC_MESSAGES/newsboat.mo share/man/man1/newsboat.1.gz share/man/man1/podboat.1.gz %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/colorschemes %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/filters %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/fltr-substack %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/getpocket.com %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/image-pager %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/image-preview %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/linkding %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/miniflux %%PORTDOCS%%@dir %%DOCSDIR%%/contrib/wallabag
Is %%DOCSDIR%%/contrib/colorschemes an empty dir?
(In reply to Gleb Popov from comment #35) No: # ls /usr/local/share/doc/newsboat/contrib/colorschemes/ commander greenscreen inkpot light plain schleichfahrt solarized-dark universal-color cyanism gruvbox kinda-maia nord psychedelic simple solarized-light They are simple text files.
(In reply to Gleb Popov from comment #35) Sorry, yes, colorschemes directory is empty.
Ok, **maybe** the difference is in OPTIONs of the port that is used to build the documentation? Like, the doc tool builds this stuff for everyone else but does nothing in your case, which is why an empty dir is generated and you later see the discrepancies in the plist.
(In reply to Gleb Popov from comment #38) Yes, it seems you've right. With DOCS=on it fails, with DOCS=off passed. Thanks! Daniel, please test it ("poudriere testport -c -j JAIL www/newsboat", with DOCS=on)!
(In reply to Zsolt Udvari from comment #39) I just updated the portstree again from `main` and ran `git clean` just to be sure (the branch divergence message is just because I rebased the patch commit onto current `main`): ``` # poudriere ports -l PORTSTREE METHOD TIMESTAMP PATH development null 2024-07-06 17:05:04 /devel/ports root@swarm:/devel/ports # pwd /devel/ports root@swarm:/devel/ports # git status you have mail On branch www/newsboat-2.36 Your branch and 'mrtazz/www/newsboat-2.36' have diverged, and have 483 and 1 different commits each, respectively. (use "git pull" if you want to integrate the remote branch with yours) nothing to commit, working tree clean root@swarm:/devel/ports # git clean -fdx ``` But when I rerun the build, it still works for me: ``` # poudriere testport -j 14R1_amd64 -c -p development www/newsboat <-- snip poudriere output --> # grep ' DOCS=' /usr/local/poudriere/data/logs/bulk/14R1_amd64-development/2024-07-22_10h00m17s/logs/newsboat-2.36.log DOCS=on: Build and/or install documentation # grep -A5 ' Running Q/A tests' /usr/local/poudriere/data/logs/bulk/14R1_amd64-development/2024-07-22_10h00m17s/logs/newsboat-2.36.log ====> Running Q/A tests (stage-qa) ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist ===> Checking for items in pkg-plist which are not in STAGEDIR ===> No pkg-plist issues found (check-plist) ``` I'm gonna see if I can make the time to run this on a completely fresh install just to make sure I don't have any lingering changes anywhere, but I honestly don't know how that could be.
The issue here is that the upstream started using find -perm /0111 format which is not supported by our find util. I created a patch for Makefile that fixes it for now. I'll talk to the upstream to see if there's a way to make it also work on FreeBSD so that we don't need to patch in the future. Marko
Created attachment 252496 [details] Patch for the Makefile that fixed find perm issues
(In reply to Marko Turk from comment #41) Great catch! The issue url: https://github.com/newsboat/newsboat/issues/2812
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=96dcab1b8dd3562df9e8f17552bfaa5fd25b7a5e commit 96dcab1b8dd3562df9e8f17552bfaa5fd25b7a5e Author: Daniel Schauenberg <d@unwiredcouch.com> AuthorDate: 2024-08-05 06:31:13 +0000 Commit: Zsolt Udvari <uzsolt@FreeBSD.org> CommitDate: 2024-08-05 06:31:13 +0000 www/newsboat: Update to 2.36 Add patch because of `find'-incompatibility (see https://github.com/newsboat/newsboat/issues/2812). Add TESTING_UNSAFE variable. Changelog: https://github.com/newsboat/newsboat/blob/master/CHANGELOG.md PR: 280005 Approved by: Marko Turk <mt-bugs@markoturk.info> (maintainer) www/newsboat/Makefile | 18 +- www/newsboat/Makefile.crates | 143 ++++++++-------- www/newsboat/distinfo | 292 +++++++++++++++++--------------- www/newsboat/files/patch-Makefile (new) | 13 ++ www/newsboat/pkg-plist | 15 +- 5 files changed, 263 insertions(+), 218 deletions(-)
Committed, thanks all!