Commit Graph

95 Commits

Author SHA1 Message Date
A Path in the Ordinary ef0160297a
chore: bump version to 1.3.3.15-1 (#7)
update version.

Log:
2022-12-27 09:14:49 +00:00
huqinghong aa4541ad5c fix: 增加license
增加license

Log:
2022-12-27 17:02:43 +08:00
deepin-admin-bot f4fb6d9b80 chore: Sync by 91e05639e8
sync by github workflow

Log: none
Influence: none
2022-12-05 03:26:52 +00:00
black-desk 78fdd404d1 chore: clean CMakeLists
* No default-to-debug any more
  * As asan cannot be used in static build, we will not build the static
    version of ll-box when CMAKE_DEBUG_ASAN is ON
2022-11-29 09:41:28 +08:00
yuanqiliang a6a7ed1e4a chore: bump version to 1.3.3.14-1
Log:
Change-Id: I768c6cb331c2bfbe74344424a20124ede51b2dc6
2022-11-25 15:19:45 +08:00
yuanqiliang 585d6d9424 feat: update README.md
Log

Change-Id: I11db93c31ed0043d7cd07267a529527ccd3b3887
2022-11-25 15:19:45 +08:00
black-desk 2b85501463 doc: Update README
ostree credits should be in README of linglong
2022-11-25 15:14:51 +08:00
black-desk 1a8f98dcb6 doc: update README 2022-11-25 14:22:23 +08:00
black-desk 781583631b chore: Update SPDX comment 2022-11-25 14:22:23 +08:00
WuJing 160e10016b
feat: add license
Log:
2022-11-25 13:32:19 +08:00
WuJing a4e44e1eea
refactor: delete license
Log:
2022-11-25 13:29:01 +08:00
WuJing 8e75b75dc2
feat: add LICENSE
Log:
2022-11-25 13:23:35 +08:00
black-desk 56ca273796 chore: Add LICENSE 2022-11-25 13:12:43 +08:00
Chen Linxuan 3e9e865bf5 chore: bump version to 1.3.3.13-1
Change-Id: Idb4ef9fa177c6b552d20a6def5ce9b0de42f9081
2022-11-24 11:02:44 +08:00
Chen Linxuan 7e6d35c247 fix: avoid some warnings
* Wrong switch cause uninitialized variable ft;
* Base class should have virtual destructor.

Change-Id: If2dc76af81062f08d54f7adb814948070bec6435
2022-11-22 10:07:53 +08:00
Chen Linxuan fdc14727e6 style: do some cleanup
* Use ower camel case;
* Check all auto for loop to use const reference as possible;
* Rename some single letter variable.

Change-Id: I8e46a20e6373302a8dec998c5b8c84b5b86c825b
2022-11-22 09:54:02 +08:00
Chen Linxuan e76692efab chore: bump version to 1.3.3.12-1
Change-Id: Ib0318a84a84fd8fc1ae9dac5987c2bfbd6e644ad
2022-10-28 15:03:58 +08:00
Chen Linxuan 805c64514f feat: use extra_files.txt
Change-Id: Ica2cdbbec3f270ee6898d5a0e75685c8a9f80696
2022-10-28 15:03:32 +08:00
chenlinxuan 3e83ef0491 fix: uab support
* Bring back bundle support
  * Check reader ptr before use it as when working in uab mode, ll-box
    might not have reader at all.
  * More config.json generate handling code.
  * Install ll-box-static to /usr/libexec

Change-Id: Iafc2f5a684cecbce2aeb8aed90f1eed451c165f2
2022-10-28 15:03:32 +08:00
Chen Linxuan f47eb4ae85 format: run clang-format
Change-Id: Ib48dcc1b878cb991a00690cd94bd2b54e7d0866c
2022-10-28 15:03:32 +08:00
huqinghong ecca3c85e6 chore: bump version to 1.3.3.11-1
update version.

Log:
Change-Id: I77cbf3d9016045d36746847015baadc2cec6c3d7
2022-10-27 16:32:32 +08:00
Chen Linxuan 2709ca579b fix: make path->touch() return void
Change-Id: I5dff88ffd7dfd35c1b36fa8d3f489f103f63a3a1
2022-10-27 16:31:43 +08:00
Chen Linxuan 653e7979de fix: fix a bug that box will overwrite some files
We used to use ofstream with io::out to touch a file. It turns out that
this will overwrite file content if there is already something in that
file.

Now we have a new method called `touch` in util::fs::path, which will
check if that file exist.

Change-Id: I1accec8b57c653c4b2ea7b4aa0016b9cf8f51ac6
2022-10-26 19:22:54 +08:00
chenlinxuan 62ab6a173f fix: unblock all signal before exec new process
Process created by fork will inherit blocked signal list. In then third
level ll-box, we block SIGCHLD and SIGTERM for handling them in
signalfd with epoll. So we have to unblock this two signals to let the
application or command we run can recive this signals.

When a process try to start daemon with double fork, it might wait for
the SIGCHLD of first child. If SIGCHLD is blocked, the process wating
for signal will never recive that signal, and keep waiting forever.

Change-Id: Iebc6810560e89849915d0374acedcdbe5866b818
2022-10-24 10:14:23 +08:00
chenhuixing a6b9bf9b81 chore: bump version to 1.3.3.10-1
update verison.

Log:
Change-Id: Ic92bc2db70409ffaaca55cfbdb32921aef1d3584
2022-09-23 11:21:00 +08:00
chenlinxuan 95b657ab0a fix: no need to retry to read
Change-Id: I7cdaa4726057b5526eace3ce10134e2c534972c7
2022-09-22 15:11:12 +08:00
chenlinxuan 68025e3861 chore: bump version to 1.3.3.9-1
Change-Id: Ia9199ac8e2882a46b5c532ca90a9de87dc4ac764
2022-09-22 11:09:56 +08:00
chenlinxuan bb4f4b4d90 feat: log to syslog
Change-Id: I0fad492b17e816c2e0582e9ad2fede62015214b3
2022-09-22 11:03:46 +08:00
chenlinxuan a903b36f51 fix: make all process handle sigterm
Change-Id: Ic14ac3dd0287cd292064831286ff4eaa6afaa173
2022-09-22 10:09:02 +08:00
chenlinxuan 717d62e580 fix: mem leak
Forget to free buffer, check note 14 for more infomation.

Bug: https://pms.uniontech.com/bug-view-126569.html
Change-Id: I4abe5eb0c7442db14574b158095ae1ce6dbe3b6a
2022-09-22 10:08:25 +08:00
Iceyer 9501c51639
feat: static link ll-box
- Use static link ll-box so that the bundle file can run it without
depends
- Add BUILD_STATIC option to CMakeLists.text, default is OFF

Log:
Change-Id: Ica871aa6311e47f4a38c03d2348f049913ea9ee5
2022-09-18 23:01:41 +08:00
chenhuixing 92dde5e3e1 chore: bump version to 1.3.3.7-1
update version.

Log:
Change-Id: Iaf9c8275fdad677ea6d0c641dbced58d4173d8dd
2022-09-06 11:04:43 +08:00
chenlinxuan dba73717d5 fix: ignore EAGAIN
* We should ignore EAGAIN, as noblock socket would return -1 when read
    with no data in it and set errno to EAGAIN, which mean we have to
    retry later.

Change-Id: I84d01bf719214583e22b8566934cd0836f0e3c90
2022-09-05 10:43:34 +08:00
chenlinxuan 48c2308888 fix: handle SIGTERM in child box
We used to ignore any signal expect SIGCHLD, which lead to the ll-box
which waiting to exec command cannot be killed by SIGTERM.

Change-Id: I06802aec86c95133fd0f2c25644ab35394911e45
2022-09-05 10:43:26 +08:00
chenlinxuan 602ed11df7 feat: add PKGBUILD
* copy PKGBUILD from https://wiki.archlinux.org/title/CMake_package_guidelines
  * add some dependencies

  This is just a workround, dependencies list should be consider more
  carefully.

Change-Id: I1c698974746b91551715950162a858746c28d545
2022-08-26 21:45:23 +08:00
chenlinxuan 7b4da48066 feat: disable log by default
* If environment variable not found, we just won't print any log.

Change-Id: If0f71a76fbf3bf7ef83f8f00850f70ec18283360
2022-08-12 09:57:25 +08:00
liujianqiang 2cb993cd4b feat: bump version to 1.3.3.5-1
update version for deepin.

Log:
Change-Id: I3dc51762916506e7aec5ec67c913b438fa597275
2022-08-01 20:52:22 +08:00
liujianqiang 25aa18d837 fix: 升级版本到1.3.3-1
社区版v23预发布版本更新。

Bug: https://pms.uniontech.com/bug-view-151007.html
Log:
Change-Id: I9266532d2f9e2ac8d22ef91b7043d849363b33f5
2022-07-28 15:32:29 +08:00
chenlinxuan 83416e6e48 fix: use right cwd for exec and add log for exec
* We should cd to the "cwd" of argument but not the cwd in oci config
    as they might be different.
  * Add a new info log before exec, to determine whether we has entered
    the container or not.
  * Add a new warning for failed chdir.

Log: Bug fix and add more log.
Change-Id: I5bef3aa4e19ce37cce324f1886db37575a414177
2022-07-21 10:03:13 +08:00
chenlinxuan 0022e90c97 fix(exec): always new pid ns in third layer box
As the 'exec' function is implemented by forking a new child from the
init process. The init process have to stay in the same user namespace
as application process.

So we now result in a situation where we have to always create new pid
namespace to keep the third layer box as the init(pid=1) process for
application.

Change-Id: If83dd5bc10c292f43b9ad3e0fb59b31d222fccac
2022-07-04 11:20:17 +08:00
liujianqiang 23fd366502 feat: bump version to 1.3.2-1
update version.

Log:
Change-Id: I26eaabbda45ec2c580c67eb4858af932d95606ed
2022-06-24 16:57:42 +08:00
black-desk e8f1d2435e fix: fix code cause out_of_range exception
This reverts commit 6d6ce1ada7.

We need to configure $PATH to exec program. so we have to get this done
before call `util::Exec`

Change-Id: Ib171ac2cb4cdea9c0c1b47386eb2ff15f1efd120
2022-06-16 15:47:05 +08:00
black-desk 6d6ce1ada7 fix: remove code cause out_of_range exception
`p.env` might contain something like "AAA=", which cause kv.size=1,
  leading to `kv.at(1)` fail with `out_of_range` exception.

  As util::Exec use execvp which can handle environment variables, we
  don't need these lines of codes at all.

Change-Id: I03495a451d8c7530d5800a585abc606a7ab8ab3a
2022-06-16 09:21:13 +08:00
liujianqiang 4f23f491c4 feat: bump version to 1.3.0-1
update version.

Log:
Change-Id: Iedfb59fc69ad4803737f49ce471b90144f890747
2022-05-27 17:48:02 +08:00
black-desk f306b0d14c chore: typo
Add missing 'r'

Change-Id: Ife4000217d3562205f9ae44526e44ffcba3071c2
2022-05-24 11:52:48 +08:00
black-desk 40dc5b7fcf fix: message reader should parse remain content when meet a EOF
* When meet a EOF there can still be some contents in source, we
    should parse them.

Change-Id: Ib42a9823b73f4030bbbc8af709bd2a49273c299d
2022-05-23 14:08:20 +08:00
black-desk 08bcf05ed3 feat: exec new command in container
* message_reader.cpp for read/write from/to socket.
  * use signalfd + epoll to make ll-box work like a sane init

Change-Id: I392c9190462359c215b8efce6d551c57982b770c
2022-05-19 16:08:04 +08:00
black-desk 5d388432f7 fix: correct mount path for symbol link
* use realpath

  this commit fix two issues:

    * use of uninitalized buffer
    * readlink not work for relative symbol link

Change-Id: I1b3a9f2e43b303ebacd3c84b07c5245a1d993c3e
(cherry picked from commit 8ffef114624f56d9582f13f7eaf0e019e84238de)
2022-05-19 09:54:54 +08:00
liujianqiang 19d9c0e02d feat: bump version to 1.2.7-1
fix build issue.

Log:
Change-Id: I9ac558a2813a5b591e2648d6e3c86695704c2e19
2022-04-15 18:43:30 +08:00
black-desk 4ee8616114 fix: build issue
* Add nlohmann-json header file.
  * Remove nlohmann-json from debian/control.
  * Remove some unsupported arguments in debian/rules.

Change-Id: I60f6783c06a12ef754e056d859be5131af0d3b7d
2022-04-15 18:42:56 +08:00