packages feed

fbrnch 0.9.1 → 0.9.1.1

raw patch · 9 files changed

+87/−18 lines, 9 files

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Changelog +## 0.9.1.1 (2021-08-01)+- getSources: fix mixup between sources and patches+- 'reviews': add --pattern for package prefix+ ## 0.9.1 (2021-07-29) - 'prep': cleaner output - 'reviews': pre-sort by bug id
README.md view
@@ -1,4 +1,4 @@-# fbrnch - "Fed Brunch"+# fbrnch (fedora branch) packager tool  [![GPL-2+ license](https://img.shields.io/badge/license-GPL--2+-blue.svg)](LICENSE) [![GitHub CI](https://github.com/juhp/fbrnch/workflows/build/badge.svg)](https://github.com/juhp/fbrnch/actions)@@ -21,7 +21,7 @@ - automated parallel builds of sets of packages in dependency order - creating, updating and listing package reviews - requesting new repos and branches-- importing new packages+- importing new packages and updating packages - progressive copr builds - rename master branches to rawhide @@ -231,8 +231,63 @@ ### Other commands There are more commands like `copr` and `graph`. -See `fbrnch --help` for details and the full list.+```+$ fbrnch --version+0.9.1.1+$ fbrnch --help+Fedora package branch building tool +Usage: fbrnch [--version] COMMAND+  This tool helps with updating and building package branches++Available options:+  -h,--help                Show this help text+  --version                Show version++Available commands:+  clone                    clone packages+  switch                   Switch branch+  nvr                      Print name-version-release+  status                   Status package/branch status+  merge                    Merge from newer branch+  build                    Build package(s) in Koji+  list                     List packages in pagure+  branches                 List package branches+  parallel                 Parallel build packages in Koji+  sidetags                 List user's side-tags+  override                 Tag builds into buildroot override in Koji+  waitrepo                 Wait for build to appear in Koji buildroot+  scratch                  Scratch build package in Koji+  update                   Update package in dist-git to newer version+  sort                     Sort packages in build dependency order+  prep                     Prep sources+  local                    Build locally+  srpm                     Build srpm+  diff                     Diff local changes+  log                      Show commits between branches+  mock                     Local mock build+  install-deps             Install package build dependencies+  install                  Build locally and install package(s)+  not-installed            Packages not installed locally+  bugs                     List package bugs+  bump                     Bump release for package+  commit                   Git commit packages+  pull                     Git pull packages+  create-review            Create a Package Review request+  update-review            Update a Package Review+  review-package           Run fedora-review on a package Review Request bug+  reviews                  List package reviews+  request-repos            Request dist git repo for new approved packages+  import                   Import new approved created packages from bugzilla+                           review+  request-branches         Request branches for approved created packages+  find-review              Find package review bug+  command                  Run shell command in package dirs ($p)+  copr                     Build package(s) in Fedora Copr+  rename-master            Rename local master branch to rawhide+  graph                    Output dependency graph+```+ ## Known issues - parallel builds will push local package commits without asking - currently it only checks if already built by NVR not githash@@ -294,12 +349,12 @@ ## Contribute Bug reports, feedback, and pull requests welcome. -Do report any unsupported or unintuitive workflow steps.+Please report any unsupported or unintuitive workflow steps.  See the TODO list and also the FIXME comments scattered across the source.-Please open an issue before embarking on large changes.+Do open an issue before embarking on large changes. -Committers so far:+People who have committed:  <a href="https://github.com/juhp/fbrnch/graphs/contributors">   <img src="https://contributors-img.web.app/image?repo=juhp/fbrnch" />
fbrnch.cabal view
@@ -1,10 +1,10 @@ cabal-version:       2.0 name:                fbrnch-version:             0.9.1+version:             0.9.1.1 synopsis:            Build and create Fedora package repos and branches description:-            fbrnch is a convenient packaging tool for Fedora Packagers,-            with integration for Bugzilla, Koji, and Bodhi.+            fbrnch (fedora branch) is a convenient packaging tool for+            Fedora Packagers, with integration for Bugzilla, Koji, and Bodhi.             .             Features include:             .
src/Bugzilla.hs view
@@ -15,6 +15,7 @@   approvedReviewBugSession,   pkgBugs,   pkgReviews,+  pkgReviewsPrefix,   listBzUsers,   emailIsValid, --  testBZlogin,@@ -270,6 +271,11 @@ pkgReviews :: String -> SearchExpression pkgReviews pkg =   SummaryField `contains` T.pack ("Review Request: " ++ pkg ++ " - ") .&&.+  packageReview++pkgReviewsPrefix :: String -> SearchExpression+pkgReviewsPrefix prefix =+  SummaryField `contains` T.pack ("Review Request: " ++ prefix) .&&.   packageReview  pkgBugs :: String -> SearchExpression
src/Cmd/Build.hs view
@@ -197,6 +197,7 @@         Just updateType -> do           putStrLn $ "Creating Bodhi Update for " ++ nvr ++ ":"           unless dryrun $ do+            -- use cmdLog to debug, but notes are not quoted             cmd_ "bodhi" (["updates", "new", "--type", if isJust mreview then "newpackage" else show updateType, "--request", "testing", "--notes", changelog, "--autokarma", "--autotime", "--close-bugs"] ++ bugs ++ [nvr])             updatequery <- bodhiUpdates [makeItem "display_user" "0", makeItem "builds" nvr]             case updatequery of
src/Cmd/Reviews.hs view
@@ -9,9 +9,10 @@  -- FIXME add --state or --new, --modified, etc -- FIXME display time of last update-reviewsCmd :: Bool -> Bool -> Bool -> Maybe String -> ReviewStatus -> IO ()-reviewsCmd short allstates assignee muser status = do-  listReviewsFull assignee muser allstates status >>=+reviewsCmd :: Bool -> Bool -> Bool -> Maybe String -> Maybe String+           -> ReviewStatus -> IO ()+reviewsCmd short allstates assignee muser mpat status = do+  listReviewsFull assignee muser mpat allstates status >>=     mapM_ (putReviewBug short) . sortBugsByStatus . sortBugsByID   when short $ putStrLn "" 
src/ListReviews.hs view
@@ -28,10 +28,11 @@ listReviews = listReviewsAll False  listReviewsAll :: Bool -> ReviewStatus -> IO [Bug]-listReviewsAll = listReviewsFull False Nothing+listReviewsAll = listReviewsFull False Nothing Nothing -listReviewsFull :: Bool -> Maybe String -> Bool -> ReviewStatus-> IO [Bug]-listReviewsFull assignee muser allopen status = do+listReviewsFull :: Bool -> Maybe String -> Maybe String -> Bool+                -> ReviewStatus-> IO [Bug]+listReviewsFull assignee muser mpat allopen status = do   (session,user) <- bzLoginSession   accountid <- do     case muser of@@ -45,7 +46,7 @@             [obj] -> return $ T.pack $ lookupKey' "email" obj             objs -> error' $ "Found multiple user matches: " ++                     unwords (map (lookupKey' "email") objs)-  let reviews = (if assignee then assigneeIs else reporterIs) accountid .&&. packageReview+  let reviews = (if assignee then assigneeIs else reporterIs) accountid .&&. maybe packageReview pkgReviewsPrefix mpat       open = if allopen         then statusOpen else         case status of
src/Main.hs view
@@ -50,7 +50,7 @@ main :: IO () main = do   setNoBuffering-  simpleCmdArgs (Just version) "Fedora package branch building tool"+  simpleCmdArgs (Just version) "Fedora branch building tool"     "This tool helps with updating and building package branches" $     subcommands     [ Subcommand "clone" "clone packages" $@@ -207,6 +207,7 @@       <*> reviewAllStatusOpt       <*> switchWith 'T' "assigned-to" "List reviews assigned to user"       <*> optional (strOptionWith 'U' "user" "USER" "Bugzilla user email")+      <*> optional (strOptionWith 'p' "pattern" "PKGPREFIX" "Package pattern prefix")       <*> reviewStatusOpt     , Subcommand "request-repos" "Request dist git repo for new approved packages" $       requestRepos
src/Package.hs view
@@ -284,7 +284,7 @@ getSources spec = do   gitDir <- isGitRepo   srcdir <- getSourceDir gitDir-  (srcs,patches) <- partitionEithers . map sourceFieldFile+  (patches,srcs) <- partitionEithers . map sourceFieldFile                     <$> cmdLines "spectool" ["-a", spec]   unless gitDir $     unlessM (doesDirectoryExist srcdir) $