summaryrefslogtreecommitdiff
path: root/dgit
Commit message (Collapse)AuthorAge
* dgit push-build: Populate the split brain cache if necessaryIan Jackson2022-11-11
| | | | | | Closes: #1019454 Reported-by: Simon McVittie <smcv@debian.org> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Soften message about source-only uploads to NEWIan Jackson2022-11-11
| | | | | | | Prompted by #983056. A proper fix would involve encoding more precise knowledge about Debian archive policy. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit push: Make it warn (by default)Ian Jackson2022-09-04
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit push-*: Provide push-built; make push be an aliasIan Jackson2022-09-04
| | | | | | | | | | No overall chagne in behaviour since in this commit the default configuration is "built". However, the documentation already anticipates the change to add the warning. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* quiltify_trees_differ: Fix comment to reflect what we do nowIan Jackson2022-09-03
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Provide --quilt=singleIan Jackson2022-09-03
| | | | | | | This is to replace single-debian-patch. Closes: #1018984 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit; Pass --include-removal to dpkg-source -bIan Jackson2022-09-03
| | | | | | | Now, with single-debian-patch, we can still handle file removals. (This may fix other corner cases too.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: unrepresentable check: Don't tolerate symlink creationIan Jackson2022-09-03
| | | | | | | | | | | | git diff can represent changes to symlinks, but dpkg-source uses diff(1) to apply changes, and git diff cannot. The result if we permit them is that we end up making source packages that can't be built, or aren't treesame to our HEAD. Reject this early. This resolves the error handling regression in dgit: quilt fixup: Don't use dpkg-source --commit, but git diff Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: unrepresentable check: Normalise the mode for execIan Jackson2022-09-03
| | | | | | | | | | | | | Now we use git diffs, which can represent changes to the executability of files. dpkg-source uses diff(1) to apply these. So it all works. Handle this by normalising the +x bits before seeing if the mode changed. Now we properly support executable files. Closes: #995056 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quilt fixup: Remove some now-unneeded "git checkout"Ian Jackson2022-09-03
| | | | | | | | | quiltify_make_dpkg_patch now uses git diff which doesn't require us to update the working tree. We still need to do it at the end, because the next steps expect it. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quilt fixup: Don't use dpkg-source --commit, but git diffIan Jackson2022-09-03
| | | | | | | | | | | | | | | | | | | | | | | | | | There are many things that dpkg-source can successfully extract, but which it can't create. (This is because dpkg-source largely delegates application to diff(1), and diff can do many more things nowadays.) Most real packages were made with git-format-patch or equivalent nowadays, so use of these features is common. (Hence #949675 and #995056, where even glibc has patches that dpkg-source cannot make.) Right now the practical consequences are: * Creating an executable file is fixed. This actually completes the work for #949675. * Creating a symlink has a regression in the error handling. Previously, dpkg-source --commit failed during quilt fixup. Now, we happily git diff which generates a patch that dpkg-source can't apply. We're going to fix this soon by aligning the representable change checking with reality. * It's faster and less complicated. Closes: #1018143 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quiltify_make_dpkg_patch: Pass git treeish'sIan Jackson2022-09-03
| | | | | | It will need these for running git diff. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quiltify_make_dpkg_patch: RenameIan Jackson2022-09-03
| | | | | | This is going to stop using dpkg-source. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: quilt_fixup_dpkgsource_singlepatch: Add bug commentaryIan Jackson2022-09-03
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Rename quilt_fixup_dpkgsource_singlepatch and add commentIan Jackson2022-09-03
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: commentary: improve a diagramIan Jackson2022-09-03
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Break out quiltify_check_unrepresentableIan Jackson2022-09-03
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Dpkg::Source::Package: Fix require_valid_signature optionIan Jackson2022-09-03
| | | | | | | | | Dpkg::Source::Package::new takes both %opts and `options`, one nested within the other. Closes: #964286 Suggested-by: Guillem Jover <guillem@debian.org> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dry run: Improve a message - fixupIan Jackson2022-08-25
| | | | | | Fix for "invalid variable interpolation" in i18n. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dry run: Do two more operations in the playtreeIan Jackson2022-08-24
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dry run: Gate two rename callsIan Jackson2022-08-24
| | | | | | These are operating on bpd etc., which they shouldn't with dry run. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dry run: Improve a messageIan Jackson2022-08-24
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Move .pc aside while running gbp pq importIan Jackson2022-05-28
| | | | | | | | | The new --ignore-new mode (which is now the default) trips on .pc, which gbp doesn't expect to see. Part of #1005873. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: pseudomerge_version_check: Check for unfinalised changelog entryIan Jackson2022-01-02
| | | | | | | | This detects the case where d/changelog contains an unfinalised entry for $v (the version being overwritten). (This could only happen if $v is not the first entry, so this changelog is quite badly wrong.) Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: pseudomerge_version_check: Move $vclogp scopeIan Jackson2022-01-02
| | | | | | NFC. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Better message for dirty treesIan Jackson2021-09-08
| | | | | Closes: #930930 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: work around deprecation of GZIPIan Jackson2021-09-08
| | | | | | | | | | | | | This makes things slower. But it avoids this warning gzip: warning: GZIP environment variable is deprecated; use an alias or script IMO this deprecation was a bad idea, but the boat has sailed. The new code here is less concurrent (which is bad) but the alternatives are rather more code to set up. Closes: #975624 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: tolerate making quilt patches creating +x filesIan Jackson2021-09-08
| | | | | | | | | | | We allow files with mode 00755 too. This works now This seems to have been an accidental extension to the source formaat, resulting from an extension to GNU `diff` and `patch`, I think it is fair to allow it now. Closes: #949675 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* gitattributes defuse: work even if .git/info/attributes missingIan Jackson2021-01-29
| | | | | | | | | Treat this as "needs setup" rather than "needs adjustment". Closes: #981344 Reported-by: Andrej Shadura <andrewsh@debian.org> Tested-by: Andrej Shadura <andrewsh@debian.org> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* Terminology: Change "rewind" to "rewrite" where appropriateIan Jackson2020-02-02
| | | | | | | | | | | | | | | | | | | | | In #928473, Colin Watson writes: > the use of "rewind" as a synonym for "non-fast-forwarding", while > somewhat common in git terminology, is unfortunate. The terms seem > to be borrowed from video playback systems, where "rewind" is often > just the exact opposite of "fast-forward", and so when I see > "rewinding history" in a few places in dgit(1) my initial > interpretation is that it must mean "updating a ref to point to an > ancestor of the commit that it previously pointed to", whereas I > think dgit(1) means "any push that isn't a fast-forward". I don't > know if I'm the only one for whom it has that connotation. This makes sense. So, I am changing uses of "rewind" which do not mean precisely going back to an ancestor. I think we can often use the word "rewrite" for the more general case, but there are some places where another wording is better. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: absurd: Provide a way for absurd git to print warningsIan Jackson2020-02-01
| | | | | | | | The file ../../absurd-apply-warnings is dumped to dgit's stderr. Nothing writes to it yet, so no overall functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Once again cope with archive skewIan Jackson2019-09-06
| | | | | | | | | | | | | | | Since our http rearrangements, we have lost the ability to try multiple dsc versions which means we cope badly with archive skew. This was an editing error: in 7821907696db dgit: Abolish url_get in favour of url_fetch we omitted to notice that url_get implicitly does what url_fetch needs Ok404 to do. So we didn't add the Ok404 parameter. Fix this by adding it now. Closes: #935874 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: curl: pass CURLOPT_FOLLOWLOCATIONIan Jackson2019-09-06
| | | | | | | This was accidentally dropped in the 9.6 http changes. Closes: #939564 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Fail early when the archive/ tag already exists.Ian Jackson2019-09-05
| | | | | | | | | Suggest using a new version number. We need a new --force option to override this check. Closes: #935802 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Warn when we see what look like our options passed too lateIan Jackson2019-09-05
| | | | | Closes: #934807 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Use distro-info-data to resolve unknown suites to distrosIan Jackson2019-09-05
| | | | | Closes: #931212 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Use $tarball_f_ext_re for test_source_only_changesIan Jackson2019-09-05
| | | | | | | The old ad-hoc regexp doesn't match .tar.gz.{asc,sig}. Closes: #939280 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: vcs-git handling: Strip [...] a la Haskell TeamIan Jackson2019-08-11
| | | | | | | | | | The final syntax of this is not yet agreed but this regexp ought to do the right thing in all reasonable cases. (Ie, no [ ] inside the [ ].) See also #932696 against policy, which is discussing the spec. Closes: #932699 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: update-vcs-git: Use vcs_git_url_of_ctrlIan Jackson2019-08-11
| | | | | | So we strip -b fragments as we ought. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: update-vcs-git: Print a less confusing message if unchangedIan Jackson2019-08-11
| | | | | | | Previously, we would say it was "already configured" which is unspecific and sounds a bit like an error. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: update-vcs-git: Do not crash if url is unchangedIan Jackson2019-08-11
| | | | | | | Previously, we would pass an empty command array to runcmd, causing a mysterious-looking failure. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Break out vcs_git_url_of_ctrlIan Jackson2019-08-11
| | | | | | This should have been done before. No functional change so far. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Fix on NFS (avoid leaking an open file in a directory to rm)Stéphane Glondu2019-08-11
| | | | | | | | | The file debian/source/format was open by "dgit fetch" but never closed, causing failure to remove the extracted tree on NFS. Closes: #933827 Signed-off-by: Stéphane Glondu <glondu@debian.org> Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: WWW::Curl: Double check that $response_body was setIan Jackson2019-08-11
| | | | | | | We are making some assumptions about how WWW::Curl behaves. This confess, with appropriate tests, should catch any future problems. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: WWW::Curl Set $response_body to '' explicitlyIan Jackson2019-08-11
| | | | | | | | | | | | | | | check_for_git calls url_fetch with a WWW::Curl parameter CURLOPT_NOBODY which suppresses saving the body. The result is that CURLOPT_WRITEDATA does not update $response_body. Then, even on success, url_fetch returns undef (which ought to mean 404). Strictly this is a bit sneaky of check_for_git. But, rather than trying to make this interface more formal, just make url_fetch set $response_body to ''. It does return this except in the success case, so the error cases are still handled right. Closes: #934126 Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Slightly more debugging for check_for_git with http[s]Ian Jackson2019-08-11
| | | | Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Abolish url_get in favour of url_fetchIan Jackson2019-07-23
| | | | | | This removes use of LWP from dgit. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: Use libcurl, not @curl, for git checkIan Jackson2019-07-23
| | | | | | | | | | This means that when we sort out our TLS problems this will be fixed too. The remaining use of command-line curl is just to download additional .dsc compoments. I intend to leave that as-is. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: url_fetch: Honour new CurlOptsIan Jackson2019-07-23
| | | | | | No functional change with the existing callers. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
* dgit: url_fetch: Honour new AccessBaseIan Jackson2019-07-23
| | | | | | No functional change with the existing callers. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>