fbrnch/fbrnch.spec

440 lines
18 KiB
RPMSpec

# generated by cabal-rpm-2.1.0 --stream hackage --subpackage
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Haskell/
%if %{defined el9}
%bcond_without ghc_prof
%endif
%global bodhi bodhi-0.1.0
%global cachedjsonfile cached-json-file-0.1.1
%global coprapi copr-api-0.1.0
%global fedoradists fedora-dists-2.1.1
%global pagure pagure-0.1.1
%global pdc pdc-0.1.1
%global simpleprompt simple-prompt-0.2.0.1
%global subpkgs %{bodhi} %{coprapi} %{cachedjsonfile} %{pdc} %{fedoradists} %{pagure} %{simpleprompt}
Name: fbrnch
Version: 1.3.2
# can only be reset when all subpkgs bumped
Release: 11%{?dist}
Summary: Fedora packager tool to build package branches
# bodhi-hs, pdc-hs: MIT
# copr-api, fedora-dists: GPLv3+
# fbrnch, pagure-hs: GPLv2+
# simple-prompt: BSD3
License: GPL-2.0-or-later and MIT and GPL-3.0-or-later and BSD-3-Clause
Url: https://hackage.haskell.org/package/%{name}
# Begin cabal-rpm sources:
Source0: https://hackage.haskell.org/package/%{name}-%{version}/%{name}-%{version}.tar.gz
Source1: https://hackage.haskell.org/package/%{bodhi}/%{bodhi}.tar.gz
Source2: https://hackage.haskell.org/package/%{cachedjsonfile}/%{cachedjsonfile}.tar.gz
Source3: https://hackage.haskell.org/package/%{coprapi}/%{coprapi}.tar.gz
Source4: https://hackage.haskell.org/package/%{fedoradists}/%{fedoradists}.tar.gz
Source5: https://hackage.haskell.org/package/%{pagure}/%{pagure}.tar.gz
Source6: https://hackage.haskell.org/package/%{pdc}/%{pdc}.tar.gz
Source7: https://hackage.haskell.org/package/%{simpleprompt}/%{simpleprompt}.tar.gz
# End cabal-rpm sources
# Begin cabal-rpm deps:
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-rpm-macros-extra
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-async-devel
BuildRequires: ghc-base-devel
#BuildRequires: ghc-bodhi-devel
BuildRequires: ghc-bugzilla-redhat-devel
BuildRequires: ghc-bytestring-devel
BuildRequires: ghc-config-ini-devel
#BuildRequires: ghc-copr-api-devel
BuildRequires: ghc-directory-devel
BuildRequires: ghc-email-validate-devel
BuildRequires: ghc-extra-devel
#BuildRequires: ghc-fedora-dists-devel
BuildRequires: ghc-filepath-devel
BuildRequires: ghc-http-conduit-devel
BuildRequires: ghc-http-directory-devel
BuildRequires: ghc-http-query-devel
BuildRequires: ghc-koji-devel
BuildRequires: ghc-network-uri-devel
#BuildRequires: ghc-pagure-devel
BuildRequires: ghc-pretty-terminal-devel
BuildRequires: ghc-process-devel
BuildRequires: ghc-rpm-nvr-devel
BuildRequires: ghc-rpmbuild-order-devel
BuildRequires: ghc-simple-cmd-devel
BuildRequires: ghc-simple-cmd-args-devel
#BuildRequires: ghc-simple-prompt-devel
BuildRequires: ghc-text-devel
BuildRequires: ghc-time-devel
BuildRequires: ghc-typed-process-devel
BuildRequires: ghc-unix-devel
BuildRequires: ghc-utf8-string-devel
BuildRequires: ghc-xdg-basedir-devel
# for missing dep 'copr-api':
BuildRequires: ghc-unordered-containers-devel
%if %{with ghc_prof}
BuildRequires: ghc-unordered-containers-prof
%endif
# for missing dep 'simple-prompt':
BuildRequires: ghc-exceptions-devel
BuildRequires: ghc-haskeline-devel
%if %{with ghc_prof}
BuildRequires: ghc-exceptions-prof
BuildRequires: ghc-haskeline-prof
%endif
# End cabal-rpm deps
# for missing dep 'bodhi'/'copr-api'/'pagure'/'pdc'
BuildRequires: ghc-aeson-devel
BuildRequires: ghc-http-query-devel
BuildRequires: ghc-time-devel
%if %{with ghc_prof}
BuildRequires: ghc-aeson-prof
BuildRequires: ghc-http-query-prof
BuildRequires: ghc-time-prof
%endif
# for missing dep 'cached-json-file'
BuildRequires: ghc-xdg-basedir-devel
%if %{with ghc_prof}
BuildRequires: ghc-xdg-basedir-prof
%endif
# for missing dep 'simple-prompt'
BuildRequires: ghc-extra-devel
%if %{with ghc_prof}
BuildRequires: ghc-extra-prof
%endif
# manpage
BuildRequires: help2man
Requires: bodhi-client
Requires: curl
%if %{defined fedora}
Requires: fedora-packager-kerberos
%endif
Requires: fedpkg
Requires: git-core
Requires: koji
Requires: openssh-clients
Requires: rpm-build
Requires: rpmdevtools
Recommends: copr-cli
Recommends: fedora-review
Recommends: rpmautospec
%description
Fbrnch (fedora branch) is a convenient packaging tool for Fedora Packagers,
with integration for Bugzilla, Koji, and Bodhi.
Features include:
- merging and building a package across release branches
- automated parallel builds of sets of packages in dependency order
- creating, updating and listing one's package reviews
- requesting repos for new approved packages and branch requests
- import srpms from package reviews
- progressive copr builds
and many more commands.
%global main_version %{version}
%if %{defined ghclibdir}
%ghc_lib_subpackage -l MIT %{bodhi}
%ghc_lib_subpackage -l BSD %{cachedjsonfile}
%ghc_lib_subpackage -l GPL-3.0-or-later %{coprapi}
%ghc_lib_subpackage -l GPL-3.0-or-later %{fedoradists}
%ghc_lib_subpackage -l GPL-2.0-or-later %{pagure}
%ghc_lib_subpackage -l MIT %{pdc}
%ghc_lib_subpackage -l BSD-3-Clause %{simpleprompt}
%endif
%global version %{main_version}
%prep
# Begin cabal-rpm setup:
%setup -q -a1 -a2 -a3 -a4 -a5 -a6 -a7
# End cabal-rpm setup
%build
# Begin cabal-rpm build:
%ghc_libs_build %{subpkgs}
%ghc_bin_build
# End cabal-rpm build
%install
# Begin cabal-rpm install
%ghc_libs_install %{subpkgs}
%ghc_bin_install
mkdir -p %{buildroot}%{_datadir}/bash-completion/completions/
%{buildroot}%{_bindir}/%{name} --bash-completion-script %{name} | sed s/filenames/default/ > %{buildroot}%{_datadir}/bash-completion/completions/%{name}
# End cabal-rpm install
help2man --no-info %{buildroot}%{_bindir}/%{name} > %{name}.man
install -pm 644 -D %{name}.man %{buildroot}%{_mandir}/man1/%{name}.1
%files
# Begin cabal-rpm files:
%license LICENSE
%doc CHANGELOG.md README.md
%{_bindir}/%{name}
%{_datadir}/bash-completion/completions/%{name}
# End cabal-rpm files
%{_mandir}/man1/%{name}.1*
%changelog
* Tue May 30 2023 Jens Petersen <petersen@redhat.com> - 1.3.2-11
- https://hackage.haskell.org/package/fbrnch-1.3.2/changelog :
- prompts now support line-editing thanks to simple-prompt-0.2 using haskeline
- 'parallel', 'sort', 'graph': use getDynSourcesMacros
- 'parallel': include no of layers in "more package layers" message
- 'parallel': output sidetag
- 'prep': default to --nodeps
- 'request-branches': output owners (to ask) if no permission
- 'request-branches': committers can also request branches
- 'scratch': print target for srpm build (only)
- 'src-deps': add --define 'MACRO DEF'
- 'update-version': munch spectool patch filenames too
- Bodhi only accepts update notes <= 10000 characters now
- Git refPrompt: also accept y/yes
- Koji targetMaybeSidetag dryrun: do not append "-dryrun" to buildtag
- Merge: newline after local commits
- Package cleanChangelog: append a newline
- https://hackage.haskell.org/package/fbrnch-1.3.1/changelog :
- check for autorelease more carefully
- buildRequires: fix dynamic BRs with getSources and space after %_srcrpmdir
(reported by kiilerix)
* Sat Apr 8 2023 Jens Petersen <petersen@redhat.com> - 1.3-10
- new 'autospec' command converts packages to use rpmautospec
- new 'move-artifacts' command moves rpmbuild artifacts into dirs (--delete)
- new 'srpm-spec' command shows or diffs srpm specfiles
- new 'unpushed' command shows unpushed commits; and --latest option
- new 'bzusers' command searches users in bugzilla
- 'build': check for Bodhi update before koji tags
- 'build': do not repeat header when merging
- 'build': improve logic and prompt for unpushed check
- 'bump': add --changelog override and handle autorelease
- 'copr': intersperse newlines between packages
- 'diff': --debug option to print package header
- 'diff': handle missing and non-release branches
- 'install': add --ignore-builddeps (for existing built rpms)
- 'install': ignore dead.package's
- 'install': show dnf commands with sudoLog and cmdN sudo
- 'merge': --no-fetch option
- 'mock': add --arch option
- 'mock': new --shell-only option which skips build
- 'override': default to ./ when no pkg path given
- 'parallel': if single layer, don't output layer no
- 'parallel': improve sidetag update transition messages, now waits 90s
- 'parallel': output tweaks for more packages/layers and existing nvr
- 'parallel': prompt whether to continue after failure
- 'parallel': reverse the package order for update changelog
- 'parallel': be quieter when many parallel packages
- 'push': --no-fetch option and also print header
- 'push': allow specifying a ref
- 'rename-rawhide': now pulls to get latest
- 'scratch': add --srpm option to build existing srpm
- 'status': add pkg/branch prefix before latest log
- Bugzilla: update checkRepoCreatedComment for fedora-admin automation
- Copr branchRelease: do not error for EPELNext!
- buildRPMs: backup the build.log file to build.log.prev
- buildRPMs: print NVR instead of package name
- kojiWatchTask: use koji-tool to get build.log tail on failure
- use simple-prompt
* Wed Jan 4 2023 Jens Petersen <petersen@redhat.com> - 1.2.1-9
- fedora-packager-kerberos not in epel9
* Wed Nov 23 2022 Jens Petersen <petersen@redhat.com> - 1.2.1-8
- 'install': if dnf install fails, include command in error message
- 'override': check for kerberos ticket
- 'override': new --list and --expire option subcommands
- 'parallel': print package header for merge
- 'parallel': wait for sidetag update to transition to request testing
- 'request-branches': check package owner and admins: drop unordered-containers
- 'sidetags': ensure krb ticket
- 'update-version': now commits sources too
- 'update-version': prompt rather than warn if not updating rawhide
- Git: fix conflictPrompt to handle long hashes correctly
- Prompt: use show for unprintable characters
- mergeBranch: print package branch header
- require bugzilla-redhat-1.0.1 since b.r.c dropped Bug see_also field (juhp/hsbugzilla#18)
- use logMsg when waiting for repo
- https://hackage.haskell.org/package/fbrnch-1.2.1/changelog
- fbrnch.spec: SPDX migration of license tags
* Sat Nov 12 2022 Jens Petersen <petersen@redhat.com> - 1.2-7
- improvements to the branch merging logic
- no more gratuitous merge rebasing
- 'build' bugfix: use long git commit hashes
- 'build','scratch','waitrepo': add --sidetag option
- 'local': add --short-compile and rename --short-circuit to --short-install
- 'merge': --skip-bumps ignores up to N (trivial) commits & --show-all
- 'mock': add simple --short-circuit option for install stage
- 'parallel': no longer offer to remove sidetag
- 'parallel': update improvements, including fixing parallel
single package update (#36)
- 'request-branches': add --recurse-from BRANCH
- 'scratch' builds now support multiple (serial) targets
- 'install': offer to merge and add --from to override branch
- 'install': only update installed subpackages, unless --all-subpackages
- new git 'fetch' command
- new 'list-local' command: lists packages with a spec file in a branch
- new 'owner' command: prints owner and admins of package(s)
- new 'src-deps' command: wrapper of rpmbuild-order (r)deps
- many smaller fixes and improvements:
see https://hackage.haskell.org/package/fbrnch-1.2/changelog for details
* Sat Jul 30 2022 Jens Petersen <petersen@redhat.com> - 1.1.2-6
- build, install: count remaining builds
- commit: add all if nothing staged; remove initial "- "
- commit: default to changelog even if multiline
- compare: check branch exists and only print package if log output
- create-review: Fix for different username/fasid (@LyesSaadi, #34)
- install: abort if installation failed
- listReviewsAll: use bz api key
- merge: do not error if target branch does not exist
- parallel: create changelog for parallel package builds
- parallel: now takes same merge opts as build (#30)
- parallel: push parallel branches builds to Bodhi (#30)
- parallel: timeIO layers and parallel packages
- parallel: use branch to determine autoupdate or prompt for update edit
- pull: switch to given branch, add --no-fetch, show header when several pkgs
- request-branches: check user in access_users to avoid bad requests
- scratch: add --stagger to stagger archs
- scratch: only check pushed if release branch
- scratch-x86_64, scratch-aarch64: new shortcut commands
- waitrepo: --allow-dirty and --no-fetch
- waitrepo: use timeIO to time the operation
- Branches getRequestedBranches: exclude existing branches
- Git gitMergeable: only check newer branch if local
- Git gitMergeable: warn if branch ahead of newer branch
- kojiWaitRepo: add quiet arg for many parallel builds
- Package withPackagesByBranches: takes header & count args
- use rpmbuild-order-0.4.8 (needs simple-cmd-0.2.3)
- https://hackage.haskell.org/package/fbrnch-1.1.2/changelog
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jun 17 2022 Jens Petersen <petersen@redhat.com> - 1.1.1-4
- rebuild
* Tue May 31 2022 Jens Petersen <petersen@redhat.com> - 1.1.1-3
- commit: fix getting log from additional changelog message
- merge: --from to specify which branch to merge
- Package getSources: install compression tool if missing
- Package buildRPMs: use shellBool to send stderr also to tee
- request-branches: print out url per branch
- require rpm-nvr 0.1.2 for better NVR name validation
- initial support for epel-next (#29)
- Package builtRpms: no longer assume in cwd for dist-git
- build: now possible to skip pushing an update at prompt with 'no'
- main help: add readme url
- build: add --skip-fetch option
- Git isPkgGitRepo: fix handling of forks (#33)
- parallel: add --merge (#30)
- fix -s/-S ambigious for build and parallel
- parallel: unlock update after sidetag removal
- parallel: waitrepo for sidetag before starting to build
- parallel: get buildtag from koji to determine basetag for sidetag
- parallel: allow branch options like --all-fedora/--all-epel
* Sat Apr 30 2022 Jens Petersen <petersen@redhat.com> - 1.1-2
- https://hackage.haskell.org/package/fbrnch-1.1/changelog
* Mon Feb 21 2022 Jens Petersen <petersen@redhat.com> - 1.0.0-1
- https://hackage.haskell.org/package/fbrnch-1.0.0/changelog
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 0.9.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 0.9.1.1-3
- Rebuilt with OpenSSL 3.0.0
* Fri Aug 06 2021 Jens Petersen <petersen@redhat.com> - 0.9.1.1-2
- rebuild
* Sun Aug 1 2021 Jens Petersen <petersen@redhat.com> - 0.9.1.1-1
- getSources: fix mixup between sources and patches
- 'reviews': add --pattern to filter by package prefix
* Thu Jul 29 2021 Jens Petersen <petersen@redhat.com> - 0.9.1-1
- numerous bug fixes and small improvements:
https://hackage.haskell.org/package/fbrnch-0.9.1/changelog
- note 'local' now creates .build-ver-rel.log
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon May 31 2021 Jens Petersen <petersen@redhat.com> - 0.9-1
- numerous bug fixes and enhancements:
https://hackage.haskell.org/package/fbrnch-0.9/changelog
- new commands: 'waitrepo' and 'graph' using rpmbuild-order-0.4.5
- merge checks now show unmergeable branches
- 'parallel' now uses native koji wait-task
* Thu Apr 08 2021 Jens Petersen <petersen@redhat.com> - 0.8.0-1
- major refactor of branch-package args handling together with branch options
- 'request-repos' can now take branch args and --mock option (#18)
- 'parallel': only override and waitrepo if more layers
- extend dryrun to bodhiCreateOverride, putBugBuild, bodhiUpdate, kojiWaitRepo
- drop the restriction of no packages inside a pkg dir (#19)
- 'switch': drop git clean requirement to prevent error when on branch
- 'parallel': use parallelBranches for single package arg
- 'request-branch': allow request for a closed pkg review
- 'copr': new --list-chroots option for project
- 'command': skip dead.package's
- 'build': clearer bodhi note prompt
- 'install': fix conflicting short options for --recurse and --reinstall
* Sat Mar 27 2021 Jens Petersen <petersen@redhat.com> - 0.7.3-3
- fix package branch header for withPackageByBranches
* Fri Mar 26 2021 Jens Petersen <petersen@redhat.com> - 0.7.3-2
- print package branch header with a branch option
* Fri Mar 26 2021 Jens Petersen <petersen@redhat.com> - 0.7.3-1
- changes/improvements to package header output
- 'merge','build': query about diverging newer commits
- 'merge': add --no-prompt option
- Build: refine the "still in testing" logic to check testing repo with prompt
- Koji: offer to resubmit build on API error
- 'scratch': don't get sources for pushed git build
- 'request-repos' now prompts for branching and
'import' skips offering branching if they exist
- 'import': add --mock option for checking branches (#18)
- add 'not-installed' command: lists packages not installed locally at all
- Bugzilla: don't bother reprinting comment after posting it
- 'rename-master': renamed from 'master-rename'
- 'srpm': add --force option
- `local --force` (or --short): ignore existing built rpms
- 'command': option to hide package header if no output
- 'create-review': fix error for non-existent dir
- 'parallel': don't sleep for dryrun
* Sat Feb 27 2021 Jens Petersen <petersen@redhat.com> - 0.7.2-1
- 'install': --recurse to install missing neighboring deps
- 'request-repo': offer to request branches too
- 'override': --dryrun
- 'build': no longer override the last of built packages
- Bodhi overrides: error if failed; use 4 days
- 'local','install': print package name when build fails
- 'copr': abort on failure
- 'sort': only switch branch for dist-git
- 'review-package': new experimental command
- bunch of other tweaks and smaller fixes
* Wed Feb 10 2021 Jens Petersen <petersen@redhat.com> - 0.7.1-2
- add license files for internal libs
* Tue Feb 9 2021 Jens Petersen <petersen@redhat.com> - 0.7.1-1
- spec file generated by cabal-rpm-2.0.8