packages feed

ostree-pin 0.1 → 0.1.1

raw patch · 4 files changed

+30/−11 lines, 4 files

Files

CHANGELOG.md view
@@ -1,4 +1,7 @@ # Changelog +## 0.1.1 (2023-10-30)+- better output messages+ ## 0.1 (2023-10-30) - initial release
README.md view
@@ -3,15 +3,20 @@ [![GPL-3 license](https://img.shields.io/badge/license-GPL--3-blue.svg)](LICENSE)  ## Summary-A small utility to "pin" the current ostree deployment.+A small utility to move the ostree "pin" to the current ostree deployment. eg useful on Fedora Silverblue for preserving the current booted deployment image.-The idea is to run this before booting into a new staged deployment.+It can be run before booting into a new staged deployment,+or afterwards using the `--rollback` option.  ## Help+`$ ostree-pin --version`+```+0.1.1+``` `$ ostree-pin --help` ```-Tool to update pinned ostree deployment+Tool to update ostree deployment pin  Usage: ostree-pin [--version] [-n|--dryrun] [-p|--rollback] @@ -22,6 +27,16 @@   --version                Show version   -n,--dryrun              Dry run   -p,--rollback            Pin previous (rollback) deployment+```++If you forgot to pin the previous deployment before booting into a newer one,+you can use `--rollback` to pin it from the newer deployment.++## Usage+```shellsession+$ sudo ostree-pin+removing previous pin+pinning current deployment ```  ## Install
ostree-pin.cabal view
@@ -1,12 +1,12 @@ cabal-version:       2.0 name:                ostree-pin-version:             0.1-synopsis:            Tool to re-pin ostree deployments-description:         CLI tool for easily pinning the current ostree deployment+version:             0.1.1+synopsis:            Tool to update ostree deployment pin+description:         CLI tool to easily pin the current ostree deployment license:             GPL-3 license-file:        LICENSE-author:              Jens Petersen <juhpetersen@gmail.com>-maintainer:          Jens Petersen <juhpetersen@gmail.com>+author:              Jens Petersen <petersen@redhat.com>+maintainer:          Jens Petersen <petersen@redhat.com> copyright:           2019-2021, 2023 Jens Petersen category:            Utility homepage:            https://github.com/juhp/ostree-pin
src/Main.hs view
@@ -14,7 +14,7 @@ -- FIXME un/pin all? main :: IO () main =-  simpleCmdArgs (Just version) "Tool to update pinned ostree deployment"+  simpleCmdArgs (Just version) "Tool to update ostree deployment pin"   "See https://github.com/juhp/ostree-pin#readme" $   program   <$> switchWith 'n' "dryrun" "Dry run"@@ -52,9 +52,10 @@               [] -> return ()               [pin] ->                 unless dryrun $ do-                putStrLn "unpinning other deployment"+                putStrLn "removing previous pin"                 sysrootDeploymentSetPinned sysroot pin False               _ -> putStrLn "more than one deployment already pinned"             unless dryrun $ do-              putStrLn "pinning current deployment"+              putStrLn $ "pinning " +++                (if rollback then "previous" else "current") ++ " deployment"               sysrootDeploymentSetPinned sysroot deploy True