You are not logged in.

#1 2016-06-27 21:48:07

evotopid
Member
From: Switzerland
Registered: 2013-02-03
Posts: 8

[Solved] How to handle package updates with same source file name

I'm aware I'm probably doing some things wrong but I'm trying to package firefox-developer-de in an appropriate manner.

I wrote a script that updates the PKGBUILD whenever there is a nightly update for the channel (I currently keep it in the AUR git repo but if this isn't supposed to be there I can move it somewhere else). I know that in "firefox-developer" it was done without updating the nightly version every day and using the SKIP checksum but the issue I saw with this is that users won't normally upgrade the package to newer nightly versions using an AUR helper (except if it was configured in a way that would make sure that the sources are downloaded every day anew) which is AFAIK a security issue.

Now the issue is that the downloads have always the same filename, ie. "firefox-49.0a2.de.linux-x86_64.tar.bz2" so if a user downloads an updated version of the PKGBUILD with their AUR helper of choice and that one has the source still cached then nothing is going to happen (ie. the sources aren't even fetched) and the build will fail with a checksum error because it's expecting the new file that isn't downloaded because the old file already existed.

What do I do?

  • Rename source files at the beginning, ie. in prepare(). But isn't this bad also because it will severely clutter the build directory over time.

  • Delete the sources zip file at the end of package()

  • Something else?

Last edited by evotopid (2016-06-27 22:06:39)

Offline

#2 2016-06-27 21:54:39

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] How to handle package updates with same source file name

You can specify it as
source=('filename::fileuri')

So make the filename contain the $pkgver.

The build directory will be cleaned automatically if the user performs a clean build (`makepkg -C`) and the $SRCDEST is likewise the responsibility of the user to take care of.

Last edited by eschwartz (2016-06-27 21:55:23)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2016-06-27 22:05:32

evotopid
Member
From: Switzerland
Registered: 2013-02-03
Posts: 8

Re: [Solved] How to handle package updates with same source file name

Thanks for the quick reply, I didn't think it would be actually this easy but it was exactly what I was looking for. smile (I don't know why I didn't think about this before...)

And I guess it makes sense to let $SRCDEST be the responsibility of the user (otherwise there would be endless use cases to be accomodated).

Offline

Board footer

Powered by FluxBB