Created attachment 253950 [details] [NEW PORT] www/snip patch This port is a fork of www/Stikked (which hasn't been updated in 5 years) which has many updates to work with PHP 8.x along with additional features. Poudriere build log can be found at: https://pkg.purplehat.org/data/fbsd_14-1_x64-HEAD/2024-10-01_22h38m47s/logs/snip-1.0.0.log I'm not sure if www/Stikked should be removed/replaced by this or not. However, www/Stikked does not work with PHP 8.x, and multiple pull requests to the project to fix many issues have been ignored/dormant for nearly one year. Please let me know if there is anything else I can provide. Thank you!
Created attachment 253986 [details] Updated new port patch After speaking with the developer, they fixed some minor issues upstream and provided an update. So, this new patch includes those changes.
Could you please open a bug against stickked indicating that it doesn't work? This would make it easy for me to deprecate and remove the port.
Hi, Robert. It looks like the www/Stikked removal request went into place (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=281858). Thank you! Is there something wrong with this new port request? Something I need to update to make it acceptable? I'm unsure why this hasn't been approved. Perhaps it needs additional verification (which is fine, but is there something or someone specific I should bring this attention to?) Thanks again!
(In reply to ek from comment #3) I'm sorry for how long this one has been open with no response. I think this is just the case of nobody having looked into it. I don't know PHP and thus do not process PHP-based ports. Perhaps try posting on ports@freebsd.org and request someone to review your port.
Also not referring to the actual release tag
(In reply to Daniel Engberg from comment #5) Can you help me understand what you mean by this? Is there a version mismatch somewhere or should I be adding/changing something in the port to refer to something in particular, maybe? I'd like to get this sorted out before I ask ports@ to take a look.
... wait a second. You're talking about the release tag on GH that differs, I believe. It looks like the project maintainer made some changes but didn't bump the version of "Latest." I'll check it out and update the port to reflect the correct commit. If the project owner continues to do this, could cause problems. I'll ask them if there's any possibility they can bump the version when they make changes.
Created attachment 257511 [details] Updated www/snip patch Updated for upstream commit changes (version stays the same.)
Created attachment 257522 [details] www/snip.patch I edited git commit message. I used port tools (portclippy,portfmt,portlint) to improve the port. I made use of OPT_USE instead of ${PORT_OPTIONS}. I changed portname to match github project name. I'll also attach the diff so you can better see what I changed. I tested it in poudriere 14.2-R amd64 and testport is fine, didn't test if it works fine, though.
Created attachment 257523 [details] All diffs, changes made from me.
(In reply to Yusuf Yaman from comment #9) This all looks great to me and thank you for the help! I tested the build in both Poudriere and manual. Both work. I also verified the software works as expected. Approved.
(In reply to ek from comment #11) Nice, you are welcome. Thanks.
Here's a quick question - Since the project name (and therefore the port name) is now in all capital letters, should the www/snip directory be named the same way and changed to www/SNIP for consistency? I don't see very many ports with capital letters, so I'm not sure if this would be correct or not. But, I can certainly change that before this gets committed if that would be prudent.
(In reply to ek from comment #13) > should the www/snip directory be named the same way and changed to www/SNIP for consistency? In my opinion, it should stay lowercase but that's just my opinion, I don't know how it should be. > I don't see very many ports with capital letters, so I'm not sure if this would be correct or not. I don't generally encounter with all-uppercase portnames either. > But, I can certainly change that before this gets committed if that would be prudent. Of course, it can be changed but the reason why i made it all uppercase is that: Robert Clausecker was suggested me to change my port's PORTNAME to match with GH PROJECT name but it was not all uppercase, it was camelcase, so from all lowercase to camelcase: tuba --> Tuba.
(In reply to Yusuf Yaman from comment #14) That's all very good info. Thanks again! I don't see a tuba/Tuba port anywhere in the ports tree (yet) but did you rename the port directory to "Tuba" as well or did you leave it as "tuba" and that was fine?
(In reply to ek from comment #15) That's all very good info. Thanks again! I don't see a tuba/Tuba port anywhere in the ports tree (yet) but did you rename the port directory to "Tuba" as well or did you leave it as "tuba" and that was fine? You're welcome! > I don't see a tuba/Tuba port anywhere in the ports tree (yet) It is not yet committed to the Ports tree because it depends on a PR which should be resolved to commit Tuba. Tuba requires a newer version of gtksourceview5 and the version in Ports is lower than what Tuba requires. Here it is: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=284793 > did you rename the port directory to "Tuba" as well or did you leave it as "tuba" and that was fine? I didn't rename the directory name so I guess that this is fine.
(In reply to Yusuf Yaman from comment #16) Again, great info and thank you very much!
directory name and PORTNAME don't have to match. It's okay to have one lower case and the other case, see e.g. emulators/tic-80.
(In reply to Robert Clausecker from comment #18) Perfect. Thanks, fuz!
Hrm. Still nothing on this commit. Not sure what else I can do to get this pushed? I've been testing it for many months and everything seems fine. What am I missing?
(In reply to ek from comment #20) Maybe try sending committer request to ports mailing list.
(In reply to Yusuf Yaman from comment #21) I actually did this about 5 weeks ago. Still no traction. I guess I could do it again, but I don't want it to be cumbersome to the list.
I'm sorry for the slow processing. I'll try to get this taken care of with my next batch.
1.1.0 is out, since upstream is using tags you couldn't use GH_TAGNAME https://github.com/MercanoGlobal/SNIP/releases/tag/v1.1.0 https://docs.freebsd.org/en/books/porters-handbook/book/#makefile-master_sites-github See example 14 and/or 16
(In reply to Robert Clausecker from comment #23) Perfect. Thank you! No rush. Just wanted to make sure it wasn't completely forgotten. :)
(In reply to Daniel Engberg from comment #24) Fixed (I believe?) Update for non-tagging and pulling versions. Also, updated to the v1.1.0 that is now available. Attaching patch to replace older "new port" patches. Thanks!
Created attachment 259756 [details] v1.1.0 version patch Updated to latest v1.1.0 version.
Created attachment 259757 [details] NEW v1.1.0 patch Dang it! That was the wrong patch that included old stuff no longer needed. *THIS* is the correct patch. Sorry about that!
(In reply to Daniel Engberg from comment #24) Could you take this one? I am inexperienced with PHP and would rather not add new PHP ports.
ek: Do you need this port in the way you submitted? Or you just need the port? 3:)
(In reply to Muhammad Moinur Rahman from comment #30) Hi, Muhammad. I'm not sure I follow. I suppose I just want to use the port? Is there something wrong with the way the port is submitted? I can make any changes that are required.
(In reply to ek from comment #31) 1. DISTVERSION is wrong you have to use DISTVERSIONPREFIX 2. Check the ports with portclippy/portfmt/portlint -abct 3. You don't need those OPTIONS DESC they are defined by default 4. Use OPTIONSNG instead of the conditionals 5. Use dynamic plist rather than static large pkg-plist. Check one of those tex or gitlab ports.
Created attachment 260005 [details] NEW SNIP v1.1.0 patch (In reply to Muhammad Moinur Rahman from comment #32) Hello, Mahhamad. Thanks for the info. Please find new patch attached. 1. DISTVERSIONPREFIX added 2. Port checked with portclippy/portfmt/portlint -abct (no errors) 3. OPTIONS DESC removed (where they could be) 4. OPTIONSNG used instead of the conditionals 5. Dynamic PLIST used instead of static Please let me know if there's anything else that needs to be done.
It looks lot better now but there are couple of fundamental issues: 1. It should be s/OPTIONS_MULTI/OPTIONS_SINGLE/g. You cannot run one single database based PHP app with multiple database backend. So you will eventually use one of mysql/pgsql/sqlite. Not two or three of them. 2. Although at first it looks like that USE_PHP=pgsql implies installation of postgresql client by USES=pgsql and USE_PHP=sqlite implies USES=sqlite they should be mentioned with individual USES. Something like PGSQL_USES=pgsql and SQLITE_USES=sqlite. You do not need this for mysqli as that is a native driver itself and does not need a mysql client. The reason behind this is in future if you need to control or limit the versions of pgsql/sqlite as per the upstream of this software.
Created attachment 260023 [details] new-new-new patch for SNIP-v1.1.0 (In reply to Muhammad Moinur Rahman from comment #34) This makes sense. I've uploaded a new patch to include these changes. If there's anything else, I'm happy to address it. Thanks again, Moin!
Comment on attachment 257522 [details] www/snip.patch Updated patch with newer version.
Comment on attachment 257523 [details] All diffs, changes made from me. There is an updated patch with newer version.
Looks good to me. But for me this week is `src` week. So unless someone is faster than me I will commit in the coming weekend. Just for future references: 1. The patch is not committer's friendly. Check the git primer on howto use the hooks to prepare the commit messages. https://docs.freebsd.org/en/articles/committers-guide/#git-mini-daily-use For this specific case the commit log should be something like: ``` www/SNIP: New port <BLANKLINE> <COPY OF THE pkg-descr FILE> <BLANKLINE> WWW: <WWW from Makefile> <BLANKLINE> PR: 281810 ``` 2. When adding a new port the port has to be added to the <CATEGORY>/Makefile that is for this case `www/Makefile`. And that should also be part of the patch.
Created attachment 260025 [details] new-new-new-new patch for SNIP-v1.1.0 (In reply to Muhammad Moinur Rahman from comment #38) More excellent info! I was simply following the https://docs.freebsd.org/en/books/porters-handbook/quick-porting/#porting-submitting page in the handbook that doesn't mention this. Noted for future reference and thank you. I've uploaded another new patch to (hopefully?) take care of this. Thanks again to everyone for all the help and knowledge!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4d3c08abcb261f096f728e89b287fc955f1894bb commit 4d3c08abcb261f096f728e89b287fc955f1894bb Author: Janky Jay, III <ek@purplehat.org> AuthorDate: 2025-04-30 16:14:12 +0000 Commit: Muhammad Moinur Rahman <bofh@FreeBSD.org> CommitDate: 2025-05-04 18:44:36 +0000 www/SNIP: New port SNIP is a powerful Open-Source PHP Pastebin, with the aim of keeping a simple and easy to use user interface. SNIP allows you to easily share code and files with anyone you wish. Based on the original Stikked with lots of bug fixes and improvements. Prerequisites: * A web server: Apache, LiteSpeed, Nginx, Lighttpd, Cherokee. * A database: MySQL / MariaDB, Postgres. OR a writable folder for SQLite. * PHP version 7.0 or newer is required. * PHP-GD for the creation of QR-codes. Here are some features: * Syntax highlighting including live highlighting with CodeMirror * Paste replies * Diff view between the original paste and the reply * An API * Trending pastes * Encrypted pastes * Burn on reading * File upload and preview * Anti-Spam features * Multilanguage support * SNIP client with support for client side encryption/decryption: gostikkit * Another CLI tool requiring only curl program: pbin WWW: https://github.com/MercanoGlobal/SNIP PR: 281810 www/Makefile | 1 + www/SNIP/Makefile (new) | 59 +++++++++++++++++++++++++++++++++++++ www/SNIP/distinfo (new) | 3 ++ www/SNIP/files/pkg-message.in (new) | 20 +++++++++++++ www/SNIP/pkg-descr (new) | 24 +++++++++++++++ 5 files changed, 107 insertions(+)