Repository mirror and Indy installation question lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- senglit · 2020-03-13 14:06 Hi, all 1. Is there any mirror site for the OPM? I'm in China and using a huge intranet Usually I can't connect to the OPM repository. Maybe success onece or twice per month. It's a huge pain for me. 2. I want to use Indy for a c/s project. Since I can not access OPM repository, I followed the wiki instruction and download the indy-10.2.0.3. And also add Unit IdGlobal and IdStreamVCL from the FPC folders into the indylaz.lpk. When I install the package, an error occured in Unit IdAntiFreeze line 78 "IdAntiFreeze.pas(78,15) Error: Forward declaration not solved "Process;"". How to solve it? 3. I want to use Indy only because many years ago I used it with Dephi7. Maybe it's already out of time? What Component do you suggest for my c/s project? Thanks a lot! ---------------------------------------------------------------------- af0815 · 2020-03-13 17:14 ad 3) LNet or Synapse ---------------------------------------------------------------------- Remy Lebeau · 2020-03-13 18:04 Quote from: senglit on March 13, 2020, 03:06:29 pmI want to use Indy for a c/s project. Since I can not access OPM repository, I followed the wiki instruction and download the indy-10.2.0.3. 10.2.0.3 is an extremely old version of Indy.  The current version is 10.6.2.  So whatever wiki you are referring to is outdated (is it this one? That page is no longer linked to on the main Indy site). Quote from: senglit on March 13, 2020, 03:06:29 pmAnd also add Unit IdGlobal and IdStreamVCL from the FPC folders into the indylaz.lpk. Case in point - the latest indylaz.lpk already has IdStream.pas and IdStreamVCL.pas (but not IdGlobal.pas) added to it. Quote from: senglit on March 13, 2020, 03:06:29 pmWhen I install the package, an error occured in Unit IdAntiFreeze line 78 "IdAntiFreeze.pas(78,15) Error: Forward declaration not solved "Process;"". How to solve it? In the latest IdAntiFreeze.pas, there is no declaration of Process() on line 78, that line is an {$HPPEMIT} statement.  Process() is declared on line 126 instead. In any case, the error message means that Process() is declared but not implemented.  Indeed, its implementation is {$IFDEF}'ed based on platform.  Currently, Process() is implemented if either UNIX, WINDOWS, or WIDGET_WINFORMS (ie .NET) is defined.  Which platform are you trying to compile Indy for? Quote from: senglit on March 13, 2020, 03:06:29 pmI want to use Indy only because many years ago I used it with Dephi7. Maybe it's already out of time? Indy is still actively maintained (by me).  However, I am not a FreePascal/Lazarus user myself, so most of Indy's support for FPC/Lazarus comes from the FPC community. ---------------------------------------------------------------------- senglit · 2020-03-14 02:13 Thanks for Remy Lebeau's answer. Glad to know that Indy is still alive. Installed version 10.6.2 as you recommended, and it works very well. Thank you. My project is about to work on windows platform. I think Indy will do big help since I used it before and got some experiences. ---------------------------------------------------------------------- senglit · 2020-03-14 02:22 Quote from: af0815 on March 13, 2020, 06:14:41 pmad 3) LNet or Synapse I also tried LNet yesterday when I failed compiling Indy. The process and the result were quite like that of Indy. 1. OPM repository was not accessable. 2. Download 0.6.5 version. 3. compile and found it failed with error message: Fatal: Cannot find sslsockets used by fphttpclient. Make sure all ppu files of a package are in its output directory. ppu in wrong directory=C:\lazarus\fpc\3.0.4\units\x86_64-win64\fcl- net\sslsockets.ppu.. And I checked the folder and found sslsockets.ppu was there! I am missing OPM very much. ---------------------------------------------------------------------- balazsszekely · 2020-03-14 09:09 @senglit Can you install a html server at home? For windows, XAMP it's a good choice:  https://www.apachefriends.org/ro/index.html If yes, then I can upload the whole OPM repository somewhere(~700 Mb) and you can use it from your local computer. If this is not a option, then tell me what packages do you need. I will upload manually to your webpage of choice. PS: Can you access the following webpage? https://packages.lazarus- ide.org/, if yes you can also dowload the packages from there. ---------------------------------------------------------------------- lucamar · 2020-03-14 10:00 Is it realy just 700 MiB? If so, maybe you could make an ISO and update it, say, every 3 or 6 months to have a reasonably up-to-date portable repository which could be burnt to a CD. If OPM could access it, perhaps as an option, it would open the door to installs on isolated (non-connected) machines. ---------------------------------------------------------------------- balazsszekely · 2020-03-14 11:20 @lucamar Quotes it realy just 700 MiB?Yes. It's small because only contains package source files zipped. There are two bigger packages RESTDataware.zip(~172 MB) and CastleGameEngine.zip(~125 MB). If OP doesn't need them the size goes down to ~400 MB QuoteIf so, maybe you could make an ISO and update it, say, every 3 or 6 months to have a reasonably up-to-date portable repository which could be burnt to a CD. I can do that. For a while a kept a big zip here: https://packages.lazarus-ide.org/, basically the whole repository archived exactly for this kind of purposes. It was updated each time I updated the repository. After a while I was under the impression that is not used, so I deleted it. QuoteIf OPM could access it, perhaps as an option, it would open the door to installs on isolated (non-connected) machines.Unfortunately OPM needs a html server, because this is how it works under usual circumstances. First connects to  https://packages.lazarus-ide.org/, downloads the packagelist.json file, parse it, then populates the package tree. In trunk there is an option the load the json from local file(if available). So for trunk users the html server is not a necessity. ---------------------------------------------------------------------- lucamar · 2020-03-14 13:22 A big zip would work too; I'd simply unzip it and burn the result to CD. The bummer is the need for a server, but it's not a big deal; one can just fire up, say, lighthttpd and point it to the local "repo". Or wait for the next Lazarus release ---------------------------------------------------------------------- senglit · 2020-03-14 14:28 Quote from: GetMem on March 14, 2020, 10:09:42 amCan you install a html server at home? For windows, XAMP it's a good choice:  https://www.apachefriends.org/ro/index.html If yes, then I can upload the whole OPM repository somewhere(~700 Mb) and you can use it from your local computer. If this is not a option, then tell me what packages do you need. I will upload manually to your webpage of choice. Unfortunately no. We usually use dynamic IP address since the IP Address resources are rare in China. And there are so many walls and gateways(you can call them blockers). It's impossible for me to build a website in home. Quote from: GetMem on March 14, 2020, 10:09:42 amPS: Can you access the following webpage? https://packages.lazarus-ide.org/, if yes you can also dowload the packages from there. I tried this page before and it seems not work properly, please see the attached screen shot. But I found I can access sourceforge and there's a lazarus repository project, from which I downloaded lNet 0.6.5 and it failed to be compiled with my Lazarus 2.0.6. I guess this page is not a lazarus official page. And I can not find Indy on this page. The screenshot is also attached. Thanks for your warmheated help. ---------------------------------------------------------------------- balazsszekely · 2020-03-14 14:50 @lucamar QuoteThe bummer is the need for a server, but it's not a big deal; one can just fire up, say, lighthttpd and point it to the local "repo". Or wait for the next Lazarus release Exactly.  @senglit QuoteUnfortunately no. We usually use dynamic IP address since the IP Address resources are rare in China. And there are so many walls and gateways(you can call them blockers). It's impossible for me to build a website in home. It has nothing to do with your IP address, you don't have to build a website either, just install a program on your local computer. Can you do it? Do you have administrative rights? QuoteBut I found I can access sourceforge and there's a lazarus repository project, from which I downloaded lNet 0.6.5 and it failed to be compiled with my Lazarus 2.0.6.Those are old packages. Tell me what packages do you need and I will upload somewhere or pm your email address so I can send it to you. ---------------------------------------------------------------------- eljo · 2020-03-14 14:55 Quote from: GetMem on March 14, 2020, 03:50:37 pm@lucamar QuoteThe bummer is the need for a server, but it's not a big deal; one can just fire up, say, lighthttpd and point it to the local "repo". Or wait for the next Lazarus release Exactly.  Can't this be solved by downloading the components directly from the authors GIT/SVN repo instead? What does it take to do so? Would adding a the Json file in the repo be enough? I'm thinking GITHUB here where one can download the repo as a zip from the web interface directly, he end user might have to play with repo lists though. ---------------------------------------------------------------------- balazsszekely · 2020-03-14 15:37 @eljo QuoteCan't this be solved by downloading the components directly from the authors GIT/SVN repo instead? What does it take to do so? Would adding a the Json file in the repo be enough? I'm thinking GITHUB here where one can download the repo as a zip from the web interface directly, he end user might have to play with repo lists though. This feature is already implemented in OPM. Please take a look at the attached screenshot. The green column is the official repository, you can find it here: https://packages.lazarus-ide.org/. Basically it contains a json(https://packages.lazarus-ide.org/packagelist.json) and a lot of zip files. You can copy the files to another webserver if you like, all you have to do is change the repository address(screnshot2). More over you can create your own private repository. The orange column represents the package available at the maintainers werbpage. It can be github, sourceforge or anything else. The OP cannot access the central repository, so it cannot get the package list. Installing a local webserver would solve the issue. ---------------------------------------------------------------------- eljo · 2020-03-14 17:53 Quote from: GetMem on March 14, 2020, 04:37:27 pm@eljo QuoteCan't this be solved by downloading the components directly from the authors GIT/SVN repo instead? What does it take to do so? Would adding a the Json file in the repo be enough? I'm thinking GITHUB here where one can download the repo as a zip from the web interface directly, he end user might have to play with repo lists though. This feature is already implemented in OPM. Please take a look at the attached screenshot. The green column is the official repository, you can find it here: https://packages.lazarus-ide.org/. Basically it contains a json(https://packages.lazarus-ide.org/packagelist.json) and a lot of zip files. You can copy the files to another webserver if you like, all you have to do is change the repository address(screnshot2). More over you can create your own private repository. The orange column represents the package available at the maintainers werbpage. It can be github, sourceforge or anything else. The OP cannot access the central repository, so it cannot get the package list. Installing a local webserver would solve the issue. 1) thanks for the info good to know one can mirror the official repo 2) I hasn't thinking on the terms of a repo mirror but by the terms of eliminating the repository altogether and replacing it with just a json with a bunch of links to the "official" component repositories maintained by their owners. Having github in mind I know for a fact that I can download any repo as a zip file by going to a specific address eg https://github.com/BerndGabriel/HtmlViewer/archive/HtmlViewer-11.9.zip for the 11.9 release of https://github.com/BerndGabriel/HtmlViewer/archive/master.zip for the current development version and by downloading the zip directly from the author's repo you save in server space and bandwidth your self. does it take something special? a json file that describes which packages to compile and install and at which order for example? PS: no affiliation with the component or the developer I just wanted a repo with multiple tags/ releases for demo purposes. ---------------------------------------------------------------------- balazsszekely · 2020-03-14 18:54 Quote2) I hasn't thinking on the terms of a repo mirror but by the terms of eliminating the repository altogether and replacing it with just a json with a bunch of links to the "official" component repositories maintained by their owners. Having github in mind I know for a fact that I can download any repo as a zip file by going to a specific address eg https://github.com/BerndGabriel/HtmlViewer/archive/HtmlViewer-11.9.zip for the 11.9 release of https://github.com/BerndGabriel/HtmlViewer/archive/master.zip for the current development version and by downloading the zip directly from the author's repo you save in server space and bandwidth your self. does it take something special? a json file that describes which packages to compile and install and at which order for example? PS: no affiliation with the component or the developer I just wanted a repo with multiple tags/ releases for demo purposes. Your idea is good.  Delphinus, the delphi package manager works in a very similar fashion: https://github.com/Memnarch/Delphinus. Unfortunately in the case of Lazarus there are several issues: 1. A large part of the packages are not maintained 2. A malicious developer in theory can inject via OPM a malware, this is especially true on windows. Although it's a very unlikely scenario, I cannot take any risk. On the other hand, installing from https://packages.lazarus-ide.org/ should be safe. Each package is checked before upload, binaries are removed automatically for example.  3. OPM can and will resolve any package dependency by parsing the main json. If each package has a separate external json the dependencies cannot be resolved. There must be a list with all available packages. 4. I have to personally contact each package maintainer and ask them to create a json file. It would be a huge task. ---------------------------------------------------------------------- balazsszekely · 2020-03-15 06:21 @senglit I set up a secondary repository, hopefully you can access it from your computer. Please go to OPM->Options->General->Remote Repository and click the '...' button, press Add then enter the following address: http://lazarusopm.org/packages/ .Press OK twice, then change the repository in the combobox. Is this working for you? ---------------------------------------------------------------------- senglit · 2020-03-18 13:10 Quote from: GetMem on March 15, 2020, 07:21:07 am@senglit I set up a secondary repository, hopefully you can access it from your computer. Please go to OPM->Options->General->Remote Repository and click the '...' button, press Add then enter the following address: http://lazarusopm.org/packages/ .Press OK twice, then change the repository in the combobox. Is this working for you? It's not accessable, either. Finally I took my laptop with me and went to some of my friends who are using different internet providers. And in one of their home I found the repository is accessable. I already applied the same internet provider as his. And hopefully this problem can be solved for good. Thanks for your help. It really encurraged me to go with Lazarus further. ---------------------------------------------------------------------- balazsszekely · 2020-03-18 17:09 @senglit You're welcome. I'm glad you find a solutions. ---------------------------------------------------------------------- Marc · 2025-01-14 11:27 To anyone reading this thread, please use http://packages.lazarus- ide.org/ and not the link mentioned in the thread ---------------------------------------------------------------------- Thaddy · 2025-01-15 09:02 Yes, also why did he use that link? A reason for banning.