Bug 256708 - [NEW PORT] security/R-cran-credentials: Tools for Managing SSH and Git Credentials
Summary: [NEW PORT] security/R-cran-credentials: Tools for Managing SSH and Git Creden...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Guangyuan Yang
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-19 09:22 UTC by Jean-Paul Beconne
Modified: 2021-06-28 05:12 UTC (History)
2 users (show)

See Also:


Attachments
Port in GIT diff format (3.74 KB, patch)
2021-06-19 09:22 UTC, Jean-Paul Beconne
no flags Details | Diff
Category hook and Port (1.84 KB, patch)
2021-06-20 08:27 UTC, Jean-Paul Beconne
no flags Details | Diff
Modified diff format and category hook (2.20 KB, patch)
2021-06-20 15:57 UTC, Jean-Paul Beconne
no flags Details | Diff
Modified port (2.21 KB, patch)
2021-06-21 18:26 UTC, Jean-Paul Beconne
no flags Details | Diff
Log of the test (4.63 KB, text/plain)
2021-06-21 18:27 UTC, Jean-Paul Beconne
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Paul Beconne 2021-06-19 09:22:42 UTC
Created attachment 225921 [details]
Port in GIT diff format
Comment 1 Guangyuan Yang freebsd_committer freebsd_triage 2021-06-20 07:37:48 UTC
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?
Comment 2 Jean-Paul Beconne 2021-06-20 08:26:34 UTC
(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
Comment 3 Jean-Paul Beconne 2021-06-20 08:27:32 UTC
Created attachment 225945 [details]
Category hook and Port
Comment 4 Guangyuan Yang freebsd_committer freebsd_triage 2021-06-20 10:18:27 UTC
(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.
Comment 5 Jean-Paul Beconne 2021-06-20 15:55:54 UTC
(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:
make
make install
make deinstall
make package
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)
Comment 6 Jean-Paul Beconne 2021-06-20 15:57:13 UTC
Created attachment 225949 [details]
Modified diff format and category hook

Now, the file should be correct
Comment 7 Guangyuan Yang freebsd_committer freebsd_triage 2021-06-20 23:37:23 UTC
(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
> make install
> make deinstall
> make package

Please make sure to set DEVELOPER=yes in /etc/make.conf, thanks.
Comment 8 Guangyuan Yang freebsd_committer freebsd_triage 2021-06-21 00:19:14 UTC
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

http://jenkins.ygy.io/job/freebsd-ports-testing-13.0R-amd64/258/console
Comment 9 Jean-Paul Beconne 2021-06-21 18:25:16 UTC
(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.
Comment 10 Jean-Paul Beconne 2021-06-21 18:26:22 UTC
Created attachment 225972 [details]
Modified port
Comment 11 Jean-Paul Beconne 2021-06-21 18:27:28 UTC
Created attachment 225973 [details]
Log of the test

Hopefully, you can identify what is wrong in my test
Comment 12 Guangyuan Yang freebsd_committer freebsd_triage 2021-06-21 18:31:57 UTC
(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.
Comment 13 Jean-Paul Beconne 2021-06-22 17:19:23 UTC
(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.
Comment 14 Guangyuan Yang freebsd_committer freebsd_triage 2021-06-25 00:45:39 UTC
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).
Comment 15 commit-hook freebsd_committer freebsd_triage 2021-06-28 05:02:18 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5e840630b3e1f75154dadfa1e8e003ac02de7c28

commit 5e840630b3e1f75154dadfa1e8e003ac02de7c28
Author:     Jean-Paul Beconne <jpbeconne@free.fr>
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.

    PR:             256708
    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(+)
Comment 16 Guangyuan Yang freebsd_committer freebsd_triage 2021-06-28 05:12:11 UTC
Committed, thanks! Please, from now on, always explicitly specify the test results along with your future submission (no need to upload the logs).