Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-g2.git;a=commitdiff;h=d62e7440fb5d13555ed0755e82ac7598af51a73e
commit d62e7440fb5d13555ed0755e82ac7598af51a73e Author: crazy <[email protected]> Date: Thu Jan 25 22:56:46 2018 +0100 revert pacman5 patches * need to revert these for now .. thx meltdown && spectre :D diff --git a/doc/FrugalBuild.txt b/doc/FrugalBuild.txt index 0caa002..df17040 100644 --- a/doc/FrugalBuild.txt +++ b/doc/FrugalBuild.txt @@ -57,7 +57,12 @@ not allowed. Use the commit message to mention others if you wish. `pkgname` defines the package name. It should not contain any uppercase letters. The package version defines the upstream version, while the package -release tracks the Frugalware-specific changes. `pkgrel` should be an integer. +release tracks the Frugalware-specific changes. `pkgrel` should be an integer, +the ones like `5wanda1` are reserved for security updates. In the later case +the rule is the following: If the original package's `pkgrel` was 4, then +increment it once when you add a security patch, but then use `5wanda1`, +`5wanda2` and so on. This way the user can easily upgrade to `pkgrel=5` which +is in `-current`. `pkgdesc` is a short one-line description for the package. Usually taken from the project's homepage or manpage. Try to keep the length under 80 chars. @@ -223,8 +228,8 @@ source (array):: they have a fully-qualified URL. Then if the source file does not already exist in `/var/cache/pacman-g2/src`, the file is downloaded by wget. -sha256sums (array):: - If this field is present, it should contain an SHA256 hash for every source file +sha1sums (array):: + If this field is present, it should contain an SHA1 hash for every source file specified in the source array (in the same order). `makepkg` will use this to verify source file integrity during subsequent builds. To easily update sha1sums in the FrugalBuild, run `makepkg -G`. @@ -474,6 +479,7 @@ installation/deinstallation: ---- post_install() { + chkconfig --add rc.foobar # On install (not upgrade), enable (but don't start) the # units by default systemctl enable foobar.service >/dev/null 2>&1 @@ -484,11 +490,16 @@ post_upgrade() # Reload init system configuration, to make systemd honour changed # unit files systemctl daemon-reload >/dev/null 2>&1 + if [ `vercmp $2 4.4-5` -lt 0 ]; then + if chkconfig rc.foobar; then + post_install + fi + fi } pre_remove() { - + chkconfig --del rc.foobar # On uninstall (not upgrade), disable and stop the units systemctl --no-reload disable foobar.service >/dev/null 2>&1 systemctl stop foobar.service >/dev/null 2>&1 @@ -504,10 +515,10 @@ post_remove() == SEE ALSO -*makepkg*(8), *pacman*(8) +*makepkg*(8), *pacman-g2*(8) include::bugs.txt[] == AUTHORS -See /usr/share/doc/pacman-*/AUTHORS. +See /usr/share/doc/pacman-g2-*/AUTHORS. diff --git a/scripts/gensync b/scripts/gensync index 230babd..dbb1555 100755 --- a/scripts/gensync +++ b/scripts/gensync @@ -162,30 +162,31 @@ db_write_entry() echo "%STICK%" >>desc echo "" >>desc fi - + # depends + : >depends if [ ${#depends[*]} -gt 0 -o ${#rodepends[*]} -gt 0 ]; then - echo "%DEPENDS%" >>desc + echo "%DEPENDS%" >>depends for it in ${depends[@]} ${rodepends[@]}; do - echo "$it" >>desc + echo "$it" >>depends done - echo "" >>desc + echo "" >>depends fi if [ ${#conflicts[*]} -gt 0 ]; then - echo "%CONFLICTS%" >>desc + echo "%CONFLICTS%" >>depends for it in ${conflicts[@]}; do - echo "$it" >>desc + echo "$it" >>depends done - echo "" >>desc + echo "" >>depends fi if [ ${#provides[*]} -gt 0 ]; then - echo "%PROVIDES%" >>desc + echo "%PROVIDES%" >>depends for it in ${provides[@]}; do - echo "$it" >>desc + echo "$it" >>depends done - echo "" >>desc + echo "" >>depends fi # preserve the modification time - touch -r $file desc + touch -r $file desc depends } in_array() @@ -285,12 +286,22 @@ for file in `find $rootdir -name $BUILDSCRIPT`; do fi done +if [ ! "$check_only" ]; then +ver="" +if ( cd $rootdir; git rev-parse --get-root &>/dev/null); then + ver=`cd $rootdir; git describe 2>/dev/null` +fi +extra="" +if [ -n "$ver" ]; then + echo ${ver//-/.} > $gstmpdir/.version + extra=".version" +fi echo "gensync: compressing to $destfile..." >&2 cd $gstmpdir -fakeroot tar --use-compress-program=xz -cf $destfile * +fakeroot tar --use-compress-program=xz -cf $destfile $extra * [ $? -gt 0 ] && die "error writing to $destfile" rm -rf $gstmpdir - +fi exit 0 diff --git a/scripts/makepkg b/scripts/makepkg index 6d6e287..44fda84 100755 --- a/scripts/makepkg +++ b/scripts/makepkg @@ -56,15 +56,7 @@ NODOCS=0 TREE="" CACHEURL="" - -## we don't want to break all chroots on switch -if [[ -e /usr/bin/pacman-g2.static ]]; then - PACMAN="pacman-g2.static" -else - ## upstream one - PACMAN="pacman.static" -fi - +PACMAN="pacman-g2.static" PACMAN_OPTS= # compat functions. these are useful if one would like to use makepkg outside diff --git a/scripts/updatesync b/scripts/updatesync index 76a5eb0..f1f3415 100755 --- a/scripts/updatesync +++ b/scripts/updatesync @@ -152,27 +152,28 @@ db_write_entry() echo "%STICK%" >>desc echo "" >>desc fi - + # depends + : >depends if [ ${#depends[*]} -gt 0 -o ${#rodepends[*]} -gt 0 ]; then - echo "%DEPENDS%" >>desc + echo "%DEPENDS%" >>depends for it in ${depends[@]} ${rodepends[@]}; do - echo "$it" >>desc + echo "$it" >>depends done - echo "" >>desc + echo "" >>depends fi if [ ${#conflicts[*]} -gt 0 ]; then echo "%CONFLICTS%" >>depends for it in ${conflicts[@]}; do - echo "$it" >>desc + echo "$it" >>depends done - echo "" >>desc + echo "" >>depends fi if [ ${#provides[*]} -gt 0 ]; then - echo "%PROVIDES%" >>desc + echo "%PROVIDES%" >>depends for it in ${provides[@]}; do - echo "$it" >>desc + echo "$it" >>depends done - echo "" >>desc + echo "" >>depends fi cd .. fakeroot tar rf $udb $1-$pkgver-$pkgrel @@ -318,7 +319,16 @@ if [ "$action" = "upd" ]; then i=$(($i+1)) done fi - + ver="" + rootdir=`dirname $option` + if ( cd $rootdir; git rev-parse --get-root &>/dev/null); then + ver=`cd $rootdir; git describe 2>/dev/null` + fi + if [ -n "$ver" ]; then + echo ${ver//-/.} > .version + tar --delete -f $udb .version 2>/dev/null + fakeroot tar rf $udb .version + fi else # DELETE delete_entry $option _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
