Created attachment 225921 [details]
Port in GIT diff format
Please check your patch as it also includes the changes for roxygen2. Also, when creating a new port, you need to also add an entry to <category>/Makefile and include it in the patch.
Also, based on the ports description, I believe the category should be "security", what do you think?
(In reply to Guangyuan Yang from comment #1)
I change the category and make a diff that include security Makefile.
Not sure that it is correct.
I am trying to find some tips in porter manual but I didn't find find this procedure
Created attachment 225945 [details]
Category hook and Port
(In reply to Jean-Paul Beconne from comment #2)
Good point on the documentation - I just briefly checked the porters-handbook and it does not include this step (I will open a PR to add it), but it is an implied first step when creating a new port, alongside "deciding a category" and "making a new folder" which we probably should document better. I usually commit the patch and quickly add the entry one-off, but sometimes I encourage the submitters to do it if they are planning to keep contributing.
As you can check by clicking the "Diff" link to your patch, it still does not includes the security/Makefile change. Some of the git commands may be useful to you:
git add <file> (adding file changes to the staging area)
git diff --staged (generate a diff of the staged changes)
git reset (unstage all changes)
So what I think you missed is to git add all files, and use git diff --staged to generate the patch. (You are also encouraged to use git format-patch, but I don't want to overload you with too much info yet)
Also, as a piece of general advice for this and future ports - please pay extra attention to testing - portlint and make tests with DEVELOPER=yes option is a MUST. What I would recommend is to take some time to set up Poudriere for your future patches before submitting. Reporting QA status along with the patch submissions are strongly encouraged. For example, "this patch passes portlint, and testport passed on 13.0-RELEASE and 12.1-RELEASE".
Other than that, and the extra space after WWW: in pkg-descr, the diff looks good to my eyes. Thanks.
(In reply to Guangyuan Yang from comment #4)
I got my error in git format: I didn't realize that after modifying a file, I need to add the file again.
For testing, I perform the following steps:
I don't know why, portlint is not working properly (always report that the header # $Freebsd$ is missing and found many errors due to this first error)
Created attachment 225949 [details]
Modified diff format and category hook
Now, the file should be correct
(In reply to Jean-Paul Beconne from comment #5)
> I don't know why, portlint is not working properly (always report that the header # $Freebsd$ is missing and found many errors due to this first error)
If you check https://www.freshports.org/ports-mgmt/portlint/, the update to portlint is not yet in quarterly. You may want to obtain the latest version.
> For testing, I perform the following steps:
> make install
> make deinstall
> make package
Please make sure to set DEVELOPER=yes in /etc/make.conf, thanks.
Again, are you sure that this patch is tested?
[00:00:03] Gathering ports metadata
[00:00:03] Error: security/R-cran-credentials depends on nonexistent origin 'devel/R-cran-askpass'; Please contact maintainer of the port to fix this.
[00:00:03] Error: security/R-cran-credentials depends on nonexistent origin 'devel/R-cran-curl'; Please contact maintainer of the port to fix this.
[00:00:03] Error: security/R-cran-credentials depends on nonexistent origin 'devel/R-cran-jsonlite'; Please contact maintainer of the port to fix this.
[00:00:03] Error: security/R-cran-credentials depends on nonexistent origin 'devel/R-cran-openssl'; Please contact maintainer of the port to fix this.
[00:00:03] Error: Error processing dependencies
(In reply to Guangyuan Yang from comment #8)
Yes, I did. I don't understand why my tests don't detect incorrect category.
This time I added the log of my test.
Created attachment 225972 [details]
Created attachment 225973 [details]
Log of the test
Hopefully, you can identify what is wrong in my test
(In reply to Jean-Paul Beconne from comment #11)
You are not building it in a clean environment - with this port/pkg and dependencies already installed. As I mentioned before, spending some time to set up Poudriere is highly recommended for ports developers. There are a few guides online that help with this, and feel free to ask here.
(In reply to Guangyuan Yang from comment #12)
I had a quick look on poudriere, it is requiring the use of jail and resources that my machine doesn't have.
I had fixed the category in the latest patch and I will remove first the dependencies before testing.
Please confirm that builds passed in a clean environment, and remove the
"needs-qa" keyword of this PR.
> I had a quick look on poudriere, it is requiring the use of jail and resources that my machine doesn't have.
It is strongly preferred and greatly helps with your future submission. Otherwise, you should always make sure you are building in a clean environment (which is hard and sometimes impossible).
A commit in branch main references this bug:
Author: Jean-Paul Beconne <email@example.com>
AuthorDate: 2021-06-28 05:01:08 +0000
Commit: Guangyuan Yang <ygy@FreeBSD.org>
CommitDate: 2021-06-28 05:01:08 +0000
security/R-cran-credentials: New port
Tools for Managing SSH and Git Credentials.
Approved by: lwhsu (mentor, implicit)
security/Makefile | 1 +
security/R-cran-credentials/Makefile (new) | 21 +++++++++++++++++++++
security/R-cran-credentials/distinfo (new) | 3 +++
security/R-cran-credentials/pkg-descr (new) | 10 ++++++++++
4 files changed, 35 insertions(+)
Committed, thanks! Please, from now on, always explicitly specify the test results along with your future submission (no need to upload the logs).