From 34ba3b99e9f53ac316447c2b7095c8cd2f4657ac Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Aug 29 2016 08:30:57 +0000 Subject: [PATCH 1/6] Add manual page for compose-changelog Signed-off-by: Lubomír Sedlář --- diff --git a/doc/compose-changelog.1 b/doc/compose-changelog.1 new file mode 100644 index 0000000..b767d9f --- /dev/null +++ b/doc/compose-changelog.1 @@ -0,0 +1,35 @@ +.TH compose-changelog 1 +.SH NAME +compose-changelog \- show changes between two composes +.SH SYNOPSIS +.B compose-changelog +[\fIOPTIONS\fR...] +\fIOLD_COMPOSE\fR +\fINEW_COMPOSE\fR +.SH DESCRIPTION +.B compose-changelog +shows changes between two composes. It parses the metadata and checks RPMs +mentioned there. The results are saved in multiple files in current directory +(unless specified otherwise). +.P +The files have a name of \fIchangelog-NAME.SUFFIX\fR, where \fINAME\fR is by +default the compose ID of the new compose. The \fISUFFIX\fR marks what type of +file this is. The \fBbrief\fR file contains summary of the differences. The +\fBverbose\fR file contains all details in human readable form. The \fBjson\fR +file contains all details in JSON format. +.SH OPTIONS +.TP +.BR \-h ", " \-\-help +Print help and exit. +.TP +.BR \-p ", " \-\-path =\fIDIR\fR +Set directory in which to create the files. +.TP +.BR \-n ", " \-\-name =\fINAME\fR +Set custom identifier for the generated files. +.SH EXIT CODE +This tool always exits with status code of \fB0\fR. +.SH BUGS +Please report bugs at +.br +https://pagure.io/compose-utils/issues From bf126380186f20becad0fa6affc840e0b2d0bca5 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Aug 29 2016 08:55:18 +0000 Subject: [PATCH 2/6] Add man page for compose-list Signed-off-by: Lubomír Sedlář --- diff --git a/doc/compose-list.1 b/doc/compose-list.1 new file mode 100644 index 0000000..a719c75 --- /dev/null +++ b/doc/compose-list.1 @@ -0,0 +1,45 @@ +.TH compose-list 1 +.SH NAME +compose-list \- list and query composes in a directory +.SH SYNOPSIS +.B compose-list +[\fIOPTIONS\fR...] +\fIDIR\fR +.SH DESCRIPTION +.B compose-list +shows all composes in a directory and allows to query them based on different +attributes. +.P +Additionally, it can generate next compose ID that will be used. +.SH OPTIONS +.TP +.BR \-h ", " \-\-help +Print help and exit. +.TP +.BR \-\-short =\fISHORT_NAME\fR +Only work with composes from releases with this short name. +.TP +.BR \-\-name =\fINAME\fR +Only work with composes from releases with this name. +.TP +.BR \-\-ver =\fIVERSION\fR +Only work with composes from releases with this version. +.TP +.BR \-\-status =\fISTATUS\fR +Only work with composes with this status. +.TP +.BR \-\-precedes =\fICOMPOSE_ID\fR +Show which compose precedes the given one. +.TP +.BR \-\-next +Show next compose ID that will be used. +.P +If you have composes for multiple releases in the same directory, the last two +options will need filtering to only match composes for a single release. +.SH EXIT CODE +On success, this tools exits with status code of \fB0\fR. +On failure, the exit code will be \fB1\fR. +.SH BUGS +Please report bugs at +.br +https://pagure.io/compose-utils/issues From ab3427c5113adb98a6acbd093ad63d17250ddca8 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Aug 29 2016 09:06:24 +0000 Subject: [PATCH 3/6] Add man page for compose-partial-copy Signed-off-by: Lubomír Sedlář --- diff --git a/doc/compose-partial-copy.1 b/doc/compose-partial-copy.1 new file mode 100644 index 0000000..9a5947c --- /dev/null +++ b/doc/compose-partial-copy.1 @@ -0,0 +1,39 @@ +.TH compose-partial-copy 1 +.SH NAME +compose-partial-copy \- copy part of compose to another location +.SH SYNOPSIS +.B compose-partial-copy +[\fIOPTIONS\fR...] +\fICOMPOSE\fR +\fIDESTINATION\fR +.SH DESCRIPTION +.B compose-partial-copy +copies parts of compose to another location via \fIrsync\fR. You can specify +which variants and/or architectures you want to copy. Multiple invocations of +\fIrsync\fR may be used to achieve the desired result. +.P +Unrecognized arguments will be passed directly to \fIrsync\fR. +.SH OPTIONS +.TP +.BR \-h ", " \-\-help +Print help and exit. +.TP +.BR \-\-arch =\fIARCH\fR +Copy only this architecture. Can be used multiple times. +.TP +.BR \-\-variant =\fIVARIANT\fR +Copy only this variant. Can be used multiple times. +.TP +.BR \-n ", " \-\-dry-run +Only print \fIrsync\fR commands, do not copy anything. + +You can append \fI-- --dry-run\fR at the end of command line to pass the +dry-run option to rsync. In that case it will actually be called, but just +print some debugging information. +.SH EXIT CODE +This tool exits with status code of \fB0\fR on success and non-zero value on +failure. +.SH BUGS +Please report bugs at +.br +https://pagure.io/compose-utils/issues From c16bc1b2e8e8d5c72dba33d3dfd9756d91097103 Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Aug 29 2016 09:11:49 +0000 Subject: [PATCH 4/6] Add man page for compose-report-package-moves Signed-off-by: Lubomír Sedlář --- diff --git a/doc/compose-report-package-moves.1 b/doc/compose-report-package-moves.1 new file mode 100644 index 0000000..c5df8cf --- /dev/null +++ b/doc/compose-report-package-moves.1 @@ -0,0 +1,31 @@ +.TH compose-report-package-moves 1 +.SH NAME +compose-report-package-moves \- show changes between two composes +.SH SYNOPSIS +.B compose-report-package-moves +[\fIOPTIONS\fR...] +\fIOLD_COMPOSE\fR +\fINEW_COMPOSE\fR +.SH DESCRIPTION +.B compose-report-package-moves +detects and reports packages that have been moved between related variants. +Specifically, it is targetted at identifying situations when package moves from +Optional into the base variant or the other way around. +.P +By default, the results will be stored in JSON format in current directory. +There will be multiple files with different views of the data. +.SH OPTIONS +.TP +.BR \-h ", " \-\-help +Print help and exit. +.TP +.BR \-p ", " \-\-path =\fIDIR\fR +Set directory in which to create the files. +.TP +.BR \-n ", " \-\-name =\fINAME\fR +Set custom identifier for the generated files. Defaults to compose ID of new +compose. +.SH BUGS +Please report bugs at +.br +https://pagure.io/compose-utils/issues From c59cb92ccb4d18dd9d050dad9f431dfde103dc9b Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Aug 29 2016 09:48:57 +0000 Subject: [PATCH 5/6] Install man pages Signed-off-by: Lubomír Sedlář --- diff --git a/MANIFEST.in b/MANIFEST.in index 1f3a6a3..c6f07d1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -11,3 +11,4 @@ recursive-include tests/composes/*/compose/metadata *.json recursive-include tests/composes *.rpm include tests/*.py include tests/move-report.json +include doc/*.1 diff --git a/setup.py b/setup.py index b2183ea..8aaef3e 100644 --- a/setup.py +++ b/setup.py @@ -24,6 +24,14 @@ setup( 'productmd>=1.0', 'kobo', ], + data_files=[ + ('share/man/man1', [ + 'doc/compose-list.1', + 'doc/compose-partial-copy.1', + 'doc/compose-report-package-moves.1', + 'doc/compose-changelog.1', + ]), + ], include_package_data=True, test_suite='nose.collector', ) From aaa4fcf8f8b3415d9235fbc2c2d0303db48153ff Mon Sep 17 00:00:00 2001 From: Lubomír Sedlář Date: Aug 29 2016 10:05:51 +0000 Subject: [PATCH 6/6] Add explicit test dependencies Unfortunately this still is not enough to run completely in virtualenv as kobo will pull in koji and a lot of other deps. Signed-off-by: Lubomír Sedlář --- diff --git a/setup.py b/setup.py index 8aaef3e..4feebe0 100644 --- a/setup.py +++ b/setup.py @@ -34,4 +34,9 @@ setup( ], include_package_data=True, test_suite='nose.collector', + tests_require=[ + 'nose', + 'mock', + 'freezegun', + ], )