From 577ff36472956689ef5bebbefe6770357e2785f4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 26 Dec 2016 12:07:18 -0400 Subject: Added --build option, which makes propellor simply build itself. --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index cb313e2f..765f44c0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +propellor (3.2.4) UNRELEASED; urgency=medium + + * Added --build option, which makes propellor simply build itself. + + -- Joey Hess Mon, 26 Dec 2016 12:03:19 -0400 + propellor (3.2.3) unstable; urgency=medium * Improve extraction of gpg secret key id list, to work with gpg 2.1. -- cgit v1.3-2-g0d8e From a2a07c8b6a3a9d73f32b8615ba0ce4e7127bbbb3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Jan 2017 10:24:08 +1100 Subject: Tor.hiddenService' added to support multiple ports. Thanks, Félix Sipma. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index eef6c1de..643df973 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ propellor (3.2.4) UNRELEASED; urgency=medium encoding-related crashes in eg, Propellor.Property.File. * Add --build option to simply build config.hs. * More informative usage message. Thanks, Daniel Brooks + * Tor.hiddenService' added to support multiple ports. + Thanks, Félix Sipma. -- Joey Hess Sat, 24 Dec 2016 15:06:36 -0400 -- cgit v1.3-2-g0d8e From 244a4c54cb6c83e6ceb101290fab1a3d85c1a1e6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 19 Jan 2017 12:03:18 +1100 Subject: Apt.noPDiffs added. Thanks, Sean Whitton. --- debian/changelog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 643df973..a79611b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ propellor (3.2.4) UNRELEASED; urgency=medium * More informative usage message. Thanks, Daniel Brooks * Tor.hiddenService' added to support multiple ports. Thanks, Félix Sipma. + * Apt.noPDiffs added. + Thanks, Sean Whitton. -- Joey Hess Sat, 24 Dec 2016 15:06:36 -0400 -- cgit v1.3-2-g0d8e From b1f0bd05941f5d8c42a28d33316a0a0452a62476 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 2 Feb 2017 15:40:30 -0400 Subject: Added Propellor.Property.File.configFileName and related functions to generate good filenames for config directories. spwhitton has a branch that could use this, and there are several places in propellor that do something ad-hoc that would have been better implemented using this. I was not able to switch any of the existing ad-hoc stuff, but this can be used going forward for new stuff. This commit was sponsored by Anthony DeRobertis on Patreon. --- debian/changelog | 2 ++ src/Propellor/Property/File.hs | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 0e5aa8d5..30af1b88 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ propellor (3.2.4) UNRELEASED; urgency=medium Thanks, Sean Whitton. * stack.yaml: Compile with GHC 8.0.1 against lts-7.16. Thanks, Andrew Cowie. + * Added Propellor.Property.File.configFileName and related functions + to generate good filenames for config directories. -- Joey Hess Sat, 24 Dec 2016 15:06:36 -0400 diff --git a/src/Propellor/Property/File.hs b/src/Propellor/Property/File.hs index 95fc6f81..fe2b1057 100644 --- a/src/Propellor/Property/File.hs +++ b/src/Propellor/Property/File.hs @@ -8,6 +8,7 @@ import Utility.FileMode import qualified Data.ByteString.Lazy as L import System.Posix.Files import System.Exit +import Data.Char type Line = String @@ -221,3 +222,42 @@ viaStableTmp a f = bracketIO setup cleanup go go tmpfile = do a tmpfile liftIO $ rename tmpfile f + +-- | Generates a base configuration file name from a String, which +-- can be put in a configuration directory, such as +-- /etc/apt/sources.list.d/ +-- +-- The generated file name is limited to using ASCII alphanumerics, +-- '_' and '.', so that programs that only accept a limited set of +-- characters will accept it. Any other characters will be encoded +-- in escaped form. +-- +-- Some file extensions, such as ".dpkg-new" may be filtered out by +-- programs that use configuration directories. To avoid such problems, +-- it's a good idea to add an static prefix and extension to the +-- result of this function. For example: +-- +-- > aptSource foo = "/etc/apt/sources.list.d" "propellor_" ++ configFileName foo <.> ".conf" +configFileName :: String -> FilePath +configFileName = concatMap escape + where + escape c + | isAscii c && isAlphaNum c = [c] + | c == '.' = [c] + | otherwise = '_' : show (ord c) + +-- | Applies configFileName to any value that can be shown. +showConfigFileName :: Show v => v -> FilePath +showConfigFileName = configFileName . show + +-- | Inverse of showConfigFileName. +readConfigFileName :: Read v => FilePath -> Maybe v +readConfigFileName = readish . unescape + where + unescape [] = [] + unescape ('_':cs) = case break (not . isDigit) cs of + ([], _) -> '_' : unescape cs + (ns, cs') -> case readish ns of + Nothing -> '_' : ns ++ unescape cs' + Just n -> chr n : unescape cs' + unescape (c:cs) = c : unescape cs -- cgit v1.3-2-g0d8e From 34e3477ccc051b3a291331da7f2c5d1d2962a506 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 3 Feb 2017 15:31:08 -0400 Subject: Added Apt.suiteAvailablePinned, Apt.pinnedTo. Thanks, Sean Whitton. * Added Apt.suiteAvailablePinned, Apt.pinnedTo. Thanks, Sean Whitton. * Added File.containsBlock Thanks, Sean Whitton. --- debian/changelog | 4 ++++ doc/todo/new_apt_pinning_properties.mdwn | 2 ++ 2 files changed, 6 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 30af1b88..81360402 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,10 @@ propellor (3.2.4) UNRELEASED; urgency=medium Thanks, Andrew Cowie. * Added Propellor.Property.File.configFileName and related functions to generate good filenames for config directories. + * Added Apt.suiteAvailablePinned, Apt.pinnedTo. + Thanks, Sean Whitton. + * Added File.containsBlock + Thanks, Sean Whitton. -- Joey Hess Sat, 24 Dec 2016 15:06:36 -0400 diff --git a/doc/todo/new_apt_pinning_properties.mdwn b/doc/todo/new_apt_pinning_properties.mdwn index d32bcbb2..8687b58a 100644 --- a/doc/todo/new_apt_pinning_properties.mdwn +++ b/doc/todo/new_apt_pinning_properties.mdwn @@ -6,3 +6,5 @@ My branch `pin` of repo `https://git.spwhitton.name/propellor` adds - a haddock for `File.containsLines` There is one TODO in a comment that relates to propellor's algebraic data types. I'd be grateful for help with that. --spwhitton + +> merged, thanks. [[done]] --[[Joey]] -- cgit v1.3-2-g0d8e From 2f50e5f3d1a556b8445fdcb7ac239f85cfe43f6c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 4 Feb 2017 17:18:26 -0400 Subject: Arch Linux is now supported by Propellor! Thanks to Zihao Wang for this port. * Arch Linux is now supported by Propellor! Thanks to Zihao Wang for this port. * Added Propellor.Property.Pacman for Arch's package manager. Maintained by Zihao Wang. * The types of some properties changed; eg from Property DebianLike to Property (DebianLike + ArchLinux). This could require updates to code using those properties, so is a minor API change. --- debian/changelog | 11 ++++++++-- doc/todo/Arch_Linux_Port.mdwn | 2 ++ ...ent_3_d917de766dfe7fded7317d7614d1467f._comment | 25 ++++++++++++++++++++++ propellor.cabal | 3 ++- 4 files changed, 38 insertions(+), 3 deletions(-) create mode 100644 doc/todo/Arch_Linux_Port/comment_3_d917de766dfe7fded7317d7614d1467f._comment (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 81360402..3a12ca70 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,12 @@ -propellor (3.2.4) UNRELEASED; urgency=medium - +propellor (3.3.0) UNRELEASED; urgency=medium + + * Arch Linux is now supported by Propellor! + Thanks to Zihao Wang for this port. + * Added Propellor.Property.Pacman for Arch's package manager. + Maintained by Zihao Wang. + * The types of some properties changed; eg from Property DebianLike + to Property (DebianLike + ArchLinux). This could require updates + to code using those properties, so is a minor API change. * GHC's fileSystemEncoding is used for all String IO, to avoid encoding-related crashes in eg, Propellor.Property.File. * Add --build option to simply build config.hs. diff --git a/doc/todo/Arch_Linux_Port.mdwn b/doc/todo/Arch_Linux_Port.mdwn index a899dbb3..ac3ee4dc 100644 --- a/doc/todo/Arch_Linux_Port.mdwn +++ b/doc/todo/Arch_Linux_Port.mdwn @@ -12,3 +12,5 @@ I've made some addtional minor changes to make propellor compile without errors: - Rsync.installed and Docker.installed now supports Pacman as well Hope you enjoy it! + +> [[merged|done]]; it was indeed enjoyable. thank you! --[[Joey]] diff --git a/doc/todo/Arch_Linux_Port/comment_3_d917de766dfe7fded7317d7614d1467f._comment b/doc/todo/Arch_Linux_Port/comment_3_d917de766dfe7fded7317d7614d1467f._comment new file mode 100644 index 00000000..27ef8078 --- /dev/null +++ b/doc/todo/Arch_Linux_Port/comment_3_d917de766dfe7fded7317d7614d1467f._comment @@ -0,0 +1,25 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 3""" + date="2017-02-04T20:55:02Z" + content=""" +> Instead, I changed some properties in DiskImage from Linux to +> DebianLike. Is it the correct way to do it? + +Looking at it, kpartx is DebianLike-specific, so imageBuiltFrom which uses it +should be too. The only reason it wasn't marked as DebianLike already and +was type Linux is because Linux used to be the same as DebianLike and so +the type checker didn't see a difference. No longer, thanks to your patch. + +So, it makes complete sense that you have to change this. You're paying +the price of blazing the trail of the first non-DebianLike Linux distro in +Propellor.. + +--- + +Looks like your [[!commit 25f6871e1dda3de252fbc6c8ac6962eb0cd9311a]] +dealt with all my review suggestions. And so, I've merged it. + +Unless you have anything else that needs to be done, I'll release +propellor soon with the added Arch Linux support. Thank you very much! +"""]] diff --git a/propellor.cabal b/propellor.cabal index 1b5c46d6..a33b9824 100644 --- a/propellor.cabal +++ b/propellor.cabal @@ -1,5 +1,5 @@ Name: propellor -Version: 3.2.3 +Version: 3.3.0 Cabal-Version: >= 1.8 License: BSD2 Maintainer: Joey Hess @@ -128,6 +128,7 @@ Library Propellor.Property.Obnam Propellor.Property.OpenId Propellor.Property.OS + Propellor.Property.Pacman Propellor.Property.Parted Propellor.Property.Partition Propellor.Property.Postfix -- cgit v1.3-2-g0d8e From f4bfbe1917bef5a2fd7f7a4220941747d152d739 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 7 Feb 2017 12:07:13 -0400 Subject: improve wording --- debian/changelog | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 3a12ca70..ef092a59 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,8 +5,9 @@ propellor (3.3.0) UNRELEASED; urgency=medium * Added Propellor.Property.Pacman for Arch's package manager. Maintained by Zihao Wang. * The types of some properties changed; eg from Property DebianLike - to Property (DebianLike + ArchLinux). This could require updates - to code using those properties, so is a minor API change. + to Property (DebianLike + ArchLinux). Also, DebianLike and Linux + are no longer type synonyms; propellor now knows that Linux includes + ArchLinux. This could require updates to code, so is a minor API change. * GHC's fileSystemEncoding is used for all String IO, to avoid encoding-related crashes in eg, Propellor.Property.File. * Add --build option to simply build config.hs. -- cgit v1.3-2-g0d8e From 965c5013937485f5ba4891442dac651d6533e2fc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 7 Feb 2017 12:11:27 -0400 Subject: releasing package propellor version 3.3.0 --- debian/changelog | 4 ++-- src/Propellor/Property/.Sbuild.hs.swp | Bin 16384 -> 0 bytes 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 src/Propellor/Property/.Sbuild.hs.swp (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index ef092a59..7a2fe693 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -propellor (3.3.0) UNRELEASED; urgency=medium +propellor (3.3.0) unstable; urgency=medium * Arch Linux is now supported by Propellor! Thanks to Zihao Wang for this port. @@ -25,7 +25,7 @@ propellor (3.3.0) UNRELEASED; urgency=medium * Added File.containsBlock Thanks, Sean Whitton. - -- Joey Hess Sat, 24 Dec 2016 15:06:36 -0400 + -- Joey Hess Tue, 07 Feb 2017 12:09:24 -0400 propellor (3.2.3) unstable; urgency=medium diff --git a/src/Propellor/Property/.Sbuild.hs.swp b/src/Propellor/Property/.Sbuild.hs.swp deleted file mode 100644 index a361c431..00000000 Binary files a/src/Propellor/Property/.Sbuild.hs.swp and /dev/null differ -- cgit v1.3-2-g0d8e From 33767d2d86c81f285ce253459f34c9f8f3a285a1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 13 Feb 2017 12:28:04 -0400 Subject: deb.debian.org * Apt: Removed the mirrors.kernel.org line from stdSourcesList etc. The mirror CDN has a new implementation that should avoid the problems with httpredir that made an extra mirror sometimes be needed. * Switch Debian CDN address to deb.debian.org. httpredir.debian.org points to the same IPs as deb.debian.org now, so this shouldn't change anything except to use the now preferred name. --- debian/changelog | 9 +++++++++ src/Propellor/Property/Apt.hs | 12 +++--------- src/Propellor/Property/DebianMirror.hs | 2 +- src/Propellor/Property/Sbuild.hs | 2 +- 4 files changed, 14 insertions(+), 11 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 7a2fe693..ef67c673 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +propellor (3.3.1) UNRELEASED; urgency=medium + + * Apt: Removed the mirrors.kernel.org line from stdSourcesList etc. + The mirror CDN has a new implementation that should avoid the problems + with httpredir that made an extra mirror sometimes be needed. + * Switch Debian CDN address to deb.debian.org. + + -- Joey Hess Mon, 13 Feb 2017 12:23:42 -0400 + propellor (3.3.0) unstable; urgency=medium * Arch Linux is now supported by Propellor! diff --git a/src/Propellor/Property/Apt.hs b/src/Propellor/Property/Apt.hs index 724f6d05..9a55c367 100644 --- a/src/Propellor/Property/Apt.hs +++ b/src/Propellor/Property/Apt.hs @@ -62,10 +62,7 @@ binandsrc url suite = catMaybes return $ debLine bs url stdSections debCdn :: SourcesGenerator -debCdn = binandsrc "http://httpredir.debian.org/debian" - -kernelOrg :: SourcesGenerator -kernelOrg = binandsrc "http://mirrors.kernel.org/debian" +debCdn = binandsrc "http://deb.debian.org/debian" -- | Only available for Stable and Testing securityUpdates :: SourcesGenerator @@ -77,9 +74,6 @@ securityUpdates suite -- | Makes sources.list have a standard content using the Debian mirror CDN, -- with the Debian suite configured by the os. --- --- Since the CDN is sometimes unreliable, also adds backup lines using --- kernel.org. stdSourcesList :: Property Debian stdSourcesList = withOS "standard sources.list" $ \w o -> case o of (Just (System (Debian _ suite) _)) -> @@ -98,7 +92,7 @@ stdSourcesList' suite more = tightenTargets $ setSourcesList (concatMap (\gen -> gen suite) generators) `describe` ("standard sources.list for " ++ show suite) where - generators = [debCdn, kernelOrg, securityUpdates] ++ more + generators = [debCdn, securityUpdates] ++ more type PinPriority = Int @@ -142,7 +136,7 @@ suiteAvailablePinned s pin = available unavailable | "-backports" `isSuffixOf` (showSuite s) = id | otherwise = filter (not . isInfixOf "-backports") - generators = [debCdn, kernelOrg, securityUpdates] + generators = [debCdn, securityUpdates] prefFile = "/etc/apt/preferences.d/20" ++ showSuite s ++ ".pref" sourcesFile = "/etc/apt/sources.list.d/" ++ showSuite s ++ ".list" diff --git a/src/Propellor/Property/DebianMirror.hs b/src/Propellor/Property/DebianMirror.hs index d8a9c423..ad15f9a2 100644 --- a/src/Propellor/Property/DebianMirror.hs +++ b/src/Propellor/Property/DebianMirror.hs @@ -79,7 +79,7 @@ data DebianMirror = DebianMirror mkDebianMirror :: FilePath -> Cron.Times -> DebianMirror mkDebianMirror dir crontimes = DebianMirror - { _debianMirrorHostName = "httpredir.debian.org" + { _debianMirrorHostName = "deb.debian.org" , _debianMirrorDir = dir , _debianMirrorSuites = [] , _debianMirrorArchitectures = [] diff --git a/src/Propellor/Property/Sbuild.hs b/src/Propellor/Property/Sbuild.hs index c3e55bbf..db5982cd 100644 --- a/src/Propellor/Property/Sbuild.hs +++ b/src/Propellor/Property/Sbuild.hs @@ -501,7 +501,7 @@ schrootFromSystem system@(System _ arch) = >>= \suite -> return $ SbuildSchroot suite arch stdMirror :: System -> Maybe Apt.Url -stdMirror (System (Debian _ _) _) = Just "http://httpredir.debian.org/debian" +stdMirror (System (Debian _ _) _) = Just "http://deb.debian.org/debian" stdMirror (System (Buntish _) _) = Just "mirror://mirrors.ubuntu.com/" stdMirror _ = Nothing -- cgit v1.3-2-g0d8e