Bug 42943 - Save uploaded Debian packages in a temporary folder
Save uploaded Debian packages in a temporary folder
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center - Self Service
UCS 4.1
Other Linux
: P5 normal (vote)
: ---
Assigned To: Eduard Mai
Alexander Kläser
:
Depends on:
Blocks: 42788
  Show dependency treegraph
 
Reported: 2016-11-14 10:52 CET by Alexander Kläser
Modified: 2017-04-18 08:03 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2016-11-14 10:52:24 CET
Currently, uploaded Debian packages are directly uploaded into the component folder resulting also in overriding existing packages. When uploading a Debian package and then canceling, the modification of the package status will persist.

The package files should be uploaded into a temporary folder instead. Only with the click on "save" should they be moved into their final destination.

A cron job (or at jobs) could be helpful for cleaning up old uploaded files from time to time.
Comment 1 Alexander Kläser univentionstaff 2016-11-14 14:59:53 CET
The adjustments of the JavaScript code are part of this Bug, as well (taken From Bug 42788):
> TODOs for Debian package upload:
> * The list is not sorted and should be refreshed
> * Only 500kb are allowed for the upload
> * The checkbox for overriding older package versions is not correctly considered 
>   by the JavaScript code.
Comment 2 Eduard Mai univentionstaff 2016-11-15 15:03:01 CET
r74443: WIP, uploaded deb packages are only kept if changes are saved by the user.

Package: univention-management-console-module-appcenter-selfservice
Version: 1.0.0-88.78.201611151501
Comment 3 Eduard Mai univentionstaff 2016-11-15 17:00:17 CET
r74451 removes upload size limit and deletion of duplicate packages on upload.

Package: univention-management-console-module-appcenter-selfservice
Version: 1.0.0-89.79.201611151657
Comment 4 Alexander Kläser univentionstaff 2016-11-16 10:44:19 CET
(In reply to Eduard Mai from comment #3)
> r74451 removes upload size limit and deletion of duplicate packages on
> upload.
> 
> Package: univention-management-console-module-appcenter-selfservice
> Version: 1.0.0-89.79.201611151657

The deletion of duplicated packages should be handled exclusively in JavaScript. I adapted the logic in the backend and added handler for the logic in JavaScript.

univention-management-console-module-appcenter-selfservice (1.0.0-91):
r74462 | Bug #42943: adjust upload logic in JavaScript and Python backend

TODO: We still need a cron job to remove old files in the folder /var/cache/univention-appcenter-selfservice/uploads.
Comment 5 Eduard Mai univentionstaff 2016-11-16 11:52:36 CET
(In reply to Alexander Kläser from comment #4)
> (In reply to Eduard Mai from comment #3)
> > r74451 removes upload size limit and deletion of duplicate packages on
> > upload.
> > 
> > Package: univention-management-console-module-appcenter-selfservice
> > Version: 1.0.0-89.79.201611151657
> 
> The deletion of duplicated packages should be handled exclusively in
> JavaScript. I adapted the logic in the backend and added handler for the
> logic in JavaScript.
> 
> univention-management-console-module-appcenter-selfservice (1.0.0-91):
> r74462 | Bug #42943: adjust upload logic in JavaScript and Python backend
> 
> TODO: We still need a cron job to remove old files in the folder
> /var/cache/univention-appcenter-selfservice/uploads.

Cron job was added with r74464 and r74465.

Package: univention-management-console-module-appcenter-selfservice
Version: 1.0.0-93.80.201611161149
Comment 6 Alexander Kläser univentionstaff 2016-11-25 10:01:08 CET
The new version of the App Provider Portal has been released and this bug will thus be closed.