mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-30 18:12:08 +02:00
Merge pull request #71 from gregkh/remove_deps
Remove a bunch of packages that have newer versions in portage-stable
This commit is contained in:
commit
742af4433c
@ -1,2 +0,0 @@
|
|||||||
DIST vim-7.3.tar.bz2 9080692 RMD160 1846e7f4aa8e0a329d8360a9e05d7e93da23b4b5 SHA1 46faa96c5fab639899b1c655c23d8755b62f036f SHA256 5c5d5d6e07f1bbc49b6fe3906ff8a7e39b049928b68195b38e3e3d347100221d
|
|
||||||
DIST vim-patches-7.3.266.patch.bz2 482229 RMD160 20399fd3a4366f486ce9edf2d09733647b26d487 SHA1 22f2f52cc703ea3ee06dcf9d9c49e39208fbf72a SHA256 28ebe4e469fad7a9f3a55611323e9235b83ec40c6abca85da485f9df02aa0177
|
|
@ -1,11 +0,0 @@
|
|||||||
--- src/configure.in
|
|
||||||
+++ src/configure.in
|
|
||||||
@@ -2701,7 +2701,7 @@
|
|
||||||
AC_MSG_CHECKING(whether X_LOCALE needed)
|
|
||||||
AC_TRY_COMPILE([#include <X11/Xlocale.h>],,
|
|
||||||
AC_TRY_LINK_FUNC([_Xsetlocale], [AC_MSG_RESULT(yes)
|
|
||||||
- AC_DEFINE(X_LOCALE)], AC_MSG_RESULT(no)),
|
|
||||||
+ AC_DEFINE(X_LOCALE) ldflags_save="$ldflags_save -lX11"], AC_MSG_RESULT(no)),
|
|
||||||
AC_MSG_RESULT(no))
|
|
||||||
fi
|
|
||||||
CFLAGS=$cflags_save
|
|
@ -1,11 +0,0 @@
|
|||||||
--- vim73/src/configure.in.orig 2010-08-13 08:15:17.000000000 -0600
|
|
||||||
+++ vim73/src/configure.in 2010-08-16 17:04:34.000000000 -0600
|
|
||||||
@@ -3180,7 +3180,7 @@ main() {
|
|
||||||
}],
|
|
||||||
AC_MSG_RESULT(ok),
|
|
||||||
AC_MSG_ERROR([WRONG! uint32_t not defined correctly.]),
|
|
||||||
-AC_MSG_ERROR([could not compile program using uint32_t.]))
|
|
||||||
+AC_MSG_WARN([could not check when cross-compiling]))
|
|
||||||
|
|
||||||
dnl Check for memmove() before bcopy(), makes memmove() be used when both are
|
|
||||||
dnl present, fixes problem with incompatibility between Solaris 2.4 and 2.5.v
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -ru vim73.orig/src/link.sh vim73/src/link.sh
|
|
||||||
--- vim73.orig/src/link.sh 2010-10-21 16:29:07 +0200
|
|
||||||
+++ vim73/src/link.sh 2010-10-21 16:23:15 +0200
|
|
||||||
@@ -41,7 +41,7 @@
|
|
||||||
if sh link.cmd; then
|
|
||||||
touch auto/link.sed
|
|
||||||
cp link.cmd linkit.sh
|
|
||||||
- for libname in SM ICE nsl dnet dnet_stub inet socket dir elf iconv Xt Xmu Xp Xpm X11 Xdmcp x w perl dl pthread thread readline m crypt attr; do
|
|
||||||
+ for libname in dummy; do
|
|
||||||
cont=yes
|
|
||||||
while test -n "$cont"; do
|
|
||||||
if grep "l$libname " linkit.sh >/dev/null; then
|
|
@ -1,36 +0,0 @@
|
|||||||
# Author: Ciaran McCreesh <ciaranm@gentoo.org>
|
|
||||||
#
|
|
||||||
# completion for vim
|
|
||||||
|
|
||||||
_vim()
|
|
||||||
{
|
|
||||||
local cur prev cmd args
|
|
||||||
|
|
||||||
COMPREPLY=()
|
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
cmd=${COMP_WORDS[0]}
|
|
||||||
|
|
||||||
if [[ "${prev}" == "--servername" ]] ; then
|
|
||||||
local servers
|
|
||||||
servers=$(gvim --serverlist )
|
|
||||||
COMPREPLY=( $( compgen -W "${servers}" -- $cur ) )
|
|
||||||
|
|
||||||
elif [[ "${prev}" == -[uUi] ]] ; then
|
|
||||||
COMPREPLY=( $( compgen -W "NONE" ) \
|
|
||||||
$( compgen -f -X "!*vim*" -- "$cur" ) )
|
|
||||||
|
|
||||||
elif [[ "${cur}" == -* ]] ; then
|
|
||||||
args='-t -q -c -S --cmd -A -b -C -d -D -e -E -f --nofork \
|
|
||||||
-F -g -h -H -i -L -l -m -M -N -n -nb -o -R -r -s \
|
|
||||||
-T -u -U -V -v -w -W -x -X -y -Y -Z --echo-wid \
|
|
||||||
--help --literal --noplugin --version'
|
|
||||||
COMPREPLY=( $( compgen -W "${args}" -- $cur ) )
|
|
||||||
else
|
|
||||||
_filedir
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
complete -o filenames -F _vim vim ex view evim rvim rview
|
|
||||||
|
|
||||||
# vim: set ft=sh sw=4 et sts=4 :
|
|
@ -1,93 +0,0 @@
|
|||||||
" Default configuration file for Vim
|
|
||||||
" Written by Aron Griffis <agriffis@gentoo.org>
|
|
||||||
" Modified by Ryan Phillips <rphillips@gentoo.org>
|
|
||||||
" Added Redhat's vimrc info by Seemant Kulleen <seemant@gentoo.org>
|
|
||||||
|
|
||||||
" The following are some sensible defaults for Vim for most users.
|
|
||||||
" We attempt to change as little as possible from Vim's defaults,
|
|
||||||
" deviating only where it makes sense
|
|
||||||
set nocompatible " Use Vim defaults (much better!)
|
|
||||||
set bs=2 " Allow backspacing over everything in insert mode
|
|
||||||
set ai " Always set auto-indenting on
|
|
||||||
"set backup " Keep a backup file
|
|
||||||
set viminfo='20,\"50 " read/write a .viminfo file -- limit to only 50
|
|
||||||
set history=50 " keep 50 lines of command history
|
|
||||||
set ruler " Show the cursor position all the time
|
|
||||||
|
|
||||||
|
|
||||||
" Added to default to high security within Gentoo. Fixes bug #14088
|
|
||||||
set modelines=0
|
|
||||||
|
|
||||||
if v:lang =~ "^ko"
|
|
||||||
set fileencodings=euc-kr
|
|
||||||
set guifontset=-*-*-medium-r-normal--16-*-*-*-*-*-*-*
|
|
||||||
elseif v:lang =~ "^ja_JP"
|
|
||||||
set fileencodings=euc-jp
|
|
||||||
set guifontset=-misc-fixed-medium-r-normal--14-*-*-*-*-*-*-*
|
|
||||||
elseif v:lang =~ "^zh_TW"
|
|
||||||
set fileencodings=big5
|
|
||||||
set guifontset=-sony-fixed-medium-r-normal--16-150-75-75-c-80-iso8859-1,-taipei-fixed-medium-r-normal--16-150-75-75-c-160-big5-0
|
|
||||||
elseif v:lang =~ "^zh_CN"
|
|
||||||
set fileencodings=gb2312
|
|
||||||
set guifontset=*-r-*
|
|
||||||
endif
|
|
||||||
if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
|
|
||||||
set fileencodings=utf-8,latin1
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Only do this part when compiled with support for autocommands
|
|
||||||
if has("autocmd")
|
|
||||||
" In text files, always limit the width of text to 78 characters
|
|
||||||
autocmd BufRead *.txt set tw=78
|
|
||||||
" When editing a file, always jump to the last cursor position
|
|
||||||
autocmd BufReadPost *
|
|
||||||
\ if line("'\"") > 0 && line ("'\"") <= line("$") |
|
|
||||||
\ exe "normal g'\"" |
|
|
||||||
\ endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Don't use Ex mode, use Q for formatting
|
|
||||||
map Q gq
|
|
||||||
|
|
||||||
" Switch syntax highlighting on, when the terminal has colors
|
|
||||||
" Also switch on highlighting the last used search pattern.
|
|
||||||
if &t_Co > 2 || has("gui_running")
|
|
||||||
syntax on
|
|
||||||
set hlsearch
|
|
||||||
endif
|
|
||||||
|
|
||||||
if &term=="xterm"
|
|
||||||
set t_RV= " don't check terminal version
|
|
||||||
set t_Co=8
|
|
||||||
set t_Sb=^[4%dm
|
|
||||||
set t_Sf=^[3%dm
|
|
||||||
endif
|
|
||||||
|
|
||||||
if has("autocmd")
|
|
||||||
|
|
||||||
" Gentoo-specific settings for ebuilds. These are the federally-mandated
|
|
||||||
" required tab settings. See the following for more information:
|
|
||||||
" http://www.gentoo.org/doc/en/xml/gentoo-howto.xml
|
|
||||||
augroup gentoo
|
|
||||||
au!
|
|
||||||
au BufRead,BufNewFile *.ebuild set tabstop=4 shiftwidth=4 noexpandtab
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
endif " has("autocmd")
|
|
||||||
|
|
||||||
" some extra commands for HTML editing
|
|
||||||
nmap ,mh wbgueyei<<ESC>ea></<ESC>pa><ESC>bba
|
|
||||||
nmap ,h1 _i<h1><ESC>A</h1><ESC>
|
|
||||||
nmap ,h2 _i<h2><ESC>A</h2><ESC>
|
|
||||||
nmap ,h3 _i<h3><ESC>A</h3><ESC>
|
|
||||||
nmap ,h4 _i<h4><ESC>A</h4><ESC>
|
|
||||||
nmap ,h5 _i<h5><ESC>A</h5><ESC>
|
|
||||||
nmap ,h6 _i<h6><ESC>A</h6><ESC>
|
|
||||||
nmap ,hb wbi<b><ESC>ea</b><ESC>bb
|
|
||||||
nmap ,he wbi<em><ESC>ea</em><ESC>bb
|
|
||||||
nmap ,hi wbi<i><ESC>ea</i><ESC>bb
|
|
||||||
nmap ,hu wbi<u><ESC>ea</i><ESC>bb
|
|
||||||
nmap ,hs wbi<strong><ESC>ea</strong><ESC>bb
|
|
||||||
nmap ,ht wbi<tt><ESC>ea</tt><ESC>bb
|
|
||||||
nmap ,hx wbF<df>f<df>
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/app-editors/vim/vim-7.3.266.ebuild,v 1.5 2011/10/08 19:05:19 armin76 Exp $
|
|
||||||
|
|
||||||
EAPI=3
|
|
||||||
VIM_VERSION="7.3"
|
|
||||||
inherit vim
|
|
||||||
|
|
||||||
VIM_ORG_PATCHES="vim-patches-${PV}.patch.bz2"
|
|
||||||
|
|
||||||
SRC_URI="ftp://ftp.vim.org/pub/vim/unix/vim-${VIM_VERSION}.tar.bz2
|
|
||||||
http://dev.gentoo.org/~lack/vim/${VIM_ORG_PATCHES}"
|
|
||||||
|
|
||||||
S="${WORKDIR}/vim${VIM_VERSION/.}"
|
|
||||||
DESCRIPTION="Vim, an improved vi-style text editor"
|
|
||||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ~ppc ~ppc64 s390 sh sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
vim_src_prepare
|
|
||||||
|
|
||||||
if [[ ${CHOST} == *-interix* ]]; then
|
|
||||||
epatch "${FILESDIR}"/${PN}-7.3-interix-link.patch
|
|
||||||
fi
|
|
||||||
epatch "${FILESDIR}"/${PN}-7.1.285-darwin-x11link.patch
|
|
||||||
epatch "${FILESDIR}"/${PN}-7.3-cross.patch
|
|
||||||
|
|
||||||
cd src
|
|
||||||
eautoreconf
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
DIST libffi-3.0.9.tar.gz 731719 RMD160 11ff9aeb62f4fbe1fecf09e6f9814a72bfedb37a SHA1 56e41f87780e09d06d279690e53d4ea2c371ea88 SHA256 589d25152318bc780cd8919b14670793f4971d9838dab46ed38c32b3ee92c452
|
|
@ -1,36 +0,0 @@
|
|||||||
# Copyright 1999-2010 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libffi/libffi-3.0.9.ebuild,v 1.4 2010/01/13 14:21:00 ranger Exp $
|
|
||||||
|
|
||||||
inherit binutils-funcs libtool toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="a portable, high level programming interface to various calling conventions."
|
|
||||||
HOMEPAGE="http://sourceware.org/libffi/"
|
|
||||||
SRC_URI="ftp://sourceware.org/pub/${PN}/${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="alpha amd64 arm hppa mips ppc ppc64 x86 ~sparc-fbsd ~x86-fbsd"
|
|
||||||
IUSE="debug static-libs test"
|
|
||||||
|
|
||||||
RDEPEND=""
|
|
||||||
DEPEND="test? ( dev-util/dejagnu )"
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
unpack ${A}
|
|
||||||
cd "${S}"
|
|
||||||
elibtoolize
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
econf \
|
|
||||||
--disable-dependency-tracking \
|
|
||||||
$(use_enable static-libs static) \
|
|
||||||
$(use_enable debug)
|
|
||||||
emake || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake DESTDIR="${D}" install || die
|
|
||||||
dodoc
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
DIST libusb-0.1.12.tar.gz 389343 SHA256 37f6f7d9de74196eb5fc0bbe0aea9b5c939de7f500acba3af6fd643f3b538b44 SHA512 08c10e899f93b5f8567d1a1e1ed87dd5631ad0a1463975404709c1d165e545e340afb474a66788efcfdd8193542e2a2eb9cf133f55cbbf76441244191d0bb825 WHIRLPOOL 1991590fd971229d4cb809ff3cd1844243edffd0500a710019836683f291b7187756409c137c8a5bbdc908f90ff5a06c4a1923a77ee04c56988fcb5d68433245
|
|
@ -1,97 +0,0 @@
|
|||||||
Index: libusb-0.1.12/configure.in
|
|
||||||
===================================================================
|
|
||||||
--- libusb-0.1.12.orig/configure.in
|
|
||||||
+++ libusb-0.1.12/configure.in
|
|
||||||
@@ -90,6 +90,8 @@ LINUX_API=0
|
|
||||||
DARWIN_API=0
|
|
||||||
BSD_API=0
|
|
||||||
|
|
||||||
+DEFINE_USB_HID_DESCRIPTOR=1
|
|
||||||
+
|
|
||||||
AC_MSG_CHECKING(for what USB OS support)
|
|
||||||
case $host in
|
|
||||||
*-linux*)
|
|
||||||
@@ -101,13 +103,40 @@ case $host in
|
|
||||||
AC_MSG_RESULT(Linux)
|
|
||||||
OSLIBS=""
|
|
||||||
;;
|
|
||||||
- *-freebsd*|*-kfreebsd*-gnu|*-openbsd*|*-netbsd*)
|
|
||||||
+ *-freebsd*)
|
|
||||||
+ AC_DEFINE(BSD_API, 1)
|
|
||||||
+ AC_DEFINE(LINUX_API, 0)
|
|
||||||
+ AC_DEFINE(DARWIN_API, 0)
|
|
||||||
+ BSD_API=1
|
|
||||||
+ os_support=bsd
|
|
||||||
+ AC_MSG_RESULT(FreeBSD)
|
|
||||||
+ OSLIBS=""
|
|
||||||
+ AC_CHECK_HEADERS([dev/usb/usbhid.h])
|
|
||||||
+ if test "x$ac_cv_header_dev_usb_hisbhid_h" = "xyes"; then
|
|
||||||
+ AC_MSG_CHECKING([for usb_hid_descriptor])
|
|
||||||
+ have_usb_hid_descriptor=no
|
|
||||||
+ AC_TRY_COMPILE([
|
|
||||||
+ #include <sys/types.h>
|
|
||||||
+ #include <dev/usb/usb.h>
|
|
||||||
+ #include <dev/usb/usbhid.h>
|
|
||||||
+ ], [
|
|
||||||
+ struct usb_hid_descriptor descr;
|
|
||||||
+ ], [
|
|
||||||
+ have_usb_hid_descriptor=yes
|
|
||||||
+ ])
|
|
||||||
+ AC_MSG_RESULT([$have_usb_hid_descriptor])
|
|
||||||
+ if test "x$have_usb_hid_descriptor" = "xyes"; then
|
|
||||||
+ DEFINE_USB_HID_DESCRIPTOR=0
|
|
||||||
+ fi
|
|
||||||
+ fi
|
|
||||||
+ ;;
|
|
||||||
+ *-dragonfly*|*-kfreebsd*-gnu|*-openbsd*|*-netbsd*)
|
|
||||||
AC_DEFINE(BSD_API, 1)
|
|
||||||
AC_DEFINE(LINUX_API, 0)
|
|
||||||
AC_DEFINE(DARWIN_API, 0)
|
|
||||||
BSD_API=1
|
|
||||||
os_support=bsd
|
|
||||||
- AC_MSG_RESULT(FreeBSD, OpenBSD and/or NetBSD)
|
|
||||||
+ AC_MSG_RESULT(DragonFly, OpenBSD and/or NetBSD)
|
|
||||||
OSLIBS=""
|
|
||||||
;;
|
|
||||||
*-darwin*)
|
|
||||||
@@ -128,6 +157,7 @@ esac
|
|
||||||
AC_SUBST(DARWIN_API)
|
|
||||||
AC_SUBST(LINUX_API)
|
|
||||||
AC_SUBST(BSD_API)
|
|
||||||
+AC_SUBST(DEFINE_USB_HID_DESCRIPTOR)
|
|
||||||
|
|
||||||
AM_CONDITIONAL(LINUX_API, test "$os_support" = "linux")
|
|
||||||
AM_CONDITIONAL(BSD_API, test "$os_support" = "bsd")
|
|
||||||
Index: libusb-0.1.12/usb.h.in
|
|
||||||
===================================================================
|
|
||||||
--- libusb-0.1.12.orig/usb.h.in
|
|
||||||
+++ libusb-0.1.12/usb.h.in
|
|
||||||
@@ -17,6 +17,12 @@
|
|
||||||
|
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
+#if ! @DEFINE_USB_HID_DESCRIPTOR@ && defined(__FreeBSD__)
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+#include <dev/usb/usb.h>
|
|
||||||
+#include <dev/usb/usbhid.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* USB spec information
|
|
||||||
*
|
|
||||||
@@ -75,6 +81,7 @@ struct usb_string_descriptor {
|
|
||||||
u_int16_t wData[1];
|
|
||||||
};
|
|
||||||
|
|
||||||
+#if ! @DEFINE_USB_HID_DESCRIPTOR@ && defined(__FreeBSD__)
|
|
||||||
/* HID descriptor */
|
|
||||||
struct usb_hid_descriptor {
|
|
||||||
u_int8_t bLength;
|
|
||||||
@@ -86,6 +93,7 @@ struct usb_hid_descriptor {
|
|
||||||
/* u_int16_t wDescriptorLength; */
|
|
||||||
/* ... */
|
|
||||||
};
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Endpoint descriptor */
|
|
||||||
#define USB_MAXENDPOINTS 32
|
|
@ -1,24 +0,0 @@
|
|||||||
Patch-from: http://bugs.gentoo.org/show_bug.cgi?id=225879
|
|
||||||
Gentoo-Bug: 225879
|
|
||||||
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
||||||
|
|
||||||
Prevents an infinite loop if device is removed during usb_bulk_read or
|
|
||||||
usb_bulk_write.
|
|
||||||
|
|
||||||
diff -Naur libusb-0.1.12/linux.c libusb-0.1.12-new/linux.c
|
|
||||||
--- libusb-0.1.12/linux.c 2006-03-04 04:52:46.000000000 +0200
|
|
||||||
+++ libusb-0.1.12-new/linux.c 2008-06-11 14:22:20.000000000 +0300
|
|
||||||
@@ -220,6 +220,13 @@
|
|
||||||
waiting = 1;
|
|
||||||
context = NULL;
|
|
||||||
while (!urb.usercontext && ((ret = ioctl(dev->fd, IOCTL_USB_REAPURBNDELAY, &context)) == -1) && waiting) {
|
|
||||||
+ if (ret == -1)
|
|
||||||
+ {
|
|
||||||
+ if (errno == ENODEV)
|
|
||||||
+ {
|
|
||||||
+ return -ENODEV;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
tv.tv_sec = 0;
|
|
||||||
tv.tv_usec = 1000; // 1 msec
|
|
||||||
select(dev->fd + 1, NULL, &writefds, NULL, &tv); //sub second wait
|
|
@ -1,20 +0,0 @@
|
|||||||
--- libusb-0.1.12/Makefile.am 2006-03-04 13:52:46.000000000 +1100
|
|
||||||
+++ libusb-0.1.12/Makefile.am.new 2007-11-08 16:25:38.000000000 +1100
|
|
||||||
@@ -4,7 +4,7 @@
|
|
||||||
# gnu strictness chokes on README being autogenerated
|
|
||||||
AUTOMAKE_OPTIONS = 1.4 foreign
|
|
||||||
|
|
||||||
-SUBDIRS = . tests doc
|
|
||||||
+SUBDIRS = . doc
|
|
||||||
|
|
||||||
AM_CFLAGS = -Werror
|
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@
|
|
||||||
apidocs/footer.html apidocs/doxygen.css apidocs/doxygen.png libusb.pc.in
|
|
||||||
EXTRA_libusb_la_SOURCE = linux.c linux.h bsd.c darwin.c
|
|
||||||
|
|
||||||
-lib_LTLIBRARIES = libusb.la libusbpp.la
|
|
||||||
+lib_LTLIBRARIES = libusb.la
|
|
||||||
|
|
||||||
pkgconfig_DATA = libusb.pc
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libusb/libusb-0.1.12-r5.ebuild,v 1.9 2009/06/01 00:00:46 ranger Exp $
|
|
||||||
|
|
||||||
inherit eutils libtool autotools toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="Userspace access to USB devices"
|
|
||||||
HOMEPAGE="http://libusb.sourceforge.net/"
|
|
||||||
SRC_URI="mirror://sourceforge/libusb/${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="LGPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
|
||||||
IUSE="debug doc nocxx"
|
|
||||||
RESTRICT="test"
|
|
||||||
|
|
||||||
RDEPEND="!dev-libs/libusb-compat"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
doc? ( app-text/openjade
|
|
||||||
app-text/docbook-dsssl-stylesheets
|
|
||||||
app-text/docbook-sgml-utils
|
|
||||||
~app-text/docbook-sgml-dtd-4.2 )"
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
unpack ${A}
|
|
||||||
cd "${S}"
|
|
||||||
sed -i -e 's:-Werror::' Makefile.am
|
|
||||||
sed -i 's:AC_LANG_CPLUSPLUS:AC_PROG_CXX:' configure.in #213800
|
|
||||||
epatch "${FILESDIR}"/${PV}-fbsd.patch
|
|
||||||
use nocxx && epatch "${FILESDIR}"/${PN}-0.1.12-nocpp.patch
|
|
||||||
epatch "${FILESDIR}"/${PN}-0.1.12-no-infinite-bulk.patch
|
|
||||||
eautoreconf
|
|
||||||
elibtoolize
|
|
||||||
|
|
||||||
# Ensure that the documentation actually finds the DTD it needs
|
|
||||||
docbookdtd="/usr/share/sgml/docbook/sgml-dtd-4.2/docbook.dtd"
|
|
||||||
sysid='"-//OASIS//DTD DocBook V4.2//EN"'
|
|
||||||
sed -r -i -e \
|
|
||||||
"s,(${sysid}) \[\$,\1 \"${docbookdtd}\" \[,g" \
|
|
||||||
"${S}"/doc/manual.sgml
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
econf \
|
|
||||||
$(use_enable debug debug all) \
|
|
||||||
$(use_enable doc build-docs)
|
|
||||||
emake || die "emake failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake -j1 DESTDIR="${D}" install || die "make install failed"
|
|
||||||
dodoc AUTHORS NEWS README
|
|
||||||
use doc && dohtml doc/html/*.html
|
|
||||||
|
|
||||||
use nocxx && rm -f "${D}"/usr/include/usbpp.h
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libusb/libusb-0.1.12-r5.ebuild,v 1.9 2009/06/01 00:00:46 ranger Exp $
|
|
||||||
|
|
||||||
inherit eutils libtool autotools toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="Userspace access to USB devices"
|
|
||||||
HOMEPAGE="http://libusb.sourceforge.net/"
|
|
||||||
SRC_URI="mirror://sourceforge/libusb/${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="LGPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
|
||||||
IUSE="debug doc nocxx"
|
|
||||||
RESTRICT="test"
|
|
||||||
|
|
||||||
RDEPEND="!dev-libs/libusb-compat"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
doc? ( app-text/openjade
|
|
||||||
app-text/docbook-dsssl-stylesheets
|
|
||||||
app-text/docbook-sgml-utils
|
|
||||||
~app-text/docbook-sgml-dtd-4.2 )"
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
unpack ${A}
|
|
||||||
cd "${S}"
|
|
||||||
sed -i -e 's:-Werror::' Makefile.am
|
|
||||||
sed -i 's:AC_LANG_CPLUSPLUS:AC_PROG_CXX:' configure.in #213800
|
|
||||||
epatch "${FILESDIR}"/${PV}-fbsd.patch
|
|
||||||
use nocxx && epatch "${FILESDIR}"/${PN}-0.1.12-nocpp.patch
|
|
||||||
epatch "${FILESDIR}"/${PN}-0.1.12-no-infinite-bulk.patch
|
|
||||||
eautoreconf
|
|
||||||
elibtoolize
|
|
||||||
|
|
||||||
# Ensure that the documentation actually finds the DTD it needs
|
|
||||||
docbookdtd="/usr/share/sgml/docbook/sgml-dtd-4.2/docbook.dtd"
|
|
||||||
sysid='"-//OASIS//DTD DocBook V4.2//EN"'
|
|
||||||
sed -r -i -e \
|
|
||||||
"s,(${sysid}) \[\$,\1 \"${docbookdtd}\" \[,g" \
|
|
||||||
"${S}"/doc/manual.sgml
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
econf \
|
|
||||||
$(use_enable debug debug all) \
|
|
||||||
$(use_enable doc build-docs)
|
|
||||||
emake || die "emake failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake -j1 DESTDIR="${D}" install || die "make install failed"
|
|
||||||
dodoc AUTHORS NEWS README
|
|
||||||
use doc && dohtml doc/html/*.html
|
|
||||||
|
|
||||||
use nocxx && rm -f "${D}"/usr/include/usbpp.h
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
DIST protobuf-2.2.0.tar.bz2 1350084 SHA256 731dfb6b19e0bbc4e20fcc4d2cc317d8acb4203bc611e4247684bae8403c724b SHA512 b9ae5450fde3e322f8c3c617819b604ac360db845d46869623455fcb6b34b70beae573caa52863b402f53a6248867d3776dc8b6bc83325cc58964d9e5f81c96b WHIRLPOOL 8b2c0794fe02593958dc6602b6fb614a598e83023e470cce8e32a111015a5f7b8690ab34189b010f169a458d21eb63df00960f4f03d5dba7eb5ba367d202dbfe
|
|
||||||
DIST protobuf-2.3.0.tar.bz2 1424966 SHA256 760c7707c3fe9ce801916bbd3067d711a33aa550c01b32d1e1761119cf6280ac
|
|
@ -1,3 +0,0 @@
|
|||||||
(add-to-list 'load-path "@SITELISP@")
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.proto\\'" . protobuf-mode))
|
|
||||||
(autoload 'protobuf-mode "protobuf-mode" "Google protobuf mode." t)
|
|
@ -1,3 +0,0 @@
|
|||||||
augroup filetype
|
|
||||||
au! BufRead,BufNewFile *.proto setfiletype proto
|
|
||||||
augroup end
|
|
@ -1,17 +0,0 @@
|
|||||||
diff -Naurp protobuf-2.0.3-orig/python/google/protobuf/internal/decoder_test.py protobuf-2.0.3/python/google/protobuf/internal/decoder_test.py
|
|
||||||
--- protobuf-2.0.3-orig/python/google/protobuf/internal/decoder_test.py 2008-12-05 19:07:15.000000000 +0100
|
|
||||||
+++ protobuf-2.0.3/python/google/protobuf/internal/decoder_test.py 2008-12-06 22:11:48.000000000 +0100
|
|
||||||
@@ -106,6 +106,13 @@ class DecoderTest(unittest.TestCase):
|
|
||||||
self.mox.ReplayAll()
|
|
||||||
result = decoder_method(d)
|
|
||||||
self.assertEqual(expected_result, result)
|
|
||||||
+ # HACK: Convert all ints to longs so that different behavior
|
|
||||||
+ # between 32-bit and 64-bit systems does not impact the result
|
|
||||||
+ # of the test.
|
|
||||||
+ if isinstance(result, int):
|
|
||||||
+ result = long(result)
|
|
||||||
+ if isinstance(expected_result, int):
|
|
||||||
+ expected_result = long(expected_result)
|
|
||||||
self.assert_(isinstance(result, type(expected_result)))
|
|
||||||
self.mox.VerifyAll()
|
|
||||||
self.mox.ResetAll()
|
|
@ -1,15 +0,0 @@
|
|||||||
http://bugs.gentoo.org/271007
|
|
||||||
Fix error with byte-compilation in Emacs.
|
|
||||||
|
|
||||||
--- protobuf-2.1.0-orig/editors/protobuf-mode.el 2009-05-13 22:36:40.000000000 +0200
|
|
||||||
+++ protobuf-2.1.0/editors/protobuf-mode.el 2009-05-24 13:37:04.000000000 +0200
|
|
||||||
@@ -71,7 +71,8 @@
|
|
||||||
|
|
||||||
;; This mode does not inherit properties from other modes. So, we do not use
|
|
||||||
;; the usual `c-add-language' function.
|
|
||||||
-(put 'protobuf-mode 'c-mode-prefix "protobuf-")
|
|
||||||
+(eval-and-compile
|
|
||||||
+ (put 'protobuf-mode 'c-mode-prefix "protobuf-"))
|
|
||||||
|
|
||||||
;; The following code uses of the `c-lang-defconst' macro define syntactic
|
|
||||||
;; features of protocol buffer language. Refer to the documentation in the
|
|
@ -1,28 +0,0 @@
|
|||||||
Fixing as-needed issue
|
|
||||||
|
|
||||||
http://bugs.gentoo.org/show_bug.cgi?id=271509
|
|
||||||
|
|
||||||
--- m4/acx_pthread.m4
|
|
||||||
+++ m4/acx_pthread.m4
|
|
||||||
@@ -278,7 +278,8 @@
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if test x"$done" = xno; then
|
|
||||||
+ if test x"$done" = xyes; then
|
|
||||||
+ done="no"
|
|
||||||
AC_MSG_CHECKING([whether -pthread is sufficient with -shared])
|
|
||||||
AC_TRY_LINK([#include <pthread.h>],
|
|
||||||
[pthread_t th; pthread_join(th, 0);
|
|
||||||
--- gtest/m4/acx_pthread.m4
|
|
||||||
+++ gtest/m4/acx_pthread.m4
|
|
||||||
@@ -278,7 +278,8 @@
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if test x"$done" = xno; then
|
|
||||||
+ if test x"$done" = xyes; then
|
|
||||||
+ done="no"
|
|
||||||
AC_MSG_CHECKING([whether -pthread is sufficient with -shared])
|
|
||||||
AC_TRY_LINK([#include <pthread.h>],
|
|
||||||
[pthread_t th; pthread_join(th, 0);
|
|
@ -1,26 +0,0 @@
|
|||||||
Fixing as-needed issues
|
|
||||||
|
|
||||||
http://bugs.gentoo.org/show_bug.cgi?id=271509
|
|
||||||
|
|
||||||
--- m4/acx_pthread.m4
|
|
||||||
+++ m4/acx_pthread.m4
|
|
||||||
@@ -99,7 +99,7 @@
|
|
||||||
# which indicates that we try without any flags at all, and "pthread-config"
|
|
||||||
# which is a program returning the flags for the Pth emulation library.
|
|
||||||
|
|
||||||
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
|
||||||
+acx_pthread_flags="pthreads none pthread -Kthread -kthread lthread -pthread -pthreads -mthreads --thread-safe -mt pthread-config"
|
|
||||||
|
|
||||||
# The ordering *is* (sometimes) important. Some notes on the
|
|
||||||
# individual items follow:
|
|
||||||
--- gtest/m4/acx_pthread.m4
|
|
||||||
+++ gtest/m4/acx_pthread.m4
|
|
||||||
@@ -99,7 +99,7 @@
|
|
||||||
# which indicates that we try without any flags at all, and "pthread-config"
|
|
||||||
# which is a program returning the flags for the Pth emulation library.
|
|
||||||
|
|
||||||
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
|
||||||
+acx_pthread_flags="pthreads none pthread -Kthread -kthread lthread -pthread -pthreads -mthreads --thread-safe -mt pthread-config"
|
|
||||||
|
|
||||||
# The ordering *is* (sometimes) important. Some notes on the
|
|
||||||
# individual items follow:
|
|
@ -1,14 +0,0 @@
|
|||||||
diff -Naur protobuf-2.3.0-orig/python/setup.py protobuf-2.3.0/python/setup.py
|
|
||||||
--- protobuf-2.3.0-orig/python/setup.py 2011-03-22 16:33:33.000000000 -0700
|
|
||||||
+++ protobuf-2.3.0/python/setup.py 2011-03-22 17:01:14.000000000 -0700
|
|
||||||
@@ -16,7 +16,9 @@
|
|
||||||
maintainer_email = "protobuf@googlegroups.com"
|
|
||||||
|
|
||||||
# Find the Protocol Compiler.
|
|
||||||
-if os.path.exists("../src/protoc"):
|
|
||||||
+if 'PROTOC' in os.environ and os.path.exists(os.environ['PROTOC']):
|
|
||||||
+ protoc = os.environ['PROTOC']
|
|
||||||
+elif os.path.exists("../src/protoc"):
|
|
||||||
protoc = "../src/protoc"
|
|
||||||
elif os.path.exists("../src/protoc.exe"):
|
|
||||||
protoc = "../src/protoc.exe"
|
|
@ -1,105 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/protobuf-2.2.0.ebuild,v 1.1 2009/08/21 17:41:18 nelchael Exp $
|
|
||||||
|
|
||||||
EAPI="2"
|
|
||||||
|
|
||||||
JAVA_PKG_IUSE="source"
|
|
||||||
|
|
||||||
inherit eutils python java-pkg-opt-2 elisp-common
|
|
||||||
|
|
||||||
DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding structured data"
|
|
||||||
HOMEPAGE="http://code.google.com/p/protobuf/"
|
|
||||||
SRC_URI="http://protobuf.googlecode.com/files/${PF}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~amd64 ~x86 ~arm"
|
|
||||||
IUSE="emacs examples java python vim-syntax"
|
|
||||||
|
|
||||||
DEPEND="${DEPEND} java? ( >=virtual/jdk-1.5 )
|
|
||||||
python? ( dev-python/setuptools )
|
|
||||||
emacs? ( virtual/emacs )"
|
|
||||||
RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.5 )
|
|
||||||
emacs? ( virtual/emacs )"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
epatch "${FILESDIR}/${P}-decoder_test_64bit_fix.patch"
|
|
||||||
epatch "${FILESDIR}/${P}-fix-emacs-byte-compile.patch"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local protoc=""
|
|
||||||
if tc-is-cross-compiler; then
|
|
||||||
protoc="--with-protoc=$(which protoc)" ||
|
|
||||||
die "need native protoc tool to cross compile"
|
|
||||||
fi
|
|
||||||
econf ${protoc} || die "died running econf"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake || die
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
cd python; distutils_src_compile; cd ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
src/protoc --java_out=java/src/main/java --proto_path=src src/google/protobuf/descriptor.proto
|
|
||||||
mkdir java/build
|
|
||||||
pushd java/src/main/java
|
|
||||||
ejavac -d ../../../build $(find . -name '*.java') || die "java compilation failed"
|
|
||||||
popd
|
|
||||||
jar cf "${PN}.jar" -C java/build . || die "jar failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use emacs; then
|
|
||||||
elisp-compile "${S}/editors/protobuf-mode.el" || die "elisp-compile failed!"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake DESTDIR="${D}" install
|
|
||||||
dodoc CHANGES.txt CONTRIBUTORS.txt README.txt
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
cd python; distutils_src_install; cd ..
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use vim-syntax; then
|
|
||||||
insinto /usr/share/vim/vimfiles/syntax
|
|
||||||
doins editors/proto.vim
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use emacs; then
|
|
||||||
elisp-install ${PN} editors/protobuf-mode.el* || die "elisp-install failed!"
|
|
||||||
elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use examples; then
|
|
||||||
insinto /usr/share/doc/${PF}/examples
|
|
||||||
doins -r examples/* || die "doins examples failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
java-pkg_dojar ${PN}.jar
|
|
||||||
use source && java-pkg_dosrc java/src/main/java/*
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
emake check
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
cd python; ${python} setup.py test || die "python test failed"
|
|
||||||
cd ..
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
use emacs && elisp-site-regen
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
use emacs && elisp-site-regen
|
|
||||||
}
|
|
@ -1,141 +0,0 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-libs/protobuf/protobuf-2.3.0-r1.ebuild,v 1.5 2011/03/16 18:00:10 xarthisius Exp $
|
|
||||||
|
|
||||||
EAPI="3"
|
|
||||||
|
|
||||||
PYTHON_DEPEND="python-runtime? 2"
|
|
||||||
JAVA_PKG_IUSE="source"
|
|
||||||
|
|
||||||
inherit autotools eutils distutils python-old-eapi3 java-pkg-opt-2 elisp-common toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="Google's Protocol Buffers -- an efficient method of encoding structured data"
|
|
||||||
HOMEPAGE="http://code.google.com/p/protobuf/"
|
|
||||||
SRC_URI="http://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="Apache-2.0"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="amd64 arm ppc ppc64 x86 ~x64-macos"
|
|
||||||
|
|
||||||
IUSE="emacs examples java python python-runtime static-libs vim-syntax"
|
|
||||||
|
|
||||||
DEPEND="${DEPEND} java? ( >=virtual/jdk-1.5 )
|
|
||||||
python? ( dev-lang/python dev-python/setuptools )
|
|
||||||
emacs? ( virtual/emacs )"
|
|
||||||
RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.5 )
|
|
||||||
emacs? ( virtual/emacs )"
|
|
||||||
|
|
||||||
PYTHON_MODNAME="google/protobuf"
|
|
||||||
DISTUTILS_SRC_TEST="setup.py"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
epatch "${FILESDIR}"/${P}-asneeded-2.patch
|
|
||||||
epatch "${FILESDIR}"/${P}-crosscompile.patch
|
|
||||||
eautoreconf
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
python_set_active_version 2
|
|
||||||
python_convert_shebangs -r 2 .
|
|
||||||
distutils_src_prepare
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
PROTOC_ARG=
|
|
||||||
if tc-is-cross-compiler ; then
|
|
||||||
host_protoc=$(which protoc)
|
|
||||||
[[ -n ${host_protoc} ]] || die "Please install ${P} in your host environment."
|
|
||||||
PROTOC_ARG="--with-protoc=${host_protoc}"
|
|
||||||
export PROTOC=${host_protoc}
|
|
||||||
fi
|
|
||||||
|
|
||||||
export LDFLAGS="-L./.libs ${LDFLAGS}"
|
|
||||||
econf $PROTOC_ARG \
|
|
||||||
$(use_enable static-libs static)
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake || die "emake failed"
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
einfo "Compiling Python library ..."
|
|
||||||
pushd python
|
|
||||||
distutils_src_compile
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
einfo "Compiling Java library ..."
|
|
||||||
src/protoc --java_out=java/src/main/java --proto_path=src src/google/protobuf/descriptor.proto
|
|
||||||
mkdir java/build
|
|
||||||
pushd java/src/main/java
|
|
||||||
ejavac -d ../../../build $(find . -name '*.java') || die "java compilation failed"
|
|
||||||
popd
|
|
||||||
jar cf "${PN}.jar" -C java/build . || die "jar failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use emacs; then
|
|
||||||
elisp-compile "${S}/editors/protobuf-mode.el" || die "elisp-compile failed!"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
emake check || die "emake check failed"
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
pushd python
|
|
||||||
distutils_src_test
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake DESTDIR="${D}" install || die "emake install failed"
|
|
||||||
dodoc CHANGES.txt CONTRIBUTORS.txt README.txt
|
|
||||||
|
|
||||||
use static-libs || rm -rf "${D}"/usr/lib*/*.la
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
pushd python
|
|
||||||
# distutils.eclass doesn't allow us to install into /usr/local, so we
|
|
||||||
# have to do this manually.
|
|
||||||
"${EPYTHON}" setup.py install --root="${D}" --prefix=/usr/local
|
|
||||||
popd
|
|
||||||
# HACK ALERT: upstream setup.py forgets to install google/__init__.py,
|
|
||||||
# hack now, fix properly later.
|
|
||||||
pushd "${D}"
|
|
||||||
local whereto="$(find . -name 'site-packages')"
|
|
||||||
popd
|
|
||||||
insinto "${whereto/./}"/google/
|
|
||||||
doins "${S}"/python/google/__init__.py
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
java-pkg_dojar ${PN}.jar
|
|
||||||
use source && java-pkg_dosrc java/src/main/java/*
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use vim-syntax; then
|
|
||||||
insinto /usr/share/vim/vimfiles/syntax
|
|
||||||
doins editors/proto.vim
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use emacs; then
|
|
||||||
elisp-install ${PN} editors/protobuf-mode.el* || die "elisp-install failed!"
|
|
||||||
elisp-site-file-install "${FILESDIR}/70${PN}-gentoo.el"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use examples; then
|
|
||||||
insinto /usr/share/doc/${PF}/examples
|
|
||||||
doins -r examples/* || die "doins examples failed"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
use emacs && elisp-site-regen
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
use emacs && elisp-site-regen
|
|
||||||
}
|
|
||||||
|
|
@ -1 +0,0 @@
|
|||||||
DIST pygobject-2.18.0.tar.bz2 639205 RMD160 db454107949b0e797c6c151aa426368ef0f59317 SHA1 f800eda7978fe9813600cfdda973da15c3178bb0 SHA256 b11b840ae31e6e644986806ee3400f4528b803d07b6cee26add45e0f2e5e622b
|
|
@ -1,50 +0,0 @@
|
|||||||
---
|
|
||||||
Fix FHS compliance of codegen
|
|
||||||
|
|
||||||
codegen/Makefile.am | 2 +-
|
|
||||||
codegen/pygtk-codegen-2.0.in | 3 ++-
|
|
||||||
pygtk-2.0.pc.in | 2 +-
|
|
||||||
3 files changed, 4 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
--- a/codegen/Makefile.am 2007-11-01 12:20:22.000000000 -0400
|
|
||||||
+++ b/codegen/Makefile.am 2008-05-28 22:21:04.000000000 -0400
|
|
||||||
@@ -2,7 +2,7 @@ PLATFORM_VERSION = 2.0
|
|
||||||
|
|
||||||
bin_SCRIPTS = pygobject-codegen-$(PLATFORM_VERSION)
|
|
||||||
|
|
||||||
-codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen
|
|
||||||
+codegendir = $(pyexecdir)/gtk-2.0/codegen
|
|
||||||
|
|
||||||
codegen_PYTHON = \
|
|
||||||
__init__.py \
|
|
||||||
--- a/codegen/pygobject-codegen-2.0.in 2007-11-01 12:20:22.000000000 -0400
|
|
||||||
+++ b/codegen/pygobject-codegen-2.0.in 2008-05-28 22:24:38.000000000 -0400
|
|
||||||
@@ -1,9 +1,10 @@
|
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
prefix=@prefix@
|
|
||||||
+exec_prefix=@exec_prefix@
|
|
||||||
datarootdir=@datarootdir@
|
|
||||||
datadir=@datadir@
|
|
||||||
-codegendir=${datadir}/pygobject/2.0/codegen
|
|
||||||
+codegendir=@pyexecdir@/gtk-2.0/codegen
|
|
||||||
|
|
||||||
PYTHONPATH=$codegendir
|
|
||||||
export PYTHONPATH
|
|
||||||
--- a/pygobject-2.0.pc.in 2007-11-01 12:20:22.000000000 -0400
|
|
||||||
+++ b/pygobject-2.0.pc.in 2008-05-28 22:21:04.000000000 -0400
|
|
||||||
@@ -4,6 +4,7 @@
|
|
||||||
datarootdir=@datarootdir@
|
|
||||||
datadir=@datadir@
|
|
||||||
libdir=@libdir@
|
|
||||||
+pyexecdir=@pyexecdir@
|
|
||||||
|
|
||||||
# you can use the --variable=pygtkincludedir argument to
|
|
||||||
# pkg-config to get this value. You might want to use this to
|
|
||||||
@@ -12,5 +12,5 @@
|
|
||||||
defsdir=${datadir}/pygobject/2.0/defs
|
|
||||||
-codegendir=${datadir}/pygobject/2.0/codegen
|
|
||||||
+codegendir=${pyexecdir}/gtk-2.0/codegen
|
|
||||||
|
|
||||||
Name: PyGObject
|
|
||||||
Description: Python bindings for GObject
|
|
@ -1,13 +0,0 @@
|
|||||||
# Fix build failure due to automake 1.11.
|
|
||||||
# defsgen.py was installed twice
|
|
||||||
# Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=279813
|
|
||||||
--- a/codegen/Makefile.am
|
|
||||||
+++ b/codegen/Makefile.am
|
|
||||||
@@ -18,7 +18,6 @@
|
|
||||||
docextract_to_xml.py \
|
|
||||||
docgen.py \
|
|
||||||
h2def.py \
|
|
||||||
- defsgen.py \
|
|
||||||
createdefs.py \
|
|
||||||
mergedefs.py \
|
|
||||||
missingdefs.py \
|
|
@ -1,36 +0,0 @@
|
|||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -214,6 +214,20 @@
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
+dnl Get the host compiler if cross-compiling
|
|
||||||
+dnl
|
|
||||||
+AM_CONDITIONAL(CROSS_COMPILING, [ test $cross_compiling = yes ])
|
|
||||||
+AC_MSG_CHECKING([for CC_FOR_BUILD])
|
|
||||||
+if test "x${CC_FOR_BUILD+set}" != "xset" ; then
|
|
||||||
+ if test "x$cross_compiling" = "xyes" ; then
|
|
||||||
+ CC_FOR_BUILD=${CC_FOR_BUILD-gcc}
|
|
||||||
+ else
|
|
||||||
+ CC_FOR_BUILD=${CC}
|
|
||||||
+ fi
|
|
||||||
+fi
|
|
||||||
+AC_MSG_RESULT([$CC_FOR_BUILD])
|
|
||||||
+AC_SUBST(CC_FOR_BUILD)
|
|
||||||
+
|
|
||||||
AC_CONFIG_FILES(
|
|
||||||
Makefile
|
|
||||||
pygobject-2.0.pc
|
|
||||||
--- a/gobject/Makefile.am
|
|
||||||
+++ b/gobject/Makefile.am
|
|
||||||
@@ -71,6 +71,13 @@
|
|
||||||
if PLATFORM_WIN32
|
|
||||||
_gobject_la_CFLAGS += -DPLATFORM_WIN32
|
|
||||||
endif
|
|
||||||
+
|
|
||||||
+# Strip all the noise (system includes/etc...) before the main func
|
|
||||||
+generate-constants$(EXEEXT): generate-constants.c
|
|
||||||
+ printf '#include <stdio.h>\nint main()' > generate-constants.pre.c
|
|
||||||
+ $(CC) $(generate_constants_CFLAGS) -E generate-constants.c | sed -e '1,/^int main/d' >> generate-constants.pre.c
|
|
||||||
+ $(CC_FOR_BUILD) -o $@ generate-constants.pre.c
|
|
||||||
+ rm -f generate-constants.pre.c
|
|
@ -1,57 +0,0 @@
|
|||||||
--- tests/Makefile.am
|
|
||||||
+++ tests/Makefile.am
|
|
||||||
@@ -11,7 +11,7 @@
|
|
||||||
test-thread.h \
|
|
||||||
test-unknown.h
|
|
||||||
|
|
||||||
-noinst_LTLIBRARIES = testhelper.la
|
|
||||||
+check_LTLIBRARIES = testhelper.la
|
|
||||||
linked_LIBS = testhelper.la
|
|
||||||
|
|
||||||
testhelper_la_LDFLAGS = -module -avoid-version
|
|
||||||
@@ -47,6 +47,7 @@
|
|
||||||
cp $(top_srcdir)/gobject/*.py $(top_builddir)/gobject; \
|
|
||||||
cp $(top_srcdir)/gio/*.py $(top_builddir)/gio; \
|
|
||||||
fi
|
|
||||||
+ $(LN_S) .libs/testhelper.so testhelper.so
|
|
||||||
@$(PYTHON) $(srcdir)/runtests.py $(top_builddir) $(top_srcdir)
|
|
||||||
@if test "$(top_builddir)" != "$(top_srcdir)"; then \
|
|
||||||
rm -f $(top_builddir)/glib/*.py; \
|
|
||||||
@@ -58,8 +59,5 @@
|
|
||||||
@rm -fr $(top_builddir)/gio/*.pyc
|
|
||||||
|
|
||||||
|
|
||||||
-all: $(LTLIBRARIES:.la=.so)
|
|
||||||
clean-local:
|
|
||||||
- rm -f $(LTLIBRARIES:.la=.so)
|
|
||||||
-.la.so:
|
|
||||||
- $(LN_S) .libs/$@ $@ || true
|
|
||||||
+ rm -f .libs/testhelper.so
|
|
||||||
--- tests/runtests.py
|
|
||||||
+++ tests/runtests.py
|
|
||||||
@@ -6,6 +6,9 @@
|
|
||||||
|
|
||||||
import common
|
|
||||||
|
|
||||||
+# Some tests fail with translated messages.
|
|
||||||
+os.environ["LC_ALL"] = "C"
|
|
||||||
+
|
|
||||||
program = None
|
|
||||||
if len(sys.argv) == 3:
|
|
||||||
buildDir = sys.argv[1]
|
|
||||||
--- tests/test_gio.py
|
|
||||||
+++ tests/test_gio.py
|
|
||||||
@@ -386,9 +386,10 @@
|
|
||||||
|
|
||||||
def testQueryWritableNamespaces(self):
|
|
||||||
infolist = self.file.query_writable_namespaces()
|
|
||||||
- for info in infolist:
|
|
||||||
- if info.name == "xattr":
|
|
||||||
- self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_STRING)
|
|
||||||
+ if infolist:
|
|
||||||
+ for info in infolist:
|
|
||||||
+ if info.name == "xattr":
|
|
||||||
+ self.assertEqual(info.type, gio.FILE_ATTRIBUTE_TYPE_STRING)
|
|
||||||
|
|
||||||
def testSetAttribute(self):
|
|
||||||
self._f.write("testing attributes")
|
|
@ -1,138 +0,0 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-python/pygobject/pygobject-2.18.0.ebuild,v 1.10 2009/08/19 16:30:10 jer Exp $
|
|
||||||
|
|
||||||
EAPI="3"
|
|
||||||
GCONF_DEBUG="no"
|
|
||||||
GNOME2_LA_PUNT="yes"
|
|
||||||
SUPPORT_PYTHON_ABIS="1"
|
|
||||||
# pygobject is partially incompatible with Python 3.
|
|
||||||
# PYTHON_DEPEND="2:2.6 3:3.1"
|
|
||||||
# RESTRICT_PYTHON_ABIS="2.4 2.5 3.0 *-jython"
|
|
||||||
PYTHON_DEPEND="2:2.6"
|
|
||||||
RESTRICT_PYTHON_ABIS="2.4 2.5 3.* *-jython"
|
|
||||||
|
|
||||||
# XXX: Is the alternatives stuff needed anymore?
|
|
||||||
inherit alternatives autotools gnome2 python virtualx
|
|
||||||
|
|
||||||
DESCRIPTION="GLib's GObject library bindings for Python"
|
|
||||||
HOMEPAGE="http://www.pygtk.org/"
|
|
||||||
|
|
||||||
LICENSE="LGPL-2.1"
|
|
||||||
SLOT="2"
|
|
||||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
|
|
||||||
IUSE="doc examples libffi test"
|
|
||||||
|
|
||||||
COMMON_DEPEND=">=dev-libs/glib-2.24.0:2
|
|
||||||
libffi? ( virtual/libffi )"
|
|
||||||
DEPEND="${COMMON_DEPEND}
|
|
||||||
doc? (
|
|
||||||
dev-libs/libxslt
|
|
||||||
>=app-text/docbook-xsl-stylesheets-1.70.1 )
|
|
||||||
test? (
|
|
||||||
media-fonts/font-cursor-misc
|
|
||||||
media-fonts/font-misc-misc )
|
|
||||||
>=dev-util/pkgconfig-0.12"
|
|
||||||
RDEPEND="${COMMON_DEPEND}
|
|
||||||
!<dev-python/pygtk-2.13"
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
DOCS="AUTHORS ChangeLog* NEWS README"
|
|
||||||
G2CONF="${G2CONF}
|
|
||||||
--disable-dependency-tracking
|
|
||||||
$(use_enable doc docs)
|
|
||||||
$(use_with libffi ffi)"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
gnome2_src_prepare
|
|
||||||
|
|
||||||
# Fix FHS compliance, see upstream bug #535524
|
|
||||||
epatch "${FILESDIR}/${PN}-2.15.4-fix-codegen-location.patch"
|
|
||||||
|
|
||||||
# Do not build tests if unneeded, bug #226345
|
|
||||||
epatch "${FILESDIR}"/${P}-make_check.patch
|
|
||||||
|
|
||||||
# Do not install files twice, bug #279813
|
|
||||||
epatch "${FILESDIR}/${P}-automake111.patch"
|
|
||||||
|
|
||||||
# For cross-compilation we need to compile the constant
|
|
||||||
# generation for the HOST architecture while using the
|
|
||||||
# target headers.
|
|
||||||
if tc-is-cross-compiler ; then
|
|
||||||
epatch "${FILESDIR}/${P}-cross-generate-constants.patch"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# needed to build on a libtool-1 system, bug #255542
|
|
||||||
rm m4/lt* m4/libtool.m4 ltmain.sh
|
|
||||||
|
|
||||||
# disable pyc compiling
|
|
||||||
ln -sfn $(type -P true) py-compile
|
|
||||||
|
|
||||||
# Workaround upstream Gentoo bug #232820
|
|
||||||
find "${S}" -name .elibtoolized -delete
|
|
||||||
eautoreconf
|
|
||||||
|
|
||||||
python_copy_sources
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
python_execute_function -s gnome2_src_configure
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
python_execute_function -d -s
|
|
||||||
}
|
|
||||||
|
|
||||||
# FIXME: With python multiple ABI support, tests return 1 even when they pass
|
|
||||||
src_test() {
|
|
||||||
unset DBUS_SESSION_BUS_ADDRESS
|
|
||||||
|
|
||||||
testing() {
|
|
||||||
XDG_CACHE_HOME="${T}/$(PYTHON --ABI)"
|
|
||||||
Xemake check PYTHON=$(PYTHON -a)
|
|
||||||
}
|
|
||||||
python_execute_function -s testing
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
[[ -z ${ED} ]] && local ED="${D}"
|
|
||||||
installation() {
|
|
||||||
gnome2_src_install
|
|
||||||
mv "${ED}$(python_get_sitedir)/pygtk.py" "${ED}$(python_get_sitedir)/pygtk.py-2.0"
|
|
||||||
mv "${ED}$(python_get_sitedir)/pygtk.pth" "${ED}$(python_get_sitedir)/pygtk.pth-2.0"
|
|
||||||
}
|
|
||||||
python_execute_function -s installation
|
|
||||||
|
|
||||||
python_clean_installation_image
|
|
||||||
|
|
||||||
sed "s:/usr/bin/python:/usr/bin/python2:" \
|
|
||||||
-i "${ED}"/usr/bin/pygobject-codegen-2.0 \
|
|
||||||
|| die "Fix usage of python interpreter"
|
|
||||||
|
|
||||||
if use examples; then
|
|
||||||
insinto /usr/share/doc/${P}
|
|
||||||
doins -r examples || die "doins failed"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
create_symlinks() {
|
|
||||||
alternatives_auto_makesym "$(python_get_sitedir)/pygtk.py" pygtk.py-[0-9].[0-9]
|
|
||||||
alternatives_auto_makesym "$(python_get_sitedir)/pygtk.pth" pygtk.pth-[0-9].[0-9]
|
|
||||||
}
|
|
||||||
python_execute_function create_symlinks
|
|
||||||
|
|
||||||
python_mod_optimize gtk-2.0 pygtk.py
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
python_mod_cleanup gtk-2.0 pygtk.py
|
|
||||||
|
|
||||||
create_symlinks() {
|
|
||||||
alternatives_auto_makesym "$(python_get_sitedir)/pygtk.py" pygtk.py-[0-9].[0-9]
|
|
||||||
alternatives_auto_makesym "$(python_get_sitedir)/pygtk.pth" pygtk.pth-[0-9].[0-9]
|
|
||||||
}
|
|
||||||
python_execute_function create_symlinks
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
pygobject-2.18.0-r1.ebuild
|
|
@ -1,3 +0,0 @@
|
|||||||
DIST git-1.7.2.3.tar.bz2 2567979 SHA256 6139ec31d0a79cae04f469e73cc1f912162bb8f84ef7621ecc8630989fc81ba1 SHA512 fbe186c8bf6d0267740a3ed842e00448a9565c4a0bdee6ae3078a43095766387f924a9457f420aa3e047bfc48d3dbafea2433de7e49aeaeef58d6228dc9dc47f WHIRLPOOL fcb7488eaabb14b903b5a4e89103982a8e529b8f1ce4fb904637f1fa763e561122eea6f3d31c751fccf91dda009c5c214d85489152d0a5e362709746276bd3ca
|
|
||||||
DIST git-htmldocs-1.7.2.3.tar.bz2 899056 SHA256 ee460ef1e58d103fe3af3812adab628d7fc8fa91c1a3128bc8bf0b334126832f SHA512 df3212fb35af6042d802982d07e423259d1c344b4c9e3f302ed34d131a33dec274aeb4b46d871f53b48225a7629dbad2b5e6bc21f2bedca86b0de23f1ce2c60e WHIRLPOOL b8b6d1f40523b11de13a229bb12a014adfe44f478707e06fb636e8e37f2473486e33c33099cf115a637fe3fd82e65669a830d81147471d87ecafc98a6dc2c494
|
|
||||||
DIST git-manpages-1.7.2.3.tar.bz2 288264 SHA256 87e00245e10472ee5acdd75bb5a6e2e89c12638b498e0df9edca6201439d47d7 SHA512 af20fe54b2a586cb7e25d9462e32acc88f98356297c3711a931a3d853c5f475aaaa0ba588805102f0ed96d6e3e3bf96ef2860cec59b3b3d4426f0152ce43de15 WHIRLPOOL 3fb396cdea6887944e99abc662a93324c189905fe295b1a4f999e96337d05da96cde27f7338d06cd2627ac8794fd922a42aad844156c2c6077e2ea81f6fd5a67
|
|
@ -1,17 +0,0 @@
|
|||||||
diff -ru git-1.6.6.1.orig/compat/inet_ntop.c git-1.6.6.1/compat/inet_ntop.c
|
|
||||||
--- git-1.6.6.1.orig/compat/inet_ntop.c 2010-03-09 04:39:03 -0800
|
|
||||||
+++ git-1.6.6.1/compat/inet_ntop.c 2010-03-09 04:40:50 -0800
|
|
||||||
@@ -169,6 +169,8 @@
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+/* conflicts with interix' headers... */
|
|
||||||
+#ifndef __INTERIX
|
|
||||||
/* char *
|
|
||||||
* inet_ntop(af, src, dst, size)
|
|
||||||
* convert a network format address to presentation format.
|
|
||||||
@@ -197,3 +199,4 @@
|
|
||||||
}
|
|
||||||
/* NOTREACHED */
|
|
||||||
}
|
|
||||||
+#endif
|
|
@ -1,100 +0,0 @@
|
|||||||
patch reported upstream at the mailing list.
|
|
||||||
mail reference is: http://marc.info/?l=git&m=126813299716136&w=2
|
|
||||||
|
|
||||||
--- builtin/upload-archive.c
|
|
||||||
+++ builtin/upload-archive.c
|
|
||||||
@@ -132,8 +132,9 @@
|
|
||||||
packet_flush(1);
|
|
||||||
|
|
||||||
while (1) {
|
|
||||||
- struct pollfd pfd[2];
|
|
||||||
int status;
|
|
||||||
+#ifndef __INTERIX
|
|
||||||
+ struct pollfd pfd[2];
|
|
||||||
|
|
||||||
pfd[0].fd = fd1[0];
|
|
||||||
pfd[0].events = POLLIN;
|
|
||||||
@@ -156,6 +157,8 @@
|
|
||||||
if (process_input(pfd[0].fd, 1))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
if (waitpid(writer, &status, 0) < 0)
|
|
||||||
error_clnt("%s", lostchild);
|
|
||||||
else if (!WIFEXITED(status) || WEXITSTATUS(status) > 0)
|
|
||||||
--- daemon.c
|
|
||||||
+++ daemon.c
|
|
||||||
@@ -14,6 +14,8 @@
|
|
||||||
#define NI_MAXSERV 32
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifndef __INTERIX /* not available on interix! */
|
|
||||||
+
|
|
||||||
static int log_syslog;
|
|
||||||
static int verbose;
|
|
||||||
static int reuseaddr;
|
|
||||||
@@ -922,8 +924,13 @@
|
|
||||||
return service_loop(socknum, socklist);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#endif /* __INTERIX */
|
|
||||||
+
|
|
||||||
int main(int argc, char **argv)
|
|
||||||
{
|
|
||||||
+#ifdef __INTERIX
|
|
||||||
+ die("not implemented on interix!");
|
|
||||||
+#else /* !__INTERIX */
|
|
||||||
int listen_port = 0;
|
|
||||||
char *listen_addr = NULL;
|
|
||||||
int inetd_mode = 0;
|
|
||||||
@@ -1121,4 +1128,5 @@
|
|
||||||
store_pid(pid_file);
|
|
||||||
|
|
||||||
return serve(listen_addr, listen_port, pass, gid);
|
|
||||||
+#endif /* __INTERIX */
|
|
||||||
}
|
|
||||||
--- git-compat-util.h
|
|
||||||
+++ git-compat-util.h
|
|
||||||
@@ -93,7 +93,9 @@
|
|
||||||
#include <utime.h>
|
|
||||||
#ifndef __MINGW32__
|
|
||||||
#include <sys/wait.h>
|
|
||||||
+#ifndef __INTERIX
|
|
||||||
#include <sys/poll.h>
|
|
||||||
+#endif
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#ifndef NO_SYS_SELECT_H
|
|
||||||
@@ -104,7 +106,11 @@
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
+#ifndef __INTERIX
|
|
||||||
#include <inttypes.h>
|
|
||||||
+#else
|
|
||||||
+#include <stdint.h>
|
|
||||||
+#endif
|
|
||||||
#if defined(__CYGWIN__)
|
|
||||||
#undef _XOPEN_SOURCE
|
|
||||||
#include <grp.h>
|
|
||||||
--- upload-pack.c
|
|
||||||
+++ upload-pack.c
|
|
||||||
@@ -150,6 +150,7 @@
|
|
||||||
|
|
||||||
static void create_pack_file(void)
|
|
||||||
{
|
|
||||||
+#ifndef __INTERIX
|
|
||||||
struct async rev_list;
|
|
||||||
struct child_process pack_objects;
|
|
||||||
int create_full_pack = (nr_our_refs == want_obj.nr && !have_obj.nr);
|
|
||||||
@@ -328,6 +329,9 @@
|
|
||||||
fail:
|
|
||||||
send_client_data(3, abort_msg, sizeof(abort_msg));
|
|
||||||
die("git upload-pack: %s", abort_msg);
|
|
||||||
+#else /* __INTERIX */
|
|
||||||
+ die("git upload-pack: not implemented on interix!");
|
|
||||||
+#endif /* __INTERIX */
|
|
||||||
}
|
|
||||||
|
|
||||||
static int got_sha1(char *hex, unsigned char *sha1)
|
|
@ -1,31 +0,0 @@
|
|||||||
diff -Nuar --exclude '*.rej' --exclude '*.orig' git-1.7.2.orig/Makefile git-1.7.2/Makefile
|
|
||||||
--- git-1.7.2.orig/Makefile 2010-07-21 21:35:25.000000000 +0000
|
|
||||||
+++ git-1.7.2/Makefile 2010-07-22 16:52:22.994872806 +0000
|
|
||||||
@@ -1650,17 +1650,16 @@
|
|
||||||
$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) all
|
|
||||||
|
|
||||||
ifdef JSMIN
|
|
||||||
-GITWEB_PROGRAMS += gitweb/static/gitweb.min.js
|
|
||||||
GITWEB_JS = gitweb/static/gitweb.min.js
|
|
||||||
else
|
|
||||||
GITWEB_JS = gitweb/static/gitweb.js
|
|
||||||
endif
|
|
||||||
ifdef CSSMIN
|
|
||||||
-GITWEB_PROGRAMS += gitweb/static/gitweb.min.css
|
|
||||||
GITWEB_CSS = gitweb/static/gitweb.min.css
|
|
||||||
else
|
|
||||||
GITWEB_CSS = gitweb/static/gitweb.css
|
|
||||||
endif
|
|
||||||
+GITWEB_PROGRAMS += $(GITWEB_JS) $(GITWEB_CSS)
|
|
||||||
OTHER_PROGRAMS += gitweb/gitweb.cgi $(GITWEB_PROGRAMS)
|
|
||||||
gitweb/gitweb.cgi: gitweb/gitweb.perl $(GITWEB_PROGRAMS)
|
|
||||||
$(QUIET_SUBDIR0)gitweb $(QUIET_SUBDIR1) $(patsubst gitweb/%,%,$@)
|
|
||||||
@@ -1675,7 +1674,7 @@
|
|
||||||
endif # CSSMIN
|
|
||||||
|
|
||||||
|
|
||||||
-git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/static/gitweb.css gitweb/static/gitweb.js
|
|
||||||
+git-instaweb: git-instaweb.sh gitweb/gitweb.cgi $(GITWEB_CSS) $(GITWEB_JS)
|
|
||||||
$(QUIET_GEN)$(RM) $@ $@+ && \
|
|
||||||
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
|
|
||||||
-e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
|
|
@ -1,464 +0,0 @@
|
|||||||
# Copyright 1999-2010 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/git/git-1.7.2.3.ebuild,v 1.1 2010/09/13 18:34:05 robbat2 Exp $
|
|
||||||
|
|
||||||
EAPI=3
|
|
||||||
|
|
||||||
GENTOO_DEPEND_ON_PERL=no
|
|
||||||
inherit toolchain-funcs eutils elisp-common perl-module bash-completion
|
|
||||||
[ "$PV" == "9999" ] && inherit git
|
|
||||||
|
|
||||||
MY_PV="${PV/_rc/.rc}"
|
|
||||||
MY_P="${PN}-${MY_PV}"
|
|
||||||
|
|
||||||
DOC_VER=${MY_PV}
|
|
||||||
|
|
||||||
DESCRIPTION="GIT - the stupid content tracker, the revision control system heavily used by the Linux kernel team"
|
|
||||||
HOMEPAGE="http://www.git-scm.com/"
|
|
||||||
if [ "$PV" != "9999" ]; then
|
|
||||||
SRC_URI="mirror://kernel/software/scm/git/${MY_P}.tar.bz2
|
|
||||||
mirror://kernel/software/scm/git/${PN}-manpages-${DOC_VER}.tar.bz2
|
|
||||||
doc? ( mirror://kernel/software/scm/git/${PN}-htmldocs-${DOC_VER}.tar.bz2 )"
|
|
||||||
KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
else
|
|
||||||
SRC_URI=""
|
|
||||||
EGIT_BRANCH="master"
|
|
||||||
EGIT_REPO_URI="git://git.kernel.org/pub/scm/git/git.git"
|
|
||||||
# EGIT_REPO_URI="http://www.kernel.org/pub/scm/git/git.git"
|
|
||||||
KEYWORDS="~ppc ~ppc64"
|
|
||||||
fi
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
IUSE="+blksha1 +curl cgi doc emacs gtk iconv +perl ppcsha1 tk +threads +webdav xinetd cvs subversion"
|
|
||||||
|
|
||||||
# Common to both DEPEND and RDEPEND
|
|
||||||
CDEPEND="
|
|
||||||
dev-util/git
|
|
||||||
!blksha1? ( dev-libs/openssl )
|
|
||||||
sys-libs/zlib
|
|
||||||
perl? ( dev-lang/perl[-build] )
|
|
||||||
tk? ( dev-lang/tk )
|
|
||||||
curl? (
|
|
||||||
net-misc/curl
|
|
||||||
webdav? ( dev-libs/expat )
|
|
||||||
)
|
|
||||||
emacs? ( virtual/emacs )"
|
|
||||||
|
|
||||||
RDEPEND="${CDEPEND}
|
|
||||||
perl? ( dev-perl/Error
|
|
||||||
dev-perl/Net-SMTP-SSL
|
|
||||||
dev-perl/Authen-SASL
|
|
||||||
cgi? ( virtual/perl-CGI )
|
|
||||||
cvs? ( >=dev-vcs/cvsps-2.1 dev-perl/DBI dev-perl/DBD-SQLite )
|
|
||||||
subversion? ( dev-vcs/subversion[-dso,perl] dev-perl/libwww-perl dev-perl/TermReadKey )
|
|
||||||
)
|
|
||||||
gtk?
|
|
||||||
(
|
|
||||||
>=dev-python/pygtk-2.8
|
|
||||||
|| ( dev-python/pygtksourceview:2 dev-python/gtksourceview-python )
|
|
||||||
)"
|
|
||||||
|
|
||||||
# This is how info docs are created with Git:
|
|
||||||
# .txt/asciidoc --(asciidoc)---------> .xml/docbook
|
|
||||||
# .xml/docbook --(docbook2texi.pl)--> .texi
|
|
||||||
# .texi --(makeinfo)---------> .info
|
|
||||||
DEPEND="${CDEPEND}
|
|
||||||
app-arch/cpio
|
|
||||||
doc? (
|
|
||||||
app-text/asciidoc
|
|
||||||
app-text/docbook2X
|
|
||||||
sys-apps/texinfo
|
|
||||||
)"
|
|
||||||
|
|
||||||
# Live ebuild builds HTML docs, additionally
|
|
||||||
if [ "$PV" == "9999" ]; then
|
|
||||||
DEPEND="${DEPEND}
|
|
||||||
doc? (
|
|
||||||
app-text/xmlto
|
|
||||||
)"
|
|
||||||
fi
|
|
||||||
|
|
||||||
SITEFILE=50${PN}-gentoo.el
|
|
||||||
S="${WORKDIR}/${MY_P}"
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
if ! use perl ; then
|
|
||||||
use cgi && ewarn "gitweb needs USE=perl, ignoring USE=cgi"
|
|
||||||
use cvs && ewarn "CVS integration needs USE=perl, ignoring USE=cvs"
|
|
||||||
use subversion && ewarn "git-svn needs USE=perl, it won't work"
|
|
||||||
fi
|
|
||||||
if use webdav && ! use curl ; then
|
|
||||||
ewarn "USE=webdav needs USE=curl. Ignoring"
|
|
||||||
fi
|
|
||||||
if use subversion && has_version dev-vcs/subversion && built_with_use --missing false dev-vcs/subversion dso ; then
|
|
||||||
ewarn "Per Gentoo bugs #223747, #238586, when subversion is built"
|
|
||||||
ewarn "with USE=dso, there may be weird crashes in git-svn. You"
|
|
||||||
ewarn "have been warned."
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is needed because for some obscure reasons future calls to make don't
|
|
||||||
# pick up these exports if we export them in src_unpack()
|
|
||||||
exportmakeopts() {
|
|
||||||
local myopts
|
|
||||||
|
|
||||||
if use blksha1 ; then
|
|
||||||
myopts="${myopts} BLK_SHA1=YesPlease"
|
|
||||||
elif use ppcsha1 ; then
|
|
||||||
myopts="${myopts} PPC_SHA1=YesPlease"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use curl ; then
|
|
||||||
use webdav || myopts="${myopts} NO_EXPAT=YesPlease"
|
|
||||||
else
|
|
||||||
myopts="${myopts} NO_CURL=YesPlease"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# broken assumptions, because of broken build system ...
|
|
||||||
myopts="${myopts} NO_FINK=YesPlease NO_DARWIN_PORTS=YesPlease"
|
|
||||||
myopts="${myopts} INSTALL=install TAR=tar"
|
|
||||||
myopts="${myopts} SHELL_PATH=${EPREFIX}/bin/sh"
|
|
||||||
myopts="${myopts} SANE_TOOL_PATH="
|
|
||||||
myopts="${myopts} OLD_ICONV="
|
|
||||||
myopts="${myopts} NO_EXTERNAL_GREP="
|
|
||||||
|
|
||||||
# can't define this to null, since the entire makefile depends on it
|
|
||||||
sed -i -e '/\/usr\/local/s/BASIC_/#BASIC_/' Makefile
|
|
||||||
|
|
||||||
use iconv \
|
|
||||||
|| einfo "Forcing iconv for ${PVR} due to bugs #321895, #322205."
|
|
||||||
# || myopts="${myopts} NO_ICONV=YesPlease"
|
|
||||||
# because, above, we need to do this unconditionally (no "&& use iconv")
|
|
||||||
use !elibc_glibc && myopts="${myopts} NEEDS_LIBICONV=YesPlease"
|
|
||||||
|
|
||||||
use tk \
|
|
||||||
|| myopts="${myopts} NO_TCLTK=YesPlease"
|
|
||||||
use perl \
|
|
||||||
&& myopts="${myopts} INSTALLDIRS=vendor" \
|
|
||||||
|| myopts="${myopts} NO_PERL=YesPlease"
|
|
||||||
use threads \
|
|
||||||
&& myopts="${myopts} THREADED_DELTA_SEARCH=YesPlease"
|
|
||||||
use subversion \
|
|
||||||
|| myopts="${myopts} NO_SVN_TESTS=YesPlease"
|
|
||||||
# Disabled until ~m68k-mint can be keyworded again
|
|
||||||
# if [[ ${CHOST} == *-mint* ]] ; then
|
|
||||||
# myopts="${myopts} NO_MMAP=YesPlease"
|
|
||||||
# myopts="${myopts} NO_IPV6=YesPlease"
|
|
||||||
# myopts="${myopts} NO_STRLCPY=YesPlease"
|
|
||||||
# myopts="${myopts} NO_MEMMEM=YesPlease"
|
|
||||||
# myopts="${myopts} NO_MKDTEMP=YesPlease"
|
|
||||||
# myopts="${myopts} NO_MKSTEMPS=YesPlease"
|
|
||||||
# fi
|
|
||||||
if [[ ${CHOST} == *-interix* ]] ; then
|
|
||||||
myopts="${myopts} NO_IPV6=YesPlease"
|
|
||||||
myopts="${myopts} NO_MEMMEM=YesPlease"
|
|
||||||
myopts="${myopts} NO_MKDTEMP=YesPlease"
|
|
||||||
myopts="${myopts} NO_STRTOUMAX=YesPlease"
|
|
||||||
myopts="${myopts} NO_STRTOULL=YesPlease"
|
|
||||||
myopts="${myopts} NO_INET_NTOP=YesPlease"
|
|
||||||
myopts="${myopts} NO_INET_PTON=YesPlease"
|
|
||||||
myopts="${myopts} NO_NSEC=YesPlease"
|
|
||||||
myopts="${myopts} NO_MKSTEMPS=YesPlease"
|
|
||||||
fi
|
|
||||||
if [[ ${CHOST} == ia64-*-hpux* ]]; then
|
|
||||||
myopts="${myopts} NO_NSEC=YesPlease"
|
|
||||||
fi
|
|
||||||
|
|
||||||
has_version '>=app-text/asciidoc-8.0' \
|
|
||||||
&& myopts="${myopts} ASCIIDOC8=YesPlease"
|
|
||||||
myopts="${myopts} ASCIIDOC_NO_ROFF=YesPlease"
|
|
||||||
|
|
||||||
# Bug 290465:
|
|
||||||
# builtin-fetch-pack.c:816: error: 'struct stat' has no member named 'st_mtim'
|
|
||||||
[[ "${CHOST}" == *-uclibc* ]] && \
|
|
||||||
myopts="${myopts} NO_NSEC=YesPlease"
|
|
||||||
|
|
||||||
export MY_MAKEOPTS="${myopts}"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_unpack() {
|
|
||||||
if [ "${PV}" != "9999" ]; then
|
|
||||||
unpack ${MY_P}.tar.bz2
|
|
||||||
cd "${S}"
|
|
||||||
unpack ${PN}-manpages-${DOC_VER}.tar.bz2
|
|
||||||
use doc && \
|
|
||||||
cd "${S}"/Documentation && \
|
|
||||||
unpack ${PN}-htmldocs-${DOC_VER}.tar.bz2
|
|
||||||
cd "${S}"
|
|
||||||
else
|
|
||||||
git_src_unpack
|
|
||||||
cd "${S}"
|
|
||||||
#cp "${FILESDIR}"/GIT-VERSION-GEN .
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
# Noperl is being merged to upstream as of 2009/04/05
|
|
||||||
#epatch "${FILESDIR}"/20090305-git-1.6.2-noperl.patch
|
|
||||||
|
|
||||||
# GetOpt-Long v2.38 is strict
|
|
||||||
# Merged in 1.6.3 final 2009/05/07
|
|
||||||
#epatch "${FILESDIR}"/20090505-git-1.6.2.5-getopt-fixes.patch
|
|
||||||
|
|
||||||
# JS install fixup
|
|
||||||
epatch "${FILESDIR}"/git-1.7.2-always-install-js.patch
|
|
||||||
|
|
||||||
# USE=-iconv causes segfaults, fixed post 1.7.1
|
|
||||||
# Gentoo bug #321895
|
|
||||||
#epatch "${FILESDIR}"/git-1.7.1-noiconv-segfault-fix.patch
|
|
||||||
|
|
||||||
sed -i \
|
|
||||||
-e 's:^\(CFLAGS =\).*$:\1 $(OPTCFLAGS) -Wall:' \
|
|
||||||
-e 's:^\(LDFLAGS =\).*$:\1 $(OPTLDFLAGS):' \
|
|
||||||
-e 's:^\(CC = \).*$:\1$(OPTCC):' \
|
|
||||||
-e 's:^\(AR = \).*$:\1$(OPTAR):' \
|
|
||||||
-e "s:\(PYTHON_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
|
|
||||||
-e "s:\(PERL_PATH = \)\(.*\)$:\1${EPREFIX}\2:" \
|
|
||||||
Makefile || die "sed failed"
|
|
||||||
|
|
||||||
# Never install the private copy of Error.pm (bug #296310)
|
|
||||||
sed -i \
|
|
||||||
-e '/private-Error.pm/s,^,#,' \
|
|
||||||
perl/Makefile.PL
|
|
||||||
|
|
||||||
# Fix docbook2texi command
|
|
||||||
sed -i 's/DOCBOOK2X_TEXI=docbook2x-texi/DOCBOOK2X_TEXI=docbook2texi.pl/' \
|
|
||||||
Documentation/Makefile || die "sed failed"
|
|
||||||
|
|
||||||
# bug #318289
|
|
||||||
epatch "${FILESDIR}"/git-1.7.1-interix.patch
|
|
||||||
epatch "${FILESDIR}"/git-1.6.6.1-interix6.patch
|
|
||||||
}
|
|
||||||
|
|
||||||
git_emake() {
|
|
||||||
emake ${MY_MAKEOPTS} \
|
|
||||||
DESTDIR="${D}" \
|
|
||||||
OPTCFLAGS="${CFLAGS}" \
|
|
||||||
OPTLDFLAGS="${LDFLAGS}" \
|
|
||||||
OPTCC="$(tc-getCC)" \
|
|
||||||
OPTAR="$(tc-getAR)" \
|
|
||||||
prefix="${EPREFIX}"/usr \
|
|
||||||
htmldir="${EPREFIX}"/usr/share/doc/${PF}/html \
|
|
||||||
sysconfdir="${EPREFIX}"/etc \
|
|
||||||
"$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
exportmakeopts
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
git_emake || die "emake failed"
|
|
||||||
|
|
||||||
if use emacs ; then
|
|
||||||
elisp-compile contrib/emacs/git{,-blame}.el \
|
|
||||||
|| die "emacs modules failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use perl && use cgi ; then
|
|
||||||
git_emake \
|
|
||||||
gitweb/gitweb.cgi \
|
|
||||||
|| die "emake gitweb/gitweb.cgi failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd "${S}"/Documentation
|
|
||||||
if [[ "$PV" == "9999" ]] ; then
|
|
||||||
git_emake man \
|
|
||||||
|| die "emake man failed"
|
|
||||||
if use doc ; then
|
|
||||||
git_emake info html \
|
|
||||||
|| die "emake info html failed"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if use doc ; then
|
|
||||||
git_emake info \
|
|
||||||
|| die "emake info html failed"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
git_emake \
|
|
||||||
install || \
|
|
||||||
die "make install failed"
|
|
||||||
|
|
||||||
doman man?/*.[157] Documentation/*.[157]
|
|
||||||
|
|
||||||
dodoc README Documentation/{SubmittingPatches,CodingGuidelines}
|
|
||||||
use doc && dodir /usr/share/doc/${PF}/html
|
|
||||||
for d in / /howto/ /technical/ ; do
|
|
||||||
docinto ${d}
|
|
||||||
dodoc Documentation${d}*.txt
|
|
||||||
use doc && dohtml -p ${d} Documentation${d}*.html
|
|
||||||
done
|
|
||||||
docinto /
|
|
||||||
# Upstream does not ship this pre-built :-(
|
|
||||||
use doc && doinfo Documentation/{git,gitman}.info
|
|
||||||
|
|
||||||
dobashcompletion contrib/completion/git-completion.bash ${PN}
|
|
||||||
|
|
||||||
if use emacs ; then
|
|
||||||
elisp-install ${PN} contrib/emacs/git.{el,elc} || die
|
|
||||||
elisp-install ${PN} contrib/emacs/git-blame.{el,elc} || die
|
|
||||||
#elisp-install ${PN}/compat contrib/emacs/vc-git.{el,elc} || die
|
|
||||||
# don't add automatically to the load-path, so the sitefile
|
|
||||||
# can do a conditional loading
|
|
||||||
touch "${ED}${SITELISP}/${PN}/compat/.nosearch"
|
|
||||||
elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use gtk ; then
|
|
||||||
dobin "${S}"/contrib/gitview/gitview
|
|
||||||
dodoc "${S}"/contrib/gitview/gitview.txt
|
|
||||||
fi
|
|
||||||
|
|
||||||
dobin contrib/fast-import/git-p4
|
|
||||||
dodoc contrib/fast-import/git-p4.txt
|
|
||||||
newbin contrib/fast-import/import-tars.perl import-tars
|
|
||||||
|
|
||||||
dodir /usr/share/${PN}/contrib
|
|
||||||
# The following are excluded:
|
|
||||||
# svnimport - use git-svn
|
|
||||||
# p4import - excluded because fast-import has a better one
|
|
||||||
# examples - these are stuff that is not used in Git anymore actually
|
|
||||||
# patches - stuff the Git guys made to go upstream to other places
|
|
||||||
for i in continuous fast-import hg-to-git \
|
|
||||||
hooks remotes2config.sh stats \
|
|
||||||
workdir convert-objects blameview ; do
|
|
||||||
cp -rf \
|
|
||||||
"${S}"/contrib/${i} \
|
|
||||||
"${ED}"/usr/share/${PN}/contrib \
|
|
||||||
|| die "Failed contrib ${i}"
|
|
||||||
done
|
|
||||||
|
|
||||||
if use perl && use cgi ; then
|
|
||||||
exeinto /usr/share/${PN}/gitweb
|
|
||||||
doexe "${S}"/gitweb/gitweb.cgi
|
|
||||||
insinto /usr/share/${PN}/gitweb/static
|
|
||||||
doins "${S}"/gitweb/static/gitweb.css
|
|
||||||
js=gitweb.js
|
|
||||||
[ -f "${S}"/gitweb/static/gitweb.min.js ] && js=gitweb.min.js
|
|
||||||
doins "${S}"/gitweb/static/${js}
|
|
||||||
doins "${S}"/gitweb/static/git-{favicon,logo}.png
|
|
||||||
|
|
||||||
# INSTALL discusses configuration issues, not just installation
|
|
||||||
docinto /
|
|
||||||
newdoc "${S}"/gitweb/INSTALL INSTALL.gitweb
|
|
||||||
newdoc "${S}"/gitweb/README README.gitweb
|
|
||||||
|
|
||||||
find "${ED}"/usr/lib64/perl5/ \
|
|
||||||
-name .packlist \
|
|
||||||
-exec rm \{\} \;
|
|
||||||
fi
|
|
||||||
if ! use subversion ; then
|
|
||||||
rm -f "${ED}"/usr/libexec/git-core/git-svn \
|
|
||||||
"${ED}"/usr/share/man/man1/git-svn.1*
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use xinetd ; then
|
|
||||||
insinto /etc/xinetd.d
|
|
||||||
newins "${FILESDIR}"/git-daemon.xinetd git-daemon
|
|
||||||
fi
|
|
||||||
|
|
||||||
newinitd "${FILESDIR}"/git-daemon.initd git-daemon
|
|
||||||
newconfd "${FILESDIR}"/git-daemon.confd git-daemon
|
|
||||||
|
|
||||||
fixlocalpod
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
local disabled=""
|
|
||||||
local tests_cvs="t9200-git-cvsexportcommit.sh \
|
|
||||||
t9400-git-cvsserver-server.sh \
|
|
||||||
t9401-git-cvsserver-crlf.sh \
|
|
||||||
t9600-cvsimport.sh \
|
|
||||||
t9601-cvsimport-vendor-branch.sh \
|
|
||||||
t9602-cvsimport-branches-tags.sh \
|
|
||||||
t9603-cvsimport-patchsets.sh"
|
|
||||||
local tests_perl="t5502-quickfetch.sh \
|
|
||||||
t5512-ls-remote.sh \
|
|
||||||
t5520-pull.sh"
|
|
||||||
# Bug #225601 - t0004 is not suitable for root perm
|
|
||||||
# Bug #219839 - t1004 is not suitable for root perm
|
|
||||||
# t0001-init.sh - check for init notices EPERM* fails
|
|
||||||
local tests_nonroot="t0001-init.sh \
|
|
||||||
t0004-unwritable.sh \
|
|
||||||
t1004-read-tree-m-u-wf.sh \
|
|
||||||
t3700-add.sh \
|
|
||||||
t7300-clean.sh"
|
|
||||||
|
|
||||||
# Unzip is used only for the testcase code, not by any normal parts of Git.
|
|
||||||
if ! has_version app-arch/unzip ; then
|
|
||||||
einfo "Disabling tar-tree tests"
|
|
||||||
disabled="${disabled} t5000-tar-tree.sh"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cvs=0
|
|
||||||
use cvs && let cvs=$cvs+1
|
|
||||||
if [[ ${EUID} -eq 0 ]]; then
|
|
||||||
if [[ $cvs -eq 1 ]]; then
|
|
||||||
ewarn "Skipping CVS tests because CVS does not work as root!"
|
|
||||||
ewarn "You should retest with FEATURES=userpriv!"
|
|
||||||
disabled="${disabled} ${tests_cvs}"
|
|
||||||
fi
|
|
||||||
einfo "Skipping other tests that require being non-root"
|
|
||||||
disabled="${disabled} ${tests_nonroot}"
|
|
||||||
else
|
|
||||||
[[ $cvs -gt 0 ]] && \
|
|
||||||
has_version dev-vcs/cvs && \
|
|
||||||
let cvs=$cvs+1
|
|
||||||
[[ $cvs -gt 1 ]] && \
|
|
||||||
built_with_use dev-vcs/cvs server && \
|
|
||||||
let cvs=$cvs+1
|
|
||||||
if [[ $cvs -lt 3 ]]; then
|
|
||||||
einfo "Disabling CVS tests (needs dev-vcs/cvs[USE=server])"
|
|
||||||
disabled="${disabled} ${tests_cvs}"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! use perl ; then
|
|
||||||
einfo "Disabling tests that need Perl"
|
|
||||||
disabled="${disabled} ${tests_perl}"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Reset all previously disabled tests
|
|
||||||
cd "${S}/t"
|
|
||||||
for i in *.sh.DISABLED ; do
|
|
||||||
[[ -f "${i}" ]] && mv -f "${i}" "${i%.DISABLED}"
|
|
||||||
done
|
|
||||||
einfo "Disabled tests:"
|
|
||||||
for i in ${disabled} ; do
|
|
||||||
[[ -f "${i}" ]] && mv -f "${i}" "${i}.DISABLED" && einfo "Disabled $i"
|
|
||||||
done
|
|
||||||
cd "${S}"
|
|
||||||
# Now run the tests
|
|
||||||
einfo "Start test run"
|
|
||||||
git_emake \
|
|
||||||
test || die "tests failed"
|
|
||||||
}
|
|
||||||
|
|
||||||
showpkgdeps() {
|
|
||||||
local pkg=$1
|
|
||||||
shift
|
|
||||||
elog " $(printf "%-17s:" ${pkg}) ${@}"
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
use emacs && elisp-site-regen
|
|
||||||
if use subversion && has_version dev-vcs/subversion && ! built_with_use --missing false dev-vcs/subversion perl ; then
|
|
||||||
ewarn "You must build dev-vcs/subversion with USE=perl"
|
|
||||||
ewarn "to get the full functionality of git-svn!"
|
|
||||||
fi
|
|
||||||
elog "These additional scripts need some dependencies:"
|
|
||||||
echo
|
|
||||||
showpkgdeps git-quiltimport "dev-util/quilt"
|
|
||||||
showpkgdeps git-instaweb \
|
|
||||||
"|| ( www-servers/lighttpd www-servers/apache )"
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
use emacs && elisp-site-regen
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
DIST subversion-1.6.9.tar.bz2 5478554 SHA256 05526f92fcb612bdc3bab0d5e218e25847bf10846e047ce244e33859b205111c SHA512 006e773205a9c2051ab7247cd648c4805748433e37c7bce82b9d3a566f384b2ee8537dd091eda398c4764af255cee4fc1ae89d2a0393e8b0e6ab66464ad7e537 WHIRLPOOL c94976df53578410e07bfc79e1d1a0315732dd8b9c4704f173d07fc26b473df4c4ab39a0450eaf0828b7dc0ca5a1b4934fdeb4b779d0e4c8504648ab3cdc31fc
|
|
@ -1,13 +0,0 @@
|
|||||||
|
|
||||||
;;; subversion site-lisp configuration
|
|
||||||
|
|
||||||
(add-to-list 'load-path "@SITELISP@")
|
|
||||||
(and (< emacs-major-version 22)
|
|
||||||
(add-to-list 'load-path "@SITELISP@/compat"))
|
|
||||||
(add-to-list 'vc-handled-backends 'SVN)
|
|
||||||
|
|
||||||
(defalias 'svn-examine 'svn-status)
|
|
||||||
(autoload 'svn-status "dsvn" "Run `svn status'." t)
|
|
||||||
(autoload 'svn-update "dsvn" "Run `svn update'." t)
|
|
||||||
(autoload 'svn-status "psvn"
|
|
||||||
"Examine the status of Subversion working copy in directory DIR." t)
|
|
@ -1,56 +0,0 @@
|
|||||||
--- Makefile.in
|
|
||||||
+++ Makefile.in
|
|
||||||
@@ -47,6 +47,7 @@
|
|
||||||
SVN_SASL_LIBS = @SVN_SASL_LIBS@
|
|
||||||
SVN_SERF_LIBS = @SVN_SERF_LIBS@
|
|
||||||
SVN_SQLITE_LIBS = @SVN_SQLITE_LIBS@
|
|
||||||
+SVN_XML_LIBS = -lexpat
|
|
||||||
SVN_ZLIB_LIBS = @SVN_ZLIB_LIBS@
|
|
||||||
|
|
||||||
LIBS = @LIBS@
|
|
||||||
--- build/ac-macros/aprutil.m4
|
|
||||||
+++ build/ac-macros/aprutil.m4
|
|
||||||
@@ -77,16 +77,14 @@
|
|
||||||
AC_MSG_ERROR([apu-config --prefix failed])
|
|
||||||
fi
|
|
||||||
|
|
||||||
- dnl When APR stores the dependent libs in the .la file, we don't need
|
|
||||||
- dnl --libs.
|
|
||||||
- SVN_APRUTIL_LIBS="`$apu_config --link-libtool --libs`"
|
|
||||||
+ SVN_APRUTIL_LIBS="`$apu_config --link-libtool`"
|
|
||||||
if test $? -ne 0; then
|
|
||||||
- AC_MSG_ERROR([apu-config --link-libtool --libs failed])
|
|
||||||
+ AC_MSG_ERROR([apu-config --link-libtool failed])
|
|
||||||
fi
|
|
||||||
|
|
||||||
- SVN_APRUTIL_EXPORT_LIBS="`$apu_config --link-ld --libs`"
|
|
||||||
+ SVN_APRUTIL_EXPORT_LIBS="`$apu_config --link-ld`"
|
|
||||||
if test $? -ne 0; then
|
|
||||||
- AC_MSG_ERROR([apu-config --link-ld --libs failed])
|
|
||||||
+ AC_MSG_ERROR([apu-config --link-ld failed])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_SUBST(SVN_APRUTIL_INCLUDES)
|
|
||||||
--- build/ac-macros/apr.m4
|
|
||||||
+++ build/ac-macros/apr.m4
|
|
||||||
@@ -74,16 +74,14 @@
|
|
||||||
AC_MSG_ERROR([apr-config --prefix failed])
|
|
||||||
fi
|
|
||||||
|
|
||||||
- dnl When APR stores the dependent libs in the .la file, we don't need
|
|
||||||
- dnl --libs.
|
|
||||||
- SVN_APR_LIBS="`$apr_config --link-libtool --libs`"
|
|
||||||
+ SVN_APR_LIBS="`$apr_config --link-libtool`"
|
|
||||||
if test $? -ne 0; then
|
|
||||||
- AC_MSG_ERROR([apr-config --link-libtool --libs failed])
|
|
||||||
+ AC_MSG_ERROR([apr-config --link-libtool failed])
|
|
||||||
fi
|
|
||||||
|
|
||||||
- SVN_APR_EXPORT_LIBS="`$apr_config --link-ld --libs`"
|
|
||||||
+ SVN_APR_EXPORT_LIBS="`$apr_config --link-ld`"
|
|
||||||
if test $? -ne 0; then
|
|
||||||
- AC_MSG_ERROR([apr-config --link-ld --libs failed])
|
|
||||||
+ AC_MSG_ERROR([apr-config --link-ld failed])
|
|
||||||
fi
|
|
||||||
|
|
||||||
SVN_APR_SHLIB_PATH_VAR="`$apr_config --shlib-path-var`"
|
|
@ -1,144 +0,0 @@
|
|||||||
--- configure.ac
|
|
||||||
+++ configure.ac
|
|
||||||
@@ -198,6 +198,24 @@
|
|
||||||
|
|
||||||
AC_SUBST(LT_LDFLAGS)
|
|
||||||
|
|
||||||
+AC_ARG_ENABLE(local-library-preloading,
|
|
||||||
+ AS_HELP_STRING([--disable-local-library-preloading],
|
|
||||||
+ [Disable preloading of locally built libraries in locally built executables]),
|
|
||||||
+ [
|
|
||||||
+ if test "$enableval" != "no"; then
|
|
||||||
+ TRANSFORM_LIBTOOL_SCRIPTS="transform-libtool-scripts"
|
|
||||||
+ else
|
|
||||||
+ TRANSFORM_LIBTOOL_SCRIPTS=""
|
|
||||||
+ fi
|
|
||||||
+ ], [
|
|
||||||
+ if test "`uname`" != "Darwin"; then
|
|
||||||
+ TRANSFORM_LIBTOOL_SCRIPTS="transform-libtool-scripts"
|
|
||||||
+ else
|
|
||||||
+ TRANSFORM_LIBTOOL_SCRIPTS=""
|
|
||||||
+ fi
|
|
||||||
+])
|
|
||||||
+AC_SUBST(TRANSFORM_LIBTOOL_SCRIPTS)
|
|
||||||
+
|
|
||||||
dnl Check if -no-undefined is needed for the platform.
|
|
||||||
dnl It should always work but with libtool 1.4.3 on OS X it breaks the build.
|
|
||||||
dnl So we only turn it on for platforms where we know we really need it.
|
|
||||||
--- Makefile.in
|
|
||||||
+++ Makefile.in
|
|
||||||
@@ -309,7 +309,10 @@
|
|
||||||
|
|
||||||
@INCLUDE_OUTPUTS@
|
|
||||||
|
|
||||||
-local-all: @BUILD_RULES@
|
|
||||||
+local-all: @BUILD_RULES@ @TRANSFORM_LIBTOOL_SCRIPTS@
|
|
||||||
+
|
|
||||||
+transform-libtool-scripts: @BUILD_RULES@
|
|
||||||
+ @$(top_srcdir)/build/transform_libtool_scripts.sh
|
|
||||||
|
|
||||||
locale-gnu-pot:
|
|
||||||
cd $(abs_srcdir) && XGETTEXT="$(XGETTEXT)" MSGMERGE="$(MSGMERGE)" \
|
|
||||||
--- build/transform_libtool_scripts.sh
|
|
||||||
+++ build/transform_libtool_scripts.sh
|
|
||||||
@@ -0,0 +1,100 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+
|
|
||||||
+# Dependencies of libraries
|
|
||||||
+subr="subr"
|
|
||||||
+auth_gnome_keyring="auth_gnome_keyring $subr"
|
|
||||||
+auth_kwallet="auth_kwallet $subr"
|
|
||||||
+delta="delta $subr"
|
|
||||||
+diff="diff $subr"
|
|
||||||
+fs_util="fs_util $subr"
|
|
||||||
+fs_base="fs_base $delta $fs_util $subr"
|
|
||||||
+fs_fs="fs_fs $delta $fs_util $subr"
|
|
||||||
+fs="fs $fs_base $fs_fs $fs_util $subr"
|
|
||||||
+repos="repos $delta $fs $fs_util $subr"
|
|
||||||
+ra_local="ra_local $delta $fs $fs_util $repos $subr"
|
|
||||||
+ra_neon="ra_neon $delta $subr"
|
|
||||||
+ra_serf="ra_serf $delta $subr"
|
|
||||||
+ra_svn="ra_svn $delta $subr"
|
|
||||||
+ra="ra $delta $ra_local $ra_neon $ra_serf $ra_svn $subr"
|
|
||||||
+wc="wc $delta $diff $subr"
|
|
||||||
+client="client $delta $diff $ra $subr $wc"
|
|
||||||
+
|
|
||||||
+# Variable 'libraries' containing names of variables corresponding to libraries
|
|
||||||
+libraries="auth_gnome_keyring auth_kwallet client delta diff fs fs_base fs_fs fs_util ra ra_local ra_neon ra_serf ra_svn repos subr wc"
|
|
||||||
+
|
|
||||||
+for library in $libraries; do
|
|
||||||
+ # Delete duplicates in dependencies of libraries
|
|
||||||
+ library_dependencies="$(echo -n $(for x in $(eval echo "\$$library"); do echo $x; done | sort -u))"
|
|
||||||
+ eval "$library=\$library_dependencies"
|
|
||||||
+done
|
|
||||||
+
|
|
||||||
+# Dependencies of executables
|
|
||||||
+svn="$auth_gnome_keyring $auth_kwallet $client $delta $diff $ra $subr $wc"
|
|
||||||
+svnadmin="$delta $fs $repos $subr"
|
|
||||||
+svndumpfilter="$delta $fs $repos $subr"
|
|
||||||
+svnlook="$delta $diff $fs $repos $subr"
|
|
||||||
+svnserve="$delta $fs $ra_svn $repos $subr"
|
|
||||||
+svnsync="$auth_gnome_keyring $auth_kwallet $delta $ra $subr"
|
|
||||||
+svnversion="$subr $wc"
|
|
||||||
+entries_dump="$subr $wc"
|
|
||||||
+
|
|
||||||
+# Variable 'executables' containing names of variables corresponding to executables
|
|
||||||
+executables="svn svnadmin svndumpfilter svnlook svnserve svnsync svnversion entries_dump"
|
|
||||||
+
|
|
||||||
+for executable in $executables; do
|
|
||||||
+ # Set variables containing paths of executables
|
|
||||||
+ if [ "$executable" != entries_dump ]; then
|
|
||||||
+ eval "${executable}_path=subversion/$executable/$executable"
|
|
||||||
+ else
|
|
||||||
+ eval "${executable}_path=subversion/tests/cmdline/entries-dump"
|
|
||||||
+ fi
|
|
||||||
+ # Delete duplicates in dependencies of executables
|
|
||||||
+ executable_dependencies="$(echo -n $(for x in $(eval echo "\$$executable"); do echo $x; done | sort -u))"
|
|
||||||
+ eval "$executable=\$executable_dependencies"
|
|
||||||
+done
|
|
||||||
+
|
|
||||||
+test_paths="$(find subversion/tests -mindepth 2 -maxdepth 2 -name '*-test' ! -path '*/.libs/*' | sort)"
|
|
||||||
+for test in $test_paths; do
|
|
||||||
+ test_path="$test"
|
|
||||||
+ # Dependencies of tests are based on names of directories containing tests
|
|
||||||
+ test_library="$(echo $test | sed -e 's:^subversion/tests/libsvn_\([^/]*\)/.*:\1:')"
|
|
||||||
+ test_dependencies="$(eval echo "\$$test_library")"
|
|
||||||
+ # Set variables corresponding to tests and containing dependencies of tests
|
|
||||||
+ test="$(echo $test | sed -e 's:^subversion/tests/libsvn_[^/]*/\(.*\):\1:' -e 's/-/_/g')"
|
|
||||||
+ eval "$test=\$test_dependencies"
|
|
||||||
+ # Set variables containing paths of tests
|
|
||||||
+ eval "${test}_path=\$test_path"
|
|
||||||
+ # Set variable 'tests' containing names of variables corresponding to tests
|
|
||||||
+ tests="$tests $test"
|
|
||||||
+done
|
|
||||||
+
|
|
||||||
+# auth-test dynamically loads libsvn_auth_gnome_keyring and libsvn_auth_kwallet libraries
|
|
||||||
+auth_test="auth_gnome_keyring auth_kwallet $auth_test"
|
|
||||||
+
|
|
||||||
+# Usage: sed_append LINE_NUMBER TEXT FILE
|
|
||||||
+sed_append()
|
|
||||||
+{
|
|
||||||
+ sed -e "$1a\\
|
|
||||||
+$2" "$3" > "$3.new"
|
|
||||||
+ mv -f "$3.new" "$3"
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+current_directory="$(pwd)"
|
|
||||||
+for libtool_script in $executables $tests; do
|
|
||||||
+ eval "libtool_script_path=\$${libtool_script}_path"
|
|
||||||
+ if [ -f "$libtool_script_path" ]; then
|
|
||||||
+ if { grep LD_LIBRARY_PATH "$libtool_script_path" && ! grep LD_PRELOAD "$libtool_script_path"; } > /dev/null; then
|
|
||||||
+ echo "Transforming $libtool_script_path"
|
|
||||||
+ libtool_script_dependencies="$(eval echo "\$$libtool_script")"
|
|
||||||
+ for libtool_script_dependency in $libtool_script_dependencies; do
|
|
||||||
+ libtool_script_library="$current_directory/subversion/libsvn_$libtool_script_dependency/.libs/libsvn_$libtool_script_dependency-1.so"
|
|
||||||
+ [ -f "$libtool_script_library" ] && libtool_script_libraries="$libtool_script_libraries $libtool_script_library"
|
|
||||||
+ done
|
|
||||||
+ libtool_script_libraries="${libtool_script_libraries# *}"
|
|
||||||
+ # Append definitions of LD_PRELOAD to libtool scripts
|
|
||||||
+ sed_append 4 "LD_PRELOAD=\"$libtool_script_libraries\"" "$libtool_script_path"
|
|
||||||
+ sed_append 5 "export LD_PRELOAD" "$libtool_script_path"
|
|
||||||
+ chmod +x "$libtool_script_path"
|
|
||||||
+ fi
|
|
||||||
+ fi
|
|
||||||
+done
|
|
@ -1,298 +0,0 @@
|
|||||||
https://svn.collab.net/viewvc/svn?view=revision&revision=38004
|
|
||||||
https://svn.collab.net/viewvc/svn?view=revision&revision=38014
|
|
||||||
https://svn.collab.net/viewvc/svn?view=revision&revision=38028
|
|
||||||
https://svn.collab.net/viewvc/svn?view=revision&revision=38122
|
|
||||||
|
|
||||||
--- subversion/libsvn_auth_kwallet/kwallet.cpp
|
|
||||||
+++ subversion/libsvn_auth_kwallet/kwallet.cpp
|
|
||||||
@@ -22,6 +22,7 @@
|
|
||||||
|
|
||||||
/*** Includes. ***/
|
|
||||||
|
|
||||||
+#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
@@ -30,6 +31,9 @@
|
|
||||||
#include "svn_auth.h"
|
|
||||||
#include "svn_config.h"
|
|
||||||
#include "svn_error.h"
|
|
||||||
+#include "svn_io.h"
|
|
||||||
+#include "svn_pools.h"
|
|
||||||
+#include "svn_string.h"
|
|
||||||
#include "svn_version.h"
|
|
||||||
|
|
||||||
#include "private/svn_auth_private.h"
|
|
||||||
@@ -38,13 +42,20 @@
|
|
||||||
|
|
||||||
#include <dbus/dbus.h>
|
|
||||||
#include <QtCore/QCoreApplication>
|
|
||||||
+#include <QtCore/QList>
|
|
||||||
+#include <QtCore/QMap>
|
|
||||||
#include <QtCore/QString>
|
|
||||||
+#include <QtGui/QApplication>
|
|
||||||
+#include <QtGui/QX11Info>
|
|
||||||
|
|
||||||
#include <kaboutdata.h>
|
|
||||||
#include <kcmdlineargs.h>
|
|
||||||
#include <kcomponentdata.h>
|
|
||||||
#include <klocalizedstring.h>
|
|
||||||
#include <kwallet.h>
|
|
||||||
+#include <kwindowsystem.h>
|
|
||||||
+#include <netwm.h>
|
|
||||||
+#include <netwm_def.h>
|
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------*/
|
|
||||||
@@ -52,6 +63,28 @@
|
|
||||||
/*-----------------------------------------------------------------------*/
|
|
||||||
|
|
||||||
|
|
||||||
+#define INITIALIZE_APPLICATION \
|
|
||||||
+ if (apr_hash_get(parameters, \
|
|
||||||
+ "svn:auth:qapplication-safe", \
|
|
||||||
+ APR_HASH_KEY_STRING)) \
|
|
||||||
+ { \
|
|
||||||
+ QApplication *app; \
|
|
||||||
+ if (! qApp) \
|
|
||||||
+ { \
|
|
||||||
+ int argc = 1; \
|
|
||||||
+ app = new QApplication(argc, (char *[1]) {(char *) "svn"}); \
|
|
||||||
+ } \
|
|
||||||
+ } \
|
|
||||||
+ else \
|
|
||||||
+ { \
|
|
||||||
+ QCoreApplication *app; \
|
|
||||||
+ if (! qApp) \
|
|
||||||
+ { \
|
|
||||||
+ int argc = 1; \
|
|
||||||
+ app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"}); \
|
|
||||||
+ } \
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
static const char *
|
|
||||||
get_application_name(apr_hash_t *parameters,
|
|
||||||
apr_pool_t *pool)
|
|
||||||
@@ -69,8 +102,7 @@
|
|
||||||
const char *svn_application_name;
|
|
||||||
if (svn_application_name_with_pid)
|
|
||||||
{
|
|
||||||
- long pid = getpid();
|
|
||||||
- svn_application_name = apr_psprintf(pool, "Subversion [%ld]", pid);
|
|
||||||
+ svn_application_name = apr_psprintf(pool, "Subversion [%ld]", long(getpid()));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
@@ -102,9 +134,108 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+static pid_t
|
|
||||||
+get_parent_pid(pid_t pid,
|
|
||||||
+ apr_pool_t *pool)
|
|
||||||
+{
|
|
||||||
+ pid_t parent_pid = 0;
|
|
||||||
+
|
|
||||||
+#ifdef __linux__
|
|
||||||
+ svn_stream_t *stat_file_stream;
|
|
||||||
+ svn_string_t *stat_file_string;
|
|
||||||
+ const char *preceeding_space, *following_space, *parent_pid_string;
|
|
||||||
+
|
|
||||||
+ const char *path = apr_psprintf(pool, "/proc/%ld/stat", long(pid));
|
|
||||||
+ svn_error_t *err = svn_stream_open_readonly(&stat_file_stream, path, pool, pool);
|
|
||||||
+ if (err == SVN_NO_ERROR)
|
|
||||||
+ {
|
|
||||||
+ err = svn_string_from_stream(&stat_file_string, stat_file_stream, pool, pool);
|
|
||||||
+ if (err == SVN_NO_ERROR)
|
|
||||||
+ {
|
|
||||||
+ if ((preceeding_space = strchr(stat_file_string->data, ' ')))
|
|
||||||
+ {
|
|
||||||
+ if ((preceeding_space = strchr(preceeding_space + 1, ' ')))
|
|
||||||
+ {
|
|
||||||
+ if ((preceeding_space = strchr(preceeding_space + 1, ' ')))
|
|
||||||
+ {
|
|
||||||
+ if ((following_space = strchr(preceeding_space + 1, ' ')))
|
|
||||||
+ {
|
|
||||||
+ parent_pid_string = apr_pstrndup(pool,
|
|
||||||
+ preceeding_space + 1,
|
|
||||||
+ following_space - preceeding_space);
|
|
||||||
+ parent_pid = atol(parent_pid_string);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (err)
|
|
||||||
+ {
|
|
||||||
+ svn_error_clear(err);
|
|
||||||
+ }
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+ return parent_pid;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static WId
|
|
||||||
+get_wid(apr_hash_t *parameters,
|
|
||||||
+ apr_pool_t *pool)
|
|
||||||
+{
|
|
||||||
+ WId wid = 1;
|
|
||||||
+
|
|
||||||
+ if (apr_hash_get(parameters,
|
|
||||||
+ "svn:auth:qapplication-safe",
|
|
||||||
+ APR_HASH_KEY_STRING))
|
|
||||||
+ {
|
|
||||||
+ QMap<pid_t, WId> process_info_list;
|
|
||||||
+ QList<WId> windows(KWindowSystem::windows());
|
|
||||||
+ QList<WId>::const_iterator i;
|
|
||||||
+ for (i = windows.begin(); i != windows.end(); i++)
|
|
||||||
+ {
|
|
||||||
+ process_info_list[NETWinInfo(QX11Info::display(),
|
|
||||||
+ *i,
|
|
||||||
+ QX11Info::appRootWindow(),
|
|
||||||
+ NET::WMPid).pid()] = *i;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ apr_pool_t *iterpool = svn_pool_create(pool);
|
|
||||||
+ pid_t pid = getpid();
|
|
||||||
+ while (pid != 0)
|
|
||||||
+ {
|
|
||||||
+ svn_pool_clear(iterpool);
|
|
||||||
+ if (process_info_list.contains(pid))
|
|
||||||
+ {
|
|
||||||
+ wid = process_info_list[pid];
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ pid = get_parent_pid(pid, iterpool);
|
|
||||||
+ }
|
|
||||||
+ svn_pool_destroy(iterpool);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (wid == 1)
|
|
||||||
+ {
|
|
||||||
+ const char *wid_env_string = getenv("WINDOWID");
|
|
||||||
+ if (wid_env_string)
|
|
||||||
+ {
|
|
||||||
+ long wid_env = atol(wid_env_string);
|
|
||||||
+ if (wid_env != 0)
|
|
||||||
+ {
|
|
||||||
+ wid = wid_env;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return wid;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static KWallet::Wallet *
|
|
||||||
get_wallet(QString wallet_name,
|
|
||||||
- apr_hash_t *parameters)
|
|
||||||
+ apr_hash_t *parameters,
|
|
||||||
+ apr_pool_t *pool)
|
|
||||||
{
|
|
||||||
KWallet::Wallet *wallet =
|
|
||||||
static_cast<KWallet::Wallet *> (apr_hash_get(parameters,
|
|
||||||
@@ -115,7 +246,7 @@
|
|
||||||
APR_HASH_KEY_STRING))
|
|
||||||
{
|
|
||||||
wallet = KWallet::Wallet::openWallet(wallet_name,
|
|
||||||
- -1,
|
|
||||||
+ pool ? get_wid(parameters, pool) : 1,
|
|
||||||
KWallet::Wallet::Synchronous);
|
|
||||||
}
|
|
||||||
if (wallet)
|
|
||||||
@@ -141,7 +272,7 @@
|
|
||||||
apr_hash_t *parameters = static_cast<apr_hash_t *> (data);
|
|
||||||
if (apr_hash_get(parameters, "kwallet-initialized", APR_HASH_KEY_STRING))
|
|
||||||
{
|
|
||||||
- KWallet::Wallet *wallet = get_wallet(NULL, parameters);
|
|
||||||
+ KWallet::Wallet *wallet = get_wallet(NULL, parameters, NULL);
|
|
||||||
delete wallet;
|
|
||||||
apr_hash_set(parameters,
|
|
||||||
"kwallet-initialized",
|
|
||||||
@@ -172,12 +303,7 @@
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- QCoreApplication *app;
|
|
||||||
- if (! qApp)
|
|
||||||
- {
|
|
||||||
- int argc = 1;
|
|
||||||
- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"});
|
|
||||||
- }
|
|
||||||
+ INITIALIZE_APPLICATION
|
|
||||||
|
|
||||||
KCmdLineArgs::init(1,
|
|
||||||
(char *[1]) {(char *) "svn"},
|
|
||||||
@@ -195,7 +321,7 @@
|
|
||||||
QString::fromUtf8(username) + "@" + QString::fromUtf8(realmstring);
|
|
||||||
if (! KWallet::Wallet::keyDoesNotExist(wallet_name, folder, key))
|
|
||||||
{
|
|
||||||
- KWallet::Wallet *wallet = get_wallet(wallet_name, parameters);
|
|
||||||
+ KWallet::Wallet *wallet = get_wallet(wallet_name, parameters, pool);
|
|
||||||
if (wallet)
|
|
||||||
{
|
|
||||||
apr_hash_set(parameters,
|
|
||||||
@@ -242,12 +368,7 @@
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
- QCoreApplication *app;
|
|
||||||
- if (! qApp)
|
|
||||||
- {
|
|
||||||
- int argc = 1;
|
|
||||||
- app = new QCoreApplication(argc, (char *[1]) {(char *) "svn"});
|
|
||||||
- }
|
|
||||||
+ INITIALIZE_APPLICATION
|
|
||||||
|
|
||||||
KCmdLineArgs::init(1,
|
|
||||||
(char *[1]) {(char *) "svn"},
|
|
||||||
@@ -262,7 +383,7 @@
|
|
||||||
QString q_password = QString::fromUtf8(password);
|
|
||||||
QString wallet_name = get_wallet_name(parameters);
|
|
||||||
QString folder = QString::fromUtf8("Subversion");
|
|
||||||
- KWallet::Wallet *wallet = get_wallet(wallet_name, parameters);
|
|
||||||
+ KWallet::Wallet *wallet = get_wallet(wallet_name, parameters, pool);
|
|
||||||
if (wallet)
|
|
||||||
{
|
|
||||||
apr_hash_set(parameters,
|
|
||||||
--- subversion/svn/main.c
|
|
||||||
+++ subversion/svn/main.c
|
|
||||||
@@ -2067,6 +2067,9 @@
|
|
||||||
pool)))
|
|
||||||
svn_handle_error2(err, stderr, TRUE, "svn: ");
|
|
||||||
|
|
||||||
+ /* svn can safely create instance of QApplication class. */
|
|
||||||
+ svn_auth_set_parameter(ab, "svn:auth:qapplication-safe", "1");
|
|
||||||
+
|
|
||||||
ctx->auth_baton = ab;
|
|
||||||
|
|
||||||
/* Set up conflict resolution callback. */
|
|
||||||
--- subversion/svnsync/main.c
|
|
||||||
+++ subversion/svnsync/main.c
|
|
||||||
@@ -1,6 +1,6 @@
|
|
||||||
/*
|
|
||||||
* ====================================================================
|
|
||||||
- * Copyright (c) 2005-2008 CollabNet. All rights reserved.
|
|
||||||
+ * Copyright (c) 2005-2009 CollabNet. All rights reserved.
|
|
||||||
*
|
|
||||||
* This software is licensed as described in the file COPYING, which
|
|
||||||
* you should have received as part of this distribution. The terms
|
|
||||||
@@ -2362,7 +2362,15 @@
|
|
||||||
check_cancel, NULL,
|
|
||||||
pool);
|
|
||||||
if (! err)
|
|
||||||
- err = (*subcommand->cmd_func)(os, &opt_baton, pool);
|
|
||||||
+ {
|
|
||||||
+ /* svnsync can safely create instance of QApplication class. */
|
|
||||||
+ svn_auth_set_parameter(opt_baton.source_auth_baton,
|
|
||||||
+ "svn:auth:qapplication-safe", "1");
|
|
||||||
+ svn_auth_set_parameter(opt_baton.sync_auth_baton,
|
|
||||||
+ "svn:auth:qapplication-safe", "1");
|
|
||||||
+
|
|
||||||
+ err = (*subcommand->cmd_func)(os, &opt_baton, pool);
|
|
||||||
+ }
|
|
||||||
if (err)
|
|
||||||
{
|
|
||||||
/* For argument-related problems, suggest using the 'help'
|
|
@ -1,10 +0,0 @@
|
|||||||
# The commented variables in this file are the defaults that are used
|
|
||||||
# in the init-script. You don't need to uncomment them except to
|
|
||||||
# customize them to different values.
|
|
||||||
|
|
||||||
# Options for svnserve
|
|
||||||
#SVNSERVE_OPTS="--root=/var/svn"
|
|
||||||
|
|
||||||
# User and group as which to run svnserve
|
|
||||||
#SVNSERVE_USER="apache"
|
|
||||||
#SVNSERVE_GROUP="apache"
|
|
@ -1,10 +0,0 @@
|
|||||||
# The commented variables in this file are the defaults that are used
|
|
||||||
# in the init-script. You don't need to uncomment them except to
|
|
||||||
# customize them to different values.
|
|
||||||
|
|
||||||
# Options for svnserve
|
|
||||||
#SVNSERVE_OPTS="--root=/var/svn"
|
|
||||||
|
|
||||||
# User and group as which to run svnserve
|
|
||||||
SVNSERVE_USER="svn"
|
|
||||||
SVNSERVE_GROUP="svnusers"
|
|
@ -1,26 +0,0 @@
|
|||||||
#!/sbin/runscript
|
|
||||||
# Copyright 2004 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/files/svnserve.initd,v 1.2 2005/08/25 13:59:48 pauldv Exp $
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need net
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
ebegin "Starting svnserve"
|
|
||||||
# Ensure that we run from a readable working dir, and that we do not
|
|
||||||
# lock filesystems when being run from such a location.
|
|
||||||
cd /
|
|
||||||
start-stop-daemon --start --quiet --background --make-pidfile \
|
|
||||||
--pidfile /var/run/svnserve.pid --exec /usr/bin/svnserve \
|
|
||||||
--chuid ${SVNSERVE_USER:-apache}:${SVNSERVE_GROUP:-apache} -- \
|
|
||||||
--foreground --daemon ${SVNSERVE_OPTS:---root=/var/svn}
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping svnserve"
|
|
||||||
start-stop-daemon --stop --quiet --pidfile /var/run/svnserve.pid
|
|
||||||
eend $?
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
service svn
|
|
||||||
{
|
|
||||||
socket_type = stream
|
|
||||||
wait = no
|
|
||||||
user = apache
|
|
||||||
group = apache
|
|
||||||
umask = 002
|
|
||||||
protocol = tcp
|
|
||||||
log_on_failure += USERID HOST
|
|
||||||
port = 3690
|
|
||||||
server = /usr/bin/svnserve
|
|
||||||
server_args = -i
|
|
||||||
disable = yes
|
|
||||||
}
|
|
@ -1,414 +0,0 @@
|
|||||||
;;;; vc-svn.el --- a VC backend for Subversion
|
|
||||||
;;;; Jim Blandy <jimb@red-bean.com> --- July 2002
|
|
||||||
|
|
||||||
;;; Writing this back end has shown up some problems in VC: bugs,
|
|
||||||
;;; shortcomings in the back end interface, and so on. But I want to
|
|
||||||
;;; first produce code that Subversion users can use with an already
|
|
||||||
;;; released Emacs distribution.
|
|
||||||
;;;
|
|
||||||
;;; So for now we're working within the limitations of the released
|
|
||||||
;;; VC; once we've got something functional, then we can start writing
|
|
||||||
;;; VC patches.
|
|
||||||
|
|
||||||
|
|
||||||
;;; To make this file load on demand, put this file into a directory
|
|
||||||
;;; in `load-path', and add this line to a startup file:
|
|
||||||
;;;
|
|
||||||
;;; (add-to-list 'vc-handled-backends 'SVN)
|
|
||||||
|
|
||||||
|
|
||||||
;;; To do here:
|
|
||||||
;;; Provide more of the optional VC backend functions:
|
|
||||||
;;; - dir-state
|
|
||||||
;;; - merge across arbitrary revisions
|
|
||||||
;;;
|
|
||||||
;;; Maybe we want more info in mode-line-string. Status of props? Status
|
|
||||||
;;; compared to what's in the repository (svn st -u) ?
|
|
||||||
;;;
|
|
||||||
;;; VC passes the vc-svn-register function a COMMENT argument, which
|
|
||||||
;;; is like the file description in CVS and RCS. Could we store the
|
|
||||||
;;; COMMENT as a Subversion property? Would that show up in fancy DAV
|
|
||||||
;;; web folder displays, or would it just languish in obscurity, the
|
|
||||||
;;; way CVS and RCS descriptions do?
|
|
||||||
;;;
|
|
||||||
;;; After manual merging, need some way to run `svn resolved'. Perhaps
|
|
||||||
;;; we should just prompt for approval when somebody tries to commit a
|
|
||||||
;;; conflicted file?
|
|
||||||
;;;
|
|
||||||
;;; vc-svn ought to handle more gracefully an attempted commit that
|
|
||||||
;;; fails with "Transaction is out of date". Probably the best
|
|
||||||
;;; approach is to ask "file is not up-to-date; do you want to merge
|
|
||||||
;;; now?" I think vc-cvs does this.
|
|
||||||
;;;
|
|
||||||
;;; Perhaps show the "conflicted" marker in the modeline?
|
|
||||||
;;;
|
|
||||||
;;; If conflicted, before committing or merging, ask the user if they
|
|
||||||
;;; want to mark the file as resolved.
|
|
||||||
;;;
|
|
||||||
;;; Won't searching for strings in svn output cause trouble if the
|
|
||||||
;;; locale language is not English?
|
|
||||||
;;;
|
|
||||||
;;; After merging news, need to recheck our idea of which workfile
|
|
||||||
;;; version we have. Reverting the file does this but we need to
|
|
||||||
;;; force it. Note that this can be necessary even if the file has
|
|
||||||
;;; not changed.
|
|
||||||
;;;
|
|
||||||
;;; Does everything work properly if we're rolled back to an old
|
|
||||||
;;; revision?
|
|
||||||
;;;
|
|
||||||
;;; Perhaps need to implement vc-svn-latest-on-branch-p?
|
|
||||||
|
|
||||||
|
|
||||||
;;; To do in VC:
|
|
||||||
;;;
|
|
||||||
;;; Make sure vc's documentation for `workfile-unchanged-p' default
|
|
||||||
;;; function mentions that it must not run asynchronously, and the
|
|
||||||
;;; symptoms if it does.
|
|
||||||
;;;
|
|
||||||
;;; Fix logic for finding log entries.
|
|
||||||
;;;
|
|
||||||
;;; Allow historical diff to choose an appropriate default previous
|
|
||||||
;;; revision number. I think this entails moving vc-previous-revision
|
|
||||||
;;; et al into the back end.
|
|
||||||
;;;
|
|
||||||
;;; Should vc-BACKEND-checkout really have to set the workfile version
|
|
||||||
;;; itself?
|
|
||||||
;;;
|
|
||||||
;;; Fix smerge for svn conflict markers.
|
|
||||||
;;;
|
|
||||||
;;; We can have files which are not editable for reasons other than
|
|
||||||
;;; needing to be checked out. For example, they might be a read-only
|
|
||||||
;;; view of an old revision opened with [C-x v ~]. (See vc-merge)
|
|
||||||
;;;
|
|
||||||
;;; Would be nice if there was a way to mark a file as
|
|
||||||
;;; just-checked-out, aside from updating the checkout-time property
|
|
||||||
;;; which in theory is not to be changed by backends.
|
|
||||||
|
|
||||||
|
|
||||||
(add-to-list 'vc-handled-backends 'SVN)
|
|
||||||
|
|
||||||
(defcustom vc-svn-program-name "svn"
|
|
||||||
"*Name of Subversion client program, for use by Emacs's VC package."
|
|
||||||
:type 'string
|
|
||||||
:group 'vc
|
|
||||||
:version "21.2.90.2")
|
|
||||||
|
|
||||||
(defcustom vc-svn-diff-switches nil
|
|
||||||
"*A string or list of strings specifying extra switches for `svn diff' under VC."
|
|
||||||
:type '(repeat string)
|
|
||||||
:group 'vc
|
|
||||||
:version "21.2.90.2")
|
|
||||||
|
|
||||||
(defun vc-svn-registered (file)
|
|
||||||
"Return true if FILE is registered under Subversion."
|
|
||||||
;; First, a quick false positive test: is there a `.svn/entries' file?
|
|
||||||
(and (file-exists-p (expand-file-name ".svn/entries"
|
|
||||||
(file-name-directory file)))
|
|
||||||
(not (null (vc-svn-run-status file)))))
|
|
||||||
|
|
||||||
|
|
||||||
(put 'vc-svn-with-output-buffer 'lisp-indent-function 0)
|
|
||||||
(defmacro vc-svn-with-output-buffer (&rest body)
|
|
||||||
"Save excursion, switch to buffer ` *Subversion Output*', and erase it."
|
|
||||||
`(save-excursion
|
|
||||||
;; Let's not delete this buffer when we're done --- leave
|
|
||||||
;; it around for debugging.
|
|
||||||
(set-buffer (get-buffer-create " *Subversion Output*"))
|
|
||||||
(erase-buffer)
|
|
||||||
,@body))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-pop-up-error (&rest args)
|
|
||||||
"Pop up the Subversion output buffer, and raise an error with ARGS."
|
|
||||||
(pop-to-buffer " *Subversion Output*")
|
|
||||||
(goto-char (point-min))
|
|
||||||
(shrink-window-if-larger-than-buffer)
|
|
||||||
(apply 'error args))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-run-status (file &optional update)
|
|
||||||
"Run `svn status -v' on FILE, and return the result.
|
|
||||||
If optional arg UPDATE is true, pass the `-u' flag to check against
|
|
||||||
the repository, across the network.
|
|
||||||
See `vc-svn-parse-status' for a description of the result."
|
|
||||||
(vc-svn-with-output-buffer
|
|
||||||
|
|
||||||
;; We should call vc-do-command here, but Subversion exits with an
|
|
||||||
;; error status if FILE isn't under its control, and we want to
|
|
||||||
;; return that as nil, not display it to the user. We can tell
|
|
||||||
;; vc-do-command to
|
|
||||||
|
|
||||||
(let ((status (apply 'call-process vc-svn-program-name nil t nil
|
|
||||||
(append '("status" "-v")
|
|
||||||
(if update '("-u") '())
|
|
||||||
(list file)))))
|
|
||||||
(goto-char (point-min))
|
|
||||||
(if (not (equal 0 status)) ; not zerop; status can be a string
|
|
||||||
;; If you ask for the status of a file that isn't even in a
|
|
||||||
;; Subversion-controlled directory, then Subversion exits with
|
|
||||||
;; this error.
|
|
||||||
(if (or (looking-at "\\(.*\n\\)*.*is not a working copy")
|
|
||||||
(looking-at "\\(.*\n\\)*.*is not a versioned resource")
|
|
||||||
(looking-at "\\(.*\n\\)*.*: No such file or directory"))
|
|
||||||
nil
|
|
||||||
;; Other errors we should actually report to the user.
|
|
||||||
(vc-svn-pop-up-error
|
|
||||||
"Error running Subversion to check status of `%s'"
|
|
||||||
(file-name-nondirectory file)))
|
|
||||||
|
|
||||||
;; Otherwise, we've got valid status output in the buffer, so
|
|
||||||
;; just parse that.
|
|
||||||
(vc-svn-parse-status)))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-parse-status ()
|
|
||||||
"Parse the output from `svn status -v' at point.
|
|
||||||
We return nil for a file not under Subversion's control,
|
|
||||||
or (STATE LOCAL CHANGED) for files that are, where:
|
|
||||||
STATE is the file's VC state (see the documentation for `vc-state'),
|
|
||||||
LOCAL is the base revision in the working copy, and
|
|
||||||
CHANGED is the last revision in which it was changed.
|
|
||||||
Both LOCAL and CHANGED are strings, not numbers.
|
|
||||||
If we passed `svn status' the `-u' flag, then CHANGED could be a later
|
|
||||||
revision than LOCAL.
|
|
||||||
If the file is newly added, LOCAL is \"0\" and CHANGED is nil."
|
|
||||||
(let ((state (vc-svn-parse-state-only)))
|
|
||||||
(cond
|
|
||||||
((not state) nil)
|
|
||||||
;; A newly added file has no revision.
|
|
||||||
((looking-at "....\\s-+\\(\\*\\s-+\\)?[-0]\\s-+\\?")
|
|
||||||
(list state "0" nil))
|
|
||||||
((looking-at "....\\s-+\\(\\*\\s-+\\)?\\([0-9]+\\)\\s-+\\([0-9]+\\)")
|
|
||||||
(list state
|
|
||||||
(match-string 2)
|
|
||||||
(match-string 3)))
|
|
||||||
((looking-at "^I +") nil) ;; An ignored file
|
|
||||||
((looking-at " \\{40\\}") nil) ;; A file that is not in the wc nor svn?
|
|
||||||
(t (error "Couldn't parse output from `svn status -v'")))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-parse-state-only ()
|
|
||||||
"Parse the output from `svn status -v' at point, and return a state.
|
|
||||||
The documentation for the function `vc-state' describes the possible values."
|
|
||||||
(cond
|
|
||||||
;; Be careful --- some of the later clauses here could yield false
|
|
||||||
;; positives, if the clauses preceding them didn't screen those
|
|
||||||
;; out. Making a pattern more selective could break something.
|
|
||||||
|
|
||||||
;; nil The given file is not under version control,
|
|
||||||
;; or does not exist.
|
|
||||||
((looking-at "\\?\\|^$") nil)
|
|
||||||
|
|
||||||
;; 'needs-patch The file has not been edited by the
|
|
||||||
;; user, but there is a more recent version
|
|
||||||
;; on the current branch stored in the
|
|
||||||
;; master file.
|
|
||||||
((looking-at " ..\\s-+\\*") 'needs-patch)
|
|
||||||
|
|
||||||
;; 'up-to-date The working file is unmodified with
|
|
||||||
;; respect to the latest version on the
|
|
||||||
;; current branch, and not locked.
|
|
||||||
;;
|
|
||||||
;; This is also returned for files which do not
|
|
||||||
;; exist, as will be the case when finding a
|
|
||||||
;; new file in a svn-controlled directory. That
|
|
||||||
;; case is handled in vc-svn-parse-status.
|
|
||||||
((looking-at " ") 'up-to-date)
|
|
||||||
|
|
||||||
;; 'needs-merge The file has been edited by the user,
|
|
||||||
;; and there is also a more recent version
|
|
||||||
;; on the current branch stored in the
|
|
||||||
;; master file. This state can only occur
|
|
||||||
;; if locking is not used for the file.
|
|
||||||
((looking-at "\\S-+\\s-+\\*") 'needs-merge)
|
|
||||||
|
|
||||||
;; 'edited The working file has been edited by the
|
|
||||||
;; user. If locking is used for the file,
|
|
||||||
;; this state means that the current
|
|
||||||
;; version is locked by the calling user.
|
|
||||||
(t 'edited)))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Is it really safe not to check for updates? I haven't seen any
|
|
||||||
;;; cases where failing to check causes a problem that is not caught
|
|
||||||
;;; in some other way. However, there *are* cases where checking
|
|
||||||
;;; needlessly causes network delay, such as C-x v v. The common case
|
|
||||||
;;; is for the commit to be OK; we can handle errors if they occur. -- mbp
|
|
||||||
(defun vc-svn-state (file)
|
|
||||||
"Return the current version control state of FILE.
|
|
||||||
For a list of possible return values, see `vc-state'.
|
|
||||||
|
|
||||||
This function should do a full and reliable state computation; it is
|
|
||||||
usually called immediately after `C-x v v'. `vc-svn-state-heuristic'
|
|
||||||
provides a faster heuristic when visiting a file.
|
|
||||||
|
|
||||||
For svn this does *not* check for updates in the repository, because
|
|
||||||
that needlessly slows down vc when the repository is remote. Instead,
|
|
||||||
we rely on Subversion to trap situations such as needing a merge
|
|
||||||
before commit."
|
|
||||||
(car (vc-svn-run-status file)))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-state-heuristic (file)
|
|
||||||
"Estimate the version control state of FILE at visiting time.
|
|
||||||
For a list of possible values, see the doc string of `vc-state'.
|
|
||||||
This is supposed to be considerably faster than `vc-svn-state'. It
|
|
||||||
just runs `svn status -v', without the `-u' flag, so it's a strictly
|
|
||||||
local operation."
|
|
||||||
(car (vc-svn-run-status file)))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-workfile-version (file)
|
|
||||||
"Return the current workfile version of FILE."
|
|
||||||
(cadr (vc-svn-run-status file)))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-checkout-model (file)
|
|
||||||
'implicit)
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-register (file &optional rev comment)
|
|
||||||
"Register FILE with Subversion.
|
|
||||||
REV is an initial revision; Subversion ignores it.
|
|
||||||
COMMENT is an initial description of the file; currently this is ignored."
|
|
||||||
(vc-svn-with-output-buffer
|
|
||||||
(let ((status (call-process vc-svn-program-name nil t nil "add" file)))
|
|
||||||
(or (equal 0 status) ; not zerop; status can be a string
|
|
||||||
(vc-svn-pop-up-error "Error running Subversion to add `%s'"
|
|
||||||
(file-name-nondirectory file))))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-checkin (file rev comment)
|
|
||||||
(apply 'vc-do-command nil 0 vc-svn-program-name file
|
|
||||||
"commit" (if comment (list "-m" comment) '())))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-checkout (file &optional editable rev destfile)
|
|
||||||
"Check out revision REV of FILE into the working area.
|
|
||||||
The EDITABLE argument must be non-nil, since Subversion doesn't
|
|
||||||
support locking.
|
|
||||||
If REV is non-nil, that is the revision to check out (default is
|
|
||||||
current workfile version). If REV is the empty string, that means to
|
|
||||||
check out the head of the trunk. For Subversion, that's equivalent to
|
|
||||||
passing nil.
|
|
||||||
If optional arg DESTFILE is given, it is an alternate filename to
|
|
||||||
write the contents to; we raise an error."
|
|
||||||
(unless editable
|
|
||||||
(error "VC asked Subversion to check out a read-only copy of file"))
|
|
||||||
(when destfile
|
|
||||||
(error "VC asked Subversion to check out a file under another name"))
|
|
||||||
(when (equal rev "")
|
|
||||||
(setq rev nil))
|
|
||||||
(apply 'vc-do-command nil 0 vc-svn-program-name file
|
|
||||||
"update" (if rev (list "-r" rev) '()))
|
|
||||||
(vc-file-setprop file 'vc-workfile-version nil))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-revert (file &optional contents-done)
|
|
||||||
"Revert FILE back to the current workfile version.
|
|
||||||
If optional arg CONTENTS-DONE is non-nil, then the contents of FILE
|
|
||||||
have already been reverted from a version backup, and this function
|
|
||||||
only needs to update the status of FILE within the backend. This
|
|
||||||
function ignores the CONTENTS-DONE argument."
|
|
||||||
(vc-do-command nil 0 vc-svn-program-name file "revert"))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-merge-news (file)
|
|
||||||
"Merge recent changes into FILE.
|
|
||||||
|
|
||||||
This calls `svn update'. In the case of conflicts, Subversion puts
|
|
||||||
conflict markers into the file and leaves additional temporary files
|
|
||||||
containing the `ancestor', `mine', and `other' files.
|
|
||||||
|
|
||||||
You may need to run `svn resolved' by hand once these conflicts have
|
|
||||||
been resolved.
|
|
||||||
|
|
||||||
Returns a vc status, which is used to determine whether conflicts need
|
|
||||||
to be merged."
|
|
||||||
(prog1
|
|
||||||
(vc-do-command nil 0 vc-svn-program-name file "update")
|
|
||||||
|
|
||||||
;; This file may not have changed in the revisions which were
|
|
||||||
;; merged, which means that its mtime on disk will not have been
|
|
||||||
;; updated. However, the workfile version may still have been
|
|
||||||
;; updated, and we want that to be shown correctly in the
|
|
||||||
;; modeline.
|
|
||||||
|
|
||||||
;; vc-cvs does something like this
|
|
||||||
(vc-file-setprop file 'vc-checkout-time 0)
|
|
||||||
(vc-file-setprop file 'vc-workfile-version
|
|
||||||
(vc-svn-workfile-version file))))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-print-log (file)
|
|
||||||
"Insert the revision log of FILE into the *vc* buffer."
|
|
||||||
(vc-do-command nil 'async vc-svn-program-name file "log"))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-show-log-entry (version)
|
|
||||||
"Search the log entry for VERSION in the current buffer.
|
|
||||||
Make sure it is displayed in the buffer's window."
|
|
||||||
(when (re-search-forward (concat "^-+\n\\(rev\\) "
|
|
||||||
(regexp-quote version)
|
|
||||||
":[^|]+|[^|]+| [0-9]+ lines?"))
|
|
||||||
(goto-char (match-beginning 1))
|
|
||||||
(recenter 1)))
|
|
||||||
|
|
||||||
|
|
||||||
(defun vc-svn-diff (file &optional rev1 rev2)
|
|
||||||
"Insert the diff for FILE into the *vc-diff* buffer.
|
|
||||||
If REV1 and REV2 are non-nil, report differences from REV1 to REV2.
|
|
||||||
If REV1 is nil, use the current workfile version (as found in the
|
|
||||||
repository) as the older version; if REV2 is nil, use the current
|
|
||||||
workfile contents as the newer version.
|
|
||||||
This function returns a status of either 0 (no differences found), or
|
|
||||||
1 (either non-empty diff or the diff is run asynchronously)."
|
|
||||||
(let* ((diff-switches-list
|
|
||||||
;; In Emacs 21.3.50 or so, the `vc-diff-switches-list' macro
|
|
||||||
;; started requiring its symbol argument to be quoted.
|
|
||||||
(condition-case nil
|
|
||||||
(vc-diff-switches-list svn)
|
|
||||||
(void-variable (vc-diff-switches-list 'SVN))))
|
|
||||||
(status (vc-svn-run-status file))
|
|
||||||
(local (elt status 1))
|
|
||||||
(changed (elt status 2))
|
|
||||||
|
|
||||||
;; If rev1 is the default (the base revision) set it to nil.
|
|
||||||
;; This is nice because it lets us recognize when the diff
|
|
||||||
;; will run locally, and thus when we shouldn't bother to run
|
|
||||||
;; it asynchronously. But it's also necessary, since a diff
|
|
||||||
;; for vc-default-workfile-unchanged-p *must* run
|
|
||||||
;; synchronously, or else you'll end up with two diffs in the
|
|
||||||
;; *vc-diff* buffer. `vc-diff-workfile-unchanged-p' passes
|
|
||||||
;; the base revision explicitly, but this kludge lets us
|
|
||||||
;; recognize that we can run the diff synchronously anyway.
|
|
||||||
;; Fragile, no?
|
|
||||||
(rev1 (if (and rev1 (not (equal rev1 local))) rev1))
|
|
||||||
|
|
||||||
(rev-switches-list
|
|
||||||
(cond
|
|
||||||
;; Given base rev against given rev.
|
|
||||||
((and rev1 rev2) (list "-r" (format "%s:%s" rev1 rev2)))
|
|
||||||
;; Given base rev against working copy.
|
|
||||||
(rev1 (list "-r" rev1))
|
|
||||||
;; Working copy base against given rev.
|
|
||||||
(rev2 (list "-r" (format "%s:%s" local rev2)))
|
|
||||||
;; Working copy base against working copy.
|
|
||||||
(t '())))
|
|
||||||
|
|
||||||
;; Run diff asynchronously if we're going to have to go
|
|
||||||
;; across the network.
|
|
||||||
(async (or rev1 rev2)))
|
|
||||||
|
|
||||||
(let ((status (apply 'vc-do-command "*vc-diff*" (if async 'async 0)
|
|
||||||
vc-svn-program-name file
|
|
||||||
(append '("diff") rev-switches-list))))
|
|
||||||
(if (or async (> (buffer-size (get-buffer "*vc-diff*")) 0))
|
|
||||||
1 0))))
|
|
||||||
|
|
||||||
(defun vc-svn-find-version (file rev buffer)
|
|
||||||
(vc-do-command buffer 0 vc-svn-program-name file
|
|
||||||
"cat" "-r" rev))
|
|
||||||
|
|
||||||
(provide 'vc-svn)
|
|
@ -1,814 +0,0 @@
|
|||||||
# Copyright 1999-2010 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.6.9.ebuild,v 1.5 2010/03/04 15:28:56 jer Exp $
|
|
||||||
|
|
||||||
EAPI="2"
|
|
||||||
|
|
||||||
WANT_AUTOMAKE="none"
|
|
||||||
|
|
||||||
inherit autotools bash-completion db-use depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python
|
|
||||||
|
|
||||||
DESCRIPTION="Advanced version control system"
|
|
||||||
HOMEPAGE="http://subversion.tigris.org/"
|
|
||||||
SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="Subversion"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 ~arm hppa ~ia64 ~ppc ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd"
|
|
||||||
IUSE="apache2 berkdb ctypes-python debug doc +dso emacs extras gnome-keyring java kde nls perl python ruby sasl test vim-syntax +webdav-neon webdav-serf"
|
|
||||||
|
|
||||||
CDEPEND=">=dev-db/sqlite-3.4[threadsafe]
|
|
||||||
>=dev-libs/apr-1.3:1
|
|
||||||
>=dev-libs/apr-util-1.3:1
|
|
||||||
dev-libs/expat
|
|
||||||
sys-libs/zlib
|
|
||||||
berkdb? ( =sys-libs/db-4* )
|
|
||||||
emacs? ( virtual/emacs )
|
|
||||||
gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring )
|
|
||||||
kde? ( sys-apps/dbus x11-libs/qt-core x11-libs/qt-dbus x11-libs/qt-gui >=kde-base/kdelibs-4 )
|
|
||||||
ruby? ( >=dev-lang/ruby-1.8.2 )
|
|
||||||
sasl? ( dev-libs/cyrus-sasl )
|
|
||||||
dev-util/subversion
|
|
||||||
net-misc/neon
|
|
||||||
webdav-neon? ( >=net-libs/neon-0.28 )
|
|
||||||
webdav-serf? ( >=net-libs/serf-0.3.0 )"
|
|
||||||
RDEPEND="${CDEPEND}
|
|
||||||
apache2? ( www-servers/apache[apache2_modules_dav] )
|
|
||||||
java? ( >=virtual/jre-1.5 )
|
|
||||||
kde? ( kde-base/kwalletd )
|
|
||||||
nls? ( virtual/libintl )
|
|
||||||
perl? ( dev-perl/URI )"
|
|
||||||
APACHE_TEST_DEPEND="|| (
|
|
||||||
=www-servers/apache-2.4*[apache2_modules_auth_basic,apache2_modules_authn_core,apache2_modules_authn_file,apache2_modules_authz_core,apache2_modules_authz_user,apache2_modules_dav,apache2_modules_log_config,apache2_modules_unixd]
|
|
||||||
=www-servers/apache-2.2*[apache2_modules_auth_basic,apache2_modules_authn_file,apache2_modules_dav,apache2_modules_log_config]
|
|
||||||
)"
|
|
||||||
DEPEND="${CDEPEND}
|
|
||||||
>=sys-apps/sandbox-1.6
|
|
||||||
ctypes-python? ( dev-python/ctypesgen )
|
|
||||||
doc? ( app-doc/doxygen )
|
|
||||||
gnome-keyring? ( dev-util/pkgconfig )
|
|
||||||
java? ( >=virtual/jdk-1.5 )
|
|
||||||
kde? ( dev-util/pkgconfig )
|
|
||||||
nls? ( sys-devel/gettext )
|
|
||||||
test? (
|
|
||||||
webdav-neon? ( ${APACHE_TEST_DEPEND} )
|
|
||||||
webdav-serf? ( ${APACHE_TEST_DEPEND} )
|
|
||||||
)
|
|
||||||
webdav-neon? ( dev-util/pkgconfig )"
|
|
||||||
|
|
||||||
want_apache
|
|
||||||
|
|
||||||
S="${WORKDIR}/${P/_/-}"
|
|
||||||
|
|
||||||
# Allow for custom repository locations.
|
|
||||||
# This can't be in pkg_setup() because the variable needs to be available to pkg_config().
|
|
||||||
: ${SVN_REPOS_LOC:=/var/svn}
|
|
||||||
|
|
||||||
pkg_setup() {
|
|
||||||
if use kde && ! use nls; then
|
|
||||||
eerror "Support for KWallet (KDE) requires Native Language Support (NLS)."
|
|
||||||
die "Enable \"nls\" USE flag"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use berkdb; then
|
|
||||||
einfo
|
|
||||||
if [[ -z "${SVN_BDB_VERSION}" ]]; then
|
|
||||||
SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")"
|
|
||||||
einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB."
|
|
||||||
fi
|
|
||||||
einfo "Using: Berkeley DB ${SVN_BDB_VERSION}"
|
|
||||||
einfo
|
|
||||||
|
|
||||||
local apu_bdb_version="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libaprutil-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
|
|
||||||
if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then
|
|
||||||
eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying"
|
|
||||||
eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}."
|
|
||||||
eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"."
|
|
||||||
eerror "Aborting to avoid possible run-time crashes."
|
|
||||||
die "Berkeley DB version mismatch"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
depend.apache_pkg_setup
|
|
||||||
|
|
||||||
java-pkg-opt-2_pkg_setup
|
|
||||||
|
|
||||||
if ! use webdav-neon && ! use webdav-serf; then
|
|
||||||
ewarn
|
|
||||||
ewarn "WebDAV support is disabled. You need WebDAV to"
|
|
||||||
ewarn "access repositories through the HTTP protocol."
|
|
||||||
ewarn
|
|
||||||
ewarn "WebDAV support needs one of the following USE flags enabled:"
|
|
||||||
ewarn " webdav-neon webdav-serf"
|
|
||||||
ewarn
|
|
||||||
ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:"
|
|
||||||
ewarn " ${CATEGORY}/${PN} webdav-neon webdav-serf"
|
|
||||||
ewarn
|
|
||||||
ebeep
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use test; then
|
|
||||||
elog
|
|
||||||
elog "\e[1;31m************************************************************************************************\e[0m"
|
|
||||||
elog
|
|
||||||
elog "NOTES ABOUT TESTS"
|
|
||||||
elog
|
|
||||||
elog "You can set the following variables to enable testing of some features and configure testing:"
|
|
||||||
if use webdav-neon || use webdav-serf; then
|
|
||||||
elog " SVN_TEST_APACHE_PORT=integer - Set Apache port number (Default value: 62208)"
|
|
||||||
fi
|
|
||||||
elog " SVN_TEST_SVNSERVE_PORT=integer - Set svnserve port number (Default value: 62209)"
|
|
||||||
elog " SVN_TEST_FSFS_MEMCACHED=1 - Enable using of Memcached for FSFS repositories"
|
|
||||||
elog " SVN_TEST_FSFS_MEMCACHED_PORT=integer - Set Memcached port number (Default value: 62210)"
|
|
||||||
elog " SVN_TEST_FSFS_SHARDING=integer - Enable sharding of FSFS repositories and set default shard size for FSFS repositories"
|
|
||||||
elog " SVN_TEST_FSFS_PACKING=1 - Enable packing of FSFS repositories"
|
|
||||||
elog " (SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING)"
|
|
||||||
# if use sasl; then
|
|
||||||
# elog " SVN_TEST_SASL=1 - Enable SASL authentication"
|
|
||||||
# fi
|
|
||||||
if use ctypes-python || use java || use perl || use python || use ruby; then
|
|
||||||
elog " SVN_TEST_BINDINGS=1 - Enable testing of bindings"
|
|
||||||
fi
|
|
||||||
if use java || use perl || use python || use ruby; then
|
|
||||||
elog " (Testing of bindings requires ${CATEGORY}/${PF})"
|
|
||||||
fi
|
|
||||||
if use java; then
|
|
||||||
elog " (Testing of JavaHL library requires dev-java/junit:4)"
|
|
||||||
fi
|
|
||||||
elog
|
|
||||||
elog "\e[1;31m************************************************************************************************\e[0m"
|
|
||||||
elog
|
|
||||||
ebeep
|
|
||||||
epause 24
|
|
||||||
|
|
||||||
if ! use apache2 && { use webdav-neon || use webdav-serf; }; then
|
|
||||||
eerror "Testing of libsvn_ra_neon / libsvn_ra_serf requires support for Apache."
|
|
||||||
die "Enable \"apache2\" USE flag."
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "${SVN_TEST_APACHE_PORT}" ]] && ! ([[ "$((${SVN_TEST_APACHE_PORT}))" == "${SVN_TEST_APACHE_PORT}" ]]) &>/dev/null; then
|
|
||||||
die "Value of SVN_TEST_APACHE_PORT must be an integer"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "${SVN_TEST_SVNSERVE_PORT}" ]] && ! ([[ "$((${SVN_TEST_SVNSERVE_PORT}))" == "${SVN_TEST_SVNSERVE_PORT}" ]]) &>/dev/null; then
|
|
||||||
die "Value of SVN_TEST_SVNSERVE_PORT must be an integer"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]] && ! has_version net-misc/memcached; then
|
|
||||||
die "net-misc/memcached must be installed"
|
|
||||||
fi
|
|
||||||
if [[ -n "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]] && ! ([[ "$((${SVN_TEST_FSFS_MEMCACHED_PORT}))" == "${SVN_TEST_FSFS_MEMCACHED_PORT}" ]]) &>/dev/null; then
|
|
||||||
die "Value of SVN_TEST_FSFS_MEMCACHED_PORT must be an integer"
|
|
||||||
fi
|
|
||||||
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]] && ! ([[ "$((${SVN_TEST_FSFS_SHARDING}))" == "${SVN_TEST_FSFS_SHARDING}" ]]) &>/dev/null; then
|
|
||||||
die "Value of SVN_TEST_FSFS_SHARDING must be an integer"
|
|
||||||
fi
|
|
||||||
if [[ -n "${SVN_TEST_FSFS_PACKING}" && -z "${SVN_TEST_FSFS_SHARDING}" ]]; then
|
|
||||||
die "SVN_TEST_FSFS_PACKING requires SVN_TEST_FSFS_SHARDING"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then
|
|
||||||
if { use java || use perl || use python || use ruby; } && ! has_version "=${CATEGORY}/${PF}"; then
|
|
||||||
die "${CATEGORY}/${PF} must be installed"
|
|
||||||
fi
|
|
||||||
if use java && ! has_version dev-java/junit:4; then
|
|
||||||
die "dev-java/junit:4 must be installed"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use debug; then
|
|
||||||
append-cppflags -DSVN_DEBUG -DAP_DEBUG
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
epatch "${FILESDIR}/${PN}-1.6.0-disable_linking_against_unneeded_libraries.patch"
|
|
||||||
epatch "${FILESDIR}/${PN}-1.6.2-local_library_preloading.patch"
|
|
||||||
epatch "${FILESDIR}/${PN}-1.6.3-kwallet_window.patch"
|
|
||||||
chmod +x build/transform_libtool_scripts.sh || die "chmod failed"
|
|
||||||
|
|
||||||
if ! use test; then
|
|
||||||
sed -i \
|
|
||||||
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
|
|
||||||
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
|
|
||||||
fi
|
|
||||||
|
|
||||||
eautoconf
|
|
||||||
elibtoolize
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local myconf
|
|
||||||
|
|
||||||
if use python || use perl || use ruby; then
|
|
||||||
myconf+=" --with-swig"
|
|
||||||
else
|
|
||||||
myconf+=" --without-swig"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
if use test && [[ -n "${SVN_TEST_BINDINGS}" ]]; then
|
|
||||||
myconf+=" --with-junit=/usr/share/junit-4/lib/junit.jar"
|
|
||||||
else
|
|
||||||
myconf+=" --without-junit"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
econf --libdir="/usr/$(get_libdir)" \
|
|
||||||
$(use_with apache2 apxs "${APXS}") \
|
|
||||||
$(use_with berkdb berkeley-db "db.h:/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \
|
|
||||||
$(use_with ctypes-python ctypesgen /usr) \
|
|
||||||
$(use_enable dso runtime-module-search) \
|
|
||||||
$(use_with gnome-keyring) \
|
|
||||||
$(use_enable java javahl) \
|
|
||||||
$(use_with java jdk "${JAVA_HOME}") \
|
|
||||||
$(use_with kde kwallet) \
|
|
||||||
$(use_enable nls) \
|
|
||||||
$(use_with sasl) \
|
|
||||||
$(use_with webdav-neon neon) \
|
|
||||||
$(use_with webdav-serf serf /usr) \
|
|
||||||
${myconf} \
|
|
||||||
--with-apr=/usr/bin/apr-1-config \
|
|
||||||
--with-apr-util=/usr/bin/apu-1-config \
|
|
||||||
--disable-experimental-libtool \
|
|
||||||
--without-jikes \
|
|
||||||
--enable-local-library-preloading \
|
|
||||||
--disable-mod-activation \
|
|
||||||
--disable-neon-version-check \
|
|
||||||
--with-sqlite=/usr
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
einfo
|
|
||||||
einfo "Building of core of Subversion"
|
|
||||||
einfo
|
|
||||||
emake local-all || die "Building of core of Subversion failed"
|
|
||||||
|
|
||||||
if use ctypes-python; then
|
|
||||||
einfo
|
|
||||||
einfo "Building of Subversion Ctypes Python bindings"
|
|
||||||
einfo
|
|
||||||
emake ctypes-python || die "Building of Subversion Ctypes Python bindings failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
einfo
|
|
||||||
einfo "Building of Subversion SWIG Python bindings"
|
|
||||||
einfo
|
|
||||||
emake swig_pydir="$(python_get_sitedir)/libsvn" swig_pydir_extra="$(python_get_sitedir)/svn" swig-py \
|
|
||||||
|| die "Building of Subversion SWIG Python bindings failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use perl; then
|
|
||||||
einfo
|
|
||||||
einfo "Building of Subversion SWIG Perl bindings"
|
|
||||||
einfo
|
|
||||||
emake -j1 swig-pl || die "Building of Subversion SWIG Perl bindings failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use ruby; then
|
|
||||||
einfo
|
|
||||||
einfo "Building of Subversion SWIG Ruby bindings"
|
|
||||||
einfo
|
|
||||||
emake swig-rb || die "Building of Subversion SWIG Ruby bindings failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
einfo
|
|
||||||
einfo "Building of Subversion JavaHL library"
|
|
||||||
einfo
|
|
||||||
emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \
|
|
||||||
|| die "Building of Subversion JavaHL library failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use emacs; then
|
|
||||||
einfo
|
|
||||||
einfo "Compilation of Emacs modules"
|
|
||||||
einfo
|
|
||||||
elisp-compile contrib/client-side/emacs/{dsvn,psvn,vc-svn}.el doc/svn-doc.el doc/tools/svnbook.el || die "Compilation of Emacs modules failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use extras; then
|
|
||||||
einfo
|
|
||||||
einfo "Building of contrib and tools"
|
|
||||||
einfo
|
|
||||||
emake contrib || die "Building of contrib failed"
|
|
||||||
emake tools || die "Building of tools failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use doc; then
|
|
||||||
einfo
|
|
||||||
einfo "Building of Subversion HTML documentation"
|
|
||||||
einfo
|
|
||||||
doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed"
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
einfo
|
|
||||||
einfo "Building of Subversion JavaHL library HTML documentation"
|
|
||||||
einfo
|
|
||||||
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
create_apache_tests_configuration() {
|
|
||||||
get_loadmodule_directive() {
|
|
||||||
if [[ "$("${APACHE_BIN}" -l)" != *"mod_$1.c"* ]]; then
|
|
||||||
echo "LoadModule $1_module \"${APACHE_MODULESDIR}/mod_$1.so\""
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
get_loadmodule_directives() {
|
|
||||||
if has_version "=www-servers/apache-2.4*"; then
|
|
||||||
get_loadmodule_directive auth_basic
|
|
||||||
get_loadmodule_directive authn_core
|
|
||||||
get_loadmodule_directive authn_file
|
|
||||||
get_loadmodule_directive authz_core
|
|
||||||
get_loadmodule_directive authz_user
|
|
||||||
get_loadmodule_directive dav
|
|
||||||
get_loadmodule_directive log_config
|
|
||||||
get_loadmodule_directive unixd
|
|
||||||
else
|
|
||||||
get_loadmodule_directive auth_basic
|
|
||||||
get_loadmodule_directive authn_file
|
|
||||||
get_loadmodule_directive dav
|
|
||||||
get_loadmodule_directive log_config
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
mkdir -p "${T}/apache"
|
|
||||||
cat << EOF > "${T}/apache/apache.conf"
|
|
||||||
$(get_loadmodule_directives)
|
|
||||||
LoadModule dav_svn_module "${S}/subversion/mod_dav_svn/.libs/mod_dav_svn.so"
|
|
||||||
LoadModule authz_svn_module "${S}/subversion/mod_authz_svn/.libs/mod_authz_svn.so"
|
|
||||||
|
|
||||||
User $(id -un)
|
|
||||||
Group $(id -gn)
|
|
||||||
Listen localhost:${SVN_TEST_APACHE_PORT}
|
|
||||||
ServerName localhost
|
|
||||||
ServerRoot "${T}"
|
|
||||||
DocumentRoot "${T}"
|
|
||||||
CoreDumpDirectory "${T}"
|
|
||||||
PidFile "${T}/apache.pid"
|
|
||||||
CustomLog "${T}/apache/access_log" "%h %l %u %{%Y-%m-%dT%H:%M:%S}t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
|
|
||||||
CustomLog "${T}/apache/svn_log" "%{%Y-%m-%dT%H:%M:%S}t %u %{SVN-REPOS-NAME}e %{SVN-ACTION}e" env=SVN-ACTION
|
|
||||||
ErrorLog "${T}/apache/error_log"
|
|
||||||
LogLevel Debug
|
|
||||||
MaxRequestsPerChild 0
|
|
||||||
|
|
||||||
<Directory />
|
|
||||||
AllowOverride None
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Location /svn-test-work/repositories>
|
|
||||||
DAV svn
|
|
||||||
SVNParentPath "${S}/subversion/tests/cmdline/svn-test-work/repositories"
|
|
||||||
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz"
|
|
||||||
AuthType Basic
|
|
||||||
AuthName "Subversion Repository"
|
|
||||||
AuthUserFile "${T}/apache/users"
|
|
||||||
Require valid-user
|
|
||||||
</Location>
|
|
||||||
|
|
||||||
<Location /svn-test-work/local_tmp/repos>
|
|
||||||
DAV svn
|
|
||||||
SVNPath "${S}/subversion/tests/cmdline/svn-test-work/local_tmp/repos"
|
|
||||||
AuthzSVNAccessFile "${S}/subversion/tests/cmdline/svn-test-work/authz"
|
|
||||||
AuthType Basic
|
|
||||||
AuthName "Subversion Repository"
|
|
||||||
AuthUserFile "${T}/apache/users"
|
|
||||||
Require valid-user
|
|
||||||
</Location>
|
|
||||||
EOF
|
|
||||||
|
|
||||||
cat << EOF > "${T}/apache/users"
|
|
||||||
jrandom:xCGl35kV9oWCY
|
|
||||||
jconstant:xCGl35kV9oWCY
|
|
||||||
EOF
|
|
||||||
}
|
|
||||||
|
|
||||||
set_tests_variables() {
|
|
||||||
if [[ "$1" == "local" ]]; then
|
|
||||||
base_url="file://${S}/subversion/tests/cmdline"
|
|
||||||
http_library=""
|
|
||||||
fi
|
|
||||||
if [[ "$1" == "svn" ]]; then
|
|
||||||
base_url="svn://127.0.0.1:${SVN_TEST_SVNSERVE_PORT}"
|
|
||||||
http_library=""
|
|
||||||
fi
|
|
||||||
if [[ "$1" == "neon" || "$1" == "serf" ]]; then
|
|
||||||
base_url="http://127.0.0.1:${SVN_TEST_APACHE_PORT}"
|
|
||||||
http_library="$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_test() {
|
|
||||||
if ! use test; then
|
|
||||||
die "Invalid configuration"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local fs_type fs_types ra_type ra_types options failed_tests
|
|
||||||
|
|
||||||
fs_types="fsfs"
|
|
||||||
use berkdb && fs_types+=" bdb"
|
|
||||||
|
|
||||||
ra_types="local svn"
|
|
||||||
use webdav-neon && ra_types+=" neon"
|
|
||||||
use webdav-serf && ra_types+=" serf"
|
|
||||||
|
|
||||||
local pid_file
|
|
||||||
for pid_file in svnserve.pid apache.pid memcached.pid; do
|
|
||||||
rm -f "${T}/${pid_file}"
|
|
||||||
done
|
|
||||||
|
|
||||||
termination() {
|
|
||||||
local die="$1" pid_file
|
|
||||||
if [[ -n "${die}" ]]; then
|
|
||||||
echo -e "\n\e[1;31mKilling of child processes...\e[0m\a" > /dev/tty
|
|
||||||
fi
|
|
||||||
for pid_file in svnserve.pid apache.pid memcached.pid; do
|
|
||||||
if [[ -f "${T}/${pid_file}" ]]; then
|
|
||||||
kill "$(<"${T}/${pid_file}")"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [[ -n "${die}" ]]; then
|
|
||||||
sleep 6
|
|
||||||
die "Termination"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
trap 'termination 1 &' SIGINT SIGTERM
|
|
||||||
|
|
||||||
SVN_TEST_SVNSERVE_PORT="${SVN_TEST_SVNSERVE_PORT:-62209}"
|
|
||||||
LC_ALL="C" subversion/svnserve/svnserve -dr "subversion/tests/cmdline" --listen-port "${SVN_TEST_SVNSERVE_PORT}" --log-file "${T}/svnserve.log" --pid-file "${T}/svnserve.pid"
|
|
||||||
if use webdav-neon || use webdav-serf; then
|
|
||||||
SVN_TEST_APACHE_PORT="${SVN_TEST_APACHE_PORT:-62208}"
|
|
||||||
create_apache_tests_configuration
|
|
||||||
"${APACHE_BIN}" -f "${T}/apache/apache.conf"
|
|
||||||
fi
|
|
||||||
if [[ -n "${SVN_TEST_FSFS_MEMCACHED}" ]]; then
|
|
||||||
SVN_TEST_FSFS_MEMCACHED_PORT="${SVN_TEST_FSFS_MEMCACHED_PORT:-62210}"
|
|
||||||
sed -e "/\[memcached-servers\]/akey = 127.0.0.1:${SVN_TEST_FSFS_MEMCACHED_PORT}" -i subversion/tests/tests.conf
|
|
||||||
memcached -dp "${SVN_TEST_FSFS_MEMCACHED_PORT}" -P "${T}/memcached.pid"
|
|
||||||
fi
|
|
||||||
if [[ -n "${SVN_TEST_FSFS_SHARDING}" ]]; then
|
|
||||||
options+=" FSFS_SHARDING=${SVN_TEST_FSFS_SHARDING}"
|
|
||||||
fi
|
|
||||||
if [[ -n "${SVN_TEST_FSFS_PACKING}" ]]; then
|
|
||||||
options+=" FSFS_PACKING=1"
|
|
||||||
fi
|
|
||||||
# if [[ -n "${SVN_TEST_SASL}" ]]; then
|
|
||||||
# options+=" ENABLE_SASL=1"
|
|
||||||
# fi
|
|
||||||
|
|
||||||
sleep 6
|
|
||||||
|
|
||||||
for ra_type in ${ra_types}; do
|
|
||||||
for fs_type in ${fs_types}; do
|
|
||||||
[[ "${ra_type}" == "local" && "${fs_type}" == "bdb" ]] && continue
|
|
||||||
einfo
|
|
||||||
einfo "\e[1;34mTesting of ra_${ra_type} + $(echo ${fs_type} | tr '[:lower:]' '[:upper:]')\e[0m"
|
|
||||||
einfo
|
|
||||||
set_tests_variables ${ra_type}
|
|
||||||
time emake check FS_TYPE="${fs_type}" BASE_URL="${base_url}" HTTP_LIBRARY="${http_library}" CLEANUP="1" ${options} || failed_tests="1"
|
|
||||||
mv tests.log "${T}/tests-ra_${ra_type}-${fs_type}.log"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
unset base_url http_library
|
|
||||||
termination
|
|
||||||
trap - SIGINT SIGTERM
|
|
||||||
|
|
||||||
if [[ -n "${SVN_TEST_BINDINGS}" ]]; then
|
|
||||||
local swig_lingua swig_linguas
|
|
||||||
local -A linguas
|
|
||||||
if use ctypes-python; then
|
|
||||||
einfo
|
|
||||||
einfo "\e[1;34mTesting of Subversion Ctypes Python bindings\e[0m"
|
|
||||||
einfo
|
|
||||||
time emake check-ctypes-python || failed_tests="1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
use perl && swig_linguas+=" pl"
|
|
||||||
use python && swig_linguas+=" py"
|
|
||||||
use ruby && swig_linguas+=" rb"
|
|
||||||
|
|
||||||
linguas[pl]="Perl"
|
|
||||||
linguas[py]="Python"
|
|
||||||
linguas[rb]="Ruby"
|
|
||||||
|
|
||||||
for swig_lingua in ${swig_linguas}; do
|
|
||||||
einfo
|
|
||||||
einfo "\e[1;34mTesting of Subversion SWIG ${linguas[${swig_lingua}]} bindings\e[0m"
|
|
||||||
einfo
|
|
||||||
time emake check-swig-${swig_lingua} || failed_tests="1"
|
|
||||||
done
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
einfo
|
|
||||||
einfo "\e[1;34mTesting of Subversion JavaHL library\e[0m"
|
|
||||||
einfo
|
|
||||||
time emake check-javahl || failed_tests="1"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n "${failed_tests}" ]]; then
|
|
||||||
ewarn
|
|
||||||
ewarn "\e[1;31mSome tests failed\e[0m"
|
|
||||||
ewarn
|
|
||||||
ebeep 12
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
einfo
|
|
||||||
einfo "Installation of core of Subversion"
|
|
||||||
einfo
|
|
||||||
emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed"
|
|
||||||
|
|
||||||
if use ctypes-python; then
|
|
||||||
einfo
|
|
||||||
einfo "Installation of Subversion Ctypes Python bindings"
|
|
||||||
einfo
|
|
||||||
emake DESTDIR="${D}" install-ctypes-python || die "Installation of Subversion Ctypes Python bindings failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use python; then
|
|
||||||
einfo
|
|
||||||
einfo "Installation of Subversion SWIG Python bindings"
|
|
||||||
einfo
|
|
||||||
emake -j1 DESTDIR="${D}" swig_pydir="$(python_get_sitedir)/libsvn" swig_pydir_extra="$(python_get_sitedir)/svn" install-swig-py \
|
|
||||||
|| die "Installation of Subversion SWIG Python bindings failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use perl; then
|
|
||||||
einfo
|
|
||||||
einfo "Installation of Subversion SWIG Perl bindings"
|
|
||||||
einfo
|
|
||||||
emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion SWIG Perl bindings failed"
|
|
||||||
fixlocalpod
|
|
||||||
find "${D}" "(" -name .packlist -o -name "*.bs" ")" -print0 | xargs -0 rm -fr
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use ruby; then
|
|
||||||
einfo
|
|
||||||
einfo "Installation of Subversion SWIG Ruby bindings"
|
|
||||||
einfo
|
|
||||||
emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion SWIG Ruby bindings failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
einfo
|
|
||||||
einfo "Installation of Subversion JavaHL library"
|
|
||||||
einfo
|
|
||||||
emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed"
|
|
||||||
java-pkg_regso "${D}"usr/$(get_libdir)/libsvnjavahl*.so
|
|
||||||
java-pkg_dojar "${D}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar
|
|
||||||
rm -fr "${D}"usr/$(get_libdir)/svn-javahl/*.jar
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install Apache module configuration.
|
|
||||||
if use apache2; then
|
|
||||||
dodir "${APACHE_MODULES_CONFDIR}"
|
|
||||||
cat << EOF > "${D}${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf
|
|
||||||
<IfDefine SVN>
|
|
||||||
LoadModule dav_svn_module modules/mod_dav_svn.so
|
|
||||||
<IfDefine SVN_AUTHZ>
|
|
||||||
LoadModule authz_svn_module modules/mod_authz_svn.so
|
|
||||||
</IfDefine>
|
|
||||||
|
|
||||||
# Example configuration:
|
|
||||||
#<Location /svn/repos>
|
|
||||||
# DAV svn
|
|
||||||
# SVNPath ${SVN_REPOS_LOC}/repos
|
|
||||||
# AuthType Basic
|
|
||||||
# AuthName "Subversion repository"
|
|
||||||
# AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers
|
|
||||||
# Require valid-user
|
|
||||||
#</Location>
|
|
||||||
</IfDefine>
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Install Bash Completion, bug 43179.
|
|
||||||
dobashcompletion tools/client-side/bash_completion subversion
|
|
||||||
rm -f tools/client-side/bash_completion
|
|
||||||
|
|
||||||
# Install hot backup script, bug 54304.
|
|
||||||
newbin tools/backup/hot-backup.py svn-hot-backup
|
|
||||||
rm -fr tools/backup
|
|
||||||
|
|
||||||
# Install svn_load_dirs.pl.
|
|
||||||
if use perl; then
|
|
||||||
dobin contrib/client-side/svn_load_dirs/svn_load_dirs.pl
|
|
||||||
fi
|
|
||||||
rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl
|
|
||||||
|
|
||||||
# Install svnserve init-script and xinet.d snippet, bug 43245.
|
|
||||||
newinitd "${FILESDIR}"/svnserve.initd svnserve
|
|
||||||
if use apache2; then
|
|
||||||
newconfd "${FILESDIR}"/svnserve.confd svnserve
|
|
||||||
else
|
|
||||||
newconfd "${FILESDIR}"/svnserve.confd2 svnserve
|
|
||||||
fi
|
|
||||||
insinto /etc/xinetd.d
|
|
||||||
newins "${FILESDIR}"/svnserve.xinetd svnserve
|
|
||||||
|
|
||||||
# Install documentation.
|
|
||||||
dodoc CHANGES COMMITTERS README
|
|
||||||
dodoc tools/xslt/svnindex.{css,xsl}
|
|
||||||
rm -fr tools/xslt
|
|
||||||
|
|
||||||
# Install Vim syntax files.
|
|
||||||
if use vim-syntax; then
|
|
||||||
insinto /usr/share/vim/vimfiles/syntax
|
|
||||||
doins contrib/client-side/vim/svn.vim
|
|
||||||
fi
|
|
||||||
rm -f contrib/client-side/vim/svn.vim
|
|
||||||
|
|
||||||
# Install Emacs Lisps.
|
|
||||||
if use emacs; then
|
|
||||||
elisp-install ${PN} contrib/client-side/emacs/{dsvn,psvn}.{el,elc} doc/svn-doc.{el,elc} doc/tools/svnbook.{el,elc} || die "Installation of Emacs modules failed"
|
|
||||||
elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} || die "Installation of Emacs modules failed"
|
|
||||||
touch "${D}${SITELISP}/${PN}/compat/.nosearch"
|
|
||||||
elisp-site-file-install "${FILESDIR}/70svn-gentoo.el" || die "Installation of Emacs site-init file failed"
|
|
||||||
fi
|
|
||||||
rm -fr contrib/client-side/emacs
|
|
||||||
|
|
||||||
# Install extra files.
|
|
||||||
if use extras; then
|
|
||||||
einfo
|
|
||||||
einfo "Installation of contrib and tools"
|
|
||||||
einfo
|
|
||||||
|
|
||||||
cat << EOF > 80subversion-extras
|
|
||||||
PATH="/usr/$(get_libdir)/subversion/bin"
|
|
||||||
ROOTPATH="/usr/$(get_libdir)/subversion/bin"
|
|
||||||
EOF
|
|
||||||
doenvd 80subversion-extras
|
|
||||||
|
|
||||||
emake DESTDIR="${D}" contribdir="/usr/$(get_libdir)/subversion/bin" install-contrib || die "Installation of contrib failed"
|
|
||||||
emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools || die "Installation of tools failed"
|
|
||||||
|
|
||||||
find contrib tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr
|
|
||||||
rm -fr contrib/client-side/svn-push
|
|
||||||
rm -fr contrib/server-side/svnstsw
|
|
||||||
rm -fr tools/client-side/svnmucc
|
|
||||||
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}*
|
|
||||||
rm -fr tools/{buildbot,dev,diff,po}
|
|
||||||
|
|
||||||
insinto /usr/share/${PN}
|
|
||||||
doins -r contrib tools
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use doc; then
|
|
||||||
einfo
|
|
||||||
einfo "Installation of Subversion HTML documentation"
|
|
||||||
einfo
|
|
||||||
dohtml -r doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed"
|
|
||||||
|
|
||||||
insinto /usr/share/doc/${PF}
|
|
||||||
doins -r notes
|
|
||||||
ecompressdir /usr/share/doc/${PF}/notes
|
|
||||||
|
|
||||||
# if use ruby; then
|
|
||||||
# emake DESTDIR="${D}" install-swig-rb-doc
|
|
||||||
# fi
|
|
||||||
|
|
||||||
if use java; then
|
|
||||||
java-pkg_dojavadoc doc/javadoc
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_preinst() {
|
|
||||||
# Compare versions of Berkeley DB, bug 122877.
|
|
||||||
if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]]; then
|
|
||||||
OLD_BDB_VERSION="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
|
|
||||||
NEW_BDB_VERSION="$(scanelf -nq "${D}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
|
|
||||||
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then
|
|
||||||
CHANGED_BDB_VERSION="1"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
use emacs && elisp-site-regen
|
|
||||||
use perl && perl-module_pkg_postinst
|
|
||||||
|
|
||||||
if use ctypes-python; then
|
|
||||||
python_mod_optimize "$(python_get_sitedir)/csvn"
|
|
||||||
fi
|
|
||||||
|
|
||||||
elog "Subversion Server Notes"
|
|
||||||
elog "-----------------------"
|
|
||||||
elog
|
|
||||||
elog "If you intend to run a server, a repository needs to be created using"
|
|
||||||
elog "svnadmin (see man svnadmin) or the following command to create it in"
|
|
||||||
elog "${SVN_REPOS_LOC}:"
|
|
||||||
elog
|
|
||||||
elog " emerge --config =${CATEGORY}/${PF}"
|
|
||||||
elog
|
|
||||||
elog "Subversion has multiple server types, take your pick:"
|
|
||||||
elog
|
|
||||||
elog " - svnserve daemon: "
|
|
||||||
elog " 1. Edit /etc/conf.d/svnserve"
|
|
||||||
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")"
|
|
||||||
elog " 3. Start daemon: /etc/init.d/svnserve start"
|
|
||||||
elog " 4. Make persistent: rc-update add svnserve default"
|
|
||||||
elog
|
|
||||||
elog " - svnserve via xinetd:"
|
|
||||||
elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)"
|
|
||||||
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")"
|
|
||||||
elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart"
|
|
||||||
elog
|
|
||||||
elog " - svn over ssh:"
|
|
||||||
elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")"
|
|
||||||
elog " Additionally run:"
|
|
||||||
elog " groupadd svnusers"
|
|
||||||
elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos"
|
|
||||||
elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you"
|
|
||||||
elog " want, for example:"
|
|
||||||
elog " #!/bin/bash"
|
|
||||||
elog " . /etc/conf.d/svnserve"
|
|
||||||
elog " umask 007"
|
|
||||||
elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\""
|
|
||||||
elog
|
|
||||||
|
|
||||||
if use apache2; then
|
|
||||||
elog " - http-based server:"
|
|
||||||
elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\""
|
|
||||||
elog " 2. Create an htpasswd file:"
|
|
||||||
elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME"
|
|
||||||
elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")"
|
|
||||||
elog " 4. Restart Apache: /etc/init.d/apache2 restart"
|
|
||||||
elog
|
|
||||||
fi
|
|
||||||
|
|
||||||
elog " Fixing the repository permissions:"
|
|
||||||
elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf"
|
|
||||||
elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos"
|
|
||||||
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db"
|
|
||||||
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks"
|
|
||||||
elog
|
|
||||||
|
|
||||||
elog "If you intend to use svn-hot-backup, you can specify the number of"
|
|
||||||
elog "backups to keep per repository by specifying an environment variable."
|
|
||||||
elog "If you want to keep e.g. 2 backups, do the following:"
|
|
||||||
elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion"
|
|
||||||
elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion"
|
|
||||||
elog
|
|
||||||
|
|
||||||
elog "Subversion contains support for the use of Memcached"
|
|
||||||
elog "to cache data of FSFS repositories."
|
|
||||||
elog "You should install \"net-misc/memcached\", start memcached"
|
|
||||||
elog "and configure your FSFS repositories, if you want to use this feature."
|
|
||||||
elog "See the documentation for details."
|
|
||||||
elog
|
|
||||||
epause 6
|
|
||||||
|
|
||||||
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then
|
|
||||||
ewarn "You upgraded from an older version of Berkeley DB and may experience"
|
|
||||||
ewarn "problems with your repository. Run the following commands as root to fix it:"
|
|
||||||
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos"
|
|
||||||
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postrm() {
|
|
||||||
use emacs && elisp-site-regen
|
|
||||||
use perl && perl-module_pkg_postrm
|
|
||||||
|
|
||||||
if use ctypes-python; then
|
|
||||||
python_mod_cleanup "$(python_get_sitedir)/csvn"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_config() {
|
|
||||||
einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..."
|
|
||||||
if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]]; then
|
|
||||||
echo "A Subversion repository already exists and I will not overwrite it."
|
|
||||||
echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version."
|
|
||||||
else
|
|
||||||
mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf"
|
|
||||||
|
|
||||||
einfo ">>> Populating repository directory ..."
|
|
||||||
# Create initial repository.
|
|
||||||
"${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos"
|
|
||||||
|
|
||||||
einfo ">>> Setting repository permissions ..."
|
|
||||||
SVNSERVE_USER="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")"
|
|
||||||
SVNSERVE_GROUP="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")"
|
|
||||||
if use apache2; then
|
|
||||||
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache"
|
|
||||||
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache"
|
|
||||||
else
|
|
||||||
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn"
|
|
||||||
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers"
|
|
||||||
enewgroup "${SVNSERVE_GROUP}"
|
|
||||||
enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}"
|
|
||||||
fi
|
|
||||||
chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos"
|
|
||||||
chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf"
|
|
||||||
chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos"
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
DIST libpng-1.2.49.tar.xz 538408 SHA256 6f5a313225ce8f0d36aceda25b837ad3cb97d0096a97fa23dbc6362f7781d014 SHA512 2035cfbb7c01300d105b6898f31643d77af2ee33226ddd07870761a9f8a388395829825ba97da3d152c118de4c4c7025dd98a24eb4ead3a90bd10b7159a8adee WHIRLPOOL 623e42525ab7d4eff855d609384fa9938cfa6d8eb3a92cc6e9bf79c79f698ad5cf5946760cc6843f43fde2461a631cf83e8a01fc7f35a123f3a3ab0cb17b80ad
|
|
@ -1,11 +0,0 @@
|
|||||||
--- Makefile.am
|
|
||||||
+++ Makefile.am
|
|
||||||
@@ -102,7 +102,7 @@
|
|
||||||
|
|
||||||
libpng.sym: png.h pngconf.h
|
|
||||||
rm -f $@ $@.new
|
|
||||||
- $(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h $(srcdir)/$@
|
|
||||||
+ $(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h > $(srcdir)/$@
|
|
||||||
cat $(srcdir)/$@ | \
|
|
||||||
$(SED) -n -e \
|
|
||||||
's|^.*PNG_FUNCTION_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
|
|
@ -1,33 +0,0 @@
|
|||||||
# Copyright 1999-2012 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/media-libs/libpng/libpng-1.2.47.ebuild,v 1.2 2012/02/20 11:56:37 ssuominen Exp $
|
|
||||||
|
|
||||||
# This ebuild uses compiles and installs everything from the package, rather
|
|
||||||
# than just libpng12.so.0 as upstream does. The additional installed files
|
|
||||||
# are needed by other packages. The x11-libs/cairo package is one example.
|
|
||||||
|
|
||||||
EAPI=4
|
|
||||||
|
|
||||||
inherit multilib libtool
|
|
||||||
|
|
||||||
DESCRIPTION="Portable Network Graphics library"
|
|
||||||
HOMEPAGE="http://www.libpng.org/"
|
|
||||||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.xz"
|
|
||||||
|
|
||||||
LICENSE="as-is"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="alpha amd64 arm hppa ia64 m68k mips s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
|
|
||||||
IUSE=""
|
|
||||||
|
|
||||||
RDEPEND="sys-libs/zlib
|
|
||||||
!=media-libs/libpng-1.2*:0"
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
app-arch/xz-utils"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
elibtoolize
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf --disable-static
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
DIST iptables-1.4.8.tar.bz2 474980 SHA256 342926b3f9635f89f479660835b0ba518ccd465552e41c29aa83c5af7d506496 SHA512 62f412030fa90df5fd3a679e3436711f43178ecbcacc23a255e58a603914af14ebc5cb08f1765092244e7e20cc8ba2722942c3d5d238babaa613b8d7e266c830 WHIRLPOOL fc0a273d9f57f5e32be18d552015759cb9c6d747bbf98b4a46cbf92097ac47fa032b33050cc9ae52186ff3e5f7870ea29975351ec4c94c8c425352f65780dfb7
|
|
@ -1,11 +0,0 @@
|
|||||||
# /etc/conf.d/ip6tables
|
|
||||||
|
|
||||||
# Location in which iptables initscript will save set rules on
|
|
||||||
# service shutdown
|
|
||||||
IP6TABLES_SAVE="/var/lib/ip6tables/rules-save"
|
|
||||||
|
|
||||||
# Options to pass to iptables-save and iptables-restore
|
|
||||||
SAVE_RESTORE_OPTIONS="-c"
|
|
||||||
|
|
||||||
# Save state on stopping iptables
|
|
||||||
SAVE_ON_STOP="yes"
|
|
@ -1,11 +0,0 @@
|
|||||||
# /etc/conf.d/iptables
|
|
||||||
|
|
||||||
# Location in which iptables initscript will save set rules on
|
|
||||||
# service shutdown
|
|
||||||
IPTABLES_SAVE="/var/lib/iptables/rules-save"
|
|
||||||
|
|
||||||
# Options to pass to iptables-save and iptables-restore
|
|
||||||
SAVE_RESTORE_OPTIONS="-c"
|
|
||||||
|
|
||||||
# Save state on stopping iptables
|
|
||||||
SAVE_ON_STOP="yes"
|
|
@ -1,114 +0,0 @@
|
|||||||
#!/sbin/runscript
|
|
||||||
# Copyright 1999-2007 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/files/iptables-1.3.2.init,v 1.6 2007/03/12 21:49:04 vapier Exp $
|
|
||||||
|
|
||||||
opts="save reload panic"
|
|
||||||
|
|
||||||
iptables_name=${SVCNAME}
|
|
||||||
if [ "${iptables_name}" != "iptables" -a "${iptables_name}" != "ip6tables" ] ; then
|
|
||||||
iptables_name="iptables"
|
|
||||||
fi
|
|
||||||
|
|
||||||
iptables_bin="/sbin/${iptables_name}"
|
|
||||||
case ${iptables_name} in
|
|
||||||
iptables) iptables_proc="/proc/net/ip_tables_names"
|
|
||||||
iptables_save=${IPTABLES_SAVE};;
|
|
||||||
ip6tables) iptables_proc="/proc/net/ip6_tables_names"
|
|
||||||
iptables_save=${IP6TABLES_SAVE};;
|
|
||||||
esac
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
before net
|
|
||||||
use logger
|
|
||||||
}
|
|
||||||
|
|
||||||
set_table_policy() {
|
|
||||||
local chains table=$1 policy=$2
|
|
||||||
case ${table} in
|
|
||||||
nat) chains="PREROUTING POSTROUTING OUTPUT";;
|
|
||||||
mangle) chains="PREROUTING INPUT FORWARD OUTPUT POSTROUTING";;
|
|
||||||
filter) chains="INPUT FORWARD OUTPUT";;
|
|
||||||
*) chains="";;
|
|
||||||
esac
|
|
||||||
local chain
|
|
||||||
for chain in ${chains} ; do
|
|
||||||
${iptables_bin} -t ${table} -P ${chain} ${policy}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
checkkernel() {
|
|
||||||
if [ ! -e ${iptables_proc} ] ; then
|
|
||||||
eerror "Your kernel lacks ${iptables_name} support, please load"
|
|
||||||
eerror "appropriate modules and try again."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
checkconfig() {
|
|
||||||
if [ ! -f ${iptables_save} ] ; then
|
|
||||||
eerror "Not starting ${iptables_name}. First create some rules then run:"
|
|
||||||
eerror "/etc/init.d/${iptables_name} save"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
checkconfig || return 1
|
|
||||||
ebegin "Loading ${iptables_name} state and starting firewall"
|
|
||||||
${iptables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${iptables_save}"
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
if [ "${SAVE_ON_STOP}" = "yes" ] ; then
|
|
||||||
save || return 1
|
|
||||||
fi
|
|
||||||
checkkernel || return 1
|
|
||||||
ebegin "Stopping firewall"
|
|
||||||
local a
|
|
||||||
for a in $(cat ${iptables_proc}) ; do
|
|
||||||
set_table_policy $a ACCEPT
|
|
||||||
|
|
||||||
${iptables_bin} -F -t $a
|
|
||||||
${iptables_bin} -X -t $a
|
|
||||||
done
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
reload() {
|
|
||||||
checkkernel || return 1
|
|
||||||
ebegin "Flushing firewall"
|
|
||||||
local a
|
|
||||||
for a in $(cat ${iptables_proc}) ; do
|
|
||||||
${iptables_bin} -F -t $a
|
|
||||||
${iptables_bin} -X -t $a
|
|
||||||
done
|
|
||||||
eend $?
|
|
||||||
|
|
||||||
start
|
|
||||||
}
|
|
||||||
|
|
||||||
save() {
|
|
||||||
ebegin "Saving ${iptables_name} state"
|
|
||||||
touch "${iptables_save}"
|
|
||||||
chmod 0600 "${iptables_save}"
|
|
||||||
${iptables_bin}-save ${SAVE_RESTORE_OPTIONS} > "${iptables_save}"
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
panic() {
|
|
||||||
checkkernel || return 1
|
|
||||||
service_started ${iptables_name} && svc_stop
|
|
||||||
|
|
||||||
local a
|
|
||||||
ebegin "Dropping all packets"
|
|
||||||
for a in $(cat ${iptables_proc}) ; do
|
|
||||||
${iptables_bin} -F -t $a
|
|
||||||
${iptables_bin} -X -t $a
|
|
||||||
|
|
||||||
set_table_policy $a DROP
|
|
||||||
done
|
|
||||||
eend $?
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
https://bugs.gentoo.org/show_bug.cgi?id=321271
|
|
||||||
http://marc.info/?l=netfilter&m=127468045031428&w=2
|
|
||||||
http://marc.info/?l=netfilter&m=127468044931416&w=2
|
|
||||||
|
|
||||||
--- a/utils/Makefile.am
|
|
||||||
+++ b/utils/Makefile.am
|
|
||||||
@@ -1,5 +1,7 @@
|
|
||||||
# -*- Makefile -*-
|
|
||||||
|
|
||||||
+AM_CFLAGS = ${regular_CFLAGS} -I${top_builddir}/include -I${top_srcdir}/include
|
|
||||||
+
|
|
||||||
sbin_PROGRAMS = nfnl_osf
|
|
||||||
pkgdata_DATA = pf.os
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
|||||||
# Copyright 1999-2010 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/net-firewall/iptables/iptables-1.4.8-r1.ebuild,v 1.2 2010/05/25 13:20:57 pva Exp $
|
|
||||||
|
|
||||||
EAPI="2"
|
|
||||||
inherit eutils toolchain-funcs autotools
|
|
||||||
|
|
||||||
DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools"
|
|
||||||
HOMEPAGE="http://www.iptables.org/"
|
|
||||||
SRC_URI="http://iptables.org/projects/iptables/files/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86"
|
|
||||||
IUSE="ipv6"
|
|
||||||
|
|
||||||
DEPEND="virtual/os-headers"
|
|
||||||
RDEPEND=""
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
# use the saner headers from the kernel
|
|
||||||
rm -f include/linux/{kernel,types}.h
|
|
||||||
|
|
||||||
epatch "${FILESDIR}/${P}-build.patch" #321271
|
|
||||||
epatch_user
|
|
||||||
eautoreconf
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf \
|
|
||||||
--sbindir=/sbin \
|
|
||||||
--libexecdir=/$(get_libdir) \
|
|
||||||
--enable-devel \
|
|
||||||
--enable-libipq \
|
|
||||||
--enable-shared \
|
|
||||||
--enable-static \
|
|
||||||
$(use_enable ipv6)
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake V=1 || die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake install DESTDIR="${D}" || die
|
|
||||||
dosbin iptables-apply || die
|
|
||||||
doman iptables-apply.8 || die
|
|
||||||
dodoc INCOMPATIBILITIES iptables.xslt || die
|
|
||||||
|
|
||||||
insinto /usr/include
|
|
||||||
doins include/iptables.h $(use ipv6 && echo include/ip6tables.h) || die
|
|
||||||
insinto /usr/include/iptables
|
|
||||||
doins include/iptables/internal.h || die
|
|
||||||
|
|
||||||
keepdir /var/lib/iptables
|
|
||||||
newinitd "${FILESDIR}"/${PN}-1.3.2.init iptables || die
|
|
||||||
newconfd "${FILESDIR}"/${PN}-1.3.2.confd iptables || die
|
|
||||||
if use ipv6 ; then
|
|
||||||
keepdir /var/lib/ip6tables
|
|
||||||
newinitd "${FILESDIR}"/iptables-1.3.2.init ip6tables || die
|
|
||||||
newconfd "${FILESDIR}"/ip6tables-1.3.2.confd ip6tables || die
|
|
||||||
fi
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
DIST neon-0.29.0.tar.gz 879186 SHA256 22878e0c6ce3f0092da3d97243b4d0b5756ee3fd4442e7c3f66161ba70e0a5a4 SHA512 ed5f9a8a1c633c79c0a98c1a77dd80bcac67db945d1e33b8a35b9efb9aa4f5237c6a9b072433c7e3ef6f30aa22f271f7e3b2ba97584d539966a1d1bb893b6593 WHIRLPOOL cd1392b9abdb68e07d514a615ff931620c30a2705f3512e173200b9c27cdec5492fba5a50b3b86848cf27b327498c8b3e4a0be0100095c52ef6099dd1076fdeb
|
|
@ -1,104 +0,0 @@
|
|||||||
# Copyright 1999-2009 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/neon/neon-0.29.0.ebuild,v 1.7 2009/11/30 10:08:11 maekke Exp $
|
|
||||||
|
|
||||||
EAPI="2"
|
|
||||||
|
|
||||||
inherit autotools libtool versionator
|
|
||||||
|
|
||||||
DESCRIPTION="HTTP and WebDAV client library"
|
|
||||||
HOMEPAGE="http://www.webdav.org/neon/"
|
|
||||||
SRC_URI="http://www.webdav.org/neon/${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="GPL-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd"
|
|
||||||
IUSE="doc expat gnutls kerberos libproxy nls pkcs11 ssl zlib"
|
|
||||||
IUSE_LINGUAS="cs de fr ja nn pl ru tr zh_CN"
|
|
||||||
for lingua in ${IUSE_LINGUAS}; do
|
|
||||||
IUSE+=" linguas_${lingua}"
|
|
||||||
done
|
|
||||||
unset lingua
|
|
||||||
RESTRICT="test"
|
|
||||||
|
|
||||||
RDEPEND="expat? ( dev-libs/expat )
|
|
||||||
!expat? ( dev-libs/libxml2 )
|
|
||||||
gnutls? (
|
|
||||||
>=net-libs/gnutls-2.0
|
|
||||||
pkcs11? ( dev-libs/pakchois )
|
|
||||||
)
|
|
||||||
!gnutls? ( ssl? (
|
|
||||||
>=dev-libs/openssl-0.9.6f
|
|
||||||
pkcs11? ( dev-libs/pakchois )
|
|
||||||
) )
|
|
||||||
kerberos? ( virtual/krb5 )
|
|
||||||
libproxy? ( net-libs/libproxy )
|
|
||||||
nls? ( virtual/libintl )
|
|
||||||
zlib? ( sys-libs/zlib )"
|
|
||||||
DEPEND="${RDEPEND}"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
local lingua linguas
|
|
||||||
for lingua in ${IUSE_LINGUAS}; do
|
|
||||||
use linguas_${lingua} && linguas+=" ${lingua}"
|
|
||||||
done
|
|
||||||
sed -i -e "s/ALL_LINGUAS=.*/ALL_LINGUAS=\"${linguas}\"/g" configure.in
|
|
||||||
|
|
||||||
AT_M4DIR="macros" eautoreconf
|
|
||||||
|
|
||||||
elibtoolize
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local myconf
|
|
||||||
|
|
||||||
if has_version sys-libs/glibc; then
|
|
||||||
einfo "Enabling SSL library thread-safety using POSIX threads..."
|
|
||||||
myconf+=" --enable-threadsafe-ssl=posix"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use expat; then
|
|
||||||
myconf+=" --with-expat"
|
|
||||||
else
|
|
||||||
myconf+=" --with-libxml2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use gnutls; then
|
|
||||||
myconf+=" --with-ssl=gnutls --with-ca-bundle=/etc/ssl/certs/ca-certificates.crt"
|
|
||||||
elif use ssl; then
|
|
||||||
myconf+=" --with-ssl=openssl"
|
|
||||||
fi
|
|
||||||
|
|
||||||
econf \
|
|
||||||
--enable-static \
|
|
||||||
--enable-shared \
|
|
||||||
$(use_with kerberos gssapi) \
|
|
||||||
$(use_with libproxy) \
|
|
||||||
$(use_enable nls) \
|
|
||||||
$(use_with pkcs11 pakchois) \
|
|
||||||
$(use_with zlib) \
|
|
||||||
${myconf}
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake DESTDIR="${D}" install-lib install-headers install-config install-nls || die "emake install failed"
|
|
||||||
|
|
||||||
if use doc; then
|
|
||||||
emake DESTDIR="${D}" install-docs || die "emake install-docs failed"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dodoc AUTHORS BUGS NEWS README THANKS TODO
|
|
||||||
doman doc/man/*.[1-8]
|
|
||||||
}
|
|
||||||
|
|
||||||
pkg_postinst() {
|
|
||||||
ewarn "Neon has a policy of breaking API across minor versions, this means"
|
|
||||||
ewarn "that any package that links against Neon may be broken after"
|
|
||||||
ewarn "updating. They will remain broken until they are ported to the"
|
|
||||||
ewarn "new API. You can downgrade Neon to the previous version by doing:"
|
|
||||||
ewarn
|
|
||||||
ewarn " emerge --oneshot '<net-misc/neon-$(get_version_component_range 1-2 ${PV})'"
|
|
||||||
ewarn
|
|
||||||
ewarn "You may also have to downgrade any package that has not been"
|
|
||||||
ewarn "ported to the new API yet."
|
|
||||||
}
|
|
@ -1 +0,0 @@
|
|||||||
DIST curl-7.23.1.tar.bz2 2376653 RMD160 96c45f38361d04a939e135c9e5fcf27ca1180abe SHA1 9bac69696446ead85e59d8488098ee84cf897b7e SHA256 7d8c8cef8f244118245c37853cb175bd95c156ff453730ec2c88189b05a7c06e
|
|
@ -1,118 +0,0 @@
|
|||||||
# Copyright 1999-2011 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/curl/curl-7.23.1.ebuild,v 1.1 2011/12/01 18:35:02 vapier Exp $
|
|
||||||
|
|
||||||
EAPI=4
|
|
||||||
|
|
||||||
inherit autotools eutils prefix
|
|
||||||
|
|
||||||
DESCRIPTION="A Client that groks URLs"
|
|
||||||
HOMEPAGE="http://curl.haxx.se/"
|
|
||||||
SRC_URI="http://curl.haxx.se/download/${P}.tar.bz2"
|
|
||||||
|
|
||||||
LICENSE="MIT"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="~alpha amd64 arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
|
|
||||||
IUSE="ares gnutls idn ipv6 kerberos ldap libssh2 nss ssl static-libs test threads"
|
|
||||||
|
|
||||||
RDEPEND="ldap? ( net-nds/openldap )
|
|
||||||
gnutls? ( net-libs/gnutls dev-libs/libgcrypt app-misc/ca-certificates )
|
|
||||||
ssl? ( !gnutls? ( dev-libs/openssl ) )
|
|
||||||
nss? ( !gnutls? ( !ssl? ( dev-libs/nss app-misc/ca-certificates ) ) )
|
|
||||||
idn? ( net-dns/libidn )
|
|
||||||
ares? ( >=net-dns/c-ares-1.6 )
|
|
||||||
kerberos? ( virtual/krb5 )
|
|
||||||
libssh2? ( >=net-libs/libssh2-0.16 )"
|
|
||||||
|
|
||||||
# rtmpdump ( media-video/rtmpdump ) / --with-librtmp
|
|
||||||
# fbopenssl (not in gentoo) --with-spnego
|
|
||||||
# krb4 http://web.mit.edu/kerberos/www/krb4-end-of-life.html
|
|
||||||
|
|
||||||
DEPEND="${RDEPEND}
|
|
||||||
test? (
|
|
||||||
sys-apps/diffutils
|
|
||||||
dev-lang/perl
|
|
||||||
)"
|
|
||||||
# used - but can do without in self test: net-misc/stunnel
|
|
||||||
|
|
||||||
# ares must be disabled for threads and both can be disabled
|
|
||||||
# one can use wether gnutls or nss if ssl is enabled
|
|
||||||
REQUIRED_USE="threads? ( !ares )
|
|
||||||
nss? ( !gnutls )"
|
|
||||||
|
|
||||||
src_prepare() {
|
|
||||||
epatch "${FILESDIR}"/${PN}-7.20.0-strip-ldflags.patch \
|
|
||||||
"${FILESDIR}"/${PN}-7.19.7-test241.patch \
|
|
||||||
"${FILESDIR}"/${PN}-7.18.2-prefix.patch \
|
|
||||||
"${FILESDIR}"/${PN}-respect-cflags-3.patch \
|
|
||||||
"${FILESDIR}"/0001-CURLOPT_DNS_SERVERS-set-name-servers-if-possible.patch \
|
|
||||||
"${FILESDIR}"/0001-CURLOPT_DNS_SERVERS-set-name-servers-if-possible-fix.patch \
|
|
||||||
"${FILESDIR}"/0001-Do-not-try-to-do-DNS-name-resolution-on-interface-na.patch \
|
|
||||||
"${FILESDIR}"/0001-multi-handle-timeouts-on-DNS-servers-by-checking-for.patch \
|
|
||||||
"${FILESDIR}"/0001-multi-interface-only-use-non-NULL-function-pointer.patch
|
|
||||||
sed -i '/LD_LIBRARY_PATH=/d' configure.ac || die #382241
|
|
||||||
|
|
||||||
eprefixify curl-config.in
|
|
||||||
eautoreconf
|
|
||||||
}
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
local myconf
|
|
||||||
|
|
||||||
if use gnutls; then
|
|
||||||
myconf+=" --without-ssl --with-gnutls --without-nss"
|
|
||||||
myconf+=" --with-ca-bundle=${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
|
|
||||||
elif use ssl; then
|
|
||||||
myconf+=" --without-gnutls --without-nss --with-ssl"
|
|
||||||
myconf+=" --without-ca-bundle --with-ca-path=${EPREFIX}/etc/ssl/certs"
|
|
||||||
elif use nss; then
|
|
||||||
myconf+=" --without-ssl --without-gnutls --with-nss"
|
|
||||||
myconf+=" --with-ca-bundle=${EPREFIX}/etc/ssl/certs/ca-certificates.crt"
|
|
||||||
else
|
|
||||||
myconf+=" --without-gnutls --without-nss --without-ssl"
|
|
||||||
fi
|
|
||||||
|
|
||||||
econf \
|
|
||||||
$(use_enable ldap) \
|
|
||||||
$(use_enable ldap ldaps) \
|
|
||||||
$(use_with idn libidn) \
|
|
||||||
$(use_with kerberos gssapi "${EPREFIX}"/usr) \
|
|
||||||
$(use_with libssh2) \
|
|
||||||
$(use_enable static-libs static) \
|
|
||||||
$(use_enable ipv6) \
|
|
||||||
$(use_enable threads threaded-resolver) \
|
|
||||||
$(use_enable ares) \
|
|
||||||
--enable-http \
|
|
||||||
--enable-ftp \
|
|
||||||
--enable-gopher \
|
|
||||||
--enable-file \
|
|
||||||
--enable-dict \
|
|
||||||
--enable-manual \
|
|
||||||
--enable-telnet \
|
|
||||||
--enable-smtp \
|
|
||||||
--enable-pop3 \
|
|
||||||
--enable-imap \
|
|
||||||
--enable-rtsp \
|
|
||||||
--enable-nonblocking \
|
|
||||||
--enable-largefile \
|
|
||||||
--enable-maintainer-mode \
|
|
||||||
--disable-sspi \
|
|
||||||
--without-krb4 \
|
|
||||||
--without-librtmp \
|
|
||||||
--without-spnego \
|
|
||||||
${myconf}
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
default
|
|
||||||
find "${ED}" -name '*.la' -delete
|
|
||||||
rm -rf "${ED}"/etc/
|
|
||||||
|
|
||||||
# https://sourceforge.net/tracker/index.php?func=detail&aid=1705197&group_id=976&atid=350976
|
|
||||||
insinto /usr/share/aclocal
|
|
||||||
doins docs/libcurl/libcurl.m4
|
|
||||||
|
|
||||||
dodoc CHANGES README
|
|
||||||
dodoc docs/FEATURES docs/INTERNALS
|
|
||||||
dodoc docs/MANUAL docs/FAQ docs/BUGS docs/CONTRIBUTE
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
From 740f7d8384049db24e3742f3cbe5f50d9cee0c7c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jason Glasgow <jglasgow@chromium.org>
|
|
||||||
Date: Wed, 30 Nov 2011 23:39:02 -0500
|
|
||||||
Subject: [PATCH] CURLOPT_DNS_SERVERS: set name servers if possible (fix)
|
|
||||||
|
|
||||||
Ensure that CURLE_OK is returned if setting the name servers is successfull.
|
|
||||||
---
|
|
||||||
lib/asyn-ares.c | 1 +
|
|
||||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
|
|
||||||
index 7c2c372..1a105c2 100644
|
|
||||||
--- a/lib/asyn-ares.c
|
|
||||||
+++ b/lib/asyn-ares.c
|
|
||||||
@@ -609,6 +609,7 @@ CURLcode Curl_set_dns_servers(struct SessionHandle *data,
|
|
||||||
int ares_result = ares_set_servers_csv(data->state.resolver, servers);
|
|
||||||
switch(ares_result) {
|
|
||||||
case ARES_SUCCESS:
|
|
||||||
+ result = CURLE_OK;
|
|
||||||
break;
|
|
||||||
case ARES_ENOMEM:
|
|
||||||
result = CURLE_OUT_OF_MEMORY;
|
|
||||||
--
|
|
||||||
1.7.3.1
|
|
||||||
|
|
@ -1,160 +0,0 @@
|
|||||||
From 8d0a504f0d34c2471393ef23fb2345c73c5d4746 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jason Glasgow <jglasgow@chromium.org>
|
|
||||||
Date: Tue, 12 Apr 2011 11:34:28 -0400
|
|
||||||
Subject: [PATCH] CURLOPT_DNS_SERVERS: set name servers if possible
|
|
||||||
|
|
||||||
---
|
|
||||||
docs/libcurl/curl_easy_setopt.3 | 14 ++++++++++++++
|
|
||||||
include/curl/curl.h | 3 +++
|
|
||||||
lib/asyn-ares.c | 26 ++++++++++++++++++++++++++
|
|
||||||
lib/asyn-thread.c | 9 +++++++++
|
|
||||||
lib/hostip.h | 5 +++++
|
|
||||||
lib/hostsyn.c | 11 +++++++++++
|
|
||||||
lib/url.c | 4 ++++
|
|
||||||
7 files changed, 72 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
|
|
||||||
index 31464bf..3b86476 100644
|
|
||||||
--- a/docs/libcurl/curl_easy_setopt.3
|
|
||||||
+++ b/docs/libcurl/curl_easy_setopt.3
|
|
||||||
@@ -2045,6 +2045,20 @@ resolves, by including a string in the linked list that uses the format
|
|
||||||
and port number must exactly match what was already added previously.
|
|
||||||
|
|
||||||
(Added in 7.21.3)
|
|
||||||
+.IP CURLOPT_DNS_SERVERS
|
|
||||||
+Set the list of DNS servers to be used instead of the system default.
|
|
||||||
+The format of the dns servers option is:
|
|
||||||
+
|
|
||||||
+host[:port][,host[:port]]...
|
|
||||||
+
|
|
||||||
+For example:
|
|
||||||
+
|
|
||||||
+192.168.1.100,192.168.1.101,3.4.5.6
|
|
||||||
+
|
|
||||||
+This option requires that libcurl was built with a resolver backend that
|
|
||||||
+supports this operation. The c-ares backend is the only such one.
|
|
||||||
+
|
|
||||||
+(Added in 7.24.0)
|
|
||||||
.SH SSL and SECURITY OPTIONS
|
|
||||||
.IP CURLOPT_SSLCERT
|
|
||||||
Pass a pointer to a zero terminated string as parameter. The string should be
|
|
||||||
diff --git a/include/curl/curl.h b/include/curl/curl.h
|
|
||||||
index f4aa17f..8f82348 100644
|
|
||||||
--- a/include/curl/curl.h
|
|
||||||
+++ b/include/curl/curl.h
|
|
||||||
@@ -1486,6 +1486,9 @@ typedef enum {
|
|
||||||
/* allow GSSAPI credential delegation */
|
|
||||||
CINIT(GSSAPI_DELEGATION, LONG, 210),
|
|
||||||
|
|
||||||
+ /* Set the name servers to use for DNS resolution */
|
|
||||||
+ CINIT(DNS_SERVERS, OBJECTPOINT, 211),
|
|
||||||
+
|
|
||||||
CURLOPT_LASTENTRY /* the last unused */
|
|
||||||
} CURLoption;
|
|
||||||
|
|
||||||
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
|
|
||||||
index 7f3bdf8..7c2c372 100644
|
|
||||||
--- a/lib/asyn-ares.c
|
|
||||||
+++ b/lib/asyn-ares.c
|
|
||||||
@@ -600,4 +600,30 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
|
|
||||||
}
|
|
||||||
return NULL; /* no struct yet */
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
|
|
||||||
+ char *servers)
|
|
||||||
+{
|
|
||||||
+ CURLcode result = CURLE_NOT_BUILT_IN;
|
|
||||||
+#if (ARES_VERSION >= 0x010704)
|
|
||||||
+ int ares_result = ares_set_servers_csv(data->state.resolver, servers);
|
|
||||||
+ switch(ares_result) {
|
|
||||||
+ case ARES_SUCCESS:
|
|
||||||
+ break;
|
|
||||||
+ case ARES_ENOMEM:
|
|
||||||
+ result = CURLE_OUT_OF_MEMORY;
|
|
||||||
+ break;
|
|
||||||
+ case ARES_ENOTINITIALIZED:
|
|
||||||
+ case ARES_ENODATA:
|
|
||||||
+ case ARES_EBADSTR:
|
|
||||||
+ default:
|
|
||||||
+ result = CURLE_BAD_FUNCTION_ARGUMENT;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+#else /* too old c-ares version! */
|
|
||||||
+ (void)data;
|
|
||||||
+ (void)servers;
|
|
||||||
+#endif
|
|
||||||
+ return result;
|
|
||||||
+}
|
|
||||||
#endif /* CURLRES_ARES */
|
|
||||||
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
|
|
||||||
index 38cde5d..cd035dc 100644
|
|
||||||
--- a/lib/asyn-thread.c
|
|
||||||
+++ b/lib/asyn-thread.c
|
|
||||||
@@ -696,4 +696,13 @@ Curl_addrinfo *Curl_resolver_getaddrinfo(struct connectdata *conn,
|
|
||||||
|
|
||||||
#endif /* !HAVE_GETADDRINFO */
|
|
||||||
|
|
||||||
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
|
|
||||||
+ char *servers)
|
|
||||||
+{
|
|
||||||
+ (void)data;
|
|
||||||
+ (void)servers;
|
|
||||||
+ return CURLE_NOT_BUILT_IN;
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
#endif /* CURLRES_THREADED */
|
|
||||||
diff --git a/lib/hostip.h b/lib/hostip.h
|
|
||||||
index 32a37b9..dbbb1f7 100644
|
|
||||||
--- a/lib/hostip.h
|
|
||||||
+++ b/lib/hostip.h
|
|
||||||
@@ -195,4 +195,9 @@ Curl_cache_addr(struct SessionHandle *data, Curl_addrinfo *addr,
|
|
||||||
extern sigjmp_buf curl_jmpenv;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * Function provided by the resolver backend to set DNS servers to use.
|
|
||||||
+ */
|
|
||||||
+CURLcode Curl_set_dns_servers(struct SessionHandle *data, char *servers);
|
|
||||||
+
|
|
||||||
#endif /* HEADER_CURL_HOSTIP_H */
|
|
||||||
diff --git a/lib/hostsyn.c b/lib/hostsyn.c
|
|
||||||
index b601887..d1a9079 100644
|
|
||||||
--- a/lib/hostsyn.c
|
|
||||||
+++ b/lib/hostsyn.c
|
|
||||||
@@ -66,5 +66,16 @@
|
|
||||||
**********************************************************************/
|
|
||||||
#ifdef CURLRES_SYNCH
|
|
||||||
|
|
||||||
+/*
|
|
||||||
+ * Function provided by the resolver backend to set DNS servers to use.
|
|
||||||
+ */
|
|
||||||
+CURLcode Curl_set_dns_servers(struct SessionHandle *data,
|
|
||||||
+ char *servers)
|
|
||||||
+{
|
|
||||||
+ (void)data;
|
|
||||||
+ (void)servers;
|
|
||||||
+ return CURLE_NOT_BUILT_IN;
|
|
||||||
+
|
|
||||||
+}
|
|
||||||
|
|
||||||
#endif /* truly sync */
|
|
||||||
diff --git a/lib/url.c b/lib/url.c
|
|
||||||
index 4bc82a6..f478e38 100644
|
|
||||||
--- a/lib/url.c
|
|
||||||
+++ b/lib/url.c
|
|
||||||
@@ -2531,6 +2531,10 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|
||||||
data->set.ssl.authtype = CURL_TLSAUTH_NONE;
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
+ case CURLOPT_DNS_SERVERS:
|
|
||||||
+ result = Curl_set_dns_servers(data, va_arg(param, char *));
|
|
||||||
+ break;
|
|
||||||
+
|
|
||||||
default:
|
|
||||||
/* unknown tag and its companion, just ignore: */
|
|
||||||
result = CURLE_UNKNOWN_OPTION;
|
|
||||||
--
|
|
||||||
1.7.3.1
|
|
||||||
|
|
@ -1,100 +0,0 @@
|
|||||||
From 1909c8096fc8ab5083e929e5b721d74d35bfe414 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jason Glasgow <jglasgow@chromium.org>
|
|
||||||
Date: Fri, 4 Nov 2011 16:48:05 -0400
|
|
||||||
Subject: [PATCH] Do not try to do DNS name resolution on interface names
|
|
||||||
|
|
||||||
Do not try to do DNS name resolution on interface names because it can
|
|
||||||
block and that is no desirable when using multi interfaces.
|
|
||||||
---
|
|
||||||
lib/connect.c | 5 ++++-
|
|
||||||
lib/if2ip.c | 31 +++++++++++++++++++++++++++++++
|
|
||||||
lib/if2ip.h | 1 +
|
|
||||||
3 files changed, 36 insertions(+), 1 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/connect.c b/lib/connect.c
|
|
||||||
index 56a57b1..4305864 100644
|
|
||||||
--- a/lib/connect.c
|
|
||||||
+++ b/lib/connect.c
|
|
||||||
@@ -265,7 +265,10 @@ static CURLcode bindlocal(struct connectdata *conn,
|
|
||||||
if(dev && (strlen(dev)<255) ) {
|
|
||||||
|
|
||||||
/* interface */
|
|
||||||
- if(Curl_if2ip(af, dev, myhost, sizeof(myhost))) {
|
|
||||||
+ if(Curl_if_is_interface_name(dev)) {
|
|
||||||
+ if(Curl_if2ip(af, dev, myhost, sizeof(myhost)) == NULL)
|
|
||||||
+ return CURLE_INTERFACE_FAILED;
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* We now have the numerical IP address in the 'myhost' buffer
|
|
||||||
*/
|
|
||||||
diff --git a/lib/if2ip.c b/lib/if2ip.c
|
|
||||||
index 4924f73..0ae375b 100644
|
|
||||||
--- a/lib/if2ip.c
|
|
||||||
+++ b/lib/if2ip.c
|
|
||||||
@@ -71,6 +71,24 @@
|
|
||||||
|
|
||||||
#if defined(HAVE_GETIFADDRS)
|
|
||||||
|
|
||||||
+bool Curl_if_is_interface_name(const char *interface)
|
|
||||||
+{
|
|
||||||
+ bool result = FALSE;
|
|
||||||
+
|
|
||||||
+ struct ifaddrs *iface, *head;
|
|
||||||
+
|
|
||||||
+ if(getifaddrs(&head) >= 0) {
|
|
||||||
+ for(iface=head; iface != NULL; iface=iface->ifa_next) {
|
|
||||||
+ if(curl_strequal(iface->ifa_name, interface)) {
|
|
||||||
+ result = TRUE;
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ freeifaddrs(head);
|
|
||||||
+ }
|
|
||||||
+ return result;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
|
|
||||||
{
|
|
||||||
struct ifaddrs *iface, *head;
|
|
||||||
@@ -109,6 +127,14 @@ char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
|
|
||||||
|
|
||||||
#elif defined(HAVE_IOCTL_SIOCGIFADDR)
|
|
||||||
|
|
||||||
+bool Curl_if_is_interface_name(const char *interface)
|
|
||||||
+{
|
|
||||||
+ /* This is here just to support the old interfaces */
|
|
||||||
+ char buf[256];
|
|
||||||
+
|
|
||||||
+ return (Curl_if2ip(AF_INET, interface, buf, sizeof(buf)) != NULL);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
|
|
||||||
{
|
|
||||||
struct ifreq req;
|
|
||||||
@@ -148,6 +174,11 @@ char *Curl_if2ip(int af, const char *interface, char *buf, int buf_size)
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
+bool Curl_if_is_interface_name(const char *interface)
|
|
||||||
+{
|
|
||||||
+ return FALSE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size)
|
|
||||||
{
|
|
||||||
(void) af;
|
|
||||||
diff --git a/lib/if2ip.h b/lib/if2ip.h
|
|
||||||
index cdf2638..678e3a5 100644
|
|
||||||
--- a/lib/if2ip.h
|
|
||||||
+++ b/lib/if2ip.h
|
|
||||||
@@ -23,6 +23,7 @@
|
|
||||||
***************************************************************************/
|
|
||||||
#include "setup.h"
|
|
||||||
|
|
||||||
+extern bool Curl_if_is_interface_name(const char *interface);
|
|
||||||
extern char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size);
|
|
||||||
|
|
||||||
#ifdef __INTERIX
|
|
||||||
--
|
|
||||||
1.7.3.1
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
|||||||
From 595f2e5385c3ca8d1216327eff8f0a635c198008 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jason Glasgow <jglasgow@chromium.org>
|
|
||||||
Date: Wed, 30 Nov 2011 15:23:44 -0500
|
|
||||||
Subject: [PATCH] multi: handle timeouts on DNS servers by checking for new sockets
|
|
||||||
|
|
||||||
If the first name server is not available, the multi interface does
|
|
||||||
not invoke the socket_cb when the DNS request to the first name server
|
|
||||||
timesout. Ensure that the list of sockets are always updated after
|
|
||||||
calling Curl_resolver_is_resolved.
|
|
||||||
|
|
||||||
This bug can be reproduced if Curl is complied with --enable_ares and
|
|
||||||
your code uses the multi socket interfaces and the
|
|
||||||
CURLMOPT_SOCKETFUNCTION option. To test try:
|
|
||||||
iptables -I INPUT \
|
|
||||||
-s $(sed -n -e '/name/{s/.* //p;q}' /etc/resolv.conf)/32 \
|
|
||||||
-j REJECT
|
|
||||||
and then run a program which uses the multi-interface.
|
|
||||||
---
|
|
||||||
lib/asyn-ares.c | 9 +++++----
|
|
||||||
lib/multi.c | 13 ++++++++-----
|
|
||||||
2 files changed, 13 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
|
|
||||||
index 7c2c372..0b45484 100644
|
|
||||||
--- a/lib/asyn-ares.c
|
|
||||||
+++ b/lib/asyn-ares.c
|
|
||||||
@@ -227,18 +227,19 @@ int Curl_resolver_getsock(struct connectdata *conn,
|
|
||||||
struct timeval maxtime;
|
|
||||||
struct timeval timebuf;
|
|
||||||
struct timeval *timeout;
|
|
||||||
+ long milli;
|
|
||||||
int max = ares_getsock((ares_channel)conn->data->state.resolver,
|
|
||||||
(ares_socket_t *)socks, numsocks);
|
|
||||||
|
|
||||||
-
|
|
||||||
maxtime.tv_sec = CURL_TIMEOUT_RESOLVE;
|
|
||||||
maxtime.tv_usec = 0;
|
|
||||||
|
|
||||||
timeout = ares_timeout((ares_channel)conn->data->state.resolver, &maxtime,
|
|
||||||
&timebuf);
|
|
||||||
-
|
|
||||||
- Curl_expire(conn->data,
|
|
||||||
- (timeout->tv_sec * 1000) + (timeout->tv_usec/1000));
|
|
||||||
+ milli = (timeout->tv_sec * 1000) + (timeout->tv_usec/1000);
|
|
||||||
+ if(milli == 0)
|
|
||||||
+ milli += 10;
|
|
||||||
+ Curl_expire(conn->data, milli);
|
|
||||||
|
|
||||||
return max;
|
|
||||||
}
|
|
||||||
diff --git a/lib/multi.c b/lib/multi.c
|
|
||||||
index ae70851..3059e49 100644
|
|
||||||
--- a/lib/multi.c
|
|
||||||
+++ b/lib/multi.c
|
|
||||||
@@ -1085,12 +1085,15 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
|
|
||||||
/* check if we have the name resolved by now */
|
|
||||||
easy->result = Curl_resolver_is_resolved(easy->easy_conn, &dns);
|
|
||||||
|
|
||||||
- if(dns) {
|
|
||||||
- /* Update sockets here. Mainly because the socket(s) may have been
|
|
||||||
- closed and the application thus needs to be told, even if it is
|
|
||||||
- likely that the same socket(s) will again be used further down. */
|
|
||||||
- singlesocket(multi, easy);
|
|
||||||
+ /* Update sockets here, because the socket(s) may have been
|
|
||||||
+ closed and the application thus needs to be told, even if it
|
|
||||||
+ is likely that the same socket(s) will again be used further
|
|
||||||
+ down. If the name has not yet been resolved, it is likely
|
|
||||||
+ that new sockets have been opened in an attempt to contact
|
|
||||||
+ another resolver. */
|
|
||||||
+ singlesocket(multi, easy);
|
|
||||||
|
|
||||||
+ if(dns) {
|
|
||||||
/* Perform the next step in the connection phase, and then move on
|
|
||||||
to the WAITCONNECT state */
|
|
||||||
easy->result = Curl_async_resolved(easy->easy_conn,
|
|
||||||
--
|
|
||||||
1.7.3.1
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
From d81f5ea3e0a5f9a532fcf685898e041fafa93a5b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Fri, 2 Dec 2011 21:10:28 +0100
|
|
||||||
Subject: [PATCH] multi interface: only use non-NULL function pointer!
|
|
||||||
|
|
||||||
If the socket callback function pointer hasn't been set, we must not
|
|
||||||
attempt to use it. Commit adc88ca20 made it more likely to occur.
|
|
||||||
---
|
|
||||||
lib/multi.c | 22 ++++++++++++----------
|
|
||||||
1 files changed, 12 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/multi.c b/lib/multi.c
|
|
||||||
index 3059e49..f3b892c 100644
|
|
||||||
--- a/lib/multi.c
|
|
||||||
+++ b/lib/multi.c
|
|
||||||
@@ -1940,11 +1940,12 @@ static void singlesocket(struct Curl_multi *multi,
|
|
||||||
}
|
|
||||||
|
|
||||||
/* we know (entry != NULL) at this point, see the logic above */
|
|
||||||
- multi->socket_cb(easy->easy_handle,
|
|
||||||
- s,
|
|
||||||
- action,
|
|
||||||
- multi->socket_userp,
|
|
||||||
- entry->socketp);
|
|
||||||
+ if(multi->socket_cb)
|
|
||||||
+ multi->socket_cb(easy->easy_handle,
|
|
||||||
+ s,
|
|
||||||
+ action,
|
|
||||||
+ multi->socket_userp,
|
|
||||||
+ entry->socketp);
|
|
||||||
|
|
||||||
entry->action = action; /* store the current action state */
|
|
||||||
}
|
|
||||||
@@ -2019,11 +2020,12 @@ static void singlesocket(struct Curl_multi *multi,
|
|
||||||
remove_sock_from_hash = FALSE;
|
|
||||||
|
|
||||||
if(remove_sock_from_hash) {
|
|
||||||
- multi->socket_cb(easy->easy_handle,
|
|
||||||
- s,
|
|
||||||
- CURL_POLL_REMOVE,
|
|
||||||
- multi->socket_userp,
|
|
||||||
- entry ? entry->socketp : NULL);
|
|
||||||
+ if(multi->socket_cb)
|
|
||||||
+ multi->socket_cb(easy->easy_handle,
|
|
||||||
+ s,
|
|
||||||
+ CURL_POLL_REMOVE,
|
|
||||||
+ multi->socket_userp,
|
|
||||||
+ entry ? entry->socketp : NULL);
|
|
||||||
sh_delentry(multi->sockhash, s);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.3.1
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
|||||||
--- curl-config.in.orig 2008-10-10 13:43:19.000000000 +0200
|
|
||||||
+++ curl-config.in 2008-10-10 13:43:56.000000000 +0200
|
|
||||||
@@ -181,7 +181,7 @@
|
|
||||||
;;
|
|
||||||
|
|
||||||
--cflags)
|
|
||||||
- if test "X@includedir@" = "X/usr/include"; then
|
|
||||||
+ if test "X@includedir@" = "X@GENTOO_PORTAGE_EPREFIX@/usr/include"; then
|
|
||||||
echo ""
|
|
||||||
else
|
|
||||||
echo "-I@includedir@"
|
|
||||||
@@ -189,7 +189,7 @@
|
|
||||||
;;
|
|
||||||
|
|
||||||
--libs)
|
|
||||||
- if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
|
|
||||||
+ if test "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib" -a "X@libdir@" != "X@GENTOO_PORTAGE_EPREFIX@/usr/lib64"; then
|
|
||||||
CURLLIBDIR="-L@libdir@ "
|
|
||||||
else
|
|
||||||
CURLLIBDIR=""
|
|
@ -1,20 +0,0 @@
|
|||||||
--- tests/data/test241.orig 2008-11-20 08:12:35.000000000 +1100
|
|
||||||
+++ tests/data/test241 2009-11-05 14:22:07.000000000 +1100
|
|
||||||
@@ -33,7 +33,7 @@
|
|
||||||
HTTP-IPv6 GET (using ip6-localhost)
|
|
||||||
</name>
|
|
||||||
<command>
|
|
||||||
--g "http://ip6-localhost:%HTTP6PORT/241"
|
|
||||||
+-g "http://::1:%HTTP6PORT/241"
|
|
||||||
</command>
|
|
||||||
<precheck>
|
|
||||||
./server/resolve --ipv6 ip6-localhost
|
|
||||||
@@ -48,7 +48,7 @@
|
|
||||||
</strip>
|
|
||||||
<protocol>
|
|
||||||
GET /241 HTTP/1.1
|
|
||||||
-Host: ip6-localhost:%HTTP6PORT
|
|
||||||
+Host: ::1:%HTTP6PORT
|
|
||||||
Accept: */*
|
|
||||||
|
|
||||||
</protocol>
|
|
@ -1,14 +0,0 @@
|
|||||||
--- curl-config.in.orig 2007-09-14 07:36:18.000000000 +1000
|
|
||||||
+++ curl-config.in 2007-09-14 07:37:14.000000000 +1000
|
|
||||||
@@ -187,9 +187,9 @@
|
|
||||||
CURLLIBDIR=""
|
|
||||||
fi
|
|
||||||
if test "X@REQUIRE_LIB_DEPS@" = "Xyes"; then
|
|
||||||
- echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
|
|
||||||
+ echo ${CURLLIBDIR}-lcurl @LIBCURL_LIBS@ @LIBS@
|
|
||||||
else
|
|
||||||
- echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
|
|
||||||
+ echo ${CURLLIBDIR}-lcurl @LIBS@
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index e9b49c7..e374ab6 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -280,9 +280,6 @@ dnl **********************************************************************
|
|
||||||
|
|
||||||
CURL_CHECK_COMPILER
|
|
||||||
CURL_SET_COMPILER_BASIC_OPTS
|
|
||||||
-CURL_SET_COMPILER_DEBUG_OPTS
|
|
||||||
-CURL_SET_COMPILER_OPTIMIZE_OPTS
|
|
||||||
-CURL_SET_COMPILER_WARNING_OPTS
|
|
||||||
|
|
||||||
if test "$compiler_id" = "INTEL_UNIX_C"; then
|
|
||||||
#
|
|
@ -1 +0,0 @@
|
|||||||
DIST pv-1.1.4.tar.gz 92146 RMD160 ac0453e59f9f1d81cc40b55b8870871aa22f9f10 SHA1 2d84e212b543509b675351809d1e0257e679c5fa SHA256 fd43aea3ce9017499cc02c5b3237e0207140b17d6efaddc05fa8cc393c64a904
|
|
@ -1,33 +0,0 @@
|
|||||||
# Copyright 1999-2010 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/sys-apps/pv/pv-1.1.4-r1.ebuild,v 1.1 2010/12/13 00:52:06 flameeyes Exp $
|
|
||||||
|
|
||||||
EAPI="2"
|
|
||||||
|
|
||||||
inherit toolchain-funcs
|
|
||||||
|
|
||||||
DESCRIPTION="Pipe Viewer: a tool for monitoring the progress of data through a pipe"
|
|
||||||
HOMEPAGE="http://www.ivarch.com/programs/pv.shtml"
|
|
||||||
SRC_URI="mirror://sourceforge/pipeviewer/${P}.tar.gz"
|
|
||||||
|
|
||||||
LICENSE="Artistic-2"
|
|
||||||
SLOT="0"
|
|
||||||
KEYWORDS="alpha amd64 arm hppa ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc64-solaris ~x86-solaris"
|
|
||||||
IUSE="nls"
|
|
||||||
|
|
||||||
src_configure() {
|
|
||||||
econf $(use_enable nls)
|
|
||||||
}
|
|
||||||
|
|
||||||
src_compile() {
|
|
||||||
emake \
|
|
||||||
CC="$(tc-getCC)" \
|
|
||||||
LD="$(tc-getLD)" \
|
|
||||||
|| die
|
|
||||||
}
|
|
||||||
|
|
||||||
src_install() {
|
|
||||||
emake DESTDIR="${D}" install || die
|
|
||||||
|
|
||||||
dodoc README doc/NEWS doc/TODO || die
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
DIST udev-151-testsys.tar.bz2 137712 SHA256 727e2127e497cd0c41e27bda6f1e8e83831226f84c63e732fe78a64ed91a322e SHA512 0c6266578692c12c82cac391839a470f58cb11e70fec038924a5ddc3d9f85d35f3efd663e873594c5d2add9ed008cc4e290696908d9bb7a0974a906fbd60cf5b WHIRLPOOL 5f3f1e4631b09f9afbe6571af9ad484ef5fa1f944665f1885cf20a7b7d6b60d723ed8bd0842dfe8a77315921c9118c29794e16584997d997a7db38f7d9dd37a8
|
|
||||||
DIST udev-151.tar.bz2 509815 SHA256 d37a94e75b962182ce940e4a839f07b1c7024dbe7e4b870a120bf0fe9ed0d55d SHA512 9ec1859d50ddc7b03107bdc5cf1c08980442e2f2b10daad2ce9e55a2fcbd7a93270ea42bcccb2eeec50519b9e6bca303c2cb7f1da3084608a712afc7042b8173 WHIRLPOOL 8cfbf9068948a6c83431a4fba8a2d0e7fec93f13e7fd9b4d7e75f3600709eb1b3083c2a6d5fff135876f585dac29c06c185867b2f3605d0f718633172a218d0c
|
|
||||||
DIST udev-170.tar.bz2 598012 SHA256 7bcc634ed3f49456d8ea075a5c33febbfff70f65f1a4b8a88da1460f0d9dab7f SHA512 8b96b61d0d56c89a1fca40ec110fadb747aafc3281fd24665e20cd5e2d03a12e61e33db024514c4cabea06c077b84c94557de7fcffee929a3bed781254c28a6f WHIRLPOOL e77ae395dcb29343f1a8548fee343407ffd2a592bc96946f9036601909bb3b728977a5bb8b1d2c21d122645148c6d3facf4b5fd0bd67097b0ba3bce5c1447a28
|
|
||||||
DIST udev-171-gentoo-patchset-v1.tar.bz2 796 SHA256 9524e64068d67bb55ddad16dd36a27c3ef87323421254a5bfe2431693b1bc983 SHA512 d2eef776c3cc331b5df339e865838b67b70da01e10fa75c5cb0d45cff388adfa6af4dd36677eb05cee9936331445afadcd4158ed7d96f3499ce93d6ee1e3feb6 WHIRLPOOL d1451d2002263db7bd30baa2d126fcb3ffff6a4b310f8ebfea755760b3afbd3a76ab2aa0d16e1a88cff13567a153155720c4c16c1d4624dd2a4405b29dbb3997
|
|
||||||
DIST udev-171-testsys.tar.bz2 155001 SHA256 7383701b64701f58f16e0ddb19fe33b4eb53fac6fc6068bdcbff7e6325b79dcc SHA512 f3f537d771e36b87c71004f5576f7672ffeb815d0b5337bb6bbb6e842c32a28d1d92b4eb0ee2edc60c0b8bd576fc2f36e8b0ed16ec9c0cff9c216e04fb1438ad WHIRLPOOL 0ee66df2f52496d592d0dd3de7c628f6deee7f41c2d21e745f22d74e61c276e01cc6ba584c65b05d36c8a4fb14bc54e3e1a89b975751929b19e91458e3550253
|
|
||||||
DIST udev-171.tar.bz2 597937 SHA256 fed1e46074c1a16c828193ebd73b3940b7905cc7dcaeb0b3c720d4615210695e SHA512 dea189d79b195f8c10740507b11de2c2074442301ee52a0b2c62efa8663e1793c1a78b03b95510ba19bc93d4dcc497120fbf6bb5784878aa903973f76b92d42f WHIRLPOOL a93241b0f0645696e6a88ddb152c3ef8f2c73b5bf3591892384f180fc7abeb580c59642013480546eac00ad5028b1900ad35b88f6a27ad2d07792e9f34e59743
|
|
||||||
DIST udev-gentoo-scripts-v3.tar.bz2 9534 SHA256 4cae68974f15624f6387252e25cbcd1fcb67c7d4bf37c7cf08656843fcafbc2d SHA512 69cf1e16764b06e4e7b2604d864803c30365fc1f414c3246658c2e8caffffeda7e03ce177da48950d0302f98183d3eb5d12101b4c04ada2064cd72665a890a00 WHIRLPOOL c151940e171614890754c3506f7e9d7e57d769f7235398abc01ac20776fb914c4250f6e75722773063769e49760aa0d3380a941b348ed103878c678c97ddf055
|
|
||||||
DIST udev-gentoo-scripts-v4.tar.bz2 9927 SHA256 2724814aa07c357b7191969877b418f84d9d6c6e87315357fbddbb97b1d3b4c4 SHA512 0e391e441fcb4f89de085aee4e4c42667dafec34da7ced47137c17ec63e9f3d0e581672722e71a6758f4f272476d66a994e0e6d4b9c1532bb975e6d833f09310 WHIRLPOOL 1902d66adec0def9f648bf8f77e3f51c334aca7da0de5c2dfde17f3395e5aa43e231107c1291ff76594f813e1774fd96c97686d30ebaa01f14ced2efa19321f4
|
|
@ -1,3 +0,0 @@
|
|||||||
# Workaround the fact that udev 146 does not save udevdb entries for
|
|
||||||
# network devices that are not to be renamed. chromium-os:12387
|
|
||||||
SUBSYSTEM=="net", NAME="%k"
|
|
@ -1,45 +0,0 @@
|
|||||||
# Copyright 1999-2008 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
# provides get_KV and KV_to_int as not all openrc-versions installed via ebuild have these
|
|
||||||
|
|
||||||
cmd_exist()
|
|
||||||
{
|
|
||||||
type "$1" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
# does exist in baselayout-1
|
|
||||||
# does not exist in openrc, but is added by openrc-ebuild since some time
|
|
||||||
if ! cmd_exist KV_to_int; then
|
|
||||||
KV_to_int() {
|
|
||||||
[ -z $1 ] && return 1
|
|
||||||
|
|
||||||
local x=${1%%-*}
|
|
||||||
local KV_MAJOR=${x%%.*}
|
|
||||||
x=${x#*.}
|
|
||||||
local KV_MINOR=${x%%.*}
|
|
||||||
x=${x#*.}
|
|
||||||
local KV_MICRO=${x%%.*}
|
|
||||||
local KV_int=$((${KV_MAJOR} * 65536 + ${KV_MINOR} * 256 + ${KV_MICRO} ))
|
|
||||||
|
|
||||||
# We make version 2.2.0 the minimum version we will handle as
|
|
||||||
# a sanity check ... if its less, we fail ...
|
|
||||||
[ "${KV_int}" -lt 131584 ] && return 1
|
|
||||||
|
|
||||||
echo "${KV_int}"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# same as KV_to_int
|
|
||||||
if ! cmd_exist get_KV; then
|
|
||||||
_RC_GET_KV_CACHE=""
|
|
||||||
get_KV() {
|
|
||||||
[ -z "${_RC_GET_KV_CACHE}" ] \
|
|
||||||
&& _RC_GET_KV_CACHE="$(uname -r)"
|
|
||||||
|
|
||||||
echo "$(KV_to_int "${_RC_GET_KV_CACHE}")"
|
|
||||||
|
|
||||||
return $?
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
# Copyright 1999-2008 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
# functions that may not be defined, but are used by the udev-start and udev-stop addon
|
|
||||||
# used by baselayout-1 and openrc before version 0.4.0
|
|
||||||
|
|
||||||
cmd_exist()
|
|
||||||
{
|
|
||||||
type "$1" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
# does not exist in baselayout-1, does exist in openrc
|
|
||||||
if ! cmd_exist yesno; then
|
|
||||||
yesno() {
|
|
||||||
[ -z "$1" ] && return 1
|
|
||||||
case "$1" in
|
|
||||||
yes|Yes|YES) return 0 ;;
|
|
||||||
esac
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# does not exist in baselayout-1, does exist in openrc
|
|
||||||
if ! cmd_exist fstabinfo; then
|
|
||||||
fstabinfo() {
|
|
||||||
[ "$1" = "--quiet" ] && shift
|
|
||||||
local dir="$1"
|
|
||||||
|
|
||||||
# only check RC_USE_FSTAB on baselayout-1
|
|
||||||
yesno "${RC_USE_FSTAB}" || return 1
|
|
||||||
|
|
||||||
# check if entry is in /etc/fstab
|
|
||||||
local ret=$(gawk 'BEGIN { found="false"; }
|
|
||||||
$1 ~ "^#" { next }
|
|
||||||
$2 == "'$dir'" { found="true"; }
|
|
||||||
END { print found; }
|
|
||||||
' /etc/fstab)
|
|
||||||
|
|
||||||
"${ret}"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
|||||||
#!/sbin/runscript
|
|
||||||
# Copyright 1999-2008 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
description="Maintain a tarball of not udev managed device nodes"
|
|
||||||
[ -e /etc/conf.d/udev ] && . /etc/conf.d/udev
|
|
||||||
|
|
||||||
rc_device_tarball=${rc_device_tarball:-${RC_DEVICE_TARBALL:-NO}}
|
|
||||||
device_tarball=/lib/udev/state/devices.tar.bz2
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
if [ -f /etc/init.d/sysfs ]; then
|
|
||||||
need udev-mount
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
start()
|
|
||||||
{
|
|
||||||
_start
|
|
||||||
}
|
|
||||||
|
|
||||||
_start() {
|
|
||||||
if yesno "${rc_device_tarball}" && \
|
|
||||||
[ -s "${device_tarball}" ]
|
|
||||||
then
|
|
||||||
ebegin "Populating /dev with saved device nodes"
|
|
||||||
tar -jxpf "${device_tarball}" -C /dev
|
|
||||||
eend $?
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
if [ -e /dev/.devfsd ] || [ ! -e /dev/.udev ] || [ ! -z "${CDBOOT}" ] || \
|
|
||||||
! yesno "${rc_device_tarball}" || \
|
|
||||||
! touch "${device_tarball}" 2>/dev/null
|
|
||||||
then
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
ebegin "Saving device nodes"
|
|
||||||
# Handle our temp files
|
|
||||||
save_tmp_base=/tmp/udev.savedevices."$$"
|
|
||||||
devices_udev="${save_tmp_base}"/devices.udev
|
|
||||||
devices_real="${save_tmp_base}"/devices.real
|
|
||||||
devices_totar="${save_tmp_base}"/devices.totar
|
|
||||||
device_tmp_tarball="${save_tmp_base}"/devices
|
|
||||||
|
|
||||||
rm -rf "${save_tmp_base}"
|
|
||||||
mkdir "${save_tmp_base}"
|
|
||||||
touch "${devices_udev}" "${devices_real}" \
|
|
||||||
"${devices_totar}" "${device_tmp_tarball}"
|
|
||||||
|
|
||||||
if [ -f "${devices_udev}" -a -f "${devices_real}" -a \
|
|
||||||
-f "${devices_totar}" -a -f "${device_tmp_tarball}" ]
|
|
||||||
then
|
|
||||||
cd /dev
|
|
||||||
# Find all devices, but ignore .udev directory
|
|
||||||
find . -xdev -type b -or -type c -or -type l | \
|
|
||||||
cut -d/ -f2- | \
|
|
||||||
grep -v ^\\.udev >"${devices_real}"
|
|
||||||
|
|
||||||
# Figure out what udev created
|
|
||||||
udevadm info --export-db | sed -ne 's,^[SN]: \(.*\),\1,p' >"${devices_udev}"
|
|
||||||
# These ones we also do not want in there
|
|
||||||
for x in MAKEDEV core fd initctl pts shm stderr stdin stdout root; do
|
|
||||||
echo "${x}" >> "${devices_udev}"
|
|
||||||
done
|
|
||||||
if [ -d /lib/udev/devices ]; then
|
|
||||||
cd /lib/udev/devices
|
|
||||||
find . -xdev -type b -or -type c -or -type l | \
|
|
||||||
cut -d/ -f2- >> "${devices_udev}"
|
|
||||||
cd /dev
|
|
||||||
fi
|
|
||||||
|
|
||||||
fgrep -x -v -f "${devices_udev}" "${devices_real}" > "${devices_totar}"
|
|
||||||
|
|
||||||
# Now only tarball those not created by udev if we have any
|
|
||||||
if [ -s "${devices_totar}" ]; then
|
|
||||||
# we dont want to descend into mounted filesystems (e.g. devpts)
|
|
||||||
# looking up username may involve NIS/network
|
|
||||||
# and net may be down
|
|
||||||
tar --one-file-system --numeric-owner \
|
|
||||||
-jcpf "${device_tmp_tarball}" -T "${devices_totar}"
|
|
||||||
mv -f "${device_tmp_tarball}" "${device_tarball}"
|
|
||||||
else
|
|
||||||
rm -f "${device_tarball}"
|
|
||||||
fi
|
|
||||||
eend 0
|
|
||||||
else
|
|
||||||
eend 1 "Could not create temporary files!"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -rf "${save_tmp_base}"
|
|
||||||
}
|
|
||||||
|
|
@ -1,107 +0,0 @@
|
|||||||
#!/sbin/runscript
|
|
||||||
# Copyright 1999-2008 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
description="Mount tmpfs on /dev"
|
|
||||||
[ -e /etc/conf.d/udev ] && . /etc/conf.d/udev
|
|
||||||
|
|
||||||
# get_KV and KV_to_int
|
|
||||||
. /lib/udev/shell-compat-KV.sh
|
|
||||||
|
|
||||||
# FIXME
|
|
||||||
# Instead of this script testing kernel version, udev itself should
|
|
||||||
# Maybe something like udevd --test || exit $?
|
|
||||||
check_kernel()
|
|
||||||
{
|
|
||||||
if [ $(get_KV) -lt $(KV_to_int '%KV_MIN%') ]; then
|
|
||||||
eerror "Your kernel is too old to work with this version of udev."
|
|
||||||
eerror "Current udev only supports Linux kernel %KV_MIN% and newer."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
yesno "${unreliable_kernel_warning:-yes}" || return 0
|
|
||||||
|
|
||||||
if [ $(get_KV) -lt $(KV_to_int '%KV_MIN_RELIABLE%') ]; then
|
|
||||||
ewarn "You need at least Linux kernel %KV_MIN_RELIABLE% for reliable operation of udev."
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
mount_dev_directory()
|
|
||||||
{
|
|
||||||
# No options are processed here as they should all be in /etc/fstab
|
|
||||||
ebegin "Mounting /dev"
|
|
||||||
if fstabinfo --quiet /dev; then
|
|
||||||
mount -n /dev
|
|
||||||
else
|
|
||||||
# Some devices require exec, Bug #92921
|
|
||||||
mount -n -t tmpfs -o "exec,nosuid,mode=0755,size=10M" udev /dev
|
|
||||||
fi
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
seed_dev()
|
|
||||||
{
|
|
||||||
# Seed /dev with some things that we know we need
|
|
||||||
|
|
||||||
# creating /dev/console, /dev/tty and /dev/tty1 to be able to write
|
|
||||||
# to $CONSOLE with/without bootsplash before udevd creates it
|
|
||||||
[ -c /dev/console ] || mknod -m 600 /dev/console c 5 1
|
|
||||||
[ -c /dev/tty1 ] || mknod -m 620 /dev/tty1 c 4 1
|
|
||||||
[ -c /dev/tty ] || mknod -m 666 /dev/tty c 5 0
|
|
||||||
|
|
||||||
# udevd will dup its stdin/stdout/stderr to /dev/null
|
|
||||||
# and we do not want a file which gets buffered in ram
|
|
||||||
[ -c /dev/null ] || mknod -m 666 /dev/null c 1 3
|
|
||||||
|
|
||||||
# so udev can add its start-message to dmesg
|
|
||||||
[ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11
|
|
||||||
|
|
||||||
# copy over any persistant things
|
|
||||||
if [ -d /lib/udev/devices ]; then
|
|
||||||
cp -RPp /lib/udev/devices/* /dev 2>/dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Not provided by sysfs but needed
|
|
||||||
ln -snf /proc/self/fd /dev/fd
|
|
||||||
ln -snf fd/0 /dev/stdin
|
|
||||||
ln -snf fd/1 /dev/stdout
|
|
||||||
ln -snf fd/2 /dev/stderr
|
|
||||||
[ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core
|
|
||||||
|
|
||||||
# Create problematic directories
|
|
||||||
mkdir -p /dev/pts /dev/shm
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
start()
|
|
||||||
{
|
|
||||||
# do not run this on too old baselayout - udev-addon is already loaded!
|
|
||||||
if [ ! -f /etc/init.d/sysfs ]; then
|
|
||||||
eerror "The $SVCNAME init-script is written for baselayout-2!"
|
|
||||||
eerror "Please do not use it with baselayout-1!".
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
_start
|
|
||||||
}
|
|
||||||
|
|
||||||
_start()
|
|
||||||
{
|
|
||||||
check_kernel || return 1
|
|
||||||
mount_dev_directory || return 1
|
|
||||||
|
|
||||||
# Selinux lovin; /selinux should be mounted by selinux-patched init
|
|
||||||
if [ -x /sbin/restorecon -a -c /selinux/null ]; then
|
|
||||||
restorecon /dev > /selinux/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
# make sure it exists
|
|
||||||
mkdir -p /dev/.udev
|
|
||||||
|
|
||||||
seed_dev
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
@ -1,31 +0,0 @@
|
|||||||
#!/sbin/runscript
|
|
||||||
# Copyright 1999-2007 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/136/udev-postmount.initd,v 1.3 2009/02/23 16:30:53 zzam Exp $
|
|
||||||
|
|
||||||
depend() {
|
|
||||||
need localmount
|
|
||||||
}
|
|
||||||
|
|
||||||
dir_writeable()
|
|
||||||
{
|
|
||||||
mkdir "$1"/.test.$$ 2>/dev/null && rmdir "$1"/.test.$$
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
# check if this system uses udev
|
|
||||||
[ -d /dev/.udev/ ] || return 0
|
|
||||||
|
|
||||||
# only continue if rules-directory is writable
|
|
||||||
dir_writeable /etc/udev/rules.d || return 0
|
|
||||||
|
|
||||||
# store persistent-rules that got created while booting
|
|
||||||
# when / was still read-only
|
|
||||||
/lib/udev/move_tmp_persistent_rules.sh
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
:
|
|
||||||
}
|
|
||||||
|
|
||||||
# vim:ts=4
|
|
@ -1,54 +0,0 @@
|
|||||||
# Copyright 1999-2007 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
[ -e /etc/conf.d/udev ] && . /etc/conf.d/udev
|
|
||||||
|
|
||||||
. /lib/udev/shell-compat-addon.sh
|
|
||||||
|
|
||||||
compat_volume_nodes()
|
|
||||||
{
|
|
||||||
# Only do this for baselayout-1*
|
|
||||||
# This check is likely to get false positives due to some multilib stuff,
|
|
||||||
# but that should not matter, as this can only happen on old openrc versions
|
|
||||||
# no longer available as ebuilds.
|
|
||||||
if [ ! -e /lib/librc.so ]; then
|
|
||||||
|
|
||||||
# Create nodes that udev can't
|
|
||||||
[ -x /sbin/lvm ] && \
|
|
||||||
/sbin/lvm vgscan -P --mknodes --ignorelockingfailure &>/dev/null
|
|
||||||
# Running evms_activate on a LiveCD causes lots of headaches
|
|
||||||
[ -z "${CDBOOT}" -a -x /sbin/evms_activate ] && \
|
|
||||||
/sbin/evms_activate -q &>/dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
start_initd()
|
|
||||||
{
|
|
||||||
(
|
|
||||||
. /etc/init.d/"$1"
|
|
||||||
_start
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
# mount tmpfs on /dev
|
|
||||||
start_initd udev-mount || exit 1
|
|
||||||
|
|
||||||
# Create a file so that our rc system knows it's still in sysinit.
|
|
||||||
# Existance means init scripts will not directly run.
|
|
||||||
# rc will remove the file when done with sysinit.
|
|
||||||
# this is no longer needed as of openrc-0.4.0
|
|
||||||
touch /dev/.rcsysinit
|
|
||||||
|
|
||||||
# load device tarball
|
|
||||||
start_initd udev-dev-tarball
|
|
||||||
|
|
||||||
# run udevd
|
|
||||||
start_initd udev || exit 1
|
|
||||||
|
|
||||||
compat_volume_nodes
|
|
||||||
|
|
||||||
# inject into boot runlevel
|
|
||||||
IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>&1
|
|
||||||
|
|
||||||
# udev started successfully
|
|
||||||
exit 0
|
|
@ -1,13 +0,0 @@
|
|||||||
# Copyright 1999-2007 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
# for function yesno
|
|
||||||
. /lib/udev/shell-compat-addon.sh
|
|
||||||
|
|
||||||
# store device tarball
|
|
||||||
(
|
|
||||||
. /etc/init.d/udev-dev-tarball
|
|
||||||
stop
|
|
||||||
)
|
|
||||||
|
|
||||||
exit 0
|
|
@ -1,56 +0,0 @@
|
|||||||
# /etc/conf.d/udev: config file for udev
|
|
||||||
|
|
||||||
# We discourage to disable persistent-net!!
|
|
||||||
# this may lead to random interface naming
|
|
||||||
|
|
||||||
# Disable adding new rules for persistent-net
|
|
||||||
persistent_net_disable="no"
|
|
||||||
|
|
||||||
# Disable adding new rules for persistent-cd
|
|
||||||
# Disabling this will stop new cdrom devices to appear
|
|
||||||
# as /dev/{cdrom,cdrw,dvd,dvdrw}
|
|
||||||
persistent_cd_disable="no"
|
|
||||||
|
|
||||||
# Set to "yes" if you want to save /dev to a tarball on shutdown
|
|
||||||
# and restore it on startup. This is useful if you have a lot of
|
|
||||||
# custom device nodes that udev does not handle/know about.
|
|
||||||
#
|
|
||||||
# As this option is fragile, we recommend you
|
|
||||||
# to create your devices in /lib/udev/devices.
|
|
||||||
# These will be copied to /dev on boot.
|
|
||||||
#rc_device_tarball="NO"
|
|
||||||
|
|
||||||
# udev can trigger coldplug events which cause services to start and
|
|
||||||
# kernel modules to be loaded.
|
|
||||||
# Services are deferred to start in the boot runlevel.
|
|
||||||
# Set rc_coldplug="NO" if you don't want this.
|
|
||||||
# If you want module coldplugging but not coldplugging of services then you
|
|
||||||
# can disable service coldplugging in baselayout/openrc config files.
|
|
||||||
# The setting is named different in different versions.
|
|
||||||
# in /etc/rc.conf: rc_hotplug="!*" or
|
|
||||||
# in /etc/conf.d/rc: rc_plug_services="!*"
|
|
||||||
#rc_coldplug="YES"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Expert options:
|
|
||||||
|
|
||||||
# Disable warning about unreliable kernel/udev combination
|
|
||||||
#unreliable_kernel_warning="no"
|
|
||||||
|
|
||||||
# Timeout in seconds to wait for processing of uevents at boot.
|
|
||||||
# There should be no need to change this.
|
|
||||||
#udev_settle_timeout="60"
|
|
||||||
|
|
||||||
# Run udevadmin monitor to get a log of all events
|
|
||||||
# in /dev/.udev/udevmonitor.log
|
|
||||||
#udev_monitor="YES"
|
|
||||||
|
|
||||||
# Keep udevmonitor running after populating /dev.
|
|
||||||
#udev_monitor_keep_running="no"
|
|
||||||
|
|
||||||
# Set cmdline options for udevmonitor.
|
|
||||||
# could be some of --env --kernel --udev
|
|
||||||
#udev_monitor_opts="--env"
|
|
||||||
|
|
@ -1,244 +0,0 @@
|
|||||||
#!/sbin/runscript
|
|
||||||
# Copyright 1999-2008 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
description="Run udevd and create the device-nodes"
|
|
||||||
|
|
||||||
[ -e /etc/udev/udev.conf ] && . /etc/udev/udev.conf
|
|
||||||
|
|
||||||
rc_coldplug=${rc_coldplug:-${RC_COLDPLUG:-YES}}
|
|
||||||
|
|
||||||
depend()
|
|
||||||
{
|
|
||||||
if [ -f /etc/init.d/sysfs ]; then
|
|
||||||
# require new enough openrc with sysinit being extra runlevel
|
|
||||||
# on linux we just check if sysfs init-script exists
|
|
||||||
# this is to silence out ugly warnings about not-existing sysfs script
|
|
||||||
provide dev
|
|
||||||
if yesno "${rc_device_tarball:-no}"; then
|
|
||||||
need sysfs udev-mount udev-dev-tarball
|
|
||||||
else
|
|
||||||
need sysfs udev-mount
|
|
||||||
fi
|
|
||||||
before checkfs fsck
|
|
||||||
|
|
||||||
# udev does not work inside vservers
|
|
||||||
keyword novserver
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup()
|
|
||||||
{
|
|
||||||
# fail more gracely and not leave udevd running
|
|
||||||
start-stop-daemon --stop --exec /sbin/udevd
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
disable_hotplug_agent()
|
|
||||||
{
|
|
||||||
if [ -e /proc/sys/kernel/hotplug ]; then
|
|
||||||
echo "" >/proc/sys/kernel/hotplug
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
root_link()
|
|
||||||
{
|
|
||||||
/lib/udev/write_root_link_rule
|
|
||||||
}
|
|
||||||
|
|
||||||
rules_disable_switch()
|
|
||||||
{
|
|
||||||
# this function disables rules files
|
|
||||||
# by creating new files with the same name
|
|
||||||
# in a temp rules directory with higher priority
|
|
||||||
local d=/dev/.udev/rules.d bname="$1" onoff="$2"
|
|
||||||
|
|
||||||
if yesno "${onoff}"; then
|
|
||||||
mkdir -p "$d"
|
|
||||||
echo "# This file disables ${bname} due to /etc/conf.d/udev" \
|
|
||||||
> "${d}/${bname}"
|
|
||||||
else
|
|
||||||
rm -f "${d}/${bname}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
start_udevd()
|
|
||||||
{
|
|
||||||
# load unix domain sockets if built as module, Bug #221253
|
|
||||||
if [ -e /proc/modules ] ; then
|
|
||||||
modprobe -q unix 2>/dev/null
|
|
||||||
fi
|
|
||||||
ebegin "Starting udevd"
|
|
||||||
start-stop-daemon --start --exec /sbin/udevd -- --daemon
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
||||||
# populate /dev with devices already found by the kernel
|
|
||||||
populate_dev()
|
|
||||||
{
|
|
||||||
if get_bootparam "nocoldplug" ; then
|
|
||||||
rc_coldplug="NO"
|
|
||||||
ewarn "Skipping udev coldplug as requested in kernel cmdline"
|
|
||||||
fi
|
|
||||||
|
|
||||||
ebegin "Populating /dev with existing devices through uevents"
|
|
||||||
if yesno "${rc_coldplug}"; then
|
|
||||||
udevadm trigger
|
|
||||||
else
|
|
||||||
# Do not run any init-scripts, Bug #206518
|
|
||||||
udevadm control --env do_not_run_plug_service=1
|
|
||||||
|
|
||||||
# only create device nodes
|
|
||||||
udevadm trigger --attr-match=dev
|
|
||||||
|
|
||||||
# run persistent-net stuff, bug 191466
|
|
||||||
udevadm trigger --subsystem-match=net
|
|
||||||
fi
|
|
||||||
eend $?
|
|
||||||
|
|
||||||
ebegin "Waiting for uevents to be processed"
|
|
||||||
udevadm settle --timeout=${udev_settle_timeout:-60}
|
|
||||||
eend $?
|
|
||||||
|
|
||||||
udevadm control --env do_not_run_plug_service=
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# for debugging
|
|
||||||
start_udevmonitor()
|
|
||||||
{
|
|
||||||
yesno "${udev_monitor:-no}" || return 0
|
|
||||||
|
|
||||||
udevmonitor_log=/dev/.udev/udevmonitor.log
|
|
||||||
udevmonitor_pid=/dev/.udev/udevmonitor.pid
|
|
||||||
|
|
||||||
einfo "udev: Running udevadm monitor ${udev_monitor_opts} to get a log of all events"
|
|
||||||
start-stop-daemon --start --stdout "${udevmonitor_log}" \
|
|
||||||
--make-pidfile --pidfile "${udevmonitor_pid}" \
|
|
||||||
--background --exec /sbin/udevadm -- monitor ${udev_monitor_opts}
|
|
||||||
}
|
|
||||||
|
|
||||||
stop_udevmonitor()
|
|
||||||
{
|
|
||||||
yesno "${udev_monitor:-no}" || return 0
|
|
||||||
|
|
||||||
if yesno "${udev_monitor_keep_running:-no}"; then
|
|
||||||
ewarn "udev: udevmonitor is still running and writing into ${udevmonitor_log}"
|
|
||||||
else
|
|
||||||
einfo "udev: Stopping udevmonitor: Log is in ${udevmonitor_log}"
|
|
||||||
start-stop-daemon --stop --pidfile "${udevmonitor_pid}" --exec /sbin/udevadm
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
display_hotplugged_services() {
|
|
||||||
local svcfile= svc= services=
|
|
||||||
for svcfile in "${RC_SVCDIR}"/hotplugged/*; do
|
|
||||||
svc="${svcfile##*/}"
|
|
||||||
[ -x "${svcfile}" ] || continue
|
|
||||||
|
|
||||||
# do not display this - better: do only inject it later :)
|
|
||||||
[ "$svc" = "udev-postmount" ] && continue
|
|
||||||
|
|
||||||
services="${services} ${svc}"
|
|
||||||
done
|
|
||||||
[ -n "${services}" ] && einfo "Device initiated services:${HILITE}${services}${NORMAL}"
|
|
||||||
}
|
|
||||||
|
|
||||||
inject_postmount_initd() {
|
|
||||||
if ! mark_service_hotplugged udev-postmount; then
|
|
||||||
IN_HOTPLUG=1 /etc/init.d/udev-postmount start >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
#einfo "Injected udev-postmount service"
|
|
||||||
}
|
|
||||||
|
|
||||||
check_persistent_net()
|
|
||||||
{
|
|
||||||
# check if there are problems with persistent-net
|
|
||||||
local syspath= devs= problem=false
|
|
||||||
for syspath in /sys/class/net/*_rename*; do
|
|
||||||
if [ -d "${syspath}" ]; then
|
|
||||||
devs="${devs} ${syspath##*/}"
|
|
||||||
problem=true
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
${problem} || return 0
|
|
||||||
|
|
||||||
eerror "UDEV: Your system has a problem assigning persistent names"
|
|
||||||
eerror "to these network interfaces: ${devs}"
|
|
||||||
|
|
||||||
einfo "Checking persistent-net rules:"
|
|
||||||
# the sed-expression lists all duplicate lines
|
|
||||||
# from the input, like "uniq -d" does, but uniq
|
|
||||||
# is installed into /usr/bin and not available at boot.
|
|
||||||
dups=$(
|
|
||||||
RULES_FILE='/etc/udev/rules.d/70-persistent-net.rules'
|
|
||||||
. /lib/udev/rule_generator.functions
|
|
||||||
find_all_rules 'NAME=' '.*' | \
|
|
||||||
tr ' ' '\n' | \
|
|
||||||
sort | \
|
|
||||||
sed '$!N; s/^\(.*\)\n\1$/\1/; t; D'
|
|
||||||
)
|
|
||||||
if [ -n "${dups}" ]; then
|
|
||||||
ewarn "The rules create multiple entries assigning these names:"
|
|
||||||
eindent
|
|
||||||
ewarn "${dups}"
|
|
||||||
eoutdent
|
|
||||||
else
|
|
||||||
ewarn "Found no duplicate names in persistent-net rules,"
|
|
||||||
ewarn "there must be some other problem!"
|
|
||||||
fi
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
check_udev_works()
|
|
||||||
{
|
|
||||||
# should exist on every system, else udev failed
|
|
||||||
if [ ! -e /dev/zero ]; then
|
|
||||||
eerror "Assuming udev failed somewhere, as /dev/zero does not exist."
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
start()
|
|
||||||
{
|
|
||||||
# do not run this on old baselayout where udev-addon gets loaded
|
|
||||||
if [ ! -f /etc/init.d/sysfs ]; then
|
|
||||||
eerror "The $SVCNAME init-script is written for baselayout-2!"
|
|
||||||
eerror "Please do not use it with baselayout-1!".
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
_start
|
|
||||||
|
|
||||||
display_hotplugged_services
|
|
||||||
|
|
||||||
inject_postmount_initd
|
|
||||||
}
|
|
||||||
|
|
||||||
_start()
|
|
||||||
{
|
|
||||||
root_link
|
|
||||||
rules_disable_switch 75-persistent-net-generator.rules "${persistent_net_disable:-no}"
|
|
||||||
rules_disable_switch 75-cd-aliases-generator.rules ${persistent_cd_disable:-no}
|
|
||||||
|
|
||||||
disable_hotplug_agent
|
|
||||||
start_udevd || cleanup
|
|
||||||
start_udevmonitor
|
|
||||||
populate_dev || cleanup
|
|
||||||
|
|
||||||
check_persistent_net
|
|
||||||
|
|
||||||
check_udev_works || cleanup
|
|
||||||
stop_udevmonitor
|
|
||||||
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
ebegin "Stopping udevd"
|
|
||||||
start-stop-daemon --stop --exec /sbin/udevd
|
|
||||||
eend $?
|
|
||||||
}
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
|||||||
# compat_firmware-class requests, copies files into the kernel
|
|
||||||
SUBSYSTEM=="compat_firmware", ACTION=="add", RUN+="compat_firmware.sh"
|
|
@ -1,29 +0,0 @@
|
|||||||
# This file lists modules which will not be loaded by udev,
|
|
||||||
# not at coldplugging and not on hotplug events.
|
|
||||||
|
|
||||||
# Add your own entries to this file
|
|
||||||
# in the format "blacklist <name of module>"
|
|
||||||
|
|
||||||
# Some examples:
|
|
||||||
# evbug is a debug tool and should be loaded explicitly
|
|
||||||
blacklist evbug
|
|
||||||
|
|
||||||
# Autoloading eth1394 most of the time re-orders your network
|
|
||||||
# interfaces, and with buggy kernel 2.6.21, udev persistent-net
|
|
||||||
# is not able to rename these devices, so you get eth?_rename devices
|
|
||||||
# plus an exceeded 30sec boot timeout
|
|
||||||
blacklist eth1394
|
|
||||||
|
|
||||||
# You probably want this to not get the console beep loud on every tab :)
|
|
||||||
#blacklist pcspkr
|
|
||||||
|
|
||||||
# these drivers are very simple, the HID drivers are usually preferred
|
|
||||||
#blacklist usbmouse
|
|
||||||
#blacklist usbkbd
|
|
||||||
|
|
||||||
# Sometimes loading a framebuffer driver at boot gets the console black
|
|
||||||
#install pci:v*d*sv*sd*bc03sc*i* /bin/true
|
|
||||||
|
|
||||||
# hplip and cups 1.4+ use raw USB devices, so it requires usblp not be loaded
|
|
||||||
#blacklist usblp
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
|||||||
#!/bin/sh -e
|
|
||||||
|
|
||||||
# This is ported from Ubuntu but ubuntu uses these directories which
|
|
||||||
# other distributions don't care about:
|
|
||||||
# FIRMWARE_DIRS="/lib/firmware/updates/$(uname -r) /lib/firmware/updates \
|
|
||||||
# /lib/firmware/$(uname -r) /lib/firmware"
|
|
||||||
# If your distribution looks for firmware in other directories
|
|
||||||
# feel free to extend this and add your own directory here.
|
|
||||||
#
|
|
||||||
FIRMWARE_DIRS="/lib/firmware"
|
|
||||||
|
|
||||||
err() {
|
|
||||||
echo "$@" >&2
|
|
||||||
logger -t "${0##*/}[$$]" "$@" 2>/dev/null || true
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ ! -e /sys$DEVPATH/loading ]; then
|
|
||||||
err "udev firmware loader misses sysfs directory"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
for DIR in $FIRMWARE_DIRS; do
|
|
||||||
[ -e "$DIR/$FIRMWARE" ] || continue
|
|
||||||
echo 1 > /sys$DEVPATH/loading
|
|
||||||
cat "$DIR/$FIRMWARE" > /sys$DEVPATH/data
|
|
||||||
echo 0 > /sys$DEVPATH/loading
|
|
||||||
exit 0
|
|
||||||
done
|
|
||||||
|
|
||||||
echo -1 > /sys$DEVPATH/loading
|
|
||||||
err "Cannot find firmware file '$FIRMWARE'"
|
|
||||||
mkdir -p /dev/.udev/firmware-missing
|
|
||||||
file=$(echo "$FIRMWARE" | sed 's:/:\\x2f:g')
|
|
||||||
ln -s -f "$DEVPATH" /dev/.udev/firmware-missing/$file
|
|
||||||
exit 1
|
|
@ -1,25 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
# Copyright 1999-2007 Gentoo Foundation
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
. /etc/init.d/functions.sh
|
|
||||||
|
|
||||||
# store persistent-rules that got created while booting
|
|
||||||
# when / was still read-only
|
|
||||||
store_persistent_rules() {
|
|
||||||
local file dest
|
|
||||||
|
|
||||||
for file in /dev/.udev/tmp-rules--*; do
|
|
||||||
dest=${file##*tmp-rules--}
|
|
||||||
[ "$dest" = '*' ] && break
|
|
||||||
type=${dest##70-persistent-}
|
|
||||||
type=${type%%.rules}
|
|
||||||
ebegin "Saving udev persistent ${type} rules to /etc/udev/rules.d"
|
|
||||||
cat "$file" >> /etc/udev/rules.d/"$dest" && rm -f "$file"
|
|
||||||
eend $? "Failed moving persistent rules!"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
store_persistent_rules
|
|
||||||
|
|
||||||
# vim:ts=4
|
|
@ -1,34 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# net.sh: udev external RUN script
|
|
||||||
#
|
|
||||||
# Copyright 2007 Roy Marples <uberlord@gentoo.org>
|
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
|
||||||
|
|
||||||
IFACE=$1
|
|
||||||
ACTION=$2
|
|
||||||
|
|
||||||
SCRIPT=/etc/init.d/net.$IFACE
|
|
||||||
|
|
||||||
# ignore interfaces that are registered after being "up" (?)
|
|
||||||
case ${IFACE} in
|
|
||||||
ppp*|ippp*|isdn*|plip*|lo*|irda*|dummy*|ipsec*|tun*|tap*|br*)
|
|
||||||
exit 0 ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# stop here if coldplug is disabled, Bug #206518
|
|
||||||
if [ "${do_not_run_plug_service}" = 1 ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -x "${SCRIPT}" ] ; then
|
|
||||||
#do not flood log with messages, bug #205687
|
|
||||||
#logger -t udev-net.sh "${SCRIPT}: does not exist or is not executable"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If we're stopping then sleep for a bit in-case a daemon is monitoring
|
|
||||||
# the interface. This to try and ensure we stop after they do.
|
|
||||||
[ "${ACTION}" == "stop" ] && sleep 2
|
|
||||||
|
|
||||||
IN_HOTPLUG=1 "${SCRIPT}" --quiet "${ACTION}"
|
|
@ -1,17 +0,0 @@
|
|||||||
# /etc/modprobe.d/pnp-aliases
|
|
||||||
#
|
|
||||||
# These aliases are used by this udev-rule:
|
|
||||||
# SUBSYSTEM=="pnp", ENV{MODALIAS}!="?*", RUN+="/bin/sh -c '/sbin/modprobe -a $$(while read id; do echo pnp:d$$id; done < /sys$devpath/id)'"
|
|
||||||
#
|
|
||||||
# They should help to autoload drivers used by various pnp-devices
|
|
||||||
# (if not blacklisted somewhere else)
|
|
||||||
#
|
|
||||||
alias pnp:dPNP0510 irtty-sir
|
|
||||||
alias pnp:dPNP0511 irtty-sir
|
|
||||||
alias pnp:dPNP0700 floppy
|
|
||||||
alias pnp:dPNP0800 pcspkr
|
|
||||||
alias pnp:dPNP0b00 rtc
|
|
||||||
alias pnp:dPNP0303 atkbd
|
|
||||||
alias pnp:dPNP0f13 psmouse
|
|
||||||
alias pnp:dPNPb02f analog
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
diff --git a/rules/gentoo/40-gentoo.rules b/rules/gentoo/40-gentoo.rules
|
|
||||||
index 4751b51..91a7545 100644
|
|
||||||
--- a/rules/gentoo/40-gentoo.rules
|
|
||||||
+++ b/rules/gentoo/40-gentoo.rules
|
|
||||||
@@ -1,11 +1,5 @@
|
|
||||||
# do not edit this file, it will be overwritten on update
|
|
||||||
|
|
||||||
-# old devfs path, removing this could break systems
|
|
||||||
-# Bug 195839
|
|
||||||
-KERNEL=="md[0-9]*", SYMLINK+="md/%n"
|
|
||||||
-KERNEL=="loop[0-9]*", SYMLINK+="loop/%n"
|
|
||||||
-KERNEL=="ram[0-9]*", SYMLINK+="rd/%n"
|
|
||||||
-
|
|
||||||
# keep devices after driver unload
|
|
||||||
KERNEL=="ppp", OPTIONS+="ignore_remove"
|
|
||||||
KERNEL=="tun", OPTIONS+="ignore_remove"
|
|
@ -1,20 +0,0 @@
|
|||||||
--- a/configure.ac 2010-01-25 21:47:32.000000000 -0800
|
|
||||||
+++ b/configure.ac 2010-01-25 21:50:24.000000000 -0800
|
|
||||||
@@ -69,13 +69,13 @@
|
|
||||||
PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
|
|
||||||
AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
|
|
||||||
|
|
||||||
- AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
|
|
||||||
- AC_CHECK_FILES([/usr/share/hwdata/pci.ids], [pciids=/usr/share/hwdata/pci.ids])
|
|
||||||
- AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids])
|
|
||||||
AC_ARG_WITH(pci-ids-path,
|
|
||||||
AS_HELP_STRING([--pci-ids-path=DIR], [Path to pci.ids file]),
|
|
||||||
[PCI_DATABASE=${withval}],
|
|
||||||
- [if test -n "$pciids" ; then
|
|
||||||
+ [AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
|
|
||||||
+ AC_CHECK_FILES([/usr/share/hwdata/pci.ids], [pciids=/usr/share/hwdata/pci.ids])
|
|
||||||
+ AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids])
|
|
||||||
+ if test -n "$pciids" ; then
|
|
||||||
PCI_DATABASE="$pciids"
|
|
||||||
else
|
|
||||||
AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=])
|
|
@ -1,12 +0,0 @@
|
|||||||
--- a/libudev/libudev.pc.in 2009-10-24 23:46:04.000000000 +0000
|
|
||||||
+++ b/libudev/libudev.pc.in 2009-10-24 23:46:30.000000000 +0000
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
prefix=@prefix@
|
|
||||||
-exec_prefix=@prefix@
|
|
||||||
+exec_prefix=@exec_prefix@
|
|
||||||
libdir=@libdir@
|
|
||||||
-includedir=@prefix@/include
|
|
||||||
+includedir=@includedir@
|
|
||||||
|
|
||||||
Name: libudev
|
|
||||||
Description: Library to access udev device information
|
|
@ -1,13 +0,0 @@
|
|||||||
--- extras/rule_generator/rule_generator.functions.orig 2008-10-23 06:33:41.000000000 -0700
|
|
||||||
+++ extras/rule_generator/rule_generator.functions 2010-05-26 10:26:20.000000000 -0700
|
|
||||||
@@ -57,7 +57,9 @@
|
|
||||||
# Choose the real rules file if it is writeable or a temporary file if not.
|
|
||||||
# Both files should be checked later when looking for existing rules.
|
|
||||||
choose_rules_file() {
|
|
||||||
- local tmp_rules_file="/dev/.udev/tmp-rules--${RULES_FILE##*/}"
|
|
||||||
+ local orig_rules_base=${RULES_FILE##*/}
|
|
||||||
+ local tmp_rules_base=${orig_rules_base%%.rules}--tmp.rules
|
|
||||||
+ local tmp_rules_file="/dev/.udev/rules.d/$tmp_rules_base"
|
|
||||||
[ -e "$RULES_FILE" -o -e "$tmp_rules_file" ] || PRINT_HEADER=1
|
|
||||||
|
|
||||||
if writeable ${RULES_FILE%/*}; then
|
|
@ -1,29 +0,0 @@
|
|||||||
diff --git a/extras/firmware/firmware.c b/extras/firmware/firmware.c
|
|
||||||
index 8f70be4..16455de 100644
|
|
||||||
--- a/extras/firmware/firmware.c
|
|
||||||
+++ b/extras/firmware/firmware.c
|
|
||||||
@@ -149,6 +149,7 @@ int main(int argc, char **argv)
|
|
||||||
|
|
||||||
util_path_encode(firmware, fwencpath, sizeof(fwencpath));
|
|
||||||
util_strscpyl(misspath, sizeof(misspath), udev_get_dev_path(udev), "/.udev/firmware-missing/", fwencpath, NULL);
|
|
||||||
+ util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL);
|
|
||||||
|
|
||||||
if (fwfile == NULL) {
|
|
||||||
int err;
|
|
||||||
@@ -166,6 +167,7 @@ int main(int argc, char **argv)
|
|
||||||
udev_selinux_resetfscreatecon(udev);
|
|
||||||
} while (err == -ENOENT);
|
|
||||||
rc = 2;
|
|
||||||
+ set_loading(udev, loadpath, "-1");
|
|
||||||
goto exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -176,7 +178,6 @@ int main(int argc, char **argv)
|
|
||||||
if (unlink(misspath) == 0)
|
|
||||||
util_delete_path(udev, misspath);
|
|
||||||
|
|
||||||
- util_strscpyl(loadpath, sizeof(loadpath), udev_get_sys_path(udev), devpath, "/loading", NULL);
|
|
||||||
set_loading(udev, loadpath, "1");
|
|
||||||
|
|
||||||
util_strscpyl(datapath, sizeof(datapath), udev_get_sys_path(udev), devpath, "/data", NULL);
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
--- extras/modem-modeswitch/61-option-modem-modeswitch.rules~ 2009-12-03 04:45:03.000000000 -0800
|
|
||||||
+++ extras/modem-modeswitch/61-option-modem-modeswitch.rules 2010-12-22 17:59:59.307733000 -0800
|
|
||||||
@@ -37,6 +37,9 @@ ATTRS{idVendor}=="0af0", ATTRS{idProduct
|
|
||||||
ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7501", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"
|
|
||||||
ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7601", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"
|
|
||||||
ATTRS{idVendor}=="0af0", ATTRS{idProduct}=="7901", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"
|
|
||||||
+ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1446", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"
|
|
||||||
+ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1520", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"
|
|
||||||
+ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1521", RUN+="modem-modeswitch -v 0x%s{idVendor} -p 0x%s{idProduct} -t option-zerocd"
|
|
||||||
|
|
||||||
# NOTE: only for devices manufactured by Option NV
|
|
||||||
# DO NOT add devices that are not manufactured by Option NV
|
|
@ -1,53 +0,0 @@
|
|||||||
diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules
|
|
||||||
index 132a680..a3e8e3c 100644
|
|
||||||
--- a/extras/cdrom_id/60-cdrom_id.rules
|
|
||||||
+++ b/extras/cdrom_id/60-cdrom_id.rules
|
|
||||||
@@ -2,4 +2,4 @@
|
|
||||||
|
|
||||||
# import optical drive properties
|
|
||||||
ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", \
|
|
||||||
- KERNEL=="sr[0-9]*|xvd*", IMPORT{program}="cdrom_id --export $tempnode"
|
|
||||||
+ KERNEL=="sr[0-9]*|hd[a-z]|pcd[0-9]|xvd*", IMPORT{program}="cdrom_id --export $tempnode"
|
|
||||||
diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules
|
|
||||||
index f8556d1..ba07079 100644
|
|
||||||
--- a/rules/rules.d/50-udev-default.rules
|
|
||||||
+++ b/rules/rules.d/50-udev-default.rules
|
|
||||||
@@ -77,9 +77,12 @@ SUBSYSTEM=="block", GROUP="disk"
|
|
||||||
|
|
||||||
# floppy
|
|
||||||
SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
|
|
||||||
+SUBSYSTEM=="block", KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0660 -G floppy $root/%k"
|
|
||||||
+KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="floppy", OPTIONS+="all_partitions"
|
|
||||||
|
|
||||||
# cdrom
|
|
||||||
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", GROUP="cdrom"
|
|
||||||
+SUBSYSTEM=="block", KERNEL=="hd*", SUBSYSTEMS=="ide", ATTRS{media}=="cdrom", GROUP="cdrom"
|
|
||||||
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom"
|
|
||||||
KERNEL=="pktcdvd[0-9]*", GROUP="cdrom"
|
|
||||||
KERNEL=="pktcdvd", GROUP="cdrom"
|
|
||||||
diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules
|
|
||||||
index 89041a9..6f12a9a 100644
|
|
||||||
--- a/rules/rules.d/60-persistent-storage.rules
|
|
||||||
+++ b/rules/rules.d/60-persistent-storage.rules
|
|
||||||
@@ -12,12 +12,21 @@ SUBSYSTEM!="block", GOTO="persistent_storage_end"
|
|
||||||
# skip rules for inappropriate block devices
|
|
||||||
KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|dm-*|md*", GOTO="persistent_storage_end"
|
|
||||||
|
|
||||||
+# never access non-cdrom removable ide devices, the drivers are causing event loops on open()
|
|
||||||
+KERNEL=="hd*[!0-9]", ATTR{removable}=="1", SUBSYSTEMS=="ide", ATTRS{media}=="disk|floppy", GOTO="persistent_storage_end"
|
|
||||||
+KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end"
|
|
||||||
+
|
|
||||||
# ignore partitions that span the entire disk
|
|
||||||
TEST=="whole_disk", GOTO="persistent_storage_end"
|
|
||||||
|
|
||||||
# for partitions import parent information
|
|
||||||
ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"
|
|
||||||
|
|
||||||
+# by-id (hardware serial number)
|
|
||||||
+KERNEL=="hd*[!0-9]", IMPORT{program}="ata_id --export $tempnode"
|
|
||||||
+KERNEL=="hd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_SERIAL}"
|
|
||||||
+KERNEL=="hd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_SERIAL}-part%n"
|
|
||||||
+
|
|
||||||
# USB devices use their own serial number
|
|
||||||
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p"
|
|
||||||
# ATA devices with their own "ata" kernel subsystem
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/rules/rules.d/50-udev-default.rules 2013-01-23 16:05:36.000000000 -0500
|
|
||||||
+++ b/rules/rules.d/50-udev-default.rules 2013-01-23 16:05:50.000000000 -0500
|
|
||||||
@@ -99,7 +99,7 @@
|
|
||||||
KERNEL=="cpu[0-9]*", MODE="0444"
|
|
||||||
|
|
||||||
KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse", \
|
|
||||||
- RUN+="/bin/mount -t fusectl fusectl /sys/fs/fuse/connections"
|
|
||||||
+ RUN+="/bin/mount -t fusectl -o nodev,noexec,nosuid fusectl /sys/fs/fuse/connections"
|
|
||||||
|
|
||||||
SUBSYSTEM=="rtc", DRIVERS=="rtc_cmos", SYMLINK+="rtc"
|
|
||||||
KERNEL=="mmtimer", MODE="0644"
|
|
@ -1,26 +0,0 @@
|
|||||||
From 2761bebdc7b01ed9af9671189c93bf317c4c43ea Mon Sep 17 00:00:00 2001
|
|
||||||
From: Matthias Schwarzott <zzam@gentoo.org>
|
|
||||||
Date: Sun, 8 May 2011 21:23:33 +0200
|
|
||||||
Subject: [PATCH 1/2] Revert "udevd: log warning if /run is not writable"
|
|
||||||
|
|
||||||
This reverts commit 2903820a62de1085f6b5def0fb622070805dd90b.
|
|
||||||
---
|
|
||||||
udev/udevd.c | 2 --
|
|
||||||
1 files changed, 0 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/udev/udevd.c b/udev/udevd.c
|
|
||||||
index be4b071..23d14fa 100644
|
|
||||||
--- a/udev/udevd.c
|
|
||||||
+++ b/udev/udevd.c
|
|
||||||
@@ -1227,8 +1227,6 @@ int main(int argc, char *argv[])
|
|
||||||
if (udev_set_run_path(udev, filename) == NULL)
|
|
||||||
goto exit;
|
|
||||||
mkdir(udev_get_run_path(udev), 0755);
|
|
||||||
- err(udev, "error: runtime directory '%s' not writable, for now falling back to '%s'",
|
|
||||||
- udev_get_run_config_path(udev), udev_get_run_path(udev));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* relabel runtime dir only if it resides below /dev */
|
|
||||||
--
|
|
||||||
1.7.5.rc3
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
|||||||
From bda2674f22b58bd32802b2057a05efada6155bae Mon Sep 17 00:00:00 2001
|
|
||||||
From: Scott James Remnant <scott@netsplit.com>
|
|
||||||
Date: Fri, 20 May 2011 14:06:29 -0700
|
|
||||||
Subject: [PATCH] configure: allow usb.ids location to be specified
|
|
||||||
|
|
||||||
We already allow the pci.ids location to be specified, so add a
|
|
||||||
patch doing the same for usb.ids. Please don't make me explain
|
|
||||||
why this is necessary, it will only make you cry.
|
|
||||||
|
|
||||||
Signed-off-by: Scott James Remnant <scott@netsplit.com>
|
|
||||||
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
|
|
||||||
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
|
|
||||||
---
|
|
||||||
configure.ac | 14 ++++++++++++--
|
|
||||||
1 files changed, 12 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
|
||||||
index 3646f93..cfdb3bf 100644
|
|
||||||
--- a/configure.ac
|
|
||||||
+++ b/configure.ac
|
|
||||||
@@ -93,8 +93,18 @@ if test "x$enable_hwdb" = xyes; then
|
|
||||||
AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids])
|
|
||||||
fi
|
|
||||||
|
|
||||||
- PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
|
|
||||||
- AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
|
|
||||||
+ AC_ARG_WITH(usb-ids-path,
|
|
||||||
+ [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])],
|
|
||||||
+ [USB_DATABASE=${withval}],
|
|
||||||
+ [if test -n "$usbids" ; then
|
|
||||||
+ USB_DATABASE="$usbids"
|
|
||||||
+ else
|
|
||||||
+ PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
|
|
||||||
+ AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
|
|
||||||
+ fi])
|
|
||||||
+ AC_MSG_CHECKING([for USB database location])
|
|
||||||
+ AC_MSG_RESULT([$USB_DATABASE])
|
|
||||||
+ AC_SUBST(USB_DATABASE)
|
|
||||||
|
|
||||||
AC_ARG_WITH(pci-ids-path,
|
|
||||||
[AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])],
|
|
||||||
--
|
|
||||||
1.7.3.1
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# This script should run before doing udevtrigger at boot.
|
|
||||||
# It will create a rule matching the device directory / is on, and
|
|
||||||
# creating /dev/root symlink pointing on its device node.
|
|
||||||
#
|
|
||||||
# This is especially useful for hal looking at /proc/mounts containing
|
|
||||||
# a line listing /dev/root as device:
|
|
||||||
# /dev/root / reiserfs rw 0 0
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
|
||||||
# under the terms of the GNU General Public License as published by the
|
|
||||||
# Free Software Foundation version 2 of the License.
|
|
||||||
#
|
|
||||||
# (c) 2007-2008 Matthias Schwarzott <zzam@gentoo.org>
|
|
||||||
|
|
||||||
eval $(udevadm info --export --export-prefix="ROOT_" --device-id-of-file=/)
|
|
||||||
|
|
||||||
[ $? = 0 ] || exit 0
|
|
||||||
[ "$ROOT_MAJOR" = 0 ] && exit 0
|
|
||||||
|
|
||||||
DIR=/dev/.udev/rules.d
|
|
||||||
[ -d "$DIR" ] || mkdir -p "$DIR"
|
|
||||||
RULES=$DIR/10-root-link.rules
|
|
||||||
|
|
||||||
echo "# Created by /lib/udev/write_root_link_rule" > "${RULES}"
|
|
||||||
echo "# This rule should create /dev/root as link to real root device." >> "${RULES}"
|
|
||||||
echo "SUBSYSTEM==\"block\", ENV{MAJOR}==\"$ROOT_MAJOR\", ENV{MINOR}==\"$ROOT_MINOR\", SYMLINK+=\"root\"" >> "${RULES}"
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user