Recent

Author Topic: Online Package Manager  (Read 835891 times)

tudi_x

  • Hero Member
  • *****
  • Posts: 532
Re: Online Package Manager
« Reply #1335 on: June 22, 2018, 02:33:06 pm »
@JuhaManninen
expose ways in which packages can be installed in an automated way by Ansible.
Ansible can basically run shell commands on remote hosts or issue HTTP (say GET) requests.

i think a way would be to have a URL to which Ansible can get back a JSON from OPM.
based on this JSON subsequent actions could be triggered to install desired packages.
i would say that GET requests based on the JSON could be assessed as a trigger for a package install with a final method for selection end and recompilation.

JSON parsing is easy with Ansible: http://wiki.lazarus.freepascal.org/with_GUI (bottom part)

« Last Edit: June 22, 2018, 02:45:25 pm by tudi_x »
Lazarus 2.0.2 64b on Debian LXDE 10

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1336 on: June 23, 2018, 08:57:08 am »
@wp
I updated tvplanit to 1.2. Thanks for the new version.

@tudi_x
Quote
any chance of making Online Package Manager Ansible friendly?
I fail to see how Ansible would help to install packages. OPM depends on Lazarus, in fact OPM without Lazarus is worthless. Once you have a working IDE, just use the internal package manager and/or OPM to manage packages. Why involve another application? I'm I missing something?

PS: If really helps I'm not against it, but you have to do it by yourself. I can apply patches if necessary.

tudi_x

  • Hero Member
  • *****
  • Posts: 532
Re: Online Package Manager
« Reply #1337 on: June 23, 2018, 10:07:01 am »
@GetMem
Ansible would help with configuration management.
the flow to install Lazarus for a developer workstation could be:

