pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pkgtasks Update pkgtools/pkgtasks to 1.15.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/dd983582f03b
branches:  trunk
changeset: 367079:dd983582f03b
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Aug 23 17:53:19 2017 +0000

description:
Update pkgtools/pkgtasks to 1.15.

Fix bug where "ocaml_findlib" and "shells" tasks were not
preserving the ownership and permissions of existing system files,
e.g., /etc/shells, when updating their contents.

diffstat:

 pkgtools/pkgtasks/Makefile                   |   4 +-
 pkgtools/pkgtasks/files/NEWS.md              |  15 ++++++-
 pkgtools/pkgtasks/files/README.md            |   2 +-
 pkgtools/pkgtasks/files/build-aux/install-sh |   2 +-
 pkgtools/pkgtasks/files/configure            |  20 ++++----
 pkgtools/pkgtasks/files/configure.ac         |   2 +-
 pkgtools/pkgtasks/files/ocaml_findlib.subr   |  17 +++++--
 pkgtools/pkgtasks/files/refcount_file.subr   |  32 ++++++++++++--
 pkgtools/pkgtasks/files/shells.subr          |  16 +++++--
 pkgtools/pkgtasks/files/t/t_ocaml_findlib.sh |  59 ++++++++++++++++++++++-----
 pkgtools/pkgtasks/files/t/t_shells.sh        |  59 ++++++++++++++++++++++-----
 11 files changed, 175 insertions(+), 53 deletions(-)

diffs (truncated from 630 to 300 lines):

diff -r 03e83b045947 -r dd983582f03b pkgtools/pkgtasks/Makefile
--- a/pkgtools/pkgtasks/Makefile        Wed Aug 23 17:52:59 2017 +0000
+++ b/pkgtools/pkgtasks/Makefile        Wed Aug 23 17:53:19 2017 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.6 2017/08/19 00:30:07 jlam Exp $
+# $NetBSD: Makefile,v 1.7 2017/08/23 17:53:19 jlam Exp $
 
-DISTNAME=              pkgtasks-1-1.14
+DISTNAME=              pkgtasks-1-1.15
 CATEGORIES=            pkgtools
 MASTER_SITES=          # empty
 DISTFILES=             # empty
diff -r 03e83b045947 -r dd983582f03b pkgtools/pkgtasks/files/NEWS.md
--- a/pkgtools/pkgtasks/files/NEWS.md   Wed Aug 23 17:52:59 2017 +0000
+++ b/pkgtools/pkgtasks/files/NEWS.md   Wed Aug 23 17:53:19 2017 +0000
@@ -2,6 +2,19 @@
 =============
 
 
+Changes in version 1.15
+-----------------------
+**Released on 2017-08-23.**
+
+* Fix bug where the `ocaml_findlib` and `shells` tasks were not
+  preserving the ownership and permissions of existing system files
+  when updating their contents.
+
+* Relax the permissions of the files created by the `refcount_file`
+  implementation of the `refcount` task so that they are readable
+  by anyone.
+
+
 Changes in version 1.14
 -----------------------
 **Released on 2017-08-14.**
@@ -15,7 +28,7 @@
 **Released on 2017-08-08.**
 
 * Make the output messages for the `groups` and `users` tasks easier
-  to understand by making them slightly more verobse and changing
+  to understand by making them slightly more verbose and changing
   the formatting.
 
 
diff -r 03e83b045947 -r dd983582f03b pkgtools/pkgtasks/files/README.md
--- a/pkgtools/pkgtasks/files/README.md Wed Aug 23 17:52:59 2017 +0000
+++ b/pkgtools/pkgtasks/files/README.md Wed Aug 23 17:53:19 2017 +0000
@@ -26,7 +26,7 @@
 Getting sources
 ---------------
 
-The latest version of *pkgtasks* is 1.14 and was released on August 14th, 2017.
+The latest version of *pkgtasks* is 1.15 and was released on August 23th, 2017.
 
 See the [release notes](NEWS.md) for information about the changes in this
 and all previous releases.
diff -r 03e83b045947 -r dd983582f03b pkgtools/pkgtasks/files/build-aux/install-sh
--- a/pkgtools/pkgtasks/files/build-aux/install-sh      Wed Aug 23 17:52:59 2017 +0000
+++ b/pkgtools/pkgtasks/files/build-aux/install-sh      Wed Aug 23 17:53:19 2017 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: install-sh,v 1.4 2017/08/19 00:30:07 jlam Exp $
+# $NetBSD: install-sh,v 1.5 2017/08/23 17:53:19 jlam Exp $
 # This script now also installs multiple files, but might choke on installing
 # multiple files with spaces in the file names.
 #
