Giter VIP home page Giter VIP logo

scratchpkg's Issues

Optional dependencies

Hello,
is there any way to add optional dependencies?
If not, are there plans to add something like that?

`scratch sysup -o` and `scratch sysup` may damage source package

Compiling source files is often very slow, I would like scratch sysup to parallely download source packages,
so I run scratch sysup -o in the background, but sometimes scratch sysup will catch up and download
same file twice, that may damage the source package.

It would be better if there is a lock to prevent parallel downloads in /usr/bin/pkgbuild, if a source package is
being downloaded, scratch sysup will wait but scratch sysup -o will just jump to next package.

SplitDebug and Install Sources

I noticed that forking was disabled on this repo.

I have a somewhat working implementation of split debug and install sources working on my install that i wanted to commit to a fork.
Split debug symbols on gentoo (not to be confused with strip debug, i'm stripping the debug symbols and storing them separate from the executable)

I don't think it's ready for the main branch yet, and I was intending to test it organically on my system through normal use.

I just want to check it into git somewhere, anywhere.

SH server package.

I have SSH configured on my system, but I cannot find the package to install an SSH server. I have edited the sshd_config file to set it up, but I cannot find any packages with scratch search to install an SSH server. Is such a package offered by this distribution. scratch search openssh only returns the one I already have installed, but the server will not start.

revert script?

You seem to have a update script and revdep for use when updating, but nothing for reverting to the previous (non-updated) version. I sort of just expected it to be there or as a 'switch' for the update script. It's main purpose would be to go back to the previous "working" version if the problems in the updated package are too great to leave it there, or to allow time to sort out what the problem is.

Why I'm seeing this

Hi!
I don't know why I'm seeing this on screen.
Any help?
`jolupa [ ~/pkg_sources/xorg/mesa ]$ sudo scratch sysup
Checking for outdated packages...
sed: no es troba l'etiqueta per al salt a «exinfo»
Resolving dependencies...

[\e[0;32mu\e[0m] libarchive [\e[0;36mn\e[0m] libxslt [\e[0;36mn\e[0m] libxcb [\e[0;32mu\e[0m] mesa [\e[0;32mu\e[0m] rust [\e[0;36mn\e[0m] polkit [\e[0;32mu\e[0m] xorg-server `

I'm using XFCE4 Terminal
Thanks

[bug] The 'portsync' is replaced with an older version after the upgraded

@emmett1
The 'portsync' is replaced with an older version after the upgraded

  • before the upgrade, see:
#!/bin/sh
#
#  scratchpkg
#
#  Copyright (c) 2018 by Emmett1  ([email protected])
#
#  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 <https://www.gnu.org/licenses/>.
#

cmp_copy() {
	# usage:
	#   cmp_copy <source dir> <target dir>
	#
	reponame=${2##*/}
	echo "Updating repository $(basename $reponame)"
	for p in $1/*; do
		[ -d $p ] || continue
		pname=${p##*/}
		if [ ! -d $2/$pname ]; then
			mkdir -p $2/$pname
			for f in $p/* $p/.pkgfiles $p/.checksums; do
				[ -f $f ] || continue
				case $f in
					*/update) continue;;
				esac
				fname=${f##*/}
				echo " New: $reponame/$pname/$fname"
				cp $f $2/$pname/$fname
			done		
		else
			for f in $p/* $p/.pkgfiles $p/.checksums; do
				[ -f $f ] || continue
				case $f in
					*/update) continue;;
				esac
				fname=${f##*/}
				cmp -s $f $2/$pname/$fname || {
					echo " Edit: $reponame/$pname/$fname"
					cp $f $2/$pname/$fname
				}
			done
		fi
	done
	for p in $2/*; do
		[ -d $p ] || continue
		pname=${p##*/}
		for f in $p/* $p/.pkgfiles $p/.checksums; do
			[ -f $f ] || continue
			fname=${f##*/}
			if [ ! -f $1/$pname/$fname ]; then
				echo " Removed: $reponame/$pname/$fname"
				rm $2/$pname/$fname
			fi
		done
		if [ ! -d $1/$pname ]; then
			rmdir $2/$pname
		fi
	done
	echo "Finished successfully"
}

github_sync() {
	# usage:
	#   github_sync <github url> <target dir>
	#
	dir=$2
	repo=${dir##*/}
	url=$(echo $1 | cut -d / -f -5)
	branch=$(echo $1 | cut -d / -f 7)
	tarball=/tmp/$repo
	echo "Fetching from $1"
	curl --silent -LJ -o $tarball.tar.xz $url/tarball/$branch || {
		echo "Failed fetching repo from $1"
		exit 1
	}
	tar -tf $tarball.tar.xz >/dev/null 2>&1 || {
		echo "Tarball from $1 corrupted"
		exit 1
	}
	portname=$(tar -tf $tarball.tar.xz 2>/dev/null | head -n1 | cut -d / -f1)
	tar -xf $tarball.tar.xz -C /tmp
	if [ ! "$portname" ] || [ -d "$repo" ]; then
		echo "Failed sync $repo repo"
		exit 1
	fi
	cmp_copy /tmp/$portname/$repo $dir
	rm -f $tarball.tar.xz
	rm -fr /tmp/$portname
}

httpup_sync() {
	# usage:
	#   httpup_sync <url> <target dir>
	#
	command -v httpup >/dev/null 2>&1 || {
		echo "httpup not found."
		exit 1
	}
	httpup sync $1 $2 || {
		echo "Failed sync from $1"
		exit 1
	}
}

REPO_FILE=/etc/scratchpkg.repo
	
if [ ! -e "$REPO_FILE" ]; then
	echo "Repo file not found! ($REPO_FILE)"
	exit 1
fi

if [ "$(id -u)" != 0 ]; then
	echo "This operation need root access."
	exit 1
fi

grep -Ev '^(#|$)' "$REPO_FILE" | awk '{print $1,$2}' | while read -r repodir repourl; do
	if [ "$repodir" ] && [ "$repourl" ]; then
		case $repourl in
			*github.com*) github_sync $repourl $repodir;;
			           *) httpup_sync $repourl $repodir;;
		esac
	fi
