Subversion Repositories DevTools

Rev

Rev 1281 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1281 Rev 3613
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
-
 
2
#set -x
2
 
3
 
3
USAGE="Usage: make_readonly archive pkgname pkgversion"
4
USAGE="Usage: make_readonly archive pkgname pkgversion"
4
case "$1" in
5
case "$1" in
5
  -h*|--h*)     echo "$USAGE"; exit 0 ;;
6
  -h*|--h*)     echo "$USAGE"; exit 0 ;;
6
esac
7
esac
7
if [ $# != 3 ]; then
8
if [ $# != 3 ]; then
8
  echo "$USAGE" 1>&2
9
  echo "$USAGE" 1>&2
9
  exit 100
10
  exit 100
10
fi
11
fi
11
 
12
 
-
 
13
# Log operations
-
 
14
LOGDIR=/home/releasem/logs
-
 
15
LOGFILE=`date +release.%Y.%m.%d.log`
-
 
16
mkdir -p $LOGDIR
-
 
17
echo `date` " make_readonly $1 $2 $3" >> $LOGDIR/$LOGFILE
-
 
18
 
-
 
19
 
12
case "$1" in
20
case "$1" in
13
  dpkg_archive)         ARCHIVE="/devl/dpkg_archive" ;;
21
  dpkg_archive)         ARCHIVE="/devl/dpkg_archive" ;;
14
  deploy_archive)       ARCHIVE="/export/deploy/deploy_archive" ;;
22
  deploy_archive)       ARCHIVE="/devl/deploy_archive" ;;
15
  releases)             ARCHIVE="/devl/releases" ;;
23
  releases)             ARCHIVE="/devl/releases" ;;
16
  *)                    echo "$0: Invalid archive: $1" 1>&2
24
  *)                    echo "$0: Invalid archive: $1" 1>&2
17
                        exit 101
25
                        exit 101
18
                        ;;
26
                        ;;
19
esac
27
esac
Line 38... Line 46...
38
  ( cd "$PKGDIR"; chmod +x PostInstall.sh; ./PostInstall.sh )
46
  ( cd "$PKGDIR"; chmod +x PostInstall.sh; ./PostInstall.sh )
39
  echo "PostInstall script execution complete"
47
  echo "PostInstall script execution complete"
40
fi
48
fi
41
 
49
 
42
#
50
#
43
# Fix owner and prems on files and directories
51
# Fix owner and perms on files and directories
44
# Do not do links
52
#   Do not do links
-
 
53
#   Remove write access
-
 
54
#   Set owner to root
-
 
55
#   Remove 'releasem' user placed to allow release note insertion
45
#
56
#
46
find  "$PKGDIR"  ! -type l -exec chmod a-w {} \; -exec chown root:other {} \;
57
#find "$PKGDIR"  ! -type l -exec chmod a-w {} \; -exec chown root:ccperdev {} \;
-
 
58
#setfacl -R -m group::r-x "$PKGDIR"
-
 
59
#setfacl -R -x user:releasem "$PKGDIR"
-
 
60
 
-
 
61
setfacl -R -x user:releasem "$PKGDIR"
-
 
62
setfacl -R -m user::rX,group::rX,other::rX "$PKGDIR"
47
 
63