From b0599c446cbcc5eb5f46687699115ea27b62ef3e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 18 Feb 2018 14:31:47 -0400 Subject: releasing package propellor version 5.3.2 --- propellor.cabal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'propellor.cabal') diff --git a/propellor.cabal b/propellor.cabal index 48d34b47..d9157eb1 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -1,5 +1,5 @@ Name: propellor -Version: 5.3.1 +Version: 5.3.2 Cabal-Version: >= 1.20 License: BSD2 Maintainer: Joey Hess -- cgit v1.3-2-g0d8e From 6749014553b13ad148cde450baefb241a98ed771 Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Fri, 23 Feb 2018 14:11:15 +0100 Subject: add Propellor.Property.Dhparams --- propellor.cabal | 1 + src/Propellor/Property/Dhparams.hs | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 src/Propellor/Property/Dhparams.hs (limited to 'propellor.cabal') diff --git a/propellor.cabal b/propellor.cabal index d9157eb1..b2ecb3d8 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -103,6 +103,7 @@ Library Propellor.Property.Cron Propellor.Property.DebianMirror Propellor.Property.Debootstrap + Propellor.Property.Dhparams Propellor.Property.DiskImage Propellor.Property.DiskImage.PartSpec Propellor.Property.Dns diff --git a/src/Propellor/Property/Dhparams.hs b/src/Propellor/Property/Dhparams.hs new file mode 100644 index 00000000..2c30cb87 --- /dev/null +++ b/src/Propellor/Property/Dhparams.hs @@ -0,0 +1,26 @@ +-- | Maintainer: Félix Sipma + +module Propellor.Property.Dhparams where + +import Propellor.Base +import qualified Propellor.Property.Apt as Apt +import qualified Propellor.Property.File as File +import Utility.FileMode +import Utility.SafeCommand + + +length' :: Int +length' = 2048 + +file :: FilePath +file = "/etc/ssl/private/dhparams.pem" + +safeDhparams :: Property DebianLike +safeDhparams = propertyList "safe dhparams" $ props + & File.dirExists (takeDirectory file) + & Apt.installed ["openssl"] + & check (not <$> doesFileExist file) (createDhparams file length') + +createDhparams :: FilePath -> Int -> Property UnixLike +createDhparams f l = property ("generate new dhparams: " ++ f) $ liftIO $ withUmask 0o0177 $ withFile f WriteMode $ \h -> + cmdResult <$> boolSystem' "openssl" [Param "dhparam", Param (show l)] (\p -> p { std_out = UseHandle h }) -- cgit v1.3-2-g0d8e From fad7824a13580f505549cc746589c94542bec9cb Mon Sep 17 00:00:00 2001 From: Félix Sipma Date: Fri, 23 Feb 2018 16:33:00 +0100 Subject: rename Dhparams to Openssl --- propellor.cabal | 2 +- src/Propellor/Property/Dhparams.hs | 26 -------------------------- src/Propellor/Property/Openssl.hs | 26 ++++++++++++++++++++++++++ 3 files changed, 27 insertions(+), 27 deletions(-) delete mode 100644 src/Propellor/Property/Dhparams.hs create mode 100644 src/Propellor/Property/Openssl.hs (limited to 'propellor.cabal') diff --git a/propellor.cabal b/propellor.cabal index b2ecb3d8..b22abcba 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -103,7 +103,6 @@ Library Propellor.Property.Cron Propellor.Property.DebianMirror Propellor.Property.Debootstrap - Propellor.Property.Dhparams Propellor.Property.DiskImage Propellor.Property.DiskImage.PartSpec Propellor.Property.Dns @@ -141,6 +140,7 @@ Library Propellor.Property.Nginx Propellor.Property.Obnam Propellor.Property.OpenId + Propellor.Property.Openssl Propellor.Property.OS Propellor.Property.Pacman Propellor.Property.Parted diff --git a/src/Propellor/Property/Dhparams.hs b/src/Propellor/Property/Dhparams.hs deleted file mode 100644 index 2c30cb87..00000000 --- a/src/Propellor/Property/Dhparams.hs +++ /dev/null @@ -1,26 +0,0 @@ --- | Maintainer: Félix Sipma - -module Propellor.Property.Dhparams where - -import Propellor.Base -import qualified Propellor.Property.Apt as Apt -import qualified Propellor.Property.File as File -import Utility.FileMode -import Utility.SafeCommand - - -length' :: Int -length' = 2048 - -file :: FilePath -file = "/etc/ssl/private/dhparams.pem" - -safeDhparams :: Property DebianLike -safeDhparams = propertyList "safe dhparams" $ props - & File.dirExists (takeDirectory file) - & Apt.installed ["openssl"] - & check (not <$> doesFileExist file) (createDhparams file length') - -createDhparams :: FilePath -> Int -> Property UnixLike -createDhparams f l = property ("generate new dhparams: " ++ f) $ liftIO $ withUmask 0o0177 $ withFile f WriteMode $ \h -> - cmdResult <$> boolSystem' "openssl" [Param "dhparam", Param (show l)] (\p -> p { std_out = UseHandle h }) diff --git a/src/Propellor/Property/Openssl.hs b/src/Propellor/Property/Openssl.hs new file mode 100644 index 00000000..eb373e49 --- /dev/null +++ b/src/Propellor/Property/Openssl.hs @@ -0,0 +1,26 @@ +-- | Maintainer: Félix Sipma + +module Propellor.Property.Openssl where + +import Propellor.Base +import qualified Propellor.Property.Apt as Apt +import qualified Propellor.Property.File as File +import Utility.FileMode +import Utility.SafeCommand + + +dhparamsLength :: Int +dhparamsLength = 2048 + +dhparams :: FilePath +dhparams = "/etc/ssl/private/dhparams.pem" + +safeDhparams :: Property DebianLike +safeDhparams = propertyList "safe dhparams" $ props + & File.dirExists (takeDirectory file) + & Apt.installed ["openssl"] + & check (not <$> doesFileExist file) (createDhparams file length') + +createDhparams :: FilePath -> Int -> Property UnixLike +createDhparams f l = property ("generate new dhparams: " ++ f) $ liftIO $ withUmask 0o0177 $ withFile f WriteMode $ \h -> + cmdResult <$> boolSystem' "openssl" [Param "dhparam", Param (show l)] (\p -> p { std_out = UseHandle h }) -- cgit v1.3-2-g0d8e From e9c69dab91165cda0311d05e5b6a49697fae6e05 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 26 Feb 2018 14:34:45 -0400 Subject: releasing package propellor version 5.3.3 --- debian/changelog | 4 ++-- propellor.cabal | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'propellor.cabal') diff --git a/debian/changelog b/debian/changelog index e1a63d61..b97b12b0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -propellor (5.3.3) UNRELEASED; urgency=medium +propellor (5.3.3) unstable; urgency=medium * Warn again about new upstream version when ~/.propellor was cloned from the Debian git bundle using an older version of propellor that set up an @@ -7,7 +7,7 @@ propellor (5.3.3) UNRELEASED; urgency=medium * Added Propllor.Property.Openssl module contributed by contributed by Félix Sipma. - -- Joey Hess Mon, 19 Feb 2018 12:44:24 -0400 + -- Joey Hess Mon, 26 Feb 2018 14:34:37 -0400 propellor (5.3.2) unstable; urgency=medium diff --git a/propellor.cabal b/propellor.cabal index b22abcba..5f6abc8b 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -1,5 +1,5 @@ Name: propellor -Version: 5.3.2 +Version: 5.3.3 Cabal-Version: >= 1.20 License: BSD2 Maintainer: Joey Hess -- cgit v1.3-2-g0d8e