Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to contribute ebuilds to Gentoo portage
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
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Tue Dec 04, 2018 11:45 am    Post subject: how to contribute ebuilds to Gentoo portage Reply with quote

Hi,

Trying to contribute ebuild patches, new ebuilds, etc. is frustrating in Gentoo. As old-timers may know, the traditional way of submitting patches on bugs.gentoo.org is useless nowadays. I haven't succeeded using github yet, but hopefully someone will take a look at my proposals...

There's no wiki guide that clearly explains how to do it, at least not simple enough for non-dev users.

I'd like to whip up a quick cheat sheet here, and maybe one day if everything works fine create a wiki page, or merge the info with https://wiki.gentoo.org/wiki/GitHub_Pull_Requests.

Here's the quick guide:

Code:

#######################
Initial setup (run only once):
#######################

root # emerge --ask dev-vcs/git dev-util/pkgcheck dev-util/pkgdev # was: app-portage/repoman
>>> The following is a workaround for https://bugs.gentoo.org/574130. Of course, my_user is a non-admin user.
root # usermod -a -G portage my_user
>>> change to my_user (log out and back in) -- must not be root
$ mkdir ~/mygithub
$ cd ~/mygithub
$ git clone -o gentoo git@github.com:gentoo/gentoo.git
>>> if you have firewall issues (ssh blocked), you can also try:
$ git clone -o gentoo https://github.com/gentoo/gentoo.git
>>> Open https://github.com/gentoo/gentoo in a modern web browser and click the "Fork" button. Get the ForkURL which will be in the browser's address bar.
$ cd gentoo
$ git remote add github ForkURL
$ git config --local user.email "your@email.address"
$ git config --local user.name "Your Name"
$ git config --local pull.ff only
$ git config --local pull.rebase preserve
$ git config --local push.default simple
$ mkdir ~/.gnupg
$ chmod 700 ~/.gnupg
>>> edit ~/.gnupg/gpg.conf (the ca-cert-file parameter below is optional for GPG2):
keyserver hkps://hkps.pool.sks-keyservers.net
keyserver-options ca-cert-file=/usr/share/gnupg/sks-keyservers.netCA.pem
keyserver-options no-honor-keyserver-url
cert-digest-algo SHA512
default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed
$ gpg --full-generate-key
>>> Answer questions. Make sure key life is less than 5 years. Set "Your Name" and "your@email.address". You will be asked for a passphrase.
$ gpg --keyserver pool.sks-keyservers.net --send-key your@email.address
>>> If the above does not work (gpg complains about missing KEY ID, search for it usually in the line that looks like "gpg: RSA/SHA512 signature from: "KEY_ID Your Name Your Comment <your@email.address>" or "gpg: key KEY_ID marked as ultimately trusted" and issue:
$ gpg --keyserver pool.sks-keyservers.net --send-key KEY_ID
>>> Your firewall may block the above command.
$ gpg --list-public-keys --keyid-format 0xlong your@email.address
>>> Read output starting with 'pub', and select a key (0xLONG-GPG-KEY)
$ git config --local user.signingkey 0xLONG-GPG-KEY
$ git config --local commit.gpgsign 1
$ git config --local push.gpgsign 1
$ gpg --list-secret-keys --keyid-format LONG
>>> You should see something like this:
sec   rsa2048/0123456789012345 YEAR-MONTH-DAY [SC] [expires: YEAR-MONTH-DAY]
$ gpg --armor --export 0123456789012345
>>> You should copy the entire block:
-----BEGIN PGP PUBLIC KEY BLOCK-----
[...]
-----END PGP PUBLIC KEY BLOCK-----
>>> Open https://github.com/settings/keys in a browser, and click on "New GPG key".
>>> Exit the user's shell (I'm supposing you logged in as the user and did NOT use "su user" -- I had issues with su).


###################################################################
Contributing for ebuild CATEGORY/PACKAGE (run each time you want to commit):
###################################################################

>>> Test your ebuilds by emerging the package(s) in your custom overlay (usually /usr/local/portage). One way of installing the software is with this command:
root # USE=gentoo-dev FEATURES=test emerge CATEGORY/PACKAGE
>>> You can also emerge dev-util/checkbashisms and run checkbashisms on each of your files within the FILES dir (openrc init files might require replacing 'openrc-run' with 'sh' during the check). Bashisms should be avoided.
>>> If emerge complains about writing to specific directories (Gentoo FHS paths policy), and you're not sure where to look then you can run something like 'inotifywait --monitor /problematic_dir' while re-emerging.
>>> Once you've fully tested the software on your system you can proceed as standard user.
$ cd ~/mygithub/gentoo
$ git checkout master
$ git status
>>> Check if state and branch are OK
$ git pull --rebase gentoo master
>>> Decide which CATEGORY/PACKAGE you want to work on, and then run:
$ git checkout -b CATEGORY/PACKAGE master
>>> Now change files. eg. cd into an ebuild dir, add/edit/delete files, etc.
>>> eg. you added example-r1.ebuild, you deleted files/example2, and you edited files/example3
>>> Note that if you create an ebuild for a new package then you have to create a file named metadata.xml according to https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers/User_Guide#Proxied_maintainer_in_metadata.xml
>>> Make sure you're in the ebuild directory:
$ cd ~/mygithub/gentoo/CATEGORY/PACKAGE
$ pkgdev manifest # was: repoman manifest
>>> 'git status' will quickly suggest which files you might want to 'add' with:
$ git add example-r1.ebuild files/example2 files/example3 metadata.xml
$ pkgcheck scan  # was: repoman -dx full
>>> if errors, fix them, and go back to "repoman manifest"
$ git status
>>> Just make sure that the only "untracked file" is Manifest. Otherwise, go back to "git add".
$ pkgdev commit # was: repoman -dx commit
>>> This command will ask for a message. You should at least input the following (file a bug report if you haven't already):
CATEGORY/PACKAGE: changed ebuild and files to support X feature

Changed ebuild and files to support X feature.

Bug: https://bugs.gentoo.org/NNNNNN
Tested-by: Your Name <your@email.address>
Signed-off-by: Your Name <your@email.address>
# Use the following only when you want to fix a commit you already requested a pull for. You can get this ID from GitHub's web page.
# Fixes: commit_ID (commit_title)

>>> You should be using the nano text editor, so press CTRL-X + Y + ENTER. Finish up by entering the GPG passphrase.
$ git push --no-signed github CATEGORY/PACKAGE
>>> You will be required to enter your Github account credentials.
>>> If you get a "fast-forwards" error, and you're sure the local data is the only valid data then you can run: git push --no-signed --force github CATEGORY/PACKAGE
>>> If all's OK you should see a message such as:
remote: Create a pull request for 'CATEGORY/PACKAGE' on GitHub by visiting:
remote:      https://github.com/YourName/gentoo/pull/new/CATEGORY/PACKAGE
>>> Open https://github.com/YourName/gentoo/pull/new/CATEGORY/PACKAGE in a modern web browser.
>>> Review title and comment (should be auto-filled), and click "Create pull request".
>>> Wait for the Gentoo devs to approve your request... You can then delete your branch:
$ git branch -d CATEGORY/PACKAGE
>>> If you are told to correct some files, or you wish to modify your contribution to that same package, you do not need to create a new pull request. Just go back to the "repoman manifest" line, and repeat the steps without creating the Pull Request on the Github web site.


###################################################################
If something goes wrong and you want to start over:
###################################################################

$ cd ~/mygithub && rm -Rf ~/mygithub/gentoo/
$ git clone -o gentoo https://github.com/gentoo/gentoo.git
$ cd gentoo
$ git remote add github ForkURL
$ git config --local user.email "your@email.address"
$ git config --local user.name "Your Name"
$ git config --local pull.ff only
$ git config --local pull.rebase preserve
$ git config --local push.default simple
$ gpg --list-public-keys --keyid-format 0xlong your@email.address
>>> Read output starting with 'pub', and select a key (0xLONG-GPG-KEY)
$ git config --local user.signingkey 0xLONG-GPG-KEY
$ git config --local commit.gpgsign 1
$ git config --local push.gpgsign 1
>>> Exit the user's shell then log back in (ssh, console, etc). Do not use "su user" from root's shell -- I've had issues with that.
>>> Go back to section "Contributing for ebuild"


Last edited by Vieri on Thu Oct 27, 2022 8:38 am; edited 40 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Tue Dec 04, 2018 2:05 pm    Post subject: Reply with quote

Vieri,

Talk to the people in #gentoo-proxy-maint on freenode.
You will need to register your nick and identify with nickserv to be able to speak.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Wed Dec 05, 2018 8:08 am    Post subject: repoman out-of-tree ebuild: Permission denied Reply with quote

Thanks Neddy.

This is the error I'm getting when trying to run repoman on an ebuild that's outside of te portage tree (main and cutom).
I'm not sure how to fix this. Maybe it's a repos.conf thing, but it's unclear to me how I should handle this.

Any ideas anyone?

Code:

# repoman manifest

*** the local copy of metadata.xsd needs to be refetched, doing that now

--2018-12-05 08:11:29--  https://www.gentoo.org/xml-schema/metadata.xsd
Resolving www.gentoo.org... 89.16.167.134, 2001:41c8:0:936::139, 2001:41c8:0:936::136
Connecting to www.gentoo.org|89.16.167.134|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 18186 (18K) [application/octet-stream]
Saving to: '/usr/portage/distfiles/metadata.xsd.v4fdq4k3'

/usr/portage/distfiles/metadat 100%[===================================================>]  17.76K  --.-KB/s    in 0s

2018-12-05 08:11:30 (114 MB/s) - '/usr/portage/distfiles/metadata.xsd.v4fdq4k3' saved [18186/18186]

/usr/lib/portage/python3.6/ebuild.sh: line 635: /root/mygithub/gentoo/net-fs/samba/samba-4.5.16.ebuild: Permission denied
 * ERROR: net-fs/samba-4.5.16::gentoo failed (depend phase):
 *   error sourcing ebuild
 *
 * Call stack:
 *   ebuild.sh, line 635:  Called die
 * The specific snippet of code:
 *                      source "$EBUILD" || die "error sourcing ebuild"
 *
 * If you need support, post the output of `emerge --info '=net-fs/samba-4.5.16::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-fs/samba-4.5.16::gentoo'`.
 * Working directory: '/usr/lib64/python3.6/site-packages'
 * S: '/var/tmp/portage/net-fs/samba-4.5.16/work/samba-4.5.16'
!!! getFetchMap(): aux_get() error reading net-fs/samba-4.5.16; aborting.
Unable to generate manifest.
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30894
Location: here

PostPosted: Wed Dec 05, 2018 8:13 am    Post subject: Reply with quote

You should create a custom repository
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Wed Dec 05, 2018 8:54 am    Post subject: Reply with quote

I did this:

Code:
chown -R portage:portage ~/mygithub/gentoo
echo 'mygithubgentoo' > ~/mygithub/gentoo/profiles/repo_name
echo 'masters = gentoo' > ~/mygithub/gentoo/metadata/layout.conf
echo 'auto-sync = false' >> ~/mygithub/gentoo/metadata/layout.conf
echo '[mygithubgentoo]' > /etc/portage/repos.conf/mygithubgentoo.conf
echo 'location = /root/mygithub/gentoo' >> /etc/portage/repos.conf/mygithubgentoo.conf


but I still got this:

Code:
# repoman manifest
/usr/lib/portage/python3.6/ebuild.sh: line 635: /root/mygithub/gentoo/net-fs/samba/samba-4.5.16.ebuild: Permission denied
 * ERROR: net-fs/samba-4.5.16::mygithubgentoo failed (depend phase):
 *   error sourcing ebuild
 *
 * Call stack:
 *   ebuild.sh, line 635:  Called die
 * The specific snippet of code:
 *                      source "$EBUILD" || die "error sourcing ebuild"
 *
 * If you need support, post the output of `emerge --info '=net-fs/samba-4.5.16::mygithubgentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-fs/samba-4.5.16::mygithubgentoo'`.
 * Working directory: '/usr/lib64/python3.6/site-packages'
 * S: '/var/tmp/portage/net-fs/samba-4.5.16/work/samba-4.5.16'
!!! getFetchMap(): aux_get() error reading net-fs/samba-4.5.16; aborting.
Unable to generate manifest.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Wed Dec 05, 2018 8:59 am    Post subject: Reply with quote

Vieri,

I have a fork of gentoo/gentoo on github.
I keep a git clone in a random dir in my home and work there. repoman seems OK about it.
When I'm ready, I push the work branch to my clone on github and raise a PR.
I do not have commit access to the main repo.

This allows my to use my github clone as the portage tree on another system for run time target testing.
Think keywording for arm64 on an amd64 system.

Eww.
Code:
# repoman manifest

Do not work as root. Its not required.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Wed Dec 05, 2018 10:46 am    Post subject: Reply with quote

NeddySeagoon wrote:

I have a fork of gentoo/gentoo on github.
I keep a git clone in a random dir in my home and work there. repoman seems OK about it.
When I'm ready, I push the work branch to my clone on github and raise a PR.


That sounds like the quick guide I posted in my first message...
However, did you create a custom repository for this clone?
ie. did you edit {metadata/layout.conf,profiles/repo_name} and /etc/portage/repos.conf/your_repo.conf?

Here's a bit more info just in case you see something I don't:

Code:

# ls -l /root/mygithub/gentoo/net-fs/samba/samba-4.5.16.ebuild
-rw-r--r-- 1 portage portage 8166 Dec  4 11:44 /root/mygithub/gentoo/net-fs/samba/samba-4.5.16.ebuild
# sed -n '635p' /usr/lib/portage/python3.6/ebuild.sh
                        source "$EBUILD" || die "error sourcing ebuild"
# whoami
root
# repoman manifest
/usr/lib/portage/python3.6/ebuild.sh: line 635: /root/mygithub/gentoo/net-fs/samba/samba-4.5.16.ebuild: Permission denied
 * ERROR: net-fs/samba-4.5.16::mygithubgentoo failed (depend phase):
 *   error sourcing ebuild
 *
 * Call stack:
 *   ebuild.sh, line 635:  Called die
 * The specific snippet of code:
 *                      source "$EBUILD" || die "error sourcing ebuild"
 *
 * If you need support, post the output of `emerge --info '=net-fs/samba-4.5.16::mygithubgentoo'`,
 * the complete build log and the output of `emerge -pqv '=net-fs/samba-4.5.16::mygithubgentoo'`.
 * Working directory: '/usr/lib64/python3.6/site-packages'
 * S: '/var/tmp/portage/net-fs/samba-4.5.16/work/samba-4.5.16'
!!! getFetchMap(): aux_get() error reading net-fs/samba-4.5.16; aborting.
Unable to generate manifest.


[EDIT] For now, I'm working as root just in case I run into permission issues... Ironic, isn't it?

[EDIT 2] OK, never mind. It's a permissions issue on the /root dir. Moving the whole tree to, say, /opt works fine.

[EDIT] I corrected my first post to reflect this (using /usr/local when running as root). The custom repository does not seem to be required.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Wed Dec 05, 2018 11:16 am    Post subject: Reply with quote

Vieri,

My github clone on the work box is /home/neddyseagoon/portage2. portage2 because I got the first attempt in a mess and threw it away later.

That is

Code:
cd portage2
~/portage2 $ git pull gentoo master
Enter passphrase for key '/home/roy/.ssh/id_ecdsa':
...
Successfully rebased and updated refs/heads/master.
<do_stuff_here>
~/portage2 $ git push
Username for 'https://github.com':
Password for 'https://<me>@github.com':

Updates my local copy of my gentoo/gentoo fork, them pushes it back to github, where its ready for the Raspberry Pi.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Wed Dec 05, 2018 12:12 pm    Post subject: Reply with quote

Code:
# repoman -dx full

RepoMan scours the neighborhood...
  KEYWORDS.dropped              1
   net-fs/samba/samba-4.9.3.ebuild: arm sparc
  ebuild.badheader              1
   net-fs/samba/samba-4.8.6-r3.ebuild: Stale CVS header on line: 3
RepoMan sez: "You're only giving me a partial QA payment?
              I'll take it this time, but I'm not happy."


I'm not working on "net-fs/samba/samba-4.9.3.ebuild", so I don't care for KEYWORDS.dropped.

however, I'm working on "net-fs/samba/samba-4.8.6-r3.ebuild".
What does "ebuild.badheader - Stale CVS header on line: 3" mean?

Code:
# sed -n '3p' samba-4.8.6-r3.ebuild
# $Header: $


Isn't that how a custom ebuild is to be formatted? Ref.: https://devmanual.gentoo.org/eclass-reference/ebuild/index.html
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Wed Dec 05, 2018 12:34 pm    Post subject: Reply with quote

Vieri,

When Gentoo used CVS, ebuilds contained the line
Code:
$Header: $

Its no longer permitted. Just remove it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Wed Dec 05, 2018 12:58 pm    Post subject: Reply with quote

OK, thanks.

So I'm almost done, except I can't push my changes to github.
I'm getting this:

Code:
# git push github net-fs/samba
Username for 'https://github.com': myname
Password for 'https://myname@github.com':
remote: Permission to gentoo/gentoo.git denied to myname.
fatal: unable to access 'https://github.com/gentoo/gentoo/': The requested URL returned error: 403


I'm pretty much sure the username and passwords are correct.
I must be overlooking something...

[EDIT]
Sorry, my mistake.
I probably mixed up my URLs. So I supposedly fix it with:

Code:
# git remote set-url github https://github.com/myname/gentoo


However, now I'm getting another error:

Code:
# git push github net-fs/samba
Username for 'https://github.com': myname
Password for 'https://myname@github.com':
fatal: the receiving end does not support --signed push
fatal: The remote end hung up unexpectedly
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Wed Dec 05, 2018 1:40 pm    Post subject: Reply with quote

Vieri,

You can't push to gentoo/gentoo.git Nobody can. Its a clone of Gentoos git repo kept on Gentoo infrastructure.

Make your own fork and push things there. Then you can raise a PR.
The 'pull' won't actually be added to gentoo/gentoo on github when it happens.
It will be added to gentoos git tree on gentoo infrastructure. That gets propogated to github on a regular basis.

That's a design feature.

The Gentoo Social Contract forbids Gentoo 'depending' on a closed service like github. It does not prevent Gentoo using it as a convenience to users.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Wed Dec 05, 2018 1:58 pm    Post subject: Reply with quote

Thanks again, but maybe you didn't see my edit above.

Now I'm getting:
Code:
fatal: the receiving end does not support --signed push


I thought maybe I could "ignore" this fatal error, but...

If I go to https://github.com/gentoo/gentoo, click the "New pull request" button to the right of the "Branch" menu, click "compare across forks", and set:

Base fork: gentoo/gentoo, base: master, head fork: MyName/gentoo, compare: master

AFAIK, I should be able to select "net-fs/samba" (in my case) in the "compare" menu, right?
If only "master" shows up, I guess it means that my git push command failed altogether, right?
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Wed Dec 05, 2018 2:44 pm    Post subject: Reply with quote

I updated my first post (quick guide).
Everything seems to be working now.

Hopefully someone can spot mistakes or suggest improvements...

Thanks
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Wed Dec 05, 2018 4:43 pm    Post subject: Reply with quote

Vieri,

/usr/local/ is only writable by root. A better location is your normal users ~/mygithub.
Now you don't need to work as root, which is always a good thing.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Mon Dec 10, 2018 10:25 am    Post subject: Reply with quote

Hi again,

Is the following really necessary? (see first post for context)

Code:

echo 'PORTAGE_GPG_KEY="0xLONG-GPG-KEY"' >> /etc/portage/make.conf
Back to top
View user's profile Send private message
Dwosky
Tux's lil' helper
Tux's lil' helper


Joined: 07 Nov 2018
Posts: 135

PostPosted: Mon Dec 10, 2018 11:24 am    Post subject: Reply with quote

From what I've seen, the PORTAGE_GPG_KEY might be used to sign Manifests as described here: https://devmanual.gentoo.org/general-concepts/manifest/index.html, but for submitting an ebuild I'm not 100% sure its really needed, since you're already setting up via git:
Code:
user $ git config --local user.signingkey 0xLONG-GPG-KEY
user $ git config --local commit.gpgsign 1
user $ git config --local push.gpgsign 1
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Tue Dec 11, 2018 9:59 am    Post subject: Reply with quote

Thanks Dwosky.

I have this right before committing:

Code:
$ git status               
On branch net-proxy/c-icap
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        new file:  my_ebuild.ebuild
        new file:   files/my_file.conf
        new file:   files/my_file.init
        new file:   files/my_file.logrotate
        new file:   metadata.xml

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        Manifest


Is it OK not to commit the Manifest file?
Or do I need to add it too?

[EDIT]
Another question:
Suppose I already filed a pull request on Github for a specific package, and in the meantime I managed to improve my local files. What's the best practice? Should I "close" my pull request on Github, commit the branch again, and request another/new pull? Or is it enough to just "push" my commit with the same branch name, and not change my pull request at all?
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 8935

PostPosted: Tue Dec 11, 2018 10:36 am    Post subject: Reply with quote

After editing your commits or rebasing on top of gentoo.git all you do is force push over your remote branch.
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Tue Dec 11, 2018 10:46 am    Post subject: Reply with quote

asturm wrote:
After editing your commits or rebasing on top of gentoo.git all you do is force push over your remote branch.


When you say "after editing your commits", does it imply that I run repoman commit again?
Such as:

Code:
$ repoman -dx commit
$ git push --no-signed github CATEGORY/PACKAGE
Back to top
View user's profile Send private message
Dwosky
Tux's lil' helper
Tux's lil' helper


Joined: 07 Nov 2018
Posts: 135

PostPosted: Tue Dec 11, 2018 11:36 am    Post subject: Reply with quote

The normal workflow would be:
Code:
<edit some files>
git add <edited files>
repoman -dx full
<check all items are correct and you don't get any error>
repoman -dx commit
<enter the commit message>
git push <extra git args>
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Tue Dec 11, 2018 12:06 pm    Post subject: Reply with quote

OK, thanks.
I updated my first post to reflect all this.
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Tue Dec 11, 2018 12:28 pm    Post subject: Reply with quote

Another noob question here...

Why does git have to send so much data when I issue the following?

Code:
$ git push --no-signed github CATEGORY/PACKAGE
Username for 'https://github.com': MY_USER
Password for 'https://MY_USER@github.com':
Enumerating objects: 1647791, done.
Counting objects: 100% (1647791/1647791), done.
Delta compression using up to 2 threads.
Compressing objects: 100% (676719/676719), done.
Writing objects: 100% (1647791/1647791), 585.41 MiB | 6.72 MiB/s, done.
Total 1647791 (delta 968739), reused 1647652 (delta 968610)
remote: Resolving deltas: 100% (968739/968739), done.


I'm expecting to only push my CATEGORY/PACKAGE.

[EDIT]
Another question:

How can I solve the following error:

Code:
$ repoman -dx full

RepoMan scours the neighborhood...
  dependency.bad [fatal]        31
   CATEGORY/PACKAGE/package-1.0.ebuild: RDEPEND: ~amd64(default/linux/amd64/17.0)
['CATEGORY/PACKAGE2']
   CATEGORY/PACKAGE/package-1.0.ebuild: RDEPEND: ~amd64(default/linux/amd64/17.0/desktop)
['CATEGORY/PACKAGE2']
   CATEGORY/PACKAGE/package-1.0.ebuild: RDEPEND: ~amd64(default/linux/amd64/17.0/desktop/gnome)
[etc.]

note that:

Code:
$ git status
On branch CATEGORY/PACKAGE


However, the error message points to CATEGORY/PACKAGE2...

[EDIT2]
The latter error might be due to the following...

This is what I do when I contribute for CATEGORY/PACKAGE to github:

Code:
$ git checkout -b CATEGORY/PACKAGE master
$ repoman manifest
$ git add file1 file2 file3...
$ repoman -dx full
$ repoman -dx commit
$ git push --no-signed github CATEGORY/PACKAGE


That seems to work as expected.
However, suppose CATEGORY/PACKAGE does not exist in the master repository (gentoo/gentoo at github). So it's a NEW package contrib.
Also suppose that I don't want to wait for gentoo dev feedback on this particular contrib, and I want to move on and contribute another package.
So I won't be issuing this just yet:

Code:
$ git branch -d CATEGORY/PACKAGE


Instead, I will try to resync/update the main tree just in case there are some changes, and then fork a new branch.
So this is what I do:

Code:
$ git pull gentoo master
$ git checkout -b CATEGORY/ANOTHER_PACKAGE master


So I'm guessing that "git pull gentoo master" is the culprit as it might erase my CATEGORY/PACKAGE directory.

How can I avoid this?

[EDIT3]
Not sure yet, but I think both problems are solved with the updates to my first post.
Back to top
View user's profile Send private message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 874

PostPosted: Wed Jan 23, 2019 11:39 am    Post subject: Reply with quote

Hi again,

Does anyone know by any chance in which cases I can get the gpg error below?

Code:
$ repoman -dx commit
[...]
* 6 files being committed...
error: gpg failed to sign the data
fatal: failed to write commit object
!!! Exiting on git (shell) error code: 128


[EDIT] Never mind. One needs to exit the shell and log in again...
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 723
Location: /home

PostPosted: Thu Jan 24, 2019 11:59 am    Post subject: Reply with quote

Vieri wrote:
Another noob question here...

Why does git have to send so much data when I issue the following?

Code:
$ git push --no-signed github CATEGORY/PACKAGE
Username for 'https://github.com': MY_USER
Password for 'https://MY_USER@github.com':
Enumerating objects: 1647791, done.
Counting objects: 100% (1647791/1647791), done.
Delta compression using up to 2 threads.
Compressing objects: 100% (676719/676719), done.
Writing objects: 100% (1647791/1647791), 585.41 MiB | 6.72 MiB/s, done.
Total 1647791 (delta 968739), reused 1647652 (delta 968610)
remote: Resolving deltas: 100% (968739/968739), done.


I'm expecting to only push my CATEGORY/PACKAGE.



I believe it updates your branches HEAD to match with whatever you have pulled it against. It's really handy so you're not "behind" Gentoo tree's status by a lot.
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