diff -r 03e83b045947 -r dd983582f03b pkgtools/pkgtasks/files/configure
--- a/pkgtools/pkgtasks/files/configure Wed Aug 23 17:52:59 2017 +0000
+++ b/pkgtools/pkgtasks/files/configure Wed Aug 23 17:53:19 2017 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for pkgtasks-1 1.14.
+# Generated by GNU Autoconf 2.69 for pkgtasks-1 1.15.
 #
 # Report bugs to <jlam%NetBSD.org@localhost>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='pkgtasks-1'
 PACKAGE_TARNAME='pkgtasks-1'
-PACKAGE_VERSION='1.14'
-PACKAGE_STRING='pkgtasks-1 1.14'
+PACKAGE_VERSION='1.15'
+PACKAGE_STRING='pkgtasks-1 1.15'
 PACKAGE_BUGREPORT='jlam%NetBSD.org@localhost'
 PACKAGE_URL=''
 
@@ -1209,7 +1209,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures pkgtasks-1 1.14 to adapt to many kinds of systems.
+\`configure' configures pkgtasks-1 1.15 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1275,7 +1275,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of pkgtasks-1 1.14:";;
+     short | recursive ) echo "Configuration of pkgtasks-1 1.15:";;
    esac
   cat <<\_ACEOF
 
@@ -1355,7 +1355,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-pkgtasks-1 configure 1.14
+pkgtasks-1 configure 1.15
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1372,7 +1372,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by pkgtasks-1 $as_me 1.14, which was
+It was created by pkgtasks-1 $as_me 1.15, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2242,7 +2242,7 @@
 
 # Define the identity of the package.
  PACKAGE='pkgtasks-1'
- VERSION='1.14'
+ VERSION='1.15'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -3078,7 +3078,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by pkgtasks-1 $as_me 1.14, which was
+This file was extended by pkgtasks-1 $as_me 1.15, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3131,7 +3131,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-pkgtasks-1 config.status 1.14
+pkgtasks-1 config.status 1.15
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -r 03e83b045947 -r dd983582f03b pkgtools/pkgtasks/files/configure.ac
--- a/pkgtools/pkgtasks/files/configure.ac      Wed Aug 23 17:52:59 2017 +0000
+++ b/pkgtools/pkgtasks/files/configure.ac      Wed Aug 23 17:53:19 2017 +0000
@@ -26,7 +26,7 @@
 dnl POSSIBILITY OF SUCH DAMAGE.
 dnl
 
-AC_INIT([pkgtasks-1], [1.14], [jlam%NetBSD.org@localhost])
+AC_INIT([pkgtasks-1], [1.15], [jlam%NetBSD.org@localhost])
 
 
 AC_CONFIG_AUX_DIR([build-aux])
diff -r 03e83b045947 -r dd983582f03b pkgtools/pkgtasks/files/ocaml_findlib.subr
--- a/pkgtools/pkgtasks/files/ocaml_findlib.subr        Wed Aug 23 17:52:59 2017 +0000
+++ b/pkgtools/pkgtasks/files/ocaml_findlib.subr        Wed Aug 23 17:53:19 2017 +0000
@@ -109,6 +109,7 @@
 
 task_ocaml_findlib()
 {
+       : ${CP:=cp}
        : ${MV:=mv}
 
        : ${OCAML_SITELIB:=lib/ocaml/site-lib}
@@ -200,12 +201,15 @@
                                                task_quote "$temp"
                                                temp_quoted="$quoted"
                                                __task_ocaml_findlib_temps__="$__task_ocaml_findlib_temps__ $temp_quoted"
-                                               if [ ! -f "$ldconf" ]; then
-                                                       echo "$libdir"
+                                               if [ -f "$ldconf" ]; then
+                                                       # Preserve existing ownership and permissions onto tempfile.
+                                                       ${CP} -fp "$ldconf" "$temp"
+                                                       # Overwrite contents of tempfile.
+                                                       { task_match -vw "$libdir" < $ldconf; echo "$libdir"; } > $temp
                                                else
-                                                       task_match -vw "$libdir" < $ldconf
-                                                       echo "$libdir"
-                                               fi > $temp
+                                                       # Overwrite contents of tempfile.
+                                                       echo "$libdir" > $temp
+                                               fi
                                                # rename(2) is atomic.
                                                if ${MV} -f "$temp" "$ldconf"; then
                                                        $echo "${TASK_MSG}> path added: $libdir"
@@ -225,6 +229,9 @@
                                                task_quote "$temp"
                                                temp_quoted="$quoted"
                                                __task_ocaml_findlib_temps__="$__task_ocaml_findlib_temps__ $temp_quoted"
+                                               # Preserve existing ownership and permissions onto tempfile.
+                                               ${CP} -fp "$ldconf" "$temp"
+                                               # Overwrite contents of tempfile.
                                                task_match -vw "$libdir" < $ldconf > $temp
                                                # rename(2) is atomic.
                                                if ${MV} -f "$temp" "$ldconf"; then
diff -r 03e83b045947 -r dd983582f03b pkgtools/pkgtasks/files/refcount_file.subr
--- a/pkgtools/pkgtasks/files/refcount_file.subr        Wed Aug 23 17:52:59 2017 +0000
+++ b/pkgtools/pkgtasks/files/refcount_file.subr        Wed Aug 23 17:53:19 2017 +0000
@@ -214,6 +214,8 @@
 
 _task_refcount_file_add()
 {
+       : ${CHMOD:=chmod}
+       : ${CP:=cp}
        : ${MV:=mv}
 
        local token=
@@ -252,11 +254,17 @@
                task_quote "$temp"
                temp_quoted=$quoted
                __task_refcount_file_temps__="$__task_refcount_file_temps__ $temp_quoted"
-               { if [ -f "$countfile" ]; then
-                       task_match -sv "$token" < $countfile
-                 fi
-                 echo "$token"
-               } > $temp
+               if [ -f "$countfile" ]; then
+                       # Preserve existing ownership and permissions onto tempfile.
+                       ${CP} -fp "$countfile" "$temp"
+                       # Overwrite contents of tempfile.
+                       { task_match -sv "$token" < $countfile; echo "$token"; } > $temp
+               else
+                       # Overwrite contents of tempfile.
+                       echo "$token" > $temp
+                       # Relax permissions of new file.
+                       ${CHMOD} go+r "$temp"
+               fi
                # rename(2) is atomic
                if ${MV} -f "$temp" "$countfile"; then
                        __task_refcount_file_temps__=${__task_refcount_file_temps__% $temp_quoted}
@@ -274,6 +282,7 @@
 
 _task_refcount_file_remove()
 {
+       : ${CP:=cp}
        : ${MV:=mv}
        : ${RM:=rm}
        : ${RMDIR:=rmdir}
@@ -312,6 +321,9 @@
                        task_quote "$temp"
                        temp_quoted=$quoted
                        __task_refcount_file_temps__="$__task_refcount_file_temps__ $temp_quoted"
+                       # Preserve existing ownership and permissions onto tempfile.
+                       ${CP} -fp "$countfile" "$temp"
+                       # Overwrite contents of tempfile.
                        task_match -sv "$token" < $countfile > $temp
                        local remaining=
                        if [ -f "$temp" ]; then
@@ -383,6 +395,8 @@
 
 _task_refcount_file_prop_put()
 {
+       : ${CHMOD:=chmod}
+       : ${CP:=cp}
        : ${MV:=mv}
 
        local db="$1"; shift
@@ -408,6 +422,14 @@
                task_quote "$temp"
                temp_quoted=$quoted
                __task_refcount_file_temps__="$__task_refcount_file_temps__ $temp_quoted"
+               if [ -f "$propfile" ]; then
+                       # Preserve existing ownership and permissions onto tempfile.
+                       ${CP} -fp "$propfile" "$temp"
+               else
+                       # Relax permissions of new file.
+                       ${CHMOD} go+r "$temp"
+               fi
+               # Overwrite contents of tempfile.
                local value
                if [ $# -gt 0 ]; then
                        value="$@"
diff -r 03e83b045947 -r dd983582f03b pkgtools/pkgtasks/files/shells.subr
--- a/pkgtools/pkgtasks/files/shells.subr       Wed Aug 23 17:52:59 2017 +0000
+++ b/pkgtools/pkgtasks/files/shells.subr       Wed Aug 23 17:53:19 2017 +0000
@@ -109,6 +109,7 @@
 
 task_shells()
 {
+       : ${CP:=cp}
        : ${MV:=mv}
 
        : ${PKG_PREFIX:=/usr/pkg}
@@ -199,12 +200,14 @@
                                                        task_quote "$temp"
                                                        temp_quoted="$quoted"
                                                        __task_shells_temps__="$__task_shells_temps__ $temp_quoted"
-                                                       if [ ! -f "$shelldb" ]; then
-                                                               echo "$shell"



Home | Main Index | Thread Index | Old Index