Recent

Author Topic: Online Package Manager  (Read 835963 times)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Online Package Manager
« Reply #120 on: October 26, 2016, 01:07:32 am »
Quote
@molly
Not wanting to play a party pooper there but, how do you know master is in fact the release of those packages ?
I don't, but the package developer does know I suppose  :D. The user will decide if he/she updates the package from the external link or use the default one from the main repository. By the way multiple version of the same package is also allowed.
In both cases some admin work is required. The JSON file must be updated with the package's version info etc.
I don't think this can be automated as there must be control over the trusted package sources.

But of course I could provide a copy of the current release under a standard name, i.e. the current release of fpspreadsheet (fpspreadsheet-1.6.2.zip) could be provided also as fpspreadsheet.zip, or fpspreadsheet-release.zip.
It does not make much difference as the JSON file must be updated anyway.
BTW, you just provided a ZIP-file link to SourceForge server. Clearly it is possible although GetMem doubted it earlier.

I don't think the package manager should in general provide latest development (trunk) versions. The latest "stable" release should be the default.
There can be exceptions like the CCR packages without a maintainer. They have never been stable. Any bug fix they get makes them better. Yet those bug fixes happen so seldom that the package manager maintenance is not a burden either.

« Last Edit: October 26, 2016, 01:20:53 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Online Package Manager
« Reply #121 on: October 26, 2016, 01:18:14 am »
The server containing the repository needs something special? Edit (Seems that not).

Because if not (for example is just a json and zip files) you can use GitHub: create a new git repository and use it as website with github pages, then you can upload new packages using tortoisegit or your favourite tool and the changes are automatic.

It is better to have a proper server. It allows more options in future, including a server side SW to handle user feedback and grading / voting system.
GitHub can be later supported in the same way that Delphinus does now, as an alternative to the contralized server.

Quote
If you need help just ask.-

Somebody could start to think about the server side SW. Something similar with NuGet maybe ...
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #122 on: October 26, 2016, 01:58:52 am »
You are right. Also both GitHub and source forge has a limit in bandwidth, having an own server it can be managed as it grows.

About the server side software I have a poor experience in PHP only. So I'm not the indicated. But maybe is a ready to use solution out there that can be adapted to the repository needs.

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #123 on: October 26, 2016, 06:44:54 am »
Quote
@Juha
It does not make much difference as the JSON file must be updated anyway.
BTW, you just provided a ZIP-file link to SourceForge server. Clearly it is possible although GetMem doubted it earlier.
Then I fail to see the purpose of the external download link. If the json must be updated each time, it's better to update the package itself, with the automated tool it takes only 1 minute or so. The external link should point to the trunk perhaps? Pointing to a stable version makes no sense at all.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Online Package Manager
« Reply #124 on: October 26, 2016, 08:46:35 am »
Then I fail to see the purpose of the external download link. If the json must be updated each time, it's better to update the package itself, with the automated tool it takes only 1 minute or so. The external link should point to the trunk perhaps? Pointing to a stable version makes no sense at all.
Ok, I was thinking of the updated package's version number. I thought it should be visible in the list of available packages. Maybe it is not important, the versions of installed packages are visible anyway.

Having an external link to a stable version makes a lot of sense if the package author can update the package by himself without bothering the maintainer.
Now the changed version info cannot be transferred but we can figure out a way to do that, too, if needed.

In my opinion revision control tools (SVN, Git etc.) are still the best way to get latest cutting edge development versions, at least for packages that are actively developed.
A package author can of course provide development snapshots for package manager, in addition to stable releases, if he has time and energy.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Groffy

  • Full Member
  • ***
  • Posts: 204
Re: Online Package Manager
« Reply #125 on: October 26, 2016, 12:21:23 pm »
Hi,

is it somehow possible to configure a connection with a proxy in between?

Thanks for the great work!
Linux Mint / Windows 10 / Lazarus 3.0.0 / trunk -qt

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #126 on: October 26, 2016, 12:27:45 pm »
...
It is better to have a proper server. It allows more options in future, including a server side SW to handle user feedback and grading / voting system.
GitHub can be later supported in the same way that Delphinus does now, as an alternative to the contralized server.
..

+1
A repository of packages will only be as good as its maintenance.  This will surely include user feedback - and someone to take notice of it.
If there were only a simple voting system to start with, it would be very useful to potential users.
« Last Edit: October 26, 2016, 12:30:01 pm by minesadorada »
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Online Package Manager
« Reply #127 on: October 26, 2016, 02:26:47 pm »
If there were only a simple voting system to start with, it would be very useful to potential users.
No, initially there will not be even a simple voting system. It requires server side SW.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Online Package Manager
« Reply #128 on: October 26, 2016, 03:24:32 pm »
I understood some people used the
 Repository  ->  "Create repository package"
feature of the package manager. Is it so?
I tested it with some existing Lazarus packages under Components/ directory, for example with aggpas.
After selecting an output directory the GUI says:
 "Compressing package. Please wait ..."
and it continues forever. Only the Cancel button stops it. A package was created anyway but my ZIP tool (Ark) says it is corrupt, although it shows the contents which look OK to me.

Does it work for others? I can try to debug it.
My system is a 64-bit Manjaro Linux. Could it be a 64-bit issue?
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

minesadorada

  • Sr. Member
  • ****
  • Posts: 452
  • Retired
