FS#29316 - [makepkg] Cannot download file if cookies is required.

Attached to Project: Pacman
Opened by Vladimir Kravets (EasySly) - Friday, 06 April 2012, 21:42 GMT
Last edited by Allan McRae (Allan) - Friday, 06 April 2012, 22:44 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
makepkg cannot download files if cookies is required. E.g. In the AUR exists packages with such behavior - jdk6, jdk7.
Oracle is restricted direct download of files. To able to download file need to specify cookie for it.

You can see attached patches for makepkg and makepkg.conf which resolved this. Changed jdk6 PKGBUILD is attached also.

Additional info:
* pacman 4.0.2

Steps to reproduce:
Try to install from AUR jdk6 or jre6.

Note:
I think that we have such resolutions for this issu:
1. Since this is not common problem we can commit this fix as is if somebody don't have objections =)
2. Implement new functionality which add to user(package/PKGBUILD) control how should download files.

E.g.:
source=("http://download.oracle.com/otn-pub/java/jdk/$pkgver-$pkgrel/jdk-$pkgver-linux-i586.bin"
'java-control-panel.desktop'
'java-monitoring-and-management-console.desktop'
'java-policy-settings.desktop'
'java-visualvm.desktop'
'java-web-start.desktop'
'jdk6.profile'
'jdk6.profile.csh'
'derby-network-server'
'derby-network-server.conf')
md5sums=('9e4246fc7a6c0759b8a484ff5e820112'
'e4d814c0f310d77ed6990c731bccd0fb'
'4bc2b0be93f76ed07b471e3c89eb5a8a'
'8e3cec7ab641ec449cabd068be583f5c'
'9ba148ebabce8ed3351b813a9a66b6e5'
'619ec32235dcfe454234ef4316f8a7cc'
'803ceeb0d98abdf800cf7452fce12e7c'
'3ce59ff37dc2598a5fcf66613851e1d5'
'a279e195e249000646895d93e199860d'
'4bdff6982c66d24a879c424aaac3d04d')
prebuild() {
wget --header "Cookie: ${cookies}" "${source[0]}
source[0]=$(get_filename "${source[0]}")
}

build() {
}


prebuild will run before calculating crc of the files and before build of course.

I'm not god =) in the bash so sorry for the ugly script, I'm just want to show the idea of the propose.
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 06 April 2012, 22:44 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#28098 
Comment by Vladimir Kravets (EasySly) - Friday, 06 April 2012, 21:43 GMT
BTW, solution can be environment variable also, or something else similar for this.

Any ideas?
Comment by Pierre Schmitz (Pierre) - Friday, 06 April 2012, 22:02 GMT
Imho we shouldn't add such workarounds just because some admins don't know what they are doing.
Comment by Vladimir Kravets (EasySly) - Saturday, 07 April 2012, 22:02 GMT
Heh, ok. I agree with you but in some cases makepkg should have such ability because not all websites have direct link for download source/packages. Let's inform users about what will be doing. E.g. print license or some information which user need to read.
Comment by Dave Reisner (falconindy) - Saturday, 07 April 2012, 22:10 GMT
If you really need this, you can override the DLAGENT for this one specific PKGBUILD. This is not some universal issue. 99% of source downloads do the sane thing and transport the license explicitly with the source rather than make you accept something via a web form.

Technically, you're circumventing the license acceptance here, which probably isn't kosher.

Loading...