From 1c8bfae74e5b595e9a5897de8f447afef9d59b21 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Tue, 10 Jun 2014 09:58:21 +0200 Subject: pacman2pacman --- pcr/pacman2pacman/PKGBUILD | 5 ++++- pcr/pacman2pacman/instructions.install | 41 ---------------------------------- 2 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 pcr/pacman2pacman/instructions.install (limited to 'pcr') diff --git a/pcr/pacman2pacman/PKGBUILD b/pcr/pacman2pacman/PKGBUILD index 7862f5a02..f07efff7d 100644 --- a/pcr/pacman2pacman/PKGBUILD +++ b/pcr/pacman2pacman/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Joseph Graham pkgname=pacman2pacman -pkgver=1.3.0 +pkgver=1.4.1 pkgrel=1 pkgdesc="A plugin for pactor to download packages by bittorrent and seed them back up" arch=(any) @@ -10,12 +10,15 @@ depends=(transmission-cli) options=(emptydirs) install=$pkgname.install source=(https://t67.eu/filebin/$pkgname-$pkgver.tar.gz) +md5sums=('736eb3d6d557030f733b4b3f4e08c2be') package() { cd $pkgname mkdir -p "${pkgdir}/srv/pacman2pacman/torrents" + mkdir -p "${pkgdir}/srv/pacman2pacman/dbcache" + chown -R transmission "${pkgdir}/srv/pacman2pacman/" mkdir -p "${pkgdir}/usr/bin" diff --git a/pcr/pacman2pacman/instructions.install b/pcr/pacman2pacman/instructions.install deleted file mode 100644 index 503573305..000000000 --- a/pcr/pacman2pacman/instructions.install +++ /dev/null @@ -1,41 +0,0 @@ -# This is a default template for a post-install scriptlet. -# Uncomment only required functions and remove any functions -# you don't need (and this header). - -## arg 1: the new package version -#pre_install() { - # do something here -#} - -## arg 1: the new package version -post_install() { - # do something here - echo 'transmission-daemon needs to be running for pacman2pacman to work:' - echo 'systemctl start transmission' - echo 'systemctl enable transmission' - echo - echo 'Put the following into /etc/pacman.conf: XferCommand = /usr/bin/pacman2pacman-get %u %o' -} - -## arg 1: the new package version -## arg 2: the old package version -#pre_upgrade() { - # do something here -#} - -## arg 1: the new package version -## arg 2: the old package version -#post_upgrade() { - # do something here -#} - -## arg 1: the old package version -#pre_remove() { - # do something here -#} - -## arg 1: the old package version -post_remove() { - # do something here - echo "Don't forget to remove pacman2pacman from pacman.conf's \`XferCommand' setting." -} -- cgit v1.2.3 From dab1f3d724bc5ce772677a9e52153275bb54436b Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Tue, 10 Jun 2014 11:19:14 +0200 Subject: ums --- pcr/ums/PKGBUILD | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'pcr') diff --git a/pcr/ums/PKGBUILD b/pcr/ums/PKGBUILD index 35d5878c4..5894c65d1 100644 --- a/pcr/ums/PKGBUILD +++ b/pcr/ums/PKGBUILD @@ -1,9 +1,9 @@ -# Contributor (Arch): Red Squirrel -# Maintainer : Parabola Aurélien DESBRIÈRES +# Contributor (Arch) : Red Squirrel +# Maintainer (Parabola) : Aurélien DESBRIÈRES # Based on PMS PKGBUILD pkgname=ums -pkgver=3.4.0 +pkgver=4.0.0 pkgrel=1 pkgdesc="Universal Media Server: a DLNA-compliant UPnP Media Server." arch=('i686' 'x86_64') @@ -15,18 +15,19 @@ makedepends=("unzip") optdepends=("vlc: For Internet video/audio") [ "$CARCH" = "x86_64" ] && \ optdepends=("vlc: Internet video/audio support" + "dcraw: thumbnails creation support" "lib32-gcc-libs: tsMuxeR support" "lib32-glibc: tsMuxeR support") backup=(opt/ums/UMS.conf \ opt/ums/WEB.conf) -source=("http://downloads.sourceforge.net/project/unimediaserver/Official%20Releases/Linux/UMS-$pkgver.tgz") +source=("http://downloads.sourceforge.net/project/unimediaserver/Official%20Releases/Linux/UMS-$pkgver-a1.tgz") package() { mkdir -p $pkgdir/opt/ums mkdir $pkgdir/opt/ums/database mkdir -p $pkgdir/usr/bin - chmod -R 755 $srcdir/$pkgname-$pkgver/plugins $srcdir/$pkgname-$pkgver/documentation - cp -r $srcdir/$pkgname-$pkgver/* $pkgdir/opt/ums/ + chmod -R 755 $srcdir/$pkgname-$pkgver-a1/plugins $srcdir/$pkgname-$pkgver-a1/documentation + cp -r $srcdir/$pkgname-$pkgver-a1/* $pkgdir/opt/ums/ chmod +x $pkgdir/opt/ums/UMS.sh \ $pkgdir/opt/ums/linux/tsMuxeR touch $pkgdir/opt/ums/UMS.conf @@ -41,7 +42,7 @@ package() { $pkgdir/opt/ums/debug.log \ $pkgdir/opt/ums/database - unzip -q -u $srcdir/$pkgname-$pkgver/ums.jar -d ums_jar + unzip -q -u $srcdir/$pkgname-$pkgver-a1/ums.jar -d ums_jar install -d -m 755 $pkgdir/usr/share/pixmaps install -D -m 644 $srcdir/ums_jar/resources/images/logo.png $pkgdir/usr/share/pixmaps/ums.png -- cgit v1.2.3 From 06fa8fcaa86f113d3cadea0e7da5ead5975c3d09 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Tue, 10 Jun 2014 11:40:10 +0200 Subject: ttf-font-awesome --- pcr/ttf-font-awesome/PKGBUILD | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'pcr') diff --git a/pcr/ttf-font-awesome/PKGBUILD b/pcr/ttf-font-awesome/PKGBUILD index 37254c735..179d8566c 100644 --- a/pcr/ttf-font-awesome/PKGBUILD +++ b/pcr/ttf-font-awesome/PKGBUILD @@ -1,9 +1,9 @@ -#Contributer (Arch): UNKNOWN o_O -#Maintainer : Parabola Aurélien DESBRIÈRES +# Contributor (Arch) : ? +# Maintainer (Parabola) : Aurélien DESBRIÈRES pkgname=ttf-font-awesome -pkgver=3.2.1 -pkgrel=2 +pkgver=4.0.3 +pkgrel=1 pkgdesc="Iconic font designed for Bootstrap" url="http://fortawesome.github.io/Font-Awesome/" license=('CCPL') @@ -11,9 +11,11 @@ depends=('fontconfig' 'xorg-font-utils') options=("!strip") install=$pkgname.install arch=('any') -source=('http://fortawesome.github.io/Font-Awesome/assets/font-awesome.zip') +source=("https://github.com/FortAwesome/Font-Awesome/archive/master.zip") +#source=("http://fortawesome.github.io/Font-Awesome/assets/font-awesome-$pkgver.zip") + package() { install -d "$pkgdir/usr/share/fonts/TTF" - cp -dpr --no-preserve=ownership "$srcdir/font-awesome/font/"*.ttf "$pkgdir/usr/share/fonts/TTF/" + cp -dpr --no-preserve=ownership "$srcdir/Font-Awesome-master/fonts/"*.ttf "$pkgdir/usr/share/fonts/TTF/" } -- cgit v1.2.3 From 1a4aeb92c3e7c51179a57a0cc8fb933bb56513e4 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Tue, 10 Jun 2014 14:12:24 +0200 Subject: cowpatty --- pcr/cowpatty/PKGBUILD | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pcr/cowpatty/PKGBUILD (limited to 'pcr') diff --git a/pcr/cowpatty/PKGBUILD b/pcr/cowpatty/PKGBUILD new file mode 100644 index 000000000..c29c53ad8 --- /dev/null +++ b/pcr/cowpatty/PKGBUILD @@ -0,0 +1,29 @@ +# Contributor (Arch) : CRT +# Contributor (Arch) : Sébastien Duquette +# Contributor (Arch) : icarus +# Contributor (Arch) : Stephane Travostino +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgname=cowpatty +pkgver=4.6 +pkgrel=5 +pkgdesc="Wireless WPA/WPA2 PSK handshake cracking utility" +arch=('i686' 'x86_64') +url="http://www.wirelessdefence.org/Contents/coWPAttyMain.htm" +license=('GPL') +depends=('openssl' 'libpcap') +options=('docs' '!makeflags') +source=("http://www.wirelessdefence.org/Contents/Files/cowpatty-$pkgver.tgz") + +build() { + cd "$srcdir/$pkgname-$pkgver" + make + make strip +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir/" BINDIR="/usr/bin/" install + install -D -m644 dict "$pkgdir"/usr/share/cowpatty/dict + install -D -m644 COPYING "$pkgdir"/usr/share/licenses/"$pkgname"/COPYING +} -- cgit v1.2.3 From 58e662a21a1c630310cd84a83c9330d993e03f7c Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Tue, 10 Jun 2014 14:21:00 +0200 Subject: arno-iptables-firewall --- pcr/arno-iptables-firewall/PKGBUILD | 69 ++++++++++++++++++++++ .../arno-iptables-firewall.patch | 25 ++++++++ .../arno-iptables-firewall.service | 14 +++++ 3 files changed, 108 insertions(+) create mode 100644 pcr/arno-iptables-firewall/PKGBUILD create mode 100644 pcr/arno-iptables-firewall/arno-iptables-firewall.patch create mode 100644 pcr/arno-iptables-firewall/arno-iptables-firewall.service (limited to 'pcr') diff --git a/pcr/arno-iptables-firewall/PKGBUILD b/pcr/arno-iptables-firewall/PKGBUILD new file mode 100644 index 000000000..f0def1909 --- /dev/null +++ b/pcr/arno-iptables-firewall/PKGBUILD @@ -0,0 +1,69 @@ +# Contributor (Arch) : Jaroslav Lichtblau +# Contributor (Arch) : Arto Puranen +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgname=arno-iptables-firewall +pkgver=2.0.1d +pkgrel=2 +pkgdesc="A secure stateful firewall for both single and multi-homed machine" +arch=('any') +url=(http://rocky.eld.leidenuniv.nl/joomla/) +license=('GPL') +depends=('iptables' 'iproute2') +makedepends=('patch') +backup=(etc/${pkgname}/firewall.conf + etc/${pkgname}/custom-rules + etc/${pkgname}/plugins/dmz-dnat.conf + etc/${pkgname}/plugins/dsl-ppp-modem.conf + etc/${pkgname}/plugins/dyndns-host-open.conf + etc/${pkgname}/plugins/ids-protection.conf + etc/${pkgname}/plugins/ipsec-vpn.conf + etc/${pkgname}/plugins/ipv6-over-ipv4.conf + etc/${pkgname}/plugins/linux-upnp-igd.conf + etc/${pkgname}/plugins/mac-address-filter.conf + etc/${pkgname}/plugins/multiroute.conf + etc/${pkgname}/plugins/sip-voip.conf + etc/${pkgname}/plugins/ssh-brute-force-protection.conf + etc/${pkgname}/plugins/traffic-accounting.conf + etc/${pkgname}/plugins/traffic-shaper.conf + etc/${pkgname}/plugins/transparent-dnat.conf + etc/${pkgname}/plugins/transparent-proxy.conf) +source=(http://rocky.eld.leidenuniv.nl/${pkgname}/${pkgname}_${pkgver}.tar.gz + ${pkgname}.patch \ + ${pkgname}.service) + +package() { + cd ${srcdir}/${pkgname}_${pkgver} + +# patch + patch -Np0 -i ${srcdir}/${pkgname}.patch + +# conf files + install -d -m 0755 etc/${pkgname}/plugins/ ${pkgdir}/etc/${pkgname}/plugins/ + for i in `find etc/${pkgname} -type f`; do install -T -m 0600 $i ${pkgdir}/$i ;done + install -D -m 0644 share/${pkgname}/environment ${pkgdir}/usr/share/${pkgname}/environment + +# plugins + install -d -m 0755 share/${pkgname}/plugins/ ${pkgdir}/usr/share/${pkgname}/plugins/ + for i in share/${pkgname}/plugins/*plugin; do install -T -m 0644 $i ${pkgdir}/usr/$i ;done + install -D -m 0744 share/${pkgname}/plugins/dyndns-host-open-helper \ + ${pkgdir}/usr/share/${pkgname}/plugins/dyndns-host-open-helper + install -D -m 0744 share/${pkgname}/plugins/traffic-accounting-helper \ + ${pkgdir}/usr/share/${pkgname}/plugins/traffic-accounting-helper + install -D -m 0744 share/${pkgname}/plugins/traffic-accounting-log-rotate \ + ${pkgdir}/usr/share/${pkgname}/plugins/traffic-accounting-log-rotate + install -D -m 0744 share/${pkgname}/plugins/traffic-accounting-show \ + ${pkgdir}/usr/share/${pkgname}/plugins/traffic-accounting-show + +# binary + install -D -m 0744 bin/${pkgname} ${pkgdir}/usr/bin/${pkgname} + install -D -m 0744 bin/arno-fwfilter ${pkgdir}/usr/bin/arno-fwfilter + install -D -m 0744 contrib/adsl-failover ${pkgdir}/usr/bin/adsl-failover + +# man files + install -D -m 0644 share/man/man1/arno-fwfilter.1 ${pkgdir}/usr/share/man/man1/arno-fwfilter.1 + install -D -m 0644 share/man/man8/${pkgname}.8 ${pkgdir}/usr/share/man/man8/${pkgname}.8 + +# systemd script + install -D -m 0644 ${srcdir}/${pkgname}.service ${pkgdir}/usr/lib/systemd/system/${pkgname}.service +} diff --git a/pcr/arno-iptables-firewall/arno-iptables-firewall.patch b/pcr/arno-iptables-firewall/arno-iptables-firewall.patch new file mode 100644 index 000000000..298d0c0b8 --- /dev/null +++ b/pcr/arno-iptables-firewall/arno-iptables-firewall.patch @@ -0,0 +1,25 @@ +--- etc/arno-iptables-firewall/firewall.conf 2010-12-30 13:17:02.000000000 +0100 ++++ etc/arno-iptables-firewall/firewall.conf 2011-01-22 21:10:39.000000000 +0100 +@@ -233,18 +233,18 @@ + # 'whereis iptables' to manually locate it), required for (default) IPv4 support + # ----------------------------------------------------------------------------- +-IP4TABLES="/sbin/iptables" ++IP4TABLES="/usr/bin/iptables" + + # (EXPERT SETTING!) Location of the ip6tables-binary (use 'locate ip6tables' or + # 'whereis ip6tables' to manually locate it), required for IPv6 support + # ----------------------------------------------------------------------------- +-IP6TABLES="/sbin/ip6tables" ++IP6TABLES="/usr/bin/ip6tables" + + # (EXPERT SETTING!) Location of the environment file + # ----------------------------------------------------------------------------- +-ENV_FILE="/usr/local/share/arno-iptables-firewall/environment" ++ENV_FILE="/usr/share/arno-iptables-firewall/environment" + + # (EXPERT SETTING!) Location of plugin binary & config files + # ----------------------------------------------------------------------------- +-PLUGIN_BIN_PATH="/usr/local/share/arno-iptables-firewall/plugins" ++PLUGIN_BIN_PATH="/usr/share/arno-iptables-firewall/plugins" + PLUGIN_CONF_PATH="/etc/arno-iptables-firewall/plugins" + diff --git a/pcr/arno-iptables-firewall/arno-iptables-firewall.service b/pcr/arno-iptables-firewall/arno-iptables-firewall.service new file mode 100644 index 000000000..2d81c9869 --- /dev/null +++ b/pcr/arno-iptables-firewall/arno-iptables-firewall.service @@ -0,0 +1,14 @@ +[Unit] +Description=A secure stateful firewall for both single and multi-homed machine +Before=network.target +Wants=network.target + +[Service] +Type=oneshot +ExecStart=/usr/bin/arno-iptables-firewall start +ExecStop=/usr/bin/arno-iptables-firewall stop +ExecReload=/usr/bin/arno-iptables-firewall force-reload +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target -- cgit v1.2.3 From d3615a2d9bf28c130b3c1f82c93f152d54c4816c Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Tue, 10 Jun 2014 19:08:22 +0200 Subject: packer --- pcr/packer/PKGBUILD | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) (limited to 'pcr') diff --git a/pcr/packer/PKGBUILD b/pcr/packer/PKGBUILD index f2ea54a76..5354d0192 100644 --- a/pcr/packer/PKGBUILD +++ b/pcr/packer/PKGBUILD @@ -1,36 +1,32 @@ -# Maintainer : Parabola GNU / Linux-libre Aurelien Desbrieres +# Contributor (Arch) : Kyle Keen +# Contributor (Arch) : Gilrain +# Contributor (Arch) : bruenig +# Maintainer (Parabola) : Aurélien DESBRIÈRES pkgname=packer -pkgver=20120302 +pkgver=20131001 pkgrel=1 pkgdesc="Bash wrapper for pacman and aur" -url="http://github.com/bruenig/packer" -license="GPL" +url="http://github.com/keenerd/packer" +license=("GPL3") arch=('any') +source=("https://repo.parabolagnulinux.org/other/~aurelien/packer/packer-${pkgver}.tar.gz") + makedepends=('git') -depends=('grep' 'sed' 'bash' 'curl' 'pacman' 'jshon') +depends=('grep' 'sed' 'bash' 'curl' 'pacman' 'jshon' 'expac') optdepends=('sudo: install and update packages as non-root' 'customizepkg: apply customizepkg modifications') -_gitroot='https://github.com/bruenig/packer.git' -_gitname='packer' -# Xavion is a non-contributing idiot +source=('git+https://github.com/keenerd/packer.git') + + +pkgver() { + cd "$pkgname" + git show -s --format="%ci" HEAD | sed -e 's/-//g' -e 's/ .*//' +} -build() { - cd "$srcdir" - - msg "Connecting to github GIT server...." - - if [ -d "$srcdir/$_gitname" ] ; then - cd $_gitname && git pull origin - else - git clone "$_gitroot" - cd $_gitname - fi - - mkdir -p "$pkgdir/usr/bin/" - mkdir -p "$pkgdir/usr/share/man/man8/" - install -m 755 packer "$pkgdir/usr/bin/packer" - install -m 644 packer.8 "$pkgdir/usr/share/man/man8/packer.8" +package() { + install -Dm755 "$srcdir/$pkgname/packer" "$pkgdir/usr/bin/packer" + install -Dm644 "$srcdir/$pkgname/packer.8" "$pkgdir/usr/share/man/man8/packer.8" } -- cgit v1.2.3 From 9434f08c80f838beb257aecf7ecb79b7ce0ec96a Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Tue, 10 Jun 2014 19:23:20 +0200 Subject: python-xbee --- pcr/python-xbee/PKGBUILD | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 pcr/python-xbee/PKGBUILD (limited to 'pcr') diff --git a/pcr/python-xbee/PKGBUILD b/pcr/python-xbee/PKGBUILD new file mode 100644 index 000000000..c0771bf3e --- /dev/null +++ b/pcr/python-xbee/PKGBUILD @@ -0,0 +1,17 @@ +# Contributor (Arch) : ? +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgname=python-xbee +pkgver=2.1.0 +pkgrel=1 +pkgdesc='Python tools for working with XBee radios' +url='https://pypi.python.org/pypi/XBee' +arch=('any') +license=('MIT') +depends=('python' 'python-pyserial') +source=("https://pypi.python.org/packages/source/X/XBee/XBee-${pkgver}.tar.gz") + +package() { + cd XBee-$pkgver + python setup.py install --root="$pkgdir" +} -- cgit v1.2.3 From f6a9602cf6f03ced84cda8257d79a64671c507d0 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Tue, 10 Jun 2014 19:39:38 +0200 Subject: devmem --- pcr/devmem/PKGBUILD | 24 +++++++++++++++ pcr/ros-hydro-rosserial-xbee/PKGBUILD | 58 +++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 pcr/devmem/PKGBUILD create mode 100644 pcr/ros-hydro-rosserial-xbee/PKGBUILD (limited to 'pcr') diff --git a/pcr/devmem/PKGBUILD b/pcr/devmem/PKGBUILD new file mode 100644 index 000000000..ab664447e --- /dev/null +++ b/pcr/devmem/PKGBUILD @@ -0,0 +1,24 @@ +# Contributor (Arch) : Brice Waegeneire < brice dot wge at gmail dot com > +# Contributor (Arch) : Alexander Lam +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgname=devmem +pkgver=2 +pkgrel=2 +pkgdesc="A small utility to access /dev/mem and read/write to any memory location" +arch=('any') +url="http://free-electrons.com/pub/mirror/devmem2.c" +license=('GPL2') +source=("http://free-electrons.com/pub/mirror/${pkgname}${pkgver}.c") + + +build() { + cd "$srcdir/" + gcc devmem2.c -o devmem2 +} + +package() { + install -D -m755 ${srcdir}/devmem2 ${pkgdir}/usr/bin/devmem2 +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/ros-hydro-rosserial-xbee/PKGBUILD b/pcr/ros-hydro-rosserial-xbee/PKGBUILD new file mode 100644 index 000000000..cbd21c4ee --- /dev/null +++ b/pcr/ros-hydro-rosserial-xbee/PKGBUILD @@ -0,0 +1,58 @@ +# Script generated with import_catkin_packages.py +# For more information: https://github.com/bchretien/arch-ros-stacks +# pkgdesc="ROS - rosserial_xbee provides tools to do point to multipoint communication between rosserial nodes connected to an xbee." +# url='http://ros.org/wiki/rosserial_xbee' +# Contributor (Arch) : ? +# Contributor (Parabola) : Aurélien DESBRIÈRES + +pkgname='ros-hydro-rosserial-xbee' +pkgver='0.5.5' +_pkgver_patch=0 +arch=('any') +pkgrel=1 +license=('BSD') + +ros_makedepends=(ros-hydro-catkin) +makedepends=('cmake' 'git' 'ros-build-tools' + ${ros_makedepends[@]}) + +ros_depends=(ros-hydro-rospy + ros-hydro-diagnostic-msgs + ros-hydro-rosserial-msgs + ros-hydro-rosserial-python) +depends=(${ros_depends[@]} + python2-pyserial) + +_tag=release/hydro/rosserial_xbee/${pkgver}-${_pkgver_patch} +_dir=rosserial_xbee +source=("${_dir}"::"git+https://github.com/ros-gbp/rosserial-release.git"#tag=${_tag}) +md5sums=('SKIP') + +build() { + # Use ROS environment variables + /usr/share/ros-build-tools/clear-ros-env.sh + [ -f /opt/ros/hydro/setup.bash ] && source /opt/ros/hydro/setup.bash + + # Create build directory + [ -d ${srcdir}/build ] || mkdir ${srcdir}/build + cd ${srcdir}/build + + # Fix Python2/Python3 conflicts + /usr/share/ros-build-tools/fix-python-scripts.sh ${srcdir}/${_dir} + + # Build project + cmake ${srcdir}/${_dir} \ + -DCMAKE_BUILD_TYPE=Release \ + -DCATKIN_BUILD_BINARY_PACKAGE=ON \ + -DCMAKE_INSTALL_PREFIX=/opt/ros/hydro \ + -DPYTHON_EXECUTABLE=/usr/bin/python2 \ + -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 \ + -DPYTHON_LIBRARY=/usr/lib/libpython2.7.so \ + -DSETUPTOOLS_DEB_LAYOUT=OFF + make +} + +package() { + cd "${srcdir}/build" + make DESTDIR="${pkgdir}/" install +} -- cgit v1.2.3 From 9b4fa48711271fd0005ce99553fa0dc25f9f731b Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Tue, 10 Jun 2014 19:43:14 +0200 Subject: bbb-gadgets --- pcr/bbb-gadgets/LICENSE | 17 +++++++ pcr/bbb-gadgets/PKGBUILD | 30 ++++++++++++ pcr/bbb-gadgets/dhcpd-usb0.conf | 4 ++ pcr/bbb-gadgets/g-ether-load.sh | 71 +++++++++++++++++++++++++++++ pcr/bbb-gadgets/network-gadget-init.service | 11 +++++ pcr/bbb-gadgets/storage-gadget-init.service | 10 ++++ 6 files changed, 143 insertions(+) create mode 100644 pcr/bbb-gadgets/LICENSE create mode 100644 pcr/bbb-gadgets/PKGBUILD create mode 100644 pcr/bbb-gadgets/dhcpd-usb0.conf create mode 100755 pcr/bbb-gadgets/g-ether-load.sh create mode 100644 pcr/bbb-gadgets/network-gadget-init.service create mode 100644 pcr/bbb-gadgets/storage-gadget-init.service (limited to 'pcr') diff --git a/pcr/bbb-gadgets/LICENSE b/pcr/bbb-gadgets/LICENSE new file mode 100644 index 000000000..fb950dc69 --- /dev/null +++ b/pcr/bbb-gadgets/LICENSE @@ -0,0 +1,17 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/pcr/bbb-gadgets/PKGBUILD b/pcr/bbb-gadgets/PKGBUILD new file mode 100644 index 000000000..4affed078 --- /dev/null +++ b/pcr/bbb-gadgets/PKGBUILD @@ -0,0 +1,30 @@ +# Contributor (Arch) : Brice Waegeneire < brice dot wge at gmail dot com > +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgname=bbb-gadgets +pkgver=20130905 +pkgrel=3 +pkgdesc="Units to initialize usb gadgets for the BeagleBone Black" +arch=('any') +url="http://www.beagleboard.org/" +license=('MIT') +makedepends=('git') +depends=('bash' 'systemd' 'dhcp' 'devmem') +backup=('etc/dhcpd-usb0.conf') +source=('dhcpd-usb0.conf' + 'g-ether-load.sh' + 'LICENSE' + 'network-gadget-init.service' + 'storage-gadget-init.service') + +package() { + install -d $pkgdir/usr/lib/systemd/system + install -m 0644 $srcdir/*.service $pkgdir/usr/lib/systemd/system + + install -D -m 0644 $srcdir/dhcpd-usb0.conf $pkgdir/etc/dhcpd-usb0.conf + + install -D -m 0755 $srcdir/g-ether-load.sh $pkgdir/usr/bin/g-ether-load.sh + + install -D -m 0644 $srcdir/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + diff --git a/pcr/bbb-gadgets/dhcpd-usb0.conf b/pcr/bbb-gadgets/dhcpd-usb0.conf new file mode 100644 index 000000000..935477523 --- /dev/null +++ b/pcr/bbb-gadgets/dhcpd-usb0.conf @@ -0,0 +1,4 @@ +subnet 192.168.7.0 netmask 255.255.255.0 { + range 192.168.7.1 192.168.7.1; +} + diff --git a/pcr/bbb-gadgets/g-ether-load.sh b/pcr/bbb-gadgets/g-ether-load.sh new file mode 100755 index 000000000..e4f39079d --- /dev/null +++ b/pcr/bbb-gadgets/g-ether-load.sh @@ -0,0 +1,71 @@ +#!/bin/sh + +function get_devmem() +{ + /usr/bin/devmem2 $1 | grep ": " | cut -d ":" -f 2|cut -d "x" -f 2 +} + +function hex_to_mac_addr() +{ + addr=$1 + n=0 + mac_addr=$(echo ${addr} | while read -r -n2 c; do + if [ ! -z "$c" ]; then + if [ $n -ne 0 ] ; then + echo -n ":${c}" + else + echo -n "${c}" + fi + fi + n=$(($n+1)) + done) + echo ${mac_addr} +} + +function reverse_bytes() +{ + addr=$1 + New_addr=$(echo ${addr} | while read -r -n2 c; do + if [ ! -z "$c" ]; then + New_addr=${c}${New_addr} + else echo + echo ${New_addr} + fi + done) + echo ${New_addr} +} + +mac_address="/proc/device-tree/ocp/ethernet@4a100000/slave@4a100300/mac-address" +if [ -f ${mac_address} ] ; then + DEV_ADDR=$(hexdump -v -e '1/1 "%02X" ":"' ${mac_address} | sed 's/.$//') +else + DEVMEM_ADDR_LO=$(get_devmem 0x44e10638|bc) + DEVMEM_ADDR_LO=$(reverse_bytes ${DEVMEM_ADDR_LO}) + + DEVMEM_ADDR_HI=$(get_devmem 0x44e1063C) + DEVMEM_ADDR_HI=$(reverse_bytes ${DEVMEM_ADDR_HI}) + + DEV_ADDR=$(hex_to_mac_addr "${DEVMEM_ADDR_HI}${DEVMEM_ADDR_LO}") +fi + +SERIAL_NUMBER=$(hexdump -e '8/1 "%c"' /sys/bus/i2c/devices/0-0050/eeprom -s 14 -n 2)-$(hexdump -e '8/1 "%c"' /sys/bus/i2c/devices/0-0050/eeprom -s 16 -n 12) +ISBLACK=$(hexdump -e '8/1 "%c"' /sys/bus/i2c/devices/0-0050/eeprom -s 8 -n 4) + +BLACK="" + +if [ "${ISBLACK}" = "BBBK" ] ; then + BLACK="Black" +fi + +if [ "${ISBLACK}" = "BNLT" ] ; then + BLACK="Black" +fi + +modprobe g_multi file=/dev/mmcblk0p1 cdrom=0 stall=0 removable=1 nofua=1 iSerialNumber=${SERIAL_NUMBER} iManufacturer=Circuitco iProduct=BeagleBone${BLACK} host_addr=${DEV_ADDR} + +sleep 1 + +/usr/bin/ifconfig usb0 192.168.7.2 netmask 255.255.255.252 +/usr/bin/route add default gw 192.168.7.1 + +/usr/bin/dhcpd -4 -q -cf /etc/dhcpd-usb0.conf usb0 diff --git a/pcr/bbb-gadgets/network-gadget-init.service b/pcr/bbb-gadgets/network-gadget-init.service new file mode 100644 index 000000000..47573a1ec --- /dev/null +++ b/pcr/bbb-gadgets/network-gadget-init.service @@ -0,0 +1,11 @@ +[Unit] +Description=Start USB Ethernet gadget +Conflicts=storage-gadget-init.service + +[Service] +RemainAfterExit=yes +ExecStart=/usr/bin/g-ether-load.sh +ExecStop=/usr/bin/rmmod g_ether + +[Install] +WantedBy=basic.target diff --git a/pcr/bbb-gadgets/storage-gadget-init.service b/pcr/bbb-gadgets/storage-gadget-init.service new file mode 100644 index 000000000..8c2a30c12 --- /dev/null +++ b/pcr/bbb-gadgets/storage-gadget-init.service @@ -0,0 +1,10 @@ +[Unit] +Description=Start usb mass storage gadget +After=dev-mmcblk0p1.device + +[Service] +Type=simple +ExecStart=/usr/bin/g-ether-load.sh + +[Install] +WantedBy=basic.target -- cgit v1.2.3 From 537f403835a02948ee2feaa87aebe6af76a97e44 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Tue, 10 Jun 2014 20:15:51 +0200 Subject: ipycli-git --- pcr/ipycli-git/PKGBUILD | 55 ++++++++++++++++++------------------------------- 1 file changed, 20 insertions(+), 35 deletions(-) (limited to 'pcr') diff --git a/pcr/ipycli-git/PKGBUILD b/pcr/ipycli-git/PKGBUILD index 7ccf64839..533d96a78 100644 --- a/pcr/ipycli-git/PKGBUILD +++ b/pcr/ipycli-git/PKGBUILD @@ -1,56 +1,41 @@ -# Contributor (Arch): Francois Boulogne -# Maintainer: Parabola GNU / Linux-libre Aurélien Desbrières +# Contributor: Francois Boulogne +# Maintainer : Parabola GNU / Linux-libre Aurélien DESBRIÈRES pkgname=ipycli-git -pkgver=20121109 -pkgrel=2 +pkgver=r135.baa33ed +pkgrel=1 pkgdesc="IPython subapp that supports adding arbitrary notebooks from the command line" arch=('i686' 'x86_64') url="https://github.com/dalejung/ipycli/" -license=('UNKNOWN') +license=('BSD') depends=('python2' 'ipython2') optdepends=() makedepends=('git' 'python2') install= provides=() conflicts=() -source=() +source=("git://github.com/dalejung/ipycli.git") +md5sums=("SKIP") +pkgver() { + cd "$srcdir/ipycli" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} -_gitroot="git://github.com/dalejung/ipycli.git" -_gitname="ipycli" - -build() { - - cd "$srcdir" - msg "Connecting to GIT server...." - - if [ -d $_gitname ] ; then - cd $_gitname && git pull origin - msg "The local files are updated." - else - git clone $_gitroot $_gitname - fi - - msg "GIT checkout done or server timeout" - msg "Starting make..." - - rm -rf "$srcdir/$_gitname-build" - git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build" - cd "$srcdir/$_gitname-build" - +package() { + cd "$srcdir/ipycli" #lib - python2 setup.py install --root="${pkgdir}" + python2 setup.py install --root="${pkgdir}" #bin mkdir "${pkgdir}/usr/bin" - cp "bin/nb" "${pkgdir}/usr/bin" - sed -i -e "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" "${pkgdir}/usr/bin/nb" - cp "bin/ipycli" "${pkgdir}/usr/bin" - sed -i -e "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" "${pkgdir}/usr/bin/ipycli" + cp "bin/nb" "${pkgdir}/usr/bin" + sed -i -e "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" "${pkgdir}/usr/bin/nb" + cp "bin/ipycli" "${pkgdir}/usr/bin" + sed -i -e "s|#!/usr/bin/env python$|#!/usr/bin/env python2|" "${pkgdir}/usr/bin/ipycli" #templates/statics - cp -r "ipycli/static" "${pkgdir}/usr/lib/python2.7/site-packages/ipycli/" - cp -r "ipycli/templates" "${pkgdir}/usr/lib/python2.7/site-packages/ipycli/" + cp -r "ipycli/static" "${pkgdir}/usr/lib/python2.7/site-packages/ipycli/" + cp -r "ipycli/templates" "${pkgdir}/usr/lib/python2.7/site-packages/ipycli/" } # vim:set ts=2 sw=2 et: -- cgit v1.2.3 From 57df863289a196472d9babbc39c7c0ee1af9410d Mon Sep 17 00:00:00 2001 From: Esteban Carnevale Date: Tue, 10 Jun 2014 20:09:38 -0300 Subject: pacman2pacman-1.4.1-2: update version --- pcr/pacman2pacman/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pcr') diff --git a/pcr/pacman2pacman/PKGBUILD b/pcr/pacman2pacman/PKGBUILD index f07efff7d..13dcf2e18 100644 --- a/pcr/pacman2pacman/PKGBUILD +++ b/pcr/pacman2pacman/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Joseph Graham pkgname=pacman2pacman pkgver=1.4.1 -pkgrel=1 +pkgrel=2 pkgdesc="A plugin for pactor to download packages by bittorrent and seed them back up" arch=(any) url="https://wiki.parabolagnulinux.org/Pacman2pacman" @@ -10,7 +10,7 @@ depends=(transmission-cli) options=(emptydirs) install=$pkgname.install source=(https://t67.eu/filebin/$pkgname-$pkgver.tar.gz) -md5sums=('736eb3d6d557030f733b4b3f4e08c2be') +md5sums=('c7972067210b67c1b51d81c6f537927a') package() { cd $pkgname -- cgit v1.2.3 From 63a57aadee0c0d210f1a06c541c6eba887ef6e59 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Wed, 11 Jun 2014 17:29:59 -0300 Subject: parcimonie-sh-git --- pcr/parcimonie-sh-git/PKGBUILD | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 pcr/parcimonie-sh-git/PKGBUILD (limited to 'pcr') diff --git a/pcr/parcimonie-sh-git/PKGBUILD b/pcr/parcimonie-sh-git/PKGBUILD new file mode 100644 index 000000000..da9097afc --- /dev/null +++ b/pcr/parcimonie-sh-git/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Etienne Perot +pkgname=parcimonie-sh-git +pkgver=16.9523a3e +pkgrel=1 +pkgdesc='Bash reimplementation of parcimonie - Refresh your GnuPG keyring without disclosing your whole contact list to the world' +arch=('any') +url='https://github.com/EtiennePerot/parcimonie.sh' +license=('WTFPL') +depends=('bash' 'torsocks' 'tor' 'gnupg') +makedepends=('git') +source=('git+https://github.com/EtiennePerot/parcimonie.sh') +sha512sums=('SKIP') + +pkgver() { + cd "$startdir/parcimonie.sh" + echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)" +} + +build() { + : +} + +package() { + cd "$srcdir/parcimonie.sh" + install -D -m644 README.md "${pkgdir}/usr/share/parcimonie.sh/README.md" + install -D -m755 parcimonie.sh "${pkgdir}/usr/share/parcimonie.sh/parcimonie.sh" + install -D -m644 pkg/parcimonie.sh@.service "${pkgdir}/usr/lib/systemd/system/parcimonie.sh@.service" + install -D -m644 pkg/sample-configuration.conf.sample "${pkgdir}/etc/parcimonie.sh.d/sample-configuration.conf.sample" + install -D -m644 pkg/all-users.conf "${pkgdir}/etc/parcimonie.sh.d/all-users.conf" + mkdir -p "${pkgdir}/usr/bin" + ln -sf /usr/share/parcimonie.sh/parcimonie.sh "${pkgdir}/usr/bin/parcimonie.sh" +} -- cgit v1.2.3 From d79b0b70c7951aa68158d1957dfe6130cf9bf63e Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Wed, 11 Jun 2014 17:30:52 -0300 Subject: irssi-otr --- pcr/irssi-otr/PKGBUILD | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 pcr/irssi-otr/PKGBUILD (limited to 'pcr') diff --git a/pcr/irssi-otr/PKGBUILD b/pcr/irssi-otr/PKGBUILD new file mode 100644 index 000000000..ae8552c33 --- /dev/null +++ b/pcr/irssi-otr/PKGBUILD @@ -0,0 +1,26 @@ +# Maintainer: Christian Babeux + +pkgname=irssi-otr +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Off-the-Record Messaging (OTR) for the Irssi IRC client" +arch=('i686' 'x86_64') +url="https://github.com/cryptodotis/irssi-otr" +provides=('irssi-otr4') +license=('GPL2') +depends=('libotr>=4.0.0' 'irssi>=0.8.15' 'libgcrypt>=1.5.0' 'glib2') +source=("https://github.com/cryptodotis/irssi-otr/archive/v$pkgver.tar.gz") +sha1sums=('1a981b96317778cdf72c0d2a8b08c44f72d808e5') + +build() +{ + cd "irssi-otr-${pkgver}" + ./bootstrap + ./configure --prefix=/usr + make +} + +package() { + cd "irssi-otr-${pkgver}" + make install DESTDIR=${pkgdir} +} -- cgit v1.2.3 From 1b51456c72d5a2c734935c1a23d02d4fdeca74d4 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Thu, 12 Jun 2014 08:02:27 +0200 Subject: nova --- pcr/nova/PKGBUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pcr') diff --git a/pcr/nova/PKGBUILD b/pcr/nova/PKGBUILD index 4da77e669..23e34afc0 100644 --- a/pcr/nova/PKGBUILD +++ b/pcr/nova/PKGBUILD @@ -1,4 +1,4 @@ -# Maintainer (Arch) : Limao Luo +# Contributor (Arch) : Limao Luo # Contributor (Arch) : Josh Chase # Maintainer (Parabola) : Aurélien DESBRIÈRES -- cgit v1.2.3 From 7ea31861e8f5b8e8c77be5d68c62c38a319c3223 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Thu, 12 Jun 2014 09:02:09 +0200 Subject: irssi-otr-git --- pcr/irssi-otr-git/PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pcr/irssi-otr-git/PKGBUILD (limited to 'pcr') diff --git a/pcr/irssi-otr-git/PKGBUILD b/pcr/irssi-otr-git/PKGBUILD new file mode 100644 index 000000000..b4d19d97a --- /dev/null +++ b/pcr/irssi-otr-git/PKGBUILD @@ -0,0 +1,43 @@ +# Contributor (Arch) : quantax -- contact via Arch Linux forum or AUR +# Contributor (Arch) : Federico Cinelli +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgname=irssi-otr-git +pkgver=20090814 +pkgrel=1 +pkgdesc="Off-the-Record Messaging (OTR) for the Irssi IRC client." +arch=('i686' 'x86_64') +url="http://irssi-otr.tuxfamily.org/" +license=('GPL') +depends=(irssi libotr git) +makedepends=(cmake pkgconfig python) +conflicts=(irssi-otr) +provides=(irssi-otr) +source=('git://git.tuxfamily.org/gitroot/irssiotr/irssiotr.git') + +_gitroot="git://git.tuxfamily.org/gitroot/irssiotr/irssiotr.git" +_gitname="irssiotr" + +build() { + cd "$srcdir" + msg "Connecting to GIT server...." + + if [ -d "$_gitname" ] ; then + cd "$_gitname" && git pull origin + msg "The local files are updated." + else + git clone "$_gitroot" + fi + + msg "GIT checkout done or server timeout" + msg "Starting make..." + + rm -rf "$srcdir/$_gitname-build" + cp -r "$srcdir/$_gitname" "${srcdir}/${_gitname}-build" + cd "$srcdir/$_gitname-build" + + cmake -DCMAKE_INSTALL_PREFIX=/usr . + cp -f LICENSE README irssi + make && make DESTDIR="$pkgdir/" install +} + -- cgit v1.2.3 From c7e9df92c473d64ee98d3717462abf424d080578 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Thu, 12 Jun 2014 09:22:29 +0200 Subject: zulucrypt --- pcr/zulucrypt/PKGBUILD | 7 ++++--- pcr/zulucrypt/zulucrypt.changelog | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'pcr') diff --git a/pcr/zulucrypt/PKGBUILD b/pcr/zulucrypt/PKGBUILD index 3beb2a7f8..21683a01f 100644 --- a/pcr/zulucrypt/PKGBUILD +++ b/pcr/zulucrypt/PKGBUILD @@ -1,8 +1,8 @@ -# Contributor: Salan54 -# Maintainer : Parabola Aurélien DESBRIÈRES +# Contributor (Arch) : Salan54 +# Maintainer (Parabola) : Aurélien DESBRIÈRES pkgname=zulucrypt -pkgver=4.7.1 +pkgver=4.7.2 pkgrel=1 _altpkgname=zuluCrypt pkgdesc="a cli and gui frontend to cryptsetup." @@ -15,6 +15,7 @@ conflicts=('zulucrypt-git') makedepends=('cmake') options=('!buildflags') source=("https://github.com/mhogomchungu/zuluCrypt/releases/download/${pkgver}/${_altpkgname}-${pkgver}.tar.bz2") + changelog=${pkgname}.changelog install=${pkgname}.install diff --git a/pcr/zulucrypt/zulucrypt.changelog b/pcr/zulucrypt/zulucrypt.changelog index f69f7f5d4..dc4d6fc60 100644 --- a/pcr/zulucrypt/zulucrypt.changelog +++ b/pcr/zulucrypt/zulucrypt.changelog @@ -185,3 +185,6 @@ version 4.7.0 version 4.7.1 -- fix a build issue in gcc 4.9 + +version 4.7.2 +-- add support for opening TrueCrypt volumes using a passphrase together with one or more keyfiles. -- cgit v1.2.3 From 6a56e9dd97b0d1a482f2ce4bede5f8921866985c Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Fri, 13 Jun 2014 14:01:51 +0200 Subject: Paraboley an eye on your system --- pcr/paraboley/COPYING | 5 + pcr/paraboley/PKGBUILD | 30 ++ pcr/paraboley/README.md | 4 + pcr/paraboley/paraboley | 866 ++++++++++++++++++++++++++++++++++++++++++++++++ pcr/paraboley/setup.py | 17 + 5 files changed, 922 insertions(+) create mode 100644 pcr/paraboley/COPYING create mode 100644 pcr/paraboley/PKGBUILD create mode 100644 pcr/paraboley/README.md create mode 100755 pcr/paraboley/paraboley create mode 100644 pcr/paraboley/setup.py (limited to 'pcr') diff --git a/pcr/paraboley/COPYING b/pcr/paraboley/COPYING new file mode 100644 index 000000000..53556406c --- /dev/null +++ b/pcr/paraboley/COPYING @@ -0,0 +1,5 @@ +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, either version 3 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with this program. If not, see . diff --git a/pcr/paraboley/PKGBUILD b/pcr/paraboley/PKGBUILD new file mode 100644 index 000000000..a5f4b8d72 --- /dev/null +++ b/pcr/paraboley/PKGBUILD @@ -0,0 +1,30 @@ +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgname=paraboley +pkgver=0.1 +pkgrel=1 +pkgdesc="Python script to display system infomation alongside the Parabola GNU / Linux-libre logo." +arch=('any') +url="https://github.com/XL04D/paraboley" +license=('GPL') +depends=('python') +makedepends=('git' 'python-distribute') +optdepends=( +'python-mpd-git: python libary for mpd interaction', +'python-logbook-git: for logging' +'imagemagick: for default screenshot command' +) +conflicts=() +provides=('paraboley') +source="git://github.com/XL04D/paraboley.git" + +pkgver() { + cd ${pkgname} + git describe --always | sed 's|-|.|g' +} + +package() { + cd "$srcdir/$pkgname" + python setup.py install --root=${pkgdir} + install -D -m644 COPYING ${pkgdir}/usr/share/licenses/paraboley/COPYING +} diff --git a/pcr/paraboley/README.md b/pcr/paraboley/README.md new file mode 100644 index 000000000..e24e8fe12 --- /dev/null +++ b/pcr/paraboley/README.md @@ -0,0 +1,4 @@ +Paraboley +======== + +Paraboley is a system infomation printer, designed to be used when taking screenshots of computer desktops to provide additional infomation about the operating system setup. Paraboley is designed to be used for Parabola GNU / Linux-libre, and it acordingly prints out the Parabola GNU / Linux-libre logo along side the system infomation. \ No newline at end of file diff --git a/pcr/paraboley/paraboley b/pcr/paraboley/paraboley new file mode 100755 index 000000000..3be683cc9 --- /dev/null +++ b/pcr/paraboley/paraboley @@ -0,0 +1,866 @@ +#!/usr/bin/env python +# +# Paraboley is a forked made by Aurélien DESBIRÈRES +# of archey3 to present the Parabola GNU / Linux-libre logo and informations +# +# archey3 [version 0.5] +# +# Copyright 2010 Melik Manukyan +# Copyright 2010-2012 Laurie Clark-Michalek +# Distributed under the terms of the GNU General Public License v3. +# See http://www.gnu.org/licenses/gpl.txt for the full license text. +# +# Simple python script to display an Archlinux logo in ASCII art +# Along with basic system information. + +# Import libraries +import collections +import subprocess, optparse, re, sys, configparser +from subprocess import Popen, PIPE +from optparse import OptionParser +from getpass import getuser +from time import ctime, sleep +from os import getenv +from datetime import datetime +import re +import os.path +import multiprocessing + +try: + from logbook import Logger, lookup_level +except ImportError: + class Logger(object): + def __init__(self, name, level=0): + self.name = name + self.level = level + debug = info = warn = warning = notice = error = exception = \ + critical = log = lambda *a, **kw: None + + def lookup_level(_): + return 0 + +UNAME_FLAG_MEANINGS = { + 'a': 'System Infomation', + 's': 'Kernel Name', + 'n': 'Hostname', + 'r': 'Kernel Release', + 'v': 'Kernel Version', + 'm': 'Machine Hardware name', + 'p': 'Processor Type', + 'i': 'Hardware Platform', +} + +LOGOS = {'Parabola GNU / Linux-libre': '''{1} +{c1} ## ### {results[0]} +{c1} ## ## ##### {results[1]} +{c1} ## ## ## ####### {results[2]} +{c1} # ## ## ## ######## {results[3]} +{c1} ### ## ## ## ######### {results[4]} +{c1} ##### ## ######### {results[5]} +{c1} ## ######## {results[6]} +{c1} ####### {results[7]} +{c1} ###### {results[8]} +{c1} ###### {results[9]} +{c1} ##### {results[10]} +{c1} ##### {results[11]} +{c1} #### {results[12]} +{c1} #### {results[13]} +{c1} ### {results[14]} +{c1} ### {results[15]} +{c1} ## {results[16]} +{c1] # {results[17]} +\x1b[0m''' +} + + +CLASS_MAPPINGS = {} + +def module_register(name): + """ + Registers the class in the CLASS_MAPPING global. + """ + def decorator(cls): + CLASS_MAPPINGS[name] = cls + return cls + return decorator + +DE_DICT = collections.OrderedDict([ + ('cinnamon', 'Cinnamon'), + ('gnome-session', 'GNOME'), + ('ksmserver', 'KDE'), + ('xfce4-session', 'Xfce'), + ('lxsession', 'LXDE'), + ('', 'None'), + ]) + +WM_DICT = collections.OrderedDict([ + ('awesome', 'Awesome'), + ('beryl', 'Beryl'), + ('blackbox', 'Blackbox'), + ('dwm', 'DWM'), + ('enlightenment', 'Enlightenment'), + ('fluxbox', 'Fluxbox'), + ('fvwm', 'FVWM'), + ('i3', 'i3'), + ('icewm', 'IceWM'), + ('kwin', 'KWin'), + ('metacity', 'Metacity'), + ('musca', 'Musca'), + ('openbox', 'Openbox'), + ('pekwm', 'PekWM'), + ('ratpoison', 'ratpoison'), + ('scrotwm', 'ScrotWM'), + ('subtle', 'subtle'), + ('monsterwm', 'MonsterWM'), + ('wmaker', 'Window Maker'), + ('wmfs', 'Wmfs'), + ('wmii', 'wmii'), + ('xfwm4', 'Xfwm'), + ('emerald', 'Emerald'), + ('compiz', 'Compiz'), + (re.compile('xmonad-*'), 'xmonad'), + ('qtile', 'QTile'), + ('wingo', 'Wingo'), + ('', 'None'), + ]) + +COLORS = { + 'black': '0', + 'red': '1', + 'green': '2', + 'yellow': '3', + 'blue': '4', + 'magenta': '5', + 'cyan': '6', + 'white': '7' +} + +class ArgumentError(Exception): + def __init__(self, caller, message): + msg = "{0}: {1}".format(caller.__class__.__name__, message) + super().__init__(msg) + +# State must be serializable +State = collections.namedtuple("State", "color config logger") + +class display(object): + command_line = '' + stdindata = '' + + def __init__(self, state, args=()): + self.state = state + # Python3 unpacking is awesome + self.arg1, self.arg2, self.arg3, *_ = tuple(args) + ('', '', '') + + @staticmethod + def call_command(command): + """ + Calls a command, waits for it to exit and returns all text from stdout. + Discards all other information. + """ + proc = Popen(command.split(), stdout=PIPE) + proc.wait() + return proc.communicate()[0].decode() + + def run_command(self): + if self.command_line: + if '{arg3}' in self.command_line: + cmd = self.command_line.format(arg1=self.arg1, arg2=self.arg2, + arg3=self.arg3) + elif '{arg2}' in self.command_line: + cmd = self.command_line.format(arg1=self.arg1, arg2=self.arg2) + elif '{arg1}' in self.command_line: + cmd = self.command_line.format(arg1=self.arg1) + else: + cmd = self.command_line + + try: + self.process = Popen(cmd.split(), stdin=PIPE, stdout=PIPE, + stderr=PIPE) + except Exception as e: + self.state.logger.error("Could not run command {0}".format(cmd)) + + def render(self): + (stdoutdata, stderrdata) = self.process.communicate(self.stdindata + or None) + + return self.format_output(stdoutdata.decode()) + + def color_me(self, output, number=None, low=30, low_color='green', + medium=60, medium_color='yellow', high_color='red'): + if number is None and output.isdigit(): + number = int(output) + elif number is None: + return output + + if number <= low: + color_= low_color + elif low < number <= medium: + color_ = medium_color + elif medium < number: + color_ = high_color + + return '{0}{1}{2}'.format(color(self.state, color_), output, + color(self.state, 'clear')) + + regex_class = re.compile("").__class__ + def process_exists(self, key): + global PROCESSES + if isinstance(key, self.regex_class): + for proc in PROCESSES._processes: + if key.search(proc): + return True + return PROCESSES(key) + + +@module_register("fs") +class fsDisplay(display): + command_line = "df -TPh {arg1}" + + conversions = { + 'binary': { + 'K': 2 ** 10, + 'M': 2 ** 20, + 'G': 2 ** 30, + 'T': 2 ** 40, + }, + 'si': { + 'K': 10 ** 3, + 'M': 10 ** 6, + 'G': 10 ** 9, + 'T': 10 ** 12, + }, + } + + def __init__(self, **kwargs): + super().__init__(**kwargs) + if not self.arg1: + msg = "Did not any arguments, require one, the fs to display" + self.state.logger.error(msg) + raise ArgumentError(self, msg) + + def format_output(self, instring): + try: + decimal_point = self.call_command( + 'locale -ck decimal_point').split('\n')[1].split('=')[1] + except Exception as e: + self.state.logger.warning('Could not determine locale decimal point,' + + 'defaulting to \'.\', failed with error {0}'.format(e)) + decimal_point = '.' + values = [line for line in instring.split('\n') if line][1].split() + used = values[3].replace(decimal_point, '.') + total = values[2].replace(decimal_point, '.') + fstype = values[1] + conversion_type = self.state.config.get('fs', 'unit', fallback="si").lower() + conversions = self.conversions[conversion_type] + + mount = '/root' if self.arg1 == '/' else self.arg1 + title = mount.split('/')[-1].title() + + low = self.state.config.getint('fs', 'low_bound', fallback=40) + medium = self.state.config.getint('fs', 'medium_bound', fallback=70) + + try: + #convert to straight float + used_ = float(used[:-1]) * conversions[used[-1].upper()] + total_ = float(total[:-1]) * conversions[total[-1].upper()] + persentage = used_ / total_ * 100 + except Exception as e: + self.state.logger.error( + "Could not colorize output, errored with {0}".format(e)) + return + else: + used = self.color_me(used, persentage, low=low, medium=medium) + + if self.state.config.getboolean("fs", "persentage", fallback=True): + part = '{used} / {total} ({persentage}%) ({fstype})'.format( + used=used, total=total, persentage=int(persentage), + fstype=fstype) + else: + part = '{used} / {total} ({fstype})'.format( + used=used, total=total, fstype=fstype) + return title, part + +@module_register("ram") +class ramDisplay(display): + command_line = "free -m" + + def format_output(self, instring): + ram = ''.join(line for line in str(instring).split('\n') if\ + line.startswith('Mem:')).split() + used = int(ram[2]) - int(ram[5]) - int(ram[6]) + total = int(ram[1]) + title = 'RAM' + try: + persentage = (used / total * 100) + except: + used += ' MB' + else: + used = self.color_me(number=persentage, output=str(used) + ' MB') + part = '{used} / {total} MB'.format(used=used, total=total) + return title, part + +@module_register("sensor") +class sensorDisplay(display): + command_line = "sensors {arg1}" + + def __init__(self, **kwargs): + super().__init__(**kwargs) + + arg_from_conf = self.state.config.get('sensor', 'sensor', + fallback='coretemp-*') + try: + arg_from_arg = kwargs["args"][0] + except IndexError: + self.state.logger.error( + "Did not get any arguments, require one, the sensor to display.") + raise + + if arg_from_arg: + self.arg1 = arg_from_arg + else: + self.arg1 = arg_from_conf + + def format_output(self, instring): + tempinfo = instring.split('\n')[2::4] + + out = [] + for line in tempinfo: + info = [re.sub("\s\s+", "", line) for line in line.split(' ') if\ + line] + value = info[1] + intvalue = int(value[:3]) + if intvalue > 45: + temp = (color(self.state, "red") + info[1] + + color(self.state, "clear")) + elif intvalue in range(30, 45): + temp = (color(self.state, "magenta") + info[1] + + color(self.state, "clear")) + else: + temp = (color(self.state, "green") + info[1] + + color(self.state, "clear")) + out.append((info[0], temp)) + return out + +@module_register("env") +class envDisplay(display): + def __init__(self, **kwargs): + try: + self.arg1 = kwargs["args"][0] + except IndexError: + self.state.logger.error("Did not get any arguments, require one," + + " the env variable to display.") + raise + + super().__init__(**kwargs) + + def render(self): + argvalue = getenv(self.arg1.upper()) + return ('$' + self.arg1.upper(), argvalue) + +@module_register("uname") +class unameDisplay(display): + command_line = "uname {arg1}" + + def __init__(self, **kwargs): + super().__init__(**kwargs) + + try: + flag = kwargs["args"][0] + except IndexError: + self.state.logger.error("Did not get any arguments, require one," + + " the flag to pass to uname") + raise + + arg_from_conf = self.state.config.get('uname', 'argument', fallback="") + arg_from_arg = flag + if arg_from_arg: + self.arg1 = '-' + arg_from_arg + elif arg_from_conf: + self.arg1 = '-' + arg_from_conf + else: + self.arg1 = '' + + def format_output(self, instring): + return (UNAME_FLAG_MEANINGS[self.arg1[1]], instring) + +@module_register("cpu") +class cpuDisplay(display): + command_line = "cat /proc/cpuinfo" + + def format_output(self, instring): + kv = [line.split(":") for line in instring.split("\n") if line] + infodict = {} + for k, v in kv: + infodict[k.strip()] = v.strip() + return "Processor Type", infodict["model name"] + +@module_register("uptime") +class uptimeDisplay(display): + def render(self): + with open("/proc/uptime") as upfile: + raw = upfile.read() + fuptime = int(raw.split('.')[0]) + + day = int(fuptime / 86400) + fuptime = fuptime % 86400 + hour = int(fuptime / 3600) + fuptime = fuptime % 3600 + minute = int(fuptime / 60) + uptime = '{daystring}{hours}:{mins:02d}'.format( + daystring='{days} day{s}, '.format(days=day, s=('s' if day > 1 + else '')) if day else '', + hours = hour, mins = minute + ) + return "Uptime", uptime + +@module_register("packages") +class packageDisplay(display): + command_line = "pacman -Q" + + def format_output(self, instring): + return "Packages", len(instring.rstrip('\n').split('\n')) + +@module_register("distro") +class distroCheck(display): + def render(self): + try: + _ = open("/etc/pacman.conf") + except IOError: + distro = self.call_command("uname -o") + else: + distro = "Parabola GNU / Linux-libre" + distro = '{0} {1}'.format(distro, self.call_command("uname -m")) + return "OS", distro + +@module_register("process") +class processCheck(display): + command_line = "ps -u " + getuser() + + render = lambda self: self + + def run_command(self): + super().run_command() + out = str(self.process.communicate()[0]) + + self._processes = set() + for line in out.split("\\n"): + words = line.split() + if len(words) <= 3: + continue + + self._processes.add(words[3]) + + def __call__(self, proc): + if proc in self._processes: + return True + return False + +@module_register("wm") +class wmDisplay(display): + def render(self): + if self.state.config.get('wm', 'manual', fallback=False): + return "WM", self.state.config.get('wm', 'manual') + wm = '' + for key in WM_DICT.keys(): + if self.process_exists(key): + wm = key + break + return "WM", WM_DICT[wm] + +@module_register("de") +class deDisplay(display): + def render(self): + if self.state.config.get('de', 'manual', fallback=False): + return "DE", self.state.config.get('de', 'manual') + de = '' + for key in DE_DICT.keys(): + if self.process_exists(key): + de = key + break + return "DE", DE_DICT[de] + +@module_register("mpd") +class mpdDisplay(display): + """ + Displays certain stat about MPD database. If mpd not installed, output + nothing. + """ + command_line = "mpc stats --host {arg1} --port {arg2}" + + def __init__(self, **kwargs): + super().__init__(**kwargs) + + try: + self.stat = kwargs["args"][0] + except IndexError: + self.state.logger.error("Did not get any arguments, require one," + + " the stat to display.") + self.arg1 = self.state.config.get('mpd', 'host', fallback='localhost') + self.arg2 = self.state.config.getint('mpd', 'port', fallback=6600) + + def format_output(self, instring): + lines = instring.split('\n') + stats = {} + try: + stats['artists'] = lines[0].split(':')[1].strip() + stats['albums'] = lines[1].split(':')[1].strip() + stats['songs'] = lines[2].split(':')[1].strip() + #if people don't have mpc installed then return None) + except: + self.state.logger.error( + "Could not parse mpc output, is mpc installed?") + return + + return ('{statname} in MPD database'.format(statname=self.stat.title()), + stats[self.stat]) + +@module_register("system_upgrade") +class systemUpgrade(display): + + _upgrade_message = 'starting full system upgrade' + + def render(self): + try: + datestr = None + for line in reversed(list(open('/var/log/pacman.log'))): + if line.rstrip().endswith(self._upgrade_message): + datestart = line.find('[') + dateend = line.find(']') + if datestart != -1 and dateend != -1: + datestr = line[datestart + 1 : dateend] + break + except Exception as err: + print(err) + + if not datestr: + datestr = 'Unknown' + else: + currenttime = datetime.today() + updatetime = datetime.strptime(datestr, '%Y-%m-%d %H:%M') + numdays = (currenttime - updatetime).days + datestr = '{0} ({1} days ago)'.format(datestr, numdays) + + return "Last Upgrade", datestr + +#------------ Config ----------- + +class ParaboleyConfigParser(configparser.SafeConfigParser): + """ + A parser for the Paraboley config file. + """ + + defaults = {'core': {'align': 'top', + 'color': 'blue', + 'display_modules': + """\ +distro(), uname(n), uname(r), uptime(), wm(), de(), packages(), ram(),\ + cpu(), env(editor), fs(/), mpd(albums)""" + }, + } + + def read(self, file_location=None): + """ + Loads the config options stored in at file_location. If file_location + does not exist, it will attempt to load from the default config location + ($XDG_CONFIG_HOME/paraboley.cfg). If that does not exist, it will write a + default config file to $XDG_CONFIG_HOME/paraboley.cfg. + """ + + if file_location is None and "XDG_CONFIG_HOME" not in os.environ: + config_location = os.path.expanduser("~/.paraboley.cfg") + elif file_location is None: + config_location = os.path.expandvars("$XDG_CONFIG_HOME/paraboley.cfg") + else: + config_location = \ + os.path.expandvars(os.path.expanduser(file_location)) + + loaded = super(ParaboleyConfigParser, self).read(config_location) + + if file_location == None and not loaded: + self.load_default_config() + self.write_config(config_location) + return [config_location] + if not loaded: + #Try with default + loaded = super(ParaboleyConfigParser, self).read() + return loaded + + def load_default_config(self): + """ + Loads the config options stored at self.defaults. + """ + for section, values in self.defaults.items(): + if not self.has_section(section): + self.add_section(section) + + for option, value in values.items(): + #strip any excess spaces + value = re.sub("( +)", " ", value) + self.set(section, option, value) + + def write_config(self, location): + """ + Writes the current config to the given location. + """ + with open(location, 'w') as configfile: + self.write(configfile) + + +#------------ Functions ----------- + +def screenshot(state): + print('Screenshotting in') + screenshot_time = state.config.getint("core", "screenshotwait", fallback=5) + for x in sorted(range(1, screenshot_time + 1), reverse=True): + print('%s' % x, end='') + sys.stdout.flush() + sleep(1.0/3) + for x in range(3): + print('.', end='') + sys.stdout.flush() + sleep(1.0/3) + + print('Say Cheese!') + sys.stdout.flush() + + screenshot_command = state.config.get('core', 'screenshot_command', + fallback="import -window root .jpg") + try: + subprocess.check_call( + screenshot_command.replace('', + ctime().replace(' ','_')).split(" ")) + except subprocess.CalledProcessError as e: + state.logger.critical('Screenshot failed with return code {0}.'.format( + e.returncode)) + raise + except subprocess.FileNotFoundError: + print("Could not find import command, install imagemagick") + +def color(state, code, bold=False): + """ + Returns a character color sequence acording to the code given, and the + color theme in the state argument. + """ + if code == 2: + bold = True + first_bitty_bit = '\x1b[{0};'.format(int(not bold)) + if code in range(3): + second_bitty_bit = '3{0}m'.format(state.color) + elif code == "clear": + return '\x1b[0m' + else: + second_bitty_bit = '3{0}m'.format(COLORS[code]) + + return first_bitty_bit + second_bitty_bit + +def _mp_render_helper(container): + """ + A little helper to get round the one iterator argument with + multiprocessing.Pool.map. + """ + state = container["state"] + cls_name = container["cls_name"] + args = container["args"] + cls = CLASS_MAPPINGS[cls_name] + return render_class(state, cls, args) + +def render_class(state, cls, args): + """ + Returns the result of the run_command method for the class passed. + """ + try: + instance = cls(args=args, state=State( + logger=Logger(cls.__name__, state.logger.level), + color=state.color, + config=state.config)) + + except Exception as e: + state.logger.error( + "Could not instantiate {0}, failed with error {1}".format( + cls.__name__, e)) + return + try: + instance.run_command() + return instance.render() + except Exception as e: + state.logger.error( + "Could not render line for {0}, failed with error {1}".format( + cls.__name__, e)) + +#------------ Display object --------- + +class Paraboley(object): + DISPLAY_PARSING_REGEX = "(?P\w+)\((|(?P[\w, /]+))\)" + + def __init__(self, config, options): + log_level = lookup_level(options.log_level) + logger = Logger("Core", log_level) + + self.display = config.get("core", "display_modules") + colorscheme = options.color or config.get( + "core", "color", fallback="blue") + for key in COLORS.keys(): + if key == colorscheme: + colorcode = COLORS[key] + + self.state = State(colorcode, config, logger) + + global PROCESSES + PROCESSES = render_class(self.state, processCheck, ()) + + distro_out = render_class(self.state, distroCheck, ()) + + if not distro_out: + self.state.logger.critical( + "Unrecognised distribution.") + raise RuntimeException("Unrecognised distribution.") + + self.distro_name = ' '.join(distro_out[1].split()[:-1]) + + def run(self, screenshot_=False): + """ + Actually print the logo etc, and take a screenshot if required. + """ + print(self.render()) + + if screenshot_: + screenshot(self.state) + + def render(self): + results = self.prepare_results() + results = self.arrange_results(results) + + return LOGOS[self.distro_name].format(c1=color(self.state, 1), + c2=color(self.state, 2), + results = results + ) + + def prepare_results(self): + """ + Renders all classes found in the display array, and then returns them + as a list. The returned list will be exactly 18 items long, with any + left over spaces being filled with empty strings. + """ + poolsize = self.state.config.getint("core", "poolsize", fallback=5) + + pool = multiprocessing.Pool(poolsize) + + arguments = [] + for cls_name, args in self.parse_display(): + arguments.append({ + 'cls_name': cls_name, + 'args': args, + 'state': self.state + }) + raw_out = pool.map(_mp_render_helper, arguments) + outputs = list(map(self.format_item, + filter(bool, raw_out))) + + + return outputs + [""] * (18 - len(outputs)) + + def arrange_results(self, results): + """ + Arranges the results as specified in the config file. + """ + arrangement = self.state.config.get("core", "align", fallback="top") + if arrangement == "top": + return results + elif arrangement == "bottom": + actuall_res = [res for res in results if res] + return [""] * (len(results) - len(actuall_res)) + actuall_res + elif arrangement == "center": + actuall_res = [res for res in results if res] + offset = [""] * int((len(results) - len(actuall_res)) / 2) + return (offset + actuall_res + + [""] * (len(results) - len(actuall_res))) + else: + return results + + def parse_display(self): + """ + Iterates over the display attribute of the Paraboley class, and tries to + parse them using the DISPLAY_PARSING_REGEX. + """ + for func in self.display.split(","): + func = func.strip() + + info = re.match(self.DISPLAY_PARSING_REGEX, func) + if not info: + self.state.logger.error( + "Could not parse display string {0}".format(func)) + continue + + groups = info.groupdict() + if groups["args"]: + args = [arg.strip() for arg in groups["args"].split(",")] + else: + args = () + + yield groups["func"], args + raise StopIteration + + def format_item(self, item): + title = item[0].rstrip(':') + data = str(item[1]).rstrip() + + #if we're dealing with a fraction + if len(data.split('/')) == 2: + numerator = data.split('/')[0] + numerator = (color(self.state, 1, bold=True) + numerator + + color(self.state, 'clear')) + denominator = data.split('/')[1] + data = '/'.join((numerator, denominator)) + + return "{color}{title}:{clear} {data}".format( + color=color(self.state, 1), + title=title, + data=data, + clear=color(self.state, "clear") + ) + +def main(): + parser = OptionParser( + usage='%prog', + description="""%prog is a utility to display system info and take\ + screenshots""", + version="%prog 0.3") + parser.add_option('-c', '--color', + action='store', type='choice', dest='color', + choices=('black', + 'red', + 'green', + 'yellow', + 'blue', + 'magenta', + 'cyan', + 'white'), + help="""choose a color: black, red, green, yellow, blue, magenta,\ + cyan, white [Default: blue]""") + parser.add_option('-s', '--screenshot', + action='store_true', dest='screenshot', help='Take a screenshot') + parser.add_option('--config', + action='store', dest='config', default=None, + help="Set the location of the config file to load.") + parser.add_option('--debug', + action='store', type='choice', dest='log_level', + choices=('NOTSET', + 'DEBUG', + 'INFO', + 'WARNING', + 'ERROR', + 'CRITICAL'), + default='CRITICAL', + help="The level of errors you wish to display. Choices are\ + NOTSET, DEBUG, INFO, WARNING, ERROR, and CRITICAL. CRITICAL is the default.") + (options, args) = parser.parse_args() + + config = ParaboleyConfigParser() + config.read(options.config) + + paraboley = Paraboley(config=config, options=options) + paraboley.run(options.screenshot) + +if __name__ == "__main__": + main() diff --git a/pcr/paraboley/setup.py b/pcr/paraboley/setup.py new file mode 100644 index 000000000..c80486ce1 --- /dev/null +++ b/pcr/paraboley/setup.py @@ -0,0 +1,17 @@ +import os +from setuptools import setup + +def read(fname): + return open(os.path.join(os.path.dirname(__file__), fname)).read() + +setup( + name="Paraboley", + version="0.1", + author="Aurélien DESBRIÈRES", + author_email="aurelien@hackers.camp", + description="A simple python scrip to display an Parabola GNU / Linux-libre logo in ASCII art along with basic system information.", + license="GPL", + url="https://github.com/XL04D/paraboley", + long_description=read("README.md"), + scripts=["paraboley"] +) -- cgit v1.2.3 From c9379f3c41d7bdfba7703ae2a519cc584cd5fa73 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Fri, 13 Jun 2014 14:51:08 +0200 Subject: paraboley + correction --- pcr/paraboley/PKGBUILD | 2 +- pcr/paraboley/paraboley | 37 ++++++++++++++++++------------------- 2 files changed, 19 insertions(+), 20 deletions(-) (limited to 'pcr') diff --git a/pcr/paraboley/PKGBUILD b/pcr/paraboley/PKGBUILD index a5f4b8d72..b7b722a03 100644 --- a/pcr/paraboley/PKGBUILD +++ b/pcr/paraboley/PKGBUILD @@ -2,7 +2,7 @@ pkgname=paraboley pkgver=0.1 -pkgrel=1 +pkgrel=2 pkgdesc="Python script to display system infomation alongside the Parabola GNU / Linux-libre logo." arch=('any') url="https://github.com/XL04D/paraboley" diff --git a/pcr/paraboley/paraboley b/pcr/paraboley/paraboley index 3be683cc9..94d84c02f 100755 --- a/pcr/paraboley/paraboley +++ b/pcr/paraboley/paraboley @@ -50,13 +50,13 @@ UNAME_FLAG_MEANINGS = { 'i': 'Hardware Platform', } -LOGOS = {'Parabola GNU / Linux-libre': '''{1} +LOGOS = {'Arch Linux': '''{c1} {c1} ## ### {results[0]} {c1} ## ## ##### {results[1]} {c1} ## ## ## ####### {results[2]} {c1} # ## ## ## ######## {results[3]} -{c1} ### ## ## ## ######### {results[4]} -{c1} ##### ## ######### {results[5]} +{c1} ### # ######### {results[4]} +{c1} ### ######### {results[5]} {c1} ## ######## {results[6]} {c1} ####### {results[7]} {c1} ###### {results[8]} @@ -68,10 +68,9 @@ LOGOS = {'Parabola GNU / Linux-libre': '''{1} {c1} ### {results[14]} {c1} ### {results[15]} {c1} ## {results[16]} -{c1] # {results[17]} +{c2} # {results[17]} \x1b[0m''' } - CLASS_MAPPINGS = {} @@ -429,7 +428,7 @@ class distroCheck(display): except IOError: distro = self.call_command("uname -o") else: - distro = "Parabola GNU / Linux-libre" + distro = "Arch Linux" distro = '{0} {1}'.format(distro, self.call_command("uname -m")) return "OS", distro @@ -545,9 +544,9 @@ class systemUpgrade(display): #------------ Config ----------- -class ParaboleyConfigParser(configparser.SafeConfigParser): +class ArcheyConfigParser(configparser.SafeConfigParser): """ - A parser for the Paraboley config file. + A parser for the archey config file. """ defaults = {'core': {'align': 'top', @@ -563,19 +562,19 @@ distro(), uname(n), uname(r), uptime(), wm(), de(), packages(), ram(),\ """ Loads the config options stored in at file_location. If file_location does not exist, it will attempt to load from the default config location - ($XDG_CONFIG_HOME/paraboley.cfg). If that does not exist, it will write a - default config file to $XDG_CONFIG_HOME/paraboley.cfg. + ($XDG_CONFIG_HOME/archey3.cfg). If that does not exist, it will write a + default config file to $XDG_CONFIG_HOME/archey3.cfg. """ if file_location is None and "XDG_CONFIG_HOME" not in os.environ: - config_location = os.path.expanduser("~/.paraboley.cfg") + config_location = os.path.expanduser("~/.archey3.cfg") elif file_location is None: - config_location = os.path.expandvars("$XDG_CONFIG_HOME/paraboley.cfg") + config_location = os.path.expandvars("$XDG_CONFIG_HOME/archey3.cfg") else: config_location = \ os.path.expandvars(os.path.expanduser(file_location)) - loaded = super(ParaboleyConfigParser, self).read(config_location) + loaded = super(ArcheyConfigParser, self).read(config_location) if file_location == None and not loaded: self.load_default_config() @@ -583,7 +582,7 @@ distro(), uname(n), uname(r), uptime(), wm(), de(), packages(), ram(),\ return [config_location] if not loaded: #Try with default - loaded = super(ParaboleyConfigParser, self).read() + loaded = super(ArcheyConfigParser, self).read() return loaded def load_default_config(self): @@ -690,7 +689,7 @@ def render_class(state, cls, args): #------------ Display object --------- -class Paraboley(object): +class Archey(object): DISPLAY_PARSING_REGEX = "(?P\w+)\((|(?P[\w, /]+))\)" def __init__(self, config, options): @@ -780,7 +779,7 @@ class Paraboley(object): def parse_display(self): """ - Iterates over the display attribute of the Paraboley class, and tries to + Iterates over the display attribute of the Archey class, and tries to parse them using the DISPLAY_PARSING_REGEX. """ for func in self.display.split(","): @@ -856,11 +855,11 @@ def main(): NOTSET, DEBUG, INFO, WARNING, ERROR, and CRITICAL. CRITICAL is the default.") (options, args) = parser.parse_args() - config = ParaboleyConfigParser() + config = ArcheyConfigParser() config.read(options.config) - paraboley = Paraboley(config=config, options=options) - paraboley.run(options.screenshot) + archey = Archey(config=config, options=options) + archey.run(options.screenshot) if __name__ == "__main__": main() -- cgit v1.2.3 From 05477046ce09b63e1b2d280d03d39ea9f2ce03ff Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Fri, 13 Jun 2014 16:23:32 +0200 Subject: paraboley / archey3 rebranded --- pcr/paraboley/PKGBUILD | 4 ++-- pcr/paraboley/paraboley | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'pcr') diff --git a/pcr/paraboley/PKGBUILD b/pcr/paraboley/PKGBUILD index b7b722a03..0767b86ca 100644 --- a/pcr/paraboley/PKGBUILD +++ b/pcr/paraboley/PKGBUILD @@ -2,10 +2,10 @@ pkgname=paraboley pkgver=0.1 -pkgrel=2 +pkgrel=1 pkgdesc="Python script to display system infomation alongside the Parabola GNU / Linux-libre logo." arch=('any') -url="https://github.com/XL04D/paraboley" +url="http://XL04D.github.com/paraboley" license=('GPL') depends=('python') makedepends=('git' 'python-distribute') diff --git a/pcr/paraboley/paraboley b/pcr/paraboley/paraboley index 94d84c02f..122b3cbb0 100755 --- a/pcr/paraboley/paraboley +++ b/pcr/paraboley/paraboley @@ -14,6 +14,7 @@ # Along with basic system information. # Import libraries + import collections import subprocess, optparse, re, sys, configparser from subprocess import Popen, PIPE @@ -50,7 +51,7 @@ UNAME_FLAG_MEANINGS = { 'i': 'Hardware Platform', } -LOGOS = {'Arch Linux': '''{c1} +LOGOS = {'Parabola': '''{c1} {c1} ## ### {results[0]} {c1} ## ## ##### {results[1]} {c1} ## ## ## ####### {results[2]} @@ -68,7 +69,7 @@ LOGOS = {'Arch Linux': '''{c1} {c1} ### {results[14]} {c1} ### {results[15]} {c1} ## {results[16]} -{c2} # {results[17]} +{c1} # {results[17]} \x1b[0m''' } @@ -428,7 +429,7 @@ class distroCheck(display): except IOError: distro = self.call_command("uname -o") else: - distro = "Arch Linux" + distro = "Parabola" distro = '{0} {1}'.format(distro, self.call_command("uname -m")) return "OS", distro @@ -731,7 +732,6 @@ class Archey(object): results = self.arrange_results(results) return LOGOS[self.distro_name].format(c1=color(self.state, 1), - c2=color(self.state, 2), results = results ) -- cgit v1.2.3 From beb820a1c929c11b4ded24869d462ecf5b63fc2a Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Fri, 13 Jun 2014 18:50:39 +0200 Subject: lynis Security and system auditing tool to harden Unix/Linux systems --- pcr/lynis/PKGBUILD | 47 +++++++++++++++++++++++++++++++++++++++++++++++ pcr/lynis/lynis.install | 8 ++++++++ 2 files changed, 55 insertions(+) create mode 100644 pcr/lynis/PKGBUILD create mode 100644 pcr/lynis/lynis.install (limited to 'pcr') diff --git a/pcr/lynis/PKGBUILD b/pcr/lynis/PKGBUILD new file mode 100644 index 000000000..24be95c25 --- /dev/null +++ b/pcr/lynis/PKGBUILD @@ -0,0 +1,47 @@ +# Contributor (Arch) : Levente Polyak +# Contributor (Arch) : Sébastien Luttringer +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgname=lynis +pkgver=1.5.6 +pkgrel=1 +pkgdesc='Security and system auditing tool to harden Unix/Linux systems' +url='http://cisofy.com/lynis/' +license=('GPL3') +arch=('any') +backup=('etc/lynis/default.prf') +depends=('sh') +optdepends=('net-tools: networking tests') +install=lynis.install +source=(http://cisofy.com/files/${pkgname}-${pkgver}.tar.gz) + +prepare() { + cd ${pkgname}-${pkgver} + # fix non-test includes to let lynis run as user but complain gracefully + chmod o+rx include + chmod o+r include/* + chmod o-r include/tests_* +} + +package() { + cd ${pkgname}-${pkgver} + + # install profile + install -Dm 644 default.prf "${pkgdir}/etc/${pkgname}/default.prf" + + # install binary + install -Dm 755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + + # install plugins, include, db + install -d "${pkgdir}/usr/share/${pkgname}" + cp -a db include plugins "${pkgdir}/usr/share/${pkgname}" + + # install doc files + install -d "${pkgdir}/usr/share/doc/${pkgname}" + install -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" README INSTALL CHANGELOG FAQ + + # install manpage + install -Dm 644 "${pkgname}.8" "${pkgdir}/usr/share/man/man8/${pkgname}.8" +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/pcr/lynis/lynis.install b/pcr/lynis/lynis.install new file mode 100644 index 000000000..abdb081f1 --- /dev/null +++ b/pcr/lynis/lynis.install @@ -0,0 +1,8 @@ +pre_upgrade() { + chmod -R o= /usr/share/lynis + chmod 0755 /usr/share/lynis + # fix non-test includes to let lynis run as user but complain gracefully + chmod o+rx /usr/share/lynis/include + chmod o+r /usr/share/lynis/include/* + chmod o-r /usr/share/lynis/include/tests_* +} -- cgit v1.2.3 From 92a018f409741e482b98a9324dbc1d47e36be444 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Fri, 13 Jun 2014 19:22:54 +0200 Subject: perl-rpc-xml dep of apparmor --- pcr/perl-rpc-xml/PKGBUILD | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 pcr/perl-rpc-xml/PKGBUILD (limited to 'pcr') diff --git a/pcr/perl-rpc-xml/PKGBUILD b/pcr/perl-rpc-xml/PKGBUILD new file mode 100644 index 000000000..c4d1adb6f --- /dev/null +++ b/pcr/perl-rpc-xml/PKGBUILD @@ -0,0 +1,48 @@ +# Contributor (Arch) : John D Jones III +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgname='perl-rpc-xml' +pkgver='0.78' +pkgrel='2' +pkgdesc="A set of classes for core data, message and XML handling" +arch=('any') +license=('PerlArtistic' 'GPL') +options=('!emptydirs') +depends=('perl-xml-parser>=2.31' 'perl-libwww' 'perl-xml-libxml' 'perl-net-server') +makedepends=() +url='http://search.mcpan.org/dist/RPC-XML' +source=('http://search.cpan.org/CPAN/authors/id/R/RJ/RJRAY/RPC-XML-0.78.tar.gz') +_distdir="RPC-XML-0.78" + +build() { + ( export PERL_MM_USE_DEFAULT=1 PERL5LIB="" \ + PERL_AUTOINSTALL=--skipdeps \ + PERL_MM_OPT="INSTALLDIRS=vendor DESTDIR='$pkgdir'" \ + PERL_MB_OPT="--installdirs vendor --destdir '$pkgdir'" \ + MODULEBUILDRC=/dev/null + + cd "$srcdir/$_distdir" + /usr/bin/perl Makefile.PL + make + ) +} + +check() { + cd "$srcdir/$_distdir" + ( export PERL_MM_USE_DEFAULT=1 PERL5LIB="" + make test + ) +} + +package() { + cd "$srcdir/$_distdir" + make install + + find "$pkgdir" -name .packlist -o -name perllocal.pod -delete +} + +# Local Variables: +# mode: shell-script +# sh-basic-offset: 2 +# End: +# vim:set ts=2 sw=2 et: -- cgit v1.2.3 From 13f0aed75a398179842df0c95475309b85e77268 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Fri, 13 Jun 2014 19:28:34 +0200 Subject: audit dep of apparmor --- pcr/audit/PKGBUILD | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 pcr/audit/PKGBUILD (limited to 'pcr') diff --git a/pcr/audit/PKGBUILD b/pcr/audit/PKGBUILD new file mode 100644 index 000000000..0366595f2 --- /dev/null +++ b/pcr/audit/PKGBUILD @@ -0,0 +1,62 @@ +# Contributor (Arch) : +# Contributor (Arch) : Massimiliano Torromeo +# Contributor (Arch) : Connor Behan +# Contributor (Arch) : henning mueller +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgname=audit +pkgver=2.3.6 +pkgrel=1 +pkgdesc='User space utilities for storing and searching the audit records generated by the audit subsystem in the Linux kernel.' +url="http://people.redhat.com/sgrubb/audit" +arch=(i686 x86_64) +depends=(krb5 libcap-ng) +makedepends=(libldap swig linux-headers python2) +license=(GPL) +options=(emptydirs) +backup=( + etc/libaudit.conf + etc/audit/audit.rules + etc/audit/auditd.conf + etc/audisp/audispd.conf + etc/audisp/audisp-remote.conf + etc/audisp/zos-remote.conf + etc/audisp/plugins.d/af_unix.conf + etc/audisp/plugins.d/audispd-zos-remote.conf + etc/audisp/plugins.d/au-remote.conf + etc/audisp/plugins.d/syslog.conf +) +source=("$url/$pkgname-$pkgver.tar.gz") + +build() { + cd "$srcdir/$pkgname-$pkgver" + export PYTHON=/usr/bin/python2 + ./configure \ + --prefix=/usr \ + --sbindir=/usr/bin \ + --sysconfdir=/etc \ + --libexecdir=/usr/lib/audit \ + --with-python=yes \ + --enable-gssapi-krb5=yes \ + --enable-systemd=yes \ + --with-libcap-ng=yes + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + + cd "$pkgdir" + install -d var/log/audit + rm -rf etc/rc.d etc/sysconfig usr/lib/audit + + sed -ri 's|/sbin|/usr/bin|' \ + etc/audit/*.conf \ + etc/audisp/plugins.d/*.conf \ + usr/lib/systemd/system/auditd.service + + chmod 644 usr/lib/systemd/system/auditd.service + mv "$pkgdir"/etc/audit/{rules.d/,}audit.rules +} + -- cgit v1.2.3 From f18d2cb483f7df99671bcb598b21f6cbb58ce9fa Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Fri, 13 Jun 2014 19:33:59 +0200 Subject: apparmor Linux application security framework - mandatory access control for programs 'metapackage' --- pcr/apparmor/PKGBUILD | 156 ++++++++++++++++++++++++++++++++++++ pcr/apparmor/apparmor-utils.install | 15 ++++ pcr/apparmor/apparmor.install | 20 +++++ pcr/apparmor/apparmor.service | 11 +++ pcr/apparmor/apparmor_load.sh | 5 ++ pcr/apparmor/apparmor_unload.sh | 8 ++ 6 files changed, 215 insertions(+) create mode 100644 pcr/apparmor/PKGBUILD create mode 100644 pcr/apparmor/apparmor-utils.install create mode 100644 pcr/apparmor/apparmor.install create mode 100644 pcr/apparmor/apparmor.service create mode 100644 pcr/apparmor/apparmor_load.sh create mode 100644 pcr/apparmor/apparmor_unload.sh (limited to 'pcr') diff --git a/pcr/apparmor/PKGBUILD b/pcr/apparmor/PKGBUILD new file mode 100644 index 000000000..6a60e5f0b --- /dev/null +++ b/pcr/apparmor/PKGBUILD @@ -0,0 +1,156 @@ +# Contributor (Arch) : Thomas Kuther +# Contributor (Arch) : Gianni Vialetto +# Contributor (Arch) : Paul N. Maxwell +# Contributor (Arch) : Thomas Mudrunka +# Contributor (Arch) : Max Fierke +# Maintainer (Parabola) : Aurélien DESBRIÈRES + +pkgbase=apparmor +pkgname=($pkgbase apparmor-parser apparmor-libapparmor apparmor-utils apparmor-profiles apparmor-pam apparmor-vim) +pkgver=2.8.3 +#_majorver=${pkgver%.*} # bleh, AUR... +_majorver=2.8 +pkgrel=1 +pkgdesc='Linux application security framework - mandatory access control for programs' +arch=('i686' 'x86_64') +license=('GPL') +url='http://wiki.apparmor.net/index.php/Main_Page' +makedepends=('bzr' 'flex' 'swig' 'perl' 'python' 'perl-locale-gettext' 'perl-rpc-xml' 'audit') + +source=("https://launchpad.net/$pkgname/${_majorver}/$pkgver/+download/$pkgname-$pkgver.tar.gz" + "apparmor_load.sh" + "apparmor_unload.sh" + "apparmor.service") + + +#Configuration +core_perl_dir='/usr/bin/core_perl' +export MAKEFLAGS+=" POD2MAN=${core_perl_dir}/pod2man" +export MAKEFLAGS+=" POD2HTML=${core_perl_dir}/pod2html" +export MAKEFLAGS+=" PROVE=${core_perl_dir}/prove" + + +prepare() { + cd "${srcdir}/${pkgbase}-${pkgver}/parser" + # avoid depend on texlive-latex + sed -i -e 's/pdflatex/true/g' Makefile + + cd "${srcdir}/${pkgbase}-${pkgver}/utils" + # Set Arch paths + sed -e '/logfiles/ s/syslog /syslog.log /g' \ + -e '/logfiles/ s/messages/messages.log/g' \ + -e '/parser/ s# /sbin/# /usr/bin/#g' \ + -i logprof.conf + # do not build/install vim file with utils package (causes ref to $srcdir and wrong location) + sed -i '/vim/d' Makefile + + cd "${srcdir}/${pkgbase}-${pkgver}/profiles/apparmor.d" + # /usr merge vs. profiles + for i in `find . -name "*sbin*"`; do sed -i -e 's@sbin@bin@g' ${i} && mv ${i} ${i/sbin/bin}; done + for i in klogd ping syslog-ng syslogd; do + sed -e "s@/bin/${i}@/usr/bin/${i}@g" \ + -e "s@bin\.${i}@usr\.bin\.${i}@g" \ + -i bin.${i} && \ + mv bin.${i} usr.bin.${i} + done +} + +build() { + msg2 "Building: apparmor-libapparmor" + cd "${srcdir}/${pkgbase}-${pkgver}/libraries/libapparmor" + unset PERL_MM_OPT + NOCONFIGURE=1 ./autogen.sh + ./configure --prefix=/usr --sbindir=/usr/bin --with-perl --with-python + make + + cd "${srcdir}/${pkgbase}-${pkgver}" + msg2 "Building: apparmor-parser" + make -C parser + + msg2 "Building: apparmor-utils" + make -C utils + + msg2 "Building: apparmor-profiles" + make -C profiles + + msg2 "Building: apparmor-pam" + make -C changehat/pam_apparmor + + msg2 "Building: apparmor-vim" + make -C utils/vim -j1 +} + +package_apparmor() { + pkgdesc='Linux application security framework - mandatory access control for programs (metapackage)' + depends=(apparmor-parser apparmor-libapparmor apparmor-utils apparmor-profiles apparmor-pam apparmor-vim) + optdepends=('linux-apparmor: an arch kernel with AppArmor patches') + install='apparmor.install' +} + +package_apparmor-parser() { + pkgdesc='AppArmor parser - loads AA profiles to kernel module' + depends=('apparmor-libapparmor' 'bash') + + cd "${srcdir}/${pkgbase}-${pkgver}" + make -C parser install DESTDIR=${pkgdir} + mv "${pkgdir}/lib" "${pkgdir}/usr/lib" + mv "${pkgdir}/sbin" "${pkgdir}/usr/bin" +} + +package_apparmor-libapparmor() { + pkgdesc='AppArmor library' + makedepends=('swig' 'perl' 'python') + depends=('python') + + cd "${srcdir}/${pkgbase}-${pkgver}" + make -C libraries/libapparmor install DESTDIR=${pkgdir} + install -D -m644 "libraries/libapparmor/swig/perl/LibAppArmor.pm" "${pkgdir}/usr/lib/perl5/vendor_perl/" +} + +package_apparmor-utils() { + pkgdesc='AppArmor userspace utilities' + arch=('any') + depends=('perl' 'perl-locale-gettext' 'perl-term-readkey' + 'perl-file-tail' 'perl-rpc-xml' 'python' 'bash') + install='apparmor-utils.install' + + cd "${srcdir}/${pkgbase}-${pkgver}" + make -C utils install DESTDIR=${pkgdir} BINDIR=${pkgdir}/usr/bin + install -D -m755 "${srcdir}/apparmor_load.sh" "${pkgdir}/usr/bin/apparmor_load.sh" + install -D -m755 "${srcdir}/apparmor_unload.sh" "${pkgdir}/usr/bin/apparmor_unload.sh" + install -D -m644 "${srcdir}/apparmor.service" "${pkgdir}/usr/lib/systemd/system/apparmor.service" +} + +package_apparmor-profiles() { + pkgdesc='AppArmor sample pre-made profiles' + depends=(apparmor-parser) + arch=('any') + + # backup /etc/apparmor.d/* so using logprof is safe + cd "${srcdir}/${pkgbase}-${pkgver}/profiles/apparmor.d" + declare -a _profiles=(`find -type f|sed 's@./@etc/apparmor.d/@'`) + backup=(`echo ${_profiles[@]}`) + + cd "${srcdir}/${pkgbase}-${pkgver}" + make -C profiles install DESTDIR=${pkgdir} +} + +package_apparmor-pam() { + pkgdesc='AppArmor PAM library' + depends=('apparmor-libapparmor' 'pam') + + cd "${srcdir}/${pkgbase}-${pkgver}" + make -C changehat/pam_apparmor install DESTDIR=${pkgdir}/usr + install -D -m644 changehat/pam_apparmor/README "${pkgdir}/usr/share/doc/apparmor/README.pam_apparmor" +} +package_apparmor-vim() { + pkgdesc='AppArmor VIM support' + arch=('any') + depends=('vim') + + cd "${srcdir}/${pkgbase}-${pkgver}/utils/vim" + install -D -m644 apparmor.vim \ + "${pkgdir}/usr/share/vim/vimfiles/syntax/apparmor.vim" +} + +# vim:set ts=2 sw=2 et: diff --git a/pcr/apparmor/apparmor-utils.install b/pcr/apparmor/apparmor-utils.install new file mode 100644 index 000000000..85f69d3a3 --- /dev/null +++ b/pcr/apparmor/apparmor-utils.install @@ -0,0 +1,15 @@ +post_install() { +# echo 'Creating /var/log/messages symlink to improve compatibility...' +# ln -sf messages.log /var/log/messages +cat << EOF + +==> Use /etc/apparmor/logprof.conf to change system log file +==> configuration if you have a not-standard syslog-ng.conf. + +EOF +} + +post_upgrade() { + post_install $1 +} + diff --git a/pcr/apparmor/apparmor.install b/pcr/apparmor/apparmor.install new file mode 100644 index 000000000..dc25ea832 --- /dev/null +++ b/pcr/apparmor/apparmor.install @@ -0,0 +1,20 @@ +post_install() { + cat << EOF +==> To enable apparmor, add this to kernel boot line: + + apparmor=1 security=apparmor + +==> Warning: To full functionality you must have kernel +==> with apparmor patchset. +EOF +} + +post_remove() { + cat << EOF +==> To completely remove, delete this from kernel boot line: + + apparmor=1 security=apparmor + +EOF +} + diff --git a/pcr/apparmor/apparmor.service b/pcr/apparmor/apparmor.service new file mode 100644 index 000000000..7cee03ad9 --- /dev/null +++ b/pcr/apparmor/apparmor.service @@ -0,0 +1,11 @@ +[Unit] +Description=AppArmor profiles + +[Service] +Type=oneshot +ExecStart=/usr/bin/apparmor_load.sh +ExecStop=/usr/bin/apparmor_unload.sh +RemainAfterExit=yes + +[Install] +WantedBy=basic.target diff --git a/pcr/apparmor/apparmor_load.sh b/pcr/apparmor/apparmor_load.sh new file mode 100644 index 000000000..30ce04086 --- /dev/null +++ b/pcr/apparmor/apparmor_load.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +aa_profiles='/etc/apparmor.d/' +aa_log='/var/log/apparmor.init.log' +/usr/bin/apparmor_parser -r $(find "$aa_profiles" -maxdepth 1 -type f) 2>> "$aa_log" diff --git a/pcr/apparmor/apparmor_unload.sh b/pcr/apparmor/apparmor_unload.sh new file mode 100644 index 000000000..de13938ab --- /dev/null +++ b/pcr/apparmor/apparmor_unload.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +aa_profiles='/etc/apparmor.d/' +aa_log='/var/log/apparmor.init.log' +PROFILES=`find "$aa_profiles" -maxdepth 1 -type f` +for profile in $PROFILES; do + apparmor_parser -R "$profile" 2>> "$aa_log" +done -- cgit v1.2.3 From 5023db87978b1ccbf63d7c0a534fe56a1fa0b6e3 Mon Sep 17 00:00:00 2001 From: Aurélien DESBRIÈRES Date: Fri, 13 Jun 2014 20:27:30 +0200 Subject: tvenlinux-desktop Simple bash script to watch and record TV --- pcr/tvenlinux-desktop/PKGBUILD | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 pcr/tvenlinux-desktop/PKGBUILD (limited to 'pcr') diff --git a/pcr/tvenlinux-desktop/PKGBUILD b/pcr/tvenlinux-desktop/PKGBUILD new file mode 100644 index 000000000..0af13211d --- /dev/null +++ b/pcr/tvenlinux-desktop/PKGBUILD @@ -0,0 +1,49 @@ +# Contributor (Arch) : ValHue +# Maintainer (Parabola) : Aurélien DESBRIÈRES +# https://github.com/ValHue/AUR-PKGBUILDs + +pkgname=tvenlinux-desktop +pkgver=20140127 +pkgrel=2 +pkgdesc="Simple bash script to watch and record TV on GNU/Linux/BSD without capture card/tuner. (TV in Spain, Peru, Chile, Cuba, Venezuela, Bolivia and Argentina)" +url="http://www.tvenlinux.com/" +arch=('i686' 'x86_64') +license=('GPL3') +depends=('mplayer' 'rtmpdump') +optdepends=('zenity: for GTK users' 'kdialog: for QT users' 'curl: for view EPG (Electronic Program Guide)') +source=("http://www.tvenlinux.com/TVenLinux_2.sh" "http://www.tvenlinux.com/busi_tv.png") + +_pkgname="TVenLinux" + +_pkgname_desktop="#!/usr/bin/env xdg-open +[Desktop Entry] +Name=TVenLinux +Exec=TVenLinux +Icon=TVenLinux +Type=Application +Comment=Script to view more than 160 channels in Spanish TDT. +Comment[es]=Script para ver más de 160 canales de TDT en Español. +Terminal=false +Categories=GNOME;AudioVideo;P2P;Video;TV;GTK; +MimeType=x-scheme-handler/sop;" + +pkgver() { + cd "${srcdir}" + cat TVenLinux_2.sh | grep -e 'V_script=' | sed -e 's/V_script=//;s/"//g;s/;//;s/\///g;s/^\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)\(.\)/\5\6\7\8\3\4\1\2/' +} + +build() { + cd "${srcdir}" + mv busi_tv.png ${_pkgname}.png + echo -e "${_pkgname_desktop}" | tee ${_pkgname}.desktop +} + +package() { + cd "${srcdir}" + install -d ${pkgdir}/usr/share/applications + install -d ${pkgdir}/usr/share/pixmaps + install -d ${pkgdir}/usr/bin + install -m 755 ${_pkgname}_2.sh ${pkgdir}/usr/bin/${_pkgname} + install -m 644 ${_pkgname}.desktop ${pkgdir}/usr/share/applications + install -m 644 ${_pkgname}.png ${pkgdir}/usr/share/pixmaps +} -- cgit v1.2.3