Re: Online Package Manager
« Reply #129 on: October 26, 2016, 03:34:37 pm »

Does it work for others? I can try to debug it.
My system is a 64-bit Manjaro Linux. Could it be a 64-bit issue?
Environment: Win 10 64-bit
I downloaded and installed the package manager today and did the same test as you.  It zipped the component folder quickly (though the manufactured zip contained the /backup and /lib folders which doesn't seem good).
I have WinZip on my system as default archiver.

Maybe it's a linux thing?
GPL Apps: Health MonitorRetro Ski Run
OnlinePackageManager Components: LazAutoUpdate, LongTimer, PoweredBy, ScrollText, PlaySound, CryptINI

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Online Package Manager
« Reply #130 on: October 26, 2016, 03:49:45 pm »
I understood some people used the
 Repository  ->  "Create repository package"
feature of the package manager. Is it so?
No i did not but, i have now  :)

Same aggpass example on win32 with lazarus trunk from end of sept.

When the archiving is done (e.g. after "Compressing package. Please wait ..."), an explorer window pops up *grmbl*  ;) pointing to the directory where the .zip file was created (my selection during creation) and a information message dialog pops-up saying "Repository Package successfully created".

PS: most likely a 64 bit thing as the zipper classes had a fair amount of patching for that (i am not sure if there are still bug-reports open for that and how new GetMem's version is).
« Last Edit: October 26, 2016, 04:18:51 pm by molly »

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Online Package Manager
« Reply #131 on: October 26, 2016, 04:13:28 pm »
It works fine when I created the bgracontrols and bgracontrolsfx packages under Windows 10 x64, but with lazarus 32 bit so I can't say if it's a problem of x64.

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #132 on: October 26, 2016, 04:32:27 pm »
@Groffy
Quote
is it somehow possible to configure a connection with a proxy in between?
Not yet! I will add that option later.

@Juha
Once I saw that error under linux. It comes from zippper.pp unit(fpc). Please download the latest version, it will display a more meaningful message.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Online Package Manager
« Reply #133 on: October 26, 2016, 09:08:37 pm »
Once I saw that error under linux. It comes from zippper.pp unit(fpc). Please download the latest version, it will display a more meaningful message.
It is caused by wrong type of file attributes in the zipper. I always test code with compiler checks and debug flags set, thus an overflow interrupted it.
I reported the issue with a patch:
 http://bugs.freepascal.org/view.php?id=30800
The same change can be made to your copy.
However I recommend that you create a patch of your new zipper events against the latest FPC trunk which now has many changes related to Unicode and other parts, too.
When it is applied, we can copy the latest version from FPC trunk without worries.
The same goes with your http client fork.

[Edit] Now that the zipper works, I got a valid ZIP file and also a JSON file.
If the idea is to download an extra JSON file from the remote URL then it solves the version number problem.
My understanding is that now only the central server has a JSON file.

With aggpas I got:
Code: [Select]
{
  "PackageData0" : {
    "Name" : "aggpas",
    "Category" : 2,
    "RepositoryFileName" : "aggpas.zip",
    "RepositoryFileSize" : 2943239,
    "RepositoryFileHash" : "aa2d6ca1dd9b54f6d1c607cc260aa588",
    "RepositoryDate" : 4.2669000000000000E+004,
    "PackageBaseDir" : "aggpas\\\/"
  },
  "PackageFiles0" : [
    {
      "Name" : "aggpaslcl.lpk",
      "Description" : "AggPas canvas for LCL",
      "Author" : "Mattias Gaertner,  Milan Marusinec",
      "License" : "Permission to copy, use, modify, sell and distribute this software is granted provided this copyright notice appears in all copies.\nThis software is provided \"as is\" without express or implied warranty, and with no claim as to its suitability for any purpose.",
      "RelativeFilePath" : "lazarus\\\/",
      "VersionAsString" : "1.0.0.0",
      "LazCompatibility" : "1.6, Trunk",
      "FPCCompatibility" : "2.6.4, 3.0.0",
      "SupportedWidgetSet" : "win32\/64, gtk2, carbon",
      "PackageType" : 2,
      "DependenciesAsString" : "LCL, FCL(1.0.0.0)",
      "HomePageLink" : "",
      "DownloadLink" : ""
    }
  ]
}
« Last Edit: October 26, 2016, 09:38:46 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #134 on: October 26, 2016, 10:51:04 pm »
@Juha
Quote
I always test code with compiler checks and debug flags set, thus an overflow interrupted it.
Me too, however under Kali Linux(32 bit) the error does not occur.
Quote
The same change can be made to your copy.
However I recommend that you create a patch of your new zipper events against the latest FPC trunk which now has many changes related to Unicode and other parts, too.
When it is applied, we can copy the latest version from FPC trunk without worries.
The same goes with your http client fork.
Thanks for the patch, I will apply it soon. I did try the httpclient from FPC trunk once, but there was a reference to another unit.  I did not want to copy more then one file.

Quote
Now that the zipper works, I got a valid ZIP file and also a JSON file.
If the idea is to download an extra JSON file from the remote URL then it solves the version number problem.
My understanding is that now only the central server has a JSON file.
If somebody submits a repository package, the json file will be integrated into the main JSON. I'm not sure yet what would be the optimal solution for remote URL's.
Anyway things are looking good, we already have 20 packages in the main repository.

 

TinyPortal © 2005-2018