In that case, a really cheap hack to get around the whole mess would be to have Apple's store capable of requesting the download from the original publisher's website, rather than storing the file themselves and copying as needed. That way memcpy(3) is invoked on a machine owned by the publisher and, in the required sense, the copy is being made by somebody not the distributor. In a similar sense, Best Buy could order boxed copies of Ubuntu on demand, as customers ask for them, and if Ubuntu were kind enough to set up a desk in the parking lot, that "just-in-time" copy would take time comparable to a download request.
Overall however this seems to show a shortcoming of the legal framework around this stuff; it wouldn't be unreasonable for it to be possible for the author of some program to accept responsibility for copies made by Apple.
A separate problem seems to be the issue of restriction. This is a little thornier. I wonder would it be enough for the program, when downloaded (direct from the publisher's servers, using the App Store as nothing but a directory), for the program to show a notice saying "this is free software; source code is at X along with instructions for running it on this and other platforms"? Figuratively this would leave the user empowered to do anything they could with ordinary free software; the fact that the presently running copy can't be modified in situ ceases to restrict their actions in any meaningful way.