Recent

Author Topic: Creating .deb packages for Lazarus applications?  (Read 17609 times)

dbannon

  • Hero Member
  • *****
  • Posts: 1211
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Creating .deb packages for Lazarus applications?
« Reply #45 on: November 22, 2020, 08:23:49 am »
I repeat -

Don't forget linux/unix is a multiuser system, once installed, an application should be usable by every user, including ones who did not exist when the application was first installed.

Packages such as debs should not mess around in user space !   Unix systems have all sorts of 'users' installed that are not real users and you risk the wrath of a leather winged dragon from hell if you mess around with their accounts. Its the wrong thing to do.

Its very, very easy to make your app prepare the end user env at first start up -

Does config file exist ?
Yes - read it and use it.
No - create a default config file

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng

lucamar

  • Hero Member
  • *****
  • Posts: 3188
Re: Creating .deb packages for Lazarus applications?
« Reply #46 on: November 22, 2020, 01:10:01 pm »
==> I'm coming back to the lack of a record somewhere in Linux of who was actively logged in, before the root installation [...]

Calling fpGetuid() should give that, as fpGeteuid() should give you the "root" id. The installation runs as root but the real id should still be that of the user who launched it.

But Davo is right: normal user configuration should be deferred until first run and if you have assets that are the same for all users, like images, sounds, etc., they should be copied to the programs folder in /usr/share at install-time, which means your .deb file should reflect this.
« Last Edit: November 22, 2020, 01:14:12 pm by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.10/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

circular

  • Hero Member
  • *****
  • Posts: 3563
    • Personal webpage
Re: Creating .deb packages for Lazarus applications?
« Reply #47 on: November 22, 2020, 01:19:57 pm »
Unix systems have all sorts of 'users' installed that are not real users and you risk the wrath of a leather winged dragon from hell if you mess around with their accounts.
Isn't it a bit overdramatic?
Conscience is the debugger of the mind

PascalDragon

  • Hero Member
  • *****
  • Posts: 2405
  • Compiler Developer
Re: Creating .deb packages for Lazarus applications?
« Reply #48 on: November 22, 2020, 01:22:19 pm »
Unix systems have all sorts of 'users' installed that are not real users and you risk the wrath of a leather winged dragon from hell if you mess around with their accounts.
Isn't it a bit overdramatic?

I'd even go so far as to say that dbannon underestimated that...

circular

  • Hero Member
  • *****
  • Posts: 3563
    • Personal webpage
Re: Creating .deb packages for Lazarus applications?
« Reply #49 on: November 22, 2020, 01:24:58 pm »
As a Dragon, I suspect that you opinion is biased.
Conscience is the debugger of the mind

 

TinyPortal © 2005-2018