Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.

FS#19735 - A 'volatile source' qualifier in PKGBUILDs

Attached to Project: Pacman
Opened by Hans-Kristian Arntzen (Themaister) - Monday, 07 June 2010, 11:33 GMT
Last edited by Allan McRae (Allan) - Monday, 23 January 2012, 22:17 GMT
Task Type Feature Request
Category makepkg
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 3.3.3
Due in Version 4.1.0
Due Date Undecided
Percent Complete 100%
Votes 2
Private No


Summary and Info:

I'd like to request a feature that will help (AUR) packages which rely on customizable files that reside in the source() array.

Certain packages rely on user configurable source, such as kernel building, dwm, etc. The current system with --skipinteg and having to delete the source() array before building is rather painful when dealing with these kinds of packages.

I suggest that there should be some way that package maintainers or users can state a package as volatile, so that package building becomes less painful. Either through a per file basis in the source array or a general one for all sources.


source=('foo' 'volatile: bar')


source=('foo' 'bar')

What is the policy on this matter?

This task depends upon

Closed by  Allan McRae (Allan)
Monday, 23 January 2012, 22:17 GMT
Reason for closing:  Implemented
Additional comments about closing: /commit/?id=1b461374
Comment by Xavier (shining) - Monday, 07 June 2010, 12:22 GMT
AFAIK the soon to be released pacman 3.4 will have a less restrictive skipinteg that doesn't require you to delete the checksums array.
Comment by Allan McRae (Allan) - Tuesday, 08 June 2010, 13:10 GMT
Correct. --skipinteg in pacman-3.4 does a lot more skipping of integrity checks.
Comment by Andres P (llanero) - Sunday, 20 June 2010, 00:24 GMT
But if there's a sources=(foo !bar baz), foo and baz don't loose the integ check.

There's no way of keeping the checks while excluding some files, shy of copying "volatile" sources from startdir.

The startdir alternative is a workaround that disorganizes the whole concept of what a source file is, and !bar is just much more comfortable to write. All the while preventing the need to edit a PKGBUILD to put config.h outside the array.
Comment by Dan McGee (toofishes) - Wednesday, 12 January 2011, 05:30 GMT
Idea: don't mess with sources=(), leave that as is and we don't need more magic ! parsing and things there since we already have rename capability and it should be as easily understandable as possible.

Instead, continue to enforce that you have at least one *sums array in the file. However, when checking integrity of files, treat certain sums values as volatile- e.g the all zeros value. For each sum type, we would require it to be the corresponding length. So you might have something like this:


And then only the last file wouldn't be checked; the rest would.
Comment by Hans-Kristian Arntzen (Themaister) - Wednesday, 12 January 2011, 11:19 GMT
That is a better idea, yes. :) I like it at least. Any plans for implementing this?
Comment by Allan McRae (Allan) - Wednesday, 12 January 2011, 11:41 GMT
The current plan can be summarised as "Patches welcome!"
Comment by Dan McGee (toofishes) - Wednesday, 12 January 2011, 13:55 GMT
Almost a freebie- someone else gets to write the docs for this.
Comment by David Campbell (Davekong) - Tuesday, 01 February 2011, 04:18 GMT
How much value does checking the for correct number of zeros add? Checking for the string "volatile" would make reading the PKGBUILD more clear and allow for situations where we might not want to calculate a hash, such as in my VCS patch where source repositories are left as directories.
Comment by David Campbell (Davekong) - Tuesday, 01 February 2011, 05:16 GMT
Here is an update to the PKGBUILD man page.
Comment by Dan McGee (toofishes) - Tuesday, 01 February 2011, 16:12 GMT
I'm not that enthused about taking 'volatile' as a value. The value of # of zeros is it makes people think about what they are doing (rather than marking everything volatile) and it doesn't mess up the normally consistent size of the array. The fact that no one stepped up and wrote this patch until I came up with something makes me even more less likely to consider it. If I'm entirely in the minority here, let me know, but it seemed nice to keep things at matching length here.

I'm totally fine with skipping the check entirely if you can find a way to do that. We can also tackle the issue of directories when that actually matters in the future makepkg.

Finally, I don't want a git diff (or multiple ones!). I want a formatted patch, with a commit message, with a signoff, that doesn't have tabs and spaces in the wrong places. I sound like (and probably am being) an asshole here, but half-assing this doesn't make our jobs easier.
Comment by Rémy Oudompheng (remyoudompheng) - Tuesday, 01 February 2011, 19:00 GMT
I don't like the idea of using special values (like zero) as a dummy value. It's even more black magic than adding special keywords to source entries, even if the probability of finding a source package with zero md5sum is very small.
Comment by David Campbell (Davekong) - Tuesday, 01 February 2011, 21:59 GMT
The patch I wrote for VCS, which is similar to both of these previous patches, happened before you stepped up and I was unaware of this feature request. When I saw it, I figured why do this in a way that is just going to mean redoing it later. I like the way this patch is written as it still makes sure that the source is present and the get_filepath() function checks for a valid file type. I don't see a simpler way of doing it.

Sorry for posting poor patches. Am I supposed to send an email to the pacman-dev mailing list as well as submit patches on bug reports when they are related to pacman?
Comment by Allan McRae (Allan) - Wednesday, 02 February 2011, 02:57 GMT
I think I prefer using a keyword than all zeros. What pushed me that direction was considering a PKGBUILD with one source file that can change. Then typing the exact number of zeros would be annoying...

But I am not sure about using "volatile". It just does not have the right sound of it to me. Would "variable" be better?