From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- .../hylafaxplus/files/hylafax-cryptglibc.patch | 98 ++++++++++++ net-misc/hylafaxplus/files/hylafaxplus-conf | 29 ++++ net-misc/hylafaxplus/files/hylafaxplus-init | 176 +++++++++++++++++++++ net-misc/hylafaxplus/files/ldconfig-patch | 10 ++ 4 files changed, 313 insertions(+) create mode 100644 net-misc/hylafaxplus/files/hylafax-cryptglibc.patch create mode 100644 net-misc/hylafaxplus/files/hylafaxplus-conf create mode 100644 net-misc/hylafaxplus/files/hylafaxplus-init create mode 100644 net-misc/hylafaxplus/files/ldconfig-patch (limited to 'net-misc/hylafaxplus/files') diff --git a/net-misc/hylafaxplus/files/hylafax-cryptglibc.patch b/net-misc/hylafaxplus/files/hylafax-cryptglibc.patch new file mode 100644 index 000000000000..dbfc8bac5393 --- /dev/null +++ b/net-misc/hylafaxplus/files/hylafax-cryptglibc.patch @@ -0,0 +1,98 @@ +diff -urN hylafax-5.5.4/hfaxd/Login.c++ hylafax-5.5.4-libc217/hfaxd/Login.c++ +--- hylafax-5.5.4/hfaxd/Login.c++ 2013-08-07 01:23:35.000000000 +0200 ++++ hylafax-5.5.4-libc217/hfaxd/Login.c++ 2013-11-13 12:56:02.000000000 +0100 +@@ -30,9 +30,6 @@ + #include + #include + #include +-#if HAS_CRYPT_H +-#include +-#endif + + void + HylaFAXServer::loginRefused(const char* why) +@@ -434,7 +431,7 @@ + /* + * Check hosts.hfaxd first, then PAM, and last, LDAP + */ +- if (pass[0] == '\0' || !(strcmp(crypt(pass, passWd), passWd) == 0 || ++ if (pass[0] == '\0' || !(strcmp(Sys::crypt(pass, passWd), passWd) == 0 || + pamCheck(the_user, pass) || + ldapCheck(the_user,pass))) + { +@@ -513,7 +510,7 @@ + { + fxAssert(IS(LOGGEDIN), "ADMIN command permitted when not logged in"); + // NB: null adminWd is permitted +- if ((strcmp(crypt(pass, adminWd), adminWd) != 0) && !pamIsAdmin()) { ++ if ((strcmp(Sys::crypt(pass, adminWd), adminWd) != 0) && !pamIsAdmin()) { + if (++adminAttempts >= maxAdminAttempts) { + reply(530, "Password incorrect (closing connection)."); + logNotice("Repeated admin failures from %s [%s]" +diff -urN hylafax-5.5.4/hfaxd/SNPPServer.c++ hylafax-5.5.4-libc217/hfaxd/SNPPServer.c++ +--- hylafax-5.5.4/hfaxd/SNPPServer.c++ 2013-08-07 01:23:35.000000000 +0200 ++++ hylafax-5.5.4-libc217/hfaxd/SNPPServer.c++ 2013-11-13 12:55:42.000000000 +0100 +@@ -36,9 +36,6 @@ + #include "RE.h" + + #include +-#if HAS_CRYPT_H +-#include +-#endif + + extern "C" { + #include +@@ -1003,7 +1000,7 @@ + + if (checkUser(loginID)) { + if (passWd != "") { +- if (pass[0] == '\0' || !(streq(crypt(pass, passWd), passWd) || pamCheck(the_user, pass))) { ++ if (pass[0] == '\0' || !(streq(Sys::crypt(pass, passWd), passWd) || pamCheck(the_user, pass))) { + if (++loginAttempts >= maxLoginAttempts) { + reply(421, "Login incorrect (closing connection)."); + logNotice("Repeated SNPP login failures for user %s from %s [%s]" +diff -urN hylafax-5.5.4/hfaxd/User.c++ hylafax-5.5.4-libc217/hfaxd/User.c++ +--- hylafax-5.5.4/hfaxd/User.c++ 2013-08-07 01:23:35.000000000 +0200 ++++ hylafax-5.5.4-libc217/hfaxd/User.c++ 2013-11-13 12:55:19.000000000 +0100 +@@ -30,9 +30,6 @@ + + #include + #include +-#if HAS_CRYPT_H +-#include +-#endif + #include + + #ifndef CHAR_BIT +@@ -374,7 +371,7 @@ + #else + to64(&salt[0], random(), 2); + #endif +- result = crypt(pass, salt); ++ result = Sys::crypt(pass, salt); + return (true); + } + +diff -urN hylafax-5.5.4/util/Sys.h hylafax-5.5.4-libc217/util/Sys.h +--- hylafax-5.5.4/util/Sys.h 2013-08-07 01:23:35.000000000 +0200 ++++ hylafax-5.5.4-libc217/util/Sys.h 2013-11-13 12:56:26.000000000 +0100 +@@ -44,6 +44,10 @@ + #include + #endif + ++#if HAS_CRYPT_H ++#include ++#endif ++ + /* + * Wrapper functions for C library calls. + * +@@ -140,5 +144,8 @@ + { return ::fopen(filename, mode); } + + static int getOpenMax(); ++ ++ static const char* crypt(const char* key, const char* salt) ++ { const char* enc = ::crypt(key, salt); return enc ? enc : ""; } + }; + #endif /* _Sys_ */ diff --git a/net-misc/hylafaxplus/files/hylafaxplus-conf b/net-misc/hylafaxplus/files/hylafaxplus-conf new file mode 100644 index 000000000000..911a59db4078 --- /dev/null +++ b/net-misc/hylafaxplus/files/hylafaxplus-conf @@ -0,0 +1,29 @@ +# Spool directory for HylaFAX +spooldir="/var/spool/fax" + +# Faxq program path +faxq="/usr/sbin/faxq" + +# hfaxd program path +hfaxd="/usr/sbin/hfaxd" + +# faxgetty program path +faxgetty="/usr/sbin/faxgetty" + +# Port of the hfaxd daemon for new protocol +faxport=hylafax + +# Address used by hfaxd as binding address. +faxbind="127.0.0.1" + +# Port of the hfaxd daemon for SNPP protocol +snppport=444 + +# Port of the hfaxd daemon for old protocol +oldprotoport=4557 + +# newproto | oldproto | snpp | any +mode="newproto" + +# Directory where the pidfiles of HylaFAX are saved. +piddir="/var/run" diff --git a/net-misc/hylafaxplus/files/hylafaxplus-init b/net-misc/hylafaxplus/files/hylafaxplus-init new file mode 100644 index 000000000000..47c16fdff2f2 --- /dev/null +++ b/net-misc/hylafaxplus/files/hylafaxplus-init @@ -0,0 +1,176 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Author Geaaru +# Distributed under the terms of the GNU General Public License v2 + +opts="zap" + +depend() { + use lo +} + +checkconfig() { + ebegin "Check hylafax server configuration..." + + if [ x$spooldir == x ] ; then + eerror "No spooldir directory defined" + return 1 + else + SPOOL=$spooldir + einfo "Use spool directory $SPOOL" + fi + + if [ x$mode == x ] ; then + eerror "No mode defined" + return 1 + fi + + if [ ! -f $SPOOL/etc/setup.cache ] ; then + eerror "No $SPOOL/etc/setup.cache file founded. Use faxsetup command" + return 1 + fi + + if [[ x$hfaxd == x || ! -f $hfaxd ]] ; then + eerror "No hfaxd daemon founded" + return 1 + fi + + if [[ x$faxq == x || ! -f $faxq ]] ; then + eerror "No faxq program founded" + return 1 + fi + + if [[ x$faxgetty == x || ! -f $faxgetty ]] ; then + eerror "No faxgetty program founded" + return 1 + fi + + if [ x$faxbind == x ] ; then + eerror "No binding address supply" + return 1 + fi + + if [ x$piddir == x ] ; then + PIDDIR=$SPOOL + else + PIDDIR=$piddir + fi + + + hfaxd_args="-l $faxbind -q $SPOOL" + + case $mode in + newproto) + if [[ x$faxport == x ]] ; then + eerror "No faxport defined" + return 1 + fi + hfaxd_args="$hfaxd_args -i $faxport" + ;; + oldproto) + if [[ x$oldprotoport == x ]] ; then + eerror "No oldprotoport defined" + return 1 + fi + hfaxd_args="$hfaxd_args -o $oldprotoport" + ;; + snpp) + if [[ x$snppport == x ]] ; then + eerror "No snppport defined" + return 1 + fi + hfaxd_args="$hfaxd_args -s $snppport" + ;; + any) + if [[ x$faxport == x || x$snppport == x || x$oldprotoport == x ]] ; then + eerror "No port data founded for old services" + return 1 + fi + hfaxd_args="$hfaxd_args -i $faxport -s $snppport -o $oldprotoport" + ;; + *) + eerror "Invalid mode" + return 1 + ;; + + esac + + faxq_args="-q $SPOOL" + + # workaround for manage save of pidfile with start-stop-daemon + hfaxd_args="$hfaxd_args -d" + faxq_args="$faxq_args -D" + + return 0 +} + +start() { + local result + + checkconfig || return 1 + + ebegin "Starting HylaFAX server daemons" + + start_faxq + result=$? + + if [ $result -ne 0 ] ; then + eerror "Error on start $faxq daemon" + return 1 + fi + + start_hfaxd + result=$? + + eend $result +} + +start_hfaxd() { + local arguments="--start \ + --make-pidfile --pidfile $PIDDIR/hfaxd.pid" + + einfo "Starting $hfaxd with args $hfaxd_args" + + start-stop-daemon -b ${arguments} --exec $hfaxd -- $hfaxd_args > /dev/null 2>&1 + + return $?; +} + +start_faxq() { + local arguments="--start \ + --make-pidfile --pidfile $PIDDIR/faxq.pid" + einfo "Starting $faxq ... " + + start-stop-daemon -b ${arguments} --exec $faxq -- $faxq_args > /dev/null 2>&1 + + return $? +} + +stop() { + checkconfig || return 1 + + ebegin "Stopping HylaFAX server daemons" + + start-stop-daemon --stop --quiet --pidfile $PIDDIR/hfaxd.pid + start-stop-daemon --stop --quiet --pidfile $PIDDIR/faxq.pid + eend $? +} + +zap() { + checkconfig || return 1 + + ebegin "Zap HylaFAX server daemon files" + + if [ -f $PIDFILE/hfaxd.pid ] ; then + rm -f $PIDFILE/hfaxd.pid + fi + + if [ -f $PIDFILE/faxq.pid ] ; then + rm -f $PIDFILE/faxq.pid + fi +} + +restart() { + stop + start +} diff --git a/net-misc/hylafaxplus/files/ldconfig-patch b/net-misc/hylafaxplus/files/ldconfig-patch new file mode 100644 index 000000000000..8b0f4352d51f --- /dev/null +++ b/net-misc/hylafaxplus/files/ldconfig-patch @@ -0,0 +1,10 @@ +--- faxd/Makefile.LINUXdso.original 2011-12-30 18:17:59.000000000 +0100 ++++ faxd/Makefile.LINUXdso 2011-12-30 18:18:51.000000000 +0100 +@@ -37,7 +37,6 @@ + + installDSO: libfaxserver.${DSO} + ${PUTSERV} -root ${INSTALLROOT} -F ${LIBDIR} -m 755 -O libfaxserver.${DSO} +- [ `id -u` -eq 0 ] && ( PATH=${PATH}:/sbin ldconfig ${LIBDIR} ) || ( echo "ldconfig is required to be run as user root at install time" ) + + uninstallDSO:: + ${RM} -f ${LIBDIR}/libfaxserver.${DSO} -- cgit v1.2.3-65-gdbad