File: gcli-tutorial.1.in

package info (click to toggle)
gcli 2.9.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,476 kB
  • sloc: ansic: 25,411; sh: 580; makefile: 509; yacc: 261; lex: 59
file content (853 lines) | stat: -rw-r--r-- 21,690 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
.\" -*- mode: troff; coding: utf-8 -*-
Tutorial of GCLI - Generated Offline Version of https://herrhotzenplotz.de/gcli/tutorial
.TH "gcli-tutorial" "1" "04-Oct-2025"
.SH Installing GCLI
.SS
Through package manager
.LP
If you\(cqre on FreeBSD you can just install gcli by running the
following command:
.LP
.EX
# pkg install gcli
.EE
.PP
On NetBSD you can run:
.LP
.EX
# pkgin install gcli
.EE
.PP
On Ubuntu, Debian, Devuan and the like you can run:
.LP
.EX
# apt install gcli
.EE
.PP
On ArchLinux you can either use the AUR manually or use your favourite AUR helper:
.LP
.EX
# yay -S gcli
.EE
.SS
Compile the source code
.LP
Other operating systems may currently require manual compilation and installation.
.SS
Windows NT Notes
.LP
It is entirely possible to build gcli on Windows using
.UR https://msys2.org
MSYS2
.UE \c
\&. Please follow their instructions on
how to set up a development environment.
.SS
Generic build instructions
.LP
For this purpose go to
.UR https://herrhotzenplotz.de/gcli/releases
https://herrhotzenplotz.de/gcli/releases
.UE
and choose the latest release. Then download one of the tarballs.
.PP
For version 1.1.0 this would be:
.PP
.UR https://herrhotzenplotz.de/gcli/releases/gcli-1.1.0/gcli-1.1.0.tar.xz
.UE
.PP
Now that you have a link, you can download it, extract it, compile the
code and install it:
.LP
.EX
$ mkdir \(ti/build
$ cd \(ti/build
$ curl -4LO https://herrhotzenplotz.de/gcli/releases/gcli-1.1.0/gcli-1.1.0.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  342k  100  342k    0     0  2739k      0 --:--:-- --:--:-- --:--:-- 2736k
$ ls
gcli-1.1.0.tar.xz
$
.EE
.PP
Install the dependencies for building gcli:
.PP
e.g. on Debian systems:
.LP
.EX
# apt install libcurl4-openssl-dev pkgconf build-essential
.EE
.PP
or on MSYS2:
.LP
.EX
$ pacman -S libcurl-devel pkgconf
.EE
.PP
Extract the tarball:
.LP
.EX
$ tar xf gcli-1.1.0.tar.xz
$ cd gcli-1.1.0
.EE
.PP
Configure, build and install gcli:
.LP
.EX
$ ./configure
\&...
$ make
\&...
$ make install
.EE
.PP
Check that the shell finds gcli:
.LP
.EX
$ which gcli
/usr/local/bin/gcli
$
$ gcli version
gcli 1.1.0 (amd64-unknown-freebsd13.2)
Using libcurl/8.1.2 OpenSSL/1.1.1t zlib/1.2.13 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.11.0 nghttp2/1.53.0
Using vendored pdjson library
Report bugs at https://gitlab.com/herrhotzenplotz/gcli/.
Copyright 2021, 2022, 2023 Nico Sonack <nsonack@herrhotzenplotz.de> and contributors.
$
.EE
.SS
Advanced Windows Environment Setup
.LP
In case you want to use the installed gcli from outside MSYS2 (e.g.
in cmd.exe) you may wish to update the \f(CRPath\fR environment variable
and add the \f(CRC:\emsys2\eusr\ebin\fR directory to it. Make sure you have
the library paths set up correctly.
.SH First steps
.SS
Listing issues
.LP
Let\(cqs start off by listing some issues - here for the curl project
which is hosted on GitHub under \f(CRcurl/curl\fR. To list issues for it one
would run:
.LP
.EX
$ gcli -t github issues -o curl -r curl
.EE
.PP
You will see the list of the 30 most recent open issue tickets. The
command above does the following:
.IP "\(bu" 3
invoke gcli
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
as a global option we switch it into GitHub-Mode
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
invoke the issues subcommand
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
operate on the repository owner curl (\f(CR-o curl\fR)
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
operate on the repository curl (\f(CR-r curl\fR)
.LP
Note that the \f(CR-t github\fR option goes before the issues subcommand
because it is a global option for gcli that affects how all the
following things like subcommands operate.
.PP
However, now I also want to see closed issues:
.LP
.EX
$ gcli -t github issues -o curl -r curl -a
.EE
.PP
The \f(CR-a\fR option will disregard the status of the issue.
.PP
Oh and the screen is a bit cluttered by all these tickets - let\(cqs only
fetch the first 10 issues:
.LP
.EX
$ gcli -t github issues -o curl -r curl -n10
.EE
.SS
Searching for issues
.LP
Before reporting a bug or looking for solutions to a problem that
you found in a program you may want to search for issues.
.PP
Let\(cqs search for \f(CRavast\fR in \f(CRcurl/curl\fR:
.LP
.EX
$ gcli -t github issues -o curl -r curl -a avast
NUMBER  NOTES  STATE   TITLE
 11383      9  open    Issue with FileZilla server (GnuTLS) and close_notify
 10551      7  closed  Unable to use curl 7.87 for SSL connections on Windows 10 Pro
  8848      2  closed  CURL SSL certificate problem when AVAST HTTPS scanning enabled
$
.EE
.PP
As you can see searching for something is just a matter of appending
keywords to the \f(CRissues\fR subcommand. You can specify any amount of
search terms - they will all be used in the query. Again, \f(CR-a\fR
ignores the status of the issue such that we also see closed tickets.
.SS
Examining issues
.LP
As of now we only produced lists of issues. However, we may also want
to look at the details of an issue such as:
.IP "\(bu" 3
the original post
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
labels
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
comments
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
assignees of the issue (that is someone who is working on the bug)
.LP
Let\(cqs get a good summary of issue \f(CR#11268\fR in the curl project:
.LP
.EX
$ gcli -t github issues -o curl -r curl -i 11268 all
.EE
.PP
As you can see most of the options are the same, however now we tell
gcli with the \f(CR-i 11268\fR option that we want to work with a single
issue. Then we tell gcli what actions to perform on the issue. Another
important action is \f(CRcomments\fR. Guess what it does:
.LP
.EX
$ gcli -t github issues -o curl -r curl -i 11268 comments
.EE
.PP
I know a person that likes to post long verbose traces. Let\(cqs search
for an issue authored by them on the OpenSSL GitHub page:
.LP
.EX
$ gcli -t github issues -o openssl -r openssl -A blastwave -a
NUMBER  STATE   TITLE
 20379  open    test \(dq80-test_ssl_new.t\(dq fails on Solaris 10 SPARCv9
 10547  open    Strict C90 CFLAGS results in sha.h:91 ISO C90 does not support long long
  8048  closed  OPENSSL_strnlen SIGSEGV in o_str.c line 76
$
.EE
.PP
The \f(CR-A\fR option lets you filter for specific authors.
.PP
Let\(cqs look at the issue state of \f(CR#10547\fR:
.LP
.EX
$ gcli -t github issues -o openssl -r openssl -i 10547 status
     NAME : 10547
    TITLE : Strict C90 CFLAGS results in sha.h:91 ISO C90 does not support long long
  CREATED : 2019-12-01T04:35:23Z
   AUTHOR : blastwave
    STATE : open
 COMMENTS : 9
   LOCKED : no
   LABELS : triaged: bug
ASSIGNEES : none
$
.EE
.PP
That\(cqs nine comments - let\(cqs read the original post and the comments
in our favourite pager \f(CRless\fR:
.LP
.EX
$ gcli -t github issues -o openssl -r openssl -i 10547 op comments | less
.EE
.PP
As you can see gcli will accept multiple actions for an issue and
executes them sequentially.
.SH How to find documentation
.LP
When using gcli one may not always remember all the options and flags
for every subcommand. gcli has lots of integrated help to guide you
through its commands.
.SS
Subcommand help
.LP
You can list all available options for the issues subcommand by doing:
.LP
.EX
$ gcli issues --help
.EE
.PP
With your current knowledge you can also explore the \f(CRgcli pulls\fR subcommand.
.SS
General usage
.LP
Run the following command:
.LP
.EX
$ gcli --help
usage: gcli [options] subcommand

OPTIONS:
  -a account     Use the configured account instead of inferring it
  -r remote      Infer account from the given git remote
  -t type        Force the account type:
                    - github (default: github.com)
                    - gitlab (default: gitlab.com)
                    - gitea (default: codeberg.org)
  -c             Force colour and text formatting.
  -q             Be quiet. (Not implemented yet)

  -v             Be verbose.

SUBCOMMANDS:
  ci             Github CI status info
  comment        Comment under issues and PRs
  config         Configure forges
  forks          Create, delete and list repository forks
  gists          Create, fetch and list Github Gists
  issues         Manage issues
  labels         Manage issue and PR labels
  milestones     Milestone handling
  pipelines      Gitlab CI management
  pulls          Create, view and manage PRs
  releases       Manage releases of repositories
  repos          Remote Repository management
  snippets       Fetch and list Gitlab snippets
  status         General user status and notifications
  api            Fetch plain JSON info from an API (for debugging purposes)
  version        Print version

gcli 1.2.0 (amd64-unknown-freebsd13.2)
Using libcurl/8.1.2 OpenSSL/1.1.1t zlib/1.2.13 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.11.0 nghttp2/1.53.0
Using vendored pdjson library
Report bugs at https://gitlab.com/herrhotzenplotz/gcli/.
Copyright 2021, 2022, 2023 Nico Sonack <nsonack@herrhotzenplotz.de> and contributors.
.EE
.PP
This gives you an overview over all the available subcommands. Each
subcommand in turn allows you to get its usage by supplying the
\f(CR--help\fR option to it.
.SS
Manual pages
.LP
Furthermore I recommend reading into the manual page \f(CRgcli-issues(1)\fR
and \f(CRgcli-pulls(1)\fR:
.LP
.EX
$ man gcli-issues
$ man gcli-pulls
.EE
.SH Setting up gcli for use with an account
.LP
Creating issues on GitHub requires an account which we need to
generate an authentication token for gcli.
.PP
If you want to test this with a different forge than GitHub look at \c
.UR ./08-Other-forges.html
the tutorial for other forges
.UE \c
\&.
.PP
Log into your GitHub account and click on your account icon in the top
right corner. Then choose the \f(CRSettings\fR option. Scroll down and
choose \f(CRDeveloper settings\fR on the bottom of the left column. Under
\f(CRPersonal access tokens\fR choose \f(CRTokens (classic)\fR.
.PP
Click on \f(CRGenerate new token (classic)\fR.
.PP
Set a useful name such as \f(CRgcli\fR in the Note field, set the expiration
to \f(CRNo expiration\fR and allow the following \f(CRScopes\fR:
.IP "\(bu" 3
\f(CRrepo\fR
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
\f(CRworkflow\fR
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
\f(CRadmin:public_key\fR
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
\f(CRgist\fR
.LP
Then create the token. It\(cqll be printed in green. Do not share it!
.PP
Now we need to tell gcli about this new token. To do this, create
a configuration file for gcli - on Windows you need to do this from
the MSYS2 Shell:
.LP
.EX
$ mkdir -p ${HOME}/.config/gcli
$ vi ${HOME}/.config/gcli/config
.EE
.PP
Obviously, you can choose any other editor of your choice. Put the
following into this file:
.LP
.EX
defaults {
    editor=vi
    github-default-account=my-github-account
}

my-github-account {
    token=<token-goes-here>
    account=<account-name>
    forge-type=github
}
.EE
.PP
Replace the \f(CR<token-goes-here>\fR with the previously generated token
and the \f(CR<account>\fR with your account name.
.PP
If you now run
.LP
.EX
$ gcli -t github repos
.EE
.PP
you should get a list of your repos. If not, check again that you did
all the steps above correctly.
.SH Creating an issue
.LP
\fBNote\fR: This assumes you have \c
.UR ./04-Account-Setup.html
configured gcli with an account
.UE
for GitHub already.
.SS
Preparation
.LP
For this case I have a playground repository that you may as well use
for testing with gcli. It is available at
\f(CRherrhotzenplotz/ghcli-playground\fR.
.PP
To see a list of issues, we can run:
.LP
.EX
$ gcli -t github issues -o herrhotzenplotz -r ghcli-playground -a
NUMBER  NOTES  STATE   TITLE
    13      0  open    yet another issue
    12      0  closed  wat
    11      0  closed  blaaaaaaaaaaaaaaaaaaaah
    10      0  closed  \(dqthis is the quoted\(dq issue title? anyone?\(dq
     9      0  closed  test
     8      0  closed  foobar
     7      0  closed  foobar
     5      0  closed  test2
     4      0  closed  test
$
.EE
.SS
Invoke gcli
.LP
Let\(cqs create a bug report where we complain about things not working:
.LP
.EX
$ gcli -t github issues create -o herrhotzenplotz -r ghcli-playground \e
    \(dqBug: Doesn't work on my machine\(dq
.EE
.PP
The message \(lqBug: doesn\(cqt work on my machine\(rq is the title of the
issue.
.SS
Original Post
.LP
You will see the default editor come up and instruct you to type in a
message. This message is the \(lqoriginal post\(rq or the body of the issue
ticket that you\(cqre about to submit. You can use Markdown Syntax:
.LP
.EX
 I tried building this code on my machine but unfortunately it errors
 out with the following message:

 \(ga\(ga\(gaconsole
 $ make love
 make: don't know how to make love. Stop

 make: stopped in /tmp/wat
 $
 \(ga\(ga\(ga

 What am I doing wrong?

 ! ISSUE TITLE : Bug: Doesn't work on my machine
 ! Enter issue description above.
 ! All lines starting with '!' will be discarded.
.EE
.SS
Submit the issue
.LP
After you save and exit the editor gcli gives you a chance to check
back and finally submit the issue. Type \(oqy\(cq and hit enter.
.PP
You can check back if the issue was created and also view details
about it as you learned earlier.
.SH Commenting
.LP
Discussions on GitHub and the like are done through comments. You can
comment on issues and pull requests.
.SS
Reviewing a discussion
.LP
Say you were looking at an issue in curl/curl:
.LP
.EX
$ gcli issues -o curl -r curl -i 11461 comments
.EE
.SS
Create the comment
.LP
And now you wish to respond to this thread:
.LP
.EX
$ gcli comment -o curl -r curl -i 11461
.EE
.PP
This will now open the editor and lets you type in your message.
After saving and exiting gcli will ask you to confirm. Type \(oqy\(cq and
hit enter:
.LP
.EX
$ gcli -t github comment -o curl -r curl -i 11461
You will be commenting the following in curl/curl #11461:

Is this okay? [yN] y
$
.EE
.SS
Commenting on pull requests
.LP
When you want to comment under a pull request use the \f(CR-p\fR flag
instead of the \f(CR-i\fR flag to indicate the PR number.
.SH Creating a pull request
.LP
Creating a pull request with gcli is usually as simple as running
.LP
.EX
$ gcli pulls create
.EE
.SS
Preparation
.LP
Suppose you have a git repository forked and cloned:
.LP
.EX
$ git clone git@github.com:contour-terminal/contour
$ cd contour
$ gcli forks create --into herrhotzenplotz
.EE
.PP
Then you do some work on whatever feature you\(cqre planning to submit:
.LP
.EX
$ git checkout -b my-amazing-feature
<hackhackhack>
$ git add -p
$ git commit
.EE
.SS
Push your changes
.LP
You then push your changes to your fork:
.LP
.EX
$ git push origin my-amazing-feature
.EE
.SS
Create the pull request
.LP
Now you can run the command to create the pull request:
.LP
.EX
$ gcli pulls create
From (owner:branch) [herrhotzenplotz:my-amazing-feature]:
Owner [contour-terminal]:
Repository [contour]:
To Branch [master]:
Title: Add new amazing feature
Enable automerge? [yN]:
.EE
.PP
Most of the defaults you should be able to simply accept. This
assumes that you have the source branch checked out locally and
remotes are configured appropriately.
.PP
Otherwise you can just change the defaults by entering the correct
values.
.SS
Enter original post
.LP
After you entered all the meta data of the pull request gcli will
drop you into your editor and lets you enter a message for the pull
request.
.SS
Submit
.LP
After you saved and exit type \f(CRy\fR and hit enter to submit the pull
request.
.SH Other forges and bugtrackers
.LP
gcli is capable of not only interacting with Github. It also currently supports:
.IP "\(bu" 3
GitLab
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
Gitea
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
Bugzilla
.SS
Bugzilla
.SS
Notes
.LP
Bugzilla is commonly used as a bug tracker in various large open-source
projects such as FreeBSD, the Linux Kernel, Mozilla and Gentoo.
.SS
Searching
.LP
Suppose you want to search for bug reports containing \f(CRsparc\fR in
the Gentoo Bugzilla.
.PP
In this case you need to configure an account that points at the
correct URL in \f(CR$HOME/.config/gcli/config\fR by adding:
.LP
.EX
gentoo {
    forge-type=bugzilla
    api-base=https://bugs.gentoo.org/
}
.EE
.PP
Now you can search the Gentoo Bugs:
.LP
.EX
$ gcli -a gentoo issues sparc
NUMBER  NOTES  STATE        TITLE
924443      0  UNCONFIRMED  Add keyword \(tisparc for app-misc/fastfetch
924430      0  RESOLVED     media-libs/assimp-5.3.1 fails tests on sparc
924215      0  CONFIRMED    dev-libs/libbson dev-libs/mongo-c-driver: alpha arm ia64 mips ppc ppc64 s390 sparc keyword req
924191      0  CONFIRMED    media-libs/exempi: unaligned access causes dev-python/python-xmp-toolkit-2.0.2 to fails tests on sparc (test_file_to_dict (test.test_core_unit.UtilsTestCase.test_file_to_dict) ... Bus error)
924180      0  CONFIRMED    dev-python/psycopg-3.1.17[native-extensions] fails tests on sparc: tests/test_copy_async.py::test_read_rows[asyncio-names-1] Fatal Python error: Bus error
924031      0  IN_PROGRESS  sys-apps/bfs: \(tiarm \(tiarm64 \(tippc \(tippc64 \(tisparc keywording
923968      0  CONFIRMED    dev-python/pyarrow-15.0.0 fails to configure on sparc: CMake Error at cmake_modules/SetupCxxFlags.cmake:42 (message): Unknown system processor
921245      0  CONFIRMED    media-video/rav1e-0.6.6 fails to compile on sparc: Assertion \(gaDT.dominates(RHead, LHead) && \(dqNo dominance between recurrences used by one SCEV?\(dq' failed.
920956      0  CONFIRMED    dev-python/pygame-2.5.2: pygame.tests.font_test SIGBUS on sparc
920737      0  CONFIRMED    sparc64-solaris Prefix no longer supported

<snip>
.EE
.SS
Issue details
.LP
Furthermore we can look at single issues:
.LP
.EX
$ gcli -a gentoo issues -i 920737 all comments
   NUMBER : 920737
    TITLE : sparc64-solaris Prefix no longer supported
  CREATED : 2023-12-26T19:20:58Z
  PRODUCT : Gentoo Linux
COMPONENT : Profiles
   AUTHOR : Tom Williams
    STATE : CONFIRMED
   LABELS : none
ASSIGNEES : prefix

ORIGINAL POST

    Resurrecting a Prefix install on Solaris 11.4 SPARC. It was working rather well
    for me; after a hiatus I had hoped to use it again but my first emerge --sync
    has removed the profile needed to merge any updates or new packages.

    I note commit 8e006b67e06a19fae10c6059c7fc5ede88834601 in May 2023 removed the
    profile and keywording for prefixed installs.

    There is no associated comment. There doesn't seem to be a bug report in regards
    to the change (I'm quite sure almost nobody uses it, so probably fair enough)

    Any easy way to restore the profile for now? Eventually Solaris/SPARC and thus
    Prefix will be gone anyway, but useful for now.

    Thanks for your continued efforts.
AUTHOR : sam
DATE   : 2023-12-26T19:21:33Z
         I think at the very least, when removing Prefix support in future, a 'deprecated'
         file should be added to the relevant profiles asking if anyone is using
         it to step forward.

AUTHOR : grobian
DATE   : 2023-12-26T22:58:12Z
         Solaris 11.4 itself is a problem.  I doubt you ever had it \(dqworking\(dq.

AUTHOR : grobian
DATE   : 2023-12-26T22:59:57Z
         Linux sparc team is not relevant here

$
.EE
.SS
GitLab
.SS
Configuring an account for use with a token
.LP
First you need to generate a token:
.IP "1." 3
Click on your avatar in the top left corner
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "2." 3
Choose Preferences in the popup menu
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "3." 3
Select \f(CRAccess tokens\fR in the preference menu
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "4." 3
Click the \f(CRAdd new token\fR button
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "5." 3
Choose some reasonable values
.RS
.IP "\(bu" 3
The token name can be your hostname e.g. \f(CRgcli $(hostname)\fR
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
Clear the expiration date. It will be defaulted to some high value by GitLab.
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "\(bu" 3
Select the \f(CRapi\fR scope
.RE
.LP
Now click \f(CRCreate personal access token\fR. Save this token - \fBdo not share it with anyone else\fR.
.PP
You can now update your gcli config in \f(CR$HOME/.config/gcli/config\fR:
.LP
.EX
defaults {
    gitlab-default-account=gitlab-com
    ...
}

gitlab-com {
    account=<your-username-at-gitlab>
    token=<the-token-you-just-created>
    forge-type=gitlab
}
.EE
.PP
After that you should be able to run the following command:
.LP
.EX
$ gcli -t gitlab issues -o herrhotzenplotz -r gcli
.EE
.PP
If this process errors out check the above steps. If you believe
this is a bug, please report it at our issue tracker!
.SS
Gitea
.LP
The steps here are roughly the same as with GitLab.
.PP
To generate a token:
.IP "1." 3
Click your avatar in the top-right corner
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "2." 3
Choose \f(CRSettings\fR in the popup menu
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "3." 3
Select \f(CRApplications\fR in the menu on the left
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "4." 3
Under \f(CRGenerate new token\fR enter a reasonable token name
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "5." 3
Click the \f(CRGenerate token\fR button
.if n \
.sp -1
.if t \
.sp -0.25v
.IP "6." 3
Save the token - \fBdo not share it with anyone else\fR.
.LP
You can now update your gcli config file in \f(CR$HOME/.config/gcli/config\fR:
.LP
.EX
defaults {
    gitea-default-account=codeberg-org
    ...
}

codeberg-org {
    account=<your-username-at-gitea>
    token=<the-token-you-just-created>
    forge-type=gitea
    api-base=https://codeberg.org/api/v1
}
.EE
.PP
The example here uses Codeberg. Update these fields as needed for your own use case.