#927 Adding cheat for copr
Merged 3 months ago by praiskup. Opened 3 months ago by schlupov.
copr/ schlupov/copr cheat  into  master

Adding cheat for copr
Silvie Chlupova • 3 months ago  
file modified
+6

@@ -96,6 +96,9 @@ 

  install -d %{buildroot}%{_mandir}/man1

  install -p -m 644 man/copr-cli.1 %{buildroot}/%{_mandir}/man1/

  install -p man/copr.1 %{buildroot}/%{_mandir}/man1/

+ install -d %{buildroot}%{_datadir}/cheat

+ cp -a man/copr-cli.cheat %{buildroot}%{_datadir}/cheat/copr-cli

+ ln -s %{_datadir}/cheat/copr-cli %{buildroot}%{_datadir}/cheat/copr

  

  

  %check

@@ -110,6 +113,9 @@ 

  %{_bindir}/copr-cli

  %{_mandir}/man1/copr-cli.1*

  %{_mandir}/man1/copr.1*

+ %dir %{_datadir}/cheat

+ %{_datadir}/cheat/copr-cli

+ %{_datadir}/cheat/copr

  %{python_sitelib}/*

  

  

@@ -0,0 +1,29 @@ 

+ # to create a new project called test-project

+ copr-cli create --chroot fedora-28-i386 --chroot fedora-28-x86_64 test-project

+ 

+ # to build from url

+ copr-cli build test-project http://www.example.com/package-1.6-1.fc28.src.rpm

+ 

+ # to build directly using saved srpm

+ copr-cli build test-project ~/packages/package-1.6-1.fc28.src.rpm

+ 

+ # to enable your repository

+ sudo dnf copr enable your_name/test-project

+ 

+ # to disable your repository

+ sudo dnf copr disable your_name/test-project

+ 

+ # to see status of build

+ copr-cli status <build_id>

+ 

+ # to delete a build

+ copr delete-build <build_id>

+ 

+ # to list packages in test-project

+ copr list-packages test-project

+ 

+ # to cancel a build

+ copr-cli cancel <build_id>

+ 

+ # to build rpm(s) from GIT

+ copr-cli buildscm test-project --clone-url https://pagure.io/copr/copr.git --subdir cli

I'd prefer to drop -f here, no need to override a file which could potentially exist (failure is better).

consider adding newline here

Looks good to me. I would add some example for SCM method, though.

Something like:

copr-cli buildscm test-project --clone-url https://example.com/foo.git

since we don't plan to depend on chat package, we should co-own the %_datadir/chat directory as well: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_file_and_directory_ownership

I like this as well (even though I haven't used cheat so far..), thank you for the patch!

I agree with Jakub that scm method example would be awesome; Ideally something more complete which would really work -- e.g. some of our packages (copr-cli?) -- so people can take it and try.

rebased onto b9d88a7c78d894fb0d393d6cbabd6222fcc7abc8

3 months ago

rebased onto 84d56f0011549afa08fa08c4715d33e47c47cc03

3 months ago

rebased onto 89aba14f911aa9fd5f601d2fe42901d40868d3c4

3 months ago

Can we add --spec and --subdir args, so this is going to be working command?

rebased onto 049cfdbc7ee848de5fa0b1d6467165243ad81044

3 months ago

rebased onto a1d2b02

3 months ago

Pull-Request has been merged by praiskup

3 months ago