Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#54259 - [scrot] Patches are not being applied

Attached to Project: Community Packages
Opened by Anssi Puustinen (nassi) - Thursday, 01 June 2017, 20:41 GMT
Last edited by Levente Polyak (anthraxx) - Thursday, 01 June 2017, 23:49 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Levente Polyak (anthraxx)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
scrot_0.8-17.debian.tar.gz archive is not being extracted automatically during the building of the package. During makepkg this can be seen as follows:

==> Extracting sources...
-> Extracting scrot_0.8.orig.tar.gz with bsdtar
==> Starting prepare()...
/home/nassi/Downloads/testenv/PKGBUILD: line 21: /home/nassi/Downloads/testenv/src/debian/patches/series: No such file or directory

This of course causes the debian patches to not be applied, and thus options like -u/--focused are missing from the final package. I think this is due to the following difference between the source files:

nassi|Nirvana|~/Downloads/testenv/src file -bizL scrot_0.8-17.debian.tar.gz
text/plain; charset=us-ascii
nassi|Nirvana|~/Downloads/testenv/src file -bizL scrot_0.8.orig.tar.gz
application/x-tar; charset=binary compressed-encoding=application/x-gzip; charset=binary

The file ending for the debian archive should apparently be .tar.xz instead of .tar.gz. Making this change (along with changing the checksum) seems to result in the patches being applied correctly.


Additional info:
* package version(s): 0.8-17


Steps to reproduce:
Build or using pacman install the package from the repositories. Debian patches such as the use of option -u/--focused are missing.
This task depends upon

Closed by  Levente Polyak (anthraxx)
Thursday, 01 June 2017, 23:49 GMT
Reason for closing:  Fixed
Additional comments about closing:  0.8.17-2
Comment by David Thurstenson (thurstylark) - Thursday, 01 June 2017, 21:05 GMT
The issue is less that the encoding is wrong, and more that the source definition is attempting to download a file that doesn't exist, and instead of returning a 404 like any sane server should, it replies with 200 and a search page. With this, makepkg downloads it as a text file, and then when the patches are handled with the for loop in prepare(), nothing matches, so the for loop does nothing, and makepkg carries on without a problem.
Comment by loqs (loqs) - Thursday, 01 June 2017, 22:49 GMT
Does replacing
"http://scrot.sourcearchive.com/downloads/${pkgver%.*}-${pkgver##*.}/${pkgname}_${pkgver%.*}-${pkgver##*.}.debian.tar.gz")
with
"http://scrot.sourcearchive.com/downloads/${pkgver%.*}-${pkgver##*.}/${pkgname}_${pkgver%.*}-${pkgver##*.}.debian.tar.xz")
resolve the issue for you nassi? (after updating checksum to match the new file)
Comment by Anssi Puustinen (nassi) - Thursday, 01 June 2017, 23:01 GMT
@loqs: Yes, that's the fix in all its simplicity. That's what I was trying to say with the "The file ending for the debian archive should apparently be .tar.xz instead of .tar.gz. Making this change (along with changing the checksum) seems to result in the patches being applied correctly." at the end of my bug description. Perhaps it made it sound like only the file extension for the downloaded archive-which-was-not-really-an-archive needed to be changed.

Sorry for being unclear. Just before submitting the report I noticed that the debian.tar.gz wasn't an archive at all (like thurstylark elaborated on), but what looked like a HTML file. After that I went to see what files were actually available, and came to the conclusion that the .xz file must be what was needed. Tried it out and it worked, so I added the last bit of the description.

Loading...