done

exit 0

  • upgrade
scratch sync
scratch upgrade scratchpkg

  • after the upgrade
#!/bin/sh
#
#  scratchpkg
#
#  Copyright (c) 2018 by Emmett1  ([email protected])
#
#  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 <https://www.gnu.org/licenses/>.
#

cmp_copy() {
	# usage:
	#   cmp_copy <source dir> <target dir>
	#
	reponame=${2##*/}
	for p in $1/*; do
		[ -d $p ] || continue
		pname=${p##*/}
		if [ ! -d $2/$pname ]; then
			mkdir -p $2/$pname
			for f in $p/* $p/.pkgfiles $p/.checksums; do
				[ -f $f ] || continue
				case $f in
					*/update) continue;;
				esac
				fname=${f##*/}
				echo "  New: $reponame/$pname/$fname"
				cp $f $2/$pname/$fname
			done		
		else
			for f in $p/* $p/.pkgfiles $p/.checksums; do
				[ -f $f ] || continue
				case $f in
					*/update) continue;;
				esac
				fname=${f##*/}
				cmp -s $f $2/$pname/$fname || {
					echo "  Edit: $reponame/$pname/$fname"
					cp $f $2/$pname/$fname
				}
			done
		fi
	done
	for p in $2/*; do
		[ -d $p ] || continue
		pname=${p##*/}
		for f in $p/* $p/.pkgfiles $p/.checksums; do
			[ -f $f ] || continue
			fname=${f##*/}
			if [ ! -f $1/$pname/$fname ]; then
				echo "  Removed: $reponame/$pname/$fname"
				rm $2/$pname/$fname
			fi
		done
		if [ ! -d $1/$pname ]; then
			rmdir $2/$pname
		fi
	done
}

github_sync() {
	# usage:
	#   github_sync <github url> <target dir>
	#
	echo "Updating repo: $2"
	dir=$2
	repo=${dir##*/}
	url=$(echo $1 | cut -d / -f -5)
	branch=$(echo $1 | cut -d / -f 7)
	tmprepo=/tmp/tmprepo
	echo " fetching $1"
	rm -fr $tmprepo
	git clone -q -b $branch $url $tmprepo
	if [ $? != 0 ] || [ ! -d $tmprepo/$repo ]; then
		echo " failed sync repo"
		return 1
	fi
	cmp_copy $tmprepo/$repo $dir
	rm -fr $tmprepo
	echo " repo update completed"
}

REPO_FILE=/etc/scratchpkg.repo
	
if [ ! -e "$REPO_FILE" ]; then
	echo "Repo file not found: $REPO_FILE"
	exit 1
fi

if [ "$(id -u)" != 0 ]; then
	echo "This operation need root access."
	exit 1
fi

grep -Ev '^(#|$)' "$REPO_FILE" | awk '{print $1,$2}' | while read -r repodir repourl; do
	if [ "$repodir" ] && [ "$repourl" ]; then
		github_sync $repourl $repodir
	fi
done

exit 0

linux version problem

linux api headers in bootrap is 4.19.1, but in ports/core/linux-api-headers, it is 4.17.1.

baseinstall cannot continue

when I follow the bootstrap readme.md , ./venom/baseinstall cannot continue. It is scratch install -d xxx that says xxx is not installed.

scratch install --no-dep readline
Package 'readline' not installed.

when I look at the scratch file, the problem may be

installpkg() {

   if [ "$NO_DEP" = 1 ]; then
            for ii in ${PKGNAME[@]}; do
                    if [ ! $(getportpath $ii) ]; then
                            echo "Package '$ii' not found."
                    elif ! isinstalled $ii; then                            #here 
                            echo "Package '$ii' not installed."
                            return 1
                    else
                            pushd $(getportpath $ii)
                                    pkgbuild -i --no-hook ${OPTS[@]}
                                    if [ $? != 0 ]; then

search function doesn't work

when I type scratch search kate it says function is not available

Looks like search function was removed from scratch.

resolve httpup dependency

When i just cloned the scratchpkg in clean LFS system, a can't use them, before httpup package has been installed. But in documentation, i did'n find this info.

Or maybe i'm doing something wrong?

sysup error

When running scratch sysup i receive the following error:

Checking for outdated packages...
grep: invalid argument ‘epends’ for ‘--directories’
Valid arguments are:

  • ‘read’
  • ‘recurse’
  • ‘skip’
    Usage: grep [OPTION]... PATTERNS [FILE]...
    Try 'grep --help' for more information.

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.