From 3ac3ae199febfa1133aae3021626f5f9b146b73f Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Mon, 6 Jul 2020 05:38:54 +0000 Subject: [PATCH] Change numberings of scriptlets: - major number can be on 4 digits, so use it in packInstall - minor number (for package manager) can be greater than 10 - code on 2 digits - change various files accordingly --- LFS/lfs.xsl | 8 +++++++- common/libs/func_wrt_Makefile | 2 +- pkgmngt/packInstall.sh.dpkg | 2 +- pkgmngt/packInstall.sh.pacman | 16 ++++++++++------ pkgmngt/packInstall.sh.porg | 2 +- pkgmngt/packInstall.sh.template | 2 +- 6 files changed, 21 insertions(+), 11 deletions(-) diff --git a/LFS/lfs.xsl b/LFS/lfs.xsl index 0f64dde..1789070 100644 --- a/LFS/lfs.xsl +++ b/LFS/lfs.xsl @@ -368,11 +368,17 @@ fi + + + 0 + + + - #!/bin/bash set +h diff --git a/common/libs/func_wrt_Makefile b/common/libs/func_wrt_Makefile index 245f7fe..df08133 100644 --- a/common/libs/func_wrt_Makefile +++ b/common/libs/func_wrt_Makefile @@ -64,7 +64,7 @@ EOF #----------------------------------# get_package_tarball_name() { # #----------------------------------# - local script_name=`echo ${1} | sed -e 's@^[0-9]\{1\}-@@'` + local script_name=`echo ${1} | sed -e 's@^[0-9]\{2\}-@@'` # The use of 'head' is necessary to limit the return value to the FIRST match.. # hopefully this will not cause problems. diff --git a/pkgmngt/packInstall.sh.dpkg b/pkgmngt/packInstall.sh.dpkg index 8dd7421..70547d9 100644 --- a/pkgmngt/packInstall.sh.dpkg +++ b/pkgmngt/packInstall.sh.dpkg @@ -7,7 +7,7 @@ packInstall() { local PCKGVRS=$(basename $PKGDIR) local TGTPKG=$(basename $PKG_DEST) local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' | - sed 's/^[0-9]\{1\}-//') + sed 's/^[0-9]\{2\}-//') case $PCKGVRS in expect*|tcl*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*//') ;; vim*|unzip*) local VERSION=$(echo $PCKGVRS | sed 's/^[^0-9]*\([0-9]\)\([0-9]\)/\1.\2/') ;; diff --git a/pkgmngt/packInstall.sh.pacman b/pkgmngt/packInstall.sh.pacman index 2b1dafa..d8651d2 100644 --- a/pkgmngt/packInstall.sh.pacman +++ b/pkgmngt/packInstall.sh.pacman @@ -8,8 +8,8 @@ packInstall() { # A proposed implementation for versions and package names. local PCKGVRS=$(basename $PKGDIR) local TGTPKG=$(basename $PKG_DEST) -local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3\}-//' | - sed 's/^[0-9]\{1\}-//') +local PACKAGE=$(echo ${TGTPKG} | sed 's/^[0-9]\{3,4\}-//' | + sed 's/^[0-9]\{2\}-//') # version is only accessible from PKGDIR name. Since the format of the # name is not normalized, several hacks are necessary... case $PCKGVRS in @@ -33,7 +33,11 @@ rm -fv ./usr/share/info/dir # recommended since this directory is already there # Right now, we have the files in the current directory. They should be moved # to /sources/$PACKAGE/src. mkdir -p ../$PACKAGE/src +# We'll build as user tester. We need this directory to be owned by that user. +chown -R tester ../$PACKAGE mv * ../$PACKAGE/src +chown -R tester $PKG_DEST +chmod -R o+r ../$PACKAGE cat > PKGBUILD <