a. 4 steps to install Ansible prerequisites (one time only):
- sudo adduser ansible
- put ansible user in sudo group and do not request password
- sudo apt-get install -y python
- ssh-copy-id ansible@<host IP>
b. with Ansible - install Lazarus using fpclazup (http://wiki.lazarus.freepascal.org/headless)
c. with Ansible - install needed packages for Lazarus development (with OPM)

my point was to have the packages installed automatically and not by human intervention, thus moving to the advantages of the configuration management / DevOps approach. i thought OPM could do it with modifications and headless.

OPM is wonderful but still every time I need to pick manually the packages to install and manually submit.
Lazarus 2.0.2 64b on Debian LXDE 10

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Online Package Manager
« Reply #1338 on: June 24, 2018, 10:38:05 am »
b. with Ansible - install Lazarus using fpclazup (http://wiki.lazarus.freepascal.org/headless)
Why is fpclazup pulled in here? There are easier ways to install Lazarus.

Quote
my point was to have the packages installed automatically and not by human intervention, thus moving to the advantages of the configuration management / DevOps approach. i thought OPM could do it with modifications and headless.
OPM is part of an IDE which deals exactly with human intervention. When you run Lazarus or any other IDE, you are already using a graphical desktop. Then a headless configuration with scripts does not make sense IMO.
Even if you run Lazarus/OPM remotely, you still use a graphical desktop. Always.
OTOH, I don't have much experience of such configuration management tools. Maybe there is a valid use case which I don't see.

Quote
OPM is wonderful but still every time I need to pick manually the packages to install and manually submit.
True. There should be a way to install a set of packages at one go, for example when duplicating a design environment to another computer.
Your Ansible integration however sounds like an overkill for the task. It could be a simple text file or cmd line parameters for Lazarus. Actually it is possible already but I forgot the details. I must consult Mattias. Hold on ...
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1339 on: June 24, 2018, 11:04:50 am »
@JuhaManninen
Quote
True. There should be a way to install a set of packages at one go, for example when duplicating a design environment to another computer.
If you right click the tree, there is an option to export checked(or installed) packages(see attached image). All you have to do is check your favorit packages then save it to a file. Next time or in a different environment, just import back the checks and you can install them in one shot. I plan to add a command line options as well, but as you mentioned you must pass the parameters to Lazarus which complicates the issue a little bit.
« Last Edit: June 24, 2018, 11:18:00 am by GetMem »

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: Online Package Manager
« Reply #1340 on: June 24, 2018, 11:17:54 am »
If you right click the tree, there is an option to export checked(or installed) packages(see attached image).
This sounds great. But: Does "Save Packages" > "Install" save also the packages not installed by OPM? Or what if a package is available via OPM but is installed from the author's svn/git directly in a different version? Doesn't this end up in chaos when the saved packages are restored on another Lazarus installation?

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: Online Package Manager
« Reply #1341 on: June 24, 2018, 11:31:19 am »
This sounds great. But: Does "Save Packages" > "Install" save also the packages not installed by OPM? Or what if a package is available via OPM but is installed from the author's svn/git directly in a different version? Doesn't this end up in chaos when the saved packages are restored on another Lazarus installation?
... and what about packages installed from Lazarus components/ directory? They are equally important when duplicating a design environment.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1342 on: June 24, 2018, 11:32:13 am »
@wp
Quote
But: Does "Save Packages" > "Install" save also the packages not installed by OPM?
No. It strictly refers to packages listed in OPM, preferably installed by OPM. Maybe I should change the caption  to "Installed by OPM".

Quote
Or what if a package is available via OPM but is installed from the author's svn/git directly in a different version? Doesn't this end up in chaos when the saved packages are restored on another Lazarus installation?
Yes, it could and up in chaos, but this is also true when you try to install packages via the built in package manager(the classical way). If you are an advanced user with many version of a particular package you should take extra steps to avoid problems, but you know this much better then most of us, since you maintain a lot of packages.   :)


@JuhaManninen
Quote
... and what about packages installed from Lazarus components/ directory? They are equally important when duplicating a design environment.
I cannot imagine a tool that will work in every possible scenarios and will successfully duplicate the installed components. Think about different Lazarus/FPC version for example, not to mention package dependencies which can also change a lot with new version of a particular package.
« Last Edit: June 24, 2018, 11:35:23 am by GetMem »

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: Online Package Manager
« Reply #1343 on: July 06, 2018, 09:29:36 pm »
I uploaded a new release of fpspreadsheet, v1.10, to sourceforge. GetMem, could you please update the repository?

When I open OPM I see now only dashes ('-') in the column "External". Is this correct?

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1344 on: July 06, 2018, 10:29:16 pm »
Quote
I uploaded a new release of fpspreadsheet, v1.10, to sourceforge. GetMem, could you please update the repository?
Done. Thanks for the new version.

Quote
When I open OPM I see now only dashes ('-') in the column "External". Is this correct?
Apparently you forget two comas from the json. I attached the modified file. Please upload it to: https://sourceforge.net/projects/lazarus-ccr/files/FPSpreadsheet/OPM/update_FPSpreadsheet.json and replace the current one. The "External" column should work after the upload.
« Last Edit: July 06, 2018, 10:36:39 pm by GetMem »

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: Online Package Manager
« Reply #1345 on: July 06, 2018, 10:50:47 pm »
Thanky you. I knew it... Are there any errors missing which I can make?

When writing about the dash ('-') I was also thinking of the other packages. There are only very few packages which contain a version number in the External column, usually there is the dash. Does this mean that it is only these few packages which provide an update-json?

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1346 on: July 06, 2018, 10:58:55 pm »
Quote
Are there any errors missing which I can make?
Don't worry. We all make mistakes all the time.

Quote
When writing about the dash ('-') I was also thinking of the other packages. There are only very few packages which contain a version number in the External column, usually there is the dash. Does this mean that it is only these few packages which provide an update-json?
In order for the external column to appear you must install the package first + must have a valid external json(http://forum.lazarus.freepascal.org/index.php/topic,34297.msg276901.html#msg276901).

« Last Edit: July 06, 2018, 11:05:17 pm by GetMem »

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: Online Package Manager
« Reply #1347 on: July 06, 2018, 11:51:25 pm »
In order for the external column to appear you must install the package first + must have a valid external json(http://forum.lazarus.freepascal.org/index.php/topic,34297.msg276901.html#msg276901).
Ah, now I remember. Thank you.

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #1348 on: July 10, 2018, 06:26:01 am »
Quote
Hi sir, we have a new version available of REST Dataware, to the update of repository

Thank you.
Done. Thanks for the new version.

wp

  • Hero Member
  • *****
  • Posts: 11853
Re: Online Package Manager
« Reply #1349 on: July 11, 2018, 08:21:47 pm »
I added the component TA3nalogGauge to the IndustrialStuff package (ported directly from the Torry site) - see screenshot. The updated package is at https://sourceforge.net/projects/lazarus-ccr/files/industrialstuf/industrialstuff-0.2.0.zip/download, the update-json is at https://sourceforge.net/projects/lazarus-ccr/files/industrialstuf/OPM/update_industrial.json/download. Let's see what's wrong today...  ;)

For Delphi users: The component still works with Delphi (not sure about the others in the package, though).

After finishing the port I realized that the same component is contained also in the CodeTyphon package pl_ExControls. So, if somebody installs both packages there will be a naming conflict.

BTW: The antialiasing in the component is ported using a LazIntfImage and its Colors property. The source contains another . faster - variant using the GetDataLineStart of the LazIntfImage, but this crashes due to memory overflow (commented "FastAntiAliasPicture" method) - I cannot find the reason... Maybe somebody sees the issue immediately.

 

TinyPortal © 2005-2018