diff options
12 files changed, 219 insertions, 10 deletions
diff --git a/debian/changelog b/debian/changelog index f4204e06..8923b94a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +propellor (5.2.1) UNRELEASED; urgency=medium + + * Avoid bogus warning about new upstream version when /usr/bin/propellor + is run on a Debian system, but ~/.propellor was not cloned from the + Debian git bundle. + + -- Joey Hess <id@joeyh.name> Tue, 02 Jan 2018 13:06:45 -0400 + propellor (5.2.0) unstable; urgency=medium [ Joey Hess ] diff --git a/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date...mdwn b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date...mdwn new file mode 100644 index 00000000..7f912eb8 --- /dev/null +++ b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date...mdwn @@ -0,0 +1,20 @@ +Hi, + +After upgrading from propellor 5.1.0 to 5.2.0 I do get + + ** warning: ** Your ~/.propellor/ is out of date.. + + + +The `~/.propellor` directory was created with + + propellor --init + + + +Is there a + + propellor --update-my-home-propellor + + +?? diff --git a/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_1_79e18b696ed18c998cd2605cccbf3750._comment b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_1_79e18b696ed18c998cd2605cccbf3750._comment new file mode 100644 index 00000000..6c8d187a --- /dev/null +++ b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_1_79e18b696ed18c998cd2605cccbf3750._comment @@ -0,0 +1,19 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2017-12-31T16:03:40Z" + content=""" +You'd update it by git merge with propellor upstream, since your ~/.propellor +in this case is forked from propellor's git repository, rather than the other +option of being a separate git repository that uses propellor as a library. + +I think there should be more to the message than what you showed, +explaining what you'd to do merge. + + warningMessage ("** Your ~/.propellor/ is out of date..") + let also s = hPutStrLn stderr (" " ++ s) + also ("A newer upstream version is available in " ++ distrepo) + if havebranch + then also ("To merge it, run: git merge " ++ upstreambranch) + else also ("To merge it, find the most recent commit in your repository's history that corresponds to an upstream release of propellor, and set refs/remotes/" ++ upstreambranch ++ " to it. Then run propellor again.") +"""]] diff --git a/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_2_c8bfbc1eaa3565ed3e92a402c75b63dc._comment b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_2_c8bfbc1eaa3565ed3e92a402c75b63dc._comment new file mode 100644 index 00000000..46028b1e --- /dev/null +++ b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_2_c8bfbc1eaa3565ed3e92a402c75b63dc._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="spwhitton" + avatar="http://cdn.libravatar.org/avatar/9c3f08f80e67733fd506c353239569eb" + subject="comment 2" + date="2018-01-01T11:10:01Z" + content=""" +If you update by merging from Joey's repo but have the Debian propellor package installed you'll always get this because the bundle in `/usr/src/propellor` has a commit ID that is distinct from any of those in Joey's branch. + +I think it would be nice to have a git config option to disable the check for those of us in the situation I just described. +"""]] diff --git a/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_3_ecd5b0d960f1eb92795c559736f92e25._comment b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_3_ecd5b0d960f1eb92795c559736f92e25._comment new file mode 100644 index 00000000..a6a24f53 --- /dev/null +++ b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_3_ecd5b0d960f1eb92795c559736f92e25._comment @@ -0,0 +1,34 @@ +[[!comment format=mdwn + username="stappers@eb96885816da287c29f6f699999434d532149234" + nickname="stappers" + avatar="http://cdn.libravatar.org/avatar/bf33450acf6fc2a17a8b4e6fc7749c65" + subject="twice the warning" + date="2018-01-01T15:57:05Z" + content=""" +The warning is printed twice. + +One at the very beginning: + + stappers@paddy:~ + $ propellor paddy.gpm.stappers.nl + A newer upstream version is available in /usr/src/propellor/propellor.git + To merge it, run: git merge upstream/master + + [2018-01-01 16:42:54 CET] command line: Run \"paddy.gpm.stappers.nl\" + + +The other at the end of executing: + + loop deleted : /dev/loop0 + paddy.gpm.stappers.nl built disk image /srv/image/lime.img ... done + paddy.gpm.stappers.nl overall ... done + Shared connection to paddy.gpm.stappers.nl closed. + ** warning: ** Your ~/.propellor/ is out of date.. + stappers@paddy:~ + $ + +It was the last one that made me report this. +The one that is color highlighted, +the one that doesn't have the `git merge` advice. + +"""]] diff --git a/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_4_93c97f8767a7ae3b9795aea051b0e77e._comment b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_4_93c97f8767a7ae3b9795aea051b0e77e._comment new file mode 100644 index 00000000..73dd3fec --- /dev/null +++ b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_4_93c97f8767a7ae3b9795aea051b0e77e._comment @@ -0,0 +1,8 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 4""" + date="2018-01-02T16:36:32Z" + content=""" +Ah I see, it was mixing concurrent output with unbuffered output, which in +this case caused the related messages to appear separated. Fixed that. +"""]] diff --git a/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_5_af7919be09eb454b2dca235ede03008f._comment b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_5_af7919be09eb454b2dca235ede03008f._comment new file mode 100644 index 00000000..157e7803 --- /dev/null +++ b/doc/forum/__42____42___warning:___42____42___Your___126____47__.propellor__47___is_out_of_date../comment_5_af7919be09eb454b2dca235ede03008f._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 5""" + date="2018-01-02T17:08:07Z" + content=""" +@spwhitton ah, I had not noticed that case. I found a way to avoid the +unncessary warning in that case; since there's no upstream/master ref when +~/.propellor has not been cloned from the debian git bundle, it can detect +that and avoid warning. Done so. +"""]] diff --git a/doc/forum/secret-project_deliverable/comment_8_30bc5e081916688468e750de6c95aebf._comment b/doc/forum/secret-project_deliverable/comment_8_30bc5e081916688468e750de6c95aebf._comment new file mode 100644 index 00000000..401cd6a9 --- /dev/null +++ b/doc/forum/secret-project_deliverable/comment_8_30bc5e081916688468e750de6c95aebf._comment @@ -0,0 +1,36 @@ +[[!comment format=mdwn + username="stappers@eb96885816da287c29f6f699999434d532149234" + nickname="stappers" + avatar="http://cdn.libravatar.org/avatar/bf33450acf6fc2a17a8b4e6fc7749c65" + subject="Happy New Year" + date="2018-01-01T14:51:59Z" + content=""" + stappers@paddy:~/src/secret-project + $ git config propellor.buildsystem stack + stappers@paddy:~/src/secret-project + $ propellor --spin paddy.gpm.stappers.nl + Building all executables for `secret-project' once. After a successful build of all of them, only specified executables will be rebuilt. + secret-project-0.0: build (exe) + Preprocessing executable 'propellor-config' for secret-project-0.0... + [1 of 9] Compiling Installer.Types ( Installer/Types.hs, .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/propellor-config/propellor-config-tmp/Installer/Types.o ) + + /home/stappers/src/secret-project/Installer/Types.hs:3:1: error: + Failed to load interface for ‘Propellor.Property.Installer.Types’ + There are files missing in the ‘propellor-5.2.0’ package, + try running 'ghc-pkg check'. + Use -v to see a list of the files searched for. + + -- While building custom Setup.hs for package secret-project-0.0 using: + /home/stappers/.stack/setup-exe-cache/x86_64-linux-nopie/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 \ + --builddir=.stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0 build exe:propellor-config \ + --ghc-options \" -ddump-hi -ddump-to-file\" + Process exited with code: ExitFailure 1 + Propellor build ... failed + ** error: Propellor build failed! + propellor: Cannot continue! + CallStack (from HasCallStack): + error, called at src/Propellor/Message.hs:143:9 in main:Propellor.Message + stappers@paddy:~/src/secret-project + $ + +"""]] diff --git a/doc/forum/secret-project_deliverable/comment_9_4a6e1a53f5bf5b72aaafba3a7dd45346._comment b/doc/forum/secret-project_deliverable/comment_9_4a6e1a53f5bf5b72aaafba3a7dd45346._comment new file mode 100644 index 00000000..c9f45ac3 --- /dev/null +++ b/doc/forum/secret-project_deliverable/comment_9_4a6e1a53f5bf5b72aaafba3a7dd45346._comment @@ -0,0 +1,10 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 9""" + date="2018-01-02T17:14:23Z" + content=""" +Since propellor 5.2.0 certianly *does* include the Propellor.Property.Installer.Types +module, I guess you either have a somehow lost file on your local system +there, or perhaps you installed a unreleased version of propellor 5.2.0 +from git before that file was added to it. +"""]] diff --git a/doc/forum/to_teach_propellor_about_other_ARM_boards.mdwn b/doc/forum/to_teach_propellor_about_other_ARM_boards.mdwn new file mode 100644 index 00000000..aef3c59f --- /dev/null +++ b/doc/forum/to_teach_propellor_about_other_ARM_boards.mdwn @@ -0,0 +1,33 @@ +Inspirated by <http://joeyh.name/blog/entry/custom_ARM_disk_image_generation_with_propellor/> +I started to teach propellor about other ARM boards. +(After having a clean build for a supported ARM board) + + +Using two directories, a `~/.propellor` with my hosts and `src/propellor` with propellor source code. + +In the code directory I modified `src/Propellor/Property/Machine.hs`, +compiled with `debuild -uc -us` and installed with `dpkg -i ../propellor*.deb`. + +Then using my hosts directory to get a WTF moment + + $ propellor --spin paddy.gpm.stappers.nl + Auto-merging src/Propellor/Property/Machine.hs + Auto-merging propellor.cabal + Auto-merging debian/changelog + Auto-merging config.hs + CONFLICT (add/add): Merge conflict in config.hs + Automatic merge failed; fix conflicts and then commit the result. + propellor: Failed to run git ["merge","279b9267952b598914037983f74606d4f9c4ff6e","-s", + "recursive","-Xtheirs","--quiet","-m","merging upstream version" + ,"--allow-unrelated-histories"] + CallStack (from HasCallStack): + error, called at src/Propellor/DotDir.hs:425:17 in main:Propellor.DotDir + + +What did connect both directories and why? + + +More important: + +What directory setup and workflow to use +to teach propellor about other ARM boards? diff --git a/doc/forum/to_teach_propellor_about_other_ARM_boards/comment_1_70f9d9442616144d6f862c81516e721b._comment b/doc/forum/to_teach_propellor_about_other_ARM_boards/comment_1_70f9d9442616144d6f862c81516e721b._comment new file mode 100644 index 00000000..e1a7ee2c --- /dev/null +++ b/doc/forum/to_teach_propellor_about_other_ARM_boards/comment_1_70f9d9442616144d6f862c81516e721b._comment @@ -0,0 +1,18 @@ +[[!comment format=mdwn + username="stappers@eb96885816da287c29f6f699999434d532149234" + nickname="stappers" + avatar="http://cdn.libravatar.org/avatar/bf33450acf6fc2a17a8b4e6fc7749c65" + subject="Progress" + date="2018-01-02T14:19:53Z" + content=""" +Hi, + +FYI I'm making progress in teaching propellor about other ARM boards. + +What I have done is deleting `~/.propellor/` and creating a new one. + +The new one is a full .propellor repository. + + +See also <http://propellor.branchable.com/components/> +"""]] diff --git a/src/Propellor/DotDir.hs b/src/Propellor/DotDir.hs index e9253b87..200625e8 100644 --- a/src/Propellor/DotDir.hs +++ b/src/Propellor/DotDir.hs @@ -358,7 +358,7 @@ checkRepoUpToDate = whenM (gitbundleavail <&&> dotpropellorpopulated) $ do withQuietOutput createProcessSuccess $ proc "git" ["log", headrev] if (headknown == Nothing) - then setupUpstreamMaster headrev + then updateUpstreamMaster headrev else do theirhead <- getCurrentGitSha1 =<< getCurrentBranchRef when (theirhead /= headrev) $ do @@ -372,26 +372,29 @@ checkRepoUpToDate = whenM (gitbundleavail <&&> dotpropellorpopulated) $ do d <- dotPropellor doesFileExist (d </> "propellor.cabal") --- Makes upstream/master in dotPropellor be a usefully mergeable branch. +-- Updates upstream/master in dotPropellor so merging from it will update +-- to the latest distrepo. -- --- We cannot just use origin/master, because in the case of a distrepo, --- it only contains 1 commit. So, trying to merge with it will result --- in lots of merge conflicts, since git cannot find a common parent --- commit. +-- We cannot just fetch the distrepo because the distrepo contains only +-- 1 commit. So, trying to merge with it will result in lots of merge +-- conflicts, since git cannot find a common parent commit. -- --- Instead, the upstream/master branch is created by taking the +-- Instead, the upstream/master branch is updated by taking the -- upstream/master branch (which must be an old version of propellor, -- as distributed), and diffing from it to the current origin/master, -- and committing the result. This is done in a temporary clone of the -- repository, giving it a new master branch. That new branch is fetched -- into the user's repository, as if fetching from a upstream remote, -- yielding a new upstream/master branch. -setupUpstreamMaster :: String -> IO () -setupUpstreamMaster newref = do +-- +-- If there's no upstream/master, the user is not using the distrepo, +-- so does nothing. +updateUpstreamMaster :: String -> IO () +updateUpstreamMaster newref = do changeWorkingDirectory =<< dotPropellor go =<< catchMaybeIO getoldrev where - go Nothing = warnoutofdate False + go Nothing = return () go (Just oldref) = do let tmprepo = ".git/propellordisttmp" let cleantmprepo = void $ catchMaybeIO $ removeDirectoryRecursive tmprepo |
