From 508e8db94d0dbef9a559b3ce2ae98a2be5f3ed32 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Tue, 17 Dec 2013 08:36:15 +0100 Subject: [PATCH] git version of owncloud are dangerous Signed-off-by: Gwenhael Le Moine --- .../owncloud-apps-appframework.SlackBuild | 22 ++++++++---------- .../owncloud-apps-epubviewer.SlackBuild | 11 +++++---- .../owncloud-apps-news.SlackBuild | 23 ++++++++----------- n/owncloud/owncloud.SlackBuild | 9 +++++--- 4 files changed, 32 insertions(+), 33 deletions(-) diff --git a/n/owncloud-apps-appframework/owncloud-apps-appframework.SlackBuild b/n/owncloud-apps-appframework/owncloud-apps-appframework.SlackBuild index baf0edfb..4e5762dd 100755 --- a/n/owncloud-apps-appframework/owncloud-apps-appframework.SlackBuild +++ b/n/owncloud-apps-appframework/owncloud-apps-appframework.SlackBuild @@ -17,27 +17,23 @@ TMP=${TMP:-/tmp/$TAG} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -REPOSITORIES=/home/installs/SlackBuilds/repositories - set -eu +FILENAME=158433-appframework.zip APPNAM=${PRGNAM#owncloud-apps-} rm -rf $PKG mkdir -p $TMP $OUTPUT $PKG/$DOCROOT/owncloud/apps/ cd $PKG/$DOCROOT/owncloud/apps/ -if [ -e $REPOSITORIES/$PRGNAM ] ; then - ( cd $REPOSITORIES/$PRGNAM - git pull - ) -else - git clone https://github.com/owncloud/appframework.git $REPOSITORIES/$PRGNAM -fi -cp -R $REPOSITORIES/$PRGNAM $APPNAM +[ ! -e $CWD/$FILENAME ] && wget -c http://apps.owncloud.com/CONTENT/content-files/$FILENAME -O $CWD/$FILENAME +unzip $CWD/$FILENAME + +rm $CWD/$FILENAME cd $APPNAM -rm -fr .git +VERSION=$(cat appinfo/info.xml | grep -i version\> | sed 's|||g' | tr -d \ | sed 's|\t||g' ) + chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 -o -perm 755 \) \ @@ -48,8 +44,8 @@ find . \ mkdir -p $PKG/usr/doc/$PRGNAM cp -a AUTHORS COPYING README.rst $PKG/usr/doc/$PRGNAM -# Change ownership and perms and create a link. -chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/owncloud/apps/$APPNAM +# Change ownership and perms +chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/owncloud chmod 0750 $PKG/$DOCROOT/owncloud/apps/$APPNAM mkdir -p $PKG/install diff --git a/n/owncloud-apps-epubviewer/owncloud-apps-epubviewer.SlackBuild b/n/owncloud-apps-epubviewer/owncloud-apps-epubviewer.SlackBuild index a52d03da..0dfa1422 100755 --- a/n/owncloud-apps-epubviewer/owncloud-apps-epubviewer.SlackBuild +++ b/n/owncloud-apps-epubviewer/owncloud-apps-epubviewer.SlackBuild @@ -19,14 +19,17 @@ OUTPUT=${OUTPUT:-/tmp} set -eu +FILENAME=157609-files_epubviewer_oc5.tar.gz APPNAM=files_epubviewer rm -rf $PKG mkdir -p $TMP $OUTPUT $PKG/$DOCROOT/owncloud/apps/ cd $PKG/$DOCROOT/owncloud/apps/ -[ ! -e $CWD/files_epubviewer_oc5.tar.gz ] && wget -c http://www.les-charles.net/files/files_epubviewer_oc5.tar.gz -O $CWD/files_epubviewer_oc5.tar.gz -tar xf $CWD/files_epubviewer_oc5.tar.gz +[ ! -e $CWD/$FILENAME ] && wget -c http://apps.owncloud.com/CONTENT/content-files/$FILENAME -O $CWD/$FILENAME +tar xf $CWD/$FILENAME + +rm $CWD/$FILENAME cd $APPNAM VERSION=$(cat appinfo/version) @@ -38,8 +41,8 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 -o -perm 644 \) \ -exec chmod 640 {} \; -# Change ownership and perms and create a link. -chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/owncloud/apps/$APPNAM +# Change ownership and perms +chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/owncloud chmod 0750 $PKG/$DOCROOT/owncloud/apps/$APPNAM mkdir -p $PKG/install diff --git a/n/owncloud-apps-news/owncloud-apps-news.SlackBuild b/n/owncloud-apps-news/owncloud-apps-news.SlackBuild index 2d8ba229..8c64d177 100755 --- a/n/owncloud-apps-news/owncloud-apps-news.SlackBuild +++ b/n/owncloud-apps-news/owncloud-apps-news.SlackBuild @@ -17,27 +17,23 @@ TMP=${TMP:-/tmp/$TAG} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -REPOSITORIES=/home/installs/SlackBuilds/repositories - set -eu +FILENAME=158434-news.zip APPNAM=${PRGNAM#owncloud-apps-} rm -rf $PKG mkdir -p $TMP $OUTPUT $PKG/$DOCROOT/owncloud/apps/ cd $PKG/$DOCROOT/owncloud/apps/ -if [ -e $REPOSITORIES/$PRGNAM ] ; then - ( cd $REPOSITORIES/$PRGNAM - git pull - ) -else - git clone https://github.com/owncloud/news.git $REPOSITORIES/$PRGNAM -fi -cp -R $REPOSITORIES/$PRGNAM ./$APPNAM +[ ! -e $CWD/$FILENAME ] && wget -c http://apps.owncloud.com/CONTENT/content-files/$FILENAME -O $CWD/$FILENAME +unzip $CWD/$FILENAME + +rm $CWD/$FILENAME cd $APPNAM -rm -fr .git +VERSION=$(cat appinfo/info.xml | grep -i version\> | sed 's|||g' | tr -d \ | sed 's|\t||g' ) + chown -R root:root . find . \ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 -o -perm 755 \) \ @@ -48,10 +44,11 @@ find . \ mkdir -p $PKG/usr/doc/$PRGNAM cp -a AUTHORS.md CHANGELOG COPYING README.rst $PKG/usr/doc/$PRGNAM -# Change ownership and perms and create a link. -chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/owncloud/apps/$APPNAM +# Change ownership and perms +chown -R $PHPUSER:$PHPGROUP $PKG/$DOCROOT/owncloud chmod 0750 $PKG/$DOCROOT/owncloud/apps/$APPNAM + mkdir -p $PKG/install cat < $PKG/install/slack-desc $PRGNAM: $PRGNAM (RSS/Atom feed aggregator for ownCloud) diff --git a/n/owncloud/owncloud.SlackBuild b/n/owncloud/owncloud.SlackBuild index 4a7d7f23..c29d7e36 100755 --- a/n/owncloud/owncloud.SlackBuild +++ b/n/owncloud/owncloud.SlackBuild @@ -3,7 +3,8 @@ CWD=$(pwd) PRGNAM=$(basename $CWD) -VERSION=${VERSION:-$(date +%F | tr - .)} +#VERSION=${VERSION:-$(date +%F | tr - .)} +VERSION=${VERSION:-6.0.0a} ARCH="noarch" # hardcode ARCH BUILD=${BUILD:-1} TAG=${TAG:-cyco} @@ -24,9 +25,11 @@ mkdir -p $TMP $OUTPUT $PKG/$DOCROOT cd $PKG/$DOCROOT/ rm -rf $PRGNAM-$VERSION -[ ! -e $CWD/$PRGNAM-daily-master.tar.bz2 ] && wget -c http://download.owncloud.org/community/daily/$PRGNAM-daily-master.tar.bz2 -O $CWD/$PRGNAM-daily-master.tar.bz2 +#[ ! -e $CWD/$PRGNAM-daily-master.tar.bz2 ] && wget -c http://download.owncloud.org/community/daily/$PRGNAM-daily-master.tar.bz2 -O $CWD/$PRGNAM-daily-master.tar.bz2 +#tar xvf $CWD/$PRGNAM-daily-master.tar.bz2 -tar xvf $CWD/$PRGNAM-daily-master.tar.bz2 +[ ! -e $CWD/$PRGNAM-$VERSION.tar.bz2 ] && wget -c http://download.owncloud.org/community/$PRGNAM-$VERSION.tar.bz2 -O $CWD/$PRGNAM-$VERSION.tar.bz2 +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 cd $PRGNAM chown -R root:root . find . \