netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ipset make modules_install fails to honor INSTALL_MOD_PATH
@ 2020-05-21 19:27 Oskar Berggren
  2020-05-21 21:09 ` Jan Engelhardt
  0 siblings, 1 reply; 3+ messages in thread
From: Oskar Berggren @ 2020-05-21 19:27 UTC (permalink / raw)
  To: netfilter-devel

Hi,

In build scripts for a custom environment I have since about a decade
something like this to build ipset and package the binaries:

make
make modules
DESTDIR=... make install
INSTALL_MOD_PATH=... make modules_install

It was a long time since I last updated this, but this seems to have
worked for at least one of ipset 6.11 or 6.24.

However, with ipset 7.6, despite setting INSTALL_MOD_PATH, the scripts
tries to install under the real /lib directory.

In the makefile I find this line, which seems to override whatever I
set for INSTALL_MOD_PATH:

    INSTALL_MOD_PATH = /

Oddly enough, this line was introduced by a commit titled "Support
chroot buildroots":
http://git.netfilter.org/ipset/commit/Makefile.am?id=5bad18403fa258204214d45580ca0d235e1a4486

Changing the line to the following seems to make it possible for my
script to override and get the desired relocation:

    INSTALL_MOD_PATH ?= /


Or is there a different solution I should be using?

Best regards,
Oskar

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

* Re: ipset make modules_install fails to honor INSTALL_MOD_PATH
  2020-05-21 19:27 ipset make modules_install fails to honor INSTALL_MOD_PATH Oskar Berggren
@ 2020-05-21 21:09 ` Jan Engelhardt
  2020-05-21 22:05   ` Oskar Berggren
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Engelhardt @ 2020-05-21 21:09 UTC (permalink / raw)
  To: Oskar Berggren; +Cc: netfilter-devel


On Thursday 2020-05-21 21:27, Oskar Berggren wrote:

>make
>make modules
>DESTDIR=... make install
>INSTALL_MOD_PATH=... make modules_install

» make modules_install DESTDIR=/tmp/RT INSTALL_MOD_PATH=/tmp/RT2
make -C /home/jengelh/code/linux M=$PWD/kernel/net \
                KDIR=$PWD/kernel modules_install
make[1]: Entering directory '/home/jengelh/code/linux'
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_bitmap_ip.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_bitmap_ipmac.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_bitmap_port.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_ip.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_ipmac.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_ipmark.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_ipport.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_ipportip.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_ipportnet.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_mac.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_net.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_netiface.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_netnet.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_netport.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_hash_netportnet.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/ipset/ip_set_list_set.ko
  INSTALL /ipset-7.6/kernel/net/netfilter/xt_set.ko
  INSTALL /ipset-7.6/kernel/net/sched/em_ipset.ko
  DEPMOD  5.7.0-rc6-2.gb520bde-default+
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/home/jengelh/code/linux'
modinfo: ERROR: Module alias ip_set_hash_ip not found.

!!! WARNING !!! WARNING !!! WARNING !!!

Your distribution seems to ignore the /lib/modules/<kernelrelease>/extra/
subdirectory, where the ipset kernel modules are installed.

Add the 'extra' directory to the search definition of your depmod
configuration (/etc/depmod.conf or /etc/depmod.d/) and re-run

        depmod <kernelrelease>

otherwise the ipset kernel modules in the extra subdir will be ignored.


» find /tmp/RT2/
/tmp/RT2/
/tmp/RT2/lib
/tmp/RT2/lib/modules
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/sched
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/sched/em_ipset.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/xt_set.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_list_set.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_netportnet.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_netport.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_netnet.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_netiface.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_net.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_mac.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_ipportnet.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_ipportip.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_ipport.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_ipmark.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_ipmac.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_hash_ip.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_bitmap_port.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_bitmap_ipmac.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set_bitmap_ip.ko
/tmp/RT2/lib/modules/5.7.0-rc6-2.gb520bde-default+/extra/netfilter/ipset/ip_set.ko



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

* Re: ipset make modules_install fails to honor INSTALL_MOD_PATH
  2020-05-21 21:09 ` Jan Engelhardt
@ 2020-05-21 22:05   ` Oskar Berggren
  0 siblings, 0 replies; 3+ messages in thread
From: Oskar Berggren @ 2020-05-21 22:05 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netfilter-devel

Den tors 21 maj 2020 kl 23:09 skrev Jan Engelhardt <jengelh@inai.de>:
>
>
> On Thursday 2020-05-21 21:27, Oskar Berggren wrote:
>
> >make
> >make modules
> >DESTDIR=... make install
> >INSTALL_MOD_PATH=... make modules_install
>
> » make modules_install DESTDIR=/tmp/RT INSTALL_MOD_PATH=/tmp/RT2

Ah, cool, thanks!

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

end of thread, other threads:[~2020-05-21 22:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21 19:27 ipset make modules_install fails to honor INSTALL_MOD_PATH Oskar Berggren
2020-05-21 21:09 ` Jan Engelhardt
2020-05-21 22:05   ` Oskar Berggren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).