dh_installsysusers is not working properly in debhelper(12.1).
Just hardcode these contents which are generated by debhelper(13.11.4)
in the postinst script.
Log:
Default repository location moved from /persistent/linglong to
/var/lib/linglong.
I just move all files from old location to the new one,
but system helper export some files as symbolink
point to old /persistent/linglong location.
And it is hard to perform this in debian mantainer scripts,
as ll-system-helper do not has a portal record or something else.
I just make a symbolink from /persisten/linglong to /var/lib/linglong
to fix this issue.
So now when check symbolink created by system_helper,
we should use canonicalFilePath() to
get an absolute path without symbolic links.
Related: linuxdeepin/developer-center#6784
Signed-off-by: black-desk <me@black-desk.cn>
This commit update systemd and dbus service files to use the system
user "linglong" created by systemd-sysuser, instead of the old
deepin-linglong user created in debian trigger.
Remove the scripts create deepin-linglong user as well.
Now we create /var/lib/linglong and chown it to linglong user in
systemd service file. We add a script call create-linglong-dirs to do
this job.
As script might be installed to /usr/lib/linglong or
/usr/libexec/linglong. I just ignore the error.
Service files should be configured in cmake, let's fix this later.
OstreeRepoHelper has method ensureRepoEnv which will create the ostree
repo if it doesn't exist. This should be fine.
Update1: But we indeed have some codes open the ostree repo before call
OSTreeRepoHelper's ensureRepoEnv method. This commit include some quick
hack to fix this issue, which should be refactor later.
Update2: ensureRepoEnv use ostree_repo_new which does not create the
ostree repo if it not exist. This behavior is not match comment. So I
refactor this method to make it do the job it should have done.
If config is not found in LINGLONG_ROOT, we will use the one we
installed in CMAKE_INSTALL_DATADIR.
We should not copy it to LINGLONG_ROOT.
This design give us a way to findout the user is using the default
configuration or not, which make we easy to update the default
configuration file.
- the package manager is not system-helper, correct that issue.
- the dbus service should be org.deepin.linglong.PackageManager.
Change-Id: Ib66fd2d20dcfcd0557184fb6812151ce17df90e7
/etc/os-release can be anything, might not have "VERSION_ID" in it.
So after sed, $VERSION can be empty string, or even a string with
space inside.
We should always quote variable when we using it.
Change-Id: I14046270ef446c9f878c66336150735c44038dd0