summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Resync translation filesJean Delvare2019-03-145-235/+223
| | | | Also update one string for the setup command (one sentence removed).
* Document QUILT_PC as user-settableJean Delvare2019-03-141-0/+5
| | | | | | | If some users are already changing the value of QUILT_PC and it works, we may as well document it. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* test: Don't hard-code .pcJean Delvare2019-03-149-34/+35
| | | | | | | | | | | Use a variable (QUILT_PC) instead of hard-coding ".pc" as the name of the directory where quilt stores the state of the working tree throughout the test suite. We still set that variable to ".pc" to make it easier to investigate failed test cases, but at least this allows us to promptly test that QUILT_PC can actually be set to any other value and quilt still works. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* test: Prevent test cases from escapingJean Delvare2019-03-141-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | By default, we continue running tests even after a failure, to make diagnostics easier. If a chdir command fails, there is a chance that subsequent chdir commands could accidentally move outside the temporary directory where the test is being run, and then we start messing up with the host's files. In general, the consequence is to leave garbage files and directories behind. However, some of the files can have side effects (for example a "series" file or a "patches" directory could confuse quilt later), and in theory this could also lead to the corruption or deletion of existing files, which is pretty bad. So add a safety check after every chdir command that we are still inside the test case's working directory. If not, stop the test immediately. Note: this is not about being 100% safe and bullet-proof. The only way to achieve this would be to use chroot or even containers. We still need to trust the test cases to not do anything nasty on purpose. This is only protecting against good test cases going wild on failure. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* setup: Align --fast on --slow for series filesJean Delvare2019-03-141-3/+4
| | | | | | | | | Remove the requirement to unpack the source tree manually when using the fast mode of quilt setup and the parameter is a series file. Instead, let --fast behave exactly like --slow, so that both modes can be used interchangeably. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* lib/emacs: read QUILT_PC from config fileDmitry Monakhov2019-03-141-5/+21
| | | | | Read QUILT_PC from config instead of using hardcoded one. Do it as we do with QUILT_PATCHES var.
* New helper function ensure_trailing_newlineJean Delvare2018-11-052-10/+14
| | | | | | | As we now have the need to check for the presence of a trailing newline twice, move the code to a function to avoid redundancy. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* new: Fix series file corruption when trailing newline is missingJean Delvare2018-11-052-0/+29
| | | | | | | | | | | | | When editing the series file with certain editors, it is possible that no trailing newline character is present on the last line. In such case, adding a new patch at the end of the series would corrupt the series file. Prevent that by ensuring that a newline character is always present. This fixes the second issue reported in bug #54295: https://savannah.nongnu.org/bugs/?54295 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Add support for lzip archivesJean Delvare2018-10-093-3/+16
| | | | | | | | | Add support for lzip-compressed archives (*.tar.lz) and patches. This closes bug #54570: https://savannah.nongnu.org/bugs/?54570 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* compat/getopt: Allow non-digit parameter embedded in short optionJean Delvare2018-10-091-9/+4
| | | | | | | | | | | | | | | | | | | The compatibility getopt script allows only digit parameters to be embedded in short options. Util-linux's getopt implementation does not have such a restriction and allows any parameter to be embedded in short options. As a consequence, using the compatibility getopt script would choke for example on "-pab", which is a legal option of the "quilt refresh" command. Remove the limitation on digits so that the compatibility getopt script allows what util-linux allows. This fixes the second half of bug #54772: https://savannah.nongnu.org/bugs/index.php?54772 As a side note, this feature of the compatibility script was broken anyway, as it would output the digits in reverse order. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* compat/getopt: Handle a second separatorJean Delvare2018-10-091-3/+10
| | | | | | | | | | | | | | | | | | getopt can be passed 2 '--' separators. The first one tells that getopt options are over and target program options start. The second one tells that the target program's options are over and following arguments should be treated as non-options even if they look like options. This second separator was not handled, causing the compatibility getopt script to treat the following arguments as options, eventually failing one way or another. Properly detect and handle the second separator. This fixes the first half of bug #54772: https://savannah.nongnu.org/bugs/index.php?54772 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* quilt mail: Complain when a patch doesn't existAndreas Gruenbacher2018-07-261-2/+10
| | | | | When a patch doesn't exist, complain about that instead of complaining that no subject header can be extracted.
* mail: Remove Content-Disposition headersAndreas Gruenbacher2018-07-032-6/+3
| | | | | | | | | | | | The Content-Disposition headers quilt has been adding since 2015 are causing problems with Thunderbird and Gmail, which display patches as attachments instead of text if this header is present and includes a filename. This breaks email-based patch reviewing and isn't likely to get fixed on the email client side, so stop adding those headers. Recipients of patches via email already need a mechanism to construct filenames for messages coming from anything but quilt, so this change is unlikely to cause major problems for existing users.
* mail: Use 'Message-ID' consistently all over the placeThomas Gleixner2018-06-041-2/+2
| | | | | | | | | | | Improve overall consistency even if mail headers are case-insensitive. (The mail threading broken by commit 1d659beb "quilt/mail: Remove procmail dependency" was already fixed by commit 360b85e1 "mail: Fix patch set threading".) Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
* quiltrc: Support all patch formats by defaultJean Delvare2018-05-031-3/+1
| | | | | | | | | Passing --unified to patch by default prevents using other patch formats. Out of curiosity, I checked if it helped with performance but was not able to measure any improvement. So stop passing --unified by default. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Mention guards in quilt manual pageJean Delvare2018-04-061-1/+2
| | | | | | Most people don't know about the guards helper which can be used to generate series files. Mentioning it in the quilt manual page should help raise the awareness.
* test: Clean up when interruptedJean Delvare2018-03-261-0/+2
| | | | | | | If the user hits Ctrl+C while a test is running, don't leave our working directory behind. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* test: Be verbose on directory errorJean Delvare2018-03-261-3/+3
| | | | | | Being a little more verbose when mkdir or chdir fails, can't hurt. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* quilt.el: fix emacs compatibility issueleo2017-11-021-3/+3
| | | | | | | | | | | | | | | | One user reported the following issue as bug #51977: Lisp error: (wrong-type-argument stringp nil) file-name-nondirectory(nil) (let ((p (file-name-nondirectory (quilt-top-patch)))) (if (not p) "none" (let ((p2 (file-name-sans-extension p))) (if (< (length p2) 10) p2 (concat (substring p2 0 8) ".."))))) quilt-short-patchname() (concat " Q:" (quilt-short-patchname)) (setq quilt-mode-line (concat " Q:" (quilt-short-patchname))) quilt-update-modeline() This change should fix it. https://savannah.nongnu.org/bugs/?51977
* test/space-in-work-dir: Increase code path coverageJean Delvare2017-10-271-0/+5
| | | | | Increase the code path coverage of test case space-in-work-dir by running one command from a subdirectory.
* patchfns: Quote directory nameMichael Bunk2017-10-251-1/+1
| | | | Fixes change into a basedir with spaces in the name.
* Correct fold -R helptext in German localeOlaf Hering2017-07-241-1/+1
|
* Resync configure script with configure.ac.Jean Delvare2017-07-181-96/+186
| | | | | Fixes: 402f78e4b693 ("configure: md5sum is optional") Fixes: f0b63c5b7533 ("setup: Add basic support for p7zip (.7z) archives")
* Fix French translation of mail help textJean Delvare2017-07-181-1/+1
| | | | Fixes: 24dc4930b645 ("Translation updates...")
* Quote series file name everywhereJean Delvare2017-06-062-18/+169
| | | | | | | | | Don't choke if the series file name contains a space or any other special character. "$SERIES" was already quoted in various places, do it consistently so that quilt will work in this situation. And add a basic test case to verify that it actually works. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* test: Handle alternative QUILT_PATCHES valuesJean Delvare2017-05-093-8/+8
| | | | | | | | | | When using an alternative QUILT_PATCHES value, we can't use %{P} in the test case, because P is set in the Makefile before the test case has a chance to redefine QUILT_PATCHES. Instead we have to make the prefix optional in the output of the quilt commands, so that the test will succeed regardless of QUILT_PATCHES_PREFIX being set or not. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* test: Consistently use %{P} and %{_P}Jean Delvare2017-05-0933-352/+352
| | | | | | | | | | | There is no point in defining P and _P in the Makefile to allow for QUILT_PATCHES_PREFIX to be set or unset if we do not use these variables consistently in the test suite. Replace hardcoded "patches/" with %{P} or %{_P} throughout the test suite wherever relevant so that unsetting QUILT_PATCHES_PREFIX in test.quiltrc actually works. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* test: Drop incorrect uses of %{P}Jean Delvare2017-05-096-11/+11
| | | | | | | | | %{P} only makes sense when checking the output of a quilt command. The value of QUILT_PATCHES_PREFIX can obviously not affect what the user is writing on the command line, nor the output of other commands. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Fix Makefile when QUILT_PATCHES_PREFIX isn't setJean Delvare2017-05-091-2/+2
| | | | | | | | | | | | Unsetting QUILT_PATCHES_PREFIX in test/test.quiltrc would trigger a syntax error on "make check": /bin/bash: -c: line 3: syntax error near unexpected token `;' /bin/bash: -c: line 3: `; \' Makefile:410: recipe for target 'test/.add-filename-check.ok' failed make: *** [test/.add-filename-check.ok] Error 1 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* diff/refresh: Add missing quotes in basename callJean Delvare2017-05-022-1/+56
| | | | | | | | | | The basename call in function diff_file would fail if any component of the path has a space in its name. This fixes bug #50862: https://savannah.nongnu.org/bugs/?50862 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* header: Fix patch corruption when trailing newline is missingJean Delvare2017-05-022-0/+20
| | | | | | | | | | | | When editing a patch header with certain editors, it is possible that no trailing newline character is present on the last line. In such case, the patch would be corrupted. Prevent that by ensuring that a newline character is always present. This fixes bug #50841: https://savannah.nongnu.org/bugs/?50841 Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Run tests again if test.quiltrc changesJean Delvare2017-05-021-2/+2
| | | | | | | If any change is made to the test environment, we want to run the checks again, to catch any problem early. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* test: Fix /bin/sh filteringJean Delvare2017-04-251-1/+1
| | | | | | | /bin/sh may not include a line number in its error messages, fix the filtering when it does not. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* test: Escape curly braces in regexJean Delvare2017-04-251-2/+2
| | | | | | | | | | Curly braces in perl regex are supposed to be escaped, recent versions of perl complain when they aren't: Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE (\w+)}/ at ./run line 114. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE \?}/ at ./run line 290. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* Run the tests again if test runner changesJean Delvare2017-04-251-2/+2
| | | | | | | If any change is made to the tester script, we want to run the checks again, to catch any problem early. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* quilt.el: don't strip directory in quilt-top-patch as it could be a part of ↵leo2017-04-251-3/+2
| | | | patch name
* quilt.el: replace deprecated toggle-read-only function call with read-only-modeleo2017-04-251-3/+3
|
* quilt.el: define quilt-edit-top-only before it's usedleo2017-04-251-1/+1
|
* test: Allow keeping the working directory on failureJean Delvare2017-04-141-2/+3
| | | | | | | | Add an option to keep the working directory after a test has failed. Also include the test name in the working directory name to make it easier to figure out which test failed later. Signed-off-by: Jean Delvare <jdelvare@suse.de>
* mail: Fix patch set threadingJean Delvare2017-04-141-1/+1
| | | | | | | | | | | | | | Let patches reference the introduction message so that the patch set is properly threaded by MUA. This used to work but was broken by accident. This fixes bug #50775: https://savannah.nongnu.org/bugs/index.php?50775 Signed-off-by: Jean Delvare <jdelvare@suse.de> Fixes: 1d659bebaf3d ("quilt/mail: Remove procmail dependency") Tested-by: Okash Khawaja <okash.khawaja@gmail.com> Acked-by: Kent R. Spillner <kspillner@acm.org>
* configure: md5sum is optionalJean Delvare2017-03-101-2/+2
| | | | | We only need md5sum for the setup command, like rpmbuild and 7z. So treat it as optional.
* setup: Add basic support for p7zip (.7z) archivesJean Delvare2017-03-104-2/+47
| | | | | | | | | | | | | | This should work in the most basic case (no option used.) This only covers the case of archives being compressed with 7z, not patches. This should fix bug #49754: http://savannah.nongnu.org/bugs/?49754 Remaining issues: * 7z could also be used to compress patches, although nobody sane would do that. * 7z is very verbose, and doesn't offer any option to be silent or even just quieter.
* patch-wrapper: Make the patch names that quilt shows more convenientAndreas Gruenbacher2016-12-081-14/+31
| | | | | | | | | When operating on an rpm package, create links to the rpm sources and build directories and make patch names relative to these links. This is more convenient than using ugly absolute paths. This patch has been in the SUSE quilt package since February 2006, it seems to be about time to get it upstream.
* Makefile: Add updatepo targetJean Delvare2016-11-151-1/+3
| | | | | | Add a target "updatepo" which translators can run to update the translation files. Then they can look for strings to translate and send us a patch or the updated translation file(s).
* Generate guards man page in doc/Jean Delvare2016-11-152-4/+4
| | | | | For consistency, the guards manual page should be generated under doc/, not bin/.
* Set version to 0.65.v0.65Jean Delvare2016-11-093-10/+41
|
* Update German translationHolger Wansing2016-11-081-3/+4
|
* Update Russian translationSergey Basalaev2016-11-081-3/+4
|
* Resync translation filesJean Delvare2016-11-072-20/+26
|
* Update the Japanese translation for Quilt 0.65Yasushi SHOJI2016-11-041-14/+19
|