* ebtables-2.0.9-2: build fixes
@ 2010-03-16 7:52 Peter Volkov
2010-03-16 10:31 ` Bart De Schuymer
2010-03-16 13:12 ` Bart De Schuymer
0 siblings, 2 replies; 6+ messages in thread
From: Peter Volkov @ 2010-03-16 7:52 UTC (permalink / raw)
To: netfilter-devel
[-- Attachment #1: Type: text/plain, Size: 357 bytes --]
Hello. I hope this is correct mailing list to post patches for ebtables.
Please, review and apply attached patches for ebtables:
1. ebtables-v2.0.9-2-LDFLAGS.diff - respect LDFLAGS during ebtables
build.
2. ebtables-v2.0.8-2-ethertype-DESTDIR-mkdir.patch - create directories
to avoid build failure when DESTDIR is supplied.
With best regards,
--
Peter.
[-- Attachment #2: ebtables-v2.0.8-2-ethertype-DESTDIR-mkdir.patch --]
[-- Type: text/x-patch, Size: 1619 bytes --]
=== modified file 'Makefile'
--- Makefile 2008-08-13 04:20:07 +0000
+++ Makefile 2008-08-13 04:28:51 +0000
@@ -153,10 +153,13 @@
.PHONY: scripts
scripts: ebtables-save ebtables.sysv ebtables-config
cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
+ mkdir -p $(DESTDIR)$(BINDIR)
install -m 0755 -o root -g root ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
cat ebtables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables.sysv_
+ mkdir -p $(DESTDIR)$(INITDIR)
install -m 0755 -o root -g root ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables
cat ebtables-config | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables-config_
+ mkdir -p $(DESTDIR)$(SYSCONFIGDIR)
install -m 0600 -o root -g root ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config
rm -f ebtables-save_ ebtables.sysv_ ebtables-config_
@@ -166,9 +169,9 @@
install -m 0644 -o root -g root ebtables.8_ $(DESTDIR)$@
rm -f ebtables.8_
-$(ETHERTYPESFILE): ethertypes
- mkdir -p $(DESTDIR)$(@D)
- install -m 0644 -o root -g root $< $(DESTDIR)$@
+$(DESTDIR)$(ETHERTYPESFILE): ethertypes
+ mkdir -p $(@D)
+ install -m 0644 -o root -g root $< $@
.PHONY: exec
exec: ebtables ebtables-restore
@@ -177,7 +180,7 @@
install -m 0755 -o root -g root ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
.PHONY: install
-install: $(MANDIR)/man8/ebtables.8 $(ETHERTYPESFILE) exec scripts
+install: $(MANDIR)/man8/ebtables.8 $(DESTDIR)$(ETHERTYPESFILE) exec scripts
mkdir -p $(DESTDIR)$(LIBDIR)
install -m 0755 extensions/*.so $(DESTDIR)$(LIBDIR)
install -m 0755 *.so $(DESTDIR)$(LIBDIR)
[-- Attachment #3: ebtables-v2.0.9-2-LDFLAGS.diff --]
[-- Type: text/x-patch, Size: 1877 bytes --]
=== modified file 'Makefile'
--- Makefile 2010-03-16 07:37:01 +0000
+++ Makefile 2010-03-16 07:39:15 +0000
@@ -18,7 +18,6 @@
CFLAGS:=-Wall -Wunused
CFLAGS_SH_LIB:=-fPIC
CC:=gcc
-LD:=ld
ifeq ($(shell uname -m),sparc64)
CFLAGS+=-DEBT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32
@@ -85,10 +84,10 @@
.PHONY: libebtc
libebtc: $(OBJECTS2)
- $(CC) -shared -Wl,-soname,libebtc.so -o libebtc.so -lc $(OBJECTS2)
+ $(CC) -shared $(LDFLAGS) -Wl,-soname,libebtc.so -o libebtc.so -lc $(OBJECTS2)
ebtables: $(OBJECTS) ebtables-standalone.o libebtc
- $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
+ $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(LDFLAGS) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
-Wl,-rpath,$(LIBDIR)
ebtablesu: ebtablesu.c
@@ -105,7 +104,7 @@
$(CC) $(CFLAGS) $(PROGSPECS) -c $< -o $@ -I$(KERNEL_INCLUDES)
ebtables-restore: $(OBJECTS) ebtables-restore.o libebtc
- $(CC) $(CFLAGS) -o $@ ebtables-restore.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ebtables-restore.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
-Wl,-rpath,$(LIBDIR)
.PHONY: daemon
=== modified file 'extensions/Makefile'
--- extensions/Makefile 2010-03-16 07:37:01 +0000
+++ extensions/Makefile 2010-03-16 07:37:43 +0000
@@ -11,13 +11,13 @@
EXT_LIBSI+=$(foreach T,$(EXT_TABLES), -lebtable_$(T))
extensions/ebt_%.so: extensions/ebt_%.o
- $(CC) -shared -o $@ -lc $< -nostartfiles
+ $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
extensions/libebt_%.so: extensions/ebt_%.so
mv $< $@
extensions/ebtable_%.so: extensions/ebtable_%.o
- $(CC) -shared -o $@ -lc $< -nostartfiles
+ $(CC) $(LDFLAGS) -shared -o $@ -lc $< -nostartfiles
extensions/libebtable_%.so: extensions/ebtable_%.so
mv $< $@
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ebtables-2.0.9-2: build fixes
2010-03-16 7:52 ebtables-2.0.9-2: build fixes Peter Volkov
@ 2010-03-16 10:31 ` Bart De Schuymer
2010-03-16 10:44 ` Jan Engelhardt
2010-03-16 13:03 ` Bart De Schuymer
2010-03-16 13:12 ` Bart De Schuymer
1 sibling, 2 replies; 6+ messages in thread
From: Bart De Schuymer @ 2010-03-16 10:31 UTC (permalink / raw)
To: Peter Volkov; +Cc: netfilter-devel
Peter Volkov wrote:
> Hello. I hope this is correct mailing list to post patches for ebtables.
> Please, review and apply attached patches for ebtables:
>
> 1. ebtables-v2.0.9-2-LDFLAGS.diff - respect LDFLAGS during ebtables
> build.
> 2. ebtables-v2.0.8-2-ethertype-DESTDIR-mkdir.patch - create directories
> to avoid build failure when DESTDIR is supplied.
>
> With best regards,
>
Hello Peter,
Thanks for the patches. I have some questions, though.
- In what situation is LDFLAGS needed (it's not defined in the
Makefiles)? Is it standard practice to include this?
- Not all distros use the sysvinit package anymore (e.g. Ubuntu uses
upstart). In arptables I made the copying to INITDIR and SYSCONFIGDIR
dependent on the existence of the directories. That way we don't copy
the sysvinit type of files on a system that uses something else. I'd
prefer to do the same thing with ebtables. Does that sound ok to you?
cheers,
Bart
--
Bart De Schuymer
www.artinalgorithms.be
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ebtables-2.0.9-2: build fixes
2010-03-16 10:31 ` Bart De Schuymer
@ 2010-03-16 10:44 ` Jan Engelhardt
2010-03-16 11:21 ` Bart De Schuymer
2010-03-16 13:03 ` Bart De Schuymer
1 sibling, 1 reply; 6+ messages in thread
From: Jan Engelhardt @ 2010-03-16 10:44 UTC (permalink / raw)
To: Bart De Schuymer; +Cc: Peter Volkov, netfilter-devel
On Tuesday 2010-03-16 11:31, Bart De Schuymer wrote:
>>
>> 1. ebtables-v2.0.9-2-LDFLAGS.diff - respect LDFLAGS during ebtables
>> build.
>> 2. ebtables-v2.0.8-2-ethertype-DESTDIR-mkdir.patch - create directories
>> to avoid build failure when DESTDIR is supplied.
>
>Thanks for the patches. I have some questions, though.
>- In what situation is LDFLAGS needed (it's not defined in the
>Makefiles)? Is it standard practice to include this?
LDFLAGS=-m32 and LDFLAGS=-Wl,--as-needed are two examples for
this decade.
>- Not all distros use the sysvinit package anymore (e.g. Ubuntu uses
>upstart). In arptables I made the copying to INITDIR and SYSCONFIGDIR
>dependent on the existence of the directories. That way we don't copy
>the sysvinit type of files on a system that uses something else. I'd
>prefer to do the same thing with ebtables. Does that sound ok to you?
That sounds wrong to me. Chroots building software may have fewer
directories than the Makefiles expect, so it's best not to install
too few files. Deleting files in buildscripts is easier on the mind
than postinstalling them.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ebtables-2.0.9-2: build fixes
2010-03-16 10:44 ` Jan Engelhardt
@ 2010-03-16 11:21 ` Bart De Schuymer
0 siblings, 0 replies; 6+ messages in thread
From: Bart De Schuymer @ 2010-03-16 11:21 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: Peter Volkov, netfilter-devel
Jan Engelhardt wrote:
>> - Not all distros use the sysvinit package anymore (e.g. Ubuntu uses
>> upstart). In arptables I made the copying to INITDIR and SYSCONFIGDIR
>> dependent on the existence of the directories. That way we don't copy
>> the sysvinit type of files on a system that uses something else. I'd
>> prefer to do the same thing with ebtables. Does that sound ok to you?
>
> That sounds wrong to me. Chroots building software may have fewer
> directories than the Makefiles expect, so it's best not to install
> too few files. Deleting files in buildscripts is easier on the mind
> than postinstalling them.
I don't want to install these files on a non-sysvinit system. Enabling
the copying when DESTDIR exists and differs from / is OK for me.
cheers,
Bart
--
Bart De Schuymer
www.artinalgorithms.be
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ebtables-2.0.9-2: build fixes
2010-03-16 10:31 ` Bart De Schuymer
2010-03-16 10:44 ` Jan Engelhardt
@ 2010-03-16 13:03 ` Bart De Schuymer
1 sibling, 0 replies; 6+ messages in thread
From: Bart De Schuymer @ 2010-03-16 13:03 UTC (permalink / raw)
To: Peter Volkov; +Cc: netfilter-devel
Bart De Schuymer wrote:
> Peter Volkov wrote:
>> Hello. I hope this is correct mailing list to post patches for ebtables.
>> Please, review and apply attached patches for ebtables:
>>
>> 1. ebtables-v2.0.9-2-LDFLAGS.diff - respect LDFLAGS during ebtables
>> build.
>> 2. ebtables-v2.0.8-2-ethertype-DESTDIR-mkdir.patch - create directories
>> to avoid build failure when DESTDIR is supplied.
>>
>> With best regards,
>>
>
> Hello Peter,
>
> Thanks for the patches. I have some questions, though.
> - In what situation is LDFLAGS needed (it's not defined in the
> Makefiles)? Is it standard practice to include this?
> - Not all distros use the sysvinit package anymore (e.g. Ubuntu uses
> upstart). In arptables I made the copying to INITDIR and SYSCONFIGDIR
> dependent on the existence of the directories. That way we don't copy
> the sysvinit type of files on a system that uses something else. I'd
> prefer to do the same thing with ebtables. Does that sound ok to you?
I've committed a slightly altered version of your patch to cvs. The
INITDIR and SYSCONFIGDIR are only created if DESTDIR is specified. The
sysvinit files are only copied if their directories exist.
cheers,
Bart
--
Bart De Schuymer
www.artinalgorithms.be
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ebtables-2.0.9-2: build fixes
2010-03-16 7:52 ebtables-2.0.9-2: build fixes Peter Volkov
2010-03-16 10:31 ` Bart De Schuymer
@ 2010-03-16 13:12 ` Bart De Schuymer
1 sibling, 0 replies; 6+ messages in thread
From: Bart De Schuymer @ 2010-03-16 13:12 UTC (permalink / raw)
To: Peter Volkov; +Cc: netfilter-devel
Peter Volkov wrote:
> Hello. I hope this is correct mailing list to post patches for ebtables.
> Please, review and apply attached patches for ebtables:
>
> 1. ebtables-v2.0.9-2-LDFLAGS.diff - respect LDFLAGS during ebtables
> build.
> 2. ebtables-v2.0.8-2-ethertype-DESTDIR-mkdir.patch - create directories
> to avoid build failure when DESTDIR is supplied.
>
> With best regards,
>
I also applied the DESTDIR addition.
cheers,
Bart
--
Bart De Schuymer
www.artinalgorithms.be
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-03-16 13:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-16 7:52 ebtables-2.0.9-2: build fixes Peter Volkov
2010-03-16 10:31 ` Bart De Schuymer
2010-03-16 10:44 ` Jan Engelhardt
2010-03-16 11:21 ` Bart De Schuymer
2010-03-16 13:03 ` Bart De Schuymer
2010-03-16 13:12 ` Bart De Schuymer
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).