diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-28 13:02:51 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-30 22:22:19 +0000 |
| commit | 4e6a20efa9dc7bbb516fa56b560289a307d2ca40 (patch) | |
| tree | 213361379f6d1a7a5d88326c29be74b9b06b0ae0 /meta/recipes-core/util-linux/util-linux_2.39.3.bb | |
| parent | 3c7e103af4d8072181b581b930d763cbc67e3058 (diff) | |
| download | poky-4e6a20efa9dc7bbb516fa56b560289a307d2ca40.tar.gz | |
util-linux: Add fcntl-lock
Add a version of flock that uses the fnctl based lockf locking instead of
flock based locks. This allows us to take the same lock that opkg would
use from a shell script. The two different locking mechanisms operate
independently of each other.
Inserting this C file into the util-linux build seems like the easiest/best
place to insert the code. At this point it hasn't been discussed with upstream.
(From OE-Core rev: d2b784110e2c3df8a0a41e4819cf2de9003f9fa3)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/util-linux/util-linux_2.39.3.bb')
| -rw-r--r-- | meta/recipes-core/util-linux/util-linux_2.39.3.bb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux_2.39.3.bb b/meta/recipes-core/util-linux/util-linux_2.39.3.bb index 3e87dcc2c2..83b3f4e05b 100644 --- a/meta/recipes-core/util-linux/util-linux_2.39.3.bb +++ b/meta/recipes-core/util-linux/util-linux_2.39.3.bb | |||
| @@ -147,6 +147,11 @@ SYSTEMD_AUTO_ENABLE:${PN}-uuidd = "disable" | |||
| 147 | SYSTEMD_SERVICE:${PN}-fstrim = "fstrim.timer fstrim.service" | 147 | SYSTEMD_SERVICE:${PN}-fstrim = "fstrim.timer fstrim.service" |
| 148 | SYSTEMD_AUTO_ENABLE:${PN}-fstrim = "disable" | 148 | SYSTEMD_AUTO_ENABLE:${PN}-fstrim = "disable" |
| 149 | 149 | ||
| 150 | do_compile:append () { | ||
| 151 | cp ${WORKDIR}/fcntl-lock.c ${S}/fcntl-lock.c | ||
| 152 | ${CC} ${CFLAGS} ${LDFLAGS} ${S}/fcntl-lock.c -o ${B}/fcntl-lock | ||
| 153 | } | ||
| 154 | |||
| 150 | do_install () { | 155 | do_install () { |
| 151 | # with ccache the timestamps on compiled files may | 156 | # with ccache the timestamps on compiled files may |
| 152 | # end up earlier than on their inputs, this allows | 157 | # end up earlier than on their inputs, this allows |
| @@ -182,6 +187,8 @@ do_install () { | |||
| 182 | echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall | 187 | echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall |
| 183 | 188 | ||
| 184 | rm -f ${D}${bindir}/chkdupexe | 189 | rm -f ${D}${bindir}/chkdupexe |
| 190 | |||
| 191 | install -m 0755 ${B}/fcntl-lock ${D}${bindir} | ||
| 185 | } | 192 | } |
| 186 | 193 | ||
| 187 | do_install:append:class-target () { | 194 | do_install:append:class-target () { |
