diff options
Diffstat (limited to 'net-proxy/cntlm')
-rw-r--r-- | net-proxy/cntlm/Manifest | 9 | ||||
-rw-r--r-- | net-proxy/cntlm/cntlm-0.93_beta5-r2.ebuild | 56 | ||||
-rw-r--r-- | net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch | 195 | ||||
-rw-r--r-- | net-proxy/cntlm/files/cntlm.confd | 5 | ||||
-rw-r--r-- | net-proxy/cntlm/files/cntlm.initd | 21 | ||||
-rw-r--r-- | net-proxy/cntlm/files/cntlm.service | 9 | ||||
-rw-r--r-- | net-proxy/cntlm/metadata.xml | 12 |
7 files changed, 307 insertions, 0 deletions
diff --git a/net-proxy/cntlm/Manifest b/net-proxy/cntlm/Manifest new file mode 100644 index 000000000000..526b40f287c6 --- /dev/null +++ b/net-proxy/cntlm/Manifest @@ -0,0 +1,9 @@ +AUX cntlm-0.93_beta5-buildsystem.patch 6380 SHA256 988092a399ef78a775c2b1c02bdd49fe1efb3f1c13ba6b07b92102145051410d SHA512 fbd51773feeceb130cf1ba0345a8d169611e038a7ced8633511ac8f907c0f04b515b42b618f3058d9a0325dd6b76b08a3969f65fa8c1c67c5d886ce978ee54a3 WHIRLPOOL 5882c7f967eaab4c84252672ecd0127a55c5dd320ebfbdb9bceade11e2731686101ad1df344f3ed515853fd5cdc8bc81cb45e63365b2896b3b8e8384c84fd737 +AUX cntlm.confd 150 SHA256 5a5e6b44ea784bf667308d79f7df3b8519f7a5741a6939c810e0a5eecbbe2afe SHA512 e2ff84cbb17265e5ba1a8be9d66294dd714c9b42f9977548305447413ca3763ad18035c90c723cbdc5e3fdb5e87005f597a1a441f57c9aec2612558c7534e697 WHIRLPOOL f73ad3406c709c453d391e5126ebb427761790e07105871213e8e516d80be08c07c2f25394cb8200ea458d9bbe88e38c0d47d92583411917fb95efea5f9528b5 +AUX cntlm.initd 457 SHA256 e61cc1d4f9227bc3a84ca6f4843ccd646882826377138ef77164b6762717c72f SHA512 5297d9cb64d5b9d56e67f3e211f6778c6e38318edec09e13df0571fac10eb4aa4b48479a93495a0837936d43a58a62839d1adb9871431970917d44207446ab11 WHIRLPOOL b366cac264662bf80e0a074e554736db59f0f03b5a06ea47df8f26fa07a9b904b9cee406228b308c2bc0c5a48209d66eadbc2f972570faef2ca89eadec511b3b +AUX cntlm.service 207 SHA256 be37630bc684b2d613aaaab183ab1aa7f615d7ff9b4eeb2c261eb53ac876de4e SHA512 5084b6e65b4b91120a8fe369f7cec1566103db04f1c25f9d13241e8051a49bc776bc68601992e02156719623f0f62e6e77f3781a40776601b19faa53e1039324 WHIRLPOOL 00dc56426ecc0254fe4828dd53f2465ac131b04d5377387ee21bbfe6441eb1ddde18653ab10c79467de1437153811e660f66765496209eb4477fbd740d49dcf0 +DIST cntlm-0.93beta5.tar.gz 718018 SHA256 97d0d7162e1c782a74958af3b7f48f61ae72b49d2f608d21155f804583a6a754 SHA512 5cb59788a0d6dc5cd787acb36dbe6de9a3909727d63327c9a12b20973619b777add9e0acbe94ed6a3cf1c189ef0e0ac6c01aa3c1c4739881bbd371b4c90744cd WHIRLPOOL e2627cf54e3e91bcc08cbaa9e6e95cb7fb8464bf48e6f924575a86237188d976d86ef9b1cb960c2cd982316dd3ebb6d1bd7129aa4191cbd605f69df09af4b715 +EBUILD cntlm-0.93_beta5-r2.ebuild 1070 SHA256 72fa950f8a4fd2925b3ca11972c5403523d3bb21712481f5d4f182cc58331dce SHA512 d16bfd29e3744962ebbb2d9f8b0e6b067cc00ba895532ae0098993df48bdc00bc82d4c9644605c3ffd0254cb01bb86db86219f12ea8b37abddc3a0a8dc9489c1 WHIRLPOOL 6fdda494752caac12ea34c80c43a31e85fd83081d80a8ed0a00190e4c5a59673f5ff722b8937016411df92c314f32a98a21f6b3a47047ab3e5c53e85d9003f26 +MISC ChangeLog 3604 SHA256 96e40d17f9e7e1954a5bafc2d552548b53af0b6cfd47dab1ad0bd22d4bd47415 SHA512 a8c39c208a525f83bbacda9bf6a599fa7dc84d2b0bc06d9607665b99e88b74c95b90033a12429ea46deb8e17c4107dfdcb47ffaa113bf4da706935f63af38177 WHIRLPOOL c7151dc7b86b245ae3bb6020b52c76e7c68b62e7a0d115c8e0a72d508631c0a3e76a8545dc2ca16d70cfafe109a55cf0a23754087df8f8e58606009a9cd66557 +MISC ChangeLog-2015 1587 SHA256 c951ea3410c1d87c54ae3b641763894a35fc6ea7d1948d8cbd8b7739c0341e17 SHA512 b0b0481b63789e436757ff8428674ae4ac65ee290ea5f7c0c107650917308b382a6b087ea6a5bedb8885babebb447cea1b21f0d185a89603a178abc370e911b1 WHIRLPOOL 734715c9369e0b4aa417469e695e08df4bc942af2c1d8b070a13edeb58cb10467246d397435050e317d3dac3bce05aae3ca7ae6f4f535aea30e20569f880a299 +MISC metadata.xml 389 SHA256 23927b5a2139fba945a1d4582e9ebeb7071000d20ea33740d442c599a27d604a SHA512 5d765000881049ae413629dfc297a72bda28e2000e3e145782aadeb2da3c8dd2ee51378f0333dc1e3a0d23012c916e1313b4aacf65998a0a17b898658b1602eb WHIRLPOOL 948c7c8ea04ccd67a5cb2272497852fc71576fe1e842e6413c9a937a4270a1ffa1aace2b5b14a69acedd32f1f97f134dd9058fbc122d4aa8dfbf5904a9be6896 diff --git a/net-proxy/cntlm/cntlm-0.93_beta5-r2.ebuild b/net-proxy/cntlm/cntlm-0.93_beta5-r2.ebuild new file mode 100644 index 000000000000..2e86f2f75b59 --- /dev/null +++ b/net-proxy/cntlm/cntlm-0.93_beta5-r2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils systemd toolchain-funcs user + +DESCRIPTION="Cntlm is an NTLM/NTLMv2 authenticating HTTP proxy" +HOMEPAGE="http://cntlm.sourceforge.net/" +SRC_URI="http://ftp.awk.cz/pub/${P//_}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="" + +S="${WORKDIR}/${P//_}" + +src_prepare() { + eapply -p0 "${FILESDIR}"/${P}-buildsystem.patch # 334647 + + default +} + +src_configure() { + tc-export CC + + econf + + # Replace default config file path in Makefile + sed -i -e 's~SYSCONFDIR=/usr/local/etc~SYSCONFDIR=/etc~' \ + "${S}"/Makefile || die "sed failed" +} + +src_compile() { + emake V=1 +} + +src_install() { + dobin cntlm + dodoc COPYRIGHT README VERSION doc/cntlm.conf + doman doc/cntlm.1 + newinitd "${FILESDIR}"/cntlm.initd cntlm + newconfd "${FILESDIR}"/cntlm.confd cntlm + systemd_dounit "${FILESDIR}"/cntlm.service + insinto /etc + insopts -m0600 + doins doc/cntlm.conf +} + +pkg_postinst() { + enewgroup cntlm + enewuser cntlm -1 -1 -1 cntlm +} diff --git a/net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch b/net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch new file mode 100644 index 000000000000..d553e8661484 --- /dev/null +++ b/net-proxy/cntlm/files/cntlm-0.93_beta5-buildsystem.patch @@ -0,0 +1,195 @@ +Gentoo Bug#334647: +Respect CC, CFLAGS, LDFLAGS (with gcc). +Support verbose building via 'make V=1'. +--- configure.orig 2012-10-02 14:01:48.735669564 +0200 ++++ configure 2012-10-02 14:23:01.224271511 +0200 +@@ -10,7 +10,7 @@ + # This can be disabled if neccessary. + # + +-CCS="xlc_r gcc" ++CCS=${CC-"xlc_r gcc"} + + # + # Look for supported compilers +@@ -31,15 +31,21 @@ + else + echo "Using $CCPATH to compile Cntlm" + [ -h Makefile ] && rm -f Makefile 2>/dev/null +- case "$CC" in +- gcc) ++ if $CC -v >/dev/null 2>&1; then + # default Makefile is for GCC; just revert back to + # GCC if Makefile is linked to other compiler version + if [ ! -f Makefile ]; then + mv Makefile.gcc Makefile + fi +- ;; +- *) ++ : ${CFLAGS=-O3} ++ : ${LDFLAGS=} ++ CFLAGS="$CFLAGS -std=c99 -Wall -Wno-unused-but-set-variable -pedantic -pthread" ++ LDFLAGS="$LDFLAGS -pthread" ++ sed -e "s~^CFLAGS[ :]*=~CFLAGS=$CFLAGS ~" \ ++ -e "s~^LDFLAGS[ :]*=.*~LDFLAGS=$LDFLAGS~" \ ++ -e "s~^CC[ :]*=.*~CC=$CC~" \ ++ -i Makefile ++ else + # backup default GCC Makefile and create a link to other + if [ -f Makefile ]; then + mv Makefile Makefile.gcc +@@ -47,8 +53,7 @@ + + EXT=`echo "$CC" | sed 's/_.*//'` + ln -s Makefile.$EXT Makefile +- ;; +- esac ++ fi + fi + + STAMP=configure-stamp +@@ -62,7 +67,7 @@ + for i in $TESTS; do + printf "Checking $i... " + printf "#define config_$i " >> $CONFIG +- OUT=`$CC -D_POSIX_C_SOURCE=199506L -D_ISOC99_SOURCE -D_REENTRANT -o config/$i config/$i.c 2>&1` ++ OUT=`$CC $CFLAGS $LDFLAGS -D_POSIX_C_SOURCE=199506L -D_ISOC99_SOURCE -D_REENTRANT -o config/$i config/$i.c 2>&1` + rc=$? + + if [ $rc -ne 0 ]; then # -o -n "$OUT" ]; then +--- Makefile.orig 2012-10-02 15:31:03.986270993 +0200 ++++ Makefile 2012-10-02 15:40:10.277689068 +0200 +@@ -16,14 +16,13 @@ + CC := gcc + VER := $(shell cat VERSION) + OS := $(shell uname -s) +-OSLDFLAGS := $(shell [ $(OS) = "SunOS" ] && echo "-lrt -lsocket -lnsl") +-LDFLAGS := -lpthread $(OSLDFLAGS) ++LIBS := $(shell [ $(OS) = "SunOS" ] && echo "-lrt -lsocket -lnsl") ++LDFLAGS := -pthread + CYGWIN_REQS := cygwin1.dll cyggcc_s-1.dll cygstdc++-6.dll cygrunsrv.exe + ++CFLAGS=-D__BSD_VISIBLE -D_ALL_SOURCE -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -D_BSD_SOURCE -DVERSION=\"'$(VER)'\" + ifeq ($(DEBUG),1) +- CFLAGS += -g -std=c99 -Wall -pedantic -D__BSD_VISIBLE -D_ALL_SOURCE -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -D_BSD_SOURCE -DVERSION=\"'$(VER)'\" +-else +- CFLAGS += -O3 -std=c99 -D__BSD_VISIBLE -D_ALL_SOURCE -D_XOPEN_SOURCE=600 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -D_BSD_SOURCE -DVERSION=\"'$(VER)'\" ++ CFLAGS += -g -O0 + endif + + ifneq ($(findstring CYGWIN,$(OS)),) +@@ -32,28 +31,35 @@ + OBJS=utils.o ntlm.o xcrypt.o config.o socket.o acl.o auth.o http.o forward.o direct.o scanner.o pages.o main.o + endif + ++VE_=@echo ++VE_1=@: ++VE=$(VE_$(V)) ++VV_=@ ++VV_1= ++VV=$(VV_$(V)) ++ + $(NAME): configure-stamp $(OBJS) +- @echo "Linking $@" +- @$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) ++ $(VE) "Linking $@" ++ $(VV) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS) $(LIBS) + + main.o: main.c +- @echo "Compiling $<" +- @if [ -z "$(SYSCONFDIR)" ]; then \ ++ $(VE) "Compiling $<" ++ $(VV) if [ -z "$(SYSCONFDIR)" ]; then \ + $(CC) $(CFLAGS) -c main.c -o $@; \ + else \ + $(CC) $(CFLAGS) -DSYSCONFDIR=\"$(SYSCONFDIR)\" -c main.c -o $@; \ + fi + + %.o: %.c +- @echo "Compiling $<" +- @$(CC) $(CFLAGS) -c -o $@ $< ++ $(VE) "Compiling $<" ++ $(VV) $(CC) $(CFLAGS) -c -o $@ $< + + configure-stamp: + ./configure + + win/resources.o: win/resources.rc +- @echo Adding EXE resources +- @windres $^ -o $@ ++ $(VE) Adding EXE resources ++ $(VV) windres $^ -o $@ + + install: $(NAME) + # Special handling for install(1) +@@ -115,31 +121,31 @@ + + $(NAME)-$(VER)-win32.exe: + @echo - preparing binaries for GUI installer +- @cp $(patsubst %, /bin/%, $(CYGWIN_REQS)) win/ ++ $(VV) cp $(patsubst %, /bin/%, $(CYGWIN_REQS)) win/ + ifeq ($(DEBUG),1) +- @cp -p cntlm.exe win/ ++ $(VV) cp -p cntlm.exe win/ + else +- @strip -o win/cntlm.exe cntlm.exe ++ $(VV) strip -o win/cntlm.exe cntlm.exe + endif + @echo - generating GUI installer +- @win/Inno5/ISCC.exe /Q win/setup.iss #/Q win/setup.iss ++ $(VV) win/Inno5/ISCC.exe /Q win/setup.iss #/Q win/setup.iss + + $(NAME)-$(VER)-win32.zip: + @echo - creating ZIP release for manual installs +- @ln -s win $(NAME)-$(VER) ++ $(VV) ln -s win $(NAME)-$(VER) + zip -9 $(NAME)-$(VER)-win32.zip $(patsubst %, $(NAME)-$(VER)/%, $(CYGWIN_REQS) cntlm.ini LICENSE.txt cntlm_manual.pdf) +- @rm -f $(NAME)-$(VER) ++ $(VV) rm -f $(NAME)-$(VER) + + win/cntlm.ini: doc/cntlm.conf +- @cat doc/cntlm.conf | unix2dos > win/cntlm.ini ++ $(VV) cat doc/cntlm.conf | unix2dos > win/cntlm.ini + + win/LICENSE.txt: COPYRIGHT LICENSE +- @cat COPYRIGHT LICENSE | unix2dos > win/LICENSE.txt ++ $(VV) cat COPYRIGHT LICENSE | unix2dos > win/LICENSE.txt + + win/cntlm_manual.pdf: doc/cntlm.1 + @echo - generating PDF manual +- @rm -f win/cntlm_manual.pdf +- @groff -t -e -mandoc -Tps doc/cntlm.1 | ps2pdf - win/cntlm_manual.pdf ++ $(VV) rm -f win/cntlm_manual.pdf ++ $(VV) groff -t -e -mandoc -Tps doc/cntlm.1 | ps2pdf - win/cntlm_manual.pdf + + win/setup.iss: win/setup.iss.in + ifeq ($(findstring CYGWIN,$(OS)),) +@@ -148,16 +154,16 @@ + @echo + @exit 1 + endif +- @sed "s/\$$VERSION/$(VER)/g" $^ > $@ ++ $(VV) sed "s/\$$VERSION/$(VER)/g" $^ > $@ + + uninstall: + rm -f $(BINDIR)/$(NAME) $(MANDIR)/man1/$(NAME).1 2>/dev/null || true + + clean: +- @rm -f config/endian config/gethostname config/strdup config/socklen_t config/*.exe +- @rm -f *.o cntlm cntlm.exe configure-stamp build-stamp config/config.h ++ $(VV) rm -f config/endian config/gethostname config/strdup config/socklen_t config/*.exe ++ $(VV) rm -f *.o cntlm cntlm.exe configure-stamp build-stamp config/config.h + rm -f $(patsubst %, win/%, $(CYGWIN_REQS) cntlm.exe cntlm.ini LICENSE.txt setup.iss cntlm_manual.pdf) +- @if [ -h Makefile ]; then rm -f Makefile; mv Makefile.gcc Makefile; fi ++ $(VV) if [ -h Makefile ]; then rm -f Makefile; mv Makefile.gcc Makefile; fi + + distclean: clean + ifeq ($(findstring CYGWIN,$(OS)),) +@@ -169,6 +175,6 @@ + fakeroot rpm/rules clean; \ + fi + endif +- @rm -f *.exe *.deb *.rpm *.tgz *.tar.gz *.tar.bz2 *.zip *.exe tags ctags pid 2>/dev/null ++ $(VV) rm -f *.exe *.deb *.rpm *.tgz *.tar.gz *.tar.bz2 *.zip *.exe tags ctags pid 2>/dev/null + + .PHONY: all install tgz tbz2 deb rpm win uninstall clean distclean diff --git a/net-proxy/cntlm/files/cntlm.confd b/net-proxy/cntlm/files/cntlm.confd new file mode 100644 index 000000000000..bc3dce0fb18c --- /dev/null +++ b/net-proxy/cntlm/files/cntlm.confd @@ -0,0 +1,5 @@ +# cntlm init script configuration file + +# here you can specify additional options to cntlm +# NOTE that using config file is recommended +CNTLM_OPTS="" diff --git a/net-proxy/cntlm/files/cntlm.initd b/net-proxy/cntlm/files/cntlm.initd new file mode 100644 index 000000000000..106a4a163a6f --- /dev/null +++ b/net-proxy/cntlm/files/cntlm.initd @@ -0,0 +1,21 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +PIDFILE=${PIDFILE:-/var/run/cntlm.pid} + +depend() { + need net +} + +start() { + ebegin "Starting cntlm" + start-stop-daemon --start --background --make-pidfile --pidfile ${PIDFILE} --exec /usr/bin/cntlm -- -f -U cntlm ${CNTLM_OPTS} + eend $? +} + +stop() { + ebegin "Stopping cntlm" + start-stop-daemon --stop --pidfile ${PIDFILE} + eend $? +} diff --git a/net-proxy/cntlm/files/cntlm.service b/net-proxy/cntlm/files/cntlm.service new file mode 100644 index 000000000000..01f2bcdfd803 --- /dev/null +++ b/net-proxy/cntlm/files/cntlm.service @@ -0,0 +1,9 @@ +[Unit] +Description=CNTLM HTTP Accelerator For NTLM Secured Proxies Authenticator +After=network.target + +[Service] +ExecStart=/usr/bin/cntlm -f -U cntlm -c /etc/cntlm.conf + +[Install] +WantedBy=multi-user.target diff --git a/net-proxy/cntlm/metadata.xml b/net-proxy/cntlm/metadata.xml new file mode 100644 index 000000000000..86bbb0e6615e --- /dev/null +++ b/net-proxy/cntlm/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <!-- maintainer-needed --> + <longdescription lang="en"> + NTLM authorizing proxy. Upstream seems dead, but this is still a good + alternative to ntlmaps. + </longdescription> + <upstream> + <remote-id type="sourceforge">cntlm</remote-id> + </upstream> +</pkgmetadata> |