Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] custom ebuild from GIT source
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Frautoincnam
Guru
Guru


Joined: 19 May 2017
Posts: 324

PostPosted: Sun Sep 22, 2024 9:34 pm    Post subject: [solved] custom ebuild from GIT source Reply with quote

Solved by replacing https by git: EGIT_REPO_URI="git://git.code.sf.net/p/${PN}/rkh_code"

Hi,

I'm trying to create an ebuild for rkhunter.
But I have never done an ebuild with a GIT branch as source.
I have read a lot of things on the subject, but still I can't get it, so if someone can give me a little help please...

I can get git sources with:
Code:
git clone --branch develop https://git.code.sf.net/p/rkhunter/rkh_code


So I wrote the ebuild like:
Code:
EAPI=8

inherit bash-completion-r1 git-r3

DESCRIPTION="Rootkit Hunter scans for known and unknown rootkits, backdoors, and sniffers"
HOMEPAGE="http://rkhunter.sf.net/"
EGIT_REPO_URI="https://git.code.sf.net/p/${PN}/rkh_code"
EGIT_OVERRIDE_BRANCH_RKHUNTER_RKH_CODE="develop"

But I get an error:
Code:
# ebuild rkhunter-9999.ebuild clean unpack
>>> Unpacking source...
 * Repository id: rkhunter_rkh_code.git
 * Using EGIT_OVERRIDE_BRANCH_RKHUNTER_RKH_CODE=develop
 * No support will be provided.
 * Fetching https://git.code.sf.net/p/rkhunter/rkh_code ...
git fetch https://git.code.sf.net/p/rkhunter/rkh_code +refs/heads/develop:refs/heads/develop
git: 'remote-https' is not a git command. See 'git --help'.

I don't understand this error message at all...
(same error with EGIT_BRANCH="develop")

What's my error please?

Thanks in advance.


Last edited by Frautoincnam on Sun Sep 22, 2024 10:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10655
Location: Somewhere over Atlanta, Georgia

PostPosted: Sun Sep 22, 2024 9:56 pm    Post subject: Reply with quote

Well, first of all, can you get to the URL https://git.code.sf.net/p/rkhunter/rkh_code in a browser? I can't at the moment.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
Frautoincnam
Guru
Guru


Joined: 19 May 2017
Posts: 324

PostPosted: Sun Sep 22, 2024 9:58 pm    Post subject: Reply with quote

John R. Graham wrote:
Well, first of all, can you get to the URL https://git.code.sf.net/p/rkhunter/rkh_code in a browser? I can't at the moment.

No, but I can get the code with:
Code:
git clone --branch develop https://git.code.sf.net/p/rkhunter/rkh_code

I followed this answer to find source code
Back to top
View user's profile Send private message
Jimmy Jazz
Guru
Guru


Joined: 04 Oct 2004
Posts: 333
Location: Strasbourg

PostPosted: Mon Sep 23, 2024 9:58 pm    Post subject: Reply with quote

Frautoincnam wrote:
John R. Graham wrote:
Well, first of all, can you get to the URL https://git.code.sf.net/p/rkhunter/rkh_code in a browser? I can't at the moment.

No, but I can get the code with:
Code:
git clone --branch develop https://git.code.sf.net/p/rkhunter/rkh_code

I followed this answer to find source code


use EGIT_BRANCH=develop instead
_________________
« La seule condition au triomphe du mal, c'est l'inaction des gens de bien » E.Burke
Code:

+----+----+----+
|    |::::|    |
|    |::::|    |
+----+----+----+

motto: WeLCRO
WritE Less Code, Repeat Often
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22634

PostPosted: Mon Sep 23, 2024 11:15 pm    Post subject: Reply with quote

OP already tried that. OP's output indicates that the correct branch name is picked, but git fails to retrieve it.

OP: what is the output of emerge --pretend --verbose dev-vcs/git?
Back to top
View user's profile Send private message
Frautoincnam
Guru
Guru


Joined: 19 May 2017
Posts: 324

PostPosted: Tue Sep 24, 2024 2:06 am    Post subject: Reply with quote

In fact, it's all my fault. I made 2 mistakes, and that's what was causing the trouble.

1) I had "dev-vcs/git -curl" for optimization purposes, so no https with git, I had never made the connection between the two, and I had completely forgotten having done it. I had thought about looking at git's USEFLAGS, but I didn't spot the "-curl".

2) the test I was doing directly with git clone https://... I wasn't doing it on the same machine, but on one where git is compiled with +curl. So I couldn't blame git since it was working fine.

Obviously, the result seemed absurd to me, and without a solution.
My ebuild works perfectly with the https url

Sorry for the unnecessary noise.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22634

PostPosted: Tue Sep 24, 2024 12:08 pm    Post subject: Reply with quote

That seems strange. As I read eclass/git-r3.eclass, it will always depend on dev-vcs/git[curl], so Portage should not have allowed you to try this with a USE=-curl git installed.
Back to top
View user's profile Send private message
Frautoincnam
Guru
Guru


Joined: 19 May 2017
Posts: 324

PostPosted: Tue Sep 24, 2024 2:11 pm    Post subject: Reply with quote

But it was the case, and this time, I'm sure of it ;)
I had precisely: "dev-vcs/git -curl -iconv -perl -webdav" and this for several months, without any problem ever arising, until I wanted to do this ebuild with git source and https url.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1957

PostPosted: Tue Sep 24, 2024 2:11 pm    Post subject: Reply with quote

ebuild(1) doesn't check dependencies, so PEBKAC.
Back to top
View user's profile Send private message
Frautoincnam
Guru
Guru


Joined: 19 May 2017
Posts: 324

PostPosted: Tue Sep 24, 2024 2:14 pm    Post subject: Reply with quote

PEBCAK was already admitted
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1957

PostPosted: Tue Sep 24, 2024 2:41 pm    Post subject: Reply with quote

What I'm saying is that it's not that the dependency is missing or that Portage is getting something wrong, i.e. your p.use is in theory fine (even if maybe unwise), it's just that not using emerge and instead using ebuild is not going to respect dependencies.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 22634

PostPosted: Tue Sep 24, 2024 3:02 pm    Post subject: Reply with quote

Sorry. I missed that OP was using ebuild instead of emerge. I knew ebuild skipped those steps, but thought OP would have used emerge first, and only resorted to ebuild later (if at all) for debugging.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum