Summary: | [patch] ftp/vsftpd{,-ext}: respect CC/CFLAGS/STRIP uniformly | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Jan Beich <jbeich> | ||||
Component: | Individual Port(s) | Assignee: | Dirk Meyer <dinoex> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Only Me | ||||||
Priority: | Normal | ||||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Jan Beich
2011-12-23 00:40:04 UTC
Responsible Changed From-To: freebsd-ports-bugs->dinoex Over to maintainer (via the GNATS Auto Assign Tool) State Changed From-To: open->feedback Ill take this for vsftpd-ext, leaving vsftpd for maintainer. scheidell 2011-12-23 19:18:55 UTC FreeBSD ports repository Modified files: ftp/vsftpd-ext Makefile Log: - respect CC/CFLAGS/STRIP on vsftpd-ext PR: ports/163550 Submitted by: Jan Beich <jbeich@tormail.net> Approved by: gelraen.ua@gmail.com (maintainer), gabor(mentor) Revision Changes Path 1.6 +6 -5 ports/ftp/vsftpd-ext/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" State Changed From-To: feedback->analyzed > - respect CC (vsftpd-ext) You patch core vsftpd here too, I do not see any problems with the old code. > - respect CFLAGS[1], don't append -O2 as it breaks > WITH_DEBUG/DEBUG_FLAGS/CFLAGS set in make.conf/Makefile.local I do not see any problems with the old code. make clean BATCH=1 WITH_VSFTPD_SSL=1 all WITH_DEBUG=1 DEBUG_FLAGS="-g -g" Where does -O2 breaks debugging? > - don't strip unconditionally, rely INSTALL_PROGRAM respecting STRIP[2] ok, INSTALL_PROGRAM should be used. > - remove -lwrap from LDFLAGS, rely on vsf_findlibs.sh adding it ok, vsf_findlibs does adding it > - don't link against -lutil on FreeBSD, setproctitle() moved to libc > more than 10 years ago, ports/ do not support FreeBSD < 7. ok dinoex 2011-12-24 10:51:35 UTC FreeBSD ports repository Modified files: ftp/vsftpd Makefile Log: - remove duplicate -lwrap - drop usage of -lutil - honor INSTALL_PROGRAM PR: 163550 Revision Changes Path 1.49 +2 -2 ports/ftp/vsftpd/Makefile _______________________________________________ cvs-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/cvs-all To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org" dinoex@FreeBSD.org writes: >> - respect CC (vsftpd-ext) > > You patch core vsftpd here too, > I do not see any problems with the old code. I've tried to keep the diff small between vsftpd and vsftpd-ext. $ diff -up ftp/vsftpd{,-ext}/Makefile > >> - respect CFLAGS[1], don't append -O2 as it breaks >> WITH_DEBUG/DEBUG_FLAGS/CFLAGS set in make.conf/Makefile.local > > I do not see any problems with the old code. > make clean BATCH=1 WITH_VSFTPD_SSL=1 all WITH_DEBUG=1 DEBUG_FLAGS="-g -g" WITH_DEBUG=1 won't work unless the port at least respects STRIP. > Where does -O2 breaks debugging? Try with DEBUG_FLAGS='-O0 -g3', notice how always -O2 overrides it. bsd.port.mk does smth similar by disabling -O* added by sys.mk. Don't you want to debug non-optimized code sometimes? Also, a user may want to override system optimization to -O0, -O1, -O3, -O4 or -Ofast for non-debug build, e.g. to benchmark different optimization levels. ports/ are supposed to be a tool not a policy how to build unless I'm misunderstanding CFLAGS chapter in PH. http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/dads-cflags.html > >> - don't strip unconditionally, rely INSTALL_PROGRAM respecting STRIP[2] > > ok, INSTALL_PROGRAM should be used. As vendor install target is unused, the port has its own do-install target. And INSTALL_PROGRAM is executed too late, the binary is stripped during build. Author: dinoex Date: Thu Sep 6 14:29:59 2012 New Revision: 303756 URL: http://svn.freebsd.org/changeset/ports/303756 Log: - respect INSTALL_PROGRAM, STRIP and custom optimisations in CFLAGS PR: 163550 Modified: head/ftp/vsftpd/Makefile Modified: head/ftp/vsftpd/Makefile ============================================================================== --- head/ftp/vsftpd/Makefile Thu Sep 6 14:11:07 2012 (r303755) +++ head/ftp/vsftpd/Makefile Thu Sep 6 14:29:59 2012 (r303756) @@ -44,6 +44,11 @@ LDFLAGS+= -L${OPENSSLLIB} EXTRA_PATCHES+= ${FILESDIR}/pidfile.patch .endif +VSFTPD_OPTIMIZED= ${CFLAGS:M-O} +.if defined(CFLAGS) && !empty(VSFTPD_OPTIMIZED) +VSFTPD_NO_OPTIMIZED= -e "s| -O2 ||" +.endif + # BROKEN on FreeBSD with undefined reference to `__stack_chk_fail_local' LDFLAGS+= -lssp_nonshared @@ -58,16 +63,16 @@ do-configure: "s|#undef VSF_BUILD_TCPWRAPPERS|#define VSF_BUILD_TCPWRAPPERS 1|" \ ${WRKSRC}/builddefs.h .endif - ${REINPLACE_CMD} -e "s|^listen=|#listen=|" \ + ${REINPLACE_CMD} -e "s|^listen=.*|listen=NO|" \ -e "s|/etc/vsftpd.conf|${PREFIX}/etc/vsftpd.conf|" \ ${WRKSRC}/defs.h ${WRKSRC}/vsftpd.conf ${REINPLACE_CMD} -e "s|/etc/v|${PREFIX}/etc/v|" \ ${WRKSRC}/vsftpd.8 ${WRKSRC}/vsftpd.conf.5 ${WRKSRC}/tunables.c - ${REINPLACE_CMD} \ + ${REINPLACE_CMD} ${VSFTPD_NO_OPTIMIZED} \ -e "s|^CC = gcc|CC = ${CC}|" \ -e "s|^CFLAGS =|CFLAGS = ${CFLAGS}|" \ - -e "s|^INSTALL =|INSTALL = ${INSTALL_PROGRAM}|" \ - -e "s| -Wl,-s| -Wl,-s ${LDFLAGS:S/-rpath=/-Wl,-rpath,/g}|" \ + -e "s|$$(INSTALL) -m 755=|$${INSTALL_PROGRAM}|" \ + -e "s| -Wl,-s| -Wl ${LDFLAGS:S/-rpath=/-Wl,-rpath,/g}|" \ ${WRKSRC}/Makefile ${REINPLACE_CMD} -e '/-lutil/d' ${WRKSRC}/vsf_findlibs.sh @${ECHO_CMD} "secure_chroot_dir=${PREFIX}/share/vsftpd/empty" >> \ _______________________________________________ svn-ports-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-ports-all To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org" State Changed From-To: analyzed->closed all issues solved. |