summaryrefslogtreecommitdiff
path: root/logerrit
AgeCommit message (Collapse)AuthorFilesLines
2021-09-29Use ed25519 as default for ssh key pair generationHossein1-1/+12
Use ed25519 algorithms as the default key pair generation algorithm for the public key cryptography used by ssh in order to submit patches via 'logerrit' script. If ed25519 is not available, RSA is used. List of supported algorithms in OpenSSH can be obtained by invoking this command: ssh -Q key Change-Id: I12ebcbb62d0752c94b8c2d5225223ceb69b7fe79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122765 Reviewed-by: guilhem <guilhem@libreoffice.org> Tested-by: Hossein <hossein@libreoffice.org>
2021-07-13Make logerrit more portableIlmari Lauhakangas1-1/+1
Change-Id: I4b63de105abc292dcbb461a9a6dd846523e51eb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118779 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2021-06-01logerrit: drop some subcommands in favour of Gerrit defaultsIlmari Lauhakangas1-12/+2
submit-wip and submit-private don't really add value Change-Id: I4e30b213f5d6317538aad73fcb68e14e7cbb5032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116198 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-04-06fix logerrit on macNoel Grandin1-1/+1
where my initial commit seems not to have done the job. Change-Id: I437df21fc5164eace48c8a2dc093e2c3dcc37826 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113661 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-14Cygwin/MINGW also use '--date'Mike Kaganski1-3/+2
Change-Id: Icd0ad5e304d8479a56552dc8ff00b3bddab0ecf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112466 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-11and fix logerrit on linux againNoel1-1/+1
after I broke it with commit 69959235c3094b811406f734e863a63fc61046c0 Date: Tue Mar 9 19:29:19 2021 +0200 adapt recent change to macOS Change-Id: Ib58e9903839143fdf6e84a04d532f70a8212f984 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-10adapt recent change to macOSNoel Grandin1-1/+5
... from commit e7a471a8fbac22877973af7e7be8c6a0701b4046 logerrit: do not submit if parent is older than a week Change-Id: Icd1ee7f66dbbcef90add9e4ddecfdb9bbc0900e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112234 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-08logerrit: do not submit if parent is older than a weekXisco Fauli1-0/+9
Change-Id: Ieb20b3086082bd0a88e457b0ae922234ce737b8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112009 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-30Add an optional Gerrit change ID to testfeatureJan-Marek Glogowski1-2/+24
This way it's possible to have all test runs in a single change, so it's easier to check different results. Change-Id: I1aa3a229f5ee3ba12dbd2c18328d34c8a4528c07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99688 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-05-27logerrit: Don't suggest to set oneself a username.Guilhem Moulin1-12/+15
Usernames (used for HTTP and SSH authentication) are now automatically provisioned from SSO (along with the primary email address and display name). Username/email collisions are fatal and need manual resolution, but for most users the registration step should be somewhat simpler. Also, update the documentation to reflect /settings/#SSHKeys from gerrit 3.0's UI. Change-Id: Ia634c2f92f42b4b698543d990534ac15215a4c96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94931 Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org> Tested-by: Jenkins
2020-03-02fix get_SHA_for_change in logerrit scriptNoel Grandin1-1/+1
after commit 02b5d09c0dab1621ce23f9a8df45fa1628be3ece tdf#105204 fix shellcheck warnings in logerrit the previous get_SHA_for_change returned a URL with a leading space, which was previously implicitly stripped. Adding quotes prevents that stripping, so we need to explicitly strip here Change-Id: I5b303f6ca5b1dc7d2a369afc2c52830b1b9586eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89816 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-28tdf#105204 fix shellcheck warnings in logerritIlmari Lauhakangas1-32/+32
- double quote to prevent globbing and word splitting - use read with -r - handle pushd and popd failures - escape arguments to ssh (thanks to Guilhem for the solution) Change-Id: I5fcbb0248779a4fe3c0e50a9597874bcbf8217e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89643 Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org> Tested-by: Jenkins
2020-01-16logerrit: Upgrade URIs to https://Guilhem Moulin1-2/+2
Change-Id: I0dc259178e5df6334a13ab04850ec662499fe7d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86821 Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org> Tested-by: Jenkins
2020-01-16logerrit setup: refactor key-based SSH handlingGuilhem Moulin1-28/+33
* Don't select existing ~/.ssh/id_dsa.pub. Since 7.0 (released 2015-08-11) OpenSSH servers won't accept DSA user keys anyway, so users have likely rotated their legacy key material by now. * The pubkey to copy into gerrit is derived from the first existing file among ~/.ssh/id_ecdsa, ~/.ssh/id_ed25519, and ~/.ssh/id_rsa. These algorithms are ordered as found in PubkeyAcceptedKeyTypes' default value as of OpenSSH 8.1. (EC keys are only supported since Gerrit 1.14.) Generate an RSA key when ~/.ssh doesn't exist, as before, since it's still the default in ssh-keygen(1) from OpenSSH 8.1. * In the ssh_config(5) stanza, only include the IdentityFile when a the private key file exists. The private key material might reside somewhere else, for instance in a smartcard or in an external agent's key store; in both cases the ssh client can authenticate the user without direct access to the key material. While it's possible to set IdentityFile to a pubkey (with IdentitiesOnly={yes,no}) it's not documented and thus shouldn't be used. Change-Id: Id73a2798747ce5c394b0cf2d0dc40107a1f2c599 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86858 Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org> Tested-by: Guilhem Moulin <guilhem@libreoffice.org>
2020-01-15logerrit: atomically create ~/.ssh with restrictive modeGuilhem Moulin1-2/+1
AFAICT `mkdir [-m mode]` is already defined in POSIX.1-1990. Change-Id: I159578eac16398f16d55578fbd818906b77cf373 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86852 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-01-06logerrit: support submitting private and wip changesIlmari Lauhakangas1-7/+16
Change-Id: I0ee3ac887e17b38b6a2c501bcf6a2132406f1d20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86273 Reviewed-by: Guilhem Moulin <guilhem@libreoffice.org> Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-12-26Fix typoAndrea Gelmini1-1/+1
Change-Id: I80aae5ad98e7275bd266e1295e6988dc202649a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85840 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-09-06Fixing '....'Andrea Gelmini1-1/+1
Change-Id: Icf2a34500acc18b28f113c85366bf24edc6d20b9 Reviewed-on: https://gerrit.libreoffice.org/78695 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-05Fix typoAndrea Gelmini1-1/+1
Change-Id: Ie8919bff20c7b29a3fee7a25bba65550b3fd086d Reviewed-on: https://gerrit.libreoffice.org/68726 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-06Improve error message on ssh login failure.Shinnok1-2/+2
Also use the GERRITHOST variable instead of magic text. Change-Id: I3314be81017f64fca8aa756cca1715081ad01641 Reviewed-on: https://gerrit.libreoffice.org/41988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2017-01-17tdf#105204 fix shellcheck warnings in logerritqarkai1-16/+21
Change shebang to bash since -p option is used in read command, use $(..) instead of `..`, double quote to prevent word splitting, handle cd failure. Change-Id: I2ae00bbd21754136610504f2ff6818b8d3695cc4 Reviewed-on: https://gerrit.libreoffice.org/33089 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-04-27logerrit: disarm the "resubmit" foot-gunMichael Stahl1-13/+0
Recently some new developers accidentally used "resubmit", intending to upload a new revision of their change, but it actually always creates a new gerrit change. 4e15809a78ea3c6062e20e439cf8df3d06cd8569 claims that "resubmit creates a new Change-Id for the current change and thus allow to submit changes for review on release branches that were already reviewed on master", but that is not actually required with gerrit versions that were in use in the recent years, gerrit is capable of tracking Change-Id per branch. Change-Id: I66eda4dbc6f4ff1e235105b3f55041cda88a6b60
2015-06-10add ./logerrit testfeatureBjoern Michaelsen1-0/+36
- ./logerrit testfeature will trigger a testbuild of the current feature branch as it is on gerrit - ./logerrit testfeature $BRANCH will do the same for $BRANCH - cloning to a tempdir and rm -rf'ing around isnt ideal, so consider this as a template for your own scripting Change-Id: I50a3c80748af82d855522f245ddbff227c8adab2
2014-10-05logerrit: Simplify SSH configMathieu Parent1-6/+1
Change-Id: Ic8196ebfeef64270fcd42b44e485a2618472f184 Reviewed-on: https://gerrit.libreoffice.org/11788 Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com> Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
2013-03-29add wiki-link to logerritBjoern Michaelsen1-0/+2
Change-Id: I44dee045cef9227b62666ed08206a342fe37b18c
2013-03-27logerrit setup - automate lots more for first-time users.Michael Meeks1-15/+54
2013-03-27kill './logerrit review'Bjoern Michaelsen1-97/+8
- twas more of a proof-of-concept anyway - its more clumsy than both: - git-review https://wiki.documentfoundation.org/Development/GitReview - or simply using the web UI Change-Id: Id7a11fcdaf95386c451d0e6421d32de7d1d02721 Reviewed-on: https://gerrit.libreoffice.org/3070 Reviewed-by: Thorsten Behrens <tbehrens@suse.com> Tested-by: Thorsten Behrens <tbehrens@suse.com>
2013-03-26make ./logerrit setup hooks just to be sureBjoern Michaelsen1-0/+3
Change-Id: I17adc7cecd5cf3757d92477dacff24e46e92caab
2013-03-26first time gerrit users register, they do not sign inBjoern Michaelsen1-1/+1
Change-Id: I058a0b445f8b7f286ed4c22d40c0770d435d0e40
2013-03-26logerrit: kill copy-pasteMiklos Vajna1-1/+1
Change-Id: I2478ef0f886867c2d2247febf1b29b90fd32e5e7
2013-03-26add draft-submittal to logerrit and retabBjoern Michaelsen1-192/+208
Change-Id: I5f52d9c81c28c9a4b23eaf043e7b67b1fc6d82d9
2013-03-26add a setup walkthrough to ./logerritBjoern Michaelsen1-0/+28
Change-Id: Id041aa5a8fbb06626b7310aa76471db993b53cf0
2013-03-04Print help text if no subcommand is providedPhilipp Weissenbacher1-1/+1
Change-Id: Id9abc3ab45af8b6e44904090e179ce67a3f45796 Reviewed-on: https://gerrit.libreoffice.org/2541 Reviewed-by: Thomas Arnhold <thomas@arnhold.org> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2013-02-01logerrit: print logerrit help with --helpPetr Mladek1-1/+1
It printed help of the plain gerrit tool which always confused me :-) Change-Id: Ied81688ada4b536486d998709230fc24fa3c9b62
2012-08-22logerrit: --code-review=2 in review implies --submitMiklos Vajna1-1/+3
Change-Id: Ibd21dfdb76536ea0e0a71791a91ec87e31d49960
2012-08-14logerrit: Fix some typos.Tim Retout1-3/+3
Change-Id: I0d6f3f5521d32dad1ffaa8675d5f43c7d7fa7cea Reviewed-on: https://gerrit.libreoffice.org/409 Reviewed-by: Jean-Tiare Le Bigot <admin@jtlebi.fr> Reviewed-by: Tomáš Chvátal <tchvatal@suse.cz> Tested-by: Tomáš Chvátal <tchvatal@suse.cz>
2012-07-31add ./logerrit resubmitBjoern Michaelsen1-22/+37
resubmit creates a new Change-Id for the current change and thus allow to submit changes for review on release branches that were already reviewed on master. Also hint advanced users to 'git review' which requires some more setup, but should make things easier for regular users. Getting this functionality into 'git review' would be likely help adoption too -- and in python there is some sane errorchecking possible. Change-Id: Ibea6bbfe747af160728b838c6ee236fd8f89671d
2012-07-10check for uncommited work before executing a nextchangeBjoern Michaelsen1-0/+6
Change-Id: I12b03bb778da712cfe48543949d9634be5221419
2012-07-05logerrit: for review, we need to grep for revision, not refMiklos Vajna1-2/+6
Change-Id: I0fb8b1e4f14e153adae7a2ec1b3adbb0dab5c847
2012-07-05fix ./logerrit reviewBjoern Michaelsen1-1/+2
* ./logerrit review did not resolve the ChangeId to a SHA * ./logerrit did still echo the command instead of executing it. Change-Id: Ie4f8630f7a83134d6eb7992f4a61b5d3faf7e138
2012-06-29logerrit review: fix missing escaping, codereview -> code-reviewMiklos Vajna1-7/+7
Change-Id: Icf5facbb59cba2116ae3fc6bdfc035673cf47985
2012-06-26do not submit a change for now as that removes the ref on gerritBjoern Michaelsen1-2/+2
Change-Id: I699aad760823a8ccbfc7dc93bf0658b5222dff71
2012-06-21add helper script for gerrit CLI integrationBjoern Michaelsen1-0/+187
Change-Id: I5705530ee4d5b93bc66ca23463098ac45f49323d