Linux NFS development
 help / color / mirror / Atom feed
* [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes
@ 2023-12-05 22:35 Petr Vorel
  2023-12-05 22:35 ` [PATCH v2] support/backend_sqlite.c: Add missing <sys/syscall.h> Petr Vorel
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Petr Vorel @ 2023-12-05 22:35 UTC (permalink / raw)
  To: linux-nfs; +Cc: Petr Vorel, Steve Dickson, Giulio Benetti

Older uClibc-ng requires <unistd.h> for close(2), unlink(2) and write(2),
<sys/un.h> for struct sockaddr_un.

Fixes: 1a4edb2a ("reexport/fsidd.c: Remove unused headers")
Fixes: bdc79f02 ("support/reexport.c: Remove unused headers")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Changes v1->v2:
* Add also <sys/un.h>

 support/reexport/fsidd.c    | 2 ++
 support/reexport/reexport.c | 1 +
 2 files changed, 3 insertions(+)

diff --git a/support/reexport/fsidd.c b/support/reexport/fsidd.c
index 8a70b78f..51750ea3 100644
--- a/support/reexport/fsidd.c
+++ b/support/reexport/fsidd.c
@@ -7,6 +7,8 @@
 #include <dlfcn.h>
 #endif
 #include <event2/event.h>
+#include <sys/un.h>
+#include <unistd.h>
 
 #include "conffile.h"
 #include "reexport_backend.h"
diff --git a/support/reexport/reexport.c b/support/reexport/reexport.c
index 0fb49a46..c7bff6a3 100644
--- a/support/reexport/reexport.c
+++ b/support/reexport/reexport.c
@@ -7,6 +7,7 @@
 #endif
 #include <sys/types.h>
 #include <sys/vfs.h>
+#include <unistd.h>
 #include <errno.h>
 
 #include "nfsd_path.h"
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2] support/backend_sqlite.c: Add missing <sys/syscall.h>
  2023-12-05 22:35 [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes Petr Vorel
@ 2023-12-05 22:35 ` Petr Vorel
  2023-12-06 18:53   ` Giulio Benetti
  2023-12-06 18:53 ` [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes Giulio Benetti
  2024-01-04  0:39 ` Steve Dickson
  2 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2023-12-05 22:35 UTC (permalink / raw)
  To: linux-nfs; +Cc: Petr Vorel, Steve Dickson, Giulio Benetti, Petr Vorel

From: Petr Vorel <petr.vorel@gmail.com>

This fixes build on systems which actually needs getrandom()
(to get SYS_getrandom).

Fixes: f92fd6ca ("support/backend_sqlite.c: Add getrandom() fallback")
Fixes: http://autobuild.buildroot.net/results/c5fde6099a8b228a8bdc3154d1e47dfa192e94ed/
Reported-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Changes v1->v2:
* New commit

I'm sorry for these errors.

 support/reexport/backend_sqlite.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/support/reexport/backend_sqlite.c b/support/reexport/backend_sqlite.c
index 0eb5ea37..54dfe447 100644
--- a/support/reexport/backend_sqlite.c
+++ b/support/reexport/backend_sqlite.c
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <sys/syscall.h>
 #include <unistd.h>
 
 #ifdef HAVE_GETRANDOM
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] support/backend_sqlite.c: Add missing <sys/syscall.h>
  2023-12-05 22:35 ` [PATCH v2] support/backend_sqlite.c: Add missing <sys/syscall.h> Petr Vorel
@ 2023-12-06 18:53   ` Giulio Benetti
  2023-12-06 19:42     ` Petr Vorel
  0 siblings, 1 reply; 8+ messages in thread
From: Giulio Benetti @ 2023-12-06 18:53 UTC (permalink / raw)
  To: Petr Vorel, linux-nfs; +Cc: Petr Vorel, Steve Dickson

Hi Petr,

On 05/12/23 23:35, Petr Vorel wrote:
> From: Petr Vorel <petr.vorel@gmail.com>
> 
> This fixes build on systems which actually needs getrandom()
> (to get SYS_getrandom).
> 
> Fixes: f92fd6ca ("support/backend_sqlite.c: Add getrandom() fallback")
> Fixes: http://autobuild.buildroot.net/results/c5fde6099a8b228a8bdc3154d1e47dfa192e94ed/
> Reported-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

thank you for fixing. I've tested this and the other patch with
Buildroot's test-pkg and built fine for many toolchain/arch/libc
combinations.

Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas


> ---
> Changes v1->v2:
> * New commit
> 
> I'm sorry for these errors.
> 
>   support/reexport/backend_sqlite.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/support/reexport/backend_sqlite.c b/support/reexport/backend_sqlite.c
> index 0eb5ea37..54dfe447 100644
> --- a/support/reexport/backend_sqlite.c
> +++ b/support/reexport/backend_sqlite.c
> @@ -7,6 +7,7 @@
>   #include <stdio.h>
>   #include <stdlib.h>
>   #include <string.h>
> +#include <sys/syscall.h>
>   #include <unistd.h>
>   
>   #ifdef HAVE_GETRANDOM

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes
  2023-12-05 22:35 [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes Petr Vorel
  2023-12-05 22:35 ` [PATCH v2] support/backend_sqlite.c: Add missing <sys/syscall.h> Petr Vorel
@ 2023-12-06 18:53 ` Giulio Benetti
  2023-12-06 22:24   ` Giulio Benetti
  2024-01-04  0:39 ` Steve Dickson
  2 siblings, 1 reply; 8+ messages in thread
From: Giulio Benetti @ 2023-12-06 18:53 UTC (permalink / raw)
  To: Petr Vorel, linux-nfs; +Cc: Steve Dickson

Hi Petr,

On 05/12/23 23:35, Petr Vorel wrote:
> Older uClibc-ng requires <unistd.h> for close(2), unlink(2) and write(2),
> <sys/un.h> for struct sockaddr_un.
> 
> Fixes: 1a4edb2a ("reexport/fsidd.c: Remove unused headers")
> Fixes: bdc79f02 ("support/reexport.c: Remove unused headers")
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas

> ---
> Changes v1->v2:
> * Add also <sys/un.h>
> 
>   support/reexport/fsidd.c    | 2 ++
>   support/reexport/reexport.c | 1 +
>   2 files changed, 3 insertions(+)
> 
> diff --git a/support/reexport/fsidd.c b/support/reexport/fsidd.c
> index 8a70b78f..51750ea3 100644
> --- a/support/reexport/fsidd.c
> +++ b/support/reexport/fsidd.c
> @@ -7,6 +7,8 @@
>   #include <dlfcn.h>
>   #endif
>   #include <event2/event.h>
> +#include <sys/un.h>
> +#include <unistd.h>
>   
>   #include "conffile.h"
>   #include "reexport_backend.h"
> diff --git a/support/reexport/reexport.c b/support/reexport/reexport.c
> index 0fb49a46..c7bff6a3 100644
> --- a/support/reexport/reexport.c
> +++ b/support/reexport/reexport.c
> @@ -7,6 +7,7 @@
>   #endif
>   #include <sys/types.h>
>   #include <sys/vfs.h>
> +#include <unistd.h>
>   #include <errno.h>
>   
>   #include "nfsd_path.h"


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] support/backend_sqlite.c: Add missing <sys/syscall.h>
  2023-12-06 18:53   ` Giulio Benetti
@ 2023-12-06 19:42     ` Petr Vorel
  2023-12-06 22:24       ` Giulio Benetti
  0 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2023-12-06 19:42 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: linux-nfs, Petr Vorel, Steve Dickson

Hi Giulio,

> Hi Petr,

> On 05/12/23 23:35, Petr Vorel wrote:
> > From: Petr Vorel <petr.vorel@gmail.com>

> > This fixes build on systems which actually needs getrandom()
> > (to get SYS_getrandom).

> > Fixes: f92fd6ca ("support/backend_sqlite.c: Add getrandom() fallback")
> > Fixes: http://autobuild.buildroot.net/results/c5fde6099a8b228a8bdc3154d1e47dfa192e94ed/
> > Reported-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>

> thank you for fixing. I've tested this and the other patch with
> Buildroot's test-pkg and built fine for many toolchain/arch/libc
> combinations.

Thank you for extensive testing! I test only the basic 6 tests (the default
test-pkg).  I suppose you run test-pkg also with -a (these 45 arch
combinations).

> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Maybe you can add your Tested-by: ?

Kind regards,
Petr


> Best regards

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] support/backend_sqlite.c: Add missing <sys/syscall.h>
  2023-12-06 19:42     ` Petr Vorel
@ 2023-12-06 22:24       ` Giulio Benetti
  0 siblings, 0 replies; 8+ messages in thread
From: Giulio Benetti @ 2023-12-06 22:24 UTC (permalink / raw)
  To: Petr Vorel; +Cc: linux-nfs, Petr Vorel, Steve Dickson

Hi Petr,

On 06/12/23 20:42, Petr Vorel wrote:
> Hi Giulio,
> 
>> Hi Petr,
>> On 05/12/23 23:35, Petr Vorel wrote:
>>> From: Petr Vorel<petr.vorel@gmail.com>
>>> This fixes build on systems which actually needs getrandom()
>>> (to get SYS_getrandom).
>>> Fixes: f92fd6ca ("support/backend_sqlite.c: Add getrandom() fallback")
>>> Fixes:http://autobuild.buildroot.net/results/c5fde6099a8b228a8bdc3154d1e47dfa192e94ed/
>>> Reported-by: Giulio Benetti<giulio.benetti@benettiengineering.com>
>>> Signed-off-by: Petr Vorel<pvorel@suse.cz>
>> thank you for fixing. I've tested this and the other patch with
>> Buildroot's test-pkg and built fine for many toolchain/arch/libc
>> combinations.
> Thank you for extensive testing! I test only the basic 6 tests (the default
> test-pkg).  I suppose you run test-pkg also with -a (these 45 arch
> combinations).

Exactly, I've only found a build failure on util-linux's libmount while 
building for sh4+uclibc with bootlin toolchain. See defconfig and log here:
https://pastebin.com/8rxgxvvQ
So that's not due to nfs-utils.

>> Reviewed-by: Giulio Benetti<giulio.benetti@benettiengineering.com>
> Maybe you can add your Tested-by: ?

Sure, good idea.

After running Buildroot utils/test-pkg under Buildroot official docker
using this and previous patch everything built fine except on sh4+uclibc
where util-linux libmount fails(see above). These are the results:
```
br-user@giulio-Ubuntu-HP:/home/giuliobenetti/git/upstream/buildroot$ 
./utils/test-pkg -p nfs-utils -d test-nfs-utils/ -a
                              arm-aarch64 [ 1/45]: OK
                    bootlin-aarch64-glibc [ 2/45]: OK
                bootlin-arcle-hs38-uclibc [ 3/45]: OK
                     bootlin-armv5-uclibc [ 4/45]: OK
                      bootlin-armv7-glibc [ 5/45]: OK
                    bootlin-armv7m-uclibc [ 6/45]: SKIPPED
                       bootlin-armv7-musl [ 7/45]: OK
                 bootlin-m68k-5208-uclibc [ 8/45]: SKIPPED
                bootlin-m68k-68040-uclibc [ 9/45]: OK
              bootlin-microblazeel-uclibc [10/45]: OK
                 bootlin-mipsel32r6-glibc [11/45]: OK
                    bootlin-mipsel-uclibc [12/45]: OK
                      bootlin-nios2-glibc [13/45]: OK
                  bootlin-openrisc-uclibc [14/45]: OK
         bootlin-powerpc64le-power8-glibc [15/45]: OK
            bootlin-powerpc-e500mc-uclibc [16/45]: OK
                    bootlin-riscv32-glibc [17/45]: OK
                    bootlin-riscv64-glibc [18/45]: OK
                     bootlin-riscv64-musl [19/45]: OK
                  bootlin-s390x-z13-glibc [20/45]: OK
                       bootlin-sh4-uclibc [21/45]: FAILED
                    bootlin-sparc64-glibc [22/45]: OK
                     bootlin-sparc-uclibc [23/45]: OK
                     bootlin-x86-64-glibc [24/45]: OK
                      bootlin-x86-64-musl [25/45]: OK
                    bootlin-x86-64-uclibc [26/45]: OK
                    bootlin-xtensa-uclibc [27/45]: OK
                             br-arm-basic [28/45]: OK
                     br-arm-full-nothread [29/45]: SKIPPED
                       br-arm-full-static [30/45]: OK
                    br-i386-pentium4-full [31/45]: OK
                 br-i386-pentium-mmx-musl [32/45]: OK
                       br-mips64-n64-full [33/45]: OK
                  br-mips64r6-el-hf-glibc [34/45]: OK
                br-powerpc-603e-basic-cpp [35/45]: OK
                br-powerpc64-power7-glibc [36/45]: OK
                        linaro-aarch64-be [37/45]: OK
                           linaro-aarch64 [38/45]: OK
                               linaro-arm [39/45]: OK
                      sourcery-arm-armv4t [40/45]: SKIPPED
                             sourcery-arm [41/45]: SKIPPED
                      sourcery-arm-thumb2 [42/45]: SKIPPED
                          sourcery-mips64 [43/45]: OK
                            sourcery-mips [44/45]: OK
                           sourcery-nios2 [45/45]: OK
45 builds, 6 skipped, 1 build failed, 0 legal-info failed, 0 show-info 
failed
```

So:
Tested-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Kind regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes
  2023-12-06 18:53 ` [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes Giulio Benetti
@ 2023-12-06 22:24   ` Giulio Benetti
  0 siblings, 0 replies; 8+ messages in thread
From: Giulio Benetti @ 2023-12-06 22:24 UTC (permalink / raw)
  To: Petr Vorel, linux-nfs; +Cc: Steve Dickson

On 06/12/23 19:53, Giulio Benetti wrote:
> Hi Petr,
> 
> On 05/12/23 23:35, Petr Vorel wrote:
>> Older uClibc-ng requires <unistd.h> for close(2), unlink(2) and write(2),
>> <sys/un.h> for struct sockaddr_un.
>>
>> Fixes: 1a4edb2a ("reexport/fsidd.c: Remove unused headers")
>> Fixes: bdc79f02 ("support/reexport.c: Remove unused headers")
>> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> 
> Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Build tested along with patch "[PATCH v2] support/backend_sqlite.c: Add 
missing <sys/syscall.h>"

Tested-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering sas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes
  2023-12-05 22:35 [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes Petr Vorel
  2023-12-05 22:35 ` [PATCH v2] support/backend_sqlite.c: Add missing <sys/syscall.h> Petr Vorel
  2023-12-06 18:53 ` [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes Giulio Benetti
@ 2024-01-04  0:39 ` Steve Dickson
  2 siblings, 0 replies; 8+ messages in thread
From: Steve Dickson @ 2024-01-04  0:39 UTC (permalink / raw)
  To: Petr Vorel, linux-nfs; +Cc: Giulio Benetti



On 12/5/23 5:35 PM, Petr Vorel wrote:
> Older uClibc-ng requires <unistd.h> for close(2), unlink(2) and write(2),
> <sys/un.h> for struct sockaddr_un.
> 
> Fixes: 1a4edb2a ("reexport/fsidd.c: Remove unused headers")
> Fixes: bdc79f02 ("support/reexport.c: Remove unused headers")
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
Committed... (tag: nfs-utils-2-7-1-rc3

steved.
> ---
> Changes v1->v2:
> * Add also <sys/un.h>
> 
>   support/reexport/fsidd.c    | 2 ++
>   support/reexport/reexport.c | 1 +
>   2 files changed, 3 insertions(+)
> 
> diff --git a/support/reexport/fsidd.c b/support/reexport/fsidd.c
> index 8a70b78f..51750ea3 100644
> --- a/support/reexport/fsidd.c
> +++ b/support/reexport/fsidd.c
> @@ -7,6 +7,8 @@
>   #include <dlfcn.h>
>   #endif
>   #include <event2/event.h>
> +#include <sys/un.h>
> +#include <unistd.h>
>   
>   #include "conffile.h"
>   #include "reexport_backend.h"
> diff --git a/support/reexport/reexport.c b/support/reexport/reexport.c
> index 0fb49a46..c7bff6a3 100644
> --- a/support/reexport/reexport.c
> +++ b/support/reexport/reexport.c
> @@ -7,6 +7,7 @@
>   #endif
>   #include <sys/types.h>
>   #include <sys/vfs.h>
> +#include <unistd.h>
>   #include <errno.h>
>   
>   #include "nfsd_path.h"


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-04  0:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 22:35 [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes Petr Vorel
2023-12-05 22:35 ` [PATCH v2] support/backend_sqlite.c: Add missing <sys/syscall.h> Petr Vorel
2023-12-06 18:53   ` Giulio Benetti
2023-12-06 19:42     ` Petr Vorel
2023-12-06 22:24       ` Giulio Benetti
2023-12-06 18:53 ` [PATCH v2] reexport/{fsidd,reexport}.c: Re-add missing includes Giulio Benetti
2023-12-06 22:24   ` Giulio Benetti
2024-01-04  0:39 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox