Giter Site home page Giter Site logo

zeppe-lin / pkgmk Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 713 KB

Package management utility which makes a software package

Home Page: https://zeppe-lin.github.io/pkgmk.8.html

License: GNU General Public License v2.0

Makefile 2.93% Shell 50.70% Roff 46.36%
package-builder package-management pkgmk posix-sh

pkgmk's People

Contributors

abrouwers avatar mhoush avatar nipul avatar predivan avatar sighook avatar thomaspenteker avatar tilman2 avatar winkj avatar

Watchers

 avatar

pkgmk's Issues

pkgmk checks of directory permissions are too strict

Reference: https://crux.nu/bugs/index.php?do=details&task_id=1382

The checks of directory permissions of pkgmk are too strict.

what I've stumbled upon so far:
-uf -um -us only need read permission on source directory and write permission on port directory
-rs only needs write permission on port directory
-do needs write permission on source directory and read permission on port directory

regards, deepthought

P.S. The user building my own ports is not the one who owns the ports tree.
So I have to "pkgmk -uf", "pkgmk -um" and "pkgmk -us" as root and chown the files afterwards.
--- a/pkgmk.in	2017-03-01 20:04:24.792329517 +0100
+++ b/pkgmk.in	2017-03-01 20:09:20.608612750 +0100
@@ -103,9 +103,14 @@
 		error "File '$1' is not writable."
 		exit 1
 	fi
+	if [ ! -e $1 ]; then
+		check_directory `dirname $1`
+	fi
 }
 
 download_file() {
+	check_directory "$PKGMK_SOURCE_DIR"
+
 	info "Downloading '$1'."
 
 	PKGMK_DOWNLOAD_PROG=${PKGMK_DOWNLOAD_PROG:-wget}
@@ -620,10 +625,13 @@
 	local FILE LOCAL_FILENAME
 
 	if [ -f $TARGET ]; then
+		check_directory "$PKGMK_PACKAGE_DIR"
 		info "Removing $TARGET"
 		rm -f $TARGET
 	fi
 
+	check_directory "$PKGMK_SOURCE_DIR"
+
 	for FILE in ${source[@]}; do
 		LOCAL_FILENAME=`get_filename $FILE`
 		if [ -e $LOCAL_FILENAME ] && [ "$LOCAL_FILENAME" != "$FILE" ]; then
@@ -641,7 +649,6 @@
 
 	check_file "$PKGMK_FOOTPRINT"
 	make_footprint > $PKGMK_FOOTPRINT
-	touch $TARGET
 
 	info "Footprint updated."
 }
@@ -811,10 +818,6 @@
 		. $FILE
 	done
 
-	check_directory "$PKGMK_SOURCE_DIR"
-	check_directory "$PKGMK_PACKAGE_DIR"
-	check_directory "`dirname $PKGMK_WORK_DIR`"
-
 	check_pkgfile
 
 	case $PKGMK_COMPRESSION_MODE in
@@ -867,6 +870,8 @@
 
 	if [ "$PKGMK_EXTRACT_ONLY" = "yes" ]; then
 		download_source
+		check_directory "$PKGMK_PACKAGE_DIR"
+		check_directory "`dirname $PKGMK_WORK_DIR`"
 		make_work_dir
 		info "Extracting sources of package '$name-$version'."
 		unpack_source
@@ -886,6 +891,8 @@
 		info "Package '$TARGET' is up to date."
 	else
 		download_source
+		check_directory "$PKGMK_PACKAGE_DIR"
+		check_directory "`dirname $PKGMK_WORK_DIR`"
 		build_package
 	fi
 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.