diff mbox series

[1/1] package/aufs: don't set invalid AUFS_SITE if version is unset

Message ID 20220405025054.966064-1-james.hilliard1@gmail.com
State Changes Requested
Headers show
Series [1/1] package/aufs: don't set invalid AUFS_SITE if version is unset | expand

Commit Message

James Hilliard April 5, 2022, 2:50 a.m. UTC
Fixes:
package/aufs/aufs.mk:24: *** AUFS_SITE (https://github.com/sfjro/aufs4-standalone/archive/) cannot have a trailing slash.  Stop.
make: *** [Makefile:84: _all] Error 2

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 package/aufs/aufs.mk | 2 ++
 1 file changed, 2 insertions(+)

Comments

Arnout Vandecappelle April 5, 2022, 5:19 p.m. UTC | #1
On 05/04/2022 04:50, James Hilliard wrote:
> Fixes:
> package/aufs/aufs.mk:24: *** AUFS_SITE (https://github.com/sfjro/aufs4-standalone/archive/) cannot have a trailing slash.  Stop.
> make: *** [Makefile:84: _all] Error 2

  How do you get this? I've tried a number of configurations, but I always get

package/aufs/aufs.mk:21: *** No aufs version specified.  Stop.
make: *** [Makefile:84: _all] Error 2

  I could only reproduce with `make source`, but that's a bit a special case.

  Regards,
  Arnout

> 
> Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> ---
>   package/aufs/aufs.mk | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/package/aufs/aufs.mk b/package/aufs/aufs.mk
> index 4e95a350a0..b2dda771d9 100644
> --- a/package/aufs/aufs.mk
> +++ b/package/aufs/aufs.mk
> @@ -8,6 +8,7 @@ AUFS_VERSION = $(call qstrip,$(BR2_PACKAGE_AUFS_VERSION))
>   AUFS_LICENSE = GPL-2.0
>   AUFS_LICENSE_FILES = COPYING
>   
> +ifneq ($(AUFS_VERSION),)
>   ifeq ($(BR2_PACKAGE_AUFS_SERIES),3)
>   AUFS_SITE = http://git.code.sf.net/p/aufs/aufs3-standalone
>   AUFS_SITE_METHOD = git
> @@ -16,6 +17,7 @@ AUFS_SITE = $(call github,sfjro,aufs4-standalone,$(AUFS_VERSION))
>   else ifeq ($(BR2_PACKAGE_AUFS_SERIES),5)
>   AUFS_SITE = $(call github,sfjro,aufs5-standalone,$(AUFS_VERSION))
>   endif
> +endif
>   
>   ifeq ($(BR_BUILDING):$(BR2_PACKAGE_AUFS):$(AUFS_VERSION),y:y:)
>   $(error No aufs version specified)
James Hilliard April 5, 2022, 8:09 p.m. UTC | #2
On Tue, Apr 5, 2022 at 11:19 AM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 05/04/2022 04:50, James Hilliard wrote:
> > Fixes:
> > package/aufs/aufs.mk:24: *** AUFS_SITE (https://github.com/sfjro/aufs4-standalone/archive/) cannot have a trailing slash.  Stop.
> > make: *** [Makefile:84: _all] Error 2
>
>   How do you get this? I've tried a number of configurations, but I always get
>
> package/aufs/aufs.mk:21: *** No aufs version specified.  Stop.
> make: *** [Makefile:84: _all] Error 2
>
>   I could only reproduce with `make source`, but that's a bit a special case.

Something like this seems to hit it:
BR2_LINUX_KERNEL_EXT_AUFS=y
# BR2_LINUX_KERNEL_EXT_AUFS_SERIES_3 is not set
BR2_LINUX_KERNEL_EXT_AUFS_SERIES_4=y
# BR2_LINUX_KERNEL_EXT_AUFS_SERIES_5 is not set
BR2_LINUX_KERNEL_EXT_AUFS_SERIES=4
BR2_LINUX_KERNEL_EXT_AUFS_VERSION=""
BR2_PACKAGE_AUFS=y
BR2_PACKAGE_AUFS_SERIES=4
BR2_PACKAGE_AUFS_VERSION=""
# BR2_PACKAGE_AUFS_UTIL is not set

>
>   Regards,
>   Arnout
>
> >
> > Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
> > ---
> >   package/aufs/aufs.mk | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/package/aufs/aufs.mk b/package/aufs/aufs.mk
> > index 4e95a350a0..b2dda771d9 100644
> > --- a/package/aufs/aufs.mk
> > +++ b/package/aufs/aufs.mk
> > @@ -8,6 +8,7 @@ AUFS_VERSION = $(call qstrip,$(BR2_PACKAGE_AUFS_VERSION))
> >   AUFS_LICENSE = GPL-2.0
> >   AUFS_LICENSE_FILES = COPYING
> >
> > +ifneq ($(AUFS_VERSION),)
> >   ifeq ($(BR2_PACKAGE_AUFS_SERIES),3)
> >   AUFS_SITE = http://git.code.sf.net/p/aufs/aufs3-standalone
> >   AUFS_SITE_METHOD = git
> > @@ -16,6 +17,7 @@ AUFS_SITE = $(call github,sfjro,aufs4-standalone,$(AUFS_VERSION))
> >   else ifeq ($(BR2_PACKAGE_AUFS_SERIES),5)
> >   AUFS_SITE = $(call github,sfjro,aufs5-standalone,$(AUFS_VERSION))
> >   endif
> > +endif
> >
> >   ifeq ($(BR_BUILDING):$(BR2_PACKAGE_AUFS):$(AUFS_VERSION),y:y:)
> >   $(error No aufs version specified)
Yann E. MORIN April 5, 2022, 9:12 p.m. UTC | #3
James, All,

On 2022-04-05 14:09 -0600, James Hilliard spake thusly:
> On Tue, Apr 5, 2022 at 11:19 AM Arnout Vandecappelle <arnout@mind.be> wrote:
> > On 05/04/2022 04:50, James Hilliard wrote:
> > > Fixes:
> > > package/aufs/aufs.mk:24: *** AUFS_SITE (https://github.com/sfjro/aufs4-standalone/archive/) cannot have a trailing slash.  Stop.
> > > make: *** [Makefile:84: _all] Error 2
> >   How do you get this? I've tried a number of configurations, but I always get
> > package/aufs/aufs.mk:21: *** No aufs version specified.  Stop.
> > make: *** [Makefile:84: _all] Error 2
> >   I could only reproduce with `make source`, but that's a bit a special case.
> 
> Something like this seems to hit it:
> BR2_LINUX_KERNEL_EXT_AUFS=y
> # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_3 is not set
> BR2_LINUX_KERNEL_EXT_AUFS_SERIES_4=y
> # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_5 is not set
> BR2_LINUX_KERNEL_EXT_AUFS_SERIES=4
> BR2_LINUX_KERNEL_EXT_AUFS_VERSION=""
> BR2_PACKAGE_AUFS=y
> BR2_PACKAGE_AUFS_SERIES=4
> BR2_PACKAGE_AUFS_VERSION=""
> # BR2_PACKAGE_AUFS_UTIL is not set

This still produces the expected error that Arnout reported:

    $ make qemu_m68k_q800_defconfig  # just for a config with a kernel

    $ cat <<_EOF_ >>.config
    BR2_LINUX_KERNEL_EXT_AUFS=y
    # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_3 is not set
    BR2_LINUX_KERNEL_EXT_AUFS_SERIES_4=y
    # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_5 is not set
    BR2_LINUX_KERNEL_EXT_AUFS_SERIES=4
    BR2_LINUX_KERNEL_EXT_AUFS_VERSION=""
    BR2_PACKAGE_AUFS=y
    BR2_PACKAGE_AUFS_SERIES=4
    BR2_PACKAGE_AUFS_VERSION=""
    # BR2_PACKAGE_AUFS_UTIL is not set
    _EOF_

    $ make olddefconfig

    $ grep AUFS .config
    BR2_LINUX_KERNEL_EXT_AUFS=y
    # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_3 is not set
    BR2_LINUX_KERNEL_EXT_AUFS_SERIES_4=y
    # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_5 is not set
    BR2_LINUX_KERNEL_EXT_AUFS_SERIES=4
    BR2_LINUX_KERNEL_EXT_AUFS_VERSION=""
    BR2_PACKAGE_AUFS=y
    BR2_PACKAGE_AUFS_SERIES=4
    BR2_PACKAGE_AUFS_VERSION=""
    # BR2_PACKAGE_AUFS_UTIL is not set

    $ make
    package/aufs/aufs.mk:21: *** No aufs version specified.  Stop.
    make: *** [Makefile:23: _all] Error 2

Regards,
Yann E. MORIN.
James Hilliard April 8, 2022, 11:56 p.m. UTC | #4
On Tue, Apr 5, 2022 at 3:12 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
>
> James, All,
>
> On 2022-04-05 14:09 -0600, James Hilliard spake thusly:
> > On Tue, Apr 5, 2022 at 11:19 AM Arnout Vandecappelle <arnout@mind.be> wrote:
> > > On 05/04/2022 04:50, James Hilliard wrote:
> > > > Fixes:
> > > > package/aufs/aufs.mk:24: *** AUFS_SITE (https://github.com/sfjro/aufs4-standalone/archive/) cannot have a trailing slash.  Stop.
> > > > make: *** [Makefile:84: _all] Error 2
> > >   How do you get this? I've tried a number of configurations, but I always get
> > > package/aufs/aufs.mk:21: *** No aufs version specified.  Stop.
> > > make: *** [Makefile:84: _all] Error 2
> > >   I could only reproduce with `make source`, but that's a bit a special case.
> >
> > Something like this seems to hit it:
> > BR2_LINUX_KERNEL_EXT_AUFS=y
> > # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_3 is not set
> > BR2_LINUX_KERNEL_EXT_AUFS_SERIES_4=y
> > # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_5 is not set
> > BR2_LINUX_KERNEL_EXT_AUFS_SERIES=4
> > BR2_LINUX_KERNEL_EXT_AUFS_VERSION=""
> > BR2_PACKAGE_AUFS=y
> > BR2_PACKAGE_AUFS_SERIES=4
> > BR2_PACKAGE_AUFS_VERSION=""
> > # BR2_PACKAGE_AUFS_UTIL is not set
>
> This still produces the expected error that Arnout reported:
>
>     $ make qemu_m68k_q800_defconfig  # just for a config with a kernel
>
>     $ cat <<_EOF_ >>.config
>     BR2_LINUX_KERNEL_EXT_AUFS=y
>     # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_3 is not set
>     BR2_LINUX_KERNEL_EXT_AUFS_SERIES_4=y
>     # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_5 is not set
>     BR2_LINUX_KERNEL_EXT_AUFS_SERIES=4
>     BR2_LINUX_KERNEL_EXT_AUFS_VERSION=""
>     BR2_PACKAGE_AUFS=y
>     BR2_PACKAGE_AUFS_SERIES=4
>     BR2_PACKAGE_AUFS_VERSION=""
>     # BR2_PACKAGE_AUFS_UTIL is not set
>     _EOF_
>
>     $ make olddefconfig
>
>     $ grep AUFS .config
>     BR2_LINUX_KERNEL_EXT_AUFS=y
>     # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_3 is not set
>     BR2_LINUX_KERNEL_EXT_AUFS_SERIES_4=y
>     # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_5 is not set
>     BR2_LINUX_KERNEL_EXT_AUFS_SERIES=4
>     BR2_LINUX_KERNEL_EXT_AUFS_VERSION=""
>     BR2_PACKAGE_AUFS=y
>     BR2_PACKAGE_AUFS_SERIES=4
>     BR2_PACKAGE_AUFS_VERSION=""
>     # BR2_PACKAGE_AUFS_UTIL is not set
>
>     $ make

You need to do make savedefconfig here for it to reproduce:
$ make savedefconfig
package/aufs/aufs.mk:24: *** AUFS_SITE
(https://github.com/sfjro/aufs4-standalone/archive/) cannot have a
trailing slash.  Stop.
make: *** [Makefile:84: _all] Error 2

>     package/aufs/aufs.mk:21: *** No aufs version specified.  Stop.
>     make: *** [Makefile:23: _all] Error 2
>
> Regards,
> Yann E. MORIN.
>
> --
> .-----------------.--------------------.------------------.--------------------.
> |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'
Yann E. MORIN April 9, 2022, 8:40 a.m. UTC | #5
James, All,

On 2022-04-08 17:56 -0600, James Hilliard spake thusly:
> On Tue, Apr 5, 2022 at 3:12 PM Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> > On 2022-04-05 14:09 -0600, James Hilliard spake thusly:
> > > On Tue, Apr 5, 2022 at 11:19 AM Arnout Vandecappelle <arnout@mind.be> wrote:
> > > > On 05/04/2022 04:50, James Hilliard wrote:
> > > > > Fixes:
> > > > > package/aufs/aufs.mk:24: *** AUFS_SITE (https://github.com/sfjro/aufs4-standalone/archive/) cannot have a trailing slash.  Stop.
> > > > > make: *** [Makefile:84: _all] Error 2
> > > >   How do you get this? I've tried a number of configurations, but I always get
> > > > package/aufs/aufs.mk:21: *** No aufs version specified.  Stop.
> > > > make: *** [Makefile:84: _all] Error 2
> > > >   I could only reproduce with `make source`, but that's a bit a special case.
> > > Something like this seems to hit it:
> > > BR2_LINUX_KERNEL_EXT_AUFS=y
> > > # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_3 is not set
> > > BR2_LINUX_KERNEL_EXT_AUFS_SERIES_4=y
> > > # BR2_LINUX_KERNEL_EXT_AUFS_SERIES_5 is not set
> > > BR2_LINUX_KERNEL_EXT_AUFS_SERIES=4
> > > BR2_LINUX_KERNEL_EXT_AUFS_VERSION=""
> > > BR2_PACKAGE_AUFS=y
> > > BR2_PACKAGE_AUFS_SERIES=4
> > > BR2_PACKAGE_AUFS_VERSION=""
> > > # BR2_PACKAGE_AUFS_UTIL is not set
> > This still produces the expected error that Arnout reported:
[--SNIP--]
> You need to do make savedefconfig here for it to reproduce:
[--SNIP--]

Indeed, I could reproduce.

However, I think the fix is still incorrect.

Indeed, if we were to do what you suggest, them it would be possible to
call savedefconfig on a broken configuration; this does not make sense.

Instead, I believe that savedefconfig and update-defconfig (an alias for
the former) should not be declared as nobuild_targets:

    diff --git a/Makefile b/Makefile
    index 05b790d770..69994a58da 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -141,7 +141,7 @@ nobuild_targets := source %-source \
     	clean distclean help show-targets graph-depends \
     	%-graph-depends %-show-depends %-show-version \
     	graph-build graph-size list-defconfigs \
    -	savedefconfig update-defconfig printvars show-vars
    +	printvars show-vars
     ifeq ($(MAKECMDGOALS),)
     BR_BUILDING = y
     else ifneq ($(filter-out $(nobuild_targets),$(MAKECMDGOALS)),)

There are a bout ~35 places where we use $(BR_BUILDING). I've look at
all the instances in boot/ and linux/,i in toolchain/ and package/aufs/
of course, and a few others, and they all seem to be fine if we remove
savedefconfig and update-defconfig from nobuild_targets.

Care to have a further look, please, and send a patch?

Regards,
Yann E. MORIN.
diff mbox series

Patch

diff --git a/package/aufs/aufs.mk b/package/aufs/aufs.mk
index 4e95a350a0..b2dda771d9 100644
--- a/package/aufs/aufs.mk
+++ b/package/aufs/aufs.mk
@@ -8,6 +8,7 @@  AUFS_VERSION = $(call qstrip,$(BR2_PACKAGE_AUFS_VERSION))
 AUFS_LICENSE = GPL-2.0
 AUFS_LICENSE_FILES = COPYING
 
+ifneq ($(AUFS_VERSION),)
 ifeq ($(BR2_PACKAGE_AUFS_SERIES),3)
 AUFS_SITE = http://git.code.sf.net/p/aufs/aufs3-standalone
 AUFS_SITE_METHOD = git
@@ -16,6 +17,7 @@  AUFS_SITE = $(call github,sfjro,aufs4-standalone,$(AUFS_VERSION))
 else ifeq ($(BR2_PACKAGE_AUFS_SERIES),5)
 AUFS_SITE = $(call github,sfjro,aufs5-standalone,$(AUFS_VERSION))
 endif
+endif
 
 ifeq ($(BR_BUILDING):$(BR2_PACKAGE_AUFS):$(AUFS_VERSION),y:y:)
 $(error No aufs